/* The Drawing Room — the first screen: how many cards, then the question (2026-09-26).
   The owner's choice after six rounds, bench/board-tarot-intake/G4.html ("The deck between
   the numbers, dealt"), moved into the room. Loaded after threshold.css; it changes only the
   first-visit and new-question screens (#room[data-mode="first"|"ask"], phase intake).
   Tokens, type, buttons and the lamp are room.css's and threshold.css's; the card back is
   art.js's (--back, set by art.js and room.js). Decision: docs/adr/2026-09-24-tarot-room-synthesis.md
   (addendum 2026-09-26).

   How it works: the radios sit first in the fieldset, so numerals, cards, seat names and
   frames are all `input:checked ~ …` in CSS (no :has(), no script: with JavaScript off the
   choice still works). threshold.js keeps the room's spread in step with the radios and plays
   the hand-off: .is-handoff (the words rise away, the cards gather onto the deck, the seat
   names stay dimly lit, the question rises where the headline was), .is-open (the question's
   field is in place), .is-back (Back: the row is dealt again). */

/* a fallback fitted to Cormorant (widths measured on the headline and the stance line, G4), so
   a late font swap re-sets the letters without moving the composition */
@font-face { font-family: "Cormorant fallback"; font-style: normal; font-weight: 400 700; src: local("Georgia");
  size-adjust: 88.9%; ascent-override: 103.9%; descent-override: 32.3%; line-gap-override: 0%; }
@font-face { font-family: "Cormorant fallback"; font-style: italic; font-weight: 400 700; src: local("Georgia Italic"), local("Georgia-Italic");
  size-adjust: 79.3%; ascent-override: 116.5%; descent-override: 36.2%; line-gap-override: 0%; }

/* ---------- where the screen sits in the room ---------- */
.room[data-phase="intake"]:is([data-mode="first"], [data-mode="ask"]) { padding-top: 0; }
/* the screen has its own table and deck; the ritual's table waits until the seat is taken */
.room[data-phase="intake"]:is([data-mode="first"], [data-mode="ask"]) .table { display: none; }
.room[data-phase="intake"]:is([data-mode="first"], [data-mode="ask"]) .panel { width: 100%; margin-top: 0; }
.room[data-phase="intake"] .intro:empty { display: none; }
/* a check-in keeps its own screen: the choice is not offered (the spread is fixed) */
.room[data-phase="intake"]:not([data-mode="first"]):not([data-mode="ask"]) .g-screen { display: none; }
/* care: its reply stands alone */
.panel.caring .g-screen { display: none; }

.g-screen {
  --display: "Cormorant Garamond", "Cormorant fallback", Georgia, serif;
  position: relative; width: 100%; max-width: 1180px; margin: 0 auto; padding: clamp(22px, 3.4vh, 36px) 0 max(40px, env(safe-area-inset-bottom, 0px)); text-align: center;
  container: g / inline-size;
}
/* the eyebrow centres on its words: the star hangs to the left of the axis, and the last
   letter's tracking is balanced by the same indent at the start */
.g-screen .eyebrow { position: relative; display: table; margin: 0 auto 14px; text-indent: .28em; }
.g-screen .eyebrow > span { position: absolute; right: 100%; top: 0; margin-right: 6px; text-indent: 0; }

/* ---------- the headline, and the question that takes its place ---------- */
.g-head { display: grid; grid-template-columns: minmax(0, 1fr); }
.g-head > .eyebrow { grid-row: 1; grid-column: 1; }
.g-head > .g-rite { grid-row: 2; grid-column: 1; }
.g-head > .g-under { grid-row: 3; grid-column: 1; }
/* the question lies where the headline and the stance line were, centred on them */
.g-head > .g-q { grid-row: 2 / 4; grid-column: 1; align-self: center; }
/* a single long word (a compound, a URL) breaks inside its line instead of widening the page */
.g-rite, .g-q, .g-under, .g-name, .g-desc, .g-next { overflow-wrap: anywhere; }
.g-rite, .g-q { margin: 0; color: #f4eddf; font-family: var(--display); font-size: clamp(42px, 4.3vw, 58px); font-style: normal; font-weight: 500; letter-spacing: -.028em; line-height: .98; }
.g-q { max-width: 100%; justify-self: center; text-wrap: balance; }
.g-rite > span, .g-rite > em { display: block; }
.g-rite em { margin-top: .04em; color: var(--gold); font-style: normal; letter-spacing: -.022em; }
.g-rite i { font-style: normal; }
/* a line's closing full stop hangs past the measure, so each centred line centres on its letters */
.g-rite .hp { margin-right: -.2em; }
/* a returning visitor's new question: "Take up the deck again." */
.g-again { display: none; }
.room[data-mode="ask"] .g-again { display: inline; }
/* its eyebrow ("Something new") and way back are the threshold's; the stance line has been
   read, so it is not said again */
.room[data-mode="ask"] :is(.g-eyebrow, .g-under) { display: none; }
.room[data-mode="ask"] .g-screen { padding-top: 6px; }
.g-under { margin: 14px 0 0; color: var(--body); font-family: var(--display); font-size: 19px; font-style: italic; line-height: 1.35; }

/* ---------- the choice: numeral, table, numeral ---------- */
.g-choice { position: relative; min-width: 0; margin: clamp(14px, 2.4vh, 26px) 0 0; padding: 0; border: 0; }
.g-choice legend { width: 100%; padding: 0; margin: 0 0 2px; text-indent: .28em; color: var(--gold); font-family: var(--mono); font-size: 10px; letter-spacing: .28em; line-height: 1.5; text-transform: uppercase; }
.g-choice > input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }

.g-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px) minmax(0, 1fr); grid-template-areas: "three table five"; align-items: stretch; gap: 0 clamp(12px, 2.2vw, 36px); }
.g-opt--3 { grid-area: three; justify-self: end; }
.g-opt--5 { grid-area: five; justify-self: start; }
.g-table { grid-area: table; }

/* one box for each choice, mirrored about the deck: name and price above, the numeral on the
   deck's axis, the spread's line and its seats below. The bracket colour is a registered
   colour, so the corners fade with the frame instead of snapping; it lives on the corner layer
   only (not inherited), so a colour change restyles one pseudo-element per frame. */
