/* Sunflow Invites: the page around the invitation. The invitation and its themes live in invite.css. */

/* ── Tokens. A rebrand edits this block and js/brand.js. ──────────────────────────────────────────────────
   The page is a quiet counter: two faces, eight sizes, a handful of colour roles, three radii, one easing.
   The invitation keeps its own tokens at the top of invite.css and reads none of these. */
:root {
  /* Type: Petrona for display, Source Sans 3 for text and controls */
  --display: 'Petrona', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --wordmark: 'Fraunces', 'Iowan Old Style', Georgia, serif;   /* the Sunflow wordmark stays as drawn */
  --t-hero: clamp(2.5rem, 1.6rem + 4.2vw, 4rem);
  --t-h2: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  --t-h3: 1.5rem; --t-figure: 2rem; --t-title: 1.1875rem;
  --t-body: 1.0625rem; --t-small: .9375rem; --t-label: .8125rem;
  /* Colour roles. Gold is the one pay or save button on a screen, and the Bloom. */
  --ground: #0D0A08; --raised: #15110E; --ink: #FFF6E6; --ink-quiet: #BBAE9B;
  --line: #8A7B6A; --hair: #3A3027; --gold: #FFC53D; --on-gold: #1E1400; --focus: #A9ADFF;
  --ok: #3DDC97; --no: #FF8A95; --lens: #2B2D6E;
  --paper: #FFFDF8; --paper-ink: #1D1711; --paper-quiet: #62574A; --paper-line: #8C7F6C; --paper-hair: #E4D8C2; --paper-no: #A3261B; --paper-ok: #17643F; --paper-focus: #2B2D6E;
  /* Shape, space and motion */
  --r-paper: 2px; --r-ctl: 8px; --r-panel: 14px;
  --top-h: 68px;   /* the sticky top bar on wide screens; the preview panel and jump targets are measured from it */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --ease: cubic-bezier(.2, .8, .2, 1); --quick: 120ms; --move: 200ms; --slow: 320ms;
  --bloom-line: url("../brand/bloom-line.svg");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html[data-motion="reduce"] { scroll-behavior: auto; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 var(--t-body)/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p, ol, ul, dl, dd, fieldset, legend { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg, canvas { display: block; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Which parts each page shows: the maker (builder), a guest's letter, the hosts' private page (host), or a page that cannot be shown (gone). */
html[data-mode="guest"] :is(.site-only, .host-only, .edit-only),
html[data-mode="builder"] :is(.guest-only, .host-only),
html[data-mode="host"] :is(.guest-only, .site-only),
html[data-mode="gone"] :is(.site-only, .host-only, .edit-only, .guest-only, main, .skip),
html:not([data-mode="gone"]) .gone-only { display: none !important; }
html[data-wait] :is(main, .top, .foot, .savebar, .gone) { visibility: hidden; }
.waiting { display: none; }
html[data-wait] .waiting { display: grid; place-items: center; position: fixed; inset: 0; margin: 0; }
html[data-wait] .waiting img { opacity: .9; animation: turn 2.4s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }

/* The room: flat warm night, the lens shade high on the right, and the Bloom turning slowly, low on the left. */
.room { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: radial-gradient(70% 70% at 108% -10%, color-mix(in srgb, var(--lens) 38%, transparent) 0%, transparent 62%) var(--ground); }
.room::before { content: ''; position: absolute; left: -46vw; bottom: -40vw; width: 150vw; height: 150vw; opacity: .08; background: var(--gold);
  -webkit-mask: var(--bloom-line) center / contain no-repeat; mask: var(--bloom-line) center / contain no-repeat; animation: turn 240s linear infinite; }
@media (min-width: 900px) { .room::before { left: -52vh; bottom: -62vh; width: 130vh; height: 130vh; } }

/* ══ Components ═════════════════════════════════════════════════════════════════════════════
   Plain parts, used the same way everywhere on the page. None of these class names is used inside
   the invitation, so nothing here can reach it. */

/* On paper (the order ticket) the same roles point at the paper's own ink, lines and focus colour,
   so every part below works there without a second set of rules. */
.ticket { --ink: var(--paper-ink); --ink-quiet: var(--paper-quiet); --line: var(--paper-line); --hair: var(--paper-hair);
  --ground: var(--paper); --raised: var(--paper); --focus: var(--paper-focus); --ok: var(--paper-ok); --no: var(--paper-no); }

/* Buttons: three kinds only. Gold is the one pay or save action in view, a 1px line is every other button,
   and an underlined link is the least. Flat, square-cornered, 48 high. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 48px; padding: var(--s2) var(--s5); border: 1px solid var(--line); border-radius: var(--r-ctl); background: transparent; color: var(--ink); font: 600 var(--t-body)/1.2 var(--sans); text-align: center; text-decoration: none; transition: background-color var(--quick) var(--ease), border-color var(--quick) var(--ease), color var(--quick) var(--ease); }
.btn:hover { border-color: var(--ink); }
.btn:active { background: var(--hair); }
.btn.gold { border-color: var(--gold); background: var(--gold); color: var(--on-gold); }
.btn.gold:hover { border-color: var(--ink); }
.btn.gold:active { background: var(--gold); }
.btn.sm { min-height: 44px; padding: var(--s1) var(--s4); }
.btn.big, .btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.gold:disabled { border-color: var(--line); background: transparent; color: var(--ink-quiet); opacity: 1; }   /* a pay button with nothing to pay for is not gold */
.btn.busy { cursor: progress; }
.link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.link:hover { text-decoration-thickness: 2px; }
.skip { position: absolute; left: var(--s3); top: -80px; z-index: 60; padding: var(--s3) var(--s4); border-radius: var(--r-ctl); background: var(--ink); color: var(--ground); font-weight: 600; }
.skip:focus { top: var(--s3); }

/* Fields: a visible label above, a 1px control line, 17px text (so a phone does not zoom in on focus). */
.field { display: grid; gap: var(--s2); min-width: 0; }
.field > span, .label { display: block; font: 600 var(--t-label)/1.3 var(--sans); color: var(--ink-quiet); }
.field em, .label em { font-style: normal; font-weight: 400; }
.field input, .field select, .field textarea, .erow input, .erow textarea, .share-row input, .grow input, .grow select, .lrow input, .lrow textarea {
  width: 100%; min-width: 0; height: 48px; padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--raised); color: var(--ink);
  font: 400 var(--t-body)/1.3 var(--sans); color-scheme: dark; transition: border-color var(--quick) var(--ease); }
.field input:hover, .field select:hover, .field textarea:hover, .erow input:hover, .erow textarea:hover, .grow input:hover, .grow select:hover, .lrow input:hover, .lrow textarea:hover { border-color: var(--ink-quiet); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible, .erow input:focus-visible, .erow textarea:focus-visible, .grow input:focus-visible, .grow select:focus-visible, .lrow input:focus-visible, .lrow textarea:focus-visible { border-color: var(--ink); }
.field textarea, .erow textarea, .lrow textarea { display: block; height: auto; min-height: 72px; padding: var(--s3); line-height: 1.4; resize: vertical; }
.field input::placeholder, .erow input::placeholder, .erow textarea::placeholder, .grow input::placeholder, .lrow input::placeholder, .lrow textarea::placeholder { color: var(--ink-quiet); opacity: .8; }
.field input[type="color"] { padding: var(--s1); cursor: pointer; }
.pick { position: relative; display: block; min-width: 0; }
.pick select { -webkit-appearance: none; appearance: none; padding-right: var(--s7); text-overflow: ellipsis; cursor: pointer; }
.pick::after { content: ''; position: absolute; right: var(--s4); top: 50%; width: 8px; height: 8px; margin-top: -7px; border-right: 2px solid var(--ink-quiet); border-bottom: 2px solid var(--ink-quiet); transform: rotate(45deg); pointer-events: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.row2.one { grid-template-columns: 1fr; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.note { margin-top: var(--s3); max-width: 66ch; font-size: var(--t-small); line-height: 1.45; color: var(--ink-quiet); }
.note a { display: inline-block; padding: var(--s3) var(--s1); margin: calc(-1 * var(--s3)) calc(-1 * var(--s1)); color: var(--ink); text-underline-offset: 3px; }   /* a full-height place to tap, without moving the line */
.note.warn { color: var(--ink); }
.alert { margin-top: var(--s3); font: 600 var(--t-small)/1.4 var(--sans); color: var(--no); }
.alert:empty { display: none; }

/* A square checkbox, drawn on the <i> that follows the real input. */
.tog { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: var(--s3); min-height: 44px; padding: var(--s3) 0; cursor: pointer; }
.tog input, .tk-row input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tog i, .tk-row i { position: relative; flex: none; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: var(--r-paper); background: transparent; transition: background-color var(--quick) var(--ease), border-color var(--quick) var(--ease); }
.tog i::after, .tk-row i::after { content: ''; position: absolute; left: 8px; top: 3px; width: 6px; height: 12px; border-right: 2px solid var(--ground); border-bottom: 2px solid var(--ground); transform: rotate(45deg) scale(0); transition: transform var(--quick) var(--ease); }
.tog input:checked + i, .tk-row input:checked + i { border-color: var(--ink); background: var(--ink); }
.tog input:checked + i::after, .tk-row input:checked + i::after { transform: rotate(45deg) scale(1); }
.tog input:focus-visible + i, .tk-row input:focus-visible + i { outline: 2px solid var(--focus); outline-offset: 2px; }
.tog b { display: block; font-weight: 600; line-height: 1.3; }
.tog small { display: block; margin-top: var(--s1); font-size: var(--t-small); line-height: 1.45; color: var(--ink-quiet); }

/* How many: minus, the number, plus. */
.qty { display: inline-flex; align-items: center; gap: var(--s1); }
.qty button { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-ctl); background: transparent; color: var(--ink); font: 400 var(--t-h3)/1 var(--sans); transition: border-color var(--quick) var(--ease); }
.qty button:hover:not(:disabled) { border-color: var(--ink); }
.qty button:disabled { opacity: .4; cursor: not-allowed; }
.qty output { min-width: 32px; text-align: center; font: 600 var(--t-title)/1 var(--sans); font-variant-numeric: tabular-nums; }

/* Ruled rows that open: one rule between rows, no row gets a card of its own. */
.more { border-bottom: 1px solid var(--hair); }
.more:first-of-type { border-top: 1px solid var(--hair); }
.more summary { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: var(--s2) 0; cursor: pointer; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: ''; flex: none; width: 8px; height: 8px; margin: 0 var(--s1) 0 auto; border-right: 2px solid var(--ink-quiet); border-bottom: 2px solid var(--ink-quiet); transform: translateY(-2px) rotate(45deg); transition: transform var(--move) var(--ease); }
.more[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.more-l { flex: none; font: 600 var(--t-title)/1.3 var(--sans); }
.more-v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-small); color: var(--ink-quiet); }
.more[open] .more-v { display: none; }
.more-in { display: grid; gap: var(--s4); padding: var(--s1) 0 var(--s5); }
.more-in > .btn { justify-self: start; }

/* A line of the day: what happens (and the button that removes it) above, its time and an optional note below. */
.erows { display: grid; gap: var(--s3); }
.erow { display: grid; grid-template-columns: 148px minmax(0, 1fr) 44px; grid-template-areas: "title title x" "time note note"; align-items: center; gap: var(--s2); padding-bottom: var(--s3); border-bottom: 1px solid var(--hair); }
.erow > input[type="time"] { grid-area: time; } .erow > input[type="text"] { grid-area: title; } .erow > .x { grid-area: x; } .erow > input.wide, .erow > textarea.wide { grid-area: note; }
.erow.qa { grid-template-columns: minmax(0, 1fr) 44px; grid-template-areas: "title x" "note note"; }
.erow:last-child { padding-bottom: 0; border-bottom: 0; }
.x { flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--ink-quiet); font: 400 var(--t-h3)/1 var(--sans); transition: background-color var(--quick) var(--ease), color var(--quick) var(--ease); }
.x:hover { background: var(--hair); color: var(--ink); }
.sw-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.sw { display: flex; width: 48px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; background: none; }
.sw span { flex: 1; }
.sw span:first-child { flex: 2; }
.sw[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Replies: one line of figures, then ruled rows. A status is always a word, never colour alone. */
.dash h2 { font: 500 var(--t-h3)/1.2 var(--display); overflow-wrap: anywhere; }
.stats { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s4); }
.stats div { display: flex; flex-direction: row-reverse; align-items: baseline; gap: var(--s2); }
.stats dt { font: 600 var(--t-label)/1.3 var(--sans); color: var(--ink-quiet); }
.stats dd { font: 500 var(--t-figure)/1 var(--display); font-variant-numeric: tabular-nums; }
.stats dd.bump { animation: tally var(--slow) var(--ease); }
@keyframes tally { from { opacity: .2; transform: translateY(.25em); } }
.empty { margin-top: var(--s4); padding: var(--s5) 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); color: var(--ink-quiet); }
.replies { display: grid; margin-top: var(--s4); border-top: 1px solid var(--hair); max-height: 26rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.replies:empty { display: none; }
.rp { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: var(--s1) var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--hair); }
.rp-n { font: 600 var(--t-title)/1.3 var(--sans); overflow-wrap: anywhere; }
.rp-s { font: 600 var(--t-label)/1.3 var(--sans); color: var(--ok); white-space: nowrap; }
.rp.no .rp-s { color: var(--no); }
.rp-m { grid-column: 1 / -1; font-size: var(--t-small); line-height: 1.45; color: var(--ink-quiet); overflow-wrap: anywhere; }
.rp-m b { font-weight: 600; color: var(--ink); }
.rp-tag { margin-left: var(--s2); padding: 0 var(--s1); border: 1px solid var(--hair); border-radius: var(--r-paper); font: 600 var(--t-label)/1.5 var(--sans); color: var(--ink-quiet); vertical-align: 2px; }
.rp-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); font-size: var(--t-small); color: var(--ink-quiet); }
.rp-x { flex: none; min-height: 44px; padding: 0 0 0 var(--s3); border: 0; background: none; color: var(--ink-quiet); font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.rp-x:hover { color: var(--no); }
.rp-new { animation: land var(--slow) var(--ease); }   /* a reply that has just arrived */
@keyframes land { from { opacity: 0; transform: translateY(calc(-1 * var(--s2))); } }
.dash-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }

