/* The application: the same night, coins and chunky buttons as the home page.
   Left: your player card, a character built as you go, and the level map. Right: one step at a time.
   Each survey section lights the page in its own season. */
@property --season { syntax: "<color>"; inherits: true; initial-value: #9FD8FF; }
:root {
  color-scheme: dark;
  --bg: #0B0C12;
  --surface: #14161F;
  --surface-2: #1C1F2C;
  --line: rgba(236, 238, 245, 0.12);
  --text: #ECEEF5;
  --muted: rgba(236, 238, 245, 0.68);
  --faint: rgba(236, 238, 245, 0.52);
  --line-strong: rgba(236, 238, 245, 0.38);
  --winter: #9FD8FF;
  --spring: #FF9FCB;
  --summer: #FFC24D;
  --autumn: #FF7A45;
  --danger: #FF8A8A;
  --season: var(--winter);
  --season-ink: #08131F;
  --font-display: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --font-ui: "Geist", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  transition: --season 1.2s ease;
}
:root[data-season="spring"] { --season: var(--spring); --season-ink: #2A0B1C; }
:root[data-season="summer"] { --season: var(--summer); --season-ink: #2A1A00; }
:root[data-season="autumn"] { --season: var(--autumn); --season-ink: #2A0E04; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font-family: var(--font-ui); font-size: 1.05rem; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
.wrap { width: 100%; max-width: 76rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }
h1, h2 { margin: 0; font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em; line-height: 1; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--season); outline-offset: 3px; border-radius: 8px; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--muted); max-width: 40rem; }
.label { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; font-weight: 650; letter-spacing: 0.04em; color: var(--season); }
.label::before { content: ""; width: 1.4rem; height: 2px; background: currentColor; border-radius: 2px; }
.atmos { position: fixed; inset: 0; z-index: -1; pointer-events: none; background:
  radial-gradient(60rem 40rem at 85% 0%, color-mix(in srgb, var(--season) 14%, transparent), transparent 70%),
  radial-gradient(50rem 36rem at 0% 100%, color-mix(in srgb, var(--season) 9%, transparent), transparent 70%); }

/* header */
.top { padding-top: env(safe-area-inset-top, 0px); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: #fff; }
.logo b { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; letter-spacing: -0.01em; }
.wheel { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: conic-gradient(var(--winter) 0 25%, var(--spring) 0 50%, var(--summer) 0 75%, var(--autumn) 0); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); }
@media (prefers-reduced-motion: no-preference) { .wheel { animation: spin 24s linear infinite; } }
@keyframes spin { to { transform: rotate(1turn); } }
.close-note { font-size: 0.86rem; color: var(--muted); text-align: right; }
.logo b { white-space: nowrap; }
@media (max-width: 400px) { .logo b { font-size: 1.3rem; } .close-note { font-size: 0.76rem; white-space: nowrap; } .top .wrap { gap: 0.6rem; } }

/* layout */
.app { flex: 1; display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; padding-block: clamp(1rem, 3vw, 2.5rem) clamp(3rem, 6vw, 5rem); }
.app > * { min-width: 0; }
.app.is-done { grid-template-columns: minmax(0, 1fr); max-width: 52rem; }
.side { position: sticky; top: 1.2rem; display: grid; gap: 1.1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* the player card: a character you build as you go. Every answer adds to the picture (scene.js) and the XP. */
.player { --c: var(--season); position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "art art" "head head" "label total" "path path" "more more"; border-radius: 1.4rem; overflow: hidden; background: var(--surface); box-shadow: 0 0.45rem 0 rgba(0, 0, 0, 0.45), 0 2rem 3rem -2.2rem color-mix(in srgb, var(--c) 60%, transparent); transition: box-shadow 0.8s; }
.player::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 50%, transparent); pointer-events: none; } /* the ring sits above the picture */
.player-art { grid-area: art; position: relative; height: 8.5rem; overflow: hidden; background: linear-gradient(180deg, #0D1020, #1A2038 70%, #283152); transition: background 0.8s; }
.player-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lvl { position: absolute; left: 0.75rem; top: 0.75rem; padding: 0.22rem 0.6rem; border-radius: 999px; background: rgba(11, 12, 18, 0.72); color: #fff; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.02em; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.player-head { grid-area: head; display: grid; gap: 0.2rem; padding: 0.95rem 1.1rem 0; min-width: 0; }
.player-kicker { font-size: 0.74rem; font-weight: 700; color: var(--c); }
.player-name { font-family: var(--font-display); font-weight: 500; font-size: 1.85rem; line-height: 1.05; overflow-wrap: anywhere; }
.player-class { font-size: 0.86rem; font-weight: 650; color: var(--c); }
.xp { display: contents; }
.xp-label { grid-area: label; align-self: end; padding: 0.85rem 0 0 1.1rem; font-size: 0.76rem; font-weight: 650; color: var(--faint); }
.xp-total { grid-area: total; align-self: end; justify-self: end; padding: 0.85rem 1.1rem 0 0; font-size: 0.8rem; font-weight: 800; color: var(--c); font-variant-numeric: tabular-nums; white-space: nowrap; }
.xp-total.is-bump { animation: bump 0.55s cubic-bezier(.2,.9,.3,1.4); }
@keyframes bump { 40% { transform: scale(1.3); } }
/* the level path: a stop per level, the fill creeps forward with every answer */
.path { --n: 1.45rem; grid-area: path; position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: center; margin: 0.55rem 1.1rem 0; }
.path::before, .path-fill { content: ""; position: absolute; left: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; }
.path::before { right: calc(var(--n) / 2); background: rgba(255, 255, 255, 0.1); }
.path-fill { width: max(0px, calc(var(--p, 0) * 100% - var(--n) / 2)); background: var(--c); box-shadow: 0 0 0.6rem color-mix(in srgb, var(--c) 60%, transparent); transition: width 0.7s cubic-bezier(.2,.8,.2,1); }
.path .node { position: relative; z-index: 1; justify-self: end; width: var(--n); height: var(--n); }
.path .coin { box-shadow: inset 0 -0.12rem 0 rgba(0, 0, 0, 0.22); }
.path .coin svg { width: 60%; height: 60%; }
.path .coin.is-locked { opacity: 1; filter: grayscale(1) brightness(0.42); }
.path .dot { border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1.5px rgba(236, 238, 245, 0.3); }
.path .dot.is-on { background: radial-gradient(circle, var(--c) 0 34%, var(--surface) 37%); box-shadow: inset 0 0 0 1.5px var(--c); }
.path .node.is-now { outline: 2px solid var(--c); outline-offset: 2px; border-radius: 50%; }
.player-more { grid-area: more; display: grid; gap: 0.8rem; padding: 0.9rem 1.1rem 1.1rem; }
.stats { display: grid; gap: 0.4rem; }
.stat { display: grid; grid-template-columns: 5rem minmax(0, 1fr); align-items: center; gap: 0.6rem; font-size: 0.78rem; color: var(--faint); }
.bar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
.bar i { height: 0.42rem; border-radius: 2px; background: rgba(255, 255, 255, 0.1); transition: background 0.5s; }
.bar i.on { background: var(--c); }
.perk { font-size: 0.84rem; line-height: 1.45; padding: 0.55rem 0.7rem; border-radius: 0.7rem; background: rgba(255, 255, 255, 0.05); color: var(--muted); }
.perk b { color: var(--text); font-weight: 650; }
.player-rows { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.25rem 0.8rem; font-size: 0.86rem; }
.player-rows dt { color: var(--faint); }
.player-rows dd { margin: 0; font-weight: 600; }
.player-toggle { display: none; }

/* badges: locked coins are grey; a new one pops in */
.coin.is-locked { filter: grayscale(1) brightness(0.5); opacity: 0.75; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.12); }
.coin.is-new { animation: earn 0.8s cubic-bezier(.2,.9,.3,1.35) both; }
@keyframes earn {
  0% { transform: scale(0.2) rotate(-40deg); filter: brightness(2.2); }
  55% { transform: scale(1.35) rotate(10deg); filter: brightness(1.4); box-shadow: 0 0 0 0.5rem color-mix(in srgb, var(--c) 30%, transparent), 0 0 1.6rem var(--c); }
  100% { transform: none; filter: none; }
}

/* the level map (computers) */
.stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.stops li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); align-items: center; gap: 0.7rem; padding: 0.3rem 0.5rem; border-radius: 0.85rem; color: var(--faint); line-height: 1.25; }
.stops li b { display: block; font-size: 0.9rem; font-weight: 600; }
.stops li small { display: block; font-size: 0.74rem; color: var(--faint); }
.stops .coin { width: 2rem; height: 2rem; }
.stops .dot { width: 2rem; height: 2rem; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(236, 238, 245, 0.3); }
.stops .dot.is-on { background: radial-gradient(circle, var(--season) 0 32%, transparent 34%); box-shadow: inset 0 0 0 1.5px var(--season); }
.stops li.is-done { color: var(--muted); }
.stops li.is-now { background: rgba(255, 255, 255, 0.05); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.stops li.is-now b { font-weight: 700; }
.stops li.is-locked { opacity: 0.7; }
@media (min-width: 861px) and (max-height: 1000px) { .player-art { height: 7.5rem; } .perk, .player-more .player-rows { display: none; } .stops li { padding-block: 0.15rem; } .stops li small { display: none; } .stops .coin, .stops .dot { width: 1.6rem; height: 1.6rem; } .stops li { grid-template-columns: 1.6rem minmax(0, 1fr); } }
@media (min-width: 861px) and (max-height: 700px) { .side { position: relative; top: 0; } }

/* phones and small tablets: the card becomes a slim bar pinned to the top (picture, name, XP, path); tap it to open the whole card */
@media (max-width: 860px) {
  html { scroll-padding-top: 6rem; }
  .app { grid-template-columns: minmax(0, 1fr); padding-top: 0.5rem; }
  .side { position: sticky; top: 0; z-index: 30; display: block; margin-inline: calc(-1 * clamp(1rem, 4vw, 2.5rem)); padding: 0.55rem clamp(1rem, 4vw, 2.5rem); background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 1px 0 var(--line); }
  .side .stops { display: none; }
  .side .player { grid-template-columns: 3.9rem minmax(0, 1fr) auto auto; grid-template-areas: "art head total toggle" "art path path toggle" "more more more more"; align-items: center; column-gap: 0.7rem; row-gap: 0.4rem; padding: 0.5rem 0.4rem 0.5rem 0.5rem; border-radius: 1.1rem; }
  .side .player-art { height: 3.5rem; border-radius: 0.8rem; }
  .side .lvl, .side .player-kicker, .side .player-class, .side .xp-label { display: none; }
  .side .player-head { padding: 0; }
  .side .player-name { font-size: 1.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
  .side .xp-total { padding: 0; align-self: center; font-size: 0.76rem; }
  .side .path { --n: 1.1rem; margin: 0; }
  .side .path .node.is-now { outline-width: 1.5px; outline-offset: 1.5px; }
  /* opened: the picture across the top, then the name, the path and the rest */
  .side .player.is-open { grid-template-areas: "art art art art" "head head total toggle" "path path path path" "more more more more"; row-gap: 0.7rem; }
  .side .player.is-open .player-art { height: auto; aspect-ratio: 12 / 5; } /* the whole picture, at any width */
  .side .player.is-open .lvl, .side .player.is-open .player-class { display: block; }
  .side .player.is-open .player-head { padding-left: 0.3rem; }
  .side .player.is-open .path { --n: 1.6rem; margin-inline: 0.3rem; }
  .player-toggle { grid-area: toggle; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-left: 0.1rem; padding: 0; border: 0; border-radius: 0.8rem; background: rgba(255, 255, 255, 0.06); color: var(--text); cursor: pointer; }
  .player-toggle svg { width: 1.2rem; height: 1.2rem; transition: transform 0.25s; }
  .player-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .player-more { display: none; padding: 0.2rem 0.4rem 0.4rem 0.3rem; }
  .player.is-open .player-more { display: grid; }
}
@media (max-width: 400px) { .side .player { grid-template-columns: 3.5rem minmax(0, 1fr) auto auto; column-gap: 0.55rem; } .side .player-art { height: 3.3rem; } .side .player-name { font-size: 1.2rem; } }

/* a step */
.stage { min-width: 0; }
.step { display: grid; gap: 1.6rem; }
.step-head { display: grid; gap: 0.8rem; }
.panel { background: var(--surface); border-radius: 1.5rem; box-shadow: inset 0 0 0 1px var(--line), 0 0.5rem 0 rgba(0, 0, 0, 0.4); padding: clamp(1.1rem, 3vw, 1.9rem); display: grid; gap: 1.6rem; }
.q { border: 0; margin: 0; padding: 0; display: grid; gap: 0.7rem; min-width: 0; }
.q[hidden] { display: none; }
.q legend, .q > label.qlabel { padding: 0; font-weight: 650; font-size: 1.02rem; line-height: 1.4; }
.q .help { font-size: 0.86rem; color: var(--faint); margin-top: -0.35rem; }
.q .err { font-size: 0.88rem; color: var(--danger); font-weight: 600; }
.q.has-err legend, .q.has-err > label.qlabel { color: var(--danger); }
.opt-tag { font-weight: 500; color: var(--faint); font-size: 0.85rem; }

/* single and multi choices: pressable rows and chips */
.choices { display: grid; gap: 0.45rem; }
.choices.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: block; padding: 0.75rem 1rem; border-radius: 0.95rem; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line), 0 0.22rem 0 rgba(0, 0, 0, 0.4); cursor: pointer; font-size: 0.97rem; line-height: 1.35; transition: transform 0.12s, box-shadow 0.2s, background 0.2s, color 0.2s; }
.chips .choice span { padding: 0.55rem 0.9rem; border-radius: 999px; font-size: 0.92rem; }
.choice:hover span { transform: translateY(-1px); }
.choice input:checked + span { background: color-mix(in srgb, var(--season) 16%, var(--bg)); box-shadow: inset 0 0 0 2px var(--season), 0 0.22rem 0 color-mix(in srgb, var(--season) 40%, #000); }
.choice input:focus-visible + span { outline: 2px solid var(--season); outline-offset: 2px; }
.choice input:disabled + span { opacity: 0.4; cursor: not-allowed; transform: none; }
.count { font-size: 0.82rem; color: var(--faint); font-variant-numeric: tabular-nums; }

/* your season of life: four small character cards, each in its own sky */
.picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
.picks label { position: relative; }
.picks input { position: absolute; opacity: 0; pointer-events: none; }
.pick { position: relative; display: grid; border-radius: 1rem; overflow: hidden; background: var(--bg); box-shadow: 0 0.25rem 0 rgba(0, 0, 0, 0.4); cursor: pointer; transition: transform 0.15s, box-shadow 0.2s; }
.pick::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; transition: box-shadow 0.2s; }
.pick-art { position: relative; height: 4.6rem; display: grid; place-items: end center; filter: saturate(0.5) brightness(0.62); transition: filter 0.3s; }
.pick-art > svg { width: auto; height: 3.9rem; margin-bottom: -1px; fill: #0B0C12; }
.pick-art .coin { position: absolute; top: 0.45rem; right: 0.45rem; width: 1.55rem; height: 1.55rem; }
.pick-text { display: grid; gap: 0.05rem; padding: 0.5rem 0.65rem 0.6rem; }
.pick-text small { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.03em; color: var(--c); }
.pick-text b { font-size: 0.88rem; font-weight: 650; line-height: 1.25; }
.picks label:hover .pick { transform: translateY(-2px); }
.picks input:checked + .pick { box-shadow: 0 0.25rem 0 color-mix(in srgb, var(--c) 40%, #000), 0 1rem 1.6rem -1rem var(--c); transform: translateY(-2px); }
.picks input:checked + .pick::after { box-shadow: inset 0 0 0 2px var(--c); }
.picks input:checked + .pick .pick-art { filter: none; }
.picks input:focus-visible + .pick { outline: 2px solid var(--season); outline-offset: 2px; }
@media (max-width: 560px) { .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.coin { --c: var(--winter); position: relative; width: 3.3rem; height: 3.3rem; border-radius: 50%; display: grid; place-items: center; color: color-mix(in srgb, var(--c) 30%, #0B0C12); background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--c) 55%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 70%, #000)); box-shadow: inset 0 -0.25rem 0 rgba(0, 0, 0, 0.22), inset 0 0.15rem 0 rgba(255, 255, 255, 0.35), 0 0.3rem 0 color-mix(in srgb, var(--c) 35%, #000); }
.coin svg { width: 55%; height: 55%; }

/* text fields */
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
@media (max-width: 560px) { .two { grid-template-columns: minmax(0, 1fr); } }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea { width: 100%; padding: 0 0.95rem; height: 3.1rem; border-radius: 0.85rem; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: 500 1rem var(--font-ui); box-shadow: inset 0 0.15rem 0 rgba(0, 0, 0, 0.3); }
textarea { height: auto; min-height: 6.5rem; padding: 0.8rem 0.95rem; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--season); box-shadow: inset 0 0.15rem 0 rgba(0, 0, 0, 0.3), 0 0 0 3px color-mix(in srgb, var(--season) 30%, transparent); }
.q.has-err input, .q.has-err select, .q.has-err textarea { border-color: var(--danger); }
.field-row { display: flex; justify-content: space-between; gap: 1rem; }
.other-input { margin-top: 0.2rem; }

/* age range */
.range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0.8rem; max-width: 22rem; }
.range span { color: var(--faint); }

/* ranking */
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; counter-reset: rank; }
.rank li { counter-increment: rank; display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: 0.6rem; padding: 0.5rem 0.6rem 0.5rem 0.8rem; border-radius: 0.95rem; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.rank li::before { content: counter(rank); font-family: var(--font-display); font-size: 1.3rem; color: var(--season); }
.rank .moves { display: flex; gap: 0.3rem; }
.rank button { all: unset; cursor: pointer; width: 2.2rem; height: 2.2rem; border-radius: 0.7rem; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.rank button:hover { color: var(--text); }
.rank button:focus-visible { outline: 2px solid var(--season); outline-offset: 2px; }
.rank button:disabled { opacity: 0.3; cursor: default; }

/* consent */
.consent { display: grid; gap: 0.8rem; }
.check { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); gap: 0.7rem; align-items: start; font-size: 0.95rem; line-height: 1.5; cursor: pointer; }
.check input { width: 1.25rem; height: 1.25rem; margin: 0.15rem 0 0; accent-color: var(--season); }
.summary { display: grid; gap: 0.3rem; font-size: 0.92rem; color: var(--muted); }
.honey { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* buttons */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; height: 3.2rem; padding-inline: 1.55rem; border-radius: 1rem; border: 0; font: 700 1rem/1 var(--font-ui); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.4s, color 0.4s; }
.btn-game { background: var(--season); color: var(--season-ink); box-shadow: 0 0.32rem 0 color-mix(in srgb, var(--season) 40%, #000), 0 0.9rem 1.8rem -0.7rem color-mix(in srgb, var(--season) 80%, transparent); }
.btn-game:hover { transform: translateY(-2px); }
.btn-game:active { transform: translateY(0.3rem); box-shadow: 0 0.02rem 0 color-mix(in srgb, var(--season) 40%, #000); }
.btn-game[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.22), 0 0.3rem 0 rgba(0, 0, 0, 0.35); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.saved { font-size: 0.84rem; color: var(--faint); }
.btn-small { height: 2.5rem; padding-inline: 1.1rem; border-radius: 0.85rem; font-size: 0.92rem; }
.reward { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.3rem 0.9rem 0.3rem 0.32rem; border-radius: 999px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); }
.reward .coin { width: 2.1rem; height: 2.1rem; }
.reward small { display: block; font-size: 0.7rem; font-weight: 650; color: var(--faint); line-height: 1.15; }
.reward b { display: block; font-size: 0.9rem; line-height: 1.2; }

/* your silhouette */
.looks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; max-width: 26rem; }
.look { position: relative; }
.look input { position: absolute; opacity: 0; pointer-events: none; }
.look span { display: grid; place-items: center; height: 5.4rem; border-radius: 1rem; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line), 0 0.25rem 0 rgba(0, 0, 0, 0.4); cursor: pointer; transition: transform 0.15s, box-shadow 0.2s, background 0.2s; }
.look svg { width: auto; height: 4.3rem; fill: rgba(236, 238, 245, 0.42); transition: fill 0.2s; }
.look:hover span { transform: translateY(-2px); }
.look input:checked + span { background: color-mix(in srgb, var(--season) 12%, var(--bg)); box-shadow: inset 0 0 0 2px var(--season), 0 0.25rem 0 color-mix(in srgb, var(--season) 40%, #000); }
.look input:checked + span svg { fill: var(--text); }
.look input:focus-visible + span { outline: 2px solid var(--season); outline-offset: 2px; }

/* the finished player on the done page */
.trophy { --c: var(--winter); position: relative; width: min(100%, 22rem); animation: deal 0.9s cubic-bezier(.2,.9,.3,1.2) both; border-radius: 1.4rem; overflow: hidden; background: var(--surface); box-shadow: 0 0.5rem 0 rgba(0, 0, 0, 0.45), 0 2.2rem 3rem -1.8rem color-mix(in srgb, var(--c) 70%, transparent); }
.trophy .player-art { height: 9.5rem; }
.trophy::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, transparent); background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.14) 47%, transparent 60%) 0 0 / 260% 100% no-repeat; animation: shine 4.5s ease-in-out 1s infinite; }
@keyframes deal { from { opacity: 0; transform: translateY(18px) rotate(-3deg) scale(0.94); } }
@keyframes shine { 0% { background-position: 130% 0; } 55%, 100% { background-position: -30% 0; } }
.trophy-body { display: grid; gap: 0.3rem; padding: 1rem 1.2rem 1.2rem; }
.trophy .player-name { font-size: 2.1rem; }
.trophy-line { margin-top: 0.3rem; font-size: 0.8rem; font-weight: 650; color: var(--faint); }
.trophy-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.3rem; }
.trophy-badges .coin { width: 2.2rem; height: 2.2rem; }

.alert { padding: 0.9rem 1rem; border-radius: 0.9rem; background: color-mix(in srgb, var(--danger) 14%, var(--bg)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 45%, transparent); color: var(--text); font-size: 0.95rem; }
.done { display: grid; gap: 1.2rem; justify-items: start; }
.invite { justify-self: stretch; display: grid; gap: 0.8rem; margin-top: 0.8rem; padding: clamp(1.1rem, 3vw, 1.7rem); border-radius: 1.5rem; background: linear-gradient(160deg, color-mix(in srgb, var(--season) 16%, var(--surface-2)), var(--surface) 60%); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--season) 40%, transparent), 0 0.5rem 0 rgba(0, 0, 0, 0.45); }
.invite h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.invite input { font-size: 0.95rem; }

/* the last move: the 6-digit code from the email */
.code-box { display: grid; gap: 0.6rem; padding: 1rem 1.1rem 1.1rem; border-radius: 1rem; background: color-mix(in srgb, var(--season) 9%, var(--bg)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--season) 45%, transparent); }
.code-title { font-size: 0.95rem; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.code-title b { color: var(--text); font-weight: 650; }
.code-input { max-width: 12rem; font-family: var(--font-display); font-size: 1.7rem !important; letter-spacing: 0.3em; text-align: center; }
.code-box .err { font-size: 0.88rem; color: var(--danger); font-weight: 600; }
.code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.btn-link { min-height: 2.75rem; padding: 0; border: 0; background: none; color: var(--muted); font: 600 0.9rem var(--font-ui); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn-link:hover { color: var(--text); }
.btn-small[disabled] { opacity: 0.55; cursor: default; }

/* the season story on the done page: chapter by chapter */
.story { justify-self: stretch; display: grid; gap: 0.9rem; padding: clamp(1.1rem, 3vw, 1.8rem); border-radius: 1.5rem; background: linear-gradient(170deg, color-mix(in srgb, var(--season) 10%, var(--surface-2)), var(--surface) 65%); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--season) 35%, transparent), 0 0.5rem 0 rgba(0, 0, 0, 0.45); }
.story-body { display: grid; gap: 0.8rem; max-width: 40rem; }
.story-body p { font-size: 1.05rem; line-height: 1.7; color: var(--muted); }
.story-kicker { margin-top: 0.4rem; font-size: 0.8rem !important; font-weight: 700; letter-spacing: 0.04em; color: var(--season) !important; }
.story-title { font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin-top: -0.4rem; }
.story-title + p::first-letter { float: left; margin: 0.08em 0.1em 0 0; font-family: var(--font-display); font-size: 3.2em; line-height: 0.8; color: var(--text); }
.story-wait { display: flex; align-items: center; gap: 0.7rem; }
.quill { flex: none; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--season); box-shadow: 0 0 0.8rem var(--season); animation: quill 1.6s ease-in-out infinite; }
@keyframes quill { 50% { opacity: 0.35; transform: scale(0.75); } }
.story-path { display: grid; gap: 0.5rem; }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0.3rem; max-width: 26rem; }
.chapters li { height: 0.55rem; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
.chapters li.is-on { background: var(--season); box-shadow: 0 0 0.6rem color-mix(in srgb, var(--season) 55%, transparent); }
.chapters li.is-next { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--season) 60%, transparent); }
.chapters li:last-child { background: linear-gradient(90deg, var(--winter), var(--spring), var(--summer), var(--autumn)); opacity: 0.35; }
.chapters li:last-child.is-on { opacity: 1; }
.story-path .help { font-size: 0.86rem; color: var(--faint); }

