/* Fizzbloom — site styles.
   Identity: periwinkle mist page, plum ink, cartoon ink outlines on things you
   can touch (buttons, the play stage), quiet image-first cards elsewhere. */

@font-face { font-family: "Baloo 2"; font-weight: 600; font-display: swap; src: url(/fonts/baloo-2-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Baloo 2"; font-weight: 800; font-display: swap; src: url(/fonts/baloo-2-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url(/fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: italic; font-display: swap; src: url(/fonts/atkinson-hyperlegible-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url(/fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2"); }

:root {
  --ink: #2A2350;
  --ink-2: #5B5480;
  --mist: #F4F5FF;
  --paper: #FFFFFF;
  --line: #DCDDF4;
  --bloom: #FF5C8A;
  --fizz: #19B8C9;
  --pollen: #FFC43D;
  --link: #0B7285;
  --f-display: "Baloo 2", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --f-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Classic typographic scale: 14 18 21 24 36 48 60 72 */
  --s-sm: 0.875rem; --s-0: 1.125rem; --s-1: 1.3125rem; --s-2: 1.5rem;
  --s-3: 2.25rem; --s-4: 3rem; --s-5: 3.75rem; --s-6: 4.5rem;
  --wrap: 1200px;
  --gut: clamp(16px, 4vw, 40px);
  --c: var(--bloom);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--mist); color: var(--ink);
  font: 400 var(--s-0)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--fizz); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 800; line-height: 1.08; letter-spacing: -0.012em; margin: 0 0 0.4em; text-wrap: balance; }
h1 { font-size: clamp(var(--s-3), 5.4vw, var(--s-5)); }
h2 { font-size: clamp(var(--s-2), 3.2vw, var(--s-3)); }
h3 { font-size: var(--s-2); line-height: 1.15; }
p { margin: 0 0 1em; text-wrap: pretty; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; z-index: 200; }
.skip:focus { top: 12px; color: #fff; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

/* ---------- buttons: toy-like, with an ink edge you can press ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em; cursor: pointer;
  font: 800 var(--s-0)/1 var(--f-display); color: var(--ink); text-decoration: none;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px;
  padding: 0.8em 1.25em 0.72em; box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:hover { color: var(--ink); transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn-primary { background: var(--bloom); }
.btn-sm { font-size: 1rem; padding: 0.55em 0.95em 0.5em; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 50; background: rgba(244, 245, 255, 0.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { max-width: var(--wrap); margin: 0 auto; padding: 10px var(--gut); display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font: 800 1.75rem/1 var(--f-display); letter-spacing: -0.02em; }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand span { padding-top: 4px; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; order: 3; width: 100%; margin: 0 calc(var(--gut) * -1); padding: 0 var(--gut) 2px; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: none; display: inline-flex; align-items: center; gap: 0.45em; text-decoration: none; color: var(--ink);
  font: 600 var(--s-0)/1 var(--f-display); padding: 0.55em 0.85em 0.45em; border-radius: 999px;
}
.nav a::before { content: ""; width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--c); }
.nav a:hover, .nav a[aria-current="page"] { background: var(--paper); box-shadow: inset 0 0 0 2px var(--line); }
.search { margin-left: auto; display: flex; align-items: center; position: relative; }
.search input {
  width: clamp(150px, 22vw, 260px); font: inherit; font-size: 1rem; color: var(--ink);
  padding: 0.55em 2.6em 0.55em 1em; border-radius: 999px; border: 2px solid var(--line); background: var(--paper);
}
.search input:focus { border-color: var(--ink); outline: none; }
.search button { position: absolute; right: 4px; width: 36px; height: 36px; border: 0; background: none; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
@media (min-width: 980px) {
  .nav { order: 0; width: auto; margin: 0; padding: 0; }
}
@media (max-width: 520px) {
  .search input { width: 44px; padding-right: 0; color: transparent; cursor: pointer; }
  .search input:focus { width: calc(100vw - 2 * var(--gut) - 150px); color: var(--ink); padding-right: 2.6em; cursor: text; }
  .search input::placeholder { color: transparent; }
  .search input:focus::placeholder { color: var(--ink-2); }
}

/* ---------- breadcrumbs ---------- */
.crumbs { max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gut) 0; font-size: var(--s-sm); color: var(--ink-2); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4em; }
.crumbs li + li::before { content: "/"; margin-right: 0.4em; color: var(--line); }
.crumbs a { color: var(--ink-2); }

