/* Lumin Vocab styles. Copyright (C) 2026 B7 Collective LLC. AGPL-3.0-only.

   Layout standard (use these, never one-off numbers):
   Spacing   --s1 4 · --s2 8 · --s3 12 · --s4 16 · --s5 24 · --s6 32 · --s7 48 · --s8 64
   Type      --t-xs 13 · --t-s 15 · --t-m 17 (body) · --t-l 20 · --t-xl 26 · --t-2xl page title · display sizes for words
   Width     --wide 1120 (shell, feed, hero) · --page 880 · --narrow 680 · --measure 66ch (longest line of text)
   Gutter    --gutter 16 on phones, growing to 32
   Rules     Controls never wrap their label. Headings balance their lines. Paragraphs avoid one-word last lines.
             Groups of buttons wrap as whole buttons. Words scale down to fit, they never break mid-word. */

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

/* Paper palette. Illustrations sit on --tile, the same stone gray they were drawn on. */
:root {
  --bg: #E8E5E0; --ink: #18212B; --muted: #57606B; --line: #D5CFC6; --card: #F8F6F2; --soft: #DFDAD2; --tile: #DEDCD8; --lip: #CFC8BD;
  --accent: #F2B544; --accent-lip: #C88D21; --accent-ink: #18212B; --link: #1F6F78; --teal: #1F6F78; --berry: #B4527A; --sage: #6F8F6C; --navy: #24304A;
  --good: #1D6B55; --good-bg: #D9EBDF; --good-lip: #A9CDB5; --bad: #A23A2A; --bad-bg: #F6DED7; --bad-lip: #E2B3A7;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --scale: 1;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --t-xs: calc(0.8125rem * var(--scale)); --t-s: calc(0.9375rem * var(--scale)); --t-m: calc(1.0625rem * var(--scale)); --t-l: calc(1.25rem * var(--scale)); --t-xl: calc(1.625rem * var(--scale));
  --t-2xl: calc(clamp(30px, 4.6vw, 44px) * var(--scale));
  --wide: 1120px; --page: 880px; --narrow: 680px; --measure: 66ch;
  --gutter: clamp(16px, 4vw, 32px);
  --r-s: 12px; --r-m: 16px; --r-l: 22px; --r-pill: 999px;
  --tap: 44px;
  /* Motion: one decelerating curve, one gentle spring for things that land, three durations */
  --ease: cubic-bezier(.22, .8, .24, 1); --spring: cubic-bezier(.34, 1.4, .5, 1);
  --d1: 140ms; --d2: 240ms; --d3: 420ms;
  --shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 3px 0 var(--lip), 0 18px 30px -22px rgba(24, 33, 43, .45);
  --shadow-lift: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 5px 0 var(--lip), 0 26px 36px -22px rgba(24, 33, 43, .5);
  --glass: rgba(16, 20, 26, .34); --glass-line: rgba(255, 255, 255, .2);
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  --c1: #1F6F78; --c2: #A0446A; --c3: #8A5A00; --c4: #B4432C; --c5: #2F5D9E; --c6: #3D7A4F;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #10161D; --ink: #ECEFF2; --muted: #A4AEB9; --line: #2A3540; --card: #1A222B; --soft: #232D37; --lip: #070B0F;
  --link: #7CC6CE; --teal: #7CC6CE; --good: #8FD8C1; --good-bg: #173B33; --good-lip: #0D2620; --bad: #F2A193; --bad-bg: #44231E; --bad-lip: #2A1411;
  --shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 3px 0 var(--lip), 0 18px 30px -22px rgba(0, 0, 0, .8);
  --shadow-lift: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 5px 0 var(--lip), 0 26px 36px -22px rgba(0, 0, 0, .8);
  --c1: #7CC6CE; --c2: #F0A6C4; --c3: #F2C46B; --c4: #F5A08C; --c5: #9DB9F0; --c6: #9FD9A8;
  color-scheme: dark;
}

/* ---- Base ---------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  min-height: 100dvh; background: var(--bg); color: var(--ink); font-family: var(--sans);
  font-size: var(--t-m); line-height: 1.5;
  transition: background-color .4s var(--ease), color .4s var(--ease);
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-variant-numeric: tabular-nums;
}
h1, h2, h3 { text-wrap: balance; overflow-wrap: break-word; }
p, li, small, .lead, .def, .ex, .m, .eg { text-wrap: pretty; overflow-wrap: break-word; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); text-underline-offset: .18em; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 22%, transparent); }
main:focus, main:focus-visible { outline: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.notfound { min-height: 100dvh; }
.notfound .hero-art { align-self: center; }
.notfound .stack { max-width: 520px; }
.notfound .word { --wf: clamp(44px, 9vw, 72px); white-space: normal; }
.notfound .def { margin-top: var(--s2); }
.page.static { padding-top: var(--s6); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.small { font-size: var(--t-s); }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---- Layout primitives ----------------------------------------------------- */
.stack { display: flex; flex-direction: column; gap: var(--gap, var(--s4)); min-width: 0; }
.stack.tight { --gap: var(--s2); } .stack.loose { --gap: var(--s5); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, var(--s3)); min-width: 0; }
.split { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s4); min-width: 0; }
.grow { flex: 1 1 0; min-width: 0; }
.start { align-self: flex-start; }
.center-x { justify-content: center; text-align: center; }
/* Button rows. On phones, .actions.fill stretches buttons to share the row evenly. */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.actions.between { justify-content: space-between; }
.actions.center-x { justify-content: center; }
@media (max-width: 559px) { .actions.fill > .btn { flex: 1 1 auto; } }
.meta { display: flex; flex-wrap: wrap; column-gap: var(--s2); row-gap: 0; color: var(--muted); font-size: var(--t-s); }
.meta > span { white-space: nowrap; }
.meta > span:not(:last-child)::after { content: "·"; margin-left: var(--s2); }

/* ---- Shell ------------------------------------------------------------------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; padding-top: var(--safe-top); }
.container { width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: var(--s3) var(--gutter); min-height: 72px; position: relative; z-index: 6; }
.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 600; font-size: 20px; white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 2px 0 rgba(0,0,0,.18); }
/* Desktop navigation: one paper pill with the five places */
.topnav { display: flex; gap: 2px; background: var(--card); padding: 4px; border-radius: var(--r-pill); box-shadow: var(--shadow); }
.topnav a { text-decoration: none; color: var(--muted); padding: 0 var(--s4); border-radius: var(--r-pill); display: flex; gap: var(--s2); align-items: center; min-height: 40px; white-space: nowrap; font-weight: 700; font-size: var(--t-s); transition: background-color var(--d2) var(--ease), color var(--d2) var(--ease); }
.topnav a .icon { width: 18px; height: 18px; }
@media (hover: hover) { .topnav a:hover { color: var(--ink); } }
.topnav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); }
.count { background: var(--berry); color: #fff; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; padding: 0 6px; line-height: 1.6; }
/* Desktop: the nav pill sits centered, balanced by an empty slot as wide as the brand */
.app.has-nav .topbar .brand { flex: 1 1 0; }
.app.has-nav .topbar::after { content: ""; flex: 1 1 0; }
.topbar .btn.getapp { flex-shrink: 0; }
.topbar .btn.getapp[hidden] { display: none; }
@media (max-width: 379px) { .topbar .btn.getapp { padding: 0 var(--s3); } .topbar .getapp .wide-only { display: none; } .brand { font-size: 18px; gap: var(--s2); } }
main { flex: 1; display: flex; flex-direction: column; width: 100%; min-height: 0; }
.bottomnav { display: none; }
/* Phones: the top bar shrinks to the brand, and the five places float in a pill at the bottom */
@media (max-width: 899px) {
  .topnav { display: none; }
  .topbar { min-height: 60px; padding-block: var(--s2); }
  .app.has-nav main { padding-bottom: calc(92px + var(--safe-bottom)); }
  .bottomnav {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; z-index: 15;
    left: max(10px, calc(50% - 260px)); right: max(10px, calc(50% - 260px)); bottom: calc(10px + var(--safe-bottom));
    background: var(--card); border-radius: 30px; padding: 6px; box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 3px 0 var(--lip), 0 18px 34px -16px rgba(24,33,43,.55);
  }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 700; min-height: 54px; border-radius: 24px; position: relative; white-space: nowrap; transition: background-color var(--d2) var(--ease), color var(--d2) var(--ease); -webkit-tap-highlight-color: transparent; }
  .bottomnav a .icon { width: 22px; height: 22px; transition: transform var(--d2) var(--spring); }
  .bottomnav a[aria-current="page"] { color: var(--ink); background: var(--soft); }
  .bottomnav a[aria-current="page"] .icon { transform: translateY(-1px) scale(1.06); }
  .bottomnav .dot { position: absolute; top: 4px; left: calc(50% + 6px); background: var(--berry); color: #fff; font-size: 10px; font-weight: 700; border-radius: var(--r-pill); padding: 0 5px; line-height: 1.6; }
}
/* Over a scene, the chrome turns to frosted glass */
.app[data-route="words"] .topbar { position: fixed; left: 0; right: 0; top: 0; max-width: none; padding-top: calc(var(--s3) + var(--safe-top)); }
.app[data-route="words"] .brand { color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.4); }
.app[data-route="words"] .topnav, .app[data-route="words"] .bottomnav { background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); }
.app[data-route="words"] .topnav a, .app[data-route="words"] .bottomnav a { color: rgba(255,255,255,.78); }
.app[data-route="words"] .topnav a[aria-current="page"] { color: var(--accent-ink); }
.app[data-route="words"] .bottomnav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.16); }
.app[data-route="play"] .topbar, .app[data-route="play"] .bottomnav { display: none; }
.app[data-route="play"] main { padding-bottom: 0; }

/* ---- Controls ------------------------------------------------------------------ */
.btn { min-height: 52px; padding: 0 var(--s5); border-radius: var(--r-m); border: 0; background: var(--card); color: var(--ink); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); text-decoration: none; white-space: nowrap; max-width: 100%; box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 4px 0 var(--lip), 0 12px 20px -14px rgba(24,33,43,.45); transition: transform var(--d1) var(--ease), box-shadow var(--d1) var(--ease), background-color var(--d2) var(--ease); margin-bottom: 4px; -webkit-tap-highlight-color: transparent; }
.btn .icon { width: 20px; height: 20px; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 1px 0 var(--lip), 0 4px 10px -8px rgba(24,33,43,.4); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
@media (hover: hover) { .btn:hover { filter: brightness(1.03); } }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 0 rgba(255,255,255,.45) inset, 0 4px 0 var(--accent-lip), 0 14px 22px -14px rgba(160,100,10,.6); }
.btn.primary:active { box-shadow: 0 1px 0 rgba(255,255,255,.45) inset, 0 1px 0 var(--accent-lip), 0 4px 10px -8px rgba(160,100,10,.5); }
.btn.quiet { font-weight: 700; min-height: var(--tap); padding: 0 var(--s4); border-radius: var(--r-s); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 3px 0 var(--lip); margin-bottom: 3px; }
.btn.quiet:active { box-shadow: 0 1px 0 var(--lip); transform: translateY(2px); }
.btn.small { min-height: var(--tap); padding: 0 var(--s4); border-radius: var(--r-s); }
.btn.danger { color: var(--bad); }
.btn.wide { width: 100%; }
@media (max-width: 379px) { .btn { padding: 0 var(--s4); } }
.iconbtn { width: 48px; height: 48px; border-radius: 50%; border: 0; box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 3px 0 var(--lip); background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform var(--d1) var(--ease), background-color var(--d2) var(--ease), border-color var(--d2) var(--ease); }
.iconbtn .icon { width: 20px; height: 20px; }
.iconbtn:active { transform: scale(.94); }
.iconbtn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.iconbtn[aria-pressed="true"] .icon { fill: currentColor; }
.swatch { width: var(--tap); height: var(--tap); border-radius: 50%; border: 3px solid transparent; box-shadow: inset 0 0 0 2px var(--card); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.swatch[aria-pressed="true"] { border-color: var(--ink); }
.chip { min-height: var(--tap); padding: 0 var(--s4); border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--card); color: var(--ink); display: inline-flex; align-items: center; gap: var(--s2); white-space: nowrap; text-decoration: none; transition: background-color var(--d2) var(--ease), border-color var(--d2) var(--ease); }
.chip .icon { width: 18px; height: 18px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip[aria-pressed="true"] .icon { color: inherit !important; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.linkbtn { background: none; border: 0; color: var(--link); text-decoration: underline; text-underline-offset: .18em; padding: 0 2px; min-height: var(--tap); display: inline-flex; align-items: center; text-align: left; }
.textlink { display: inline-flex; align-items: center; min-height: var(--tap); }
.badge { width: 40px; height: 40px; border-radius: 12px; background: var(--soft); display: inline-flex; align-items: center; justify-content: center; color: var(--tc, var(--link)); flex-shrink: 0; }
.topic { display: inline-flex; gap: 6px; align-items: center; padding: 4px var(--s3) 4px var(--s2); border-radius: var(--r-pill); background: var(--card); color: var(--ink); font-size: var(--t-s); font-weight: 700; border: 1px solid var(--line); white-space: nowrap; text-decoration: none; }
.topic .icon { width: 18px; height: 18px; color: var(--tc, var(--link)); }
.kbd { display: inline-block; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; font-size: var(--t-xs); background: var(--card); line-height: 1.5; white-space: nowrap; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 18px; flex-shrink: 0; color: #fff; }
.avatar.md { width: 56px; height: 56px; font-size: 24px; }
.avatar.lg { width: 104px; height: 104px; font-size: 42px; }
@media (max-width: 559px) { .avatar.lg { width: 84px; height: 84px; font-size: 34px; } }

/* Forms */
.field { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.field > label, .field > .flabel { font-weight: 700; }
.field small { color: var(--muted); font-size: var(--t-s); }
input[type="text"], input[type="search"], input[type="password"], input[type="number"], select, textarea {
  min-height: 52px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--card); padding: 0 var(--s4); font-size: max(16px, var(--t-m)); width: 100%; color: var(--ink); transition: border-color var(--d2) var(--ease), box-shadow var(--d2) var(--ease); text-overflow: ellipsis;
}
textarea { padding: var(--s3) var(--s4); min-height: 96px; resize: vertical; }
input[type="range"] { width: 100%; accent-color: var(--link); min-height: var(--tap); margin: 0; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--line); min-height: 64px; cursor: pointer; }
.switch:last-child { border-bottom: 0; }
.switch .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch .txt small { color: var(--muted); font-size: var(--t-s); }
.switch input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 52px; height: 32px; border-radius: 16px; background: var(--line); position: relative; flex-shrink: 0; transition: background-color .2s; margin: 0; cursor: pointer; }
.switch input[type="checkbox"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform var(--d2) var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input[type="checkbox"]:checked { background: var(--link); }
.switch input[type="checkbox"]:checked::after { transform: translateX(20px); }
.switch input[type="checkbox"]:disabled { opacity: .5; }

/* ---- Pages ------------------------------------------------------------------------ */
.page { width: 100%; max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; padding: var(--s5) var(--gutter) var(--s7); display: flex; flex-direction: column; gap: var(--s6); }
.page.narrow { max-width: calc(var(--narrow) + 2 * var(--gutter)); }
.page-head { display: flex; flex-direction: column; gap: var(--s2); }
.page h1, .page-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); line-height: 1.15; }
.page h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-xl); line-height: 1.2; }
.lead { margin: 0; color: var(--muted); font-size: calc(1.125rem * var(--scale)); max-width: var(--measure); }
.section { display: flex; flex-direction: column; gap: var(--s3); }
.sec-title { display: flex; align-items: center; gap: var(--s3); }
.sec-title .badge { width: 36px; height: 36px; border-radius: 11px; }
.sec-title .badge .icon { width: 20px; height: 20px; }
.panel { background: var(--card); border-radius: var(--r-l); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.panel.list { padding-block: var(--s1); }
.panel p { max-width: var(--measure); }
@media (max-width: 559px) { .panel { padding: var(--s5) var(--s4); } .panel.list { padding-block: var(--s1); } }
.row-item { display: flex; align-items: center; gap: var(--s3) var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--line); min-height: 64px; }
.row-item:last-child { border-bottom: 0; }
.row-item .grow { display: flex; flex-direction: column; gap: 2px; }
.row-item strong { overflow-wrap: anywhere; }
.footer { display: flex; flex-direction: column; align-items: center; gap: var(--s1); text-align: center; color: var(--muted); font-size: var(--t-s); padding: var(--s5) var(--gutter) var(--s6); }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; column-gap: var(--s3); }
.footer nav a { color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; min-height: 32px; }
.page > .footer { padding-inline: 0; padding-bottom: 0; }
.empty { display: flex; align-items: center; gap: var(--s3); color: var(--muted); padding: var(--s4) 0; }
.empty p { max-width: 40ch; }

/* Grids */
.grid { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.tile { background: var(--card); border-radius: var(--r-m); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s1); border: 1px solid transparent; text-align: left; color: var(--ink); min-width: 0; min-height: 76px; }
@media (hover: hover) { button.tile:hover { border-color: var(--line); } }
.tile .top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s2); }
.tile .top .icon { width: 18px; height: 18px; margin-top: 6px; }
.tile .w { font-family: var(--serif); font-size: calc(1.375rem * var(--scale)); line-height: 1.25; overflow-wrap: anywhere; }
.tile .m { font-size: var(--t-s); color: var(--muted); }
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-bottom: 1px solid var(--line); }
@media (min-width: 560px) { .tabs { display: flex; gap: var(--s1); } }
.tabs button { min-height: 48px; padding: 0 var(--s3); border: 0; background: none; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: -1px; }
.tabs button .icon { width: 18px; height: 18px; }
@media (max-width: 559px) { .tabs button { padding: 0 2px; font-size: var(--t-s); } .tabs button .icon { display: none; } }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }

