/* ============ Theme: Meadow Morning (solarpunk) ============ */
:root {
  --sky-1: #f6e0c8;       /* top of the sky: soft peach */
  --sky-2: #f9ecdc;
  --sky-3: #f6f2e4;
  --sky-4: #e9f1da;       /* towards the hills */
  --panel: rgba(255, 253, 245, 0.62);
  --panel-solid: #fffdf5;
  --panel-2: rgba(255, 253, 245, 0.72);
  --border: rgba(77, 120, 62, 0.18);
  --border-strong: rgba(77, 120, 62, 0.35);
  --text: #2d4a2b;
  --muted: #557552;
  --dim: #7a9172;
  --accent: #4e8f45;      /* changed per season from levels/seasons.js */
  --on-accent: #fffbea;   /* text on accent buttons */
  --sun: #e9a23b;
  --good: #3f8a4f;
  --ok: #c98a1e;
  --bad: #c4553f;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --serif: 'Fraunces', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background-color: var(--sky-2); /* the sky itself is drawn by .sky-day / .sky-night */
  color: var(--text);
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
button:focus { outline: none; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
.label { color: var(--dim); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.good { color: var(--good); }
.ok { color: var(--ok); }
.bad { color: var(--bad); }

/* ============ Layout & screens ============ */
/* ============ Scenery (day & night) ============ */
.scenery { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.sky { position: absolute; inset: 0; transition: opacity 1.2s ease; }
/* Soft, diffused sunrise: a pale sun glow top-right over a peach-to-meadow gradient */
.sky-day {
  background:
    radial-gradient(circle at 82% 8%, rgba(255, 233, 196, 0.85) 0, rgba(255, 233, 196, 0.45) 46px, rgba(255, 233, 196, 0) 150px),
    radial-gradient(70% 45% at 80% 4%, rgba(252, 208, 160, 0.35), rgba(252, 208, 160, 0) 70%),
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 22%, var(--sky-3) 52%, var(--sky-4) 100%);
}
/* Calm night: deep indigo fading to a teal haze over the hills, moonlight top-right */
.sky-night {
  opacity: 0;
  background:
    radial-gradient(60% 40% at 82% 8%, rgba(236, 232, 196, 0.16), rgba(236, 232, 196, 0) 70%),
    linear-gradient(180deg, #131a36 0%, #1d2850 28%, #2f4168 60%, #46636e 100%);
}
.stars { position: absolute; left: 0; top: 0; width: 100%; height: 70%; }
.moon {
  position: absolute; right: 11%; top: 12%; width: 54px; height: 54px; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fbf8e6 0%, #efe9c9 60%, #e2dbb6 100%);
  box-shadow: 0 0 30px 8px rgba(240, 236, 200, .25), 0 0 90px 30px rgba(240, 236, 200, .08);
}
.moon::before, .moon::after { content: ''; position: absolute; border-radius: 50%; background: rgba(190, 182, 150, .35); }
.moon::before { width: 11px; height: 11px; left: 30px; top: 14px; }
.moon::after { width: 7px; height: 7px; left: 16px; top: 32px; }
@media (max-width: 600px) {
  /* On phones the top-right corner is busy (timer, toggle): the moon sits top-left, smaller */
  .moon { right: auto; left: 6%; top: 88px; width: 34px; height: 34px; }
  .moon::before { width: 7px; height: 7px; left: 19px; top: 9px; }
  .moon::after { width: 5px; height: 5px; left: 10px; top: 20px; }
  .sky-night { background:
    radial-gradient(50% 30% at 12% 10%, rgba(236, 232, 196, 0.14), rgba(236, 232, 196, 0) 70%),
    linear-gradient(180deg, #131a36 0%, #1d2850 28%, #2f4168 60%, #46636e 100%); }
}
.hills { position: absolute; left: 0; bottom: 0; width: 100%; height: min(30vh, 300px); }
.birds { position: absolute; left: 10%; top: 13%; width: 54px; fill: none; stroke: #8a7a60; stroke-width: 1.6; opacity: .45; }
.night-only { opacity: 0; transition: opacity 1.2s ease; }
.hills path, .hills .tufts { transition: fill 1.2s ease, stroke 1.2s ease; }
.hills .flowers { transition: opacity 1.2s ease; }
:root[data-theme="night"] .hill-far { fill: #34505e; }
:root[data-theme="night"] .hill-mid { fill: #2f4a4b; }
:root[data-theme="night"] .hill-near { fill: #29423a; }
:root[data-theme="night"] .tufts { stroke: #3a5a48; }
:root[data-theme="night"] .flowers { opacity: .72; }
.day-only { transition: opacity 1.2s ease; }
.firefly { animation: firefly 3.2s ease-in-out infinite; }
@keyframes firefly { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.twinkle { animation: twinkle 4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

:root[data-theme="night"] .sky-night,
:root[data-theme="night"] .night-only { opacity: 1; }
:root[data-theme="night"] .day-only { opacity: 0; }

/* Day / night toggle (menu, top right) */
.screen .theme-toggle { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; display: flex; align-items: center; gap: 6px; }
.theme-toggle svg { width: 16px; height: 16px; fill: currentColor; stroke: currentColor; }
.theme-toggle .icon-moon { stroke: none; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="night"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="night"] .theme-toggle .icon-moon { display: none; }
.app { z-index: 1; position: relative; height: 100vh; height: 100dvh; max-width: 1024px; margin: 0 auto; }
.screen {
  position: absolute; inset: 0;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  display: none; flex-direction: column; align-items: center;
  opacity: 0; transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease;
}
.screen.is-active { display: flex; }
.screen.is-visible { opacity: 1; transform: none; }
.screen-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding-top: 36px; padding-bottom: calc(44px + min(16vh, 160px)); }

/* ============ Tactile buttons ============
   Every button has a "lip" underneath. Pressing sinks it into the lip, releasing springs it back.
   js/feel.js adds .is-pressed instantly on touch (iOS :active is unreliable) and a ripple at the finger. */
.btn, .btn-next, .pill-btn {
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .22s var(--spring), box-shadow .22s var(--spring), background-color .15s ease, filter .15s ease;
}
.btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  width: 100%; min-height: 54px; padding: 14px 20px; border-radius: 999px;
  font-weight: 800; font-size: 1.05rem;
  --lip: rgba(53, 90, 45, 0.3);
  box-shadow: 0 4px 0 var(--lip), 0 10px 18px rgba(70, 90, 40, 0.12);
}
.btn.is-pressed, .btn:active:not(:disabled) {
  transform: translateY(3px) scale(.985);
  box-shadow: 0 1px 0 var(--lip), 0 4px 8px rgba(70, 90, 40, 0.12);
  transition-duration: .06s;
}
.btn-lg { min-height: 72px; padding: 16px 20px; font-size: 1.15rem; border-radius: 26px; }
.btn-sub { font-size: .76rem; font-weight: 600; opacity: .7; }
.btn-primary, .btn-accent { background: var(--accent); color: var(--on-accent); --lip: color-mix(in srgb, var(--accent) 45%, #000); }
.btn-secondary { background: var(--panel-2); border: 1.5px solid var(--border); color: var(--text); --lip: rgba(77, 120, 62, 0.22); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn-ghost { min-height: 44px; color: var(--muted); font-size: .9rem; padding: 10px; box-shadow: none; }
.btn-ghost.is-pressed, .btn-ghost:active { box-shadow: none; transform: scale(.96); }
.btn:disabled { cursor: default; }
@media (hover: hover) {
  .btn:not(:disabled):hover { filter: brightness(1.08); }
  .btn-ghost:hover { color: var(--text); filter: none; }
}
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: -1;
  background: currentColor; opacity: .2; transform: scale(0);
  animation: ripple .55s ease-out forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* ============ Menu ============ */
.screen-menu { justify-content: center; gap: 48px; }
.menu-head { text-align: center; }
.logo { font-family: var(--serif); font-size: clamp(2.9rem, 13.5vw, 4.6rem); font-weight: 800; letter-spacing: .01em; line-height: 1; }
.logo-drop { color: var(--accent); }
.tagline { margin-top: 12px; color: var(--muted); font-size: clamp(1rem, 4.2vw, 1.15rem); font-weight: 700; }
.season-tag {
  display: inline-block; margin-top: 16px; padding: 6px 14px; border-radius: 999px;
  font-size: .85rem; font-weight: 700; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.menu-buttons { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 14px; }
.menu-date { color: var(--dim); font-size: .8rem; font-weight: 600; }

/* ============ Game ============ */
.game-wrap {
  width: 100%; max-width: 460px; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  transition: opacity .25s ease;
}
.game-wrap.is-fading { opacity: 0; }
.game-logo { font-family: var(--serif); font-size: 1.1rem; font-weight: 800; letter-spacing: .1em; color: var(--text); margin-right: -.1em; }
.hud { width: 100%; display: flex; align-items: center; gap: 8px; }
.hud .pill-time { margin-left: auto; }
.pill {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--muted);
  padding: 7px 14px; border-radius: 999px; font-size: .85rem; font-weight: 800;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-variant-numeric: tabular-nums;
}
.pill-btn { min-width: 40px; min-height: 36px; padding: 6px 12px; color: var(--text); box-shadow: 0 3px 0 rgba(77,120,62,.25); }
.pill-btn.is-pressed, .pill-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(77,120,62,.25); transition-duration: .06s; }
.pill-time.low { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }

.target {
  font-family: var(--serif); font-size: clamp(4rem, 20vw, 6.75rem); font-weight: 800; line-height: 1; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

/* No frame: the shape floats over the meadow */
.board {
  position: relative; flex-shrink: 0;
  width: min(100%, 460px, calc(100dvh - 360px)); min-width: 220px; aspect-ratio: 1;
  touch-action: none; cursor: pointer;
}
#game-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.zones { position: absolute; inset: 0 0 6px; display: flex; flex-direction: column; pointer-events: none; opacity: 0; transition: opacity .4s ease; }
.zones.is-on { opacity: 1; }
.zone { flex: 1; display: flex; justify-content: center; padding: 12px; }
.zone-add { align-items: flex-start; }
.zone-remove { align-items: flex-end; }
.zone span {
  font-size: .7rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase;
  color: var(--muted); background: rgba(255, 253, 243, .85); border: 1.5px solid #c3dba8;
  padding: 6px 14px; border-radius: 999px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform .2s var(--spring), border-color .15s ease, background-color .15s ease;
}
.board.hold-add .zone-add span, .board.hold-remove .zone-remove span {
  border-color: var(--accent); color: var(--text); transform: scale(1.08);
  background: color-mix(in srgb, var(--accent) 14%, #fffdf3);
}
.zones.pulse span { animation: pulse 1s ease 2; }
@keyframes pulse { 50% { transform: scale(1.08); border-color: var(--accent); } }

/* Soft circular glow under the finger/cursor while holding (does not reveal where the middle is) */
.touch-glow {
  position: absolute; left: 0; top: 0; width: 140px; height: 140px; margin: -70px 0 0 -70px; border-radius: 50%;
  background: radial-gradient(circle, rgba(233,162,59,.22) 0%, rgba(233,162,59,.08) 40%, rgba(233,162,59,0) 70%);
  opacity: 0; transform: scale(.4); pointer-events: none;
  transition: opacity .2s ease, transform .3s var(--spring);
}
.touch-glow.is-on { opacity: 1; transform: scale(1); }

.timeline { width: min(70%, 320px); height: 6px; border-radius: 999px; overflow: hidden; background: rgba(77, 120, 62, .14); flex-shrink: 0; }
.timeline-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--sun)); transform-origin: left; }
.timeline.low .timeline-bar { background: var(--bad); }

.review {
  position: absolute; left: 50%; top: 50%; z-index: 5; min-width: 240px;
  transform: translate(-50%, -50%) scale(.9); opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .35s var(--spring);
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255, 253, 245, .95); border: 1.5px solid #d3e4bd; border-radius: 26px; padding: 20px 24px;
  box-shadow: 0 20px 40px -12px rgba(70, 90, 40, .35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.review.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
.review-label { color: var(--dim); font-size: .7rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.review-diff { font-family: var(--serif); font-size: 3rem; font-weight: 800; margin: 2px 0 12px; }
.review-row { display: flex; gap: 32px; width: 100%; justify-content: center; border-top: 1px solid var(--border); padding-top: 12px; }
.review-row > div { display: flex; flex-direction: column; align-items: center; }
.review-k { color: var(--dim); font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.review-v { font-size: 1.25rem; font-weight: 900; }
.btn-next {
  margin-top: 16px; width: 100%; min-height: 46px; padding: 12px 16px; border-radius: 999px;
  font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 45%, #000);
}
.btn-next.is-pressed, .btn-next:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 45%, #000); transition-duration: .06s; }

.btn-lock { flex-shrink: 0; min-height: 56px; background: var(--accent); color: var(--on-accent); --lip: color-mix(in srgb, var(--accent) 45%, #000); }
.btn-lock:disabled { background: var(--panel-2); color: var(--dim); border: 1.5px solid var(--border); box-shadow: none; transform: none; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn-lock:not(:disabled) { animation: lock-ready .4s var(--spring); }
@keyframes lock-ready { 0% { transform: scale(.96); } 100% { transform: none; } }
.hint { color: var(--muted); font-size: .85rem; font-weight: 700; text-shadow: 0 0 8px rgba(255, 253, 240, .9), 0 0 2px rgba(255, 253, 240, .9); text-align: center; min-height: 2.6em; max-width: 420px; }

/* ============ Results ============ */
.results-title { font-family: var(--serif); font-size: 2rem; font-weight: 800; text-align: center; }
#results-date { margin: 4px 0 24px; font-weight: 600; }
.results-accuracy { font-family: var(--serif); font-size: clamp(3.5rem, 16vw, 4.5rem); font-weight: 800; margin: 4px 0 28px; }

.cards { width: 100%; max-width: 760px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 28px; }
.cards.single { grid-template-columns: 1fr; max-width: 280px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 20px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.card-name { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: .75rem; font-weight: 900; background: rgba(255,255,255,.7); border: 1px solid var(--border); border-radius: 7px; padding: 2px 6px; }
.card-canvas { position: relative; aspect-ratio: 1; background: rgba(255,255,255,.35); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.card-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.card-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 8px; font-size: .72rem; color: var(--dim); font-weight: 600; }
.card-foot b { color: var(--text); }
@media (min-width: 640px) {
  .card { padding: 16px; gap: 12px; }
  .card-name { font-size: .8rem; }
  .card-foot { font-size: .85rem; }
}

.actions { width: 100%; max-width: 420px; display: flex; gap: 12px; }
.actions .btn { flex: 1; white-space: nowrap; padding-left: 12px; padding-right: 12px; }

.daily-extra { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mini-stats { display: flex; gap: 28px; margin-bottom: 20px; }
.mini-stats div, .stat { display: flex; flex-direction: column; align-items: center; }
.mini-stats b { font-family: var(--serif); font-size: 1.7rem; font-weight: 800; }
.mini-stats span, .stat span { color: var(--dim); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.countdown { font-family: var(--serif); font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ============ Stats ============ */
.stat-grid { width: 100%; max-width: 420px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 24px 0 28px; }
.stat { grid-column: span 2; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 14px 6px; text-align: center; }
.stat.wide { grid-column: span 3; }
.stat b { font-family: var(--serif); font-size: 1.7rem; font-weight: 800; }
.recent { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 8px; margin: 12px 0 28px; }
.recent-row { display: grid; grid-template-columns: 96px 1fr 56px; align-items: center; gap: 10px; font-size: .8rem; font-weight: 600; }
.recent-date { color: var(--muted); }
.recent-acc { text-align: right; font-variant-numeric: tabular-nums; }
.recent-bar { height: 10px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.recent-bar span { display: block; height: 100%; border-radius: 999px; background: currentColor; }

/* ============ Toast & debug ============ */
.toast {
  position: fixed; top: max(20px, env(safe-area-inset-top)); left: 50%; z-index: 50;
  transform: translate(-50%, -10px) scale(.95); opacity: 0; pointer-events: none;
  background: var(--accent); color: var(--on-accent); padding: 12px 22px; border-radius: 999px; font-weight: 700;
  box-shadow: 0 10px 25px rgba(70,90,40,.3); transition: opacity .25s ease, transform .35s var(--spring);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.debug-badge {
  position: fixed; top: 10px; left: 10px; z-index: 50;
  background: rgba(220,38,38,.9); border: 1px solid #f87171; color: #fff;
  font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}

/* ============ Night mode ============ */
:root[data-theme="night"] {
  --sky-2: #1d2850;
  --panel: rgba(20, 28, 56, 0.55);
  --panel-solid: #1a2446;
  --panel-2: rgba(28, 38, 70, 0.62);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.24);
  --text: #eef0e2;
  --muted: #c3cfb8;
  --dim: #93a58e;
  --accent: #5f9f55;
  --on-accent: #fffbea;
  --sun: #e9d98a;
  --good: #92d483;
  --ok: #f0c463;
  --bad: #f2917c;
}
:root[data-theme="night"] .btn { --lip: rgba(0, 0, 0, 0.4); box-shadow: 0 4px 0 var(--lip), 0 10px 18px rgba(0, 0, 0, .25); }
:root[data-theme="night"] .btn-primary, :root[data-theme="night"] .btn-accent, :root[data-theme="night"] .btn-lock:not(:disabled) { --lip: color-mix(in srgb, var(--accent) 40%, #000); }
:root[data-theme="night"] .btn-ghost { box-shadow: none; }
:root[data-theme="night"] .pill-btn { box-shadow: 0 3px 0 rgba(0, 0, 0, .4); }
:root[data-theme="night"] .hint { text-shadow: 0 0 8px rgba(12, 18, 40, .9), 0 0 2px rgba(12, 18, 40, .9); }
:root[data-theme="night"] .zone span { background: rgba(20, 28, 56, .8); border-color: rgba(255, 255, 255, .2); }
:root[data-theme="night"] .board.hold-add .zone-add span,
:root[data-theme="night"] .board.hold-remove .zone-remove span { background: color-mix(in srgb, var(--accent) 25%, rgba(20, 28, 56, .9)); }
:root[data-theme="night"] .touch-glow { background: radial-gradient(circle, rgba(246,226,122,.22) 0%, rgba(246,226,122,.08) 40%, rgba(246,226,122,0) 70%); }
:root[data-theme="night"] .timeline { background: rgba(255, 255, 255, .12); }
:root[data-theme="night"] .review { background: rgba(20, 28, 56, .94); border-color: rgba(255, 255, 255, .16); box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .6); }
:root[data-theme="night"] .badge { background: rgba(0, 0, 0, .25); }
:root[data-theme="night"] .card-canvas { background: rgba(255, 255, 255, .04); }
:root[data-theme="night"] .birds { stroke: #c3cfb8; }
:root[data-theme="night"] .menu-date { text-shadow: 0 0 6px rgba(12, 18, 40, .9); color: var(--muted); }

/* ============ Larger screens ============ */
@media (min-width: 900px) and (min-height: 760px) {
  .game-wrap { gap: 14px; }
  .target { font-size: 7rem; }
}
/* Short screens (small phones, landscape laptops): tighten the vertical rhythm */
@media (max-height: 700px) {
  .game-wrap { gap: 8px; }
  .game-logo { display: none; }
  .target { font-size: clamp(3.4rem, 15vh, 5rem); }
  .board { width: min(100%, 460px, calc(100dvh - 280px)); }
  .hint { min-height: 0; font-size: .8rem; }
  .screen-menu { gap: 32px; }
}
/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01s !important; }
}
