/* The friends game's web client. Design: "The Peek, lit" (web/DESIGN.md, motion in web/MOTION.md):
   dusk palette, game pieces with a hard Ink/Ember edge that collapses when pressed, one soft grape
   shadow, grain on the Night stage, Bricolage at two widths. Live rooms and the reveal set piece
   bring their own CSS (live.js, motion.js), so the landing page stays light. */
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
/* Bricolage Grotesque (SIL OFL), 800: width 85 / opsz 48 (headlines), width 75 / opsz 96 (numbers, ASCII). */
@font-face { font-family: "Friends Display"; src: url("/assets/fonts/bricolage-display.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Friends Cond"; src: url("/assets/fonts/bricolage-cond.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #f6f2fd; --surface: #fff; --surface-2: #eee8f9; --ink: #24123f; --muted: #5e4f7a; --line: #dcd3ee; --outline: #24123f;
  --accent: #ff6b35; --on-accent: #24123f; --ember: #b93c0e; --accent-text: #b93c0e;
  --glow: #ffd23f; --on-glow: #24123f; --glow-edge: #c99a00; --glow-soft: #fff6d6;
  --ok: #0b7350; --ok-soft: #ddf5ea; --miss: #b4372b; --miss-soft: #fde7e3; --on-miss: #fff;
  --night: #160a2c; --night-2: #22123f; --grape: #2b1554; --on-night: #f4eeff; --on-night-muted: #d9cff0;
  --focus: #b93c0e; --picked: #24123f; --on-picked: #f6f2fd; --streak-bg: #ffe7dc;
  --shadow: 0 18px 36px -18px rgba(54, 22, 110, .38);
  --f0: #ff8a5c; --f1: #ffd23f; --f2: #ff8fc0; --f3: #5fd9a6; --f4: #7cc4ff; --f5: #b9a4ff;
  --r-card: 28px; --r-ctl: 18px; --r-pill: 999px;
  --display: "Friends Display", "Instrument Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --cond: "Friends Cond", "Friends Display", "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  /* MOTION.md springs (CSS linear() samples; older browsers get the bezier fallbacks below). */
  --snappy: cubic-bezier(.34, 1.56, .64, 1); --smooth: var(--ease); --bouncy: cubic-bezier(.34, 1.56, .64, 1);
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --snappy: linear(0, .25 8%, .82 22%, 1.08 34%, 1.1 40%, 1.04 52%, .99 66%, 1);
    --smooth: linear(0, .4 12%, .86 28%, 1 45%, 1.01 60%, 1);
    --bouncy: linear(0, .3 9%, 1.05 24%, 1.22 31%, 1.14 40%, .95 54%, .98 64%, 1.01 76%, 1);
    --flip: linear(0, .2 10%, .7 28%, 1.03 46%, 1.04 54%, 1 70%, 1);
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #160a2c; --surface: #22123f; --surface-2: #2e1b52; --ink: #f4eeff; --muted: #b9acd6; --line: #3d2a66; --outline: #5b4592;
    --accent-text: #ff8a5c; --glow-soft: #3a2f12; --ok: #5fd9a6; --ok-soft: #1b3a33; --miss: #ff8a7a; --miss-soft: #3a1e2b; --on-miss: #160a2c;
    --focus: #ffd23f; --picked: #f4eeff; --on-picked: #24123f; --streak-bg: #3a1f3a; --shadow: 0 18px 36px -18px rgba(0, 0, 0, .7);
  }
}
/* The Night stage: reveals, live games, invites, the yearbook cover. Night even in light mode. */
.stage, body.on-stage {
  --bg: #160a2c; --surface: #22123f; --surface-2: #2e1b52; --ink: #f4eeff; --muted: #b9acd6; --line: #3d2a66; --outline: #5b4592;
  --accent-text: #ff8a5c; --ok: #5fd9a6; --ok-soft: #1b3a33; --miss: #ff8a7a; --miss-soft: #3a1e2b; --on-miss: #160a2c;
  --focus: #ffd23f; --picked: #f4eeff; --on-picked: #24123f; --shadow: 0 18px 36px -18px rgba(0, 0, 0, .7); --glow-soft: #3a2f12; --streak-bg: #3a1f3a;
  background: radial-gradient(120% 70% at 50% 0%, #3a1d6e 0%, #160a2c 62%) #160a2c; color: var(--ink);
}
body.on-stage { background-attachment: fixed; }
.grain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .09; pointer-events: none; mix-blend-mode: overlay; }

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.4 var(--sans); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
a { color: var(--accent-text); text-underline-offset: 3px; }
.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-bottom: 40px; position: relative; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, .question, .disp { font-family: var(--display); font-weight: 800; letter-spacing: -.012em; line-height: 1.06; }
.cond { font-family: var(--cond); font-weight: 800; letter-spacing: -.02em; line-height: .92; font-variant-numeric: lining-nums tabular-nums; }
h1 { font-size: 32px; margin: 14px 0 8px; }
h2 { font-size: 22px; margin: 0 0 10px; }
h3 { font-size: 17px; line-height: 1.3; margin: 0 0 8px; font-weight: 700; }
.question { font-size: 28px; margin: 4px 0 14px; overflow-wrap: anywhere; }
p { margin: 8px 0; }
.muted { color: var(--muted); }
.small { font-size: 16px; }
.cap { font-size: 14px; line-height: 1.4; }
.center { text-align: center; }
.pad { padding: 40px 0; }
.block { display: block; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.foot { color: var(--muted); font-size: 15px; text-align: center; padding: 24px 16px 32px; }
.foot p { margin: 4px 0; }
.foot a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
.foot .by { font-size: 13px; }
body.has-tabs .foot { padding-bottom: 120px; }

/* ---------- icons, Peek ---------- */
.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.s { width: 20px; height: 20px; }
.peek { display: block; flex: none; overflow: visible; }
.peek g { transform-box: view-box; transform-origin: 60px 60px; }
.peek .pk-tilt { transition: transform .38s var(--bouncy); }
.peek [data-part=eye], .peek [data-part=pupil] { transform-box: fill-box; transform-origin: center; transition: transform .12s ease-in; }
.peek [data-part=pupil] { transform: translate(var(--gx, 0), var(--gy, 0)); transition: transform .38s var(--snappy), opacity .08s; }
.peek.blink [data-part=eye] { transform: scaleY(.08); }
.peek.blink [data-part=pupil] { opacity: 0; }
.peek .pk-face, .peek .pk-props { transition: opacity .18s ease-out; }
html:not(.calm) .peek.squash .pk-body { animation: pk-squash .38s var(--snappy); }
html:not(.calm) .peek.enter-party [data-part=hat] { animation: pk-hat .65s var(--bouncy) both; }
html:not(.calm) .peek.enter-shocked .pk-body { animation: pk-jump .65s var(--bouncy); }
html:not(.calm) .peek [data-part=zz] { animation: pk-zz 1.6s ease-out infinite; }
html:not(.calm) .peek.enter-oops [data-part=drop] { animation: pk-drop .5s var(--ease) both; }
@keyframes pk-squash { 40% { transform: scale(1.06, .94); } }
@keyframes pk-hat { 0% { transform: translateY(-40px); opacity: 0; } 30% { opacity: 1; } }
@keyframes pk-jump { 45% { transform: translateY(-8px) scale(1.15); } }
@keyframes pk-zz { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-16px); opacity: 0; } }
@keyframes pk-drop { from { transform: translateY(-6px); opacity: 0; } }
.brand-mark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-height: 44px; }
.brand-mark span { font: 800 24px/1 var(--display); letter-spacing: -.012em; }