/* ---- Profiles ------------------------------------------------------------------------- */
.center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s6); padding: var(--s6) var(--gutter); text-align: center; }
.center h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); line-height: 1.15; }
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 160px)); justify-content: center; gap: var(--s5) var(--s4); width: 100%; max-width: 760px; }
.person { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: var(--s2); color: var(--ink); border-radius: var(--r-l); min-width: 0; transition: transform var(--d2) var(--ease); }
@media (hover: hover) { .person:hover { transform: translateY(-2px); } }
.person .n { font-size: calc(1.125rem * var(--scale)); font-weight: 700; margin-top: var(--s1); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .lv { font-size: var(--t-s); color: var(--muted); min-height: 1.5em; }
.person .add { width: 104px; height: 104px; border-radius: 50%; border: 2px dashed var(--muted); display: flex; align-items: center; justify-content: center; color: var(--muted); }
@media (max-width: 559px) { .person .add { width: 84px; height: 84px; } }

/* Setup */
.steps-head { display: flex; align-items: center; gap: var(--s3); color: var(--muted); font-size: var(--t-s); }
.stepdots { display: inline-flex; gap: 6px; }
.stepdots i { width: 24px; height: 4px; border-radius: 2px; background: var(--line); }
.stepdots i.on { background: var(--ink); }
.choices { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.choice { text-align: left; border-radius: var(--r-m); border: 1.5px solid var(--line); background: var(--card); padding: var(--s4); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s1) var(--s3); align-items: start; color: var(--ink); min-height: var(--tap); transition: border-color var(--d2) var(--ease), background-color var(--d2) var(--ease); }
.choice > .badge { grid-row: span 3; }
.choice .ttl { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); font-weight: 700; font-size: calc(1.125rem * var(--scale)); line-height: 1.3; min-height: 40px; }
.choice .sub { color: var(--muted); grid-column: 2; }
.choice .s { grid-column: 2; font-family: var(--serif); font-size: calc(1.125rem * var(--scale)); }
.choice[aria-pressed="true"] { border-color: var(--link); box-shadow: inset 0 0 0 1px var(--link); background: var(--good-bg); }
.choices.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.choices.compact .choice { padding: var(--s3); grid-template-columns: minmax(0, 1fr); gap: 2px; }
.choices.compact .ttl { min-height: 0; font-size: var(--t-m); }
.choices.compact .sub { grid-column: 1; font-size: var(--t-s); }
@media (min-width: 640px) { .choices.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.suggest { font-size: var(--t-xs); font-weight: 700; color: var(--good); background: var(--good-bg); border-radius: var(--r-pill); padding: 2px var(--s2); white-space: nowrap; line-height: 1.5; }
.choice[aria-pressed="true"] .suggest { background: var(--card); }

/* ---- Sheets ----------------------------------------------------------------------------- */
.scrim { position: fixed; inset: 0; background: rgba(10, 14, 20, .32); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); z-index: 20; animation: fade var(--d2) var(--ease) both; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; z-index: 21; background: var(--card); color: var(--ink); box-shadow: 0 -1px 0 var(--line), 0 -18px 50px -20px rgba(10, 14, 20, .3); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: var(--s5); }
@media (min-width: 720px) { .sheet { top: 0; right: 0; bottom: 0; width: min(520px, 100%); padding: var(--s6) var(--s6) var(--s7); animation: slideIn var(--d3) var(--ease) both; } }
@media (max-width: 719px) { .sheet { left: 0; right: 0; bottom: 0; max-height: 88dvh; border-radius: 24px 24px 0 0; padding: var(--s3) var(--gutter) calc(var(--s6) + var(--safe-bottom)); animation: slideUp var(--d3) var(--ease) both; } .sheet::before { content: ""; width: 40px; height: 5px; border-radius: 3px; background: var(--line); align-self: center; flex-shrink: 0; } }
@keyframes slideIn { from { transform: translateX(24px); opacity: 0; } }
@keyframes slideUp { from { transform: translateY(100%); } }
.sheet.dragging { transition: none; } .sheet.release { transition: transform var(--d2) var(--ease); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); }
.sheet h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: calc(clamp(28px, 7vw, 36px) * var(--scale)); line-height: 1.15; padding-top: 4px; overflow-wrap: anywhere; }
.sheet h3, .label { margin: 0 0 var(--s2); font-size: var(--t-s); color: var(--muted); font-weight: 700; }
.sheet .say { margin-top: 0; }

/* ---- Settings ------------------------------------------------------------------------------ */
.who-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s3) var(--s4); }
.who-card .grow { display: flex; flex-direction: column; gap: var(--s1); }
@media (max-width: 559px) { .who-card { grid-template-columns: auto minmax(0, 1fr); } .who-card > .btn { grid-column: 1 / -1; justify-self: start; } }
.who-card .page-title { font-size: calc(1.75rem * var(--scale)); overflow-wrap: anywhere; }
.theme-grid { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 128px), 1fr)); }
.theme { border-radius: var(--r-m); border: 1px solid var(--line); padding: 0; overflow: hidden; background: var(--card); text-align: left; color: var(--ink); min-width: 0; transition: box-shadow var(--d2) var(--ease); }
.theme[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink); border-color: var(--ink); }
.theme .sw { height: 76px; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 20px; background-repeat: no-repeat; background-position: center bottom; background-size: cover; }
.theme .nm { display: flex; align-items: center; justify-content: space-between; padding: var(--s2) var(--s3); font-size: var(--t-s); min-height: 40px; }
.theme .nm .icon { width: 18px; height: 18px; }
.shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s2) var(--s5); margin: 0; }
.shortcuts > div { display: flex; align-items: center; gap: var(--s3); }
.shortcuts dt { display: flex; gap: var(--s1); min-width: 56px; }
.shortcuts dd { margin: 0; }
.range-row { display: flex; align-items: center; gap: var(--s3); }
.range-row .icon { color: var(--muted); }

/* ---- Install, codes ----------------------------------------------------------------------- */
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--s2); }
.steps li { display: flex; align-items: center; gap: var(--s4); background: var(--card); border-radius: var(--r-m); padding: var(--s3) var(--s4); min-height: 64px; }
.steps .ic { width: 40px; height: 40px; border-radius: var(--r-s); background: var(--soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--link); }
.steps .ic .icon { width: 20px; height: 20px; }
.scan-box { position: relative; width: 100%; max-width: 360px; aspect-ratio: 1; margin: 0 auto; border-radius: var(--r-l); overflow: hidden; background: #0E141B; }
.scan-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 16%; border: 3px solid rgba(255, 255, 255, .92); border-radius: var(--r-m); box-shadow: 0 0 0 999px rgba(0, 0, 0, .28); }
.qr { width: 168px; height: 168px; background: #fff; border-radius: var(--r-m); padding: var(--s2); flex-shrink: 0; }
.qr svg { width: 100%; height: 100%; display: block; }
.code { font-weight: 700; letter-spacing: .03em; font-size: var(--t-l); word-spacing: .2em; }
.credits { margin: 0; padding-left: var(--s5); display: flex; flex-direction: column; gap: var(--s3); max-width: var(--measure); }

.app[data-route="words"] ~ #layer .toast { top: auto; bottom: calc(176px + var(--safe-bottom)); }
/* ---- Toast ------------------------------------------------------------------------------ */
.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: var(--s2) var(--s2) var(--s2) var(--s4); border-radius: var(--r-m); display: flex; align-items: center; gap: var(--s3); z-index: 40; width: max-content; max-width: min(520px, calc(100vw - 2 * var(--gutter))); box-shadow: 0 16px 30px -12px rgba(0,0,0,.45); animation: toastIn var(--d3) var(--spring) both; min-height: 48px; }
@media (min-width: 900px) { .toast { bottom: calc(32px + var(--safe-bottom)); } }
.app[data-route="play"] ~ #layer .toast { bottom: calc(24px + var(--safe-bottom)); }
.toast:not(.undo) { padding-right: var(--s4); }
.toast span { flex: 1; min-width: 0; text-wrap: pretty; }
.toast button { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--r-s); min-height: 40px; padding: 0 var(--s4); font-weight: 700; flex-shrink: 0; white-space: nowrap; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px) scale(.96); } }

/* ---- Motion preferences and screen transitions --------------------------------------------- */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; } }
.calm *, .calm *::before, .calm *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
.topbar { view-transition-name: topbar; } .bottomnav { view-transition-name: bottomnav; }
::view-transition-old(root) { animation: vtOut var(--d2) var(--ease) both; }
::view-transition-new(root) { animation: vtIn var(--d3) var(--ease) both; }
@keyframes vtOut { to { opacity: 0; } }
@keyframes vtIn { from { opacity: 0; transform: translateY(10px); } }

/* ======================================================================================
   Lumin Vocab 2: paper and light. Cards are sheets of paper with a lip underneath; the
   word screen is a window onto a scene; motion lands softly and answers what you did.
   ====================================================================================== */

/* ---- Paper surfaces ------------------------------------------------------------- */
.panel, .tile, .steps li { box-shadow: var(--shadow); }
.panel { border-radius: var(--r-l); }
.choice { border: 0; box-shadow: var(--shadow); transition: transform var(--d1) var(--ease), box-shadow var(--d1) var(--ease); }
.choice:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--lip); }
.choice[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--link), 0 3px 0 var(--lip); background: var(--good-bg); }
.chip { border: 0; box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 2px 0 var(--lip); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
input[type="text"], input[type="search"], input[type="password"], input[type="number"], select, textarea { border: 0; box-shadow: inset 0 0 0 1.5px var(--line), inset 0 2px 0 rgba(0,0,0,.04); background: var(--card); border-radius: var(--r-m); }
.sheet { background: var(--bg); }
.person .add { border-color: var(--lip); }
.art { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--r-m); background: var(--tile); }
.h-serif { font-family: var(--serif); font-weight: 400; }
.eyebrow { font-size: var(--t-s); color: var(--muted); font-weight: 700; }

/* Glass, for anything sitting on a scene */
.glass { background: var(--glass); color: #fff; border: 0; box-shadow: inset 0 0 0 1px var(--glass-line); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); }

/* ---- Words: the immersive feed ---------------------------------------------------- */
.app[data-route="words"] main { padding: 0 !important; }
.words { position: fixed; inset: 0; overflow: hidden; background: #0E1217; touch-action: none; user-select: none; -webkit-user-select: none; }
.wslide { position: absolute; inset: 0; will-change: transform, opacity; }
.wbg { position: absolute; inset: -2%; width: 104%; height: 104%; object-fit: cover; object-position: var(--fx, 50%) 50%; filter: saturate(1.05) brightness(.9); animation: drift 28s ease-in-out infinite alternate; }
@media (max-aspect-ratio: 4/5) { .wbg { filter: saturate(1.05) brightness(.86); } }
@keyframes drift { from { transform: scale(1) translate3d(0, 0, 0); } to { transform: scale(1.05) translate3d(-1%, -.6%, 0); } }
.wshade { position: absolute; inset: 0; background: radial-gradient(120% 70% at 50% 46%, rgba(6,9,13,.28), rgba(6,9,13,.62) 100%), linear-gradient(to bottom, rgba(6,9,13,.45), rgba(6,9,13,0) 22%, rgba(6,9,13,0) 62%, rgba(6,9,13,.6)); }
.wbody { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff; padding: calc(84px + var(--safe-top)) var(--gutter) calc(190px + var(--safe-bottom)); gap: var(--s4); }
.wpos { font-family: var(--serif); font-style: italic; font-size: var(--t-m); color: rgba(255,255,255,.82); }
.wword { font-family: var(--serif); font-weight: 400; font-size: calc(var(--wf, clamp(52px, 14vw, 104px)) * var(--scale)); line-height: 1.08; margin: 0; letter-spacing: -.01em; white-space: nowrap; max-width: 100%; text-shadow: 0 2px 30px rgba(0,0,0,.35); }
.wword .ch { display: inline-block; animation: letterIn .6s var(--ease) both; animation-delay: calc(var(--i) * 34ms + 80ms); }
@keyframes letterIn { from { opacity: 0; transform: translateY(.18em); filter: blur(6px); } }
.wipa { display: inline-flex; align-items: center; gap: var(--s2); min-height: 40px; padding: 0 var(--s3) 0 var(--s4); border-radius: var(--r-pill); font-size: var(--t-m); color: #fff; animation: riseIn .7s var(--ease) .25s both; }
.wipa .icon { width: 20px; height: 20px; }
.wipa.playing .icon { animation: pulse 1s var(--ease) infinite; }
@keyframes pulse { 50% { transform: scale(1.18); } }
.wdef { font-size: calc(clamp(19px, 4.8vw, 24px) * var(--scale)); line-height: 1.4; max-width: 30ch; text-wrap: balance; animation: riseIn .7s var(--ease) .38s both; text-shadow: 0 1px 16px rgba(0,0,0,.35); }
.wex { font-family: var(--serif); font-style: italic; font-size: calc(clamp(16px, 4vw, 19px) * var(--scale)); color: rgba(255,255,255,.8); max-width: 36ch; text-wrap: pretty; animation: riseIn .7s var(--ease) .5s both; }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } }
.wactions { position: absolute; left: 0; right: 0; bottom: calc(102px + var(--safe-bottom)); display: flex; justify-content: center; gap: var(--s4); animation: riseIn .7s var(--ease) .6s both; }
@media (min-width: 900px) { .wactions { bottom: calc(48px + var(--safe-bottom)); } .wbody { padding-bottom: 170px; } }
.wbtn { width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; transition: transform var(--d2) var(--spring), background-color var(--d2) var(--ease); position: relative; -webkit-tap-highlight-color: transparent; }
.wbtn .icon { width: 24px; height: 24px; }
.wbtn:active { transform: scale(.9); }
.wbtn[aria-pressed="true"] .icon { fill: currentColor; }
.wbtn.fav[aria-pressed="true"] { color: #FF8FB3; }
.wbtn.save[aria-pressed="true"] { color: var(--accent); }
.wbtn.pop { animation: popIn .5s var(--spring); }
@keyframes popIn { 30% { transform: scale(1.28); } }
.burst { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 2px; background: var(--c, #FF8FB3); pointer-events: none; animation: burst .7s var(--ease) forwards; }
@keyframes burst { to { transform: rotate(var(--r)) translateY(-42px) scale(.4); opacity: 0; } }
.whud { position: absolute; left: 0; right: 0; top: calc(64px + var(--safe-top)); display: flex; justify-content: center; gap: var(--s2); padding: 0 var(--gutter); z-index: 3; }
@media (min-width: 900px) { .whud { top: calc(88px + var(--safe-top)); } }
.hudchip { min-height: 40px; padding: 0 var(--s4); border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: var(--s2); color: #fff; font-weight: 700; font-size: var(--t-s); white-space: nowrap; text-decoration: none; }
.hudchip .icon { width: 18px; height: 18px; }
.hudchip .flame { color: var(--accent); fill: var(--accent); }
.wnav { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); display: none; flex-direction: column; gap: var(--s3); z-index: 3; }
@media (min-width: 900px) and (hover: hover) { .wnav { display: flex; } }
.whint { position: absolute; left: 0; right: 0; bottom: calc(170px + var(--safe-bottom)); display: flex; flex-direction: column; align-items: center; gap: 2px; color: rgba(255,255,255,.7); font-size: var(--t-xs); pointer-events: none; animation: hintBob 2.4s var(--ease) 1.4s infinite both; }
@keyframes hintBob { 0%, 100% { transform: translateY(0); opacity: .7; } 50% { transform: translateY(-6px); opacity: 1; } }
@media (min-width: 900px) { .whint { display: none; } }
.wdone { max-width: 32ch; display: flex; flex-direction: column; align-items: center; gap: var(--s4); }
.wdone h2 { font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); margin: 0; }

/* ---- Word detail sheet ---------------------------------------------------------- */
.dhead { display: flex; flex-direction: column; gap: var(--s2); }
.dipa { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-m); color: var(--muted); background: var(--card); border: 0; border-radius: var(--r-pill); padding: 6px var(--s3); box-shadow: 0 2px 0 var(--lip); align-self: flex-start; }
.dipa .icon { width: 18px; height: 18px; color: var(--link); }
.dsec { display: flex; flex-direction: column; gap: var(--s2); }
.dsec .ex { font-family: var(--serif); font-style: italic; font-size: calc(1.125rem * var(--scale)); }
.wordchips { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* ---- Page headers ------------------------------------------------------------- */
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.phead h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); line-height: 1.1; }
.phead p { color: var(--muted); margin-top: var(--s1); }

/* ---- Journey -------------------------------------------------------------------- */
.journey { width: 100%; max-width: calc(560px + 2 * var(--gutter)); margin: 0 auto; padding: var(--s4) var(--gutter) var(--s7); display: flex; flex-direction: column; gap: var(--s5); }
.jtop { display: flex; flex-direction: column; gap: var(--s3); align-items: center; text-align: center; }
.jtop .eyebrow { margin-bottom: -4px; }
.jtop h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); line-height: 1.1; }
.jbar { width: min(320px, 100%); height: 10px; border-radius: 6px; background: var(--soft); box-shadow: inset 0 1px 2px rgba(0,0,0,.08); overflow: hidden; }
.jbar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; width: var(--p, 0%); transition: width .9s var(--spring); }
.jmap { position: relative; padding: 64px 0 var(--s6); }
.jmap svg.trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.trail path { fill: none; stroke: var(--lip); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 2 16; }
.trail path.walked { stroke: var(--accent); }
.jland { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--s2); margin: var(--s2) auto var(--s4); width: min(220px, 62%); text-align: center; z-index: 1; }
.jland img { width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--tile); box-shadow: var(--shadow-lift); }
.jland.locked img { filter: grayscale(.8) opacity(.55); }
.jland strong { font-family: var(--serif); font-weight: 400; font-size: var(--t-xl); line-height: 1.15; }
.jland .muted { font-size: var(--t-s); }
.jnode { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0 auto var(--s5); transform: translateX(var(--dx, 0)); width: 120px; background: none; border: 0; padding: 0; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.jnode .disc { width: 78px; height: 78px; border-radius: 50%; overflow: hidden; background: var(--tile); box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 6px 0 var(--lip), 0 20px 26px -18px rgba(24,33,43,.6); transition: transform var(--d2) var(--spring), box-shadow var(--d2) var(--ease); position: relative; }
.jnode .disc img { width: 100%; height: 100%; object-fit: cover; }
.jnode .nm { font-size: var(--t-s); font-weight: 700; white-space: nowrap; }
.jnode:active .disc { transform: translateY(4px); box-shadow: 0 1px 0 var(--lip); }
.jnode.done .disc::after { content: ""; position: absolute; inset: 0; background: rgba(242,181,68,.25); }
.jnode .stamp { position: absolute; right: 18px; top: 52px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 0 var(--accent-lip); z-index: 2; animation: stampIn .5s var(--spring) both; }
.jnode .stamp .icon { width: 16px; height: 16px; stroke-width: 3; }
@keyframes stampIn { from { transform: scale(0) rotate(-30deg); } }
.jnode.locked .disc { filter: grayscale(.7) opacity(.62); box-shadow: 0 4px 0 var(--lip); }
.jnode.locked .nm { color: var(--muted); font-weight: 400; }
.jnode.current .disc { width: 96px; height: 96px; box-shadow: 0 0 0 5px var(--accent), 0 1px 0 rgba(255,255,255,.7) inset, 0 8px 0 var(--lip), 0 22px 30px -16px rgba(24,33,43,.6); }
.jnode.current::before { content: ""; position: absolute; top: 0; left: 50%; width: 96px; height: 96px; margin-left: -48px; border-radius: 50%; box-shadow: 0 0 0 5px var(--accent); animation: ring 2.2s var(--ease) infinite; }
@keyframes ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.35); opacity: 0; } }
.jstart { position: absolute; top: -46px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-weight: 700; font-size: var(--t-s); padding: 6px var(--s3); border-radius: var(--r-s); white-space: nowrap; animation: bob 2.4s var(--ease) infinite; }
.jstart::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--ink); }
@keyframes bob { 50% { transform: translate(-50%, -4px); } }
.jahead { text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: var(--s2); align-items: center; }
.jpast { display: flex; gap: var(--s3); overflow-x: auto; padding: var(--s1) var(--s1) var(--s3); scrollbar-width: none; }
.jpast::-webkit-scrollbar { display: none; }
.jpast button { flex: 0 0 auto; width: 88px; display: flex; flex-direction: column; gap: 6px; align-items: center; background: none; border: 0; color: var(--ink); font-size: var(--t-xs); padding: 0; }
.jpast img { width: 72px; height: 72px; border-radius: 50%; background: var(--tile); box-shadow: 0 3px 0 var(--lip); }
.jwords { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: center; }
.jwords span { font-family: var(--serif); background: var(--card); border-radius: var(--r-pill); padding: 4px var(--s3); box-shadow: 0 2px 0 var(--lip); }