/* ---------- home: hero ---------- */
.hero { max-width: var(--wrap); margin: 0 auto; padding: clamp(20px, 4vw, 48px) var(--gut) 24px; display: grid; gap: clamp(20px, 4vw, 48px); align-items: center; }
.hero h1 { font-size: clamp(var(--s-4), 7.2vw, var(--s-6)); line-height: 0.98; letter-spacing: -0.025em; margin-bottom: 0.3em; }
.hero .lead { font-size: var(--s-1); line-height: 1.5; max-width: 34ch; color: var(--ink); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }
.hero-note { color: var(--ink-2); font-size: 1rem; margin: 0; }
.hero-toy {
  position: relative; aspect-ratio: 1 / 1; max-height: 560px; width: 100%; border-radius: 40px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 30% 15%, #ffffff 0%, rgba(255,255,255,0) 55%),
    linear-gradient(170deg, #C9F3F7 0%, #DDF0FF 48%, #F7E8FF 100%);
  border: 2px solid var(--ink); box-shadow: 0 6px 0 var(--ink);
}
.hero-toy canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; touch-action: none; }
.hero-toy img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.6s; }
.hero-tip, .hero-count { z-index: 2; }
.hero-toy.is-live img { opacity: 0; }
.hero-tip { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); margin: 0; white-space: nowrap; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 0.35em 0.95em 0.25em; font: 600 1rem/1.2 var(--f-display); pointer-events: none; }
.hero-count { position: absolute; right: 18px; bottom: 16px; margin: 0; font: 800 1rem/1 var(--f-display); color: var(--ink); background: rgba(255,255,255,.85); border-radius: 999px; padding: 0.45em 0.8em 0.35em; pointer-events: none; }
@media (min-width: 900px) { .hero { grid-template-columns: 5fr 6fr; } .hero-toy { aspect-ratio: 7 / 5; max-height: 500px; } }

/* ---------- festival + today's pick ---------- */
.feature { max-width: var(--wrap); margin: 0 auto; padding: 12px var(--gut); }
.fest {
  display: grid; gap: 4px 18px; align-items: center; grid-template-columns: auto 1fr;
  background: #FFF0CC; border: 2px solid var(--ink); border-radius: 24px; padding: 14px 18px; margin-bottom: 18px;
}
.fest img { width: 112px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; grid-row: span 2; }
.fest h2 { font-size: var(--s-2); margin: 0; }
.fest p { margin: 0; }
.today { display: grid; gap: 16px 32px; align-items: center; background: var(--paper); border-radius: 32px; padding: 14px; }
.today img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 22px; background: var(--line); }
.today-copy { padding: 4px 10px 12px; }
.today-copy h2 { font: 600 var(--s-0)/1.2 var(--f-body); color: var(--ink-2); margin: 0 0 4px; letter-spacing: 0; }
.today-copy h3 { font-size: clamp(var(--s-3), 4vw, var(--s-4)); margin: 0 0 8px; }
@media (min-width: 820px) { .today { grid-template-columns: 7fr 5fr; padding: 16px; } }

/* ---------- rails + cards ---------- */
.rail { max-width: var(--wrap); margin: 0 auto; padding: 24px var(--gut) 4px; }
.rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rail-head h2 { margin: 0; display: flex; align-items: center; gap: 0.35em; }
.rail-head h2::before { content: ""; width: 0.42em; height: 0.42em; border-radius: 50%; background: var(--c); }
.rail-head p { margin: 4px 0 0; color: var(--ink-2); flex-basis: 100%; }
.rail-head a { font: 600 var(--s-0)/1 var(--f-display); }
.cards { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 22px 18px; }
.cards-rail { grid-auto-flow: column; grid-auto-columns: clamp(240px, 27vw, 330px); justify-content: start; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: thin; }
.cards-rail > li { scroll-snap-align: start; }
.cards-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
/* Home: portal-style grids, up to 8 big tiles per category, tight spacing. */
.cards-home { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px 16px; margin-top: 12px; }
.cards-home .card-d { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 560px) { .cards-home { grid-template-columns: 1fr 1fr; gap: 14px 12px; } .cards-home .card-t { font-size: 1.05rem; } .cards-home .card-d { font-size: 0.9rem; } }
.card a { display: block; color: var(--ink); text-decoration: none; border-radius: 22px; }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; background: color-mix(in srgb, var(--c) 22%, var(--paper)); }
.card a:hover img { outline: 3px solid var(--c); outline-offset: 2px; }
.card-t { display: flex; align-items: center; gap: 0.4em; margin-top: 10px; font: 800 var(--s-1)/1.15 var(--f-display); }
.card-t::before { content: ""; flex: none; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--c); }
.card-d { display: block; color: var(--ink-2); font-size: 1rem; line-height: 1.45; margin-top: 2px; }
.card.is-played .card-t::after, .card.is-starred .card-t::after { content: "Played"; font: 700 0.75rem/1 var(--f-body); color: var(--ink-2); border: 1.5px solid var(--line); background: var(--paper); border-radius: 999px; padding: 4px 8px 3px; margin-left: 4px; }
.card.is-starred .card-t::after { content: "★ Done"; color: #8a5d00; border-color: #e7c35a; background: #fff6d6; }

/* ---------- prose blocks ---------- */
.why { max-width: var(--wrap); margin: 0 auto; padding: 56px var(--gut) 24px; }
.why-in { background: var(--paper); border-radius: 32px; padding: clamp(22px, 4vw, 44px); display: grid; gap: 8px 48px; }
.why-in p { max-width: 44ch; }
.why-in b { font-family: var(--f-display); font-size: var(--s-1); display: block; line-height: 1.2; margin-bottom: 2px; }
@media (min-width: 820px) { .why-in { grid-template-columns: 1fr 1fr; } .why-in h2 { grid-column: 1 / -1; } }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: 0.3em 0; }
.page { max-width: var(--wrap); margin: 0 auto; padding: 20px var(--gut) 48px; }
.page .updated { color: var(--ink-2); font-size: var(--s-sm); }