/* A link to copy: the address, and the button beside it. */
.share-row { display: flex; gap: var(--s2); margin-top: var(--s2); }
.share-row input { flex: 1; color: var(--ink-quiet); font-size: var(--t-small); text-overflow: ellipsis; }
.share-row .btn { flex: none; min-width: 6.5rem; }
.share-sub { margin-top: var(--s1); font-size: var(--t-small); }
.share-sub a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-underline-offset: 3px; }

/* Three plain steps, ruled. */
.how-steps { display: grid; margin-top: var(--s5); border-top: 1px solid var(--hair); }
.how-steps li { display: grid; gap: var(--s1); padding: var(--s4) 0; border-bottom: 1px solid var(--hair); }
.how-steps b { font: 600 var(--t-title)/1.3 var(--sans); }
.how-steps span { max-width: 66ch; color: var(--ink-quiet); }

/* Questions: the same ruled rows that open, with the question as the row's label. All start closed. */
.faq-list { margin-top: var(--s5); }
.qa .more-l { flex: 1 1 auto; min-width: 0; text-wrap: balance; }
.qa-a { display: grid; gap: var(--s3); max-width: 66ch; padding: 0 var(--s6) var(--s5) 0; color: var(--ink-quiet); }
.qa-a a { color: var(--ink); text-underline-offset: 3px; }
.faq-more { margin-top: var(--s4); }

