@keyframes word-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes halo { 0%, 100% { opacity: .45; scale: .92; } 50% { opacity: 1; scale: 1.06; } }
@keyframes breathe { 0%, 100% { scale: 1; } 50% { scale: 1.035; } }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.35) rotate(-5deg); } 60% { transform: scale(.95) rotate(2deg); } 100% { transform: none; } }
@keyframes pill-gain { 0% { transform: scale(1); } 30% { transform: scale(1.12); filter: brightness(1.4); } 60% { transform: scale(.98); } 100% { transform: none; filter: none; } }
@keyframes flame { from { box-shadow: 0 4px 0 var(--ant-deep), 0 0 12px rgba(255, 152, 24, .5); } to { box-shadow: 0 4px 0 var(--ant-deep), 0 0 32px rgba(255, 196, 107, 1); } }
@keyframes streak-break { 0% { transform: none; opacity: 1; } 30% { transform: scale(1.25) rotate(-8deg); } 100% { transform: scale(.4) rotate(16deg) translateY(12px); opacity: 0; } }
@keyframes dot-in { 0% { opacity: 0; transform: scale(0); } 60% { opacity: 1; transform: scale(1.3); } 100% { transform: none; } }
@keyframes dot-pop { 0% { transform: scale(1); } 40% { transform: scale(1.8); box-shadow: 0 0 0 7px rgba(46, 240, 160, .35); } 100% { transform: scale(1); } }
@keyframes ripple { to { transform: scale(28); opacity: 0; } }
@keyframes jelly { 0% { scale: 1; } 30% { scale: 1.1 .9; } 55% { scale: .95 1.05; } 80% { scale: 1.02 .98; } 100% { scale: 1; } }
@keyframes hex-spin { 0% { rotate: 0deg; } 100% { rotate: 360deg; } }
@keyframes heat { from { box-shadow: 0 0 0 3px var(--gold), 0 0 34px rgba(var(--gold-rgb), .6); } to { box-shadow: 0 0 0 4px var(--gold-hi), 0 0 64px rgba(var(--gold-rgb), 1); } }
@keyframes stuck-hop { 0%, 100% { transform: none; } 20% { transform: translateY(-10px) scale(1.1); } 40% { transform: translateY(0) scale(.96, 1.04); } 55% { transform: translateY(-5px); } 70% { transform: none; } }
@keyframes row-in { 0% { opacity: 0; transform: translateX(-18px); } 70% { opacity: 1; transform: translateX(2px); } 100% { opacity: 1; transform: none; } }
@keyframes dlg-in { 0% { opacity: 0; transform: translateY(24px) scale(.94); } 60% { opacity: 1; transform: translateY(-3px) scale(1.01); } 100% { opacity: 1; transform: none; } }
@keyframes dlg-out { to { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes hand-in { 0% { opacity: 0; transform: scale(.4) translateY(20px); } 60% { opacity: 1; transform: scale(1.1); } 100% { transform: none; } }
@keyframes bubble-in { 0% { opacity: 0; transform: scale(.85) translateY(6px); } 60% { opacity: 1; transform: scale(1.03); } 100% { transform: none; } }
@keyframes tap { 0% { transform: translateY(0); } 40% { transform: translateY(10px) scale(.92); } 100% { transform: translateY(0); } }
@keyframes tap-ring { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(2.4); } }

/* --------------------------------------------------------------- 100% moment (ui/wow.ts): the big flip */

/* above the whole game (#app is z 1), under the Phaser stage (z 15) so sparks and confetti land on top */
.wow {
  position: fixed; inset: 0; z-index: 10; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: 24px 16px 28px; cursor: pointer;
  background: radial-gradient(70% 60% at 50% 48%, rgba(var(--deep-rgb), .93), rgba(var(--deep-rgb), .99)); backdrop-filter: blur(10px);
}
.wow.is-live { cursor: default; }
.wow-score { display: flex; flex-direction: column; align-items: center; gap: 8px; visibility: hidden; }
.wow-score.is-on { visibility: visible; }
.wow-score-tiles { display: flex; gap: calc(var(--t, 96px) * .1); }
.wow-score-tiles .tile-front { color: #1c0b45; }
.wow-score-sub { margin: 0; font: 800 clamp(26px, 4.4vw, 46px)/1 var(--f-display); letter-spacing: .08em; color: var(--gold); opacity: 0;
  text-shadow: 0 4px 0 var(--gold-deep), 0 0 30px rgba(var(--gold-rgb), .7); }
.wow-score-sub.is-on { opacity: 1; animation: pop-in .55s var(--back) both; }
.wow-board { display: flex; flex-direction: column; align-items: center; gap: calc(var(--t, 40px) * .3); }
.wow-line { display: flex; justify-content: center; align-items: flex-end; gap: 36px; }
.wow-row { display: inline-flex; align-items: flex-end; gap: calc(var(--t, 40px) * .14); padding: 4px; margin: 0; font: inherit; color: inherit; background: none; border: 0; border-radius: 12px; cursor: inherit; }
.wow-row.is-done .tile-front { filter: drop-shadow(0 0 8px rgba(46, 240, 160, .55)); }
.wow.is-live .wow-row { cursor: pointer; animation: wow-bob 2.6s ease-in-out infinite; animation-delay: var(--bd, 0s); }
.wow.is-live .wow-row:hover, .wow.is-live .wow-row:focus-visible { outline: 3px solid rgba(var(--gold-rgb), .75); outline-offset: 2px; }
.wow-row.is-say .tile { animation: tile-hop .5s var(--out); }
.wow.is-settled .tile, .wow.is-settled .tile-inner, .wow.is-settled .wow-score-sub { animation: none !important; transition: none !important; }
.wow-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.wow-continue { min-width: 200px; visibility: hidden; }
.wow.is-live .wow-continue { visibility: visible; animation: next-in .5s var(--back) both; }
.wow-hint { margin: 0; font: 600 15px var(--f-ui); color: rgba(232, 239, 255, .72); }
@keyframes wow-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

/* Reduced motion keeps every state change and drops only movement. */
html[data-reduced-motion="true"] *, html[data-reduced-motion="true"] *::before, html[data-reduced-motion="true"] *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important;
}
/* End of base.css */
/* Word Search - its own pieces on top of the shared base style (base.css).

   Identity: AURORA. A polar night sky (deep indigo, stars, falling snow, aurora ribbons moving slowly); the
   letters sit on a sheet of frosted ice; a found word is marked with a glowing aurora stroke, each word in its
   own colour (mint, sky, violet, pink, amber). Actions are violet, the hint is gold with dark ink, red only
   means a mistake. Every colour is a token below, so a reskin is a swap (keep MARKER_TINTS in
   src/scenes/StageScene.ts in step with --mk-0..4). */


:root {
  --bg: #0b1233; --bg-glow: #2a3f8f;
  --navy-950: #050a1f; --navy-900: #0b1233; --navy-800: #111a47; --navy-700: #1a2660; --navy-600: #24357e;
  --ink: #172154; --ink-soft: #4b5a8f; --muted: #d5e2ff; --label: #a8c6ff;
  --card: #fbfdff; --card-2: #edf3ff; --card-edge: #c6d5f3;
  --syn: #4cc9f0; --syn-hi: #90e0ff; --syn-deep: #2563b0;
  --ant: #ff9f2e; --ant-hi: #ffc77a; --ant-deep: #c46a00;
  --gold: #ffd84d; --gold-hi: #ffeaa0; --gold-deep: #e6a800;
  --ok: #36d27a; --ok-ink: #0d6b38; --ok-deep: #1e9b56;
  --accent-rgb: 190, 215, 255; --brand-rgb: 76, 201, 240; --deep-rgb: 5, 10, 31; --muted-rgb: 213, 226, 255;
  --gold-rgb: 255, 216, 77; --gold-hi-rgb: 255, 234, 160;
  --brand-hi: #4cc9f0; --brand-edge: #2563b0; --play-edge: #b8c9f0;
  /* white on these violets is 5.7:1 at the top and 7.1:1 at the bottom (WCAG 4.5:1 for button text) */
  --action-top: #7c3aed; --action-bottom: #6427d6; --action-edge: #3d1593; --action-ring: #d6c8ff;
  --f-display: 'Fredoka', 'Arial Rounded MT Bold', var(--f-ui);
  --f-tile: 'Fredoka', var(--f-ui);
  /* the aurora colours of found words (same order as MARKER_TINTS in StageScene.ts) */
  --mk-0: 94, 234, 212; --mk-1: 125, 211, 252; --mk-2: 196, 181, 253; --mk-3: 249, 168, 212; --mk-4: 253, 230, 138;
  --sel: 125, 211, 252;
}

/* --------------------------------------------------------------- backdrop: a polar night (CSS only) */

.backdrop {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    linear-gradient(to top, rgba(120, 170, 255, .2), transparent 32%),
    radial-gradient(90% 70% at 50% 0%, #22337a 0%, #131d52 45%, var(--bg) 100%) var(--bg);
}
/* stars: two tiled dot layers, the second twinkling (opacity only) */
.sky, .sky::after { position: absolute; inset: 0; }
.sky {
  background:
    radial-gradient(1.4px 1.4px at 23px 41px, #fff 50%, transparent 100%),
    radial-gradient(1px 1px at 140px 90px, rgba(255, 255, 255, .8) 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 210px 170px, rgba(255, 255, 255, .7) 50%, transparent 100%),
    radial-gradient(1px 1px at 80px 200px, rgba(255, 255, 255, .6) 50%, transparent 100%) 0 0 / 260px 240px;
  -webkit-mask-image: linear-gradient(#000 30%, transparent 85%); mask-image: linear-gradient(#000 30%, transparent 85%);
}
.sky::after {
  content: ''; background:
    radial-gradient(1.8px 1.8px at 60px 30px, #fff 50%, transparent 100%),
    radial-gradient(1.6px 1.6px at 300px 150px, #e0f2ff 50%, transparent 100%) 0 0 / 380px 260px;
  animation: twinkle 3.6s ease-in-out infinite alternate; will-change: opacity;
}
@keyframes twinkle { from { opacity: .2; } }
/* aurora ribbons: soft ellipses of light, stretched and skewed, swaying slowly (transform only) */
.aurora {
  position: absolute; left: -15%; width: 130%; height: 34vh; border-radius: 50%; will-change: transform;
  animation: aurora-sway var(--d, 18s) ease-in-out var(--dl, 0s) infinite alternate;
}
.aurora.a1 { top: 3%; background: radial-gradient(50% 50% at 50% 50%, rgba(94, 234, 212, .34), rgba(125, 211, 252, .14) 55%, transparent 72%); --r0: -6deg; --r1: -2deg; }
.aurora.a2 { top: 12%; height: 26vh; background: radial-gradient(48% 50% at 40% 50%, rgba(196, 181, 253, .30), rgba(125, 211, 252, .10) 55%, transparent 72%); --d: 23s; --dl: -7s; --r0: 5deg; --r1: 1deg; }
.aurora.a3 { top: -4%; height: 20vh; background: radial-gradient(45% 50% at 60% 50%, rgba(94, 234, 212, .22), transparent 70%); --d: 15s; --dl: -4s; --r0: -2deg; --r1: 4deg; }
@keyframes aurora-sway {
  from { transform: translateX(-6%) rotate(var(--r0)) scaleY(.85); }
  to { transform: translateX(6%) rotate(var(--r1)) scaleY(1.15); }
}
/* snow: two tiled layers falling at their own speed; each moves exactly one tile, so the loop is seamless */
.snow { position: absolute; left: 0; right: 0; bottom: 0; will-change: transform; animation: snow-fall var(--d) linear infinite; }
.snow.s1 {
  top: -180px; --tile: 180px; --d: 9s;
  background: radial-gradient(1.6px 1.6px at 30px 40px, rgba(255, 255, 255, .8) 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 120px 110px, rgba(255, 255, 255, .6) 50%, transparent 100%),
    radial-gradient(1.4px 1.4px at 70px 160px, rgba(255, 255, 255, .7) 50%, transparent 100%) 0 0 / 160px 180px;
}
.snow.s2 {
  top: -260px; --tile: 260px; --d: 16s; opacity: .7;
  background: radial-gradient(2.6px 2.6px at 50px 70px, rgba(255, 255, 255, .9) 50%, transparent 100%),
    radial-gradient(2.2px 2.2px at 190px 200px, rgba(255, 255, 255, .8) 50%, transparent 100%) 0 0 / 240px 260px;
}
@keyframes snow-fall { to { transform: translateY(var(--tile)); } }

/* --------------------------------------------------------------- menu: a CSS logo for now */

.logo-text { display: flex; flex-direction: column; align-items: center; gap: 0; margin: 0 0 6px; font: 700 min(96px, 19vw)/0.95 var(--f-display); letter-spacing: .01em; }
.logo-word { color: #fff; text-shadow: 0 6px 0 var(--navy-950), 0 0 30px rgba(125, 211, 252, .35); }
/* "Search" in aurora light (a still gradient: an animated background-position repainted the logo every frame) */
.logo-search {
  position: relative; padding: 0 .08em; color: transparent;
  background: linear-gradient(100deg, #5eead4 0%, #7dd3fc 40%, #c4b5fd 75%, #f9a8d4 100%);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 6px 0 var(--navy-950)) drop-shadow(0 0 22px rgba(125, 211, 252, .45));
}
/* a snowflake turning by the last letter: on the logo itself, outside the filtered word (a turning child made
   the browser redo the word's glow every frame) */
.logo-text { position: relative; }
.logo-text::after {
  content: ''; position: absolute; right: -.12em; top: 44%; width: .4em; height: .4em; background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 2v20M3.3 7l17.4 10M3.3 17L20.7 7M9 3.5l3 2.5 3-2.5M9 20.5l3-2.5 3 2.5M4.2 10.6l3.7-.8-1.2-3.6M19.8 13.4l-3.7.8 1.2 3.6M4.2 13.4l3.7.8-1.2 3.6M19.8 10.6l-3.7-.8 1.2-3.6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 2v20M3.3 7l17.4 10M3.3 17L20.7 7M9 3.5l3 2.5 3-2.5M9 20.5l3-2.5 3 2.5M4.2 10.6l3.7-.8-1.2-3.6M19.8 13.4l-3.7.8 1.2 3.6M4.2 13.4l3.7.8-1.2 3.6M19.8 10.6l-3.7-.8 1.2-3.6'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: flake-spin 9s linear infinite; will-change: transform;
}
@keyframes flake-spin { to { transform: rotate(360deg); } }
@keyframes marker-draw { from { transform: scaleX(0); } }
.screen.is-entering .logo-text { animation: rise-in .6s var(--out) both; }
.tagline { color: #fff; font: 600 22px var(--f-ui); margin: 14px 0 22px; }
.tagline b { color: #7dd3fc; }
/* Start is violet; the gold ring is only for keyboard focus */
.btn-play {
  font-family: var(--f-display); color: #fff;
  background: linear-gradient(180deg, var(--action-top), var(--action-bottom)); border-color: var(--action-ring);
  box-shadow: 0 7px 0 var(--action-edge), 0 20px 44px rgba(0, 0, 30, .55);
}
.btn-play:hover:not(:disabled) { box-shadow: 0 10px 0 var(--action-edge), 0 26px 50px rgba(0, 0, 30, .6); }
.btn-play:active:not(:disabled), .btn-play.is-down { box-shadow: 0 1px 0 var(--action-edge); }
.btn-play:focus-visible { box-shadow: 0 0 0 6px rgba(var(--gold-rgb), .85), 0 7px 0 var(--action-edge), 0 20px 44px rgba(0, 0, 30, .55); outline: none; }
.tagline { text-wrap: balance; }
.btn-primary { font-family: var(--f-display); font-weight: 700; }
/* the cover: the logo over the moving backdrop, not a flat gradient */
.tap-start { flex-direction: column; gap: 34px; display: flex; align-items: center; justify-content: center; background: transparent; }
.tap-logo { font-size: min(84px, 17vw); pointer-events: none; }
.tap-start-text { text-shadow: 0 3px 0 var(--navy-950); }
/* the neutral button (Restart, Try saving again): red only means a mistake */
.btn-warn { color: #fff; background: linear-gradient(180deg, var(--navy-600), var(--navy-700)); border-color: #8fd3db; box-shadow: 0 5px 0 var(--navy-950), 0 12px 26px rgba(0, 0, 30, .35); }
.btn-warn:hover:not(:disabled) { box-shadow: 0 8px 0 var(--navy-950), 0 16px 32px rgba(0, 0, 30, .45); }
.btn-warn:active:not(:disabled), .btn-warn.is-down { box-shadow: 0 1px 0 var(--navy-950); }
/* the tutorial question: the magnifier in a white disc */
.ask-icon { width: 76px; padding: 16px; margin: -56px auto 8px; color: var(--syn-deep); background: #fff; border-radius: 50%; box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .25), 0 8px 18px rgba(0, 0, 30, .3); filter: none; }

/* the streak: a dark pill like Found, with a gold bolt and white digits (white on orange was 1.8:1) */
.streak { background: linear-gradient(180deg, var(--navy-700), var(--navy-800)); border: 2px solid rgba(var(--gold-rgb), .6); box-shadow: 0 4px 0 var(--navy-950), 0 0 14px rgba(var(--gold-rgb), .35); }
.streak svg { color: var(--gold); }

/* --------------------------------------------------------------- the puzzle */

/* the HUD floats over the top of the screen: the puzzle starts below it */
.play { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; position: absolute; inset: 62px 0 0; display: flex; align-items: center; justify-content: center; gap: 28px; }
.sheet {
  padding: 12px; border-radius: 24px; background: linear-gradient(160deg, #ffffff 0%, #f1f6ff 55%, #e6efff 100%);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .35), 0 8px 0 var(--card-edge), 0 0 60px rgba(125, 211, 252, .28), 0 26px 60px rgba(0, 0, 20, .5);
}
.screen.is-entering .sheet { animation: deal-in .6s var(--back) backwards; }
.board { --n: 10; --bs: 440px; --cs: calc(var(--bs) / var(--n)); position: relative; width: var(--bs); height: var(--bs); touch-action: none; user-select: none; -webkit-user-select: none; outline: none; cursor: pointer; }
/* keyboard players see the cursor ring on a cell instead of a ring around the whole grid */
.board:focus-visible { outline: none; }
.cells { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), 1fr); grid-auto-rows: 1fr; }
.cells span {
  display: grid; place-items: center; font: 700 calc(var(--cs) * .56) / 1 var(--f-tile); color: var(--ink);
  border-radius: 30%; transition: color .2s;
}
/* a new grid: letters drop in row by row */
.board.is-dealing .cells span { animation: letter-in .42s var(--back) backwards; animation-delay: calc(var(--r) * 34ms + var(--c) * 8ms); }
@keyframes letter-in { from { opacity: 0; transform: translateY(-40%) scale(.6); } }
.cells span.is-pop { animation: letter-pop .42s var(--back); }
@keyframes letter-pop { 40% { transform: scale(1.32); color: #000; } }
/* under the pen: the letters lift and darken as the slide passes over them */
.cells span { transition: transform .12s var(--out); }
.cells span.is-in-sel { color: #000; transform: scale(1.2); }
/* a found word: its letters jump in a wave */
.cells span.is-wave { animation: letter-wave .55s var(--back); }
@keyframes letter-wave { 35% { transform: translateY(-32%) scale(1.42) rotate(-7deg); } 70% { transform: translateY(5%) scale(.94); } }
.cells span.is-hint { animation: hint-glow 1.1s ease-in-out 3; }
@keyframes hint-glow { 50% { transform: scale(1.25); } }
/* a hinted first letter stays marked until its word is found: a yellow disc under it and a soft ring */
.cells span { position: relative; }
.cells span.is-hinted { background: radial-gradient(closest-side, rgb(var(--gold-rgb)) 0 84%, transparent 88%); }
.cells span.is-hinted::after { content: ''; position: absolute; inset: 4%; border-radius: 50%; border: 3px solid rgb(var(--gold-rgb)); animation: hint-ring 1.4s ease-in-out infinite; will-change: transform, opacity; }
@keyframes hint-ring { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.cells span.is-hinted2 { background: radial-gradient(closest-side, rgba(var(--gold-rgb), .55) 0 70%, transparent 74%); }

/* the letters being marked, big, just above the sheet (a finger hides them on the grid); also short notes */
.sheet { position: relative; }
.sel-preview {
  position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 5; display: flex; align-items: center; min-height: 46px; padding: 4px 16px;
  font: 700 30px/1 var(--f-tile); letter-spacing: .06em; color: var(--ink); white-space: nowrap; pointer-events: none;
  background: rgb(var(--sel)); border-radius: 14px; box-shadow: 0 5px 0 var(--syn-deep), 0 0 24px rgba(var(--sel), .6), 0 12px 24px rgba(0, 0, 20, .3);
  translate: -50% 0; opacity: 0; scale: .85; transition: opacity .14s, scale .18s var(--back);
}
.sel-preview.is-on { opacity: 1; scale: 1; }
.sel-preview b { font: inherit; display: inline-block; }
.sel-preview b.is-new { animation: preview-letter .2s var(--back); }
@keyframes preview-letter { from { transform: translateY(40%) scale(.4); opacity: 0; } }
.sel-preview.is-note { font: 800 17px/1.2 var(--f-ui); letter-spacing: 0; background: #fff; box-shadow: 0 4px 0 var(--card-edge), 0 10px 22px rgba(0, 0, 20, .3); }
/* landscape: at the top of the list column, level with the sheet's top (above the sheet it hit the HUD) */
body[data-orient="land"] .sel-preview { left: calc(100% + 28px); top: 0; bottom: auto; translate: none; transform-origin: 0 50%; }
body[data-orient="land"] .sel-preview.is-note { width: 250px; white-space: normal; }
/* upright: centred in place of the progress row (above the sheet it covered the word chips); the row steps aside */
body[data-orient="port"] .sheet { position: static; }
body[data-orient="port"] .sel-preview { bottom: calc(100% + 4px); font-size: 24px; min-height: 40px; }
.hud-centre { transition: opacity .15s; }
body[data-orient="port"]:has(.sel-preview.is-on) .hud-centre { opacity: 0; }
body[data-orient="port"] .sel-preview.is-note { font-size: 15px; }

/* the tutorial's caption: one fixed place, above the list (landscape) or over the progress row (upright) */
.coach { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; background: #fff; border-radius: 16px; box-shadow: 0 0 0 3px rgba(var(--gold-rgb), .85), 0 4px 0 var(--card-edge), 0 12px 26px rgba(0, 0, 20, .3); }
.coach[hidden] { display: none; }
.coach-text { flex: 1; margin: 0; font: 800 18px/1.25 var(--f-ui); color: var(--ink); text-align: left; text-wrap: balance; }
.coach.is-swap .coach-text { animation: bubble-in .35s var(--back); }
.coach-skip { flex: none; min-height: 40px; padding: 0 12px; font: 800 15px var(--f-ui); color: var(--ink-soft); background: var(--card-2); border: 2px solid var(--card-edge); border-radius: 12px; cursor: pointer; }
.coach-skip:hover { color: var(--ink); border-color: var(--syn); }
/* upright: under the hint button, in the free space (over the HUD it sat under the HUD's own labels) */
body[data-orient="port"] .coach { order: 2; align-self: stretch; margin: 0 12px; padding: 6px 6px 6px 14px; }
body[data-orient="port"] .coach-text { font-size: 15px; }
body[data-orient="port"] .coach-skip { min-height: 32px; font-size: 14px; }
body[data-orient="land"] .coach-text { font-size: 16px; }
body[data-orient="land"] .coach-skip { grid-area: skip; min-height: 30px; padding: 0 10px; font-size: 13px; }
/* landscape: the text takes the column's full width, the Skip under it; two lines reserved, so the list under
   it does not jump between steps */
body[data-orient="land"] .coach:not([hidden]) { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "tag skip" "text text"; align-items: center; gap: 4px 8px; padding: 8px 8px 12px 14px; }
body[data-orient="land"] .coach::before { content: 'Tutorial'; grid-area: tag; text-align: left; font: 800 12px var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--syn-deep); }
body[data-orient="land"] .coach-text { grid-area: text; min-height: 2.5em; display: flex; align-items: center; }
/* the Skip keeps a 44 px touch area (it is drawn smaller) */
.coach-skip { position: relative; }
.coach-skip::after { content: ''; position: absolute; inset: -7px -4px; }
body[data-orient="port"] .btn-hint { margin-top: 8px; }
/* short phones (iPhone SE) have no room under the hint: the caption takes the progress row's place instead */
@media (max-height: 720px) {
  body[data-orient="port"] .coach { position: absolute; left: 12px; right: 12px; bottom: calc(100% + 2px); margin: 0; z-index: 6; padding: 3px 3px 3px 12px; }
  body[data-orient="port"] .coach-text { font-size: 14px; line-height: 1.15; }
  body[data-orient="port"]:has(.coach:not([hidden])) .hud-centre { visibility: hidden; }
  body[data-orient="port"]:has(.sel-preview.is-on) .coach { visibility: hidden; }
}
/* a target low on the screen: the hand points down at it (pointing up, it would hang off the bottom) */
.tutor.is-down .tutor-hand { rotate: 166deg; }

/* the tutorial bubble slides by --bx to stay on screen (centred on phones); its arrow slides back to the finger */
.tutor-bubble { translate: var(--bx, 0px) 0; }
.tutor-bubble::after { margin-left: calc(-1 * var(--bx, 0px)); }
body[data-orient="port"] .tutor.is-above .tutor-bubble::after { top: auto; bottom: -8px; box-shadow: 3px 3px 0 0 var(--gold); }
/* moved off the letter grid: the bubble no longer touches the finger, so no arrow */
.tutor.is-detached .tutor-bubble::after { display: none; }

/* the tutorial dims every letter but the ones the guide is about */
.board.is-guided .cells span { opacity: .28; transition: opacity .3s; }
.board.is-guided .cells span.is-target { opacity: 1; }

/* aurora marks under the letters: a glowing capsule from the first letter's centre to the last's */
.marks { position: absolute; inset: 0; pointer-events: none; }
.mark {
  position: absolute; left: 0; top: 0; height: calc(var(--cs) * .78); border-radius: 999px;
  background: rgba(var(--mk), .55); transform-origin: calc(var(--cs) * .39) 50%;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .06);
}
.mark { overflow: hidden; }
.mark.is-sel { background: rgba(var(--sel), .5); box-shadow: inset 0 0 0 2px rgba(var(--sel), .95); }
.mark.is-sel::after {
  content: ''; position: absolute; right: 0; top: 0; width: calc(var(--cs) * .78); height: 100%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .95), rgba(var(--sel), 0)); animation: pen-tip .5s ease-in-out infinite alternate; will-change: opacity;
}
@keyframes pen-tip { from { opacity: .45; } }
/* found: the stroke is drawn from the first letter to the last, settles with a squash, and a shine runs along it */
.mark.is-found { animation: mark-draw .3s cubic-bezier(.2, .8, .2, 1) both, mark-lock .45s var(--back) .28s; }
/* the clip leaves room around the capsule, so its glow is not cut off once drawn */
@keyframes mark-draw { from { clip-path: inset(-40% 100% -40% -20% round 999px); } to { clip-path: inset(-40% -20% -40% -20% round 999px); } }
@keyframes mark-lock { 40% { scale: 1.04 1.2; } }
.mark.is-found { overflow: visible; background: linear-gradient(180deg, rgba(var(--mk), .62), rgba(var(--mk), .9)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .65), 0 0 16px rgba(var(--mk), .85); }
.mark.is-found::after { border-radius: inherit; clip-path: inset(0 round 999px); }
.mark.is-fading { animation: mark-fade .34s ease-out forwards; }
@keyframes mark-fade { from { background: rgba(255, 255, 255, .95); } to { opacity: 0; } }
/* a tapped first letter waiting for the second tap */
.mark.is-anchor { box-shadow: inset 0 0 0 3px var(--ok-deep); }
/* the right start, let go too early: kept a moment in yellow, no red */
.mark.is-almost { background: rgba(var(--gold-rgb), .6); box-shadow: inset 0 0 0 2px var(--gold-deep); animation: mark-almost .8s ease-out forwards; }
@keyframes mark-almost { 0%, 60% { opacity: 1; } to { opacity: 0; } }
.mark.is-found::after, .mark.is-shine::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-130%);
  background: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, .8) 50%, transparent 75%);
}
.mark.is-found::after { animation: mark-shine .7s ease-out .3s both; }
.mark.is-shine::after { animation: mark-shine2 .6s ease-out var(--sd, 0ms) both; }
@keyframes mark-shine { to { transform: translateX(130%); } }
@keyframes mark-shine2 { to { transform: translateX(130%); } }
.mark.is-miss { background: rgba(255, 77, 106, .45); box-shadow: 0 0 0 2px rgba(255, 77, 106, .9); animation: mark-miss .5s var(--out) forwards; }
@keyframes mark-miss { 0%, 40% { opacity: 1; } 15% { transform: translateX(-4px); } 30% { transform: translateX(4px); } to { opacity: 0; } }
.cursor {
  position: absolute; left: 0; top: 0; width: var(--cs); height: var(--cs); border-radius: 30%;
  box-shadow: 0 0 0 3px var(--syn), 0 0 0 6px rgba(var(--brand-rgb), .3); pointer-events: none;
  transition: transform .12s var(--out);
}
.cursor.is-anchor { box-shadow: 0 0 0 3px var(--ok-deep), 0 0 0 7px rgba(54, 210, 122, .35); }

/* the word list */
.side { display: flex; flex-direction: column; align-items: stretch; gap: 12px; width: 250px; }
.list-title { margin: 0; font: 800 18px var(--f-ui); color: var(--label); text-align: left; }
.word-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.word-list li {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 14px; text-align: left;
  font: 700 22px var(--f-tile); letter-spacing: .06em; color: var(--ink);
  background: #fff; border-radius: 14px; box-shadow: 0 4px 0 var(--card-edge);
}
.screen.is-entering .word-list li { animation: rise-in .45s var(--out) backwards; animation-delay: calc(250ms + var(--i) * 60ms); }
.word-list li::before { content: ''; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--card-edge); }
.word-list li { cursor: pointer; }
.word-list li:focus-visible { outline: 3px solid var(--syn); outline-offset: 2px; }
.word-list li.is-say { animation: chip-found .42s var(--back); }
.word-list li.is-found { background: linear-gradient(rgba(var(--mk), .6), rgba(var(--mk), .6)) #fff; }
.word-list li::before { display: grid; place-items: center; font: 900 11px/1 var(--f-ui); color: var(--ink); }
.word-list li.is-found::before { content: '\2713'; border-color: transparent; background: #fff; animation: check-pop .45s var(--back); }
@keyframes check-pop { from { transform: scale(0) rotate(-90deg); } }
.wl-word { position: relative; min-width: 0; white-space: nowrap; font-size: min(1em, calc(230px / var(--len, 6))); }
/* the speaker: the word can be tapped to hear it; pushed to the item's right edge, it keeps its own room */
.word-list li .chip-speaker { flex: none; width: 18px; height: 18px; margin: 0 0 0 auto; color: var(--syn-deep); opacity: .6; transition: opacity .15s; }
.word-list li:hover .chip-speaker, .word-list li.is-say .chip-speaker { opacity: 1; }
body[data-orient="port"] .word-list li .chip-speaker { width: 13px; height: 13px; }
.wl-word::after {
  content: ''; position: absolute; left: -5%; right: -5%; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px;
  background: rgba(14, 42, 51, .6); height: 3px; transform: scaleX(0); transform-origin: 0 50%; transition: transform .38s var(--out) .05s;
}
.word-list li.is-found .wl-word::after { transform: scaleX(1); }
.word-list li.is-found { animation: chip-found .5s var(--back); }
@keyframes chip-found { 40% { scale: 1.08; } }
.word-list li.is-hinted { box-shadow: 0 0 0 3px var(--gold), 0 4px 0 var(--card-edge); }
.word-list li.is-hinted::after { content: ''; position: absolute; inset: -6px; border-radius: 18px; border: 3px solid var(--gold); opacity: 0; animation: chip-hint 1.1s ease-in-out 3; }
@keyframes chip-hint { 50% { opacity: 1; } }

/* the hint: the yellow highlighter, dark ink on it (never white on yellow) */
.btn-hint {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 18px;
  font: 800 20px var(--f-ui); color: var(--ink); cursor: pointer;
  background: linear-gradient(180deg, #ffe684, var(--gold)); border: 2px solid #fff4c2; border-radius: 16px;
  box-shadow: 0 5px 0 #b38f00, 0 12px 24px rgba(0, 0, 20, .3);
  transition: translate .14s var(--out), box-shadow .14s var(--out);
}
.btn-hint:hover:not(:disabled) { translate: 0 -3px; box-shadow: 0 8px 0 #b38f00, 0 16px 28px rgba(0, 0, 20, .35); }
.btn-hint:active:not(:disabled) { translate: 0 4px; box-shadow: 0 1px 0 #b38f00; }
/* out of hints: plain grey, not a dimmed yellow (which read as dirty olive) */
.btn-hint:disabled { cursor: not-allowed; color: #4f6468; background: #dde5e6; border-color: #dde5e6; box-shadow: none; translate: none; }
.btn-hint:disabled .hint-icon { stroke: #4f6468; }
.btn-hint:disabled .tool-count { background: #9aa9ac; }
.hint-icon { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-hint .tool-count {
  position: absolute; right: -9px; top: -9px; display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px;
  font: 800 16px var(--f-ui); color: #fff; background: var(--navy-700); border: 2px solid #fff; border-radius: 999px; z-index: 2;
}
.btn-hint.is-glow::after { content: ''; position: absolute; inset: -2px; z-index: 1; border-radius: 18px; box-shadow: 0 0 0 5px rgba(255, 255, 255, .5), 0 0 26px 8px rgba(var(--gold-rgb), .65); opacity: 0; animation: chip-hint 1.1s ease-in-out infinite; pointer-events: none; will-change: opacity; }

.seg.seg-gap { margin-left: 10px; }

/* phone held upright: the list on top in chips, the grid, the hint under it */
/* upright the HUD has two rows (buttons, then the progress dots and "Puzzle 1 of 2"): start below both */
body[data-orient="port"] .play { top: 100px; flex-direction: column; gap: 16px; justify-content: flex-start; padding-top: 4px; }
@media (max-height: 600px) { body[data-orient="port"] .play { gap: 12px; } }
body[data-orient="port"] .side { display: contents; }
body[data-orient="port"] .list-title { display: none; }
body[data-orient="port"] .word-list { order: -1; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 7px; }
body[data-orient="port"] .word-list li { padding: 5px 10px; font-size: 16px; gap: 6px; border-radius: 11px; box-shadow: 0 3px 0 var(--card-edge); }
body[data-orient="port"] .word-list li::before { width: 10px; height: 10px; }
body[data-orient="port"] .sheet { padding: 8px; border-radius: 18px; }
body[data-orient="port"] .btn-hint { align-self: center; min-width: 170px; }

/* --------------------------------------------------------------- between screens: a sweep of aurora */

.curtain { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.curtain i { position: absolute; top: -20%; bottom: -20%; width: 70%; left: -10%; transform: translateX(-160%) skewX(-14deg); will-change: transform; }
.curtain i:nth-child(1) { background: linear-gradient(90deg, rgb(var(--mk-0)), rgb(var(--mk-1))); }
.curtain i:nth-child(2) { background: linear-gradient(90deg, rgb(var(--mk-2)), rgb(var(--mk-3))); left: 25%; }
.curtain i:nth-child(3) { background: var(--navy-700); left: 55%; width: 60%; }

/* --------------------------------------------------------------- results: one list, no practice */

/* chips flow in rows (base.css lays its lists out as a column); the panel is as tall as its words, centred */
.results-lists .column ul { flex-direction: row; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: 8px; padding: 0 0 10px; }
.results-lists { justify-content: center; }
.results-lists .column { flex: 0 1 auto; }
/* the dial and the two numbers sit on the same axis as the title and the button: a grid is only as wide
   as its two numbers (a wrapping flex box took the width of all three items on one line) */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: min(470px, 100%); margin: 12px 0 18px; }
.screen.is-entering .tiles { animation: rise-in .55s var(--out) backwards .55s; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 4px 9px; background: #fff; border: 2px solid var(--card-edge); border-radius: 16px; box-shadow: 0 4px 0 var(--card-edge); }
.tile.is-land { animation: card-pop .42s var(--out); }
.tile-value { font: 700 32px/1 var(--f-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.tile-label { font: 700 13px var(--f-ui); color: var(--ink-soft); white-space: nowrap; }
.column { background: var(--card-2); border-color: var(--card-edge); }
.star svg { fill: #dbe6fb; stroke: #c6d5f3; filter: drop-shadow(0 3px 0 #c6d5f3); }
.chip-speaker {
  display: inline-block; width: .85em; height: .85em; margin-right: 6px; vertical-align: -1px; background: currentColor; opacity: .55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3z'/%3E%3Cpath d='M16 8a5 5 0 0 1 0 8M19 5a9 9 0 0 1 0 14' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3z'/%3E%3Cpath d='M16 8a5 5 0 0 1 0 8M19 5a9 9 0 0 1 0 14' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
body[data-orient="port"] .tiles { gap: 7px; margin: 8px 0 12px; }
body[data-orient="port"] .tile { padding: 9px 2px 7px; border-radius: 13px; }
body[data-orient="port"] .tile-value { font-size: 24px; }
body[data-orient="port"] .tile-label { font-size: 11px; }
body[data-orient="port"] .results-actions .btn { min-height: 52px; min-width: 240px; flex: 0 1 auto; }
/* landscape: the found words as two columns of full-width chips, filling the panel evenly */
/* landscape: the card is as tall as what it holds, centred under the HUD (a full-height card was a third empty) */
body[data-orient="land"] .results { height: auto; align-self: center; width: auto; max-width: 100%; grid-template-columns: auto minmax(400px, 520px); }
body[data-orient="land"] .results-lists .column { padding: 18px; }
/* upright: two even columns of chips (rows of 3 left one word alone on the last line) */
body[data-orient="port"] .results-lists .column ul { display: grid; grid-template-columns: 1fr 1fr; }
body[data-orient="port"] .word-chip { width: 100%; }
body[data-orient="land"] .results-lists .column ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
body[data-orient="land"] .word-chip { width: 100%; font-size: 20px; padding: 9px 14px; border-radius: 12px; }
/* confetti falls behind the results card: it never covers the grade, the numbers or the button */
body.fx-behind #stage { z-index: 0; }
/* iPhone SE and other short phones: a compact card so the word list is not cut off */
@media (max-height: 600px) {
  body[data-orient="port"] .star { width: 36px; }
  body[data-orient="port"] .star:nth-child(2) { width: 44px; margin-bottom: 4px; }
  body[data-orient="port"] .results-title { font-size: 24px; }
  body[data-orient="port"] .tile-value { font-size: 20px; }
  /* readable chips (12px became 7px capitals once the screen is scaled down); the panel has the room */
  body[data-orient="port"] .word-chip { font-size: 15px; padding: 5px 10px; }
  body[data-orient="port"] .results-lists .column ul { gap: 6px; }
}
.word-chip { display: inline-block; text-align: center; border: 0; padding: 6px 12px; font: 700 16px var(--f-tile); letter-spacing: .04em; color: var(--ink); background: rgba(var(--mk), .6); border-radius: 10px; }
/* the found words arrive one after another */
.screen.is-entering .word-chip { animation: rise-in .4s var(--out) backwards; animation-delay: calc(700ms + var(--i, 0) * 45ms); }
/* base.css twinkles the stars by animating filter: drop-shadow forever, which repaints them every frame
   (28% CPU at 5x throttle on a still results screen). A gentle scale on the compositor instead. */
.star.is-on.is-shine svg { animation: star-breathe 2.6s ease-in-out infinite; will-change: transform; }
@keyframes star-breathe { 50% { transform: scale(1.07); } }
.rays { will-change: rotate; }

html[data-reduced-motion="true"] .board.is-dealing .cells span,
html[data-reduced-motion="true"] .mark.is-found,
html[data-reduced-motion="true"] .cells span.is-hint { animation: none; }

/* a found word flies from the grid to its place in the list */
.fly-word {
  position: fixed; left: 0; top: 0; z-index: 31; padding: .15em .55em; pointer-events: none; white-space: nowrap;
  font: 700 var(--fs, 22px) var(--f-tile); letter-spacing: .06em; color: var(--ink);
  background: rgb(var(--mk)); border-radius: 12px; box-shadow: 0 10px 24px rgba(0, 0, 20, .35); will-change: transform, opacity;
}
/* the round's finale: the letters that are not part of a word fall off the sheet; a highlighter stamp lands */
.cells span.is-fall { animation: letter-fall .95s cubic-bezier(.55, 0, .8, .4) var(--fd, 0ms) forwards; }
@keyframes letter-fall { 15% { transform: translateY(-14%); } to { transform: translate(var(--fx, 0px), 520%) rotate(var(--fr, 0deg)); opacity: 0; } }
.finale-stamp { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none; }
.finale-stamp span {
  position: relative; isolation: isolate; padding: .12em .45em; white-space: nowrap; rotate: -7deg;
  font: 700 calc(var(--bs) * .14)/1 var(--f-display); color: var(--ink); animation: stamp-in .5s cubic-bezier(.2, 1.6, .4, 1) both;
}
.finale-stamp span::before {
  content: ''; position: absolute; inset: 6% -2% 2%; z-index: -1; border-radius: 18px; background: rgb(var(--mk-0));
  box-shadow: 0 6px 0 rgba(0, 0, 0, .18), 0 18px 40px rgba(0, 0, 20, .35); transform-origin: 0 50%; animation: marker-draw .45s var(--out) .1s backwards;
}
@keyframes stamp-in { from { scale: 2.6; opacity: 0; } 55% { opacity: 1; } }
html[data-reduced-motion="true"] .cells span.is-fall { animation: letter-fade .4s forwards; }
@keyframes letter-fade { to { opacity: 0; } }
html[data-reduced-motion="true"] .finale-stamp span, html[data-reduced-motion="true"] .finale-stamp span::before { animation: none; }

/* the sheet gives a little under a find */
.sheet.is-bump { animation: sheet-bump .34s var(--back); }
@keyframes sheet-bump { 40% { transform: scale(1.02); } }
/* End of styles.css */
/* --------------------------------------------------------------- the backdrop moves (gently; calm stops it) */

/* the cover and the menu: a faint word search behind the logo, a highlighter finding a word now and then */
.ghost {
  --gs: min(6.2vw, 8.4vh);
  position: absolute; left: 50%; top: 47%; display: grid; grid-template-columns: repeat(var(--cols), var(--gs));
  grid-auto-rows: var(--gs); translate: -50% -50%; rotate: -6deg; transition: opacity .5s var(--out);
  font: 700 calc(var(--gs) * .6)/1 var(--f-display); color: rgba(255, 255, 255, .11);
  -webkit-mask-image: radial-gradient(closest-side, rgba(0, 0, 0, .45) 18%, #000 42%, #000 62%, transparent 100%); mask-image: radial-gradient(closest-side, rgba(0, 0, 0, .45) 18%, #000 42%, #000 62%, transparent 100%);
  will-change: transform; animation: ghost-drift 38s ease-in-out infinite alternate;
}
body[data-orient="port"] .ghost { --gs: min(9vw, 6vh); top: 44%; }
/* the letters stay put (88 letters bobbing one by one cost 40% of a slow laptop's main thread); the whole grid drifts */
.ghost span { display: grid; place-items: center; transition: color .4s, scale .4s var(--out); }
.ghost span.is-lit { color: rgba(255, 255, 255, .5); scale: 1.18; }
.ghost i {
  position: absolute; z-index: -1; border-radius: 999px; background: rgba(var(--mk), .3);
  left: calc((var(--c) + .5 - var(--len) / 2) * var(--gs)); top: calc((var(--r) + .5 - .31) * var(--gs));
  width: calc(var(--len) * var(--gs)); height: calc(var(--gs) * .62); rotate: var(--a);
  transform-origin: 0 50%; will-change: transform, opacity; animation: ghost-mark 3.2s var(--out) both;
}
/* drawn along its own line by a scale (on the compositor; a clip-path repainted every frame) */
@keyframes ghost-mark {
  from { transform: scaleX(0); }
  22% { transform: scaleX(1); opacity: 1; }
  70% { opacity: 1; }
  to { transform: scaleX(1); opacity: 0; }
}
@keyframes ghost-drift { to { transform: translate(2%, -2%) rotate(3deg); } }
body:not([data-screen="boot"]):not([data-screen="menu"]) .ghost { opacity: 0; }
html[data-calm="true"] .ghost, html[data-reduced-motion="true"] .ghost,
html[data-calm="true"] .ghost span, html[data-reduced-motion="true"] .ghost span { animation: none; will-change: auto; }
/* a slow light wandering behind everything */
.backdrop::after {
  content: ''; position: absolute; left: 10%; top: 5%; width: 60vmax; height: 60vmax; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(125, 160, 255, .14), transparent); will-change: transform;
  animation: wander 26s ease-in-out infinite alternate;
}
@keyframes wander { 50% { transform: translate(35vw, 20vh); } to { transform: translate(10vw, 45vh); } }
/* a find rings the sheet with its pen colour for a moment (the centre would be hidden behind the white sheet) */
.backdrop::before { content: ''; position: absolute; inset: 0; z-index: 1; opacity: 0; background: radial-gradient(58% 62% at 50% 48%, transparent 45%, rgba(var(--mk, 94, 234, 212), .3) 70%, transparent 92%); }
.backdrop.is-flash::before { animation: bg-flash .9s cubic-bezier(.2, .7, .3, 1); }
@keyframes bg-flash { 12% { opacity: 1; } }
body[data-orient="port"] .backdrop::before { background: radial-gradient(75% 55% at 50% 52%, transparent 50%, rgba(var(--mk, 94, 234, 212), .32) 72%, transparent 95%); }
html[data-calm="true"] .backdrop.is-flash::before { animation: none; }
html[data-calm="true"] :is(.aurora, .snow, .sky::after, .backdrop::after, .logo-text::after),
html[data-reduced-motion="true"] :is(.aurora, .snow, .sky::after, .backdrop::after, .logo-text::after) { animation: none; will-change: auto; }
html[data-reduced-motion="true"] .cells span.is-wave, html[data-reduced-motion="true"] .mark.is-found::after,
html[data-reduced-motion="true"] .sel-preview b.is-new, html[data-reduced-motion="true"] .tile.is-land { animation: none; }

/* --------------------------------------------------------------- the round's theme, spun like a slot machine */

.play.is-veiled :is(.cells, .word-list, .list-title, .marks) { visibility: hidden; }
.progress-label.is-bump { animation: chip-found .4s var(--back); }

/* the column is sized on the screen's width (a percentage width inside an auto-sized column has nothing to refer to) */
.theme-reveal { position: absolute; inset: 0; z-index: 8; display: grid; place-content: center; grid-template-columns: min(560px, 88%); pointer-events: none; }
.theme-reveal[hidden] { display: none; }
.tr-label { display: block; margin-bottom: 4px; font: 800 15px var(--f-ui); letter-spacing: .32em; text-transform: uppercase; color: var(--ink-soft); }
.tr-window {
  padding: 16px 28px 20px; overflow: hidden; text-align: center; border-radius: 28px;
  background: linear-gradient(160deg, #ffffff, #e9f1ff);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .45), 0 8px 0 var(--card-edge), 0 0 70px rgba(125, 211, 252, .35), 0 26px 50px rgba(0, 0, 20, .5);
}
/* a long name gets smaller letters, so it always fits the card on one line */
.tr-name { display: block; font: 700 min(64px, calc(940px / var(--len, 8)))/1.15 var(--f-display); color: var(--ink); white-space: nowrap; }
.tr-name.is-flick { animation: tr-flick .08s linear; }
@keyframes tr-flick { from { transform: translateY(-60%); opacity: .25; } }
.theme-reveal.is-in .tr-window { animation: deal-in .45s var(--back); }
.theme-reveal.is-in .tr-label { animation: rise-in .4s var(--out) backwards .1s; }
.theme-reveal.is-landed .tr-name { color: var(--syn-deep); animation: tr-land .6s var(--back); }
.theme-reveal.is-landed .tr-window { box-shadow: 0 0 0 4px rgba(var(--mk-0), .9), 0 8px 0 var(--card-edge), 0 0 90px rgba(var(--mk-0), .55), 0 26px 50px rgba(0, 0, 20, .5); transition: box-shadow .3s; }
@keyframes tr-land { 0% { transform: scale(.55); } 55% { transform: scale(1.2); } }
.theme-reveal.is-out { animation: tr-out .28s var(--in) forwards; }
@keyframes tr-out { to { opacity: 0; transform: translateY(-36px) scale(.92); } }
body[data-orient="port"] .tr-name { font-size: min(42px, calc(520px / var(--len, 8))); }
.progress-label { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
body[data-orient="port"] .tr-window { padding: 16px 18px; border-radius: 22px; }
html[data-reduced-motion="true"] :is(.tr-name, .tr-window, .tr-label, .theme-reveal) { animation: none !important; }

/* Aurora Words: village artwork behind the existing accessible game interface. */
.backdrop { background: #101b53 url('./aurora-landscape-D8Js2zcL.webp') center center / cover no-repeat; }
.sky, .aurora, .ghost { display: none; }
@media (orientation: portrait) { .backdrop { background-image: url('./aurora-portrait-CWqnudhz.webp'); } }
.aurora-logo { display: block; width: min(660px, 75vw); height: auto; filter: drop-shadow(0 8px 16px rgba(7, 15, 58, .45)); }
.logo { margin: 0; }
.tap-logo { width: min(620px, 80vw); }
#screen-menu .tagline, #screen-menu .readouts { display: none; }
#screen-menu { gap: clamp(24px, 5vh, 54px); }
.btn-play, .btn-play:hover:not(:disabled), .btn-play:active:not(:disabled), .btn-play.is-down { color: #101b53; background: linear-gradient(#fff3a4, #ffc932); border-color: #ffefaa; box-shadow: 0 6px 0 #c58b16, 0 14px 28px rgba(8, 15, 55, .4); }
.btn-play::after { content: '▶'; font-size: .68em; margin-left: .45em; }
.menu-actions::before { display: none; }
.sheet { background: #f3f7ff; }
@media (orientation: portrait) { .aurora-logo { width: min(88vw, 600px); } #screen-menu { gap: 5vh; } }

/* Curtains fade into the horizon so the snowy mountains remain unobscured. */
.aurora { display: block; left: -12%; width: 124%; height: 38%; top: -4%; border-radius: 0 0 45% 40%; mix-blend-mode: screen; filter: blur(18px); opacity: .8; mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 55%, transparent 100%); -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 55%, transparent 100%); }
.aurora.a1 { top: -4%; height: 39%; background: repeating-linear-gradient(102deg, transparent 0%, rgba(68,255,205,.08) 5%, rgba(94,234,212,.4) 9%, rgba(125,211,252,.12) 14%, transparent 19%); }
.aurora.a2 { top: -5%; height: 35%; background: repeating-linear-gradient(76deg, transparent 0%, rgba(196,181,253,.10) 7%, rgba(141,92,255,.32) 13%, transparent 21%); }
.aurora.a3 { top: 2%; height: 33%; background: radial-gradient(ellipse at 50% 50%, rgba(62,255,215,.24), transparent 65%); }
@media (orientation: portrait) { .aurora.a1 { height: 38%; } .aurora.a2 { height: 34%; } .aurora.a3 { height: 32%; } }

.aurora { mix-blend-mode: screen; filter: blur(10px); opacity: 1; }

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