/* ---- Practice ------------------------------------------------------------------- */
.hub { width: 100%; max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; padding: var(--s4) var(--gutter) var(--s7); display: flex; flex-direction: column; gap: var(--s6); }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) 132px; align-items: center; gap: var(--s4); background: var(--card); border-radius: var(--r-l); padding: var(--s5); box-shadow: var(--shadow-lift); overflow: hidden; position: relative; }
.feature h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: calc(clamp(26px, 6vw, 34px) * var(--scale)); line-height: 1.1; }
.feature p { color: var(--muted); }
.feature .art { border-radius: 50%; }
.feature .stack { --gap: var(--s3); }
@media (max-width: 459px) { .feature { grid-template-columns: minmax(0, 1fr) 96px; padding: var(--s5) var(--s4); } }
.cards { display: grid; gap: var(--s4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gcard { display: flex; flex-direction: column; gap: var(--s3); background: var(--card); border: 0; border-radius: var(--r-l); padding: var(--s3) var(--s3) var(--s4); text-align: left; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform var(--d2) var(--spring), box-shadow var(--d2) var(--ease); min-width: 0; -webkit-tap-highlight-color: transparent; }
.gcard .art { border-radius: calc(var(--r-l) - 6px); }
.gcard strong { font-size: calc(1.0625rem * var(--scale)); line-height: 1.25; padding: 0 var(--s1); }
.gcard small { color: var(--muted); font-size: var(--t-s); padding: 0 var(--s1); margin-top: -8px; }
@media (hover: hover) { .gcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); } }
.gcard:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--lip); }
.sec { display: flex; flex-direction: column; gap: var(--s4); }
.sec > h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-xl); }
.sec > p { color: var(--muted); margin-top: calc(-1 * var(--s3)); }

/* ---- Play: one screen for every game ------------------------------------------------ */
.play { position: relative; min-height: 100dvh; width: 100%; max-width: calc(620px + 2 * var(--gutter)); margin: 0 auto; padding: calc(var(--s3) + var(--safe-top)) var(--gutter) calc(var(--s5) + var(--safe-bottom)); display: flex; flex-direction: column; gap: var(--s5); }
.phud { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s3); }
.pbar { height: 14px; border-radius: 8px; background: var(--soft); box-shadow: inset 0 2px 3px rgba(0,0,0,.08); overflow: hidden; }
.pbar i { display: block; height: 100%; width: var(--p, 0%); background: var(--accent); border-radius: inherit; box-shadow: inset 0 -3px 0 rgba(0,0,0,.1), inset 0 3px 0 rgba(255,255,255,.35); transition: width .6s var(--spring); }
.pstat { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; min-width: 44px; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.pstat .icon { width: 20px; height: 20px; }
.pstat .lost { opacity: .25; }
.pstat.low { color: var(--bad); }
.qcard { display: flex; flex-direction: column; gap: var(--s4); align-items: center; text-align: center; animation: qIn .5s var(--ease) both; }
@keyframes qIn { from { opacity: 0; transform: translateX(24px); } }
.qkind { font-size: var(--t-s); font-weight: 700; color: var(--muted); background: var(--card); border-radius: var(--r-pill); padding: 4px var(--s3); box-shadow: 0 2px 0 var(--lip); }
.qprompt { width: 100%; background: var(--card); border-radius: var(--r-l); box-shadow: var(--shadow-lift); padding: var(--s6) var(--s5); min-height: 168px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s3); }
.qprompt .qw { font-family: var(--serif); font-size: calc(clamp(36px, 10vw, 54px) * var(--scale)); line-height: 1.1; white-space: nowrap; max-width: 100%; }
.qprompt .qd { font-size: calc(clamp(19px, 4.6vw, 22px) * var(--scale)); line-height: 1.4; max-width: 34ch; text-wrap: balance; }
.qprompt .qs { font-family: var(--serif); font-size: calc(clamp(20px, 5vw, 24px) * var(--scale)); line-height: 1.45; max-width: 32ch; text-wrap: balance; }
.qprompt .gap { display: inline-block; min-width: 4.5em; border-bottom: 3px solid var(--accent); margin: 0 2px; transform: translateY(-3px); }
.qprompt .ipa { color: var(--muted); }
.opts { width: 100%; display: flex; flex-direction: column; gap: var(--s3); }
.opt { width: 100%; min-height: 60px; padding: var(--s3) var(--s5); border: 0; border-radius: var(--r-m); background: var(--card); color: var(--ink); font-size: calc(1.0625rem * var(--scale)); line-height: 1.35; text-align: center; box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 4px 0 var(--lip); margin-bottom: 4px; transition: transform var(--d1) var(--ease), box-shadow var(--d1) var(--ease), background-color var(--d2) var(--ease), opacity var(--d2) var(--ease); animation: qIn .5s var(--ease) both; animation-delay: calc(var(--i) * 60ms + 120ms); -webkit-tap-highlight-color: transparent; }
.opt.word { font-family: var(--serif); font-size: calc(1.3125rem * var(--scale)); }
.opt:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--lip); }
.opt.right { background: var(--good-bg); color: var(--good); box-shadow: inset 0 0 0 2px var(--good), 0 4px 0 var(--good-lip); animation: rightPop .45s var(--spring); }
.opt.wrong { background: var(--bad-bg); color: var(--bad); box-shadow: 0 4px 0 var(--bad-lip); animation: shake .42s var(--ease); }
.opts.answered .opt:not(.right):not(.wrong) { opacity: .45; }
@keyframes rightPop { 40% { transform: scale(1.03); } }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.pfoot { position: relative; margin-top: auto; display: flex; flex-direction: column; gap: var(--s3); padding-top: var(--s3); }
.verdict { display: flex; align-items: center; gap: var(--s3); border-radius: var(--r-l); padding: var(--s4); animation: slideUpIn .4s var(--spring) both; }
.verdict.good { background: var(--good-bg); color: var(--good); }
.verdict.bad { background: var(--bad-bg); color: var(--bad); }
.verdict .icon { width: 28px; height: 28px; flex-shrink: 0; }
.verdict strong { display: block; font-size: var(--t-l); }
.verdict span { color: var(--ink); }
@keyframes slideUpIn { from { transform: translateY(30px); opacity: 0; } }
/* Spelling and unscramble */
.slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.slot, .ltile { width: min(48px, calc((min(100vw, 620px) - 2 * var(--gutter) - (var(--n, 8) - 1) * 6px) / var(--n, 8))); height: clamp(44px, 11vw, 56px); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: calc(clamp(22px, 6vw, 28px) * var(--scale)); text-transform: lowercase; }
.slot { background: var(--soft); box-shadow: inset 0 2px 0 rgba(0,0,0,.06); color: var(--ink); transition: background-color var(--d2) var(--ease); }
.slot.filled { background: var(--card); box-shadow: 0 2px 0 var(--lip); animation: rightPop .3s var(--spring); }
.slot.hint { color: var(--muted); }
.slots.right .slot { background: var(--good-bg); color: var(--good); }
.slots.wrong { animation: shake .42s var(--ease); }
.ltile { border: 0; background: var(--card); color: var(--ink); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 4px 0 var(--lip); margin-bottom: 4px; transition: transform var(--d1) var(--ease), opacity var(--d2) var(--ease); }
.ltile:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--lip); }
.ltile.used { opacity: 0; pointer-events: none; transform: scale(.6); }
.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 520px; }
.spellin { width: 100%; max-width: 360px; text-align: center; font-family: var(--serif); font-size: calc(1.625rem * var(--scale)) !important; min-height: 60px; letter-spacing: .04em; }
/* Flash card */
.flash { width: 100%; perspective: 1200px; }
.flash .inner { position: relative; min-height: 300px; transition: transform .7s var(--spring); transform-style: preserve-3d; }
.flash.flipped .inner { transform: rotateY(180deg); }
.flash .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--card); border-radius: var(--r-l); box-shadow: var(--shadow-lift); padding: var(--s6) var(--s5); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s3); text-align: center; }
.flash .back { transform: rotateY(180deg); }
.flash .qw { font-family: var(--serif); font-size: calc(clamp(40px, 11vw, 60px) * var(--scale)); line-height: 1.1; white-space: nowrap; max-width: 100%; }
.flash .qd { font-size: calc(clamp(19px, 4.6vw, 22px) * var(--scale)); line-height: 1.4; max-width: 30ch; text-wrap: balance; }
.flash .dipa { align-self: center; }
.flash .face .tap { position: absolute; bottom: var(--s4); color: var(--muted); font-size: var(--t-s); }
/* End of a session */
.endcard { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s4); padding-top: var(--s6); animation: qIn .6s var(--ease) both; }
.endcard .art { width: 160px; border-radius: 50%; box-shadow: var(--shadow-lift); }
.endcard h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); }
.score { display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap; }
.score div { background: var(--card); border-radius: var(--r-m); box-shadow: var(--shadow); padding: var(--s3) var(--s5); display: flex; flex-direction: column; min-width: 104px; }
.score b { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; }
.score span { color: var(--muted); font-size: var(--t-s); }
.reviewlist { width: 100%; display: flex; flex-direction: column; gap: var(--s2); text-align: left; }
.reviewlist .row-item { background: var(--card); border-radius: var(--r-m); padding: var(--s3) var(--s4); border: 0; box-shadow: 0 2px 0 var(--lip); min-height: 0; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 30; }

/* ---- Library and word lists -------------------------------------------------- */
.lib { display: grid; gap: var(--s4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .lib { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* five shelves on a two-column phone: the last one lies flat across the row */
@media (max-width: 719px) { .lib > .gcard:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; align-items: center; } .lib > .gcard:last-child:nth-child(odd) .art { width: 96px; flex: none; } .lib > .gcard:last-child:nth-child(odd) small { margin-top: 0; } }
.wlist { display: flex; flex-direction: column; gap: var(--s3); }
.wcard { background: var(--card); border-radius: var(--r-l); box-shadow: var(--shadow); padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.wcard .top { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.wcard .w { font-family: var(--serif); font-size: calc(1.5rem * var(--scale)); line-height: 1.2; background: none; border: 0; padding: 0; color: var(--ink); text-align: left; overflow-wrap: anywhere; }
.wcard .dipa { padding: 2px var(--s3); font-size: var(--t-s); }
.wcard .d { line-height: 1.45; }
.wcard .e { font-family: var(--serif); font-style: italic; color: var(--muted); }
.wcard .bot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); color: var(--muted); font-size: var(--t-s); }
.wcard .acts { display: flex; gap: var(--s1); }
.wcard .acts .iconbtn { width: 42px; height: 42px; box-shadow: none; background: none; }
.wcard .acts .iconbtn[aria-pressed="true"] { background: none; color: var(--berry); }
.wcard .acts .iconbtn.save[aria-pressed="true"] { color: var(--accent-lip); }
.listhero { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s4); align-items: center; }
.listhero .art { border-radius: 50%; box-shadow: var(--shadow); }
.listhero h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); line-height: 1.1; }
.back { display: inline-flex; align-items: center; gap: var(--s1); color: var(--muted); text-decoration: none; font-weight: 700; min-height: var(--tap); align-self: flex-start; }
.back .icon { width: 20px; height: 20px; }

/* ---- You ------------------------------------------------------------------- */
.youhead { display: flex; align-items: center; gap: var(--s4); }
.youhead h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); line-height: 1.1; overflow-wrap: anywhere; }
.streak { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s4); align-items: center; background: var(--card); border-radius: var(--r-l); padding: var(--s4) var(--s5); box-shadow: var(--shadow-lift); }
.streak .art { border-radius: 50%; }
.streak .n { font-family: var(--serif); font-size: 40px; line-height: 1; }
.weekdots { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: var(--s2); }
.weekdots span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: var(--t-xs); color: var(--muted); }
.weekdots i { width: 30px; height: 30px; border-radius: 50%; background: var(--soft); display: flex; align-items: center; justify-content: center; color: var(--accent-ink); }
.weekdots i .icon { width: 16px; height: 16px; stroke-width: 3; }
.weekdots .on i { background: var(--accent); box-shadow: 0 2px 0 var(--accent-lip); }
.weekdots .today { color: var(--ink); font-weight: 700; }
@media (max-width: 379px) { .weekdots i { width: 26px; height: 26px; } }
.stats { display: grid; gap: var(--s3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--card); border-radius: var(--r-m); box-shadow: var(--shadow); padding: var(--s3) var(--s4); display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.stat b { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; }
.stat span { color: var(--muted); font-size: var(--t-s); }
.menu { background: var(--card); border-radius: var(--r-l); box-shadow: var(--shadow); padding: var(--s1) var(--s4); display: flex; flex-direction: column; }
.menu a, .menu button { display: flex; align-items: center; gap: var(--s3); min-height: 60px; text-decoration: none; color: var(--ink); background: none; border: 0; border-bottom: 1px solid var(--line); padding: 0; text-align: left; font-weight: 700; }
.menu > :last-child { border-bottom: 0; }
.menu .icon { color: var(--muted); }
.menu .chev { margin-left: auto; color: var(--muted); }
.menu small { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-s); }

/* Scene picker */
.scenes { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); }
.scene { position: relative; border: 0; padding: 0; border-radius: var(--r-m); overflow: hidden; aspect-ratio: 4 / 3; background: #222; box-shadow: 0 3px 0 var(--lip); color: #fff; }
.scene img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene span { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--s4) var(--s3) var(--s2); background: linear-gradient(transparent, rgba(0,0,0,.6)); font-weight: 700; font-size: var(--t-s); text-align: left; }
.scene[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent), 0 3px 0 var(--lip); }
.scene.auto { background: var(--card); color: var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 700; flex-direction: column; gap: 4px; }