/* Small standing pieces: the motion switch, the saved-invitations line, messages, the save bar. */
.motion { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--r-ctl); background: transparent; color: var(--ink-quiet); font: 400 var(--t-small)/1 var(--sans); }
.motion::before { content: ''; width: 14px; height: 14px; border: 1px solid currentColor; border-radius: var(--r-paper); }
.motion[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }
.motion[aria-pressed="true"]::before { background: var(--ink); }
.mine { position: relative; z-index: 2; font-size: var(--t-small); color: var(--ink-quiet); overflow-wrap: anywhere; }
.mine a { display: inline-block; padding: var(--s3) var(--s1); margin: calc(-1 * var(--s3)) calc(-1 * var(--s1)); color: var(--ink); text-underline-offset: 3px; }
.pill { font: 600 var(--t-label)/1.3 var(--sans); color: var(--no); }
.pill.live { color: var(--ok); }
.pill.off { color: var(--ink-quiet); }
.hs-msg { margin: 0 0 var(--s4); padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-ctl); font-weight: 600; line-height: 1.4; }
.hs-msg.ok { border-color: var(--ok); color: var(--ok); }
.hs-state { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); margin: var(--s3) 0 var(--s4); font-size: var(--t-small); color: var(--ink-quiet); }
.hs-card { min-width: 0; }
.hs-card .note:first-child { margin-top: 0; }
#hDraft .btn { margin-top: var(--s3); }
.recover { display: grid; gap: var(--s3); width: 100%; margin-top: var(--s3); padding-top: var(--s5); border-top: 1px solid var(--hair); text-align: left; }
.toast { position: fixed; left: 50%; bottom: 96px; z-index: 45; max-width: calc(100vw - 2 * var(--s4)); margin: 0; padding: var(--s3) var(--s4); border-radius: var(--r-ctl); background: var(--ink); color: var(--ground); font: 600 var(--t-small)/1.3 var(--sans); text-align: center; opacity: 0; transform: translate(-50%, var(--s2)); pointer-events: none; transition: opacity var(--move) var(--ease), transform var(--move) var(--ease); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.savebar { position: fixed; left: 50%; bottom: var(--s3); z-index: 40; display: flex; align-items: center; gap: var(--s3); width: max-content; max-width: calc(100vw - 2 * var(--s3)); padding: var(--s2) var(--s2) var(--s2) var(--s4); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--raised); color: var(--ink); font: 400 var(--t-small)/1.3 var(--sans); transform: translateX(-50%); }
.savebar .btn { flex: none; }
.savebar[data-state="clean"] { display: none; }
.savebar[data-state="error"] { border-color: var(--no); color: var(--no); }
/* ══ End of components ══ */

/* ══ The order: a bar that stays in view, and one paper ticket ════════════════════════════════
   The bar holds the running total and the page's one gold button. The ticket is the only paper on the page:
   a line for each item, a square checkbox for each extra, prices in a column of tabular figures, a rule, the total. */
.fig { font: 500 var(--t-figure)/1 var(--display); font-variant-numeric: tabular-nums; }
.fig.roll, .total b.roll { animation: roll var(--slow) var(--ease); }
@keyframes roll { from { opacity: 0; transform: translateY(45%); } }
.orderbar { position: relative; z-index: 2; flex: none; padding: var(--s3) var(--s4); border-top: 1px solid var(--hair); background: var(--raised); }
.orderbar .alert { margin: 0 0 var(--s2); }
.ob-row { display: flex; align-items: center; gap: var(--s3) var(--s4); }
.ob-sum { display: grid; gap: var(--s1); min-width: 0; margin-right: auto; }
.ob-sum .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-t { display: none; }
.ob-row .link { flex: none; font-size: var(--t-small); }
.ob-row .btn { flex: none; }
@media (max-width: 899px) {
  /* on a phone the bar is fixed to the bottom of the screen, and the page ends with room for it */
  .orderbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding-bottom: max(var(--s3), env(safe-area-inset-bottom)); }
  html[data-mode="builder"] .foot { padding-bottom: 128px; }
  html[data-mode="builder"] .toast { bottom: 112px; }
  .ob-row .btn { padding-inline: var(--s4); }
  .ob-k { display: none; } .ob-t { display: inline; }   /* on a phone the bar says Total; the ticket names the invitation */
}

.ticket { display: grid; padding: var(--s2) var(--s5) var(--s5); border-radius: var(--r-paper); background: var(--paper); color: var(--paper-ink); }
.ticket h3 { padding-top: var(--s4); font: 500 var(--t-h3)/1.2 var(--display); }
.tk-line, .tk-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--s1) var(--s4); min-height: 56px; padding: var(--s4) 0; border-bottom: 1px solid var(--hair); }
.tk-row { position: relative; grid-template-columns: 24px minmax(0, 1fr) auto; cursor: pointer; }
.tk-row.tk-qty { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l p" "q q"; cursor: default; }
.tk-qty .tk-l { grid-area: l; } .tk-qty .tk-p { grid-area: p; } .tk-qty .qty { grid-area: q; margin-top: var(--s2); }
.tk-l b { display: block; font: 600 var(--t-title)/1.3 var(--sans); }
.tk-l small { display: block; margin-top: var(--s1); max-width: 46ch; font-size: var(--t-small); line-height: 1.45; color: var(--ink-quiet); }
.tk-l a { color: var(--ink); text-underline-offset: 3px; }
.tk-p { font: 400 var(--t-body)/1.4 var(--sans); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; color: var(--ink-quiet); }
.tk-line .tk-p, .tk-row:has(input:checked) .tk-p, .tk-qty.on .tk-p { font-weight: 600; color: var(--ink); }
.tk-row:has(input:checked) .tk-p { animation: onto var(--move) var(--ease); }   /* the line slides onto the ticket */
@keyframes onto { from { opacity: 0; transform: translateX(var(--s3)); } }
.total { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--ink); margin-top: -1px; }
.total span { font: 600 var(--t-label)/1.3 var(--sans); color: var(--ink-quiet); }
.total b { display: inline-block; font: 500 var(--t-figure)/1 var(--display); font-variant-numeric: tabular-nums; }
.ticket .btn { margin-top: var(--s4); }
.ticket .btn.gold:not(:disabled) { border-color: var(--line); }   /* on paper the gold button keeps a visible edge */
.ticket .note { margin-top: var(--s3); }
.ticket .total + .note { margin-top: var(--s4); }
.xp { margin-top: var(--s2); max-width: 66ch; font-size: var(--t-small); line-height: 1.45; color: var(--ink-quiet); }