/* ---------- category + all pages ---------- */
.cat-head { max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gut) 0; }
.cat-head h1 { display: flex; align-items: center; gap: 0.3em; }
.cat-head h1::before { content: ""; flex: none; width: 0.4em; height: 0.4em; border-radius: 50%; background: var(--c); }
.cat-head .prose { color: var(--ink); }
.listing { max-width: var(--wrap); margin: 0 auto; padding: 8px var(--gut) 48px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 4px; }
.chip { font: 600 1rem/1 var(--f-display); padding: 0.55em 0.9em 0.45em; border-radius: 999px; border: 2px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; display: inline-flex; gap: 0.4em; align-items: center; text-decoration: none; }
.chip[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
.chip[data-cat]::before { content: ""; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--c); }
.filters input { font: inherit; font-size: 1rem; padding: 0.55em 1em; border-radius: 999px; border: 2px solid var(--line); min-width: min(320px, 100%); }
.empty { margin-top: 20px; color: var(--ink-2); }

/* ---------- experience page ---------- */
.exp { max-width: var(--wrap); margin: 0 auto; padding: 8px var(--gut) 0; }
.exp-head { padding: 6px 0 14px; }
.exp-head h1 { margin-bottom: 0.15em; }
.exp-sum { font-size: var(--s-1); color: var(--ink-2); margin: 0; max-width: 60ch; }
.stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 80vh; overflow: hidden;
  border-radius: 30px; border: 2px solid var(--ink); box-shadow: 0 6px 0 var(--ink);
  background: color-mix(in srgb, var(--c) 16%, var(--mist)); isolation: isolate;
}
.stage-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: opacity 0.7s; }
.stage.is-live .stage-poster { opacity: 0; pointer-events: none; }
.stage-gl { position: absolute; inset: 0; z-index: 0; }
.fb-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.stage.is-loading::after {
  content: ""; position: absolute; z-index: 3; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px;
  border-radius: 50%; border: 4px solid rgba(255,255,255,.7); border-top-color: var(--ink); animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.stage-msg { position: absolute; z-index: 4; inset: auto 16px 16px 16px; background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; padding: 14px 16px; }
.stage-adwait { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; background: rgba(244, 245, 255, 0.72); font: 800 var(--s-1)/1 var(--f-display); color: var(--ink); }
.stage-msg p { margin: 0 0 10px; }
.stage.is-immersive { position: fixed; inset: 0; z-index: 100; max-height: none; aspect-ratio: auto; border-radius: 0; border: 0; box-shadow: none; }
.stage:fullscreen { max-height: none; aspect-ratio: auto; border-radius: 0; border: 0; box-shadow: none; }
html.fb-immersive { overflow: hidden; }
@media (max-width: 700px) and (orientation: portrait) {
  .stage { aspect-ratio: 4 / 5; max-height: 74svh; border-radius: 22px; }
}

/* HUD inside the stage */
.hud { position: absolute; inset: 0; z-index: 2; pointer-events: none; font-family: var(--f-body); }
.hud > * { pointer-events: auto; }
.hud-bar { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 8px; }
.hud-btn, .hud-labtoggle {
  height: 44px; min-width: 44px; display: inline-grid; place-items: center; cursor: pointer;
  border-radius: 999px; border: 2px solid var(--ink); background: rgba(255,255,255,.9); color: var(--ink);
  box-shadow: 0 3px 0 var(--ink); padding: 0;
}
.hud-btn:active, .hud-labtoggle:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.hud-btn[aria-pressed="false"] { background: rgba(255,255,255,.6); color: var(--ink-2); }
.hud-labtoggle { display: inline-flex; gap: 6px; padding: 0 14px 0 10px; font: 800 1rem/1 var(--f-display); }
.hud-labtoggle span { padding-top: 3px; }
.hud-lab { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 8px; max-width: min(330px, calc(100% - 24px)); max-height: calc(100% - 24px); }
.hud-lab.is-open .hud-labtoggle { background: var(--pollen); }
.hud-labbody { width: 100%; overflow: auto; background: rgba(255,255,255,.95); border: 2px solid var(--ink); border-radius: 18px; padding: 12px 14px 6px; font-size: var(--s-sm); }
.hud-row { margin-bottom: 10px; }
.hud-row label { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; margin-bottom: 4px; }
.hud-row output { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 400; }
.hud-row input[type="range"] { width: 100%; accent-color: var(--ink); }
.hud-row select { width: 100%; font: inherit; color: var(--ink); padding: 0.4em 0.5em; border-radius: 10px; border: 2px solid var(--line); background: var(--paper); }
.hud-toggle { display: flex; align-items: center; gap: 8px; }
.hud-toggle label { margin: 0; }
.hud-toggle input { width: 18px; height: 18px; accent-color: var(--ink); }
.hud-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.hud-chip { font: 800 0.95rem/1 var(--f-display); padding: 0.5em 0.85em 0.42em; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; }
.hud-chip.is-primary { background: var(--bloom); }
.hud-chip.is-on { background: var(--pollen); }
.hud-note { margin: 0 0 10px; color: var(--ink-2); }
.hud-tl { position: absolute; left: 12px; top: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: min(290px, calc(100% - 24px)); pointer-events: none; }
.hud-tl > * { pointer-events: auto; }
.hud-goal { background: rgba(255,255,255,.93); border: 2px solid var(--ink); border-radius: 16px; padding: 7px 12px 9px; font-size: var(--s-sm); max-width: 100%; box-shadow: 0 3px 0 rgba(42,35,80,.25); }
.hud-goal-head { display: flex; align-items: center; gap: 6px; width: 100%; padding: 0; border: 0; background: none; font: 800 0.86rem/1.2 var(--f-display); color: var(--ink-2); cursor: pointer; text-align: left; }
.hud-goal-n { margin-left: auto; padding-left: 10px; font-variant-numeric: tabular-nums; }
.hud-goal-star { color: #c9900f; font-size: 1.05em; }
.hud-goal-text { margin: 3px 0 0; font: 700 0.98rem/1.25 var(--f-display); color: var(--ink); }
.hud-goal-bar { height: 6px; border-radius: 99px; background: rgba(42,35,80,.12); margin-top: 7px; overflow: hidden; }
.hud-goal-bar i { display: block; height: 100%; width: 0; background: #3f8f4a; border-radius: inherit; transition: width .4s; }
.hud-goal-act { margin-top: 8px; font-size: 0.86rem; }
.hud-goal.is-done { background: #fff6d6; animation: fb-goal-pop .5s ease-out; }
.hud-goal.is-collapsed .hud-goal-text, .hud-goal.is-collapsed .hud-goal-bar, .hud-goal.is-collapsed .hud-goal-act { display: none; }
@keyframes fb-goal-pop { 0% { transform: scale(.94); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .hud-goal.is-done { animation: none; } }
.hud-help ol { margin: 0 0 8px; padding-left: 1.3em; }
.hud-reads { margin: 0; display: grid; grid-template-columns: auto auto; gap: 1px 12px; background: rgba(255,255,255,.88); border-radius: 14px; padding: 7px 12px; font-size: var(--s-sm); }
.hud-reads dt { color: var(--ink-2); }
.hud-reads { cursor: pointer; }
.hud-reads.is-min dt:nth-of-type(n+2), .hud-reads.is-min dd:nth-of-type(n+2) { display: none; }
.hud-reads.is-min::after { content: '▾'; grid-column: 1 / -1; text-align: center; line-height: .6; color: var(--ink-2); font-size: .8em; }
.hud-reads dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.hud-hint { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); text-align: center; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 0.4em 1em 0.3em; font: 600 1.05rem/1.25 var(--f-display); transition: opacity 0.6s, transform 0.6s; pointer-events: none; }
.hud-hint.is-gone { opacity: 0; transform: translate(-50%, -10px); }
.hud-toast { position: absolute; left: 50%; top: 24%; transform: translate(-50%, 10px); opacity: 0; transition: opacity 0.35s, transform 0.35s; pointer-events: none; background: var(--ink); color: #fff; font: 800 var(--s-1)/1.1 var(--f-display); padding: 0.5em 1em 0.4em; border-radius: 999px; white-space: nowrap; }
.hud-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.hud-help { position: absolute; left: 12px; bottom: 70px; width: min(420px, calc(100% - 24px)); background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; padding: 14px 18px; box-shadow: 0 4px 0 var(--ink); font-size: 1rem; }
.hud-help h3 { font-size: var(--s-1); margin: 0 0 6px; }
.hud-help ul { margin: 0 0 8px; padding-left: 1.1em; }
.hud-help-keys { color: var(--ink-2); font-size: var(--s-sm); }
@media (max-width: 600px) {
  .hud-bar { gap: 6px; left: 10px; bottom: 10px; }
  .hud-btn { height: 40px; min-width: 40px; }
  .hud-btn svg { width: 20px; height: 20px; }
  .hud-lab { top: 10px; bottom: auto; right: 10px; flex-direction: column; max-height: calc(100% - 70px); }
  .hud-labtoggle { height: 40px; }
  .hud-hint { top: auto; bottom: 64px; font-size: 1rem; }
  .hud-tl { left: 10px; top: 10px; max-width: calc(100% - 130px); }
  .hud-goal-text { font-size: 0.92rem; }
  .hud-help { bottom: 62px; left: 10px; }
}

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 6px; }
.share-label { font: 600 1rem/1 var(--f-display); color: var(--ink-2); margin-right: 4px; }
.share a, .share button { font: 600 0.95rem/1 var(--f-display); color: var(--ink); text-decoration: none; background: var(--paper); border: 2px solid var(--line); border-radius: 999px; padding: 0.55em 0.9em 0.45em; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--ink); color: var(--ink); }

.exp-body { display: grid; gap: 8px 56px; padding: 26px 0 8px; }
.exp-body section { margin-bottom: 26px; }
.exp-side ul { padding-left: 1.15em; margin: 0; }
.exp-side li { margin: 0.4em 0; }
.exp-side h2, .exp-main h2 { font-size: var(--s-3); }
.exp-side h2 { font-size: var(--s-2); }
@media (min-width: 960px) { .exp-body { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); } .exp-side { order: 2; } }
.faq details { background: var(--paper); border-radius: 18px; padding: 4px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font: 800 var(--s-1)/1.25 var(--f-display); padding: 12px 0 10px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4em; line-height: 0.8; color: var(--ink-2); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-bottom: 8px; }
.related { max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gut) 40px; }

/* ---------- ads: always outside the play area, clearly labelled ---------- */
.ad { margin: 26px auto; max-width: var(--wrap); padding: 0 var(--gut); }
.ad-box { background: var(--paper); border-radius: 18px; padding: 8px 10px 10px; min-height: 120px; }
.ad-label { font-size: 0.75rem; color: var(--ink-2); margin: 0 0 4px; }
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

/* ---------- footer ---------- */
.foot { margin-top: 40px; background: var(--ink); color: #E9E7F7; }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 44px var(--gut) 18px; display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { text-decoration: underline; color: #fff; }
.foot h2 { font-size: var(--s-1); color: #fff; margin-bottom: 8px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 6px 0; }
.foot-brand { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: center; }
.foot-brand .brand { color: #fff; }
.foot-brand p { margin: 0; max-width: 46ch; color: #D8D5EE; }
.foot-note { max-width: var(--wrap); margin: 0 auto; padding: 14px var(--gut) 30px; color: #BDB8DC; font-size: var(--s-sm); border-top: 1px solid rgba(255,255,255,.12); }
@media (min-width: 900px) { .foot-brand { grid-column: auto; display: block; } .foot-brand p { margin-top: 12px; } }

/* ---------- 404 ---------- */
.lost { max-width: 760px; margin: 0 auto; padding: 60px var(--gut); text-align: center; }
.lost p { margin-left: auto; margin-right: auto; max-width: 46ch; }
.lost .hero-cta { justify-content: center; }

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