/* Base style: layout, HUD, buttons, dialogs, results. The game's own identity lives in styles.css.

   Layout: natural size. The UI fills the window at real
   pixel sizes: the HUD is pinned to the window edges and the content is centred with max
   widths. Nothing zooms up on a large monitor. Only a window smaller than the layout's
   minimum (1000x600 landscape, 380x820 portrait) is shrunk to fit; JS then sets --s below 1
   and the overlays outside the viewport follow it. body[data-orient] picks the portrait
   layout, body.is-short the compact landscape one.

   Motion: nothing appears or disappears with a cut. Shapes overshoot and settle
   (0 -> 60% -> 80% -> 100%), groups stagger, physical reactions are springs written into
   --kx/--ky/--kr/--px/--py by JS, and the world freezes for a beat on impact (body.hitstop).

   Colour roles: blue = synonym, orange = antonym, green = right, pink-red = wrong, gold =
   time and score. Every state also carries a symbol and a word. */

:root {
  --s: 1;
  --bg: #020818;
  --navy-950: #030a24;
  --navy-900: #040d2e;
  --navy-800: #071642;
  --navy-700: #0b2160;
  --navy-600: #12358f;
  --ink: #0a1440;
  --ink-soft: #4a5d93;
  --muted: #9db4ec;
  --label: #8fb2ff;
  --card: #ffffff;
  --card-2: #e9f0ff;
  --card-edge: #c3d3fb;

  --syn: #2f7bff;
  --syn-hi: #6fb4ff;
  --syn-deep: #1748b8;
  --ant: #ff9818;
  --ant-hi: #ffc46b;
  --ant-deep: #c45f00;
  --gold: #ffc53a;
  --gold-hi: #ffe68a;
  --gold-deep: #ff9818;
  --ok: #2ef0a0;
  --ok-ink: #0a7448;
  --ok-deep: #0c9c5f;
  --bad: #ff4d7e;
  --bad-hi: #ffa2bd;
  --bad-ink: #a50f3b;
  --bad-deep: #d61b50;
  --cyan: #46e3ff;

  --f-ui: "Figtree", "Segoe UI", system-ui, sans-serif;
  --f-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;

  --out: cubic-bezier(.2, .8, .2, 1);
  --back: cubic-bezier(.3, 1.5, .5, 1);
  --snap: cubic-bezier(.2, 1.8, .4, 1);
  --in: cubic-bezier(.5, 0, .75, 0);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body {
  color: #fff; font-family: var(--f-ui);
  background: radial-gradient(80% 70% at 50% 42%, var(--bg-glow) 0%, var(--navy-700) 42%, var(--navy-900) 80%, var(--bg) 100%) fixed var(--bg);
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; touch-action: manipulation; }

/* --------------------------------------------------------------- layers */

.orbits { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; display: block; }
body::after { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(95% 85% at 50% 45%, transparent 58%, rgba(var(--deep-rgb), .6) 100%); }
#app { position: fixed; inset: 0; z-index: 1; overflow: hidden; }
/* fills the window; JS sizes it and scales it down only when the window is below the minimum */
#viewport { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-origin: 0 0; }
#shaker { position: absolute; inset: 0; transform-origin: 50% 45%; }
#shaker.is-punch { animation: punch .22s var(--out); }
#ui { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 18px 28px 22px; }
#stage { position: fixed; inset: 0; z-index: 15; pointer-events: none; }
#stage canvas { display: block; width: 100%; height: 100%; pointer-events: none; }
.fx-layer { position: fixed; inset: 0; z-index: 30; pointer-events: none; overflow: hidden; }

/* the hit-stop: every CSS animation holds its frame for a beat */
body.hitstop *, body.hitstop *::before, body.hitstop *::after { animation-play-state: paused !important; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:where(button, input):focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

kbd {
  display: inline-block; min-width: 1.6em; padding: 1px 6px;
  font: 700 .78em var(--f-ui); text-align: center; color: inherit;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); border-bottom-width: 2px; border-radius: 5px;
}
@media (pointer: coarse) { .kbd-hint { display: none !important; } }

/* --------------------------------------------------------------- corner + hud */

.corner { position: absolute; top: 18px; right: 28px; z-index: 22; display: flex; gap: 10px; }
.corner .icon-btn { animation: pop-in .5s var(--back) both; animation-delay: calc(200ms + var(--ci, 0) * 60ms); }
.corner .icon-btn:nth-child(2) { --ci: 1; } .corner .icon-btn:nth-child(3) { --ci: 2; } .corner .icon-btn:nth-child(4) { --ci: 3; }

.icon-btn {
  position: relative; width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; cursor: pointer;
  font: 800 20px var(--f-ui); color: #fff;
  background: linear-gradient(180deg, var(--navy-600), var(--navy-700));
  border: 2px solid rgba(var(--accent-rgb), .45); border-radius: 14px;
  box-shadow: 0 4px 0 var(--navy-950), 0 8px 18px rgba(0, 0, 20, .35);
  transition: translate .14s var(--out), border-color .14s, box-shadow .14s;
}
.icon-btn svg { width: 22px; height: 22px; fill: currentColor; }
.icon-btn:hover { translate: 0 -3px; border-color: var(--syn-hi); box-shadow: 0 7px 0 var(--navy-950), 0 0 18px rgba(var(--brand-rgb), .55); }
.icon-btn:active, .icon-btn.is-down { translate: 0 3px; box-shadow: 0 1px 0 var(--navy-950); transition-duration: .05s; }
.icon-btn[aria-pressed="true"] .wave { opacity: 0; }
.icon-btn[aria-pressed="true"] { color: var(--muted); }

#hud {
  position: absolute; top: 18px; left: 28px; right: 28px; z-index: 21;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; height: 48px;
  pointer-events: none; /* the empty right column sits under the corner buttons */
  transition: opacity .35s var(--out), translate .45s var(--back), visibility 0s;
}
/* off the play screen the HUD lifts away and leaves the tab order once it has gone */
body:not([data-screen="play"]) #hud { opacity: 0; translate: 0 -90px; visibility: hidden; transition: opacity .25s var(--in), translate .3s var(--in), visibility 0s .3s; }
body:not([data-screen="play"]) #hud * { pointer-events: none; }
.hud-left { display: flex; align-items: center; gap: 12px; pointer-events: auto; }
.hud-centre { grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; }