/* Under the ticket, a short plain list of what every invitation has. */
.incl { margin-top: var(--s5); }
.incl h3 { font: 600 var(--t-label)/1.3 var(--sans); color: var(--ink-quiet); }
.incl ul { display: grid; gap: var(--s2); margin-top: var(--s3); }
.incl li { position: relative; max-width: 62ch; padding-left: var(--s5); font-size: var(--t-small); line-height: 1.45; }
.incl li::before { content: ''; position: absolute; left: 0; top: .7em; width: var(--s3); height: 1px; background: var(--line); }
@media (min-width: 620px) {
  .tk-row.tk-qty { grid-template-columns: minmax(0, 1fr) auto 5.5rem; grid-template-areas: "l q p"; align-items: center; }
  .tk-qty .qty { margin-top: 0; }
}
/* ══ End of the order ══ */

/* ── Header: the wordmark, and the four steps as a list to jump by ───────────────────────── */
/* The top bar. The mark turns as the page scrolls and a small sun travels along the bar's lower edge (app.js sets --p, 0 to 1);
   the step you are in is filled; the Sunflow family opens as two envelopes. The bar is the one loud piece of page chrome. */
.top { position: relative; z-index: 20; display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s4); }
.top > * { position: relative; }
.lockup { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; margin-right: auto; text-decoration: none; }
.lockup img { width: 38px; height: 38px; rotate: calc(var(--p, 0) * 2turn); transition: transform var(--slow) var(--ease); }
.lockup:hover img, .lockup:focus-visible img { transform: scale(1.14) rotate(45deg); }
.lockup-w { display: grid; line-height: 1; }
.lockup-w b { font: 700 var(--t-h3)/1 var(--wordmark); letter-spacing: -.02em; }   /* the wordmark, as drawn */
.lockup-w i { margin-top: 2px; font: italic 500 var(--t-small)/1 var(--display); color: var(--ink-quiet); }
.jump { display: flex; align-items: center; }
.jump a { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-width: 44px; min-height: 44px; padding: 0 var(--s1); color: var(--ink-quiet); font-size: var(--t-label); font-weight: 600; text-decoration: none; white-space: nowrap; transition: color var(--quick) var(--ease); }
.jump b { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; font: 600 var(--t-small)/1 var(--display); font-variant-numeric: tabular-nums; color: var(--ink);
  transition: background var(--move) var(--ease), color var(--move) var(--ease), border-color var(--move) var(--ease), transform var(--move) var(--ease); }
.jump a:hover { color: var(--ink); }
.jump a:hover b { border-color: var(--ink); transform: translateY(-2px); }
.jump a[aria-current] { color: var(--ink); }
.jump a[aria-current] b { border-color: var(--ink); background: var(--ink); color: var(--ground); }
.top-sun { display: none; }
@media (max-width: 599px) {   /* on a phone the steps are their numbers and the family button is its two blooms; the words stay for screen readers */
  .jump span, .fam-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .fam-btn { padding: 0 var(--s2); }
}

/* The Sunflow family: a button with two blooms, opening a panel of two envelopes. Each envelope is a link to a sister site;
   on hover or focus its flap lifts and a card rises, the way an invitation opens here. */
