:root {
  color-scheme: dark;
  --night: #222c3b;
  --night-soft: #2f3d4e;
  --panel: #394a59;
  --cream: #fff1dc;
  --muted: #d4cdc1;
  --sage: #b5d3b1;
  --sage-dark: #496a58;
  --gold: #f0ce91;
  --line: #71808c;
}

* { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 0; min-height: 100vh; min-height: 100dvh; background: radial-gradient(circle at 50% -10%, #42566a 0, var(--night) 48%); color: var(--cream); font-family: ui-rounded, "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button { min-height: 48px; border: 0; font: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; cursor: pointer; }
button:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.hub-link { display: inline-flex; min-height: 44px; align-items: center; margin-bottom: 10px; color: var(--cream); font-size: .82rem; font-weight: 850; text-decoration: none; }
.hub-link:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.app { width: min(100%, 560px); margin: 0 auto; padding: calc(18px + env(safe-area-inset-top)) 14px calc(24px + env(safe-area-inset-bottom)); overflow-x: clip; }
.masthead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.eyebrow, .kicker { margin: 0 0 5px; color: var(--gold); font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.9rem, 9vw, 2.75rem); line-height: .98; letter-spacing: -.055em; }
h1 em { display: block; color: var(--sage); font-style: normal; }
.moon { display: grid; width: 52px; height: 52px; place-items: center; flex: 0 0 auto; border: 1px solid #696677; border-radius: 17px; background: #4d4b59; color: var(--gold); font-size: 2rem; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; margin: 24px 0 12px; }
.intro h2 { margin: 0; font-size: 1.35rem; }
.intro p:not(.kicker) { max-width: 34rem; margin: 6px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.route { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid #718271; border-radius: 999px; background: #304638; font-size: .77rem; font-weight: 900; letter-spacing: .05em; }
.garden { position: relative; margin-bottom: -22px; }
.hills { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 18px #10182444); }
.growth { position: absolute; right: 26%; bottom: 18%; left: 25%; display: flex; align-items: end; justify-content: center; min-height: 38px; pointer-events: none; }
.flower { display: inline-block; margin-left: -5px; font-size: clamp(1.05rem, 5vw, 1.55rem); filter: drop-shadow(0 3px 2px #14241988); animation: bloom .28s ease-out both; }
.flower-1 { transform: translateY(-8px) rotate(-5deg); }
.flower-2 { transform: translateY(3px) rotate(6deg); }
.game-panel { position: relative; padding: 18px 14px; border: 1px solid #617480; border-radius: 22px; background: var(--panel); box-shadow: 0 12px 35px #11192555; }
.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.current { margin-right: auto; }
.current small { display: block; color: var(--muted); font-size: .7rem; }
.current strong { display: block; color: var(--sage); font-size: 1.55rem; letter-spacing: .12em; }
.badge { padding: 6px 9px; border-radius: 999px; background: #526272; color: var(--cream); font-size: .72rem; }
.game-panel h2 { margin: 18px 0 10px; font-size: 1rem; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.word-card { min-width: 0; padding: 12px 4px 9px; border: 2px solid #789081; border-radius: 15px; background: #4e6659; color: var(--cream); box-shadow: 0 5px 0 #273f34; }
.word-card span { display: block; font-size: clamp(1rem, 5vw, 1.32rem); font-weight: 900; letter-spacing: .08em; }
.word-card strong { color: var(--gold); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.word-card small { display: block; margin-top: 8px; color: #edf3e7; font-size: .64rem; line-height: 1.2; }
.word-card:active { transform: translateY(3px); box-shadow: 0 2px 0 #273f34; }
.announcement { min-height: 42px; margin: 14px 0; padding: 10px 11px; border-left: 4px solid var(--sage); border-radius: 7px 12px 12px 7px; background: #2d3b48; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.completion { margin: 12px 0; padding: 14px; border: 1px solid #8dac8d; border-radius: 15px; background: #315346; text-align: center; }
.completion span, .completion strong { display: block; }
.completion strong { margin-top: 5px; color: var(--gold); font-size: 1.35rem; }
.completion p { margin: 4px 0 0; font-size: .8rem; }
.path-review { margin-top: 10px; border-top: 1px solid var(--line); }
.path-review summary { min-height: 44px; padding: 13px 2px 8px; color: var(--cream); font-weight: 800; cursor: pointer; }
.path-review ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 5px 0 12px; padding: 0; list-style: none; }
.path-review li { display: flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 800; }
.path-review li span { padding: 6px 8px; border-radius: 8px; background: #526576; }
.path-review li[aria-current] span { background: var(--sage); color: #213128; }
.path-review b { color: var(--gold); }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.actions button { padding: 10px; border-radius: 13px; background: var(--gold); color: #263440; font-weight: 850; }
.actions .secondary { border: 1px solid #7c8b99; background: transparent; color: var(--cream); }
.experiment-note { margin: 14px 6px 0; color: var(--muted); font-size: .7rem; text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

@keyframes bloom { from { opacity: 0; transform: translateY(8px) scale(.65); } to { opacity: 1; } }
@media (max-width: 350px) {
  .app { padding-right: 10px; padding-left: 10px; }
  .intro { grid-template-columns: 1fr; }
  .route { width: max-content; }
  .word-card small { font-size: .58rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