/* the quest under a level's title: what it adds to your card, and how far you are */
.quest { display: flex; flex-wrap: wrap; align-items: center; justify-self: start; gap: 0.35rem 0.6rem; max-width: 100%; padding: 0.5rem 0.85rem; border-radius: 0.9rem; background: color-mix(in srgb, var(--season) 9%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--season) 35%, transparent); font-size: 0.88rem; line-height: 1.3; }
.quest-label { color: var(--faint); font-weight: 600; }
.quest b { color: var(--season); font-weight: 700; }
.quest-bar { width: 4.5rem; height: 0.4rem; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.quest-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--season); transition: width 0.5s cubic-bezier(.2,.8,.2,1); }
.quest-count { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* +10 XP: pops up by the question you just answered */
.q, .check { position: relative; }
.xp-pop { position: absolute; right: 0; top: -0.3rem; z-index: 2; padding: 0.12rem 0.55rem; border-radius: 999px; background: var(--season); color: var(--season-ink); font-size: 0.78rem; font-weight: 800; pointer-events: none; animation: xp-pop 1.25s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes xp-pop { 0% { opacity: 0; transform: translateY(8px) scale(0.7); } 18% { opacity: 1; transform: translateY(0) scale(1.1); } 70% { opacity: 1; transform: translateY(-6px); } 100% { opacity: 0; transform: translateY(-16px); } }

/* level up: the badge spins in, the bonus, what the next level adds. It never blocks a tap. */
.levelup { --c: var(--season); position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; pointer-events: none; visibility: hidden; opacity: 0; background: radial-gradient(circle at 50% 50%, rgba(11, 12, 18, 0.6), rgba(11, 12, 18, 0) 65%); transition: opacity 0.35s, visibility 0s 0.35s; }
.levelup.is-on { visibility: visible; opacity: 1; transition: opacity 0.2s; }
.levelup-card { display: grid; justify-items: center; gap: 0.3rem; width: min(19rem, 100%); padding: 1.5rem 1.4rem 1.35rem; border-radius: 1.5rem; text-align: center; background: linear-gradient(170deg, color-mix(in srgb, var(--c) 24%, var(--surface-2)), var(--surface) 70%); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 60%, transparent), 0 0.5rem 0 rgba(0, 0, 0, 0.5), 0 2rem 4rem -1rem color-mix(in srgb, var(--c) 55%, transparent); transform: translateY(14px) scale(0.9); transition: transform 0.45s cubic-bezier(.2,.9,.3,1.3); }
.levelup.is-on .levelup-card { transform: none; }
.lu-coin { position: relative; display: grid; place-items: center; margin-bottom: 0.45rem; }
.lu-coin .coin { --c: inherit; width: 4.4rem; height: 4.4rem; }
.levelup.is-on .lu-coin .coin { animation: earn 0.9s cubic-bezier(.2,.9,.3,1.35) both; }
.lu-burst i { position: absolute; inset: 0; }
.lu-burst i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 0.5rem; height: 0.5rem; margin: -0.25rem; border-radius: 50%; background: var(--c); opacity: 0; }
.levelup.is-on .lu-burst i::after { animation: burst 0.9s ease-out 0.15s both; }
.lu-burst i:nth-child(2) { transform: rotate(45deg); } .lu-burst i:nth-child(3) { transform: rotate(90deg); } .lu-burst i:nth-child(4) { transform: rotate(135deg); }
.lu-burst i:nth-child(5) { transform: rotate(180deg); } .lu-burst i:nth-child(6) { transform: rotate(225deg); } .lu-burst i:nth-child(7) { transform: rotate(270deg); } .lu-burst i:nth-child(8) { transform: rotate(315deg); }
@keyframes burst { 0% { opacity: 1; transform: translateX(0) scale(1); } 100% { opacity: 0; transform: translateX(3.8rem) scale(0.4); } }
.levelup small { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; color: var(--c); }
.levelup b { font-family: var(--font-display); font-weight: 500; font-size: 2rem; line-height: 1.05; }
.lu-xp { margin-top: 0.35rem; padding: 0.2rem 0.75rem; border-radius: 999px; background: var(--c); color: #0B0C12; font-size: 0.85rem; font-weight: 800; }
.lu-next { font-size: 0.9rem; color: var(--muted); }

footer { border-top: 1px solid var(--line); padding-block: 1.6rem 2.2rem; color: var(--faint); font-size: 0.9rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