.fam { position: static; }
.fam-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-width: 44px; min-height: 44px; padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--r-ctl); background: transparent; color: var(--ink); font: 600 var(--t-label)/1 var(--sans); white-space: nowrap; transition: border-color var(--quick) var(--ease), background var(--quick) var(--ease); }
.fam-btn:hover, .fam-btn[aria-expanded="true"] { border-color: var(--ink); background: var(--raised); }
.fam-blooms { display: inline-flex; flex: none; }
.fam-blooms img { width: 20px; height: 20px; transition: transform var(--slow) var(--ease); }
.fam-blooms img + img { margin-left: -7px; }
.fam-btn:hover .fam-blooms img:first-child { transform: rotate(-50deg); }
.fam-btn:hover .fam-blooms img + img { transform: translateX(3px) rotate(50deg); }
.fam-btn[aria-expanded="true"] .fam-blooms img:first-child { transform: translateX(-2px) rotate(-90deg); }
.fam-btn[aria-expanded="true"] .fam-blooms img + img { transform: translateX(6px) rotate(90deg); }
.fam-panel { position: absolute; right: var(--s4); top: calc(100% - var(--s1)); z-index: 30; width: min(35rem, calc(100vw - 2 * var(--s4))); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--raised); box-shadow: 0 28px 60px -28px #000; }
.fam-panel:not([hidden]) { animation: famIn var(--move) var(--ease) backwards; }
.fam-h { font: 500 var(--t-title)/1.2 var(--display); }
.fam-row { display: grid; gap: var(--s3); margin-top: var(--s3); }
.fam-env { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: var(--s3); padding: var(--s3); border: 1px solid var(--hair); border-radius: var(--r-ctl); color: var(--ink); text-decoration: none; transition: border-color var(--quick) var(--ease); }
.fam-env:hover, .fam-env:focus-visible { border-color: var(--ink); }
.fam-panel:not([hidden]) .fam-env { animation: famEnv var(--slow) var(--ease) backwards; }
.fam-panel:not([hidden]) .fam-env + .fam-env { animation-delay: 80ms; }
.fam-booths { --env: #F6DFB4; --env-2: #FBEACB; --flap: #E9C886; --card: #FFFDF8; --card-ink: #3B2414; }
.fam-films { --env: #23265F; --env-2: #2C3074; --flap: #3A3F92; --card: #FFF6E6; --card-ink: #1A1B45; }
.fam-art { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--r-paper); background: var(--env); }
.fam-card { position: absolute; z-index: 1; left: 9%; right: 9%; top: 12%; height: 86%; display: grid; place-items: start center; padding: 9% 6% 0; border-radius: var(--r-paper); background: var(--card); color: var(--card-ink); font: italic 500 var(--t-label)/1.15 var(--display); text-align: center; transform: translateY(54%); transition: transform var(--slow) var(--ease); }
.fam-art::after { content: ''; position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 64%; background: var(--env-2); clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%); }
.fam-flap { position: absolute; z-index: 3; left: 0; right: 0; top: 0; height: 60%; background: var(--flap); clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: 50% 0; transition: transform var(--slow) var(--ease), opacity var(--slow) var(--ease); }
.fam-seal { position: absolute; z-index: 4; left: 50%; top: 56%; width: 30px; height: 30px; margin: -15px 0 0 -15px; transition: transform var(--slow) var(--ease), opacity var(--move) var(--ease); }
.fam-env:hover .fam-flap, .fam-env:focus-visible .fam-flap { transform: scaleY(-.5); opacity: .55; }
.fam-env:hover .fam-seal, .fam-env:focus-visible .fam-seal { transform: translateY(26px) rotate(120deg) scale(.7); opacity: 0; }
.fam-env:hover .fam-card, .fam-env:focus-visible .fam-card { transform: translateY(0); }
@media (hover: none) {   /* nothing to hover with: the envelopes stand open */
  .fam-flap { transform: scaleY(-.5); opacity: .55; }
  .fam-seal { opacity: 0; }
  .fam-card { transform: translateY(0); }
}
.fam-t { display: grid; gap: 2px; min-width: 0; }
.fam-t small { font: 600 var(--t-label)/1.3 var(--sans); color: var(--ink-quiet); }
.fam-t b { font: 500 var(--t-h3)/1.15 var(--display); }
.fam-t span { font-size: var(--t-small); line-height: 1.4; color: var(--ink-quiet); }
.fam-t em { margin-top: var(--s1); font: 600 var(--t-small)/1.3 var(--sans); font-style: normal; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.fam-t em::after { content: ' \2197'; }
@media (min-width: 600px) {
  .fam-row { grid-template-columns: 1fr 1fr; }
  .fam-env { grid-template-columns: 1fr; align-items: start; }
}
/* The bar arrives once, when the page is shown: each piece starts a little off and settles. At rest everything is simply there. */
html:not([data-wait]) .lockup img { animation: topMark .9s var(--ease) backwards; }
html:not([data-wait]) .lockup-w > * { animation: topRise .6s var(--ease) backwards; }
html:not([data-wait]) .lockup-w > i { animation-delay: .1s; }
html:not([data-wait]) .jump a { animation: topRise .5s var(--ease) .16s backwards; }
html:not([data-wait]) .jump a:nth-child(2) { animation-delay: .22s; }
html:not([data-wait]) .jump a:nth-child(3) { animation-delay: .28s; }
html:not([data-wait]) .fam-btn { animation: topRise .5s var(--ease) .34s backwards; }
@keyframes topMark { from { opacity: 0; transform: rotate(-200deg) scale(.4); } }
@keyframes topRise { from { opacity: 0; transform: translateY(10px); } }
@keyframes famIn { from { opacity: 0; transform: translateY(-8px); } }
@keyframes famEnv { from { opacity: 0; transform: translateY(-14px) rotate(-2deg); } }
@keyframes topGlow { from { opacity: .55; } to { opacity: 1; } }

/* ── The page's one grid ──────────────────────────────────────────────────────────────────
   On a phone everything is one column, in order: the opening words and names, the envelope, the themes, the details,
   the order, the replies. From 900px it is twelve columns: five of controls, seven of preview, and the preview
   stays in view the whole way down with the order bar at its foot. */
.work { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); max-width: 1248px; margin: 0 auto; padding: 0 var(--s4) var(--s7); }
.work > * { min-width: 0; grid-column: 1; }
main { overflow-x: clip; }   /* the full-width painting ends at the page's edge; clip (not hidden) keeps the preview sticky */
.land { position: relative; padding: var(--s4) 0 var(--s5); }
.col-stage { position: relative; }
.gal, .edit, .price, .col-dash, .how, .faq { margin-top: var(--s7); scroll-margin-top: var(--s4); }
.sec-h { font: 500 var(--t-h2)/1.1 var(--display); letter-spacing: -.01em; text-wrap: balance; }
.sec-n { margin-right: .4em; color: var(--ink-quiet); font-variant-numeric: tabular-nums; }
.sec-sub { margin-top: var(--s3); max-width: 62ch; color: var(--ink-quiet); }

/* The opening: the headline rises in a letter at a time, once. app.js adds .rise after it knows motion is wanted, and takes it off again. */
.land h1 { margin-top: var(--s4); font: 500 var(--t-hero)/1.02 var(--display); letter-spacing: -.015em; text-wrap: balance; }
.land h1 em { font-style: italic; font-weight: 400; }
.h1-v { display: block; }
.h1-v > span, .h1-v > em { display: block; }
.h1-v .wd { display: inline-block; white-space: nowrap; }
.h1-v .ch { display: inline-block; }
.h1-v.rise .ch { animation: letter .72s var(--ease) both; animation-delay: calc(var(--i) * 26ms + 120ms); }
@keyframes letter { from { opacity: 0; transform: translateY(.55em) rotate(4deg); } }
.lede { margin-top: var(--s4); max-width: 34rem; }
.make { display: grid; gap: var(--s4); max-width: 34rem; margin-top: var(--s5); }
.kind-row { display: grid; gap: var(--s4); }
.own-w { display: grid; gap: var(--s4); min-width: 0; }
.own-w[hidden] { display: none; }
/* Which mitzvah: three choices in one control */
.seg3 { min-width: 0; }
.seg3 legend { margin-bottom: var(--s2); }
.seg3-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); height: 48px; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; }
.kd { position: relative; display: grid; cursor: pointer; }
.kd + .kd { border-left: 1px solid var(--line); }
.kd input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.kd span { display: grid; place-items: center; padding: 0 var(--s1); white-space: nowrap; transition: background-color var(--quick) var(--ease), color var(--quick) var(--ease); }
.kd input:checked + span { background: var(--ink); color: var(--ground); font-weight: 600; }
.kd input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -4px; border-radius: var(--r-ctl); }

/* The painting (the maker only): the Sunfield meadow at dusk, moving quietly. On a phone it lies behind the opening words
   and the envelope; on a wider screen it fills the preview column. Its veil is the ground colour at different strengths. */
.land-bg { position: absolute; z-index: -1; left: calc(50% - 50vw); bottom: calc(-1 * var(--s6)); width: 100vw; height: 900px; pointer-events: none; }
.lb { position: absolute; inset: 0; overflow: hidden; }
.lb-still, .lb-loop { position: absolute; inset: 0; width: 100%; height: 100%; transform: scale(1.22); transform-origin: 66% 100%; }
.lb-still { background: center / cover no-repeat; background-position: 66% 100%; }
html[data-mode="builder"] .lb-still { background-image: url("/themes/sunfield/poster.jpg?v=1"); }
.lb-loop { object-fit: cover; object-position: 66% 100%; opacity: 0; transition: opacity 1.4s ease; }
.lb-loop.on { opacity: 1; }
html[data-motion="reduce"] .lb-loop { display: none; }
.lb-veil { position: absolute; inset: -2px; background:
  linear-gradient(0deg, var(--ground) 0, color-mix(in srgb, var(--ground) 80%, transparent) 40px, transparent 150px),
  linear-gradient(180deg, var(--ground) 0, color-mix(in srgb, var(--ground) 94%, transparent) 22%, color-mix(in srgb, var(--ground) 82%, transparent) 46%, color-mix(in srgb, var(--ground) 52%, transparent) 62%, color-mix(in srgb, var(--ground) 12%, transparent) 80%, transparent 90%); }