/* ---- Welcome -------------------------------------------------------------------- */
.app[data-route="welcome"] .topbar { position: absolute; left: 0; right: 0; top: 0; max-width: none; padding-top: calc(var(--s3) + var(--safe-top)); }
.app[data-route="welcome"] .brand { color: #fff; }
.whero { position: relative; min-height: min(100dvh, 920px); display: flex; align-items: center; justify-content: center; overflow: hidden; color: #fff; text-align: center; }
.whero .wbg { animation-duration: 40s; }
.whero .inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: var(--s4); padding: calc(96px + var(--safe-top)) var(--gutter) var(--s7); max-width: 760px; }
.whero h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: calc(clamp(34px, 6.4vw, 64px) * var(--scale)); line-height: 1.08; text-wrap: balance; text-shadow: 0 2px 30px rgba(0,0,0,.4); }
.whero .lead { color: rgba(255,255,255,.86); text-align: center; }
.wsample { display: flex; flex-direction: column; align-items: center; gap: var(--s2); margin: var(--s4) 0 var(--s2); min-height: 256px; justify-content: center; }
.wsample .wword { font-size: calc(clamp(46px, 11vw, 88px) * var(--scale)); }
.wsample .wdef { font-size: calc(clamp(17px, 4vw, 21px) * var(--scale)); }
.wsample.out { opacity: 0; transform: translateY(-8px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.wcta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s3) var(--s4); align-items: center; }
.wcta .textlink { color: #fff; font-weight: 700; }
.wfree { display: inline-flex; gap: var(--s2); align-items: center; color: rgba(255,255,255,.85); font-size: var(--t-s); }
.wfree .icon { width: 18px; height: 18px; color: var(--accent); }
.wsec { width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: var(--s8) var(--gutter); display: flex; flex-direction: column; gap: var(--s6); }
.wsec > h2 { margin: 0; text-align: center; font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); }
.wfeat { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.wfeat article { display: flex; flex-direction: column; gap: var(--s3); text-align: center; align-items: center; }
.wfeat .art { width: 150px; border-radius: 50%; box-shadow: var(--shadow-lift); }
.wfeat h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-xl); }
.wfeat p { color: var(--muted); max-width: 30ch; }
@media (min-width: 1100px) { .wfeat { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Nineteen ways to play: the game names as a loose, wrapping shelf of pills */
.wgamelist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2) var(--s2); max-width: 760px; }
.wgamelist li { padding: 10px 18px; border-radius: var(--r-pill); background: var(--card); box-shadow: inset 0 0 0 1px var(--line), 0 2px 0 var(--lip); font-weight: 700; font-size: var(--t-s); }
.wgamelist li:nth-child(3n+1) { background: var(--soft); }
/* the landing page's little road answers taps like the real one */
.wmap .dc.wdc { pointer-events: auto; }
.wclose { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s4); padding-bottom: var(--s5); }
.wclose h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); }
.wpromises { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s3) var(--s5); }
.wpromises li { display: inline-flex; gap: var(--s2); align-items: center; font-weight: 700; white-space: nowrap; }
.wpromises .icon { color: var(--good); }

/* ======================================================================================
   Motion. Everything you touch answers you; screens arrive in a short stagger; nothing loops
   loudly. All of it stops for reduced motion and the calmer motion setting.
   ====================================================================================== */
.rise { animation: riseIn .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms + 30ms); }
/* The gliding highlight in both navigation bars */
.topnav { position: relative; }
.navind { position: absolute; left: 0; top: 4px; bottom: 4px; border-radius: var(--r-pill); background: var(--accent); transition: transform .5s var(--spring), width .5s var(--spring), opacity var(--d2); z-index: 0; pointer-events: none; }
.bottomnav .navind { top: 6px; bottom: 6px; border-radius: 24px; background: var(--soft); }
.app[data-route="words"] .bottomnav .navind { background: rgba(255,255,255,.16); }
.topnav a, .bottomnav a { position: relative; z-index: 1; }
.topnav a[aria-current="page"], .bottomnav a[aria-current="page"], .app[data-route="words"] .bottomnav a[aria-current="page"] { background: transparent; }
.bottomnav a:active .icon, .topnav a:active { transform: scale(.9); }
/* Selecting something gives a small, springy acknowledgment */
.chip[aria-pressed="true"], .choice[aria-pressed="true"], .scene[aria-pressed="true"], .swatch[aria-pressed="true"], .gcard[aria-pressed="true"] { animation: selPop .42s var(--spring); }
@keyframes selPop { 35% { transform: scale(1.05); } }
.chip, .swatch, .scene { transition: transform var(--d1) var(--ease), box-shadow var(--d1) var(--ease), background-color var(--d2) var(--ease); }
.chip:active, .swatch:active, .scene:active { transform: scale(.95); }
.switch input[type="checkbox"]::after { transition: transform .38s var(--spring); }
.switch input[type="checkbox"]:active::after { width: 32px; }
.switch input[type="checkbox"]:checked:active::after { transform: translateX(14px); }
.iconbtn, .wbtn { transition: transform var(--d2) var(--spring), background-color var(--d2) var(--ease), color var(--d2) var(--ease); }
.iconbtn:active { transform: scale(.88); }
.menu a, .menu button { transition: background-color var(--d2) var(--ease), padding var(--d2) var(--ease); border-radius: var(--r-s); }
.menu a:active, .menu button:active { background: var(--soft); }
@media (hover: hover) {
  .menu a:hover .chev, .menu button:hover .chev { transform: translateX(4px); }
  .wcard:hover, .stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
  .chip:hover { transform: translateY(-1px); }
  .scene:hover img { transform: scale(1.05); }
}
.menu .chev { transition: transform var(--d2) var(--spring); }
.wcard, .stat { transition: transform var(--d2) var(--spring), box-shadow var(--d2) var(--ease); }
.stat:active, .wcard:active { transform: scale(.98); }
.scene img { transition: transform .6s var(--ease); }
.sheet { animation-timing-function: var(--spring) !important; }
.scrim { animation-duration: var(--d3); }
.dipa.playing .icon, .wipa.playing .icon { animation: pulse 1s var(--ease) infinite; }
/* Gentle life in a few illustrations, so pages don't feel static */
.feature .art, .camp .art, .endcard .art { animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px) rotate(-1deg); } }
.btn.primary .icon { transition: transform var(--d2) var(--spring); }
.btn.primary:hover .icon { transform: translateX(2px); }

/* ---- Journey: regions, camp and the travel log ----------------------------------- */
.jregion { position: relative; height: 132px; border-radius: var(--r-l); overflow: hidden; box-shadow: var(--shadow-lift); color: #fff; }
.jregion img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: drift 30s ease-in-out infinite alternate; }
.jregion::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,10,14,.62), rgba(8,10,14,.12)); }
.jregion-text { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 var(--s5); }
.jregion-text > span:first-child { font-size: var(--t-s); color: rgba(255,255,255,.82); font-weight: 700; }
.jregion-text strong { font-family: var(--serif); font-weight: 400; font-size: calc(clamp(24px, 6vw, 30px) * var(--scale)); line-height: 1.15; }
.jregion-steps { display: flex; gap: 5px; margin-top: var(--s2); }
.jregion-steps i { width: 18px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.3); }
.jregion-steps i.on { background: var(--accent); }
.jregion-steps i.here { background: #fff; animation: pulse 2s var(--ease) infinite; }
.jline { font-family: var(--serif); font-style: italic; color: var(--muted); max-width: 36ch; text-wrap: balance; }
.jwords span { animation: popIn2 .45s var(--spring) both; animation-delay: calc(var(--i, 0) * 50ms + 250ms); }
@keyframes popIn2 { from { opacity: 0; transform: scale(.7); } }
.jnode { animation: nodeIn .55s var(--spring) both; animation-delay: calc(var(--i, 0) * 80ms + 250ms); }
@keyframes nodeIn { from { opacity: 0; transform: translateX(var(--dx, 0)) translateY(18px) scale(.8); } }
.jnode.nudge .disc { animation: shake .4s var(--ease); }
.trail path { transition: opacity .6s var(--ease); }
.trail path.walked { animation: march 1.8s linear infinite; }
@keyframes march { to { stroke-dashoffset: -36; } }
.camp { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s3); background: var(--card); border-radius: var(--r-l); box-shadow: var(--shadow-lift); padding: var(--s6) var(--s5); }
.camp .art { width: 120px; border-radius: 50%; }
.camp h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-xl); }
.camp p { max-width: 34ch; }
.tlog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.tlog li { display: flex; align-items: center; gap: var(--s3); background: var(--card); border-radius: var(--r-m); padding: var(--s2) var(--s2) var(--s2) var(--s3); box-shadow: 0 2px 0 var(--lip); }
.tlog img { width: 52px; height: 52px; border-radius: 50%; background: var(--tile); flex-shrink: 0; }
.tlog .grow { display: flex; flex-direction: column; min-width: 0; }
.tstars { display: inline-flex; gap: 1px; color: var(--lip); }
.tstars .on { color: var(--accent); fill: var(--accent); }
.tlog .iconbtn { width: 40px; height: 40px; box-shadow: none; background: none; }

/* ---- Setup and settings: paper art in choices and chips ---------------------------- */
.choice > .art-badge { grid-row: span 3; width: 64px; height: 64px; border-radius: 50%; background: var(--tile); box-shadow: 0 2px 0 var(--lip); transition: transform var(--d2) var(--spring); }
.choice[aria-pressed="true"] > .art-badge { transform: scale(1.06) rotate(-3deg); }
.chip .thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--tile); margin-left: -8px; }
.sec-title { font-family: var(--serif); font-weight: 400; }
.page > .back, .hub > .back { margin-bottom: calc(-1 * var(--s4)); }

/* Words: drifting motes of light, and the streak flame's little hop */
.motes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.motes i { position: absolute; left: var(--x); bottom: -10px; width: var(--s); height: var(--s); border-radius: 50%; background: rgba(255, 236, 196, .85); box-shadow: 0 0 8px rgba(255, 220, 150, .8); animation: mote var(--d) linear var(--delay) infinite; opacity: 0; }
@keyframes mote { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: .55; } 60% { opacity: .35; } 100% { transform: translate(40px, -80vh); opacity: 0; } }
.hudchip.bump .icon { animation: hop .8s var(--spring) 2; }
@keyframes hop { 40% { transform: translateY(-5px) scale(1.25) rotate(-8deg); } }
.hero-art { width: 120px; border-radius: 50%; box-shadow: var(--shadow-lift); align-self: flex-start; }

/* ======================================================================================
   Version 3: layers of light, the difficulty slider, the Lantern Road and side trails.
   ====================================================================================== */
/* Soft light drifting behind every page, with a whisper of paper grain. Hidden behind full-screen scenes. */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient i { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; opacity: .55; will-change: transform; }
.ambient i:nth-child(1) { left: -25vmax; top: -30vmax; background: radial-gradient(circle, rgba(242,181,68,.38), rgba(242,181,68,0) 62%); animation: amb1 38s ease-in-out infinite alternate; }
.ambient i:nth-child(2) { right: -30vmax; top: 10vh; background: radial-gradient(circle, rgba(31,111,120,.26), rgba(31,111,120,0) 62%); animation: amb2 46s ease-in-out infinite alternate; }
.ambient i:nth-child(3) { left: 10vw; bottom: -40vmax; background: radial-gradient(circle, rgba(180,82,122,.2), rgba(180,82,122,0) 62%); animation: amb3 52s ease-in-out infinite alternate; }
.ambient .grain { position: absolute; inset: 0; background: url("/art/grain.png") repeat; background-size: 72px; opacity: .45; }
[data-theme="dark"] .ambient i { opacity: .38; }
[data-theme="dark"] .ambient .grain { opacity: .5; filter: invert(1); }
@keyframes amb1 { to { transform: translate(12vw, 10vh) scale(1.1); } }
@keyframes amb2 { to { transform: translate(-10vw, 14vh) scale(.92); } }
@keyframes amb3 { to { transform: translate(8vw, -12vh) scale(1.08); } }
body:has(#app[data-route="words"]) .ambient, body:has(#app[data-route="welcome"]) .ambient { display: none; }
#app { position: relative; z-index: 1; }
.calm .ambient i { animation: none; }

/* Cards catch the light as you pass over them */
.gcard, .tcard, .feature { position: relative; overflow: hidden; }
.gcard::after, .tcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.38) 50%, transparent 65%); transform: translateX(-120%); transition: transform .9s var(--ease); pointer-events: none; }
@media (hover: hover) { .gcard:hover::after, .tcard:hover::after { transform: translateX(120%); } }
[data-theme="dark"] .gcard::after, [data-theme="dark"] .tcard::after { background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.08) 50%, transparent 65%); }