.readout {
  display: inline-flex; align-items: center; gap: 9px; height: 48px; padding: 0 18px 0 13px;
  background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
  border: 2px solid rgba(var(--gold-rgb), .6); border-radius: 999px;
  box-shadow: 0 4px 0 var(--navy-950), 0 8px 18px rgba(0, 0, 20, .3);
}
.readout.is-gain { animation: pill-gain .42s var(--back); }
.readout-icon { width: 22px; height: 22px; fill: var(--gold); }
.readout-label { font: 700 14px var(--f-ui); color: var(--muted); }
.readout-value { display: inline-block; min-width: 2ch; font: 800 28px/1 var(--f-display); letter-spacing: .02em; font-variant-numeric: tabular-nums; }

.streak {
  display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 14px 0 10px;
  font: 800 24px var(--f-display); color: #fff;
  background: linear-gradient(180deg, var(--ant-hi), var(--ant)); border-radius: 999px;
  box-shadow: 0 4px 0 var(--ant-deep), 0 0 18px rgba(255, 152, 24, .5);
  transform-origin: 30% 50%;
  transition: opacity .2s, scale .3s var(--back);
  opacity: 0; scale: .2; pointer-events: none;
}
.streak.is-on { opacity: 1; scale: 1; }
.streak svg { width: 18px; height: 18px; fill: currentColor; }
.streak.is-bump { animation: bump .45s var(--back); }
.streak.is-break { animation: streak-break .5s var(--out) forwards; }
body[data-overdrive="2"] .streak.is-on, body[data-overdrive="3"] .streak.is-on { animation: flame .5s ease-in-out infinite alternate; }