@property --c { syntax: "<color>"; inherits: false; initial-value: rgba(196, 171, 120, .5); }
/* selection timing: the box you touch starts lighting at 30ms, before the table's cards arrive,
   while the box being left lets go at once (110ms), so both never look chosen together */
.g-opt, .g-opt::before, .g-num, .g-name, .g-price, .g-desc { --out: 110ms var(--ease); --in: 280ms var(--ease) 30ms; }
/* the closed frame is drawn, not faded: each side grows out of its two corner brackets and the
   halves meet mid-side. Each half is a pre-painted 1px rule scaled from its corner (the `scale`
   property only, so it runs on the compositor with no repaint) */
.g-opt { --l: 14px;
  position: relative; display: flex; flex-direction: column; align-items: center; width: min(100%, 248px); min-height: 44px; padding: 19px 14px; border: 1px solid transparent; border-radius: 0; cursor: pointer;
  outline: 1px solid transparent; outline-offset: -7px;
  transition: outline-color var(--out), box-shadow var(--t-fast) var(--ease), var(--fx); }
/* open corners (unchosen), on top of the closing rule */
.g-opt::after { content: ""; position: absolute; inset: -1px; pointer-events: none; --c: rgba(196, 171, 120, .5); transition: scale 180ms var(--ease), --c var(--out);
  background:
    linear-gradient(var(--c) 0 0) left top / var(--l) 1px no-repeat, linear-gradient(var(--c) 0 0) left top / 1px var(--l) no-repeat,
    linear-gradient(var(--c) 0 0) right top / var(--l) 1px no-repeat, linear-gradient(var(--c) 0 0) right top / 1px var(--l) no-repeat,
    linear-gradient(var(--c) 0 0) left bottom / var(--l) 1px no-repeat, linear-gradient(var(--c) 0 0) left bottom / 1px var(--l) no-repeat,
    linear-gradient(var(--c) 0 0) right bottom / var(--l) 1px no-repeat, linear-gradient(var(--c) 0 0) right bottom / 1px var(--l) no-repeat; }