/* ---- Difficulty slider: three bands, two stops each --------------------------------- */
.lslider { --n: 6; --k0: #6F8F6C; --k1: #1F6F78; --k2: #B4527A; display: flex; flex-direction: column; gap: var(--s4); padding: var(--s5) var(--s4) var(--s4); background: var(--card); border-radius: var(--r-l); box-shadow: var(--shadow-lift); position: relative; overflow: hidden; touch-action: pan-y; }
.lslider[data-group="0"] { --kc: var(--k0); } .lslider[data-group="1"] { --kc: var(--k1); } .lslider[data-group="2"] { --kc: var(--k2); }
.lslider::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 55% 70% at calc((var(--v) + .5) / var(--n) * 100%) 42%, color-mix(in srgb, var(--kc) 20%, transparent), transparent 72%); transition: background .6s var(--ease); pointer-events: none; }
.lslider:focus-visible { outline: 2px solid var(--kc); outline-offset: 3px; }
.lbands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); position: relative; }
.lband { border: 0; background: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 0; padding: var(--s1); border-radius: var(--r-s); transition: color var(--d2) var(--ease), transform var(--d2) var(--spring); -webkit-tap-highlight-color: transparent; }
.lband strong { font-family: var(--serif); font-weight: 400; font-size: calc(1.25rem * var(--scale)); line-height: 1.2; }
.lband small { font-size: var(--t-xs); }
.lband.on { color: var(--ink); transform: translateY(-2px); }
.lband.on strong { color: var(--kc); }
.ltrack { position: relative; height: 64px; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); align-items: center; cursor: pointer; }
.lrail { position: absolute; left: calc(50% / var(--n)); right: calc(50% / var(--n)); top: 50%; height: 12px; margin-top: -6px; border-radius: 8px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; overflow: hidden; box-shadow: inset 0 2px 3px rgba(0,0,0,.12); }
.lrail i { background: color-mix(in srgb, var(--k0) 28%, var(--soft)); }
.lrail i.b1 { background: color-mix(in srgb, var(--k1) 28%, var(--soft)); }
.lrail i.b2 { background: color-mix(in srgb, var(--k2) 28%, var(--soft)); }
.lfill { position: absolute; left: calc(50% / var(--n)); top: 50%; height: 12px; margin-top: -6px; border-radius: 8px; width: calc(var(--v) / var(--n) * 100%); background: linear-gradient(90deg, var(--k0), var(--kc)); opacity: .85; transition: width .5s var(--spring); }
.lstop { position: relative; z-index: 1; border: 0; background: none; padding: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); -webkit-tap-highlight-color: transparent; }
.lstop i { width: 14px; height: 14px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 3px var(--lip); transition: box-shadow var(--d2) var(--ease), transform var(--d2) var(--spring); }
.lstop.on i { box-shadow: inset 0 0 0 7px rgba(255,255,255,.85); }
.lstop span { position: absolute; bottom: -6px; font-size: var(--t-xs); white-space: nowrap; transition: color var(--d2), opacity var(--d2); }
.lstop.cur span { color: var(--ink); font-weight: 700; }
@media (max-width: 459px) { .lstop span { opacity: 0; } .lstop.cur span { opacity: 1; } }
.lthumb { position: absolute; z-index: 2; top: 50%; left: calc((var(--v) + .5) / var(--n) * 100%); width: 40px; height: 40px; margin: -24px 0 0 -20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, color-mix(in srgb, var(--kc) 55%, #fff) 45%, var(--kc)); box-shadow: 0 0 0 4px var(--card), 0 4px 0 color-mix(in srgb, var(--kc) 60%, #000), 0 0 28px 6px color-mix(in srgb, var(--kc) 45%, transparent); transition: left .55s var(--spring), background .4s var(--ease), box-shadow .4s var(--ease); pointer-events: none; }
.lthumb i { position: absolute; inset: 9px; border-radius: 50%; background: radial-gradient(circle, rgba(255,250,230,.95), rgba(255,250,230,0) 70%); animation: glowPulse 2.6s ease-in-out infinite; }
.lslider.drag .lthumb { transition: left .18s var(--ease); }
@keyframes glowPulse { 50% { transform: scale(.7); opacity: .6; } }
.lread { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding-top: var(--s2); min-height: 120px; }
.lnamerow { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; justify-content: center; }
.lname { font-family: var(--serif); font-weight: 400; font-size: calc(clamp(28px, 7vw, 36px) * var(--scale)); line-height: 1.1; color: var(--kc); transition: color .4s var(--ease); }
.labout { color: var(--muted); max-width: 34ch; }
.lsample { font-family: var(--serif); font-style: italic; font-size: calc(1.375rem * var(--scale)); margin-top: var(--s1); }
.lsample .ch { display: inline-block; animation: letterIn .5s var(--ease) both; animation-delay: calc(var(--i) * 30ms); }
.lslider .suggest[hidden] { display: none; }

/* ---- The Lantern Road ------------------------------------------------------------- */
.jregion { height: 168px; }
.jregion .keeper { font-family: var(--serif); font-style: italic; font-size: var(--t-s); color: rgba(255,255,255,.88); max-width: 40ch; line-height: 1.35; margin-top: 2px; }
.fireflies { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fireflies i { position: absolute; left: var(--x); top: var(--y); width: 4px; height: 4px; border-radius: 50%; background: #FFE7A8; box-shadow: 0 0 10px 3px rgba(255,214,120,.75); animation: firefly var(--d) ease-in-out var(--delay) infinite; opacity: 0; }
@keyframes firefly { 0%, 100% { opacity: 0; transform: translate(0, 0); } 30% { opacity: .9; } 50% { transform: translate(14px, -10px); opacity: .5; } 70% { opacity: .95; transform: translate(-6px, -18px); } }
.lantern { display: flex; align-items: center; gap: var(--s4); background: var(--card); border-radius: var(--r-l); padding: var(--s3) var(--s5) var(--s3) var(--s4); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.lantern::before { content: ""; position: absolute; left: -40px; top: 50%; width: 220px; height: 220px; margin-top: -110px; border-radius: 50%; background: radial-gradient(circle, rgba(242,181,68, calc(var(--glow) * .5)), transparent 65%); pointer-events: none; }
.lamp { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.lamp img { position: relative; width: 100%; height: 100%; border-radius: 50%; background: var(--tile); box-shadow: 0 3px 0 var(--lip); animation: float 5s ease-in-out infinite; }
.lamp .halo { position: absolute; inset: -20px; border-radius: 50%; background: radial-gradient(circle, rgba(255,214,120, calc(var(--glow) * .75)), transparent 65%); animation: glowPulse 3s ease-in-out infinite; }
@keyframes flicker { 25% { transform: scale(1, .92) rotate(-2deg); } 50% { transform: scale(.94, 1.06) rotate(1.5deg); } 75% { transform: scale(1.04, .96) rotate(-1deg); } }
.ltext { position: relative; display: flex; flex-direction: column; }
.ltext .big { font-family: var(--serif); font-size: var(--t-xl); line-height: 1.15; }
.ltext .big b { font-weight: 600; color: var(--c3); }
.jwords button { font-family: var(--serif); font-size: inherit; color: var(--ink); background: var(--card); border: 0; border-radius: var(--r-pill); padding: 6px var(--s3); box-shadow: 0 2px 0 var(--lip); animation: popIn2 .45s var(--spring) both; animation-delay: calc(var(--i, 0) * 50ms + 250ms); transition: transform var(--d2) var(--spring); }
.jwords button:active { transform: translateY(2px) scale(.97); box-shadow: 0 0 0 var(--lip); }
@media (hover: hover) { .jwords button:hover { transform: translateY(-2px); } }
.jnode .nl { font-size: var(--t-xs); color: var(--muted); max-width: 22ch; text-align: center; line-height: 1.3; margin-top: -2px; }
.trail circle.traveler { fill: var(--accent); stroke: var(--card); stroke-width: 3; filter: drop-shadow(0 0 6px rgba(242,181,68,.9)); animation: travelBob 2.4s ease-in-out infinite; }
@keyframes travelBob { 50% { transform: translateY(-4px); } }
.campfire { position: relative; width: 96px; height: 80px; }
.campfire::before { content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 12px; border-radius: 6px; background: #6b4600; box-shadow: 0 -6px 0 -2px #8A5A00; transform: rotate(-4deg); }
.campfire i { position: absolute; left: 50%; bottom: 14px; width: 30px; height: 46px; margin-left: -15px; border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%; background: radial-gradient(circle at 50% 75%, #fff4c8, #FFC94D 40%, #E8652A 85%); transform-origin: 50% 100%; animation: flicker 1.3s ease-in-out infinite; filter: drop-shadow(0 0 14px rgba(255,170,60,.7)); }
.campfire i:nth-child(2) { width: 20px; height: 30px; margin-left: -24px; animation-delay: -.4s; opacity: .85; }
.campfire i:nth-child(3) { width: 18px; height: 28px; margin-left: 6px; animation-delay: -.8s; opacity: .8; }
.behind .split { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.behind h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-xl); }
.pstrip { display: flex; gap: var(--s3); overflow-x: auto; padding: var(--s2) var(--s1) var(--s3); scrollbar-width: none; scroll-snap-type: x proximity; }
.pstrip::-webkit-scrollbar { display: none; }
.pstamp { flex: 0 0 auto; width: 104px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; padding: 0; color: var(--ink); text-align: center; animation: stampDrop .55s var(--spring) both; animation-delay: calc(var(--i, 0) * 60ms + 150ms); transition: transform var(--d2) var(--spring); -webkit-tap-highlight-color: transparent; }
.pstamp .ring { width: 84px; height: 84px; border-radius: 50%; padding: 5px; transform: rotate(var(--rot)); transition: transform var(--d2) var(--spring); background: var(--card); box-shadow: inset 0 0 0 2px var(--c3), inset 0 0 0 5px var(--card), inset 0 0 0 6px color-mix(in srgb, var(--c3) 50%, transparent), 0 4px 0 var(--lip); display: flex; }
.pstamp img { width: 100%; height: 100%; border-radius: 50%; background: var(--tile); object-fit: cover; }
.pstamp strong { font-size: var(--t-xs); line-height: 1.25; }
.pstamp small { font-size: var(--t-xs); color: var(--muted); }
.pstamp:active .ring { transform: scale(.95); }
@media (hover: hover) { .pstamp:hover .ring { transform: rotate(0deg) translateY(-3px); } }
@keyframes stampDrop { from { opacity: 0; transform: scale(1.3) rotate(-12deg); } }
.passport { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--s4) var(--s3); padding: var(--s3) 0; }
.keepsake { display: flex; align-items: center; gap: var(--s2); font-family: var(--serif); font-style: italic; background: color-mix(in srgb, var(--accent) 16%, var(--card)); border-radius: var(--r-m); padding: var(--s3) var(--s4); }
.keepsake .icon { color: var(--c3); flex-shrink: 0; }
.celebrate { align-items: center; text-align: center; --gap: var(--s4); }
.celebrate .art { border-radius: 50%; box-shadow: var(--shadow-lift); animation: popIn2 .6s var(--spring) both; }

/* ---- Side trails -------------------------------------------------------------------- */
.gcard.trail .art { border-radius: 50%; padding: 6px; background: var(--tile); }
.tprog { display: block; height: 6px; margin: 0 var(--s1); border-radius: 4px; background: var(--soft); overflow: hidden; }
.tprog i { display: block; height: 100%; width: var(--p); background: var(--accent); border-radius: inherit; }
.trailhead { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s4); align-items: center; }
.trailhead .art { border-radius: 50%; box-shadow: var(--shadow-lift); background: var(--tile); }
.trailhead h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); line-height: 1.1; }
.trailhead .jline { margin: var(--s1) 0 var(--s3); }
@media (max-width: 459px) { .trailhead { grid-template-columns: 84px minmax(0, 1fr); } }
.markers { display: flex; gap: var(--s2); overflow-x: auto; padding: var(--s2) var(--s1) var(--s3); scrollbar-width: none; }
.markers::-webkit-scrollbar { display: none; }
.marker { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--card); color: var(--muted); box-shadow: 0 3px 0 var(--lip); transition: transform var(--d2) var(--spring); }
.marker.done { background: var(--accent); color: var(--accent-ink); box-shadow: 0 3px 0 var(--accent-lip); }
.marker.current { color: var(--ink); box-shadow: 0 0 0 3px var(--accent), 0 3px 0 var(--lip); transform: scale(1.12); }
.marker.locked { opacity: .55; }
.marker:active { transform: scale(.92); }

/* ---- Topics: bigger cards, with a taste of the words inside ---------------------------- */
.tcards { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.tcard { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: var(--s4); align-items: center; text-align: left; background: var(--card); border: 0; border-radius: var(--r-l); padding: var(--s3) var(--s4) var(--s3) var(--s3); color: var(--ink); box-shadow: var(--shadow); min-height: 116px; transition: transform var(--d2) var(--spring), box-shadow var(--d2) var(--ease); -webkit-tap-highlight-color: transparent; }
.tcard .art { width: 92px; height: 92px; border-radius: 50%; background: var(--tile); }
.tbody { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tbody strong { font-size: calc(1.125rem * var(--scale)); line-height: 1.25; }
.tbody small { color: var(--muted); font-size: var(--t-s); }
.tsample { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: var(--t-s); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.tcard[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--link), 0 3px 0 var(--lip); background: var(--good-bg); animation: selPop .42s var(--spring); }
.tnow { position: absolute; top: var(--s2); right: var(--s3); font-size: var(--t-xs); font-weight: 700; color: var(--good); }
@media (hover: hover) { .tcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); } }
.tcard:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--lip); }

/* ---- Play: scenery behind the cards, new kinds of questions, streak calls ---------------- */
.playbg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.playbg img { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(28px) saturate(1.1); opacity: .28; animation: drift 40s ease-in-out infinite alternate; }
[data-theme="dark"] .playbg img { opacity: .22; }
.playbg .motes i { background: rgba(242,181,68,.7); box-shadow: 0 0 8px rgba(242,181,68,.6); }
.play { z-index: 1; }
.qprompt { position: relative; }
.qprompt::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(ellipse at 50% 0%, rgba(242,181,68,.14), transparent 60%); pointer-events: none; }
.qprompt .tf { font-family: var(--serif); }
.opts.two { display: grid; grid-template-columns: 1fr 1fr; }
.opt.tfopt { font-weight: 700; font-size: calc(1.25rem * var(--scale)); min-height: 72px; }
.opt.sent { font-family: var(--serif); text-align: left; font-size: calc(1.125rem * var(--scale)); line-height: 1.45; }
.opt mark { background: color-mix(in srgb, var(--accent) 40%, transparent); color: inherit; border-radius: 4px; padding: 0 3px; }
.opt { position: relative; overflow: visible; }
.opt .burst { position: absolute; left: 50%; top: 50%; }
.streakcall { position: fixed; left: 50%; top: calc(18% + var(--safe-top)); z-index: 30; display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s4); border-radius: var(--r-pill); background: var(--ink); color: var(--bg); font-weight: 700; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); animation: callIn 1.7s var(--spring) both; pointer-events: none; white-space: nowrap; }
.streakcall .icon { color: var(--accent); fill: var(--accent); }
@keyframes callIn { 0% { opacity: 0; transform: translate(-50%, 16px) scale(.8); } 18% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } 30% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -14px); } }
.reviewlist .row-item { gap: var(--s2); }
.reviewlist .rk.good { color: var(--good); } .reviewlist .rk.bad { color: var(--bad); }
.reviewlist .rw { background: none; border: 0; padding: 0; text-align: left; color: var(--ink); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.reviewlist .iconbtn { width: 40px; height: 40px; flex-shrink: 0; }

/* ---- Words: mix-up partner ------------------------------------------------------------ */
.wcf { display: inline-block; margin-top: var(--s3); padding: 6px var(--s3); border-radius: var(--r-pill); color: #fff; font-size: var(--t-s); }
.wcf strong { font-family: var(--serif); font-weight: 600; }

/* Keepers: the friendly guide of each region */
.jregion img.keeperpic { position: absolute; inset: auto var(--s4) var(--s3) auto; z-index: 2; width: 92px; height: 92px; object-fit: cover; border-radius: 50%; background: var(--tile); box-shadow: 0 0 0 3px rgba(255,255,255,.85), 0 10px 24px -8px rgba(0,0,0,.55); animation: keeperIn .7s var(--spring) .3s both, float 6s ease-in-out 1s infinite; }
.jregion:has(.keeperpic) .jregion-text { padding-right: calc(92px + var(--s5)); }
@keyframes keeperIn { from { opacity: 0; transform: translateY(20px) scale(.6) rotate(-10deg); } }
@media (max-width: 459px) { .jregion img.keeperpic { width: 72px; height: 72px; } .jregion:has(.keeperpic) .jregion-text { padding-right: calc(72px + var(--s4)); } }

/* ---- Settings: a live preview, a wallpaper gallery, windows of light ------------------- */
.sset .sec-title { display: flex; align-items: center; gap: var(--s3); font-size: var(--t-xl); margin: 0; }
.secart { width: 44px; height: 44px; border-radius: 50%; background: var(--tile); box-shadow: 0 2px 0 var(--lip); flex-shrink: 0; transition: transform var(--d3) var(--spring); }
.sset:hover .secart { transform: rotate(-8deg) scale(1.06); }
.shero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s5); align-items: center; padding: var(--s5); border-radius: var(--r-l); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--card)), var(--card) 60%); box-shadow: var(--shadow-lift); position: relative; overflow: hidden; }
.shero::before { content: ""; position: absolute; width: 320px; height: 320px; left: -120px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(242,181,68,.28), transparent 65%); pointer-events: none; }
.shero-text { position: relative; display: flex; flex-direction: column; gap: var(--s2); align-items: flex-start; }
.shero-text h1 { margin: var(--s2) 0 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); line-height: 1.05; }
.shero-text p { color: var(--muted); }
.shero-tags { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.shero-tags span { font-size: var(--t-xs); font-weight: 700; padding: 4px var(--s3); border-radius: var(--r-pill); background: var(--card); box-shadow: 0 2px 0 var(--lip); }
/* the little phone that previews your Words screen */
.pv { --pvscale: 1; position: relative; width: 168px; aspect-ratio: 9 / 18; border-radius: 26px; overflow: hidden; background: #111; box-shadow: 0 0 0 6px var(--ink), 0 22px 40px -18px rgba(0,0,0,.6); color: #fff; transform: rotate(3deg); transition: transform var(--d3) var(--spring); }
.shero:hover .pv { transform: rotate(0deg) translateY(-3px); }
.pv-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--fx, 50%) 50%; opacity: 0; transform: scale(1.08); transition: opacity .9s var(--ease), transform 6s ease-out; }
.pv-bg.on { opacity: 1; transform: scale(1); }
.pv-shade { position: absolute; inset: 0; background: radial-gradient(120% 70% at 50% 46%, rgba(6,9,13,.25), rgba(6,9,13,.6)); }
.pv.light .pv-shade { background: radial-gradient(120% 70% at 50% 46%, rgba(6,9,13,.45), rgba(6,9,13,.7)); }
.pv-body { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; text-align: center; }
.pv-word { font-family: var(--serif); font-size: calc(26px * var(--pvscale)); line-height: 1; white-space: nowrap; text-shadow: 0 2px 12px rgba(0,0,0,.4); transition: font-size var(--d2) var(--ease); }
.pv-word .ch { display: inline-block; animation: letterIn .6s var(--ease) both; animation-delay: calc(var(--i) * 40ms + 200ms); }
.pv-pill { font-size: calc(9px * var(--pvscale)); padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.pv-def { font-size: calc(10px * var(--pvscale)); line-height: 1.35; opacity: .9; max-width: 15ch; }
.pv-acts { position: absolute; right: 10px; bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.pv-acts i { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
@media (max-width: 459px) { .shero { grid-template-columns: minmax(0, 1fr) 118px; padding: var(--s4); gap: var(--s3); } .pv { width: 118px; border-radius: 20px; box-shadow: 0 0 0 4px var(--ink), 0 16px 28px -14px rgba(0,0,0,.6); } .pv-word { font-size: calc(19px * var(--pvscale)); } .pv-def, .pv-acts { display: none; } }
/* wallpaper gallery */
.wallpicker { display: flex; flex-direction: column; gap: var(--s4); }
.wgroup h3 { margin: 0 0 var(--s2); font-family: var(--serif); font-weight: 400; font-size: var(--t-l); }
.wrow { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: var(--s3); }
@media (max-width: 559px) { .wrow { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px var(--s3); margin: 0 -4px; scrollbar-width: none; } .wrow::-webkit-scrollbar { display: none; } .wrow .wall { flex: 0 0 70%; scroll-snap-align: start; } }
.wall { position: relative; border-radius: var(--r-m); transition: transform var(--d2) var(--spring); }
.wall .wpick, .wall.auto { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: var(--r-m); overflow: hidden; background: #222; color: #fff; box-shadow: 0 3px 0 var(--lip), 0 14px 24px -16px rgba(0,0,0,.5); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: box-shadow var(--d2) var(--ease); }
.wall img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
@media (hover: hover) { .wall:hover img { transform: scale(1.06); } .wall:hover { transform: translateY(-2px); } }
.wall:active { transform: scale(.98); }
.wname { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 6px; padding: var(--s5) var(--s3) var(--s2); background: linear-gradient(transparent, rgba(0,0,0,.65)); font-weight: 700; font-size: var(--t-s); text-align: left; }
.wcheck { position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 0 var(--accent-lip); transform: scale(0); transition: transform .45s var(--spring); }
.wcheck .icon { stroke-width: 3; }
.wall[aria-pressed="true"] .wpick, .wall.auto[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent), 0 0 24px 2px rgba(242,181,68,.45), 0 3px 0 var(--lip); }
.wall[aria-pressed="true"] .wcheck { transform: scale(1); }
.wall.auto { aspect-ratio: 32 / 9; }
.wall.auto .mosaic { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.wall.auto .mosaic img { height: 100%; animation: mosaicDrift 12s ease-in-out infinite alternate; }
.wall.auto .mosaic img:nth-child(2) { animation-delay: -3s; } .wall.auto .mosaic img:nth-child(3) { animation-delay: -6s; } .wall.auto .mosaic img:nth-child(4) { animation-delay: -9s; }
@keyframes mosaicDrift { to { transform: scale(1.15); } }
.wdl { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(16,20,26,.42); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform var(--d2) var(--spring), background-color var(--d2); }
.wdl:hover { background: rgba(16,20,26,.62); transform: translateY(-1px); }
.wdl:active { transform: scale(.9); }
.wdl.busy .icon { animation: wdlBob .7s ease-in-out infinite; }
@keyframes wdlBob { 50% { transform: translateY(3px); } }
/* appearance: three small windows of light */
.looks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.look { display: flex; flex-direction: column; gap: var(--s2); align-items: stretch; border: 0; padding: var(--s2); border-radius: var(--r-m); background: var(--card); color: var(--ink); box-shadow: 0 3px 0 var(--lip); transition: transform var(--d2) var(--spring), box-shadow var(--d2); }
.lk-win { position: relative; height: 64px; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; gap: 5px; padding: 10px; background: #EEEBE6; }
.lk-win i { height: 7px; border-radius: 4px; background: #CFC8BD; }
.lk-win i:first-child { width: 60%; background: #F2B544; }
.lk-win i:last-child { width: 40%; }
.look.dark .lk-win { background: #141A21; } .look.dark .lk-win i { background: #2A3540; } .look.dark .lk-win i:first-child { background: #F2B544; }
.look.device .lk-win { background: linear-gradient(105deg, #EEEBE6 50%, #141A21 50%); }
.lk-name { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: var(--t-s); white-space: nowrap; }
.look[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--link), 0 3px 0 var(--lip); animation: selPop .42s var(--spring); }
.look[aria-pressed="true"] .lk-name .icon { color: var(--c3); animation: hop .7s var(--spring); }
.big-a { font-size: 24px; }
/* light scenes on the Words screen get a deeper shade */
.wslide.light .wshade { background: radial-gradient(120% 70% at 50% 46%, rgba(24,18,14,.3), rgba(24,18,14,.6) 100%), linear-gradient(to bottom, rgba(24,18,14,.45), rgba(24,18,14,.05) 22%, rgba(24,18,14,.05) 62%, rgba(24,18,14,.6)); }
.wslide.light .wbody { text-shadow: 0 2px 18px rgba(0,0,0,.5), 0 1px 3px rgba(0,0,0,.35); }
/* You: the road so far */
.roadcard { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) var(--s5) var(--s4) var(--s4); border-radius: var(--r-l); background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 16%, var(--card)), var(--card) 70%); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform var(--d2) var(--spring), box-shadow var(--d2) var(--ease); }
.roadcard img { width: 72px; height: 72px; border-radius: 50%; background: var(--tile); box-shadow: 0 0 22px 4px rgba(242,181,68,.35); animation: float 5s ease-in-out infinite; flex-shrink: 0; }
.roadcard strong { font-family: var(--serif); font-weight: 400; font-size: var(--t-xl); }
.roadstats { display: flex; flex-wrap: wrap; gap: 2px var(--s4); color: var(--muted); font-size: var(--t-s); }
.roadstats b { color: var(--ink); font-size: var(--t-l); }
@media (hover: hover) { .roadcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); } .roadcard:hover .chev { transform: translateX(4px); } }
.roadcard .chev { transition: transform var(--d2) var(--spring); color: var(--muted); }

/* ---- 3.0.1 polish ------------------------------------------------------------------ */
/* entrance animations never make a page scroll sideways */
#main { overflow-x: clip; }
.qprompt .dipa { align-self: center; }
/* Short, wide screens (phones turned sideways): the word takes the middle, actions stand in a column on the right */
/* Phones turned sideways keep their height for content: the places move to the top bar, as on a computer */
@media (max-width: 899px) and (orientation: landscape) and (max-height: 540px) {
  .topnav { display: flex; }
  .topnav a { padding: 0 var(--s3); }
  .bottomnav { display: none !important; }
  .app.has-nav main { padding-bottom: var(--safe-bottom); }
  .topbar { padding-inline: calc(var(--gutter) + env(safe-area-inset-left, 0px)) calc(var(--gutter) + env(safe-area-inset-right, 0px)); }
}
@media (max-width: 699px) and (orientation: landscape) and (max-height: 540px) { .brand { font-size: 0; gap: 0; } }
@media (orientation: landscape) and (max-height: 540px) {
  .whud { top: calc(64px + var(--safe-top)); }
  .wbody { padding: calc(112px + var(--safe-top)) calc(96px + env(safe-area-inset-right, 0px)) calc(24px + var(--safe-bottom)) calc(96px + env(safe-area-inset-left, 0px)); gap: var(--s2); }
  .wword { --wf: clamp(36px, 15vh, 64px); }
  .wdef { font-size: calc(clamp(15px, 4.4vh, 19px) * var(--scale)); max-width: 44ch; }
  .wex { font-size: calc(clamp(13px, 3.8vh, 16px) * var(--scale)); max-width: 52ch; }
  .wipa { padding-block: 4px; }
  .wactions { left: auto; right: calc(var(--gutter) + env(safe-area-inset-right, 0px)); top: calc(50% + 40px); bottom: auto; transform: translateY(-50%); flex-direction: column; gap: var(--s2); }
  .wactions .wbtn { width: 44px; height: 44px; }
  .whint { display: none; }
  .play { gap: var(--s3); }
  .qprompt { min-height: 0; padding: var(--s4); }
  .shero .pv { display: none; }
  .shero { grid-template-columns: minmax(0, 1fr); }
}
.jnode.current { margin-top: 48px; }
.wcard .bot { flex-wrap: wrap; row-gap: var(--s1); }
.wcard .bot > span { white-space: nowrap; }

/* ---- 3.1: the land along the road ----------------------------------------------------------
   Each region lays its own ground under the path (faded at the edges into the page), a soft road under
   the dotted trail, and a few hand-made things resting beside it. Labels sit on paper so they read on any ground. */
.jmap.land { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); isolation: isolate; }
.land { --road: #F6F2EA; --road-edge: rgba(92, 72, 40, .2); --trail-dot: rgba(24, 33, 43, .32); }
[data-theme="dark"] .land { --road: #2A323C; --road-edge: rgba(255, 255, 255, .08); --trail-dot: rgba(236, 239, 242, .45); }
.land > .ground { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--ground) 50% 0 / 210px 210px repeat; opacity: .3; filter: saturate(.55) contrast(.85);
  /* faint at the middle where the road runs, a little fuller toward the edges, gone at the top and bottom */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 120px, #000 calc(100% - 160px), transparent), linear-gradient(to right, #000, rgba(0,0,0,.28) 32%, rgba(0,0,0,.28) 68%, #000);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent, #000 120px, #000 calc(100% - 160px), transparent), linear-gradient(to right, #000, rgba(0,0,0,.28) 32%, rgba(0,0,0,.28) 68%, #000);
  mask-composite: intersect; }
[data-theme="dark"] .land > .ground { opacity: .2; filter: saturate(.45) brightness(.75) contrast(.85); }
@media (min-width: 900px) { .jmap.land > .ground {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 120px, #000 calc(100% - 160px), transparent), linear-gradient(to right, transparent, #000 14%, rgba(0,0,0,.28) 40%, rgba(0,0,0,.28) 60%, #000 86%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 120px, #000 calc(100% - 160px), transparent), linear-gradient(to right, transparent, #000 14%, rgba(0,0,0,.28) 40%, rgba(0,0,0,.28) 60%, #000 86%, transparent); } }
.jmap .trail path.road { stroke: var(--road); stroke-width: 50; stroke-dasharray: none; stroke-linecap: round; animation: none; }
.jmap .trail path.roadedge { stroke: var(--road-edge); stroke-width: 54; stroke-dasharray: none; stroke-linecap: round; animation: none; }
.land .decor { position: absolute; inset: 0; pointer-events: none; }
.land .dc { position: absolute; width: var(--w, var(--sz)); height: var(--w, var(--sz)); display: block; animation: decorIn .7s var(--spring) both; animation-delay: calc(var(--i, 0) * 90ms + 450ms); }
.land .dc::before { content: ""; position: absolute; left: 14%; right: 14%; bottom: 2%; height: 14%; border-radius: 50%; background: radial-gradient(closest-side, rgba(40, 30, 15, .32), transparent); }
[data-theme="dark"] .land .dc::before { background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); }
.land .dc img { position: relative; width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 92%; }
.land .dc img.flip { scale: -1 1; }
.land .dc.sway img { animation: sway 5.5s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1.3s); }
.land .dc.bob img { animation: bobble 4.2s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.9s); }
.land .dc.glow::after { content: ""; position: absolute; left: 50%; top: 22%; width: 70%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 205, 110, .55), transparent); mix-blend-mode: screen; animation: lampGlow 3.6s ease-in-out infinite; pointer-events: none; }
[data-theme="dark"] .land .dc img { filter: brightness(.88); }
@keyframes decorIn { from { opacity: 0; transform: translateY(10px) scale(.85); } }
@keyframes sway { 0%, 100% { rotate: 0deg; } 35% { rotate: 2.6deg; } 70% { rotate: -2deg; } }
@keyframes bobble { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -3px; rotate: -1.5deg; } }
@keyframes lampGlow { 0%, 100% { opacity: .55; scale: .9; } 50% { opacity: 1; scale: 1.08; } }
/* paper labels so the step names read on grass, snow or stone */
.land .jnode .nm, .land .jnode .nl { background: color-mix(in srgb, var(--card) 90%, transparent); padding: 3px 10px; border-radius: 999px; box-shadow: 0 1px 0 var(--lip); }
.land .jnode .nl { padding: 4px 10px; border-radius: 12px; }
.land .jnode.locked .nm { color: var(--muted); }
.jland .plaque { display: flex; flex-direction: column; align-items: center; gap: var(--s1); }
.land .jland .plaque { background: color-mix(in srgb, var(--card) 92%, transparent); border-radius: var(--r-m, 16px); padding: var(--s3) var(--s4); box-shadow: var(--shadow); }
.land .jland img { box-shadow: 0 0 0 6px color-mix(in srgb, var(--card) 85%, transparent), var(--shadow-lift); }
/* the camp for tonight sits on the same ground, with two things from the region beside the fire */
.camp.land { position: relative; overflow: hidden; isolation: isolate; }
.camp.land > .ground { opacity: .24; -webkit-mask-image: linear-gradient(to top, #000, transparent 75%); mask-image: linear-gradient(to top, #000, transparent 75%); }
[data-theme="dark"] .camp.land > .ground { opacity: .16; }
.camp.land .dc { --w: calc(var(--sz) * .85); top: auto; bottom: var(--s4); }
.camp.land .dc:first-child { left: var(--s4); }
.camp.land .dc:last-child { right: var(--s4); }
@media (max-width: 459px) { .camp.land .dc { --w: calc(var(--sz) * .62); bottom: var(--s3); } .camp.land .dc:first-child { left: var(--s2); } .camp.land .dc:last-child { right: var(--s2); } }
.camp.land > :not(.ground):not(.decor) { position: relative; }
.land .jnode.locked .disc { filter: grayscale(.75); opacity: .92; }
.land .jland.locked img { filter: grayscale(.7) opacity(.85); }
.jregion img.keeperpic.standin { object-fit: contain; padding: 8px; }
.land .jland { width: min(330px, 92%); }
.land .jland img { width: min(220px, 68%); }

/* ---- 3.1: landing page showcases ------------------------------------------------------------ */
.wroad { display: grid; gap: var(--s6); align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .wroad { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: var(--s8); } }
.wroadtext { display: flex; flex-direction: column; gap: var(--s4); }
.wroadtext h2, .wscenetext h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); line-height: 1.1; }
.wroadtext p:not(.lead) { margin: 0; color: var(--muted); max-width: var(--measure); }
.wkeepers { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); }
.wkeepers img { width: 52px; height: 52px; border-radius: 50%; background: var(--tile); box-shadow: 0 0 0 3px var(--card), var(--shadow); margin-right: -14px; }
.wkeepers .muted { margin-left: 22px; font-size: var(--t-s); }
.wmap { position: relative; height: 540px; border-radius: var(--r-l); overflow: hidden; isolation: isolate; background: var(--card); box-shadow: var(--shadow-lift); }
.wmap > .ground { opacity: .5; filter: saturate(.65) contrast(.9); background-size: 200px 200px; -webkit-mask-image: none; mask-image: none; }
.wmap > .ground.g0 { bottom: 58%; -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent); mask-image: linear-gradient(to bottom, #000 70%, transparent); }
.wmap > .ground.g1 { top: 30%; bottom: 26%; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent); }
.wmap > .ground.g2 { top: 66%; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%); mask-image: linear-gradient(to bottom, transparent, #000 30%); }
[data-theme="dark"] .wmap > .ground { opacity: .3; filter: saturate(.5) brightness(.8); }
.wroadline { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wroadline path { fill: none; stroke-linecap: round; }
.wroadline .roadedge { stroke: var(--road-edge); stroke-width: 54px; }
.wroadline .road { stroke: var(--road); stroke-width: 46px; }
.wroadline .dots { stroke: var(--accent); stroke-width: 5px; stroke-dasharray: 2 14; opacity: .8; }
.wmap .wdc { width: var(--sz); height: var(--sz); translate: -50% -50%; }
@media (max-width: 459px) { .wmap .wdc { width: calc(var(--sz) * .8); height: calc(var(--sz) * .8); } }
.wstop { position: absolute; z-index: 1; translate: -50% -50%; display: flex; flex-direction: column; align-items: center; gap: 6px; animation: decorIn .7s var(--spring) both; animation-delay: calc(var(--i) * 160ms + 200ms); }
.wstop img { width: 88px; height: 88px; border-radius: 50%; background: var(--tile); box-shadow: 0 0 0 5px var(--card), 0 6px 0 4px var(--lip), 0 20px 26px -14px rgba(24, 33, 43, .6); }
.wstop span { font-size: var(--t-s); font-weight: 700; white-space: nowrap; background: color-mix(in srgb, var(--card) 92%, transparent); padding: 3px 10px; border-radius: 999px; box-shadow: 0 1px 0 var(--lip); }
.wtrails { align-items: center; }
.wtrails > h2 { margin-bottom: calc(var(--s3) * -1); }
.wlead { text-align: center; }
.wtrailgrid { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: var(--s5) var(--s4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 820px) { .wtrailgrid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.wtrailgrid li { display: flex; flex-direction: column; align-items: center; gap: var(--s2); text-align: center; font-weight: 700; font-size: var(--t-s); line-height: 1.25; }
.wtrailgrid img { width: min(120px, 100%); height: auto; aspect-ratio: 1; border-radius: 50%; background: var(--tile); box-shadow: var(--shadow-lift); transition: transform var(--d2) var(--spring); }
.wtrailgrid li:nth-child(odd) img { rotate: -3deg; }
.wtrailgrid li:nth-child(even) img { rotate: 2deg; }
.wscenes { display: grid; gap: var(--s7); align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .wscenes { grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: var(--s8); } }
.wscenetext { display: flex; flex-direction: column; gap: var(--s4); }
.wscenetext .muted { margin: 0; }
.wpostcards { position: relative; height: clamp(210px, 52vw, 300px); }
.wpost { position: absolute; left: 50%; top: 50%; width: min(68%, 340px); aspect-ratio: 16 / 10; translate: -50% -50%; rotate: var(--r); padding: 8px 8px 22px; background: #FBFAF7; border-radius: 6px; box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 18px 30px -16px rgba(24, 33, 43, .55); }
.wpost:nth-child(1) { margin-left: -12%; margin-top: -4%; }
.wpost:nth-child(3) { margin-left: 12%; margin-top: 5%; }
.wpost img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
[data-theme="dark"] .wpost { background: #E9E4DA; }
.roadcard.land { position: relative; overflow: hidden; isolation: isolate; }
.roadcard.land > .ground { opacity: .3; filter: saturate(.6); background-size: 180px 180px; -webkit-mask-image: linear-gradient(to left, #000, transparent 65%); mask-image: linear-gradient(to left, #000, transparent 65%); }
[data-theme="dark"] .roadcard.land > .ground { opacity: .3; }
.roadcard.land .chev { position: relative; background: var(--card); border-radius: 50%; }
.roadcard.land .chev { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; box-shadow: var(--shadow); }
@media (min-width: 900px) { .jmap.land > .ground { left: -180px; right: -180px; } }
.land .trail path:not(.road):not(.roadedge):not(.walked) { stroke: var(--trail-dot); stroke-width: 5; }
/* quieter labels: one weight, smaller, so the path and the step art lead */
.land .jnode .nm { font-weight: 600; padding: 2px 9px; box-shadow: none; background: color-mix(in srgb, var(--card) 86%, transparent); }
.land .jnode.current .nm { font-weight: 700; }
.land .jnode .nl { box-shadow: 0 1px 0 var(--lip), 0 6px 18px -10px rgba(0,0,0,.25); background: var(--card); position: relative; z-index: 1; }

/* 3.2.2: picture tiles for topics, trails and collections. One size, one rhythm: art on top, name below. */
.ttiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 96px), 1fr)); }
@media (min-width: 720px) { .ttiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s4); } }
.ttile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding: 14px 6px 12px; min-height: 0; text-align: center; background: var(--card); color: var(--ink); border: 0; border-radius: var(--r-l); box-shadow: var(--shadow); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform var(--d2) var(--spring), box-shadow var(--d2) var(--ease), background-color var(--d2) var(--ease); }
.ttile .tart { position: relative; display: block; width: 58px; height: 58px; margin-bottom: 4px; }
.ttile .art { width: 58px; height: 58px; border-radius: 50%; background: var(--tile); display: block; }
@media (min-width: 720px) { .ttile .tart, .ttile .art { width: 76px; height: 76px; } }
.ttile .tname { font-weight: 650; font-size: calc(0.8125rem * var(--scale)); line-height: 1.25; letter-spacing: -.005em; text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ttile .tsub { font-size: var(--t-xs); color: var(--muted); }
.ttile .tcheck { position: absolute; right: -4px; top: -4px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); box-shadow: 0 0 0 3px var(--card); opacity: 0; transform: scale(.4); transition: opacity var(--d2) var(--ease), transform var(--d2) var(--spring); }
.ttile[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink), 0 3px 0 var(--lip); }
.ttile[aria-pressed="true"] .tcheck { opacity: 1; transform: scale(1); }
@media (hover: hover) { .ttile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); } .ttile[aria-pressed="true"]:hover { box-shadow: inset 0 0 0 2px var(--ink), var(--shadow-lift); } }
.ttile:active { transform: scale(.97); }
.ttile:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.field.rowfield { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--s4); text-align: left; }
.rowfield .rowtxt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; text-align: left; }
.rowfield .flabel { font-weight: 700; }
.rowfield > .btn { flex-shrink: 0; align-self: center; }
.sheet .ttiles { margin-top: var(--s3); }
.sheet-lede { margin: 0; }
.sheet-foot { margin-top: var(--s5); justify-content: flex-end; }