.segments { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 520px; }
.seg { position: relative; width: 14px; height: 14px; border-radius: 50%; background: rgba(var(--muted-rgb), .16); border: 2px solid rgba(var(--muted-rgb), .32); transition: background .25s, border-color .25s, scale .35s var(--back); }
.seg.is-in { animation: dot-in .42s var(--back) backwards; animation-delay: calc(var(--i) * 28ms); }
.seg.is-current { border-color: var(--gold); background: rgba(var(--gold-rgb), .3); scale: 1.3; }
.seg.is-current::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(var(--gold-rgb), .5); animation: ring-pulse 1.6s var(--out) infinite; }
.seg.is-good { background: var(--ok); border-color: var(--ok); }
.seg.is-bad { background: var(--bad); border-color: var(--bad); }
.seg.is-pop { animation: dot-pop .5s var(--back); }
.progress-label { margin: 0; font: 700 15px var(--f-ui); color: var(--muted); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- screens */

#screens { position: relative; flex: 1; min-height: 0; }
.screen { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.screen.is-active { display: flex; }

/* staged entrances: children marked .enter / .enter-pop play when the screen enters */
.screen.is-entering .enter { animation: rise-in .6s var(--out) both; animation-delay: var(--d, 0ms); }
.screen.is-entering .enter-pop { animation: pop-in .6s var(--back) both, var(--after, none); animation-delay: var(--d, 0ms), calc(var(--d, 0ms) + 600ms); }
.screen.is-leaving { animation: screen-out .22s var(--in) forwards; }

/* --------------------------------------------------------------- start cover */

.tap-start {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; border: 0; cursor: pointer;
  background: radial-gradient(80% 70% at 50% 42%, var(--bg-glow) 0%, var(--navy-700) 42%, var(--navy-900) 80%, var(--bg) 100%) var(--bg);
  transition: opacity .45s var(--out);
}
.tap-start-text { font: 800 34px var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: #fff; text-shadow: 0 0 24px rgba(var(--accent-rgb), .8); animation: breathe 1.8s ease-in-out infinite; }
.tap-start.is-gone { opacity: 0; pointer-events: none; }

/* --------------------------------------------------------------- menu */

#screen-menu { gap: 12px; padding-bottom: 18px; }
/* the logo: drops in, squashes on landing, then floats; a sheen sweeps it, the swap badge glows */

.tagline { margin: 0; font: 700 24px var(--f-ui); color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 30, .45); }

.demo { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; } /* clears the badge overhang */

.menu-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 6px; }
.readouts { display: flex; gap: 12px; margin: 4px 0 0; justify-content: center; }
.readouts div { display: flex; align-items: baseline; gap: 7px; padding: 7px 16px; background: rgba(var(--deep-rgb), .72); border: 1px solid rgba(var(--accent-rgb), .3); border-radius: 999px; }
.readouts dt { font: 600 15px var(--f-ui); color: var(--muted); }
.readouts dd { margin: 0; font: 800 18px var(--f-ui); }

/* --------------------------------------------------------------- buttons */

.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
  font: 700 19px var(--f-ui); color: #fff;
  background: linear-gradient(180deg, var(--navy-600), var(--navy-700));
  border: 2px solid rgba(var(--accent-rgb), .5); border-radius: 16px;
  padding: 12px 26px; min-height: 54px;
  box-shadow: 0 5px 0 var(--navy-950), 0 12px 24px rgba(0, 0, 20, .4);
  translate: var(--mx, 0px) var(--my, 0px);
  transition: translate .14s var(--out), box-shadow .14s var(--out), filter .14s;
}
.btn:hover:not(:disabled) { translate: var(--mx, 0px) calc(var(--my, 0px) - 3px); box-shadow: 0 8px 0 var(--navy-950), 0 16px 30px rgba(0, 0, 20, .5); filter: brightness(1.08); }
.btn:active:not(:disabled), .btn.is-down { translate: var(--mx, 0px) calc(var(--my, 0px) + 4px); box-shadow: 0 1px 0 var(--navy-950); transition-duration: .05s; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.is-release { animation: jelly .42s var(--out); }

/* coloured buttons: white text clears 4.5:1 across the whole gradient (top var(--brand-hi) = 4.98, top #d4245d = 4.99) */
.btn-primary { font-weight: 800; background: linear-gradient(180deg, var(--action-top), var(--action-bottom)); border-color: var(--action-ring); box-shadow: 0 5px 0 var(--action-edge), 0 12px 28px rgba(var(--gold-rgb), .35); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 8px 0 var(--action-edge), 0 18px 36px rgba(var(--gold-rgb), .45); }
.btn-primary:active:not(:disabled), .btn-primary.is-down { box-shadow: 0 1px 0 var(--action-edge); }
.btn-ghost { background: rgba(var(--deep-rgb), .78); }
.btn-light { color: var(--ink); background: linear-gradient(180deg, #fff, #e3ecff); border-color: #fff; box-shadow: 0 5px 0 var(--card-edge), 0 10px 22px rgba(0, 0, 30, .25); }
.btn-light:hover:not(:disabled) { box-shadow: 0 8px 0 var(--card-edge), 0 14px 26px rgba(0, 0, 30, .3); }
.btn-light:active:not(:disabled), .btn-light.is-down { box-shadow: 0 1px 0 var(--card-edge); }
.btn-warn { color: #fff; background: linear-gradient(180deg, #d4245d, #a8103f); border-color: #ffb3c8; box-shadow: 0 5px 0 #7d0a2e, 0 12px 26px rgba(214, 27, 80, .35); }
.btn-warn:hover:not(:disabled) { box-shadow: 0 8px 0 #7d0a2e, 0 16px 32px rgba(214, 27, 80, .45); }
.btn-warn:active:not(:disabled), .btn-warn.is-down { box-shadow: 0 1px 0 #7d0a2e; }
.btn-sm { font-size: 15px; padding: 7px 14px; min-height: 44px; border-radius: 12px; }

.btn-play {
  --after: breathe 2.6s ease-in-out infinite;
  min-width: 360px; min-height: 92px; padding: 12px 42px 12px 20px; gap: 18px;
  font: 800 38px var(--f-ui); color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #dfe9ff);
  border: 3px solid #fff; border-radius: 28px;
  box-shadow: 0 0 0 5px rgba(var(--accent-rgb), .55), 0 7px 0 var(--play-edge), 0 20px 44px rgba(0, 0, 30, .55);
}
.btn-play:hover:not(:disabled) { box-shadow: 0 0 0 8px rgba(var(--accent-rgb), .78), 0 10px 0 var(--play-edge), 0 26px 50px rgba(0, 0, 30, .6); }
.btn-play:active:not(:disabled), .btn-play.is-down { box-shadow: 0 0 0 5px rgba(var(--accent-rgb), .55), 0 1px 0 var(--play-edge); }
.menu-actions { position: relative; }
.menu-actions::before {
  content: ''; position: absolute; inset: -18px -30px; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), .45), transparent); animation: halo 2.6s ease-in-out infinite;
}
.btn-play:hover .hexicon { animation: hex-spin .6s var(--back); }

.hexicon {
  display: grid; place-items: center; width: 42px; height: 46px; flex: 0 0 auto;
  font: 800 22px var(--f-ui); color: #fff;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(180deg, var(--syn-hi), var(--syn));
}
.hexicon svg { width: 22px; height: 22px; fill: #fff; }
.hexicon--blue { width: 62px; height: 68px; }
.hexicon--blue svg { width: 30px; height: 30px; margin-left: 4px; }

.ripple { position: absolute; border-radius: 50%; pointer-events: none; width: 12px; height: 12px; margin: -6px 0 0 -6px; background: rgba(255, 255, 255, .6); animation: ripple .6s var(--out) forwards; }

/* --------------------------------------------------------------- top slot: timer / coach */

/* the top padding clears the HUD plus the stopwatch crown, which overhangs its box */

/* Calm background (settings) hides the drifting marks; the circuit pulses stop in circuit.ts */

/* The timer: a gold stopwatch. The ring drains clockwise with a glowing head, the number turns
   over each second, the ring recharges with a sweep for every pair, the knob clicks when the
   clock starts, and a speed-bonus tag drains beside it for the first seconds. */

/* on shorter landscape screens the big dial would reach the progress counter: back to the compact size */

/* a quiet label, not a shout: outlined gold pill in the UI face */

/* --------------------------------------------------------------- the card */

/* the card warms up as a streak grows */

/*
 * The pair row is symmetric by construction: each word sits in a pill, and the grid's two 1fr
 * columns size to the wider pill, so both pills are always the same width. The badge stays on
 * the card's centre line, the speakers sit at the pills' outer ends, and a short word is centred
 * inside its pill, so no side of the row is ever emptier than the other.
 */

/* the playing speaker changes colour and pulses a ring; it never grows into the word */
.sound-btn.is-playing { color: #fff; background: var(--syn); border-color: var(--syn); animation: speaker-pulse .8s ease-in-out infinite; }

/* read aloud: the letters lift in a wave and turn blue, without changing size */

.w { display: inline-block; white-space: nowrap; }
.ch { display: inline-block; transform-origin: 50% 85%; }

/* the artwork carries the state; the text glyph stays in the DOM for the game logic, unseen */

/* while the sentence is read, a wave runs through its words */

.sound-btn {
  width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; cursor: pointer; color: var(--syn);
  background: #fff; border: 2px solid #cfdcff; border-radius: 50%;
  box-shadow: 0 3px 0 #cfdcff;
  transition: translate .12s var(--out), color .15s, border-color .15s, box-shadow .12s;
}
.sound-btn svg { width: 22px; height: 22px; fill: currentColor; }
.sound-btn:hover { translate: 0 -2px; border-color: var(--syn-hi); box-shadow: 0 5px 0 #cfdcff, 0 0 0 4px rgba(var(--brand-rgb), .15); }
.sound-btn:active, .sound-btn.is-down { translate: 0 2px; box-shadow: 0 1px 0 #cfdcff; }
.sound-btn.is-stuck { animation: stuck-hop 1s var(--out); }

/* --------------------------------------------------------------- answer buttons */

/* the crack sits behind the label, so the words stay readable through it */

/* --------------------------------------------------------------- verdict (reserved space) */

.verdict {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; width: min(840px, 100%); min-height: 74px; margin-top: 22px; padding: 10px 12px 10px 14px; text-align: left; flex: none;
  background: rgba(var(--deep-rgb), .9); border: 2px solid rgba(var(--accent-rgb), .32); border-radius: 20px;
  box-shadow: 0 12px 28px rgba(0, 0, 20, .35);
  visibility: hidden; opacity: 0;
}
.verdict.is-shown { visibility: visible; opacity: 1; animation: fb-pop .5s var(--back); }
.verdict.is-leaving { visibility: visible; animation: fade-down .2s var(--in) forwards; }
.verdict-mark { flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font: 800 20px var(--f-ui); color: #fff; }
.verdict.is-shown .verdict-mark { animation: star-pop .5s var(--back) .08s backwards; }
.verdict.is-correct .verdict-mark { background: var(--ok-deep); box-shadow: 0 0 0 4px rgba(46, 240, 160, .25); }
.verdict.is-wrong .verdict-mark { background: var(--bad-deep); box-shadow: 0 0 0 4px rgba(255, 77, 126, .25); }
.verdict-copy { flex: 1 1 auto; min-width: 0; }
.verdict-title { display: block; font: 800 21px var(--f-ui); }
.verdict.is-correct .verdict-title { color: var(--ok); }
.verdict.is-wrong .verdict-title { color: #ff9dbb; }
.verdict-body { display: block; color: var(--muted); font: 600 17px/1.3 var(--f-ui); }
.verdict-body b { color: #fff; font-weight: 700; }

.btn-next { flex: 0 0 auto; min-height: 54px; padding: 10px 20px 10px 24px; font-size: 20px; font-weight: 800; }
/* the arrow leans toward the next pair and keeps nudging until it is pressed */
.next-arrow { width: 24px; height: 24px; flex: 0 0 auto; }
.verdict.is-shown .next-arrow { animation: arrow-nudge 1s ease-in-out infinite .6s; }
@keyframes arrow-nudge { 0%, 100% { translate: 0 0; } 50% { translate: 7px 0; } }
.countdown { width: 24px; height: 24px; transform: rotate(-90deg); }
.cd-track, .cd-bar { fill: none; stroke-width: 5; }
.cd-track { stroke: rgba(255, 255, 255, .3); }
.cd-bar { stroke: #fff; stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: 94.25; }
.countdown.is-paused { opacity: .45; }
/* one or the other: the ring when auto-advance is on, the arrow when it is off */
.btn-next.is-auto .next-arrow, .btn-next:not(.is-auto) .countdown { display: none; }
.verdict.is-shown .btn-next { animation: next-in .45s var(--back) .16s backwards, next-glow 2.4s ease-in-out 1.4s infinite; }

/* --------------------------------------------------------------- floating text (real px, scaled by --s) */

.points {
  position: absolute; margin: 0; translate: -50% -50%; white-space: nowrap;
  font: 800 calc(44px * var(--s)) var(--f-display); color: var(--gold); letter-spacing: .02em;
  -webkit-text-stroke: calc(1.5px * var(--s)) #4a2600; paint-order: stroke fill; text-shadow: 0 calc(4px * var(--s)) 0 #4a2600, 0 0 calc(18px * var(--s)) rgba(var(--gold-rgb), .8);
}
.points--fast { color: var(--cyan); font-size: calc(34px * var(--s)); -webkit-text-stroke-color: #03305a; text-shadow: 0 calc(4px * var(--s)) 0 #03305a, 0 0 calc(18px * var(--s)) rgba(70, 227, 255, .9); }

/* --------------------------------------------------------------- tutorial hand */

.tutor { position: fixed; z-index: 18; left: 0; top: 0; pointer-events: none; }
.tutor-body { position: relative; scale: var(--s); transform-origin: 26px 4px; transition: opacity .25s var(--out); }
.tutor.is-on .tutor-body { animation: hand-in .4s var(--back); }
.tutor.is-off .tutor-body { opacity: 0; transition: opacity .2s var(--in); }
/* the art's finger tip sits at (35.9, 0.3) of the 64px-wide image; the offset lands it on (26, 4) */
.tutor-hand { position: relative; left: -9.9px; top: 3.7px; display: block; width: 64px; height: auto; rotate: -14deg; transform-origin: 35.9px .3px; filter: drop-shadow(0 6px 10px rgba(0, 0, 30, .55)); user-select: none; }
.tutor.is-tap .tutor-hand { animation: tap .5s var(--out); }
.tutor-tap { position: absolute; left: 26px; top: 4px; width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 3px solid var(--gold); border-radius: 50%; opacity: 0; }
.tutor.is-tap .tutor-tap { animation: tap-ring .6s var(--out); }
.tutor-bubble {
  position: absolute; left: -44px; top: -84px; margin: 0; white-space: nowrap;
  padding: 10px 16px; font: 700 17px var(--f-ui); color: var(--ink);
  background: #fff; border-radius: 16px; box-shadow: 0 0 0 3px var(--gold), 0 12px 26px rgba(0, 0, 30, .5);
}
.tutor-bubble.is-swap { animation: bubble-in .35s var(--back); }
.tutor-bubble::after { content: ""; position: absolute; left: 60px; bottom: -8px; width: 16px; height: 16px; background: #fff; rotate: 45deg; box-shadow: 3px 3px 0 0 var(--gold); }
.tutor-bubble:empty { display: none; }
/* pointing at the badge, the caption hangs under the hand so it never covers the words */
.tutor.is-below .tutor-bubble { top: 112px; }
.tutor.is-below .tutor-bubble::after { top: -8px; bottom: auto; box-shadow: -3px -3px 0 0 var(--gold); }
body[data-orient="port"] .tutor-bubble { left: -160px; top: 70px; white-space: normal; width: 250px; }
body[data-orient="port"] .tutor-bubble::after { top: -8px; bottom: auto; left: 178px; box-shadow: -3px -3px 0 0 var(--gold); }

/* --------------------------------------------------------------- results */

.panel {
  color: var(--ink); background: linear-gradient(180deg, var(--card), var(--card-2));
  border-radius: 32px; box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .42), 0 8px 0 var(--card-edge), 0 30px 70px rgba(0, 0, 30, .6);
}
.screen.is-entering .panel { animation: deal-in .7s var(--back) backwards .1s; }
.panel--narrow { width: min(560px, 100%); padding: 34px; }

#screen-results { padding-top: 64px; }
.results { display: grid; grid-template-columns: 1.08fr 1fr; gap: 26px; width: min(1180px, 100%); height: 100%; max-height: 660px; padding: 28px 32px; }
.results-main { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; }
.results-title { margin: 0; font: 800 46px/1.05 var(--f-ui); letter-spacing: -.01em; color: var(--ink); }
.results-title .cl { display: inline-block; }
.screen.is-entering .results-title .cl { animation: drop-in .55s var(--back) backwards; animation-delay: calc(320ms + var(--i) * 36ms); }
.score-detail { margin: 6px 0 0; font: 700 18px var(--f-ui); color: var(--ink-soft); }
.screen.is-entering .score-detail { animation: rise-in .5s var(--out) backwards .7s; }

.stars-wrap { position: relative; margin: 10px 0 4px; }
.rays { position: absolute; left: 50%; top: 55%; width: 420px; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(rgba(var(--gold-rgb), .3) 0deg 8deg, transparent 8deg 22deg);
  -webkit-mask: radial-gradient(closest-side, #000 25%, transparent 100%); mask: radial-gradient(closest-side, #000 25%, transparent 100%);
  transition: opacity .8s var(--out); animation: rays-spin 14s linear infinite; }
.rays.is-on { opacity: 1; }
.stars { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 14px; }
.star { display: grid; place-items: center; width: 86px; aspect-ratio: 1; }
.star:nth-child(2) { width: 108px; margin-bottom: 16px; }
.star svg { width: 100%; height: 100%; fill: #dbe5ff; stroke: #c3d2fa; stroke-width: 1.2; stroke-linejoin: round; filter: drop-shadow(0 3px 0 #c3d2fa); }
.star.is-on svg { fill: var(--gold); stroke: #fff; stroke-width: 1.4; filter: drop-shadow(0 4px 0 var(--gold-deep)) drop-shadow(0 0 14px rgba(var(--gold-rgb), .8)); animation: star-pop .55s var(--back) backwards; }
.star.is-on.is-shine svg { animation: star-twinkle 2.6s ease-in-out infinite; }
.star.is-miss svg { animation: star-dud .4s var(--out); }

.results-top { display: flex; align-items: center; justify-content: center; gap: 34px; margin: 10px 0 12px; }
.dial { position: relative; width: 180px; aspect-ratio: 1; flex: 0 0 auto; }
.dial.is-land { animation: card-pop .5s var(--out); }
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.dial-track, .dial-bar { fill: none; stroke-width: 12; }
.dial-track { stroke: #dbe5ff; }
.dial-bar { stroke: var(--syn); stroke-linecap: round; stroke-dasharray: 320.44; stroke-dashoffset: 320.44; }
.dial.is-pass .dial-bar { stroke: var(--ok-deep); }
.dial.is-fail .dial-bar { stroke: var(--ant); }
.dial-value { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; padding-bottom: 14px; font: 800 56px var(--f-display); font-variant-numeric: tabular-nums; color: var(--ink); }
.dial-label { position: absolute; left: 0; right: 0; bottom: 23%; margin: 0; font: 700 14px var(--f-ui); color: var(--ink-soft); }
.screen.is-entering .results-top { animation: rise-in .55s var(--out) backwards .55s; }

.heroes { display: flex; flex-wrap: wrap; gap: 10px 30px; align-items: flex-end; max-width: 320px; }
.hero-stat { display: flex; flex-direction: column; text-align: left; }
.hero-label { font: 700 14px var(--f-ui); color: var(--ink-soft); }
.hero-value { font: 800 56px/1 var(--f-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.minor-stats { flex: 1 1 100%; margin: 4px 0 0; text-align: left; font: 600 15px/1.6 var(--f-ui); color: var(--ink-soft); }
.minor-stats span { margin-right: 14px; white-space: nowrap; }
.minor-stats b { color: var(--ink); font-weight: 800; }

.pass-state { margin: 4px 0 14px; font: 700 18px var(--f-ui); }
.pass-state.is-pass { color: var(--ok-ink); }
.pass-state.is-fail { color: var(--ant-deep); }
.results-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.results-actions .btn { min-width: 210px; }
.results-actions .btn.is-arrive { animation: next-in .5s var(--back) backwards; animation-delay: calc(var(--ai, 0) * 90ms); }
#btn-practice.is-breathe { animation: next-glow 2.4s ease-in-out infinite; }
.save-state { margin: 12px 0 0; min-height: 1.3em; font: 600 15px var(--f-ui); color: var(--ink-soft); }
.save-state.is-error { color: var(--bad-ink); }
.save-state.is-saved { color: var(--ok-ink); }

.results-lists { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.screen.is-entering .results-lists { animation: rise-in .6s var(--out) backwards .5s; }
.column { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; padding: 16px 18px 6px; text-align: left; background: #f3f7ff; border: 2px solid #dbe5ff; border-radius: 20px; }
.column h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; font: 800 18px var(--f-ui); color: var(--ink); }
.column h3 .count { margin-left: auto; font: 700 15px var(--f-ui); color: var(--ink-soft); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot--ok { background: var(--ok-deep); }
.dot--err { background: var(--bad-deep); }
.column ul { flex: 1 1 auto; min-height: 0; margin: 0; padding: 0 6px 14px 0; list-style: none; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--card-edge) transparent; }
.column ul.is-scroll { -webkit-mask-image: linear-gradient(180deg, #000 84%, transparent); mask-image: linear-gradient(180deg, #000 84%, transparent); }
.column li { display: flex; align-items: baseline; gap: 9px; font: 600 18px/1.3 var(--f-ui); color: var(--ink-soft); }
.column li b { font-weight: 700; color: var(--ink); }
.column li .g-syn { color: var(--syn); font: 800 20px var(--f-ui); }
.column li .g-ant { color: var(--ant-deep); font: 800 20px var(--f-ui); }
.column li.is-empty { color: var(--ink-soft); }
.column li.is-in { animation: row-in .45s var(--out) backwards; animation-delay: var(--d, 0ms); }
.empty-body { max-width: 46ch; margin: 12px auto 20px; font: 600 18px/1.5 var(--f-ui); color: var(--ink-soft); }

/* --------------------------------------------------------------- dialogs */

.dialog { position: fixed; inset: 0; z-index: 25; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 16px; background: rgba(var(--deep-rgb), .72); backdrop-filter: blur(5px); animation: fade-in .25s var(--out); }
.dialog.is-closing { animation: fade-out .2s var(--in) forwards; }
.dialog-panel {
  width: min(540px, calc((100vw - 32px) / var(--s))); max-height: calc(90vh / var(--s)); overflow-y: auto; padding: 30px 32px; text-align: left; color: var(--ink);
  background: linear-gradient(180deg, var(--card), var(--card-2)); border-radius: 28px;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .45), 0 8px 0 var(--card-edge), 0 30px 80px rgba(0, 0, 0, .6);
  scale: var(--s); animation: dlg-in .42s var(--back);
}
.dialog.is-closing .dialog-panel { animation: dlg-out .2s var(--in) forwards; }
.dialog-panel--small { width: min(460px, calc((100vw - 32px) / var(--s))); }
.confirm-body { margin: 0 0 18px; font: 600 18px/1.5 var(--f-ui); color: var(--ink-soft); }
.dialog-panel h2 { margin: 0 0 14px; font: 800 30px/1.15 var(--f-ui); letter-spacing: -.01em; }
.help-list { margin: 0 0 16px; padding-left: 1.25em; font: 600 17px/1.6 var(--f-ui); }

.keys { width: 100%; border-collapse: collapse; margin-bottom: 18px; font: 600 16px var(--f-ui); }
.keys td { padding: 7px 0; border-bottom: 1px solid #dbe5ff; color: var(--ink-soft); }
.keys td:first-child { width: 46%; color: var(--ink); }
.dialog kbd { background: #fff; border-color: var(--card-edge); color: var(--ink); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 10px; }
/* the tutorial question: centred, the game's own "?" on top, two equal choices */
.dialog-panel--ask { text-align: center; padding-top: 0; overflow: visible; }
.ask-icon { display: block; width: 96px; height: auto; margin: -48px auto 6px; filter: drop-shadow(0 10px 14px rgba(0, 0, 40, .35)); animation: logo-float 3.8s ease-in-out infinite; user-select: none; }
.dialog-panel--ask .dialog-actions { justify-content: center; gap: 12px; }
.dialog-panel--ask { padding-inline: 18px; }
.dialog-panel--ask .btn { flex: 1 1 0; min-width: 0; max-width: 190px; padding-inline: 12px; font-size: 17px; }
.btn-outline { color: var(--ink); background: transparent; border-color: rgba(10, 26, 80, .28); box-shadow: 0 4px 0 rgba(10, 26, 80, .14); }
.btn-outline:hover:not(:disabled) { background: rgba(var(--brand-rgb), .08); border-color: var(--syn); box-shadow: 0 6px 0 rgba(10, 26, 80, .16); }
.btn-outline:active:not(:disabled), .btn-outline.is-down { box-shadow: 0 1px 0 rgba(10, 26, 80, .14); }
.field { display: grid; grid-template-columns: 8.5em 1fr 3.4em; align-items: center; gap: 10px; margin-bottom: 14px; font: 700 16px var(--f-ui); }
.field input[type="range"] { width: 100%; accent-color: var(--syn); height: 30px; }
.field output { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.switch { position: relative; display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font: 600 16px var(--f-ui); cursor: pointer; min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; flex: 0 0 auto; width: 52px; height: 30px; border-radius: 999px; background: #cdd9f7; transition: background .2s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 40, .3); transition: translate .28s var(--back); }
.switch input:checked + .switch-track { background: var(--syn); }
.switch input:checked + .switch-track::after { translate: 22px 0; }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--gold); outline-offset: 3px; }

/* =============================================================== portrait stage (430 wide) */

body[data-orient="port"] #ui { padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px) / var(--s)); }
body[data-orient="port"] #screens { align-self: center; width: min(100%, 560px); }
body[data-orient="port"] .corner { top: 14px; right: 16px; gap: 8px; }
body[data-orient="port"] .icon-btn { width: 44px; height: 44px; border-radius: 13px; }
body[data-orient="port"] #btn-full, body[data-orient="port"] #btn-restart { display: none; }
body[data-orient="port"] #hud { top: 14px; left: 16px; right: 16px; grid-template-columns: 1fr; grid-template-rows: 44px auto; height: auto; gap: 8px; padding-right: 0; }
body[data-orient="port"] .hud-left { padding-right: 160px; }
body[data-orient="port"] .hud-centre { grid-column: 1; }
body[data-orient="port"] .readout { height: 44px; }
body[data-orient="port"] .readout-label { display: none; }
body[data-orient="port"] .segments { gap: 6px; max-width: 100%; }
body[data-orient="port"] .seg { width: 12px; height: 12px; }

body[data-orient="port"] #screen-menu { gap: 12px; }

body[data-orient="port"] .tagline { font-size: 19px; }

body[data-orient="port"] .btn-play { min-width: 320px; min-height: 88px; font-size: 38px; }
body[data-orient="port"] .readouts { flex-wrap: wrap; gap: 8px; }
body[data-orient="port"] .readouts div { padding: 6px 12px; }

/* stacked (portrait, or a long phrase): pills full width, words on the centre line, every
   speaker in the same column at the right edge */

/* on a phone every pixel of width goes to the word: the speaker becomes a bubble on the pill's corner */

/* the two answers stay side by side on a phone, like keys on a keypad */

body[data-orient="port"] .verdict { width: 100%; flex-wrap: nowrap; gap: 10px; min-height: 0; margin-top: 18px; padding: 8px 8px 8px 10px; }
body[data-orient="port"] .verdict-mark { width: 34px; height: 34px; flex: 0 0 auto; font-size: 17px; }

body[data-orient="port"] .verdict-copy { flex: 1 1 0; min-width: 0; min-height: calc(16px * 1.2 + 4 * 13px * 1.25); display: flex; flex-direction: column; justify-content: center; }
body[data-orient="port"] .verdict-body { font-size: 13px; line-height: 1.25; }
body[data-orient="port"] .verdict-title { font-size: 16px; }
body[data-orient="port"] .btn-next { margin-left: 0; flex: 0 0 auto; min-height: max(48px, calc(46px / var(--s))); padding: 8px 14px 8px 16px; font-size: 18px; }
/* small phones scale the whole UI down: keep every small control about 44px under the finger, by
   widening its invisible hit area (the drawn size does not change) */
.icon-btn::after, .sound-btn::after { content: ''; position: absolute; inset: min(0px, calc((var(--hit, 44px) - 44px / var(--s)) / 2)); }
.sound-btn { position: relative; --hit: 46px; }
.icon-btn { --hit: 48px; }

body[data-orient="port"] #screen-results { padding-top: 64px; }
body[data-orient="port"] .results { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); width: 100%; height: 100%; max-height: none; padding: 22px 18px; gap: 14px; overflow: hidden; }
body[data-orient="port"] .results-title { font-size: 34px; }
body[data-orient="port"] .score-detail { font-size: 16px; }
body[data-orient="port"] .star { width: 64px; }
body[data-orient="port"] .star:nth-child(2) { width: 80px; margin-bottom: 12px; }
body[data-orient="port"] .rays { width: 300px; }
body[data-orient="port"] .results-top { gap: 18px; margin: 6px 0 8px; }
body[data-orient="port"] .dial { width: 124px; }
body[data-orient="port"] .dial-value { font-size: 40px; }
body[data-orient="port"] .dial-label { font-size: 13px; }
body[data-orient="port"] .heroes { gap: 4px 18px; max-width: 220px; }
body[data-orient="port"] .hero-value { font-size: 42px; }
body[data-orient="port"] .minor-stats { font-size: 13px; flex-wrap: wrap; justify-content: center; gap: 2px 12px; }
body[data-orient="port"] .results-lists { min-height: 150px; }
@media (max-height: 700px) {
  body[data-orient="port"] .star { width: 46px; }
  body[data-orient="port"] .star:nth-child(2) { width: 58px; margin-bottom: 8px; }
  body[data-orient="port"] .dial { width: 96px; }
  body[data-orient="port"] .dial-value { font-size: 32px; }
  body[data-orient="port"] .hero-value { font-size: 34px; }
  body[data-orient="port"] .results-title { font-size: 28px; }
  body[data-orient="port"] .results { padding: 16px 14px; gap: 10px; }
  body[data-orient="port"] .results-top { margin: 2px 0 4px; }
}
body[data-orient="port"] .pass-state { font-size: 16px; margin: 2px 0 10px; }
body[data-orient="port"] .results-actions .btn { min-width: 0; flex: 1 1 0; font-size: 17px; padding: 10px 12px; white-space: nowrap; }
body[data-orient="port"] .results-lists { flex-direction: row; gap: 10px; }
body[data-orient="port"] .column { padding: 12px 12px 4px; border-radius: 16px; }
body[data-orient="port"] .column h3 { font-size: 16px; }
body[data-orient="port"] .column li { font-size: 15px; flex-wrap: wrap; gap: 0 6px; }

body[data-orient="port"] .panel--narrow { width: 100%; }

/* =============================================================== short landscape (height < 640) */

body.is-short #ui { padding: 12px 24px 14px; }
body.is-short #hud { top: 12px; left: 24px; right: 24px; }

body.is-short .verdict { margin-top: 14px; min-height: 64px; }
body.is-short .results-title { font-size: 40px; }
body.is-short .hero-value { font-size: 48px; }
body.is-short .results-top { margin: 6px 0 8px; }
body.is-short .pass-state { margin: 2px 0 10px; }

body.is-short .tagline { font-size: 20px; }
body.is-short .demo { gap: 15px; }

body.is-short .menu-actions { gap: 10px; margin-top: 2px; }
body.is-short .btn-play { min-height: 72px; min-width: 300px; font-size: 32px; }
body.is-short .btn-play .hexicon--blue { width: 52px; height: 58px; }
body.is-short .readouts div { padding: 5px 14px; }
body.is-short #screen-menu { gap: 8px; padding-bottom: 4px; }
body.is-short .readouts { margin-top: 2px; }
body.is-short .readouts dd { font-size: 16px; } body.is-short .readouts dt { font-size: 14px; }
body.is-short #screen-results { padding-top: 58px; }
body.is-short .results { padding: 20px 26px; }
body.is-short .stars-wrap { margin: 4px 0 0; }
body.is-short .star { width: 70px; } body.is-short .star:nth-child(2) { width: 88px; }
body.is-short .dial { width: 150px; }

/* =============================================================== keyframes */

@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes rise-in { 0% { opacity: 0; transform: translateY(18px) scale(.97); } 60% { opacity: 1; transform: translateY(-2px) scale(1.005); } 100% { opacity: 1; transform: none; } }
@keyframes fade-down { to { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes screen-out { to { opacity: 0; transform: scale(.97); filter: blur(2px); } }
@keyframes pop-in { 0% { opacity: 0; transform: scale(.3) rotate(-8deg); } 55% { opacity: 1; transform: scale(1.12) rotate(2deg); } 78% { transform: scale(.96) rotate(-.5deg); } 100% { opacity: 1; transform: none; } }
@keyframes drop-in { 0% { opacity: 0; transform: translateY(-.55em) scale(.7) rotate(-8deg); } 55% { opacity: 1; transform: translateY(.06em) scale(1.08, .9); } 75% { transform: translateY(-.03em) scale(.97, 1.03); } 100% { opacity: 1; transform: none; } }
@keyframes logo-drop {
  0% { opacity: 0; transform: translateY(-160px) scale(.62) rotate(-7deg); }
  42% { opacity: 1; transform: translateY(12px) scale(1.07, .88) rotate(1deg); }
  60% { transform: translateY(-10px) scale(.97, 1.04) rotate(-.5deg); }
  78% { transform: translateY(3px) scale(1.01, .99); }
  100% { opacity: 1; transform: none; }
}
@keyframes logo-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-.4deg); } }
@keyframes logo-poke { 0% { transform: none; } 22% { transform: scale(1.06, .9) translateY(4px); } 48% { transform: scale(.97, 1.05) translateY(-8px) rotate(-1deg); } 72% { transform: scale(1.01, .99) rotate(.4deg); } 100% { transform: none; } }
@keyframes logo-sheen { 0%, 62% { background-position: 160% 0; } 100% { background-position: -60% 0; } }
@keyframes badge-glow { 0%, 100% { opacity: .55; scale: .9; } 50% { opacity: 1; scale: 1.12; } }
@keyframes poke { 0% { transform: none; } 18% { transform: scale(1.12, .84) translateY(6%); } 45% { transform: scale(.92, 1.1) translateY(-26%) rotate(-8deg); } 70% { transform: scale(1.05, .95) rotate(3deg); } 100% { transform: none; } }
@keyframes letter-flash { 0% { filter: brightness(2.2); transform: scale(1.12); } 100% { filter: none; transform: none; } }
@keyframes sent-wave { 0%, 55%, 100% { transform: none; } 25% { transform: translateY(-6px); color: var(--syn); text-shadow: 0 0 12px rgba(var(--brand-rgb), .35); } }
@keyframes letter-read { 0%, 100% { transform: none; } 40% { transform: translateY(-.16em); color: var(--syn); } }
@keyframes speaker-pulse { 0% { box-shadow: 0 0 0 0 rgba(var(--brand-rgb), .55); } 100% { box-shadow: 0 0 0 7px rgba(var(--brand-rgb), 0); } }
@keyframes letter-hop { 0% { transform: none; } 35% { transform: translateY(-.28em) rotate(-6deg) scale(1.1); } 70% { transform: translateY(.04em) scale(1.02, .97); } 100% { transform: none; } }
@keyframes letter-shiver { 0% { transform: none; } 30% { transform: translateX(-.06em) rotate(-5deg); } 60% { transform: translateX(.05em) rotate(4deg); } 100% { transform: none; } }
@keyframes deal-in { 0% { opacity: 0; transform: translateY(46px) scale(.92) rotate(1.5deg); } 60% { opacity: 1; transform: translateY(-5px) scale(1.012) rotate(-.3deg); } 80% { transform: translateY(1px) scale(.997); } 100% { opacity: 1; transform: none; } }
@keyframes deal-out { to { opacity: 0; transform: translateY(-22px) scale(.95) rotate(-1.2deg); } }
@keyframes card-pop { 0% { transform: scale(.97); filter: brightness(1.35); } 38% { transform: scale(1.03); filter: brightness(1.08); } 70% { transform: scale(.995); } 100% { transform: none; filter: none; } }
@keyframes spin-in { 0% { opacity: 0; transform: scale(0) rotate(-120deg); } 60% { opacity: 1; transform: scale(1.18) rotate(10deg); } 80% { transform: scale(.95) rotate(-3deg); } 100% { opacity: 1; transform: none; } }
@keyframes breathe-glyph { 0%, 100% { opacity: .6; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes badge-idle { 0%, 100% { transform: none; } 20% { transform: rotate(-12deg) scale(1.06); } 40% { transform: rotate(10deg) scale(1.06); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(3deg); } }
@keyframes flash { from { opacity: .95; } to { opacity: 0; } }
@keyframes ring-out { 0% { opacity: .85; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes ring-pulse { 0% { opacity: .9; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.12); } 28% { transform: scale(1); } 42% { transform: scale(1.07); } 56% { transform: scale(1); } }
@keyframes tick-pop { 0% { transform: scale(1.4); } 100% { transform: scale(1); } }
@keyframes count-drop { 0% { transform: translateY(-80px) rotate(-8deg); opacity: 0; } 18% { transform: translateY(4px) scale(1.12, .88); opacity: 1; } 30% { transform: translateY(-3px) scale(.96, 1.04); } 40%, 72% { transform: none; opacity: 1; } 100% { transform: scale(.6); opacity: 0; } }
@keyframes timer-drop { 0% { transform: translateY(-80px) scale(.7); opacity: 0; } 42% { transform: translateY(6px) scale(1.12, .86); opacity: 1; } 62% { transform: translateY(-5px) scale(.96, 1.05); } 80% { transform: translateY(1px) scale(1.01, .99); } 100% { transform: none; opacity: 1; } }
@keyframes timer-lock { 0% { transform: scale(1); } 30% { transform: scale(.9, .94); } 62% { transform: scale(1.07); } 100% { transform: none; } }
@keyframes knob-click { 0% { transform: none; } 35% { transform: translateY(5px) scaleY(.6); } 70% { transform: translateY(-1px); } 100% { transform: none; } }
@keyframes rim-flash { 0% { filter: brightness(2.2); } 100% { filter: none; } }
@keyframes digit-in { 0% { transform: translateY(-80%) scale(.8); opacity: 0; } 60% { transform: translateY(8%) scale(1.06); opacity: 1; } 100% { transform: none; } }
@keyframes shatter-out { 0% { transform: scale(1); filter: brightness(2); } 40% { transform: scale(1.18); } 100% { transform: none; filter: none; } }
@keyframes bolt { from { box-shadow: 0 3px 0 #0b6a88, 0 0 8px rgba(70, 227, 255, .5); } to { box-shadow: 0 3px 0 #0b6a88, 0 0 24px rgba(70, 227, 255, 1); } }
@keyframes key-in { 0% { opacity: .4; transform: translateY(16px) scale(.96); } 60% { opacity: 1; transform: translateY(-4px) scale(1.01); } 100% { opacity: 1; transform: none; } }
@keyframes gate-release { 0% { transform: scale(1.03, .94); } 40% { transform: scale(.98, 1.04) translateY(-4px); } 70% { transform: scale(1.01, .99); } 100% { transform: none; } }
@keyframes gate-win { 0% { transform: scale(1.03, .92); } 40% { transform: scale(.98, 1.06) translateY(-8px); } 70% { transform: scale(1.01, .99) translateY(1px); } 100% { transform: none; } }
@keyframes key-cheer { 0% { transform: none; } 30% { transform: translateY(-14px) rotate(-2deg); } 55% { transform: translateY(2px); } 78% { transform: translateY(-3px) rotate(.6deg); } 100% { transform: none; } }
@keyframes gate-flip {
  0% { transform: scaleX(1); }
  17% { transform: scaleX(0); }
  34% { transform: scaleX(1.05); }
  50% { transform: scaleX(.97) translateY(5px) rotate(-3deg); }
  80% { transform: scaleX(.99) translateY(3px) rotate(-2deg); }
  100% { transform: none; }
}
@keyframes back-on { 0%, 16.9% { opacity: 0; } 17%, 100% { opacity: 1; } }
@keyframes nudge { 0%, 100% { transform: none; } 20% { transform: translateX(-10px) rotate(-1deg); } 45% { transform: translateX(8px) rotate(1deg); } 70% { transform: translateX(-4px); } }
@keyframes idle-wave { 0%, 100% { transform: none; } 40% { transform: translateY(-8px) scale(1.02); } 70% { transform: translateY(1px); } }
@keyframes star-pop { 0% { opacity: 0; transform: scale(0) rotate(-45deg); } 55% { opacity: 1; transform: scale(1.4) rotate(10deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes star-dud { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes star-twinkle { 0%, 100% { filter: drop-shadow(0 4px 0 var(--gold-deep)) drop-shadow(0 0 10px rgba(var(--gold-rgb), .6)); } 50% { filter: drop-shadow(0 4px 0 var(--gold-deep)) drop-shadow(0 0 24px rgba(var(--gold-hi-rgb, 255, 230, 138), 1)); } }
@keyframes rays-spin { to { rotate: 360deg; } }
@keyframes fb-pop { 0% { opacity: 0; transform: translateY(18px) scale(.94); } 60% { opacity: 1; transform: translateY(-3px) scale(1.01); } 100% { opacity: 1; transform: none; } }
@keyframes next-in { 0% { opacity: 0; transform: translateX(-14px) scale(.9); } 60% { opacity: 1; transform: translateX(3px) scale(1.04); } 100% { opacity: 1; transform: none; } }
@keyframes next-glow { 0%, 100% { filter: none; } 50% { filter: brightness(1.12) drop-shadow(0 0 10px rgba(var(--accent-rgb), .8)); } }
@keyframes qm-float { from { transform: translateY(14px) rotate(-6deg); } to { transform: translateY(-18px) rotate(8deg); } }
@keyframes qm-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35) rotate(-14deg); opacity: .9; } 100% { transform: scale(1); } }

/* End of assets/index-DfFhCDJS.css */