/* thin petals of the Bloom, drawn once around the envelope */
.pv-area { position: relative; }
.arcs { position: absolute; left: 50%; top: 190px; width: 0; height: 0; pointer-events: none; }
.arcs svg { position: absolute; left: 0; top: 0; width: min(660px, 176vw); aspect-ratio: 1; transform: translate(-50%, -50%); overflow: visible; fill: none; stroke: var(--gold); stroke-width: .8; stroke-linecap: round; opacity: .55;
  -webkit-mask: radial-gradient(closest-side, black 46%, transparent 82%); mask: radial-gradient(closest-side, black 46%, transparent 82%); }
.arcs path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.arcs .a2 { stroke-width: .5; opacity: .7; }
.arcs.draw path { animation: arc 1.7s var(--ease) both; animation-delay: calc(var(--i) * 70ms + 350ms); }
@keyframes arc { from { stroke-dashoffset: 1; opacity: 0; } 20% { opacity: 1; } }
@media (max-width: 899px) {
  html[data-mode="builder"] .stage:not([data-state="open"]) { min-height: 0; }   /* sealed, the stage is only as tall as its envelope, so the meadow shows beneath it */
}

/* ── 2. The themes: each card is the invitation in small, already carrying the names ──────── */
.gal-count { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s3); margin-top: var(--s2); font-size: var(--t-small); color: var(--ink-quiet); }
/* The themes come in named groups: a row of buttons that jump to each, then one section per group with its own heading and count.
   On a phone each group is a sideways row of its own; wider, each is a grid. The group of the chosen theme has a gold button. */