/* 3.3: Settings rows. One shape for everything: words left, control right, a hairline between rows. */
.sset .panel { gap: 0; padding-block: var(--s2); }
.sset .panel > .switch, .sset .panel > .srow { border-bottom: 1px solid var(--line); }
.sset .panel > :last-child { border-bottom: 0; }
.srow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s4); min-height: 68px; padding: var(--s3) 0; width: 100%; text-align: left; color: var(--ink); }
.srow-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 150px; }
.srow-txt strong { font-weight: 700; }
.srow-txt small { color: var(--muted); font-size: var(--t-s); line-height: 1.4; }
.srow.stack { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: var(--s3); padding-block: var(--s4); }
.srow.stack > .srow-txt { flex: none; }
.srow.nav { background: none; border: 0; border-radius: 0; cursor: pointer; flex-wrap: nowrap; -webkit-tap-highlight-color: transparent; font: inherit; }
.srow.nav .chev { color: var(--muted); display: grid; place-items: center; transition: transform var(--d2) var(--ease); }
@media (hover: hover) { .srow.nav:hover .chev { transform: translateX(3px); color: var(--ink); } }
.srow.nav:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: var(--r-s); }
.artstack { display: inline-flex; flex-shrink: 0; padding-left: 12px; }
.artstack[hidden] { display: none; }
.artstack img { width: 40px; height: 40px; border-radius: 50%; background: var(--tile); margin-left: -12px; box-shadow: 0 0 0 3px var(--card); object-fit: cover; }
.artstack.ghost img { opacity: .5; filter: saturate(.4); }
.scthumb { width: 64px; height: 44px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: var(--tile); box-shadow: 0 0 0 1px var(--line); }
.scthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scthumb.mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 1px; }
.segctl { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); flex-shrink: 0; }
.segctl button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: var(--t-s); min-height: 38px; padding: 0 16px; border-radius: var(--r-pill); cursor: pointer; transition: background-color var(--d2) var(--ease), color var(--d2) var(--ease), box-shadow var(--d2) var(--ease); }
.segctl button[aria-checked="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(10, 14, 20, .14), 0 2px 0 var(--lip); }
.segctl button:focus-visible { outline: 3px solid var(--link); outline-offset: 1px; }
@media (min-width: 720px) { .sheet.wide { width: min(700px, 100%); } }
/* Settings tabs: a quiet pill bar that stays in reach while you scroll */
.settabs { position: sticky; top: calc(var(--safe-top) + 8px); z-index: 4; display: flex; gap: 4px; padding: 5px; margin: var(--s2) 0 var(--s1); border-radius: var(--r-pill); background: color-mix(in srgb, var(--card) 82%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 var(--line), 0 8px 24px -14px rgba(10, 14, 20, .35); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.settabs::-webkit-scrollbar { display: none; }
.settabs button { flex: 1 0 auto; scroll-snap-align: center; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: var(--t-s); min-height: 40px; padding: 0 16px; border-radius: var(--r-pill); cursor: pointer; white-space: nowrap; transition: background-color var(--d2) var(--ease), color var(--d2) var(--ease), box-shadow var(--d2) var(--ease); }
.settabs button[aria-current="page"] { background: var(--ink); color: var(--bg); box-shadow: 0 2px 0 var(--lip); }
@media (hover: hover) { .settabs button:not([aria-current="page"]):hover { color: var(--ink); background: var(--soft); } }
.settabs button:focus-visible { outline: 3px solid var(--link); outline-offset: 1px; }
.sset[hidden] { display: none !important; }
.sset.solo > .sec-title { display: none; }
@media (max-width: 719px) { .settabs { top: calc(var(--safe-top) + 6px); margin-inline: calc(var(--s1) * -1); } }
/* Favorite topics inline: smaller tiles so all of them fit in a calm block */
.ttiles.compact { gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 92px), 1fr)); }
.ttiles.compact .ttile { padding: 10px 4px 9px; box-shadow: none; background: transparent; gap: 2px; }
@media (hover: hover) { .ttiles.compact .ttile:hover { background: var(--bg); box-shadow: none; transform: none; } }
.ttiles.compact .ttile .tart, .ttiles.compact .ttile .art { width: 46px; height: 46px; }
.ttiles.compact .ttile .tname { font-size: calc(0.75rem * var(--scale)); }
.ttiles.compact .ttile[aria-pressed="true"], .ttiles.compact .ttile[aria-pressed="true"]:hover { background: color-mix(in srgb, var(--ink) 5%, var(--card)); box-shadow: inset 0 0 0 2px var(--ink); }
.ttiles.compact .ttile:not([aria-pressed="true"]) .art { filter: saturate(.85); }
.ttiles.compact .ttile .tcheck { width: 20px; height: 20px; right: -5px; top: -5px; }
/* On phones the live preview only shows on the Look tab, where it answers your changes; elsewhere the header stays short */
@media (max-width: 719px) {
  .page[data-stab]:not([data-stab="look"]) .shero .pv { display: none; }
  .page[data-stab]:not([data-stab="look"]) .shero { grid-template-columns: 1fr; min-height: 0; }
  .settabs button { padding: 0 10px; flex: 1 1 auto; }
}