/* ---------- pieces: buttons ---------- */
button, .btn {
  font: 700 17px/1.2 var(--sans); border: 0; cursor: pointer; border-radius: var(--r-pill); min-height: 56px; padding: 10px 22px;
  background: var(--accent); color: var(--on-accent); text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; width: 100%; box-shadow: 0 5px 0 var(--ember), 0 14px 22px -10px rgba(255, 107, 53, .65); margin-bottom: 5px;
  transition: transform .38s var(--snappy), box-shadow .38s var(--snappy), background-color .15s, opacity .15s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
button:active:not(:disabled), .btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ember), 0 4px 10px -6px rgba(255, 107, 53, .6); transition-duration: .08s; }
button:disabled { opacity: .55; cursor: default; }
button.ghost, .btn.ghost { background: var(--surface-2); color: var(--ink); box-shadow: 0 4px 0 var(--line); }
button.ghost:active:not(:disabled), .btn.ghost:active { box-shadow: 0 0 0 var(--line); }
button.lemon, .btn.lemon { background: var(--glow); color: var(--on-glow); box-shadow: 0 5px 0 var(--glow-edge); }
button.lemon:active:not(:disabled), .btn.lemon:active { box-shadow: 0 1px 0 var(--glow-edge); }
button.coral { background: var(--miss); color: var(--on-miss); box-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
button.link, button.danger, .btn.quiet, button.quiet { background: none; color: var(--accent-text); min-height: 44px; width: auto; padding: 8px 6px; border-radius: 10px; box-shadow: none; margin: 0; }
button.danger { color: var(--miss); }
.btn.quiet, button.quiet { width: 100%; }
button.sm, .btn.sm, button.small-btn { min-height: 44px; font-size: 15px; width: auto; padding: 0 18px; }
.iconbtn, button.iconbtn {
  width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); box-shadow: none; margin: 0;
  display: inline-grid; place-items: center; flex: none; text-decoration: none;
}
.iconbtn:active { transform: scale(.94); box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  button, .btn { transition: background-color .12s, opacity .12s; }
  button:active:not(:disabled), .btn:active { transform: none; filter: brightness(.94); }
}
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 140px; }
.row.tight { gap: 6px; align-items: center; }
.row.tight > * { flex: 0 1 auto; }