.th-jump { display: flex; gap: var(--s2); margin: var(--s4) calc(-1 * var(--s4)) 0; padding: var(--s1) var(--s4); overflow-x: auto; scrollbar-width: none; }
.th-jump::-webkit-scrollbar { display: none; }
.th-chip { flex: none; display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s3) 0 var(--s4); border: 1px solid var(--hair); border-radius: 999px; background: var(--raised); color: var(--ink); font: 600 var(--t-small)/1 var(--sans); cursor: pointer; transition: border-color var(--quick) var(--ease), background-color var(--quick) var(--ease); }
.th-chip:hover { border-color: var(--line); }
.th-chip.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 9%, var(--raised)); }
.th-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.th-chip[hidden], .th-grp[hidden] { display: none; }
.th-chip-n, .th-grp-n { min-width: 1.75em; padding: 3px 6px; border-radius: 999px; background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); font: 700 var(--t-label)/1 var(--sans); text-align: center; font-variant-numeric: tabular-nums; }
.gal-groups { display: grid; gap: var(--s6); margin-top: var(--s5); }
.th-grp { min-width: 0; scroll-margin-top: calc(var(--top-h) + var(--s4)); }
.th-grp-h { display: flex; align-items: center; gap: var(--s3); }
.th-grp-h h3 { font: 500 1.375rem/1.2 var(--display); letter-spacing: -.005em; }
.th-grp-h::after { content: ''; flex: 1; min-width: var(--s4); height: 1px; background: var(--hair); }
.th-grp-sub { margin-top: var(--s1); font-size: var(--t-small); line-height: 1.4; color: var(--ink-quiet); }
html[data-mode="host"] .th-jump, html[data-mode="host"] .th-grp-sub { display: none; }
html[data-mode="host"] .gal-groups { gap: var(--s4); margin-top: var(--s3); }
html[data-mode="host"] .th-grp-h h3 { font: 600 var(--t-small)/1.3 var(--sans); }
.gal-row { display: flex; gap: var(--s3); margin: var(--s3) calc(-1 * var(--s4)) 0; padding: var(--s3) var(--s4) var(--s4); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--s4); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gal-row::-webkit-scrollbar { display: none; }
.th { position: relative; flex: none; display: grid; align-content: start; gap: var(--s3); width: min(41vw, 176px); scroll-snap-align: start; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.th[hidden] { display: none; }
.th input { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.th-art { position: relative; display: block; aspect-ratio: 9 / 14.4; border-radius: var(--r-paper); overflow: hidden; background: var(--raised); transition: transform var(--move) var(--ease); }
.th:hover .th-art { transform: translateY(-2px); }
.th:has(input:checked) .th-art { outline: 2px solid var(--ink); outline-offset: 3px; transform: translateY(-4px); }   /* the chosen card: a cream outline, lifted 4px */
.th:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 7px; border-radius: var(--r-paper); }
.th-cap { display: grid; gap: 2px; color: var(--ink-quiet); }
.th-cap b { font: 600 var(--t-title)/1.25 var(--sans); overflow-wrap: anywhere; }
.th-cap span { font-size: var(--t-small); line-height: 1.3; }
.th:has(input:checked) .th-cap b { color: var(--ink); }
.th-keep { position: absolute; z-index: 2; left: var(--s2); top: var(--s2); padding: 0 var(--s2); border-radius: var(--r-paper); background: var(--ground); color: var(--ink); font: 600 var(--t-label)/1.7 var(--sans); }
.gal-blurb { min-height: 3em; max-width: 62ch; font-size: var(--t-small); line-height: 1.45; color: var(--ink-quiet); }
.gal-blurb b { margin-right: var(--s2); font-weight: 600; color: var(--ink); }
/* the private page: the same cards, small, in one row */
html[data-mode="host"] .th { width: 132px; gap: var(--s2); }
html[data-mode="host"] .th-cap b { font: 600 var(--t-label)/1.3 var(--sans); }
html[data-mode="host"] .th-cap span { display: none; }
html[data-mode="host"] .gal-blurb { min-height: 0; }

/* ── 3. The details ───────────────────────────────────────────────────────────────────────── */
.edit .sec-h + .more { margin-top: var(--s5); }
.edit > .note { margin-top: var(--s4); }

/* ── 4. The order (its bar and ticket are set further down), the replies, how it works ──── */
.price .ticket { margin-top: var(--s5); }
.dash .label { margin-bottom: var(--s1); }
.how-go { margin-top: var(--s4); }

/* ── Footer ───────────────────────────────────────────────────────────────────────────────── */
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s5); max-width: 1248px; margin: 0 auto; padding: var(--s5) var(--s4) var(--s6); font-size: var(--t-small); color: var(--ink-quiet); }
.foot-c { flex-basis: 100%; margin: 0; font-size: var(--t-small); color: var(--ink-quiet); }
.policy .foot-c { margin-top: var(--s3); }
html[data-mode="guest"] .foot-c { text-align: center; }
.foot-b { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.foot-b a { display: inline-block; padding: var(--s3) var(--s1); margin: calc(-1 * var(--s3)) calc(-1 * var(--s1)); color: var(--ink); text-underline-offset: 3px; }
html[data-mode="guest"] .foot { justify-content: center; padding-top: var(--s2); }
html[data-mode="host"] .foot { padding-bottom: 104px; }

/* ── A guest opening a link: only the invitation, on the quiet ground ─────────────────────── */
html[data-mode="guest"] .work { display: block; max-width: 480px; padding: 0; }
.guest-foot { padding: var(--s4) var(--s4) 0; text-align: center; font-size: var(--t-small); color: var(--ink-quiet); }
.guest-foot a { display: block; padding: var(--s3) var(--s2); color: var(--ink); text-underline-offset: 3px; }
.guest-foot .gf-small { color: var(--ink-quiet); }
@media (min-width: 520px) { html[data-mode="guest"] .work { padding-top: var(--s5); } }
html[data-nodash] .col-dash, html[data-off] :is(#extras, #guests, .savebar, .land, .gal, .edit, .col-dash, .htabs) { display: none !important; }
html[data-off] .hs-card + .hs-card { display: none; }

/* ── The hosts' private page: who it is for, its state, its two links ─────────────────────── */
.hstrip { max-width: 1248px; margin: 0 auto; padding: var(--s5) var(--s4) 0; }
.hs-h { margin-top: var(--s1); font: 500 var(--t-h2)/1.1 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; text-wrap: balance; }
.hs-grid { display: grid; gap: var(--s5); margin-top: var(--s4); }
.hs-links { display: grid; gap: var(--s5); align-content: start; }

/* ── The private page's four parts: Replies, Invitation, Guests, Extras ───────────────────
   Tabs under the heading; which part shows is kept on <html data-htab> (never in the address, which holds the private key).
   On a wide screen the preview stays beside every part; on a phone it comes with the Invitation part. */
.htabs { display: flex; gap: var(--s5); margin-top: var(--s6); border-bottom: 1px solid var(--hair); overflow-x: auto; scrollbar-width: none; }
.htabs::-webkit-scrollbar { display: none; }
.htabs button { flex: none; min-height: 48px; margin-bottom: -1px; padding: 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ink-quiet); font: 600 var(--t-body)/1.2 var(--sans); }
.htabs button:hover { color: var(--ink); }
.htabs button[aria-selected="true"] { border-bottom-color: var(--ink); color: var(--ink); }
.htabs button:focus-visible { outline-offset: -2px; }
html[data-mode="host"]:not([data-htab="replies"]) [data-pane="replies"],
html[data-mode="host"]:not([data-htab="invitation"]) [data-pane="invitation"],
html[data-mode="host"]:not([data-htab="guests"]) [data-pane="guests"],
html[data-mode="host"]:not([data-htab="extras"]) [data-pane="extras"] { display: none !important; }
html[data-mode="host"] :is(.land, .col-dash, .hpane) { margin-top: 0; padding: var(--s6) 0 0; }
html[data-mode="host"] :is(.gal, .edit) { margin-top: var(--s6); }
html[data-mode="host"] :is(.gal, .edit) .sec-h { font: 500 var(--t-h3)/1.2 var(--display); letter-spacing: 0; }
html[data-mode="host"] .col-stage { margin-top: var(--s6); }
html[data-mode="host"] .make { margin-top: var(--s4); }
.hpane .ticket { margin-top: var(--s5); }
.hpane-go { margin-top: var(--s4); }
/* One gold button in view: while there are changes to save, Save is the gold one; on the Extras part, the ticket's pay button is. */
html[data-dirty] :is(#hPay, #addPay), html[data-htab="extras"] #hPay { border-color: var(--line); background: transparent; color: var(--ink); }
/* What an extra needs from the hosts: its own ruled section */
.setup { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--hair); }
.setup h3 { font: 500 var(--t-h3)/1.2 var(--display); }
.song-rights { display: grid; gap: var(--s2); margin-top: var(--s4); padding: var(--s3) var(--s4); border: 1px solid var(--hair); border-radius: var(--r-ctl); }
.song-rights .xp { margin: 0; }
.song-rights .xp b { color: var(--ink); font-weight: 600; }
.song-rights a { color: var(--ink); text-underline-offset: 3px; }
.btn.file.off { opacity: .45; cursor: not-allowed; }
.setup progress { display: block; width: 100%; height: 8px; margin-top: var(--s3); accent-color: var(--ink); }
.grows { display: grid; margin: var(--s4) 0; border-top: 1px solid var(--hair); }
.grows > .xp { padding: var(--s4) 0; margin: 0; border-bottom: 1px solid var(--hair); }
/* A guest: the name (and the button that removes them) above; how many may come and where their link stands below; then the link to copy. */
.grow { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) 44px; grid-template-areas: "n n x" "p s s" "c c c"; align-items: center; gap: var(--s2); padding: var(--s3) 0; border-bottom: 1px solid var(--hair); }
.grow > input { grid-area: n; } .grow > .pick { grid-area: p; } .grow > .x { grid-area: x; }
.g-st { grid-area: s; font: 600 var(--t-label)/1.3 var(--sans); color: var(--ink-quiet); }
.g-st.yes { color: var(--ok); } .g-st.no { color: var(--no); } .g-st.seen { color: var(--ink); }
.grow .btn { grid-area: c; justify-self: start; }
.lslot { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--hair); }
.lslot:first-child { margin-top: var(--s4); padding-top: 0; border-top: 0; }
.lslot .field { max-width: 20rem; }
.lslot h4 { margin: var(--s5) 0 0; font: 600 var(--t-label)/1.3 var(--sans); color: var(--ink-quiet); }
.lrow { display: grid; gap: var(--s2); margin-top: var(--s3); }
.l-en { font-size: var(--t-small); line-height: 1.4; overflow-wrap: anywhere; }
.song-now { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s4); }
.song-now b { min-width: 0; overflow-wrap: anywhere; }
#songPlay { width: 100%; margin-top: var(--s3); }
.file { position: relative; margin-top: var(--s4); cursor: pointer; }
.file input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 899px) { html[data-mode="host"]:not([data-htab="invitation"]) .col-stage { display: none; } }