/* 3.4: new games ------------------------------------------------------------- */
.qprompt .qs.ctx mark { background: color-mix(in srgb, var(--accent) 34%, transparent); color: inherit; border-radius: 6px; padding: 0 4px; font-weight: 700; }
/* Light the letters */
.hslots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 100%; }
.hslot { width: clamp(28px, 8vw, 40px); height: clamp(38px, 10vw, 50px); border-bottom: 3px solid color-mix(in srgb, var(--ink) 30%, transparent); display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: calc(clamp(22px, 6vw, 30px) * var(--scale)); text-transform: lowercase; transition: border-color var(--d2) var(--ease); }
.hslot.on { border-color: var(--accent); animation: rightPop .4s var(--spring); }
.hgap { width: 14px; display: inline-flex; align-items: flex-end; justify-content: center; font-family: var(--serif); font-size: 26px; }
.hslots.solved .hslot { color: var(--good); border-color: var(--good); }
.hslots.reveal .hslot:not(.on) { color: var(--bad); }
.hlights { display: flex; gap: 10px; justify-content: center; }
.hlights i { width: 14px; height: 18px; border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%; background: color-mix(in srgb, var(--ink) 14%, transparent); transition: background-color var(--d3) var(--ease), box-shadow var(--d3) var(--ease); }
.hlights i.lit { background: var(--accent); box-shadow: 0 0 12px 2px color-mix(in srgb, var(--accent) 60%, transparent); }
.hkeys { display: flex; flex-direction: column; gap: 7px; width: 100%; max-width: 520px; }
.hrow { display: flex; justify-content: center; gap: 5px; }
.hkey { flex: 1 1 0; max-width: 46px; min-width: 0; height: 50px; border: 0; border-radius: 9px; background: var(--card); color: var(--ink); font: inherit; font-weight: 700; font-size: 18px; text-transform: lowercase; box-shadow: 0 3px 0 var(--lip); cursor: pointer; padding: 0; transition: transform var(--d1) var(--ease), opacity var(--d2) var(--ease), background-color var(--d2) var(--ease); }
.hkey:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--lip); }
.hkey.hit { background: var(--good-bg); color: var(--good); box-shadow: 0 3px 0 var(--good-lip); }
.hkey.miss { opacity: .3; }
.hkey:disabled { cursor: default; }
/* Hear and spell */
.hearbtn { min-height: 64px; padding: 0 var(--s6); font-size: var(--t-l); border-radius: var(--r-pill); }
/* Build the sentence */
.bline { width: 100%; min-height: 96px; display: flex; flex-wrap: wrap; align-content: flex-start; justify-content: center; gap: 8px; padding: var(--s4); border-radius: var(--r-l); background: var(--card); box-shadow: var(--shadow-lift); }
.bline .bhint { color: var(--muted); align-self: center; margin: auto; }
.bline.right { box-shadow: inset 0 0 0 2px var(--good), var(--shadow-lift); }
.bline.wrong { box-shadow: inset 0 0 0 2px var(--bad), var(--shadow-lift); animation: shake .42s var(--ease); }
.bbank { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; min-height: 52px; }
.btile { border: 0; border-radius: 10px; background: var(--card); color: var(--ink); font-family: var(--serif); font-size: calc(1.1875rem * var(--scale)); padding: 8px 12px; min-height: 44px; box-shadow: 0 3px 0 var(--lip); cursor: pointer; transition: transform var(--d1) var(--ease), opacity var(--d2) var(--ease); animation: qIn .4s var(--ease) both; }
.btile.key { background: color-mix(in srgb, var(--accent) 22%, var(--card)); font-weight: 700; }
.btile.placed { box-shadow: 0 2px 0 var(--lip); background: var(--bg); }
.btile.placed.key { background: color-mix(in srgb, var(--accent) 22%, var(--bg)); }
.btile.used { opacity: 0; transform: scale(.7); pointer-events: none; }
.btile:active { transform: translateY(2px); }
/* Match the pairs */
.pairs { width: 100%; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--s3); align-items: start; }
.pcol { display: flex; flex-direction: column; gap: var(--s3); }
.pc { border: 0; border-radius: var(--r-m); background: var(--card); color: var(--ink); min-height: 76px; padding: var(--s3); font: inherit; font-size: calc(0.9375rem * var(--scale)); line-height: 1.3; box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 4px 0 var(--lip); cursor: pointer; transition: transform var(--d1) var(--ease), opacity var(--d3) var(--ease), background-color var(--d2) var(--ease), box-shadow var(--d2) var(--ease); animation: qIn .45s var(--ease) both; text-align: left; }
.pc.pcw { font-family: var(--serif); font-size: calc(clamp(17px, 4.4vw, 21px) * var(--scale)); text-align: center; overflow-wrap: anywhere; }
.pc.pcw.long { font-size: calc(clamp(14px, 3.6vw, 18px) * var(--scale)); hyphens: auto; }
.pc.sel { background: color-mix(in srgb, var(--accent) 26%, var(--card)); box-shadow: inset 0 0 0 2px var(--ink), 0 4px 0 var(--lip); transform: translateY(-2px); }
.pc.done { background: var(--good-bg); color: var(--good); box-shadow: none; opacity: .55; transform: scale(.97); cursor: default; }
.pc.nope { background: var(--bad-bg); animation: shake .42s var(--ease); }
@media (min-width: 720px) { .pc { min-height: 84px; font-size: calc(1rem * var(--scale)); } }
/* Word hunt */
.qcard.wide { width: 100%; }
.wsgrid { --gap: clamp(2px, .8vw, 5px); display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: var(--gap); width: min(100%, 520px); padding: var(--s3); background: var(--card); border-radius: var(--r-l); box-shadow: var(--shadow-lift); touch-action: none; user-select: none; -webkit-user-select: none; }
.wc { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-family: var(--serif); font-size: clamp(15px, 4.4vw, 24px); text-transform: lowercase; cursor: pointer; transition: background-color var(--d2) var(--ease), color var(--d2) var(--ease); }
.wc.sel { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.wc.hintc { box-shadow: inset 0 0 0 2px var(--accent); }
.wc.found { color: #fff; }
.wc.found.f0 { background: #1F6F78; } .wc.found.f1 { background: #B4527A; } .wc.found.f2 { background: #6F8F6C; } .wc.found.f3 { background: #C98A1E; } .wc.found.f4 { background: #24304A; }
.wsclues { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: var(--s2); text-align: left; }
@media (min-width: 720px) { .wsclues { grid-template-columns: 1fr 1fr; } }
.wsclues li { background: var(--card); border-radius: var(--r-m); padding: var(--s3); display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s3); box-shadow: 0 2px 0 var(--lip); }
.wsclues .len { grid-column: 2; grid-row: 1; font-size: var(--t-xs); color: var(--muted); white-space: nowrap; }
.wsclues .cd { grid-column: 1; grid-row: 1 / span 2; font-size: calc(0.9375rem * var(--scale)); line-height: 1.35; }
.wsclues .cw { display: none; }
.wsclues li.got { background: var(--good-bg); }
.wsclues li.got .cw { display: block; grid-column: 2; grid-row: 2; color: var(--good); }
/* scenery is clipped at the map's edges so pieces can sit half out of frame */
.jmap.land > .decor { overflow: hidden; z-index: 0; }
@media (min-width: 900px) { .jmap.land > .decor { left: -180px; right: -180px; -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); } }
/* Memory cards */
.memo { width: 100%; display: grid; grid-template-columns: repeat(var(--c), minmax(0, 1fr)); gap: var(--s3); perspective: 900px; }
@media (max-width: 559px) { .memo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mcard { position: relative; border: 0; padding: 0; background: none; min-height: 112px; cursor: pointer; transform-style: preserve-3d; transition: transform .5s var(--spring); -webkit-tap-highlight-color: transparent; }
.mcard.up, .mcard.done { transform: rotateY(180deg); }
.mface { position: absolute; inset: 0; border-radius: var(--r-m); backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; align-items: center; justify-content: center; padding: var(--s3); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 4px 0 var(--lip); }
.mface.mback { background: var(--ink); background-image: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 55%), radial-gradient(circle at 75% 70%, color-mix(in srgb, var(--link) 35%, transparent), transparent 50%); }
.mface.mfront { background: var(--card); color: var(--ink); transform: rotateY(180deg); font-size: calc(0.875rem * var(--scale)); line-height: 1.3; }
.mface.mfront.isw { font-size: calc(clamp(17px, 4.6vw, 22px) * var(--scale)); overflow-wrap: anywhere; }
.mcard.done .mface.mfront { background: var(--good-bg); color: var(--good); }
/* Fill the story */
.story { width: 100%; background: var(--card); border-radius: var(--r-l); box-shadow: var(--shadow-lift); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s4); text-align: left; }
.sline { margin: 0; font-size: calc(clamp(18px, 4.6vw, 21px) * var(--scale)); line-height: 1.7; }
.sgap { display: inline-flex; align-items: center; justify-content: center; min-width: 5.5em; min-height: 36px; margin: 0 4px; padding: 0 10px; border: 0; border-bottom: 3px solid var(--accent); border-radius: 8px 8px 2px 2px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--ink); font: inherit; font-weight: 700; vertical-align: baseline; cursor: pointer; }
.sgap.filled { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.sgap.right { background: var(--good-bg); color: var(--good); border-color: var(--good); }
.sgap.wrong { background: var(--bad-bg); color: var(--good); border-color: var(--bad); }
.btile.sel { box-shadow: inset 0 0 0 2px var(--ink), 0 3px 0 var(--lip); background: color-mix(in srgb, var(--accent) 26%, var(--card)); }

/* 3.4: the word, up close */
.sheet.wsheet { gap: var(--s5); }
.wsheet .sheet-head { position: absolute; top: var(--s4); right: var(--s4); z-index: 2; margin: 0; }
.ws-hero { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); padding-right: 56px; padding-top: var(--s1); }
.ws-kicker { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); font-size: var(--t-s); color: var(--muted); }
.ws-pos { color: var(--ink); background: var(--soft); padding: 3px 12px; border-radius: var(--r-pill); font-weight: 700; font-style: italic; }
.ws-big { margin: 0; font-size: calc(clamp(40px, 11vw, 60px) * var(--scale)); line-height: 1.04; letter-spacing: -.012em; overflow-wrap: anywhere; font-weight: 500; }
.ws-def { margin: 0; font-size: calc(clamp(20px, 5vw, 23px) * var(--scale)); line-height: 1.42; padding: var(--s5); background: var(--card); border-radius: var(--r-l); box-shadow: var(--shadow); position: relative; text-wrap: pretty; }
.ws-block { display: flex; flex-direction: column; gap: var(--s2); }
.ws-label { margin: 0; font-size: var(--t-s); font-weight: 700; color: var(--muted); }
.ws-ex { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ws-ex li { padding: var(--s3) 0; font-size: calc(clamp(17px, 4.4vw, 19px) * var(--scale)); line-height: 1.55; border-top: 1px solid var(--line); text-wrap: pretty; }
.ws-ex li:first-child { border-top: 0; padding-top: var(--s1); }
.ws-ex mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 5px; padding: 0 3px; }
.ws-rel { display: grid; grid-template-columns: 1fr; gap: var(--s5); }
.ws-rel > div { display: flex; flex-direction: column; gap: var(--s2); }
@media (min-width: 560px) { .ws-rel:has(> div + div) { grid-template-columns: 1fr 1fr; } }
.ws-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-chip { display: inline-flex; align-items: center; min-height: 38px; padding: 0 15px; border: 0; border-radius: var(--r-pill); background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--line); font-family: var(--serif); font-size: calc(1.0625rem * var(--scale)); text-decoration: none; }
.ws-chip.link { cursor: pointer; box-shadow: 0 0 0 1px var(--line), 0 2px 0 var(--lip); transition: background-color var(--d2) var(--ease), transform var(--d1) var(--ease); }
@media (hover: hover) { .ws-chip.link:hover { background: var(--soft); } }
.ws-chip.link:active { transform: translateY(1px); }
.ws-chip.link:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.ws-mixcard { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 2px var(--s3); width: 100%; text-align: left; border: 0; border-radius: var(--r-m); padding: var(--s4); background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 2px 0 var(--lip); cursor: pointer; font: inherit; }
.ws-mixcard strong { font-size: calc(1.1875rem * var(--scale)); font-weight: 600; }
.ws-mixcard span { color: var(--muted); font-size: var(--t-s); grid-column: 1; }
.ws-mixcard .icon { grid-row: 1 / span 2; grid-column: 2; color: var(--muted); }
/* Word sheet actions: the main action gets the full width and the three small ones share the row under it, evenly
   spaced. The sheet is a narrow panel on every screen, so this one layout fits everywhere. */
.ws-acts { display: flex; flex-direction: column; align-items: stretch; gap: var(--s3); padding-top: var(--s4); border-top: 1px solid var(--line); }
.ws-acts > .btn { width: 100%; margin-bottom: 4px; }
.ws-more { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s2); }
.ws-more .ws-act { min-width: 0; padding: var(--s2) var(--s1); }
.ws-act span { white-space: nowrap; }
.ws-act { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 62px; padding: 6px 8px; border: 0; border-radius: var(--r-m); background: none; color: var(--ink); font: inherit; font-size: var(--t-xs); font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ws-act .icon { width: 22px; height: 22px; }
@media (hover: hover) { .ws-act:hover { background: var(--soft); } }
.ws-act:focus-visible { outline: 3px solid var(--link); outline-offset: 1px; }
.ws-src { margin: 0; }
/* Your own word: who added it, with Edit and Delete beside it */
.ws-own { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s3); }
.ws-own-acts { display: flex; gap: var(--s2); }