/* the closing rule: four sides, each two halves growing from its corners toward the middle */
.g-frame { position: absolute; inset: -1px; pointer-events: none; transition: scale 180ms var(--ease); }
.g-frame > i { position: absolute; display: block; }
.g-frame > .t, .g-frame > .b { left: 0; right: 0; height: 1px; }
.g-frame > .t { top: 0; }
.g-frame > .b { bottom: 0; }
.g-frame > .l, .g-frame > .r { top: 0; bottom: 0; width: 1px; }
.g-frame > .l { left: 0; }
.g-frame > .r { right: 0; }
.g-frame > i::before, .g-frame > i::after { content: ""; position: absolute; background: #7a6e57; transition: scale 120ms var(--ease); }
.g-frame > .t::before, .g-frame > .b::before, .g-frame > .t::after, .g-frame > .b::after { top: 0; bottom: 0; width: calc(50% + .5px); scale: 0 1; }
.g-frame > .t::before, .g-frame > .b::before { left: 0; transform-origin: 0 50%; }
.g-frame > .t::after, .g-frame > .b::after { right: 0; transform-origin: 100% 50%; }
.g-frame > .l::before, .g-frame > .r::before, .g-frame > .l::after, .g-frame > .r::after { left: 0; right: 0; height: calc(50% + .5px); scale: 1 0; }
.g-frame > .l::before, .g-frame > .r::before { top: 0; transform-origin: 50% 0; }
.g-frame > .l::after, .g-frame > .r::after { bottom: 0; transform-origin: 50% 100%; }
/* the diamond on the frame's top edge: open and small when unchosen; chosen, it fills and sets
   like a seal (the page's one overshoot) */
.g-opt::before { content: ""; position: absolute; z-index: 1; top: -5.5px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border: 1px solid var(--muted); background: #0b131c; transform: rotate(45deg) scale(.72); transition: background-color var(--out), border-color var(--out), transform 140ms var(--ease); }
/* the two halves share the box equally (so the numeral sits on the deck's axis), but never
   shrink below their text: under a text-spacing override the box grows instead */
.g-top, .g-foot { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; }
.g-top { justify-content: flex-end; }
.g-foot { justify-content: flex-start; }
.g-name { max-width: 100%; color: var(--body); font-family: var(--display); font-size: clamp(23px, 2vw, 27px); font-weight: 500; letter-spacing: -.005em; line-height: 1.1; transition: color var(--out); }
/* the brief's price labels, set as the room sets its small labels: uppercase, tracked */
.g-price { margin-top: 7px; color: var(--body); font-family: var(--mono); font-size: 10px; letter-spacing: .14em; line-height: 1.4; text-transform: uppercase; white-space: nowrap; transition: color var(--out); }
/* founder 11 Oct: "Your first reading" in the room's gilt; a spread not open reads
   "Launching soon" and its option is dimmed and cannot be chosen (threshold.js applyLimits) */
.g-price { color: var(--gold-lit); }
.g-opt.is-closed { cursor: not-allowed; }
.g-opt.is-closed .g-price { color: var(--body); }
#g-s3:disabled:checked ~ .g-stage [for="g-s3"] .g-price { color: var(--body); }
.g-opt.is-closed .g-name, .g-opt.is-closed .g-num, .g-opt.is-closed .g-foot, .g-opt.is-closed .g-frame { opacity: .4; }
.g-closed { margin: 0 0 12px; color: var(--gold-lit); font-family: var(--display); font-size: 20px; font-style: italic; line-height: 1.35; }
/* the numeral: its lining figures stand exactly a card high (Cormorant's figures are .637em);
   unchosen, it is the quiet gold of the room, not a disabled grey */
.g-num { --fs: calc(var(--h) / .637);
  display: block; height: var(--h); margin: 18px 0; color: var(--gold-dim); font-family: var(--display); font-size: var(--fs); font-weight: 500; font-variant-numeric: lining-nums; line-height: 1; letter-spacing: 0;
  transition: color var(--out); }
/* each figure's ink, not its box, is centred */
.g-num > span { display: block; transform: translateY(calc(var(--h) - .815em)); transition: transform 260ms cubic-bezier(.3, 1.3, .5, 1); }
/* the figure is generated content, so a reader's text-spacing override cannot shift it */
.g-num > span::before { content: attr(data-n); display: block; line-height: 1; letter-spacing: 0; word-spacing: 0; }
.g-desc { max-width: 20ch; min-height: 3.9em; margin: 0; color: var(--body); font-family: var(--display); font-size: 17px; font-style: italic; font-weight: 500; line-height: 1.3; text-wrap: balance; transition: color var(--out); }
.g-seats { display: flex; flex-direction: column; justify-content: center; min-height: 3.2em; margin-top: 10px; color: var(--gold); font-family: var(--mono); font-size: 10px; letter-spacing: .14em; line-height: 1.6; text-transform: uppercase; }
.g-seats > span { white-space: nowrap; }
.g-seats .brk { display: none; }

/* hover: the corners and the diamond warm, the figure comes up to gold */
@media (hover: hover) {
  .g-opt:hover, .g-opt:hover::after { transition-duration: 150ms; }
  .g-opt:hover::after { --c: rgba(211, 185, 136, .85); }
  .g-opt:hover::before { border-color: var(--gold); }
  .g-opt:hover .g-num { color: var(--gold); }
  .g-opt:hover .g-name { color: #d9dbd3; }
}
/* press tightens the whole object: the frame draws in 3px and its corners and diamond light;
   the figure gives a little and springs back. No lift, no drop shadow */
.g-opt:active::after { scale: .976; --c: var(--gold-lit); transition: scale 70ms var(--ease); }
.g-opt:active .g-frame { scale: .976; transition: scale 70ms var(--ease); }
.g-opt:active .g-num > span { transform: translateY(calc(var(--h) - .815em + 2px)) scale(.972); transition: transform 70ms cubic-bezier(.3, 0, .6, 1); }
.g-opt:active::before { border-color: var(--gold-lit); background-color: var(--gold-lit); transition: transform 140ms var(--ease); }
/* no double-tap zoom when switching quickly */
.g-opt, .g-go .primary { touch-action: manipulation; }
/* touch screens: the room's Continue lift is a hover, so it must not stick after a tap */
@media (hover: none) {
  .g-go .primary:hover:not(:disabled) { background: #e9dfc9; box-shadow: none; transform: none; }
  .g-go .primary:active:not(:disabled) { background: #fbf2df; transform: translateY(1px); transition-duration: 60ms; }
}

/* chosen: the room's folio frame — a square rule with a fine rule inside it, no fill */
#g-s3:checked ~ .g-stage [for="g-s3"],
#g-s5:checked ~ .g-stage [for="g-s5"] { outline-color: rgba(196, 171, 120, .22);
  transition: outline-color 240ms var(--ease) 170ms, box-shadow var(--t-fast) var(--ease), var(--fx); }
#g-s3:checked ~ .g-stage [for="g-s3"]::after,
#g-s5:checked ~ .g-stage [for="g-s5"]::after { --c: var(--gold-lit); transition: scale 180ms var(--ease), --c var(--in); }
#g-s3:checked ~ .g-stage [for="g-s3"] .g-frame > i::before, #g-s3:checked ~ .g-stage [for="g-s3"] .g-frame > i::after,
#g-s5:checked ~ .g-stage [for="g-s5"] .g-frame > i::before, #g-s5:checked ~ .g-stage [for="g-s5"] .g-frame > i::after { scale: 1; transition: scale 360ms cubic-bezier(.3, 0, .1, 1) 30ms; }
#g-s3:checked ~ .g-stage [for="g-s3"]::before,
#g-s5:checked ~ .g-stage [for="g-s5"]::before { border-color: var(--gold-lit); background-color: var(--gold-lit); transform: rotate(45deg) scale(1);
  transition: background-color var(--in), border-color var(--in), transform 300ms cubic-bezier(.3, 1.45, .5, 1) 30ms; }
#g-s3:checked ~ .g-stage [for="g-s3"] .g-num,
#g-s5:checked ~ .g-stage [for="g-s5"] .g-num { color: var(--gold-lit); transition: color var(--in); }
#g-s3:checked ~ .g-stage [for="g-s3"] .g-name,
#g-s5:checked ~ .g-stage [for="g-s5"] .g-name,
#g-s3:checked ~ .g-stage [for="g-s3"] .g-desc,
#g-s5:checked ~ .g-stage [for="g-s5"] .g-desc { color: var(--ivory); transition: color var(--in); }
#g-s3:checked ~ .g-stage [for="g-s3"] .g-price,
#g-s5:checked ~ .g-stage [for="g-s5"] .g-price { color: var(--gold-lit); transition: color var(--in); }
/* one focus ring per control: a gilt ring standing just off the frame, with a dark gap */
#g-s3:focus-visible ~ .g-stage [for="g-s3"],
#g-s5:focus-visible ~ .g-stage [for="g-s5"] { box-shadow: 0 0 0 3px #0b131c, 0 0 0 5px var(--gold-lit); }

/* ---------- the table: the lit stage, the deck at its heart ---------- */
.g-table, .g-opt {
  --w: clamp(52px, 4.6vw, 60px);
  --h: calc(var(--w) * var(--ratio));
}
.g-table {
  --gap: clamp(26px, 2.6vw, 34px);
  --lab: 34px;                                       /* a card to the next, across a seat name */
  --t: 6px;                                          /* the deck's thickness */
  --dx: calc(var(--h) / 2 + var(--gap) + var(--w) / 2);
  --dy: calc(var(--h) + var(--lab));
  --pad: 36px;
  --h5: calc(2 * var(--dy) + var(--h) + 2 * var(--pad));
  position: relative; isolation: isolate; align-self: center; width: 100%; height: var(--h5); margin: 0;
}
/* the cloth under the lamp, the lamp, then the room's rings over both */
.g-cloth { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; pointer-events: none; }
.g-table .lamp { z-index: -2; }
/* the lamp: a narrower, brighter ivory core over the deck. Light is shown as value, not as
   more gold: warm light on navy felt only turns grey-khaki */
.g-table .lamp-pool { inset: 4% 14% 8%;
  background: radial-gradient(ellipse closest-side at 50% 47%, rgba(255, 236, 200, .30), rgba(246, 212, 150, .12) 30%, rgba(214, 170, 104, .04) 62%, rgba(214, 170, 104, 0) 100%); }
.g-deco { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.g-heart { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }

/* the deck: a stacked edge of gilt leaves under the room's card back */
.g-deck, .g-card { position: absolute; left: calc(var(--w) / -2); top: calc(var(--h) / -2); width: var(--w); height: var(--h); }
.g-deck { top: calc(var(--h) / -2 - var(--t) / 2); }
/* the room's card back (art.js, --back); before the script has set it (or without script) a
   plain back in the same navy, which the gilt keyline below edges */
.g-face { position: absolute; inset: 0; overflow: hidden; border-radius: calc(var(--w) * var(--radius));
  background: linear-gradient(135deg, #0e1b28, #20384a 50%, #0e1b28); background: var(--back, linear-gradient(135deg, #0e1b28, #20384a 50%, #0e1b28)) center / 100% 100%; }
/* the lamp on the card: a soft sheen from above, a lit top edge, and the back's own gilt border
   (#8d7b58) redrawn one device pixel wide, so the card holds its edge at 1x and on phones */
.g-face::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  --kl: inset 0 0 0 1px rgba(141, 123, 88, .55);
  box-shadow: var(--kl), inset 0 1px 0 rgba(255, 238, 205, .2), inset 0 -1px 0 rgba(0, 0, 0, .25); }
/* the sheen is painted once at the deck's strength (.24); a card on the cloth shows it at
   .07/.24 opacity, so a card leaving the deck dims as it travels with only opacity moving */
.g-sheen { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .2917;
  background: radial-gradient(130% 62% at 50% 16%, rgba(255, 236, 198, .24), rgba(255, 236, 198, 0) 70%); }
@media (min-resolution: 2dppx) { .g-face::after { --kl: inset 0 0 0 .5px rgba(141, 123, 88, .7); } }
/* the Crossing is turned 90deg clockwise, so its sheen and lit edge are set on its left side,
   which the turn carries to the top */
.g-card--crossing .g-face::after {
  box-shadow: var(--kl), inset 1px 0 0 rgba(255, 238, 205, .2), inset -1px 0 0 rgba(0, 0, 0, .25); }
.g-card--crossing .g-sheen { background: radial-gradient(62% 130% at 16% 50%, rgba(255, 236, 198, .24), rgba(255, 236, 198, 0) 70%); }
.g-deck .g-sheen { opacity: 1; }
/* the lamp's one warm touch: the room's glow under the deck (.obj.deck::before), held still */
.g-deck::before { content: ""; position: absolute; inset: -22% -30%; z-index: -1; border-radius: 50%; pointer-events: none; opacity: .8;
  background: radial-gradient(closest-side, rgba(240, 214, 157, .16), rgba(240, 214, 157, 0)); }
/* the deck's side: the room's four-leaf cycle (ritual.js edgeShadow), counted up from the foot,
   ending on the navy back of the bottom card (table.css .edge-b); half-pixel leaves at 2x */
.g-edge { position: absolute; inset: 0; border-radius: calc(var(--w) * var(--radius)); transform: translateY(var(--t));
  background:
    linear-gradient(90deg, rgba(8, 12, 18, .6), rgba(8, 12, 18, .1) 12%, rgba(255, 240, 205, .12) 46%, rgba(8, 12, 18, .08) 80%, rgba(8, 12, 18, .6)),
    linear-gradient(to top, #1a2e3d 0 1.5px, rgba(26, 46, 61, 0) 1.5px),
    repeating-linear-gradient(to top, #6f5b3a 0 1px, #dcc491 1px 2px, #b89d68 2px 3px, #dcc491 3px 4px);
  box-shadow: 0 2px 2px rgba(0, 0, 0, .55), 0 14px 26px rgba(0, 0, 0, .5); }
@media (min-resolution: 2dppx) {
  .g-edge { background:
    linear-gradient(90deg, rgba(8, 12, 18, .6), rgba(8, 12, 18, .1) 12%, rgba(255, 240, 205, .12) 46%, rgba(8, 12, 18, .08) 80%, rgba(8, 12, 18, .6)),
    linear-gradient(to top, #1a2e3d 0 1px, rgba(26, 46, 61, 0) 1px),
    repeating-linear-gradient(to top, #6f5b3a 0 .5px, #dcc491 .5px 1px, #b89d68 1px 1.5px, #dcc491 1.5px 2px); }
}

/* a dealt card lies on the cloth: the room's gilt under-edge (.obj.leaf .cb), a tight contact
   shadow, then a short soft cast. The lifted shadow is painted once on a layer beneath the card
   and only its opacity moves during the deal */
.g-card .g-face { --sh: 0 1px 0 #b39a66, 0 2px 1px rgba(0, 0, 0, .45), 0 5px 12px rgba(0, 0, 0, .32); --sh-lift: 0 16px 24px rgba(0, 0, 0, .42);
  overflow: visible; box-shadow: var(--sh); transform: rotate(var(--r, 0deg)); }
.g-card .g-face::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; box-shadow: var(--sh-lift); opacity: 0; pointer-events: none; }
.g-card--crossing .g-face { --sh: 1px 0 0 #b39a66, 2px 0 1px rgba(0, 0, 0, .5), 5px 0 12px rgba(0, 0, 0, .4); }

/* where each seat lies, measured from the heart of the deck. Three: Ground and Turn flank the
   deck and the Crossing lies across in front of it. Five: the Crossing moves up onto the deck,
   the room's cross. */
.g-table { --y3: calc(var(--h) / 2 + var(--t) + var(--g3, 12px) + var(--w) / 2); --arc: calc(var(--w) * -.14); }
.g-card--ground   { --x: calc(-1 * var(--dx)); --y: 0px; --tilt: -4deg; --hd: 150ms; --bd: 0ms; }
.g-card--crossing { --x: 0px; --y: calc(-1px - var(--t) / 2); --r: 90deg; --tilt: 0deg; --hd: 200ms; --bd: 120ms; }
.g-card--turn     { --x: var(--dx); --y: 0px; --tilt: 4deg; --hd: 175ms; --bd: 60ms; }
.g-card--root     { --x: 0px; --y: var(--dy); --tilt: -3deg; --d: 60ms; --hd: 100ms; }
.g-card--crown    { --x: 0px; --y: calc(-1 * var(--dy)); --tilt: 3deg; --d: 150ms; --hd: 120ms; }

/* z-order: Crown and Root 0 while home (under the deck), deck 1, the row and dealt cards 2, the
   Crossing 3, names 4 */
.g-deck { z-index: 1; }
.g-card--row { z-index: 2; }
.g-card--row.g-card--crossing { z-index: 3; }

/* laid: the row is on the table from the first paint; only a change of choice deals, moves or
   gathers cards */
.g-card--row { transform: translate(var(--x), var(--y)); }
#g-s3:checked ~ .g-stage .g-card--crossing { transform: translate(0, var(--y3)); }

/* the deal is a transition, not a keyframe, so a card caught mid-flight turns back along its
   own line. With three, Crown and Root rest whole under the deck; the gather home is shorter
   than the deal. The delay lives only on the way out. */
.g-stage { --deal: 480ms; }
.g-card--col { z-index: 0; transform: translate(0, calc(var(--t) / -2)); transition: transform 300ms cubic-bezier(.55, 0, .35, 1); }
.g-card--col .g-sheen { opacity: 1; transition: opacity 300ms linear; }
#g-s5:checked ~ .g-stage .g-card--col { z-index: 2; transform: translate(var(--x), var(--y)); transition: transform var(--deal) cubic-bezier(.3, .1, .2, 1) var(--d); }
#g-s5:checked ~ .g-stage .g-card--col .g-sheen { opacity: .2917; transition: opacity var(--deal) linear var(--d); }
/* one throw per card: the lift peaks at 36%, touches down at 74% and glides the last few
   pixels; the arc is a share of the card, so a phone's small card does not jump */
@keyframes g-lift {
  0%   { transform: translateY(0) rotate(0deg) scale(1); animation-timing-function: cubic-bezier(.2, 0, .4, 1); }
  36%  { transform: translateY(var(--arc)) rotate(calc(var(--r, 0deg) * .5 + var(--tilt))) scale(1.035); animation-timing-function: cubic-bezier(.5, 0, .7, .4); }
  74%  { transform: translateY(0) rotate(calc(var(--r, 0deg) - var(--tilt) * .15)) scale(.994); animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  100% { transform: translateY(0) rotate(var(--r, 0deg)) scale(1); }
}
@keyframes g-lift-shadow { 0%, 8% { opacity: 0; } 36% { opacity: 1; } 74%, 100% { opacity: 0; } }
#g-s5:checked ~ .g-stage .g-card--col .g-face { animation: g-lift var(--deal) linear var(--d) backwards; }
#g-s5:checked ~ .g-stage .g-card--col .g-face::before { animation: g-lift-shadow var(--deal) linear var(--d) backwards; }
/* five: the Crossing slides up onto the deck at once; back to three, it may leave the deck while
   Crown and Root are still tucking, so there is no still frame */
.g-card--crossing { transition: transform 300ms var(--ease-move) 170ms; }
#g-s5:checked ~ .g-stage .g-card--crossing { transition: transform 260ms var(--ease); }

/* the seat names. Every change is a transition, so a reversal never snaps a name; a name arrives
   with its own card, 40ms before touchdown, rising 3px; exits are faster (120ms) */
.g-name-s { position: absolute; left: 0; top: 0; z-index: 4; color: var(--gold); font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; line-height: 1; text-transform: uppercase; white-space: nowrap; opacity: 0;
  transform: translate(-50%, var(--ly)) translateX(var(--lx, 0px)); transition: opacity 120ms linear, translate 0s linear 120ms; }
/* the row's names share one line, just below the foot of the deck */
.g-name-s--row      { --ly: calc(var(--h) / 2 + var(--t) / 2 + var(--lg, 11px)); }
.g-name-s--ground   { --lx: calc(-1 * var(--dx)); }
.g-name-s--turn     { --lx: var(--dx); }
.g-name-s--crown    { --ly: calc(-1 * var(--dy) + var(--h) / 2 + 10px); --d: 150ms; }
.g-name-s--root     { --ly: calc(var(--dy) + var(--h) / 2 + 10px); --d: 60ms; }
/* the Crossing has a name at each of its places, so it is never cut off mid-move */
.g-name-s--x3 { --ly: calc(var(--y3) + var(--w) / 2 + var(--lg, 11px)); }
.g-name-s--ground, .g-name-s--turn { transition: opacity 200ms linear 300ms; }
#g-s3:checked ~ .g-stage :is(.g-name-s--ground, .g-name-s--turn),
#g-s5:checked ~ .g-stage :is(.g-name-s--ground, .g-name-s--turn, .g-name-s--x5, .g-name-s--col) { opacity: 1; }
#g-s3:checked ~ .g-stage .g-name-s--x3 { opacity: 1; transition: opacity 200ms linear 420ms; }
#g-s5:checked ~ .g-stage .g-name-s--x5 { transition: opacity 200ms linear 260ms; }
.g-name-s--col { translate: 0 3px; }
#g-s5:checked ~ .g-stage .g-name-s--col { translate: 0 0;
  transition: opacity 200ms cubic-bezier(.2, .7, .2, 1) calc(var(--d) + var(--deal) * .74 - 40ms), translate 200ms cubic-bezier(.2, .7, .2, 1) calc(var(--d) + var(--deal) * .74 - 40ms); }

/* arrival, once, on a first visit (threshold.js arrive): the lamp warms from the room's dimmed
   55% (never from dark) and the deck settles 6px; the words, the choice and Continue are all
   there on the first frame. Until the room is ready the lamp and the deck wait in their first
   state; reduced motion never gets the class (the page is still from the first paint). */
@media (prefers-reduced-motion: no-preference) {
  .th-arrive .g-table .lamp-pool { opacity: .55; transform: scale(.96); }
  .th-arrive .g-deck { translate: 0 -6px; }
}

/* ---------- Continue, and the line that says what comes next ---------- */
/* signed out: the email field for the weekly Sitting's sign-in link, in place of Continue */
.g-signin input { display: block; width: 100%; max-width: 360px; box-sizing: border-box; margin: 0 auto 10px; padding: 12px 14px; border: 1px solid rgba(205, 190, 158, .34); border-radius: 0; background: rgba(5, 12, 20, .46); color: #f2ede3; font-size: 16px; line-height: 1.4; }
.g-signin input::placeholder { color: #7b898d; opacity: 1; }
.g-signin input:focus { border-color: var(--gold); background: rgba(5, 12, 20, .68); }
.g-signin .g-closed { margin-bottom: 8px; font-size: 18px; }
.g-signin .primary { min-width: 260px; }
/* the longest label ("Your weekly sitting · sign in") may wrap rather than run out of its card */
.g-price { white-space: normal; text-wrap: balance; text-align: center; }
.g-base { display: grid; grid-template-columns: minmax(0, 1fr); }
.g-base > * { grid-row: 1; grid-column: 1; align-self: start; }
.g-go { margin-top: clamp(14px, 2.4vh, 24px); }
.g-go .primary { min-width: 260px; }
.g-next { margin: 10px 0 0; color: var(--body); font-family: var(--display); font-size: 16px; font-style: italic; line-height: 1.4; }

/* ---------- the hand-off (G4's preview, made real) ----------
   Continue: the words rise away, the dealt cards gather back onto the deck (Crown and Root
   first, then Ground, Turn and the Crossing), the seat names stay dimly lit as the places to
   fill, and the room's own question rises where the headline was, its field where Continue
   was. Back (and Esc) returns, the cards dealt again from the deck. */
.g-screen { --fx: opacity 320ms var(--ease) 140ms, translate 320ms var(--ease) 140ms; }
.g-screen.is-handoff { --fx: opacity 240ms var(--ease) 60ms, translate 240ms var(--ease) 60ms; }
.g-head > .eyebrow, .g-head > .g-rite, .g-head > .g-under, .g-choice > legend, .g-go { transition: var(--fx); }
.is-handoff .g-head > .eyebrow, .is-handoff .g-head > .g-rite, .is-handoff .g-head > .g-under, .is-handoff .g-choice > legend,
.is-handoff .g-opt, .is-handoff .g-go { opacity: 0; translate: 0 -12px; pointer-events: none; }
/* the question and its field are only there once Continue has been pressed (never without
   script); they rise in by the room's motion helpers (threshold.js) */
.g-screen:not(.is-handoff) :is(.g-q, #ask-q, #reply) { display: none; }
#ask-q, .g-base > #reply { justify-self: center; width: min(640px, 100%); }
#ask-q { margin-top: clamp(10px, 1.6vh, 18px); }
.g-base > #reply { margin-top: 0; }
.ask .ask-q .ask-field { margin-top: 0; }
.q-back { margin: 2px 0 0; }
.q-back .quiet { color: var(--body); }
.ask.asked .q-back { display: none; }
/* the cards gather onto the deck, one card thicker than it: never "your cards" before you
   choose them */
.is-handoff #g-s3:checked ~ .g-stage .g-card--row,
.is-handoff #g-s5:checked ~ .g-stage .g-card { transform: translate(0, calc(var(--t) / -2 - 1px)); transition: transform 300ms cubic-bezier(.55, 0, .35, 1) var(--hd); }
.is-handoff :is(#g-s3, #g-s5):checked ~ .g-stage .g-card .g-face { transform: rotate(0deg); animation: none;
  transition: transform 300ms cubic-bezier(.55, 0, .35, 1) var(--hd); }
.is-handoff :is(#g-s3, #g-s5):checked ~ .g-stage .g-card .g-sheen { opacity: 1; transition: opacity 300ms linear var(--hd); }
.is-handoff :is(#g-s3, #g-s5):checked ~ .g-stage .g-card .g-face::before { animation: none; }
/* the places stay, dimly lit */
.is-handoff #g-s3:checked ~ .g-stage :is(.g-name-s--ground, .g-name-s--turn, .g-name-s--x3),
.is-handoff #g-s5:checked ~ .g-stage :is(.g-name-s--ground, .g-name-s--turn, .g-name-s--x5, .g-name-s--col) { opacity: .55; transition: opacity 300ms linear 120ms; }
/* Back: the row is dealt again off the deck with the same throw */
.is-back :is(#g-s3, #g-s5):checked ~ .g-stage .g-card--row { transition: transform var(--deal) cubic-bezier(.3, .1, .2, 1) var(--bd); }
.is-back :is(#g-s3, #g-s5):checked ~ .g-stage .g-card--row .g-face { animation: g-lift var(--deal) linear var(--bd) backwards; transition: none; }
.is-back :is(#g-s3, #g-s5):checked ~ .g-stage .g-card--row .g-sheen { transition: opacity var(--deal) linear var(--bd); }
.is-back :is(#g-s3, #g-s5):checked ~ .g-stage .g-card--row .g-face::before { animation: g-lift-shadow var(--deal) linear var(--bd) backwards; }

/* short desktop screens: the same composition, tighter */
@media (min-width: 861px) and (max-height: 860px) {
  .g-screen { padding-top: 23px; }
  .g-screen .eyebrow { margin-bottom: 10px; }
  .g-rite, .g-q { font-size: clamp(40px, 3.8vw, 52px); }
  .g-under { margin-top: 10px; font-size: 18px; }
  .g-choice { margin-top: 12px; }
  .g-table, .g-opt { --w: clamp(50px, 4.4vw, 56px); }
  .g-table { --lab: 31px; --pad: 30px; }
  .g-num { margin: 14px 0; }
  .g-go { margin-top: 12px; }
  .g-next { margin-top: 7px; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  .g-opt { padding-left: 8px; padding-right: 8px; }
  .g-desc { font-size: 16px; }
  .g-seats { font-size: 9.5px; letter-spacing: .1em; }
}

/* ---------- tablets and phones: head, the table, the pair, Continue ----------
   A container query, so the stack also takes over when the page is zoomed at a desktop width.
   The table keeps the cross's height for either spread, so nothing below it moves when you
   choose. */
@container g (max-width: 812px) {
  .g-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "table table" "three five"; gap: 0 14px; }
  .g-opt--3 { justify-self: end; }
  .g-opt--5 { justify-self: start; }
  .g-opt { width: min(100%, 280px); }
  .g-top, .g-foot { flex: 0 0 auto; }
  .g-num { order: -1; margin: 0 0 12px; }
  .g-table { margin-bottom: 20px; }
  /* stacked, the pair lies between the table and the foot: once the question is in place the
     pair (already faded) gives up its room, so the field comes up under the table */
  .is-open .g-stage > .g-opt { display: none; }
}
/* phones: sized to the visible height (svh), continuously from a 640px to an 844px screen */
.g-screen { --vh: 1vh; }
@supports (height: 1svh) { .g-screen { --vh: 1svh; } }
@media (max-width: 560px) {
  .g-screen { padding: clamp(4px, calc(3.83 * var(--vh) - 20.3px), 12px) 0 max(24px, env(safe-area-inset-bottom, 0px)); }
  .g-screen .eyebrow { display: none; }
  .g-rite, .g-q { font-size: clamp(24px, min(8.9vw, calc(4.07 * var(--vh) - .4px)), 34px); line-height: .99; }
  .g-rite em { margin-top: 0; }
  .g-rite i { display: block; }
  .g-under { margin-top: clamp(4px, var(--vh), 8px); font-size: clamp(14.5px, 2.2 * var(--vh), 16px); line-height: 1.3; }
  .g-choice { margin-top: clamp(4px, 1.2 * var(--vh), 10px); }
  .g-choice legend { font-size: 10px; letter-spacing: .24em; line-height: 1.3; text-indent: .24em; }
  .g-stage { gap: 0 10px; }
  .g-opt { width: 100%; }
  /* one card size for both spreads, sized so the cross fits the reserved table */
  .g-table { --w: clamp(18.5px, calc(3.59 * var(--vh) - 4.3px), 26px); --gap: 28px; --lab: clamp(12px, calc(2.87 * var(--vh) - 6.2px), 18px);
    --pad: clamp(3px, calc(2.39 * var(--vh) - 12.2px), 8px); --t: 3px; --lg: clamp(5px, calc(.5 * var(--vh) + 2px), 6px); --g3: clamp(6px, var(--vh), 8px);
    margin-bottom: clamp(8px, 1.6 * var(--vh), 14px); }
  .g-opt { --w: clamp(18px, calc(4.78 * var(--vh) - 12.4px), 28px); }
  /* half the distance, a shorter throw */
  .g-stage { --deal: 400ms; }
  .g-name-s { font-size: 8.5px; letter-spacing: .12em; }
  /* Crown and Root name themselves beside their card */
  .g-name-s--crown, .g-name-s--root { transform: translate(calc(var(--w) / 2 + 9px), calc(var(--sy, 1) * var(--dy) - 50%)); }
  .g-name-s--crown { --sy: -1; }
  .g-opt { --l: 10px; padding: clamp(7px, calc(2.87 * var(--vh) - 11.2px), 13px) 6px clamp(6px, calc(2.87 * var(--vh) - 12.2px), 12px); outline-offset: -5px; }
  .g-num { margin-bottom: clamp(5px, .85 * var(--vh), 7px); }
  .g-name { font-size: clamp(17px, 2.3 * var(--vh), 19px); }
  .g-price { margin-top: clamp(2px, .5 * var(--vh), 4px); font-size: 10px; letter-spacing: .1em; }
  .g-desc { max-width: none; min-height: 3.6em; margin-top: clamp(4px, .7 * var(--vh), 6px); font-size: clamp(13px, 1.7 * var(--vh), 14px); line-height: 1.16; }
  /* the table names every seat it lays, so the small seat lists rest on every phone */
  .g-seats { display: none; }
  .g-go { margin-top: clamp(7px, calc(3.35 * var(--vh) - 14.3px), 14px); }
  .g-go .primary { width: 100%; min-width: 0; }
  .g-next { margin-top: clamp(4px, calc(1.91 * var(--vh) - 8.1px), 8px); font-size: clamp(13.5px, 2 * var(--vh), 14.5px); line-height: 1.3; }
  #ask-q { margin-top: 4px; }
  /* with three, a faint seat mark shows where the Crown will lie; five fills it */
  .g-heart::before { content: ""; position: absolute; left: calc(var(--w) / -2); top: calc(var(--h) / -2); width: var(--w); height: var(--h);
    box-sizing: border-box; border: 1px solid rgba(196, 171, 120, .16); border-radius: calc(var(--w) * var(--radius));
    transform: translateY(calc(-1 * var(--dy))); opacity: 0; transition: opacity 160ms linear; }
  #g-s3:checked ~ .g-stage .g-heart::before { opacity: 1; transition: opacity var(--t-mid) linear 200ms; }
}
@media (max-width: 360px) {
  .g-stage { gap: 0 8px; }
  .g-price { letter-spacing: .06em; }
}
/* landscape phones: the desktop balance, small: 3, the table, 5 on one line, Continue under it */
@media (orientation: landscape) and (max-height: 500px) and (min-width: 561px) {
  .g-screen { padding-top: 6px; padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
  .g-screen .eyebrow { display: none; }
  .g-rite, .g-q { font-size: 26px; line-height: 1.05; }
  .g-rite > span, .g-rite > em { display: inline; }
  .g-rite > span .hp { margin-right: 0; }
  .g-under { margin-top: 2px; font-size: 14.5px; line-height: 1.3; }
  .g-choice { margin-top: 4px; }
  .g-stage { grid-template-columns: minmax(0, 1fr) minmax(0, clamp(236px, 35vw, 300px)) minmax(0, 1fr); grid-template-areas: "three table five"; gap: 0 16px; }
  .g-opt { width: min(100%, 236px); padding: 5px 6px; --l: 10px; outline-offset: -5px; }
  .g-top, .g-foot { flex: 1 1 0; }
  .g-num { order: 0; margin: 4px 0; }
  .g-table, .g-opt { --w: 18px; }
  .g-table { --gap: 36px; --lab: 12px; --pad: 5px; --t: 3px; --lg: 5px; --g3: 6px; margin-bottom: 0; }
  .g-stage { --deal: 400ms; }
  .g-name-s { font-size: 8.5px; letter-spacing: .12em; }
  .g-name-s--crown, .g-name-s--root { transform: translate(calc(var(--w) / 2 + 9px), calc(var(--sy, 1) * var(--dy) - 50%)); }
  .g-name-s--crown { --sy: -1; }
  .g-name { font-size: 17px; }
  .g-price { margin-top: 2px; }
  .g-desc { max-width: none; min-height: 0; margin-top: 2px; font-size: 13px; line-height: 1.15; }
  .g-seats { display: none; }
  .g-go { margin-top: 8px; }
  .g-next { margin-top: 3px; font-size: 13.5px; line-height: 1.25; }
}
/* the shortest landscape phones (667x375 and below): the gaps and Continue tightened (still a
   44px target) so the hand-off line ends above the fold */
@media (orientation: landscape) and (max-height: 380px) and (min-width: 561px) {
  .g-screen { padding-top: 3px; }
  .g-go { margin-top: 5px; }
  .g-go .primary { min-height: 44px; padding-top: 9px; padding-bottom: 9px; }
  .g-next { margin-top: 2px; }
}
/* below the room's floor the pair shrinks rather than clipping */
@media (max-width: 300px) {
  .g-rite, .g-q { font-size: 23px; }
  .g-seats > span { white-space: normal; }
  .g-price { font-size: 9px; letter-spacing: .05em; }
  .g-name { font-size: 16px; }
  .g-desc { font-size: 12.5px; }
}

/* reduced motion: no travel, but change still takes time: colour and light cross-fade, the
   dealt cards fade in and out at their seats, the Crossing changes place while invisible, and
   the hand-off is a 200ms cross-fade (the cards simply leave the table; the names stay) */
@media (prefers-reduced-motion: reduce) {
  .g-card, .g-face, .g-face::before, .g-name-s, .g-num > span, .g-table { animation: none !important; }
  .g-num > span, .g-card { transition: none !important; }
  .g-opt { transition: outline-color var(--out), box-shadow var(--t-fast) var(--ease), opacity 200ms linear !important; }
  .g-opt::after { transition: --c var(--out) !important; }
  #g-s3:checked ~ .g-stage [for="g-s3"]::after, #g-s5:checked ~ .g-stage [for="g-s5"]::after { transition: --c var(--in) !important; }
  #g-s3:checked ~ .g-stage [for="g-s3"], #g-s5:checked ~ .g-stage [for="g-s5"] { transition: outline-color var(--in), box-shadow var(--t-fast) var(--ease), opacity 200ms linear !important; }
  /* the closing rule is whole and cross-fades */
  .g-frame > i::before, .g-frame > i::after { scale: 1 !important; transition: none !important; }
  .g-frame { opacity: 0; scale: 1 !important; transition: opacity var(--out) !important; }
  #g-s3:checked ~ .g-stage [for="g-s3"] .g-frame, #g-s5:checked ~ .g-stage [for="g-s5"] .g-frame { opacity: 1; transition: opacity var(--in) !important; }
  .g-opt::before, .g-opt:active::before { transform: rotate(45deg) !important; transition: background-color var(--out), border-color var(--out) !important; }
  #g-s3:checked ~ .g-stage [for="g-s3"]::before, #g-s5:checked ~ .g-stage [for="g-s5"]::before { transition: background-color var(--in), border-color var(--in) !important; }
  .g-opt:active::after { scale: 1; }
  .g-card--col { transform: translate(var(--x), var(--y)) !important; }
  .g-card .g-face { transform: rotate(var(--r, 0deg)) !important; transition: opacity 220ms linear !important; }
  .g-card .g-sheen { opacity: .2917 !important; transition: none !important; }
  .g-card--col .g-face { opacity: 0; }
  #g-s5:checked ~ .g-stage .g-card--col .g-face { opacity: 1; transition-delay: 60ms !important; }
  .g-name-s { translate: none !important; transition: opacity 200ms linear !important; }
  /* the Crossing: fade out, move, fade in (300ms), gated on the radio just chosen, so nothing
     plays on load */
  .g-card--crossing { transition: transform 0s linear 130ms !important; }
  #g-s5:checked:focus ~ .g-stage .g-card--crossing .g-face { animation: g-rm-dip-a 300ms linear !important; }
  #g-s3:checked:focus ~ .g-stage .g-card--crossing .g-face { animation: g-rm-dip-b 300ms linear !important; }
  .g-head > .eyebrow, .g-head > .g-rite, .g-head > .g-under, .g-choice > legend, .g-go { translate: none !important; transition: opacity 200ms linear !important; }
  .is-handoff :is(#g-s3, #g-s5):checked ~ .g-stage .g-card .g-face { opacity: 0; }
  .is-handoff #g-s3:checked ~ .g-stage .g-card--row:not(.g-card--crossing), .is-handoff #g-s5:checked ~ .g-stage .g-card--row { transform: translate(var(--x), var(--y)); }
  .is-handoff #g-s3:checked ~ .g-stage .g-card--crossing { transform: translate(0, var(--y3)); }
  .is-handoff .g-opt { translate: none; }
}
@keyframes g-rm-dip-a { 40%, 55% { opacity: 0; } }
@keyframes g-rm-dip-b { 40%, 55% { opacity: 0; } }
@media (forced-colors: active) {
  .g-opt::after, .g-frame { display: none; }
  .g-opt { outline: none; }
  #g-s3:checked ~ .g-stage [for="g-s3"], #g-s5:checked ~ .g-stage [for="g-s5"] { border-color: Highlight; }
  #g-s3:checked ~ .g-stage [for="g-s3"]::before, #g-s5:checked ~ .g-stage [for="g-s5"]::before { background: Highlight; border-color: Highlight; }
  #g-s3:focus-visible ~ .g-stage [for="g-s3"], #g-s5:focus-visible ~ .g-stage [for="g-s5"] { outline: 2px solid Highlight; outline-offset: 4px; }
  .g-deco, .g-cloth { display: none; }
  .g-face { forced-color-adjust: none; }
}