/* ---------- chips, avatars ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; min-height: 32px; padding: 0 12px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--ink); font: 700 13.5px/1 var(--sans); margin: 0; }
.chip.lemon, .chip.you { background: var(--glow); color: var(--on-glow); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.ink { background: var(--ink); color: var(--bg); }
.chip.tan { background: var(--accent); color: var(--on-accent); }
.chip.streak { background: var(--streak-bg); color: var(--ink); text-decoration: none; }
.chip.streak .ico { fill: var(--accent); stroke: var(--ink); }
.chip.small { min-height: 26px; font-size: 13px; padding: 0 10px; }
.av { --c: var(--f0); display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--c); color: #24123f; font: 700 13px/1 var(--sans); border: 2px solid var(--surface); }
.av.sm { width: 26px; height: 26px; font-size: 11px; }
.av.lg, .av.big { width: 48px; height: 48px; font-size: 18px; }
.av.xl { width: 72px; height: 72px; font-size: 26px; border-width: 3px; }
.av.ghost { background: var(--surface-2); color: var(--muted); border-style: dashed; border-color: var(--line); }
.av[data-c="1"] { --c: var(--f1); } .av[data-c="2"] { --c: var(--f2); } .av[data-c="3"] { --c: var(--f3); }
.av[data-c="4"] { --c: var(--f4); } .av[data-c="5"] { --c: var(--f5); }
.avs { display: inline-flex; }
.avs .av + .av { margin-left: -8px; }
html:not(.calm) .av.pop { animation: pop-in .65s var(--bouncy) both; }
@keyframes pop-in { from { transform: scale(0); } }

/* ---------- bars ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin: 14px 0 12px; }
.topbar h1 { margin: 0; font-size: 32px; }
.topbar .title { font: 800 22px/1.06 var(--display); letter-spacing: -.012em; margin: 0; flex: 1; min-width: 0; text-align: center; overflow-wrap: anywhere; }
.topbar .end { display: flex; gap: 8px; align-items: center; }
.sub-date { margin: -6px 0 14px; }
.tabbar { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); max-width: 528px; margin: 0 auto; height: 68px; z-index: 6;
  border-radius: 34px; background: var(--surface); border: 2px solid var(--outline); box-shadow: 0 4px 0 var(--outline), var(--shadow);
  display: flex; justify-content: space-around; align-items: center; padding: 0 8px; }
.tab { min-width: 64px; height: 52px; border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: 700 11.5px/1 var(--sans); color: var(--muted); text-decoration: none; }
.tab[aria-current=page] { color: var(--ink); }
.tab[aria-current=page] .ico { fill: var(--accent); stroke: var(--ink); }

/* ---------- the day card and its stack ---------- */
.stackwrap { position: relative; padding-top: 14px; margin: 4px 0 18px; }
.stackwrap::before, .stackwrap::after { content: ""; position: absolute; left: 18px; right: 8px; top: 2px; height: 140px; border-radius: var(--r-card); border: 2px solid var(--outline); }
.stackwrap::before { background: var(--stack-a, var(--f5)); transform: rotate(3deg); transform-origin: 100% 0; }
.stackwrap::after { background: var(--stack-b, var(--f4)); transform: rotate(-1.6deg); top: 7px; left: 12px; right: 14px; }
.daycard { position: relative; z-index: 1; background: var(--surface); border: 2px solid var(--outline); border-radius: var(--r-card); padding: 20px;
  box-shadow: 0 6px 0 var(--outline), var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.daycard.vt { view-transition-name: daycard; }
.vt-lock { view-transition-name: lock-chip; }
.daycard > * { margin: 0; }
.daycard .question { margin: 0; }
.daycard.lemon { background: var(--glow); color: var(--on-glow); --muted: #4a3866; --ink: #24123f; border-color: #24123f; box-shadow: 0 6px 0 #24123f, 0 24px 50px -16px rgba(255, 210, 63, .55); }
.daycard.facedown { min-height: 330px; align-items: center; justify-content: center; text-align: center; overflow: hidden; border-color: #24123f;
  box-shadow: 0 6px 0 #24123f, 0 24px 40px -14px rgba(22, 10, 44, .6); }
.daycard.facedown .peek { margin: 0 auto; }
.cardhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.who, .about-line { display: flex; align-items: center; gap: 10px; font: 700 15px/1.25 var(--sans); margin: 0; }
.corner-peek { position: absolute; right: -6px; top: -26px; z-index: 2; }
.lockrow { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.lockrow .cap { text-align: center; }

/* ---------- answers ---------- */
.choices, .opts { display: grid; gap: 10px; margin: 0; }
.choice, .opt {
  min-height: 58px; border-radius: var(--r-ctl); background: var(--surface-2); color: var(--ink); display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; font: 600 17px/1.25 var(--sans); border: 2px solid transparent; width: 100%; text-align: left; justify-content: flex-start;
  box-shadow: none; margin: 0; position: relative; transition: transform .38s var(--snappy), opacity .12s, background-color .12s, box-shadow .2s;
}
.choice:active:not(:disabled), .opt:active:not(:disabled) { transform: scale(.985); box-shadow: none; }
.key { width: 30px; height: 30px; border-radius: 10px; background: var(--surface); display: grid; place-items: center; font: 700 14px/1 var(--sans); flex: none; color: var(--ink); }
.choice.picked, .choice[aria-pressed="true"], .opt.picked { background: var(--picked); color: var(--on-picked); border-color: transparent; box-shadow: 0 4px 0 var(--accent); transform: translateY(-2px); }
.choice.picked .key, .choice[aria-pressed="true"] .key, .opt.picked .key { background: var(--accent); color: #24123f; }
.choice.dim, .opt.dim { opacity: .5; }
.choice.right { border-color: var(--ok); background: var(--ok-soft); color: var(--ink); }
.choice.wrong { border-color: var(--miss); background: var(--miss-soft); color: var(--ink); }
.choice.answer, .opt.real { background: var(--glow); color: #24123f; border-color: #24123f; }
.choice.answer .key, .opt.real .key { background: #fff; color: #24123f; }
.choice:disabled { opacity: 1; cursor: default; }
.choice.dim:disabled { opacity: .5; }
.choice .who, .opt .end { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font: 600 13px/1.2 var(--sans); }
.choice .tag { display: block; font-size: 13px; font-weight: 600; }
.choice .txt { overflow-wrap: anywhere; }
html:not(.calm) .choice.picked.just { animation: pick-pop .38s var(--snappy); }
@keyframes pick-pop { 45% { transform: translateY(-2px) scale(1.03); } }
.about { color: var(--muted); font-weight: 700; }
.note { background: var(--surface-2); border-radius: var(--r-ctl); padding: 10px 14px; color: var(--muted); }
.profile { background: var(--surface-2); border-radius: var(--r-ctl); padding: 10px 14px; margin: 8px 0; }
/* This or that: two big cards held like a hand. */
.tot { position: relative; display: flex; flex-direction: column; gap: 14px; }
.tot-card { min-height: 170px; border-radius: var(--r-card); border: 2px solid #24123f; background: var(--f4); color: #24123f; box-shadow: 0 6px 0 #24123f;
  flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: 22px; gap: 4px; transform: rotate(-1.2deg); text-align: left; margin: 0; }
.tot-card + .or + .tot-card { background: var(--f2); transform: rotate(1.4deg); }
.tot-card .disp { font-size: 34px; }
.tot-card[aria-pressed=true] { border-width: 3px; box-shadow: 0 8px 0 #24123f, 0 0 0 6px var(--accent); transform: rotate(1.4deg) translateY(-4px); }
.tot-card:active:not(:disabled) { box-shadow: 0 2px 0 #24123f; transform: translateY(4px); }
.tot .or { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; min-height: 40px; padding: 0 16px; font-size: 15px; border: 3px solid var(--bg); }
/* Slider: the number is the hero, the knob is a Peek. */
.slider-box { display: flex; flex-direction: column; gap: 10px; }
.slider-val { display: flex; align-items: flex-end; justify-content: center; gap: 12px; padding: 10px 0 0; color: var(--accent-text); }
.slider-val .cond { font-size: 120px; }
.slider-val .of { font: 17px/1.4 var(--sans); color: var(--muted); padding-bottom: 18px; }
.slider-val .word { font: 800 30px/1.1 var(--display); color: var(--ink); text-align: center; }
input.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 56px; min-height: 56px; padding: 0; border: 0; background: transparent; margin: 0;
  --p: 50%; }
input.slider::-webkit-slider-runnable-track { height: 16px; border-radius: 8px; border: 2px solid var(--outline);
  background: linear-gradient(90deg, var(--accent) var(--p), var(--surface-2) var(--p)); }
input.slider::-moz-range-track { height: 12px; border-radius: 8px; border: 2px solid var(--outline); background: var(--surface-2); }
input.slider::-moz-range-progress { height: 12px; border-radius: 8px; background: var(--accent); }
input.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 56px; height: 56px; margin-top: -22px; border-radius: 50%; border: 3px solid var(--ink);
  background: var(--accent) var(--knob) center / 26px no-repeat; box-shadow: 0 5px 0 var(--ember); cursor: grab; }
input.slider::-moz-range-thumb { width: 50px; height: 50px; border-radius: 50%; border: 3px solid var(--ink); background: var(--accent) var(--knob) center / 26px no-repeat; box-shadow: 0 5px 0 var(--ember); }
input.slider { --knob: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='8.5' cy='12' rx='3.5' ry='4.5' fill='%23fff'/%3E%3Cellipse cx='15.5' cy='12' rx='3.5' ry='4.5' fill='%23fff'/%3E%3Ccircle cx='10' cy='11' r='2' fill='%232B1554'/%3E%3Ccircle cx='17' cy='11' r='2' fill='%232B1554'/%3E%3C/svg%3E"); }
.slider-ends { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--muted); }
.slider-ends span:last-child { text-align: right; }

/* ---------- sheets, rows, switches ---------- */
.sheet, section.sheet { background: var(--surface); border-radius: 24px; padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); margin: 0 0 12px; }
.sheet.flat { box-shadow: none; padding: 4px 16px; gap: 0; }
.sheet.flat > .hr { height: 2px; background: var(--line); border-radius: 2px; }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 4px; }
.setrow .lbl { display: flex; align-items: center; gap: 12px; font-weight: 600; min-width: 0; }
.setrow select { width: auto; min-height: 44px; padding: 4px 30px 4px 12px; border-radius: var(--r-pill); border: 0; background: var(--surface-2); font-weight: 700; font-size: 14px; }
.switch, button.switch { width: 52px; height: 44px; min-height: 44px; border-radius: 999px; background: transparent; position: relative; flex: none; padding: 0; margin: 0; box-shadow: none; }
.switch::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 32px; border-radius: 999px; background: var(--line); transition: background-color .15s; }
.switch::after { content: ""; position: absolute; top: 9px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: left .38s var(--snappy); }
.switch[aria-checked=true]::before { background: var(--accent); }
.switch[aria-checked=true]::after { left: 23px; }
.switch:active:not(:disabled) { transform: none; box-shadow: none; }
.group-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 68px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; }
.group-row .grow { flex: 1; min-width: 0; }
.group-row p { margin: 0; }
.group-row.add { background: transparent; border: 2px dashed var(--line); box-shadow: none; min-height: 60px; }
.list-rows { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; }

/* ---------- sections ---------- */
.card { padding: 18px 0 6px; margin: 0; }
.card + .card { border-top: 2px solid var(--line); }
.card > h2:first-child, .card > details:first-child > summary { margin-top: 0; }
.banner { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; padding: 12px 18px; border-radius: var(--r-pill);
  background: var(--glow); color: var(--on-glow); font-weight: 700; text-decoration: none; margin: 12px 0; }
.waitline { display: flex; align-items: center; gap: 14px; padding: 4px; margin: 4px 0 18px; }
.waitline p { margin: 0; }
.waitline .disp { font-size: 26px; }
.result { font: 800 22px/1.15 var(--display); padding: 12px 16px; border-radius: var(--r-ctl); margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.result.ok { background: var(--ok-soft); color: var(--ok); }
.result.miss { background: var(--miss-soft); color: var(--miss); }
.pts-badge { font: 800 16px/1 var(--display); padding: 6px 12px; border-radius: var(--r-pill); background: var(--glow); color: var(--on-glow); }
.reveal-face { display: flex; align-items: center; gap: 14px; }
.reveal-face .cond { font-size: 64px; }
.reveal-face .disp { font-size: 24px; }
.reveal-answer { font: 800 24px/1.15 var(--display); padding: 14px 16px; border-radius: var(--r-ctl); background: var(--glow); color: #24123f; margin: 0; border: 2px solid #24123f; }
.stat { font-size: 18px; font-weight: 700; padding: 8px 0; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 2px solid var(--line); min-height: 52px; }
.list li:first-child { border-top: 0; }
.list .grow, .grow { flex: 1; min-width: 0; }
.list .pts, .pts { font: 800 22px/1 var(--display); font-variant-numeric: tabular-nums; }
.list.compact li { min-height: 44px; padding: 6px 0; }
.rank { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface-2); font: 800 15px/1 var(--display); flex: none; }
.rank.r1 { background: var(--glow); color: var(--on-glow); }
.entry { padding: 12px 14px; border-radius: var(--r-ctl); background: var(--surface-2); margin: 8px 0; }
.entry.real { background: var(--ok-soft); }
.entry .meta { font-size: 14px; color: var(--muted); }
.entry .txt { font-weight: 700; overflow-wrap: anywhere; }
.entry .txt.big { font: 800 24px/1.15 var(--display); margin: 4px 0; }
.hidden-txt { font-style: italic; color: var(--muted); }
.score { margin-left: 8px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.score.s2 { background: var(--ok-soft); color: var(--ok); }
.score.s1 { background: var(--glow-soft); color: var(--ink); }
.guesses .gv { display: block; }
.sync { font: 800 24px/1.2 var(--display); text-align: center; padding: 8px 0 0; }
.rank-list { margin: 0; padding-left: 1.4em; }
.rank-list li { margin: 2px 0; }
.feedback:empty { display: none; }
.feedback { margin: 6px 0 10px; }
.kickoff, .share-card { margin-top: 4px; padding-top: 14px; border-top: 2px dashed var(--line); }
.kickoff h3 { font: 800 22px/1.15 var(--display); margin: 0 0 4px; }
.wait-fun .row > button { flex: 1 1 150px; }
.sample-box { margin-top: 10px; padding: 12px; border-radius: var(--r-ctl); background: var(--surface-2); }
.sample-box .profile, .sample-box .choice { background: var(--surface); }
details summary { cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center; gap: 8px; }
.card > details > summary { font: 800 22px/1.15 var(--display); }
.card > details > summary::marker { content: ""; }
.card > details > summary::after { content: "+"; margin-left: auto; font: 800 26px/1 var(--display); color: var(--muted); }
.card > details[open] > summary::after { content: "–"; }
.back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: none; margin-top: 8px; }
.earlier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.earlier-grid .sheet { margin: 0; gap: 8px; text-decoration: none; color: var(--ink); }
.earlier-grid .sheet .disp { font-size: 20px; }
.earlier-grid .chip { align-self: flex-start; }
.custom-item { flex-wrap: wrap; }
.custom-item .txt { font-weight: 700; }
.custom-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.opt-row { display: flex; gap: 6px; align-items: center; margin: 6px 0; }
.opt-row .danger { min-width: 44px; justify-content: center; }
.code { font: 700 22px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; padding: 10px 14px; background: var(--surface-2); border-radius: var(--r-ctl); display: inline-block; overflow-wrap: anywhere; }
.code.url { font-size: 15px; letter-spacing: 0; word-break: break-all; }
.steps ol { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 0 0 0 46px; margin: 14px 0; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); border: 2px solid var(--outline); font: 800 16px/1 var(--display); }
.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: var(--r-pill); font-weight: 700; max-width: calc(100% - 32px); z-index: 20; }
.preview { width: 100%; border-radius: var(--r-ctl); margin-top: 10px; border: 2px solid var(--outline); }
.bubble { background: var(--surface); border-radius: 20px 20px 20px 6px; padding: 14px 16px; flex: 1; box-shadow: var(--shadow); }
.bubble p { margin: 0; }
.peek-say { display: flex; align-items: flex-end; gap: 12px; margin: 4px 0 14px; }

/* ---------- forms ---------- */
label { display: block; font-weight: 700; margin: 14px 0 6px; }
input, textarea, select { font: inherit; width: 100%; padding: 12px 16px; border-radius: var(--r-ctl); border: 2px solid var(--line); background: var(--surface); color: var(--ink); min-height: 52px; }
textarea { resize: none; min-height: 88px; }
input:focus, textarea:focus, select:focus { border-color: var(--outline); outline: none; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
input.piece, textarea.piece { border-color: var(--outline); box-shadow: 0 4px 0 var(--outline); font-weight: 600; font-size: 20px; }
::placeholder { color: var(--muted); opacity: .8; }
.count { font-size: 13px; color: var(--muted); text-align: right; }
.err { color: var(--miss); font-weight: 700; margin: 6px 0; }
.err:empty { display: none; }
fieldset { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: 6px; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg legend { width: 100%; }
.seg-opt { flex: 1 1 140px; margin: 0; position: relative; display: flex; }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.seg-opt span { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 10px 12px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 2px solid transparent; font-weight: 700; cursor: pointer; text-align: center; }
.seg-opt input:checked + span { border-color: var(--outline); background: var(--surface); box-shadow: 0 4px 0 var(--outline); }
.seg-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.seg.seg-col { flex-direction: column; }
.seg.seg-col .seg-opt { flex: 1 1 auto; }
.seg.seg-col .seg-opt span { border-radius: var(--r-ctl); justify-content: flex-start; text-align: left; }
.days { display: flex; justify-content: space-between; gap: 2px; padding: 12px 0; margin: 0 -6px; }
button.day { flex: 1 1 0; min-width: 44px; max-width: 52px; width: auto; height: 44px; min-height: 44px; padding: 0; border-radius: 14px; font: 700 13px/1 var(--sans); background: var(--surface-2); color: var(--muted); box-shadow: none; margin: 0; }
button.day[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
label.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; min-height: 44px; margin: 4px 0; cursor: pointer; }
label.check input { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; flex: none; accent-color: var(--accent-text); }
select:disabled, label.check input:disabled { opacity: .6; }
@media (max-width: 340px) { .checks { grid-template-columns: 1fr; } }

/* ---------- photos, ranks, laughs ---------- */
.rank-opt { gap: 12px; }
.badge { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font: 800 15px/1 var(--display); border: 2px dashed var(--muted); color: var(--on-picked); }
.rank-opt.picked .badge { background: var(--accent); color: var(--on-accent); border: 2px solid var(--on-picked); }
.photo { display: block; width: 100%; height: auto; border-radius: var(--r-ctl); background: var(--surface-2); margin: 8px 0; }
.photo.small { max-width: 160px; }
.photo.missing { display: grid; place-items: center; min-height: 140px; color: var(--muted); font-size: 14px; text-align: center; padding: 12px; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0; }
.photo-grid .photo { aspect-ratio: 3 / 4; object-fit: cover; margin: 0; border-radius: 20px; }
.photo-grid .tile .meta { margin-top: 4px; color: var(--muted); }
.photo-btn { padding: 0; background: var(--surface-2); border: 2px solid var(--outline); border-radius: 22px; min-height: 0; display: block; width: 100%; overflow: hidden;
  box-shadow: 0 4px 0 var(--outline); position: relative; margin: 0; }
.photo-btn[aria-pressed="true"] { border-width: 3px; box-shadow: 0 6px 0 var(--outline), 0 0 0 5px var(--accent); transform: translateY(-3px); }
.photo-btn .chip { position: absolute; bottom: 10px; left: 10px; }
.photo-pick label.btn { margin: 4px 0; }
.laugh { width: auto; min-height: 44px; min-width: 56px; padding: 6px 12px; background: var(--surface); color: var(--ink); border: 2px solid var(--line); font-size: 16px; box-shadow: none; margin: 0; }
.laugh.on { border-color: var(--accent-text); background: var(--glow-soft); }
.laugh:disabled { opacity: .7; }
.laughs { padding: 0 6px; }
.tile { min-width: 0; }

/* ---------- dialogs, bottom sheets, sharing ---------- */
dialog.sheet { width: min(520px, calc(100% - 24px)); max-height: calc(100% - 24px); border: 2px solid var(--outline); border-radius: var(--r-card); background: var(--surface); color: var(--ink); padding: 18px; }
dialog.sheet::backdrop, dialog.bottom::backdrop { background: rgba(8, 3, 20, .55); }
dialog.bottom { margin: auto 0 0; width: 100%; max-width: 100%; max-height: 90vh; border: 0; border-top: 2px solid var(--outline); border-radius: 34px 34px 0 0;
  padding: 14px 20px calc(30px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
dialog.bottom:not([open]) { display: none; }
dialog.bottom .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--outline); align-self: center; }
@media (min-width: 600px) { dialog.bottom { max-width: 520px; margin: auto; border-radius: var(--r-card); border: 2px solid var(--outline); } }
html:not(.calm) dialog.bottom[open] { animation: sheet-in .48s var(--smooth); }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 10px; }
.sheet-head h2 { flex: 1 1 auto; margin: 0; }
.sheet-preview { background: var(--surface-2); border-radius: var(--r-ctl); padding: 10px 14px; margin: 12px 0 4px; overflow-wrap: anywhere; }
.share { margin-top: 10px; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 8px; }
.share-btn { min-height: 52px; padding: 10px 14px; font-size: 16px; justify-content: flex-start; background: var(--surface-2); color: var(--ink); border-radius: var(--r-ctl); box-shadow: none; margin: 0; }
.share-btn.native { background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 0 var(--ember); }
.share-btn .share-ico { width: 28px; height: 28px; border-radius: 9px; flex: none; display: inline-grid; place-items: center; font-size: 14px; line-height: 1; background: var(--surface); }
.share-btn.native .share-ico { background: rgba(255, 255, 255, .45); }
.share-btn.wa .share-ico { background: #25d366; }
.share-btn.tg .share-ico { background: #54a9eb; }
.share-btn.ms .share-ico { background: #a68cff; }
.share-btn.sms .share-ico { background: #5ad25f; }
.share > button.ghost { margin-top: 10px; }
.share-note:empty { display: none; }
.discord { margin-top: 18px; padding-top: 14px; border-top: 2px solid var(--line); }
.discord input { font-size: 15px; }

/* ---------- the Night stage pages: invite, yearbook cover, streak ---------- */
.stage-page { position: relative; overflow: hidden; margin: 0 -16px; padding: 0 16px 24px; min-height: calc(100vh - 80px); display: flex; flex-direction: column; }
.stage-page > * { position: relative; }
.stage-page > .grain { position: absolute; }
.invite-top { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 30px; text-align: center; }
.invite-top h1 { font-size: 48px; margin: 0; color: var(--ink); }
.invite-top p { margin: 0; color: var(--on-night-muted); }
.stage .muted, .stage-page .muted { color: var(--muted); }
.stage .daycard:not(.lemon):not(.facedown):not(.night) { --ink: #24123f; --muted: #5e4f7a; --surface-2: #eee8f9; --outline: #24123f; --surface: #fff; --picked: #24123f; --on-picked: #f6f2fd; color: #24123f; }

/* ---------- the landing page (board 15) ---------- */
body:has(#landing) { background: var(--bg); }
body:has(#landing) main.wrap { max-width: none; padding: 0; }
.landing { margin: 0; }
.land-hero { position: relative; overflow: hidden; padding: 0 24px 120px; }
.land-in { max-width: 1200px; margin: 0 auto; position: relative; }
.land-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0; }
.land-head nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.land-head nav .quiet { color: var(--ink); width: auto; padding: 0 12px; }
.land-head nav .btn { width: auto; }
.land-row { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 24px; }
.land-copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.land-copy h1 { font-size: clamp(56px, 8vw, 112px); color: var(--ink); margin: 0; }
.land-copy .lede { font-size: 20px; line-height: 1.45; max-width: 520px; color: var(--on-night-muted); margin: 0; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-row .btn { width: auto; padding: 0 30px; }
.cta-row .btn.ghost { box-shadow: 0 4px 0 #0b0418; }
.land-art { flex: 1 1 420px; min-width: 0; position: relative; height: 480px; }
.land-art > * { position: absolute; }
.land-art .back-card { left: 6%; top: 40px; width: 300px; height: 380px; border-radius: 30px; background: var(--f4); border: 2px solid #0b0418; transform: rotate(-10deg); }
.land-art .daycard { left: 10%; top: 26px; width: 320px; transform: rotate(-3deg); box-shadow: 0 6px 0 #0b0418; }
.land-art .lemon { left: auto; right: 0; top: 140px; width: 250px; height: 300px; transform: rotate(7deg); justify-content: center; }
.land-art .lemon .cond { font-size: 96px; }
.land-art .lemon .disp { font-size: 30px; }
.land-art .peek { right: 150px; top: 330px; }
.how-grid { max-width: 1200px; margin: -60px auto 0; padding: 0 24px; position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.how-grid .daycard { gap: 10px; }
.how-grid h3 { font: 800 28px/1.06 var(--display); letter-spacing: -.012em; margin: 0; }
.how-grid .chip { align-self: flex-start; }
.land-sec { max-width: 1200px; margin: 0 auto; padding: 72px 24px 0; }
.land-sec.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.land-sec.split > * { flex: 1 1 420px; min-width: 0; }
.land-sec h2 { font-size: clamp(36px, 5vw, 56px); }
.land-room { position: relative; overflow: hidden; border-radius: 32px; padding: 36px; display: flex; flex-direction: column; gap: 14px; border: 2px solid #24123f; box-shadow: 0 6px 0 #24123f; }
.land-room .code-big { font-size: 96px; color: var(--glow); letter-spacing: .04em; margin: 0; }
.land-col { max-width: 640px; margin: 0 auto; padding: 0 24px; }
.landing #try { max-width: 560px; margin: 72px auto 0; padding: 0 24px; }
#start { background: var(--surface); border: 2px solid var(--outline); border-radius: var(--r-card); padding: 20px 18px; margin: 18px 0; box-shadow: 0 6px 0 var(--outline), var(--shadow); }
.feats { list-style: none; padding: 0; margin: 0; }
.feats li { margin: 12px 0; padding-left: 18px; position: relative; }
.feats li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hub-links { padding-left: 1.2em; margin: 6px 0; }
.hub-links li { margin: 8px 0; }
.faq h3 { font-size: 17px; margin: 16px 0 4px; }
.faq p { margin: 0 0 8px; color: var(--muted); }
.land-foot { border-top: 2px solid var(--line); padding: 32px 24px; margin-top: 48px; }
.land-foot > div { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.land-foot nav { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 15px; }
.land-foot nav a { min-height: 44px; display: inline-flex; align-items: center; }
body:has(#landing) > .foot { display: none; }
@media (max-width: 560px) {
  .land-head { flex-wrap: nowrap; }
  .land-head nav .quiet { display: none; }
  .land-art { height: 400px; transform: scale(.82); transform-origin: 0 0; margin-bottom: -60px; }
  .land-hero { padding-bottom: 100px; }
}

/* ---------- wide screens: the web group page (board 16) ---------- */
@media (min-width: 900px) {
  main.wrap.wide { max-width: none; padding: 0 32px 0 0; }
  .shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 32px; align-items: start; }
  .shell > aside { position: sticky; top: 0; padding: 24px 20px; background: var(--surface); border-right: 2px solid var(--line); min-height: 100vh; display: flex; flex-direction: column; gap: 18px; }
  .shell > aside .side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; color: var(--ink); text-decoration: none; min-height: 56px; font-weight: 600; }
  .shell > aside .side-link[aria-current=page] { background: var(--picked); color: var(--on-picked); font-weight: 700; }
  .shell > aside .side-link[aria-current=page] .av { border-color: var(--picked); }
  .shell > aside .btn { width: 100%; }
  .group-wide { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
  .group-wide > .main-col { flex: 1.4 1 520px; min-width: 0; }
  .group-wide > .side-col { flex: 1 1 300px; max-width: 380px; min-width: 0; padding-top: 18px; }
  .group-wide .daycard { padding: 28px; gap: 18px; }
  .group-wide .daycard .question { font-size: 36px; }
  .group-wide .choices { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .group-wide .lockrow { flex-direction: row; align-items: center; gap: 14px; }
  .group-wide .lockrow > button { width: auto; padding: 0 32px; }
  .group-wide .corner-peek { right: -20px; top: -30px; }
  .head-wide { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 32px 0 22px; }
  .shell > aside .side-link .grow { min-width: 0; overflow-wrap: anywhere; }
  .head-wide h1 { font-size: 44px; margin: 0; }
  .head-wide .row > * { flex: 0 0 auto; }
  body.has-tabs .tabbar { display: none; }
  body.has-tabs .foot { padding-bottom: 32px; }
}
@media (max-width: 899px) { .shell > aside, .only-wide { display: none !important; } }
@media (min-width: 900px) { .only-narrow { display: none !important; } }

/* The view-transitions crossfade (day card shared element). */
::view-transition-group(daycard) { animation-duration: 450ms; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

/* ---------- season podium, streak, yearbook (boards 07, 08) ---------- */
.podiums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; padding-top: 4px; margin-bottom: 14px; }
.podium { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.podium .block { width: 100%; border-radius: 20px 20px 8px 8px; background: var(--surface); border: 2px solid var(--outline); box-shadow: 0 5px 0 var(--outline); display: grid; place-items: center; }
.podium .block .cond { font-size: 52px; }
.podium.p1 .block .cond { font-size: 64px; }
.podium .block.lead { background: var(--glow); color: #24123f; border-color: #24123f; }
.crown .ico { width: 40px; height: 40px; fill: var(--glow); stroke: #24123f; stroke-width: 1.8; }
.yb-crown { position: absolute; top: -40px; left: 50%; margin-left: -26px; transform: rotate(-10deg); }
.yb-crown .ico { width: 52px; height: 52px; fill: var(--accent); stroke-width: 1.6; }
.av.yb-av { width: 112px; height: 112px; font-size: 44px; border-color: #24123f; }
.flame { overflow: visible; }
.flame .fl, .flame .core { transform-box: fill-box; transform-origin: 50% 100%; }
html:not(.calm) .flame:not(.late) .fl { animation: flicker 1.2s ease-in-out infinite alternate; }
@keyframes flicker { to { transform: scaleY(1.05) skewX(-3deg); } }
.flame.late { filter: saturate(.6); transform: rotate(4deg); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; width: 100%; margin-top: 10px; }
.wk { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wk-dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: #24123f; }
.wk-dot.on { background: var(--accent); }
.wk-dot.today { background: var(--glow); border: 3px solid var(--ink); }
.pins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.setrow > a, .setrow > span > a { display: inline-flex; align-items: center; min-height: 44px; }
.land-hero .land-copy h1.cond { font-size: clamp(64px, 9.4vw, 116px); line-height: .9; letter-spacing: -.02em; }
.land-head .brand-mark span { color: var(--ink); }
.land-art .daycard .choice { min-height: 48px; font-size: 15px; }
.land-art .daycard.lemon { gap: 4px; }
.land-art .daycard.lemon p { margin: 0; }
.how-grid .daycard .peek { margin-top: auto; }
.land-col > section { margin-top: 40px; }
.land-foot .brand-mark { gap: 8px; }
.topbar .chip.streak, a.chip.streak { min-height: 44px; }
.stage .daycard.night { box-shadow: 0 6px 0 var(--outline), var(--shadow); }

/* 2026-10-31: the group's memory. The callback is a torn-ticket strip on the day card (Lemon chip,
   dashed top edge): one line from the group's own history, never today's answer. */
.callback { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 0 0; border-top: 2px dashed var(--line); }
.callback p { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.callback .chip .ico { width: 14px; height: 14px; }
.sheet.remember { border: 2px solid var(--outline); box-shadow: 0 4px 0 var(--outline); }
.sheet.remember .btn { align-self: flex-start; }
.memory-link { width: 100%; }
.mem-head { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.mem-head .peek { flex: 0 0 auto; }
.joke-word { font: 800 34px/1 var(--display); color: var(--accent-text); }
.pair-row { padding: 8px 4px; }
.pair-name { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }

/* 2026-11-01: where the points came from, under a name ("+2 knew it · +1 fooled Tyler"). */
.setrow .lbl .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.setrow .why { font-size: 13px; font-weight: 500; color: var(--muted); line-height: 1.3; }
.season-why .pts, .setrow .pts { white-space: nowrap; font-size: 19px; }
.share-one { width: 100%; }
.share-more { margin-top: 10px; }
.share-more summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--muted); font-weight: 600; }
.share-more .share-grid { margin-top: 6px; }
/* Round 3: the slider has no knob until it's touched. */
input.slider.untouched::-webkit-slider-thumb { opacity: .45; }
input.slider.untouched::-moz-range-thumb { opacity: .45; }
input.slider.untouched::-moz-range-progress { background: transparent; }
/* Earlier days: the result chip wraps instead of cutting off. */
.sheet > .chip.lemon { white-space: normal; height: auto; min-height: 32px; padding-top: 6px; padding-bottom: 6px; line-height: 1.3; text-align: left; }
.leave-link { color: var(--muted); }
/* "What kind of group?": five options wrap onto two lines on a phone. */
.seg.kinds { flex-wrap: wrap; }
.seg.kinds .seg-opt { flex: 1 1 30%; }
.group-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 2px 4px 12px; }
.group-facts .link { min-height: 44px; min-width: 44px; padding: 4px 6px; }
/* 2026-11-01 (usertest #3: the bottom bar covered "Lock it in" on a short phone): on phones the main button
   sticks just above the tab bar while its card is on screen, and pages end clear of the bar. */
@media (max-width: 899px) {
  body.has-tabs main.wrap { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }

}
.group-facts { gap: 2px 14px; }
.group-facts .fact { display: inline-flex; align-items: center; gap: 6px; }
/* Short phones (iPhone SE 1st gen, 568 pt): a slimmer tab bar, so the main button fits above it. */
@media (max-width: 899px) and (max-height: 600px) {
  .tabbar { height: 58px; bottom: calc(8px + env(safe-area-inset-bottom)); }
}
@media (max-width: 899px) {
  body.answering .tabbar { display: none; }
  body.answering.has-tabs main.wrap { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}
/* Short phones: a tighter card so the question, its options and the button fit one screen. */
@media (max-width: 899px) and (max-height: 600px) {
  .daycard { padding: 14px; gap: 10px; }
  .daycard .question { font-size: 22px; }
  .group-facts { margin-bottom: 6px; }
  .choices { gap: 8px; }
}
@media (max-width: 899px) and (max-height: 600px) {
  .topbar .title { font-size: 17px; }
  .topbar { margin-bottom: 4px; }
  .daycard .cardhead { margin-bottom: -2px; }
}
@media (max-width: 899px) and (max-height: 600px) {
  .choices .choice { min-height: 48px; padding-top: 6px; padding-bottom: 6px; }
  .group-facts { gap: 0 12px; margin-top: 0; }
}
/* 2026-11-01 (usertest: 12 of 12 read content scrolling under the floating bar as "the bar covers the list"):
   a paper fade under the bar, as on iPhone, so the page visibly ends above it instead of running beneath it. */
@media (max-width: 899px) {
  body.has-tabs::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; pointer-events: none;
    height: calc(124px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, transparent, var(--bg) 40px); }
  body.answering::after { display: none; }
  body.has-tabs main.wrap { padding-bottom: calc(132px + env(safe-area-inset-bottom)); }
}
@media (max-width: 899px) and (max-height: 600px) {
  .daycard { gap: 6px; padding: 12px; }
  .group-facts { row-gap: 0; margin: -6px 4px 2px; }
}
/* 2026-11-01: your next move, under the group's name. */
.next-move { margin: 2px 4px 2px; font-size: 16px; line-height: 1.35; }
.next-move strong { color: var(--accent-text); }
/* Short phones while answering: the next move and the reveal line stay; the kind of questions waits. */
@media (max-width: 899px) and (max-height: 700px) {
  body.answering .group-head-lines .group-facts + .group-facts { display: none; }
  body.answering .group-facts { margin-bottom: 0; }
  .next-move { font-size: 15px; }
}
.group-head-lines { margin-bottom: 10px; }
@media (max-width: 899px) and (max-height: 600px) { .group-head-lines { margin-bottom: 14px; } .group-facts { margin-top: 0; } }
.group-head-lines .group-facts { margin-top: 0; margin-bottom: 2px; }
.when-short { display: none; }
@media (max-width: 899px) and (max-height: 600px) { .when-short { display: inline; } .fact:has(.when-short) .when-long { display: none; } }
.group-head-lines { margin-bottom: 20px; }
.group-facts .admin-links { display: flex; gap: 16px; width: 100%; margin-left: -6px; }
/* 2026-11-02 */
.your-data .plain-list { margin: 0 0 10px; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; line-height: 1.45; }
.privacy-line { margin-top: 10px; }
.suggest .wrap { flex-wrap: wrap; }
.chip-btn { width: auto; min-height: 44px; padding: 8px 14px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; font: 600 15px/1.2 var(--sans); }
.reveal-pick .seg-opt { flex: 1 1 45%; }
/* 2026-11-02 readability: icon buttons say what they are; a pair's season is a head-to-head. */
.iconbtn.labelled { width: auto; min-width: 52px; height: auto; min-height: 52px; padding: 6px 10px; flex-direction: column; gap: 1px; font: 700 11.5px/1 var(--sans); color: var(--ink); text-decoration: none; }
.head2head { display: flex; justify-content: center; gap: 28px; margin: 18px 0; }
.h2h { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.h2h .cond { font-size: 56px; line-height: 1; }
@media (min-width: 900px) { .group-head-lines { margin-bottom: 30px; } }

/* 2026-11-03: the invite page's Join button sits above the fold on small phones. */
.invite-page .join-cta { margin-top: 18px; display: flex; flex-direction: column; }
@media (max-height: 700px) {
  .invite-page .invite-top { margin-top: 8px; gap: 8px; }
  .invite-page .invite-top svg.peek { width: 72px; height: 72px; }
  .invite-page .invite-top h1 { font-size: 36px; }
  .invite-page .join-cta { margin-top: 12px; }
}
@media (max-height: 600px) {
  .invite-page .invite-top .avs .av.lg { width: 36px; height: 36px; font-size: 15px; }
  .invite-page .invite-top h1 { font-size: 30px; }
}
.chip.scope { align-self: flex-start; }
.skip-row { display: flex; justify-content: flex-start; margin: -4px 0 0; }
.skip-btn { min-height: 44px; }

/* 2026-11-03: the real answer right under the question on the reveal. */
.real-said { margin: 8px 2px 0; font-size: 18px; color: var(--on-night, var(--ink)); }
.real-said strong { background: var(--glow); color: var(--on-glow); padding: 2px 10px; border-radius: 10px; }

/* 2026-11-04: two of you: the pair card in place of a leaderboard. */
.pair-card { gap: 10px; }
.pair-score { display: flex; align-items: baseline; gap: 12px; }
.pair-score .cond { font-size: 56px; line-height: 1; color: var(--accent-text, var(--ink)); }
.pair-card.big .pair-score .cond { font-size: 84px; }
.pair-score p { margin: 0; font-weight: 600; }

/* 2026-11-04: Deja Who Wrapped: story cards on a dusk gradient. */
.wr-page { position: fixed; inset: 0; display: flex; flex-direction: column; background: #12082a; color: #fff7ee; z-index: 5; }
.wr-bars { display: flex; gap: 4px; padding: calc(10px + env(safe-area-inset-top)) 14px 8px; }
.wr-bars span { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 247, 238, .25); overflow: hidden; }
.wr-bars span i { display: block; height: 100%; width: 0; background: #fff7ee; }
.wr-bars span.done i { width: 100%; }
.wr-bars span.on i { width: 100%; transition: width 7s linear; }
.calm .wr-bars span.on i { transition: none; }
.wr-close { position: absolute; top: calc(22px + env(safe-area-inset-top)); left: 10px; color: #fff7ee; background: rgba(0, 0, 0, .2); z-index: 2; }
.wr-stage { flex: 1; position: relative; margin: 6px 12px 0; touch-action: pan-y; user-select: none; cursor: pointer; }
.wr-card { position: absolute; inset: 0; border-radius: 28px; overflow: hidden; padding: 64px 26px 96px; display: flex; flex-direction: column; justify-content: center; gap: 14px;
  background: linear-gradient(160deg, var(--wr-a), var(--wr-b)); box-shadow: 0 18px 50px rgba(0, 0, 0, .45); animation: wr-in .5s cubic-bezier(.2, .8, .2, 1) both; }
.wr-glow { position: absolute; width: 380px; height: 380px; right: -120px; top: -90px; border-radius: 50%; background: radial-gradient(rgba(255, 214, 140, .5), rgba(255, 214, 140, 0) 70%); animation: wr-glow 6s ease-in-out infinite alternate; pointer-events: none; }
.wr-card > p:not(.wr-brand), .wr-card > h1, .wr-card > div:not(.wr-glow):not(.wr-peek):not(.wr-year) { position: relative; animation: wr-rise .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0ms); }
.wr-eyebrow { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.wr-bigrow { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.wr-big { margin: 0; font-size: clamp(88px, 30vw, 160px); line-height: .9; color: #ffd27a; text-shadow: 0 6px 30px rgba(255, 140, 80, .45); }
.wr-unit { font-family: var(--display); font-weight: 800; font-size: 26px; }
.wr-title { margin: 0; font-size: clamp(30px, 9vw, 46px); line-height: 1.04; color: #fff7ee; }
.wr-quote { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(28px, 8vw, 40px); line-height: 1.08; color: #ffd27a; }
.wr-body { margin: 0; font-size: 20px; font-weight: 600; opacity: .92; }
.wr-year { position: absolute; left: -10px; bottom: -40px; font-family: var(--cond); font-weight: 800; font-size: 220px; line-height: 1; color: #fff7ee; opacity: .07; pointer-events: none; }
.wr-peek { position: absolute; right: 18px; bottom: 54px; animation: wr-bob 3s ease-in-out infinite; }
.wr-brand { position: absolute; left: 26px; bottom: 18px; margin: 0; font-size: 13px; font-weight: 600; opacity: .7; }
.wr-foot { padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; }
.wr-save { background: #fff7ee; color: #24123f; }
.wr-banner { background: linear-gradient(120deg, #3a1c71, #d76d77 60%, #f08a4b); color: #fff7ee; }
@keyframes wr-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes wr-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes wr-glow { from { transform: translate(0, 0) scale(1); } to { transform: translate(-30px, 24px) scale(1.12); } }
@keyframes wr-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
.calm .wr-card, .calm .wr-card > *, .calm .wr-glow, .calm .wr-peek { animation: none !important; }