/* 3.4: meet the words, make it yours, second chances */
.meet { width: 100%; background: var(--card); border-radius: var(--r-l); box-shadow: var(--shadow-lift); padding: var(--s6) var(--s5) var(--s5); display: flex; flex-direction: column; gap: var(--s4); text-align: left; position: relative; overflow: hidden; }
.meet::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 120px; background: radial-gradient(ellipse at 50% -20%, rgba(242,181,68,.16), transparent 70%); pointer-events: none; }
.meethead { display: flex; flex-direction: column; align-items: center; gap: var(--s2); text-align: center; position: relative; }
.meethead .qw { font-size: calc(clamp(38px, 10.5vw, 56px) * var(--scale)); line-height: 1.08; white-space: nowrap; max-width: 100%; }
.meethead .ws-pos { margin-bottom: 2px; }
.meetdef { font-size: calc(clamp(19px, 4.6vw, 22px) * var(--scale)); line-height: 1.45; text-align: center; text-wrap: balance; max-width: 32ch; margin: 0 auto; }
.meetex { font-size: calc(1.125rem * var(--scale)); line-height: 1.55; color: var(--ink); border-top: 1px solid var(--line); padding-top: var(--s4); margin: 0; text-wrap: pretty; }
.meetex mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 5px; padding: 0 3px; }
.meetex .exlabel { display: block; font-family: var(--sans, inherit); font-size: var(--t-s); font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.meetlike { font-size: var(--t-s); margin: 0; text-align: center; }
.useit { width: 100%; display: flex; flex-direction: column; gap: var(--s2); }
textarea.mine { width: 100%; min-height: 104px; resize: vertical; border-radius: var(--r-m, 14px); border: 2px solid var(--line); background: var(--card); color: var(--ink); padding: var(--s3) var(--s4); font: inherit; font-size: calc(1.125rem * var(--scale)); line-height: 1.5; }
textarea.mine:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.minenote { text-align: left; margin: 0 2px; }
.minenote.warn { color: var(--bad); font-weight: 600; }
.lcmp { display: inline-flex; gap: 1px; font-family: var(--serif); font-size: calc(1.375rem * var(--scale)); letter-spacing: .04em; margin-right: var(--s2); color: var(--ink); }
.lcmp b { font-weight: 400; padding: 0 1px; border-radius: 4px; }
.lcmp b.diff { color: var(--bad); background: var(--bad-bg); font-weight: 700; }
.readme { align-self: center; gap: 6px; text-decoration: none; font-weight: 600; }
.reviewlist .rk.dot { width: 20px; display: inline-flex; justify-content: center; }
.reviewlist .rk.dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.qcard.retry .qkind { background: color-mix(in srgb, var(--accent) 22%, var(--card)); color: var(--ink); }
.ws-mine { margin: 0; font-size: calc(clamp(17px, 4.4vw, 19px) * var(--scale)); line-height: 1.55; background: var(--soft); border-radius: var(--r-m, 14px); padding: var(--s3) var(--s4); text-wrap: pretty; }
.meethead .dipa { align-self: center; }

/* 3.4: letters you tap are always big, equal and evenly spaced */
.slots, .tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: calc(var(--cols, 8) * var(--lt, 48px) + (var(--cols, 8) - 1) * 8px); margin-inline: auto; }
.slot, .ltile { width: var(--lt, 48px); height: calc(var(--lt, 48px) * 1.08); min-height: 46px; flex: 0 0 auto; font-size: calc(clamp(22px, 6vw, 28px) * var(--scale)); }
.hkeys { --gap: 8px; gap: var(--gap); max-width: 460px; }
.hrow { gap: var(--gap); }
.hkey { flex: 0 0 calc((100% - 6 * var(--gap)) / 7); max-width: none; height: 52px; font-size: 20px; border-radius: 12px; }
@media (max-width: 559px) {
  .wsgrid { --gap: 3px; padding: 6px; width: calc(100% + 2 * var(--gutter) - 12px); margin-inline: calc(-1 * var(--gutter) + 6px); }
  .wc { font-size: clamp(17px, 5vw, 22px); border-radius: 7px; }
}
.hslots { max-width: calc(var(--cols, 10) * var(--lt, 40px) + (var(--cols, 10) - 1) * 6px); margin-inline: auto; }
.hslot { width: var(--lt, 40px); }
@media (max-width: 559px) {
  .hkeys { --gap: 6px; width: calc(100% + 2 * var(--gutter) - 12px); max-width: none; margin-inline: calc(-1 * var(--gutter) + 6px); }
  .hkey { height: 54px; }
}

/* 3.4: every game fits one phone screen. Feedback and buttons stick to the bottom edge. */
.pfoot { position: sticky; bottom: 0; z-index: 3; margin-inline: calc(-1 * var(--gutter)); padding: var(--s3) var(--gutter) calc(var(--s3) + var(--safe-bottom)); margin-bottom: calc(-1 * (var(--s5) + var(--safe-bottom))); }
.pfoot:empty { padding: 0; }
/* the sticky footer must never cover the end of the card: leave room to scroll it into view */
.play .qcard { scroll-margin-bottom: 120px; }
.play > .stack { padding-bottom: var(--s3); }
@media (orientation: landscape) and (max-height: 500px) { .play > .stack { padding-bottom: 96px; } }
.pfoot:has(.verdict) { background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); border-radius: 22px 22px 0 0; box-shadow: 0 -8px 24px rgba(24,33,43,.10); animation: slideUpIn .35s var(--spring) both; }
.wsnow { display: none; width: 100%; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: var(--s2); background: var(--card); border-radius: var(--r-m); box-shadow: 0 2px 0 var(--lip); padding: var(--s2); min-height: 76px; }
.wsnowtext { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.wsnowtext .cd { font-size: calc(1rem * var(--scale)); line-height: 1.35; text-wrap: balance; }
.wsnowtext .len { font-size: var(--t-xs); color: var(--muted); }
@media (max-width: 899px), (max-height: 819px) {
  .wsnow { display: grid; }
  .wsclues { display: none; }
}
@media (max-height: 780px) {
  .play { gap: var(--s3); padding-top: calc(var(--s2) + var(--safe-top)); }
  .qcard { gap: var(--s3); }
  .qprompt { min-height: 0; padding: var(--s5) var(--s4); gap: var(--s2); }
  .qprompt .qw { font-size: calc(clamp(32px, 9vw, 46px) * var(--scale)); }
  .qprompt .qd { font-size: calc(clamp(17px, 4.4vw, 20px) * var(--scale)); }
  .qprompt .qs { font-size: calc(clamp(18px, 4.6vw, 21px) * var(--scale)); }
  .opts { gap: var(--s2); }
  .opt { min-height: 52px; padding: var(--s2) var(--s4); font-size: calc(1rem * var(--scale)); }
  .opt.word { font-size: calc(1.1875rem * var(--scale)); }
  .opt.sent { font-size: calc(1rem * var(--scale)); line-height: 1.38; }
  .meet { padding: var(--s4); gap: var(--s3); }
  .meethead .qw { font-size: calc(clamp(32px, 9vw, 46px) * var(--scale)); }
  .meetdef { font-size: calc(1.125rem * var(--scale)); }
  .meetex { font-size: calc(1rem * var(--scale)); padding-top: var(--s3); }
  textarea.mine { min-height: 76px; }
  .hkeys { --gap: 5px; }
  .hkey { height: 46px; }
  .hslot { height: 36px; }
  .hlights i { width: 12px; height: 15px; }
  .mcard { min-height: 88px; }
  .story { padding: var(--s4); gap: var(--s3); }
  .sline { line-height: 1.5; font-size: calc(1.0625rem * var(--scale)); }
  .verdict { padding: var(--s3); }
  .verdict strong { font-size: var(--t-m, 18px); }
  .spellin { min-height: 52px; }
}
@media (max-height: 780px) {
  /* the grid gives up a little width so the whole puzzle and its clue fit on screen */
  .wsgrid { width: min(calc(100% + 2 * var(--gutter) - 12px), max(270px, calc(100dvh - 330px))); margin-inline: auto; }
  .wsstatus { font-size: var(--t-xs); margin: 0; }
  .wsnow { min-height: 64px; padding: 4px; }
  textarea.mine { min-height: 64px; }
  .meetex .exlabel { display: inline; margin: 0 6px 0 0; }
}
@media (max-height: 700px) {
  .wsstatus { display: none; }
  .wsgrid { width: min(calc(100% + 2 * var(--gutter) - 12px), max(300px, calc(100dvh - 300px))); }
}
.wsacts { flex-wrap: nowrap; gap: var(--s2); }
.wsacts .btn { white-space: nowrap; }
@media (max-height: 780px) { .wsgrid { margin-inline: 0; } }

/* 3.4: the answer moment, redone. Calm, one surface, the result in its own color. */
.playbg::after { content: ""; position: absolute; inset: 0; background:
  radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--card) 72%, transparent), transparent 75%),
  linear-gradient(to bottom, color-mix(in srgb, var(--bg) 30%, transparent), color-mix(in srgb, var(--bg) 70%, transparent)); }
.playbg img { opacity: .5; filter: blur(30px) saturate(1.35); }
[data-theme="dark"] .playbg img { opacity: .35; }
.qkind { background: none; box-shadow: none; padding: 0; font-size: var(--t-s); font-weight: 700; color: var(--muted); letter-spacing: .01em; }
.qprompt .dipa, .meethead .dipa { box-shadow: none; background: color-mix(in srgb, var(--ink) 6%, transparent); padding: 5px 14px; }
.opt.right { background: var(--good-bg); color: var(--good); box-shadow: inset 0 0 0 2px var(--good); animation: rightPop .45s var(--spring); font-weight: 600; }
.opt.wrong { background: var(--bad-bg); color: var(--bad); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--bad) 40%, transparent); animation: shake .42s var(--ease); }
.opts.answered .opt:not(.right):not(.wrong) { opacity: .4; box-shadow: none; }
.opt.aside { height: 0 !important; min-height: 0; padding-block: 0; margin-block: -6px 0; opacity: 0; transition: height .32s var(--ease), padding .32s var(--ease), margin .32s var(--ease), opacity .18s var(--ease); }
.pfoot:has(.verdict) { background: var(--card); border-radius: 26px 26px 0 0; box-shadow: 0 -1px 0 var(--line), 0 -18px 40px -12px rgba(24,33,43,.18); -webkit-backdrop-filter: none; backdrop-filter: none; padding-top: var(--s5); gap: var(--s4); }
.pfoot:has(.verdict.good) { background: var(--good-bg); box-shadow: 0 -18px 40px -14px rgba(29,107,85,.25); }
.pfoot:has(.verdict.bad) { background: var(--bad-bg); box-shadow: 0 -18px 40px -14px rgba(162,58,42,.22); }
.verdict, .verdict.good, .verdict.bad { display: flex; flex-direction: column; align-items: stretch; gap: var(--s2); background: none; padding: 0; border-radius: 0; animation: none; }
.verdict .vhead { display: flex; align-items: center; gap: var(--s3); }
.verdict .vbadge { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; color: #fff; }
.verdict.good .vbadge { background: var(--good); } .verdict.bad .vbadge { background: var(--bad); }
[data-theme="dark"] .verdict .vbadge { color: var(--bg); }
.verdict .vbadge .icon { width: 18px; height: 18px; stroke-width: 3; }
.verdict strong { font-family: var(--serif); font-size: calc(1.3125rem * var(--scale)); font-weight: 600; line-height: 1.25; }
.verdict.good strong { color: var(--good); } .verdict.bad strong { color: var(--bad); }
.verdict .vbody { margin: 0 0 0 44px; color: var(--ink); font-family: var(--serif); font-size: calc(1.0625rem * var(--scale)); line-height: 1.5; text-wrap: pretty; }
.verdict .vbody mark { background: color-mix(in srgb, var(--accent) 34%, transparent); color: inherit; border-radius: 4px; padding: 0 3px; }
.verdict .vbody b { font-weight: 700; }
.btn.vgo { border: 0; color: #fff; font-weight: 700; }
.pfoot:has(.verdict.bad) .btn.vgo { background: var(--bad); box-shadow: 0 4px 0 color-mix(in srgb, var(--bad) 60%, #000); }
.pfoot:has(.verdict.good) .btn.vgo { background: var(--good); box-shadow: 0 4px 0 color-mix(in srgb, var(--good) 60%, #000); }
[data-theme="dark"] .btn.vgo { color: var(--bg); }
@media (max-height: 780px) { .pfoot:has(.verdict) { padding-top: var(--s4); gap: var(--s3); } .verdict strong { font-size: calc(1.1875rem * var(--scale)); } .verdict .vbody { font-size: calc(1rem * var(--scale)); } }
/* the play screen sits on clean paper with only a breath of the scene's color at the top */
.playbg { background: linear-gradient(to bottom, var(--card), var(--bg) 70%); }
.playbg img { opacity: .2; filter: blur(44px) saturate(1.5); -webkit-mask-image: linear-gradient(to bottom, #000, transparent 60%); mask-image: linear-gradient(to bottom, #000, transparent 60%); }
[data-theme="dark"] .playbg img { opacity: .22; }
.playbg::after { background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--card) 40%, transparent), transparent 80%); }
/* Make it yours: Skip sits beside Save, so the note above the box stays in view */
.pfoot .actions.mineacts { display: flex; flex-direction: row; gap: var(--s3); width: 100%; }
.pfoot .actions.mineacts .btn { margin: 0; }
.pfoot .actions.mineacts .btn.quiet { flex: 0 0 auto; padding-inline: var(--s5); }
.pfoot .actions.mineacts .btn.primary { flex: 1 1 auto; }
/* The Journey road: a paper path laid across the ground. Sand with a crisp edge and a soft shadow, footsteps down
   the middle, and the stretch you've walked traced in gold, so the way forward reads at a glance. */
.land { --road: #EFE6D4; --road-edge: #C7B595; --road-shadow: rgba(60, 44, 20, .16); --trail-dot: rgba(120, 96, 58, .55); }
[data-theme="dark"] .land { --road: #343E49; --road-edge: #1E252D; --road-shadow: rgba(0, 0, 0, .45); --trail-dot: rgba(236, 239, 242, .42); }
.jmap .trail path.roadshadow { stroke: var(--road-shadow); stroke-width: 48; stroke-dasharray: none; stroke-linecap: round; animation: none; transform: translateY(5px); filter: blur(3px); }
.jmap .trail path.roadedge { stroke: var(--road-edge); stroke-width: 44; }
.jmap .trail path.road { stroke: var(--road); stroke-width: 39; }
.jmap.land .trail path.steps { stroke: var(--trail-dot); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 0 15; animation: none; }
.jmap.land .trail path.walked { stroke: var(--accent); stroke-width: 6; stroke-linecap: round; stroke-dasharray: none; animation: none; filter: drop-shadow(0 0 5px rgba(242, 181, 68, .55)); }
/* More road between stops, so it feels like walking somewhere */
.jmap.land .jnode { margin-bottom: 44px; }
/* Stops sit on the road like stations: a clear rim, solid labels that never blend into the path */
.jmap.land .jnode .disc { box-shadow: 0 0 0 4px var(--card), 0 5px 0 4px var(--lip), 0 18px 26px -14px rgba(24,33,43,.5); }
.jmap.land .jnode.current .disc { box-shadow: 0 0 0 5px var(--accent), 0 6px 0 5px var(--accent-lip), 0 22px 30px -14px rgba(24,33,43,.55); }
.jmap.land .jnode.locked .disc { filter: grayscale(.55); opacity: 1; }
.jmap.land .jnode.locked .disc img { opacity: .78; }
.jmap.land .jnode .nm { background: var(--card); color: var(--ink); font-weight: 700; padding: 4px 12px; border-radius: var(--r-pill); box-shadow: 0 0 0 1px var(--line), 0 2px 0 var(--lip); position: relative; z-index: 1; margin-top: 4px; }
.jmap.land .jnode.locked .nm { color: var(--muted); font-weight: 600; }
.jmap.land .jnode .nl { box-shadow: 0 0 0 1px var(--line), 0 2px 0 var(--lip); }
/* The scenery answers a tap: the picture moves and a few small pieces appear around it, then fade */
.land .dc { pointer-events: auto; padding: 0; border: 0; margin: 0; background: none; color: inherit; font: inherit; -webkit-appearance: none; appearance: none; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.land .dc:focus { outline: none; }
.land .dc img { pointer-events: none; -webkit-user-drag: none; }
.land .dc .fxbit { position: absolute; z-index: 2; pointer-events: none; display: block; line-height: 0; will-change: transform, opacity; }
.land .dc .fxbit svg { display: block; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .18)); }
.land .dc .glowdot { width: 6px; height: 6px; border-radius: 50%; background: var(--c, #FFD27A); box-shadow: 0 0 8px 3px color-mix(in srgb, var(--c, #FFD27A) 70%, transparent); }
.land .dc .ring { width: 100%; height: 100%; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 0 0 1px rgba(90, 175, 185, .35); }
.land .dc .note { font: 700 20px/1 var(--serif); color: #6B5BA6; line-height: 1; text-shadow: 0 1px 0 rgba(255, 255, 255, .8); }
[data-theme="dark"] .land .dc .note { color: #CDBFF5; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.land .dc .puff { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0)); }
.land .dc .puff.dust { width: 14px; height: 14px; background: radial-gradient(closest-side, rgba(170, 150, 120, .7), rgba(170, 150, 120, 0)); }
.land .dc .flake { width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 3px rgba(255, 255, 255, .9), 0 0 0 .5px rgba(120, 140, 160, .35); }
.land .dc .bee { width: 9px; height: 7px; border-radius: 50%; background: repeating-linear-gradient(90deg, #F2B544 0 2px, #2B2118 2px 4px); box-shadow: -2px -3px 0 -1px rgba(255, 255, 255, .9), 1px -3px 0 -1px rgba(255, 255, 255, .9); }
.land .dc .paper { width: 7px; height: 10px; border-radius: 1.5px; box-shadow: 0 1px 1px rgba(0, 0, 0, .15); }