/* ── A page that cannot be shown ──────────────────────────────────────────────────────────── */
.gone { display: grid; align-content: start; justify-items: start; gap: var(--s4); max-width: 36rem; min-height: 72vh; margin: 0 auto; padding: 14vh var(--s5) var(--s7); }
.gone h1 { font: 500 var(--t-h2)/1.1 var(--display); letter-spacing: -.01em; outline: 0; text-wrap: balance; }
.gone > p { max-width: 60ch; color: var(--ink-quiet); }
.gone-acts { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* ── Wider screens ────────────────────────────────────────────────────────────────────────── */
@media (min-width: 620px) {
  .jump a { font-size: var(--t-small); }
  .kind-row:has(.seg3:not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .gal-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s5) var(--s4); margin-inline: 0; padding-inline: 0; overflow: visible; }
  .th-jump { flex-wrap: wrap; margin-inline: 0; padding-inline: 0; overflow: visible; }
  .th { width: auto; }
  html[data-mode="host"] .gal-row { display: flex; gap: var(--s3); margin-inline: calc(-1 * var(--s1)); padding: var(--s3) var(--s1); overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
}
@media (min-width: 760px) {
  .top { padding-inline: var(--s5); }
  .work { padding-inline: var(--s5); }
  .hstrip { padding-inline: var(--s5); }
  .hs-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot { padding-inline: var(--s5); }
}
@media (min-width: 900px) {
  html { scroll-padding-top: 72px; }
  .top { position: sticky; top: 0; height: var(--top-h); gap: var(--s4); padding: 0 max(var(--s5), calc(50vw - 600px)); background: var(--ground); border-bottom: 1px solid var(--hair); }
  .top::before { content: ""; position: absolute; left: max(0px, calc(50vw - 640px)); top: 0; bottom: 0; width: 360px; pointer-events: none; background: radial-gradient(70% 130% at 14% 50%, color-mix(in srgb, var(--gold) 15%, transparent), transparent 72%); animation: topGlow 6s ease-in-out infinite alternate; }
  html[data-sun] .top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; pointer-events: none; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 15%, transparent), var(--gold)); }
  html[data-sun] .top-sun { display: block; position: absolute; left: calc(var(--p, 0) * (100% - 12px)); bottom: -7px; width: 12px; height: 12px; border-radius: 50%; pointer-events: none; background: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent), 0 0 18px 4px color-mix(in srgb, var(--gold) 50%, transparent); }
  .lockup img { width: 44px; height: 44px; }
  .lockup-w { display: flex; align-items: baseline; gap: var(--s2); }
  .lockup-w b { font-size: var(--t-figure); }
  .lockup-w i { margin: 0; font-size: var(--t-h3); }
  .jump a { padding: 0 var(--s2); font-size: var(--t-small); }
  .fam-panel { right: max(var(--s5), calc(50vw - 600px)); top: calc(100% + var(--s2)); }
  html:not([data-mode="guest"]) .work { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--s5); align-items: start; padding-bottom: var(--s8); }
  .land { padding: var(--s7) 0 var(--s4); }
  /* the opening is one composed screen: the words and names on the left, level with the envelope in the middle of the preview */
  html[data-mode="builder"] .land { display: grid; align-content: center; min-height: min(calc(100vh - var(--top-h) - 16px), 916px); min-height: min(calc(100dvh - var(--top-h) - 16px), 916px); padding: var(--s4) 0; }
  .gal, .edit, .price, .col-dash, .how, .faq { margin-top: var(--s8); scroll-margin-top: calc(var(--top-h) + 24px); }
  /* beside the preview the themes' column is narrow: four small cards to a row, so a group of four is one line */
  html[data-mode="builder"] .th-grp .gal-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4) var(--s3); }
  html[data-mode="builder"] .th-grp .th { gap: var(--s2); }
  html[data-mode="builder"] .th-grp .th-cap b { font: 600 var(--t-small)/1.25 var(--sans); }
  html[data-mode="builder"] .th-grp .th-cap span { font-size: var(--t-label); }
  /* the preview panel: raised, in view all the way down, the invitation in the middle of it and the order bar at its foot */
  html:not([data-mode="guest"]) .col-stage { grid-column: 2; grid-row: 1 / span 12; position: sticky; top: calc(var(--top-h) + 16px); display: flex; flex-direction: column; height: calc(100vh - var(--top-h) - 32px); height: calc(100dvh - var(--top-h) - 32px); max-height: 900px; margin-top: var(--s4); border-radius: var(--r-panel); overflow: hidden; background: var(--raised); }
  html:not([data-mode="guest"]) .pv-area { flex: 1 1 auto; z-index: 1; display: flex; min-height: 0; }
  html:not([data-mode="guest"]) .pv-scroll { flex: 1 1 auto; display: flex; flex-direction: column; width: 100%; max-width: 430px; min-height: 0; margin: 0 auto; padding: var(--s5) 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  html:not([data-mode="guest"]) .pv-scroll > .stage { flex: none; min-width: 0; }
  html:not([data-mode="guest"]) .pv-scroll::before, html:not([data-mode="guest"]) .pv-scroll::after { content: ''; flex: 1 0 0px; }   /* the sealed invitation sits in the middle; open, it starts at the top */
  .land-bg { z-index: 0; inset: 0; width: auto; height: auto; }
  .lb-still, .lb-loop { transform: none; }
  .lb-still { background-position: 50% 100%; }
  .lb-loop { object-position: 50% 100%; }
  .lb-veil { background: linear-gradient(180deg, var(--raised) 0, color-mix(in srgb, var(--raised) 78%, transparent) 16%, color-mix(in srgb, var(--raised) 30%, transparent) 44%, transparent 66%); }
  .arcs { top: 50%; margin-top: -36px; }
  .arcs svg { width: 880px; -webkit-mask: radial-gradient(closest-side, black 46%, transparent 76%); mask: radial-gradient(closest-side, black 46%, transparent 76%); }
  .pv-area:has(.stage[data-state="open"]) .arcs { display: none; }
  .orderbar { position: relative; z-index: 2; flex: none; padding: var(--s4) var(--s5); }
}
@media (min-width: 900px) and (max-width: 1099px) { .more .row2 { grid-template-columns: 1fr; } }

/* ── Less motion: by system setting (set on <html> at start) or the switch in the footer ──── */
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after { animation: none !important; transition: none !important; }
/* Choosing a theme cross-fades the preview where the browser can (app.js names the preview for the length of the change). */
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-group(preview) { animation-duration: var(--move); animation-timing-function: var(--ease); }
::view-transition-old(preview), ::view-transition-new(preview) { animation-duration: var(--move); animation-timing-function: var(--ease); }

/* ── The refund policy (refunds.html): one column of plain text ─────────────────────────── */
.policy { max-width: 40rem; margin: 0 auto; padding: var(--s5) var(--s4) var(--s8); }
.policy h1 { margin-top: var(--s6); font: 500 var(--t-h2)/1.1 var(--display); text-wrap: balance; }
.policy h1 em { font-style: italic; font-weight: 400; }
.policy .lede { margin-top: var(--s3); max-width: none; font-size: var(--t-body); color: var(--ink-quiet); }
.policy h2 { margin-top: var(--s6); font: 500 var(--t-h3)/1.2 var(--display); }
.policy p, .policy li { margin-top: var(--s3); font-size: var(--t-body); line-height: 1.5; color: var(--ink); }
.policy ul { margin-top: var(--s2); border-top: 1px solid var(--hair); }
.policy li { margin: 0; padding: var(--s3) 0; border-bottom: 1px solid var(--hair); }
.policy a { color: var(--ink); text-underline-offset: 3px; }
.policy .mail { display: inline-block; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--raised); font-weight: 600; user-select: all; }
.policy .back { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-quiet); font-size: var(--t-small); text-underline-offset: 3px; }
/* The long legal pages (terms, privacy): plain reading text, bulleted lists, three levels of heading under the title. */
.legal h3 { margin-top: var(--s5); font: 600 var(--t-title)/1.3 var(--sans); }
.legal :is(h4, h5) { margin-top: var(--s4); font: 600 var(--t-body)/1.4 var(--sans); }
.legal :is(ul, ol) { margin-top: var(--s3); padding-left: 1.3em; border: 0; }
.legal ul { list-style: disc; }
.legal ol { list-style: decimal; }
.legal li { margin-top: var(--s2); padding: 0; border: 0; }
.legal li::marker { color: var(--ink-quiet); }
.legal p, .legal li { overflow-wrap: anywhere; }
.policy .updated { margin-top: var(--s7); font-size: var(--t-small); color: var(--ink-quiet); }
