/* wordclash.site — the game's V2 design language on the web.
   Tokens: Figma "01 · V2 · Tasarım sistemi" (variables WordClash/V2 = Assets/Resources/V2/v2_tokens.json).
   Buttons, panels and ribbons copy the Figma components (Buton / primary …, panel, ribbon) value by value.
   Motion: docs/V2_MOTION.md; prefers-reduced-motion turns every movement into a short fade or nothing. */

@font-face {
  font-family: "Luckiest Guy";
  src: url("/assets/fonts/LuckiestGuy.woff2") format("woff2");
  font-display: swap;
  /* Measured from the font (upm 2048, caps -15..1440): with these the capitals' centre is the line box's centre on
     every platform (macOS/iOS read hhea, Windows win metrics - they differ by .15 em otherwise), so text in buttons,
     pills and badges is centred by plain symmetric padding. Replaces the game's "+7 % down" nudge (D-034). */
  ascent-override: 84.8%;
  descent-override: 15.2%;
  line-gap-override: 0%;
}

:root {
  --purple: #6a2bd8;
  --purple-deep: #3a1078;
  --purple-ink: #2a0c5c;
  --navy: #151b56;
  --gold: #ffc429;
  --gold-light: #ffd966;
  --gold-pale: #ffed8c;
  --orange: #ff8a00;
  --cream: #fff6e3;
  --lavender: #ede7ff;
  --line: #d9ccf2;
  --green: #2eb859;
  --teal: #009e99;
  --red: #d92633;
  --muted: #736b8c;
  --trace: #00d9f2;
  --white: #fff;

  --display: "Luckiest Guy", "Baloo 2", "Arial Rounded MT Bold", ui-rounded, system-ui, sans-serif;
  --body: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --edge: 16px;
  --content: 1160px; /* one content width for header, sections, rails and footer: every left edge lines up */
  --radius-card: 28px;
  --radius-panel: 22px;
  --radius-chip: 14px;
  --shadow-card: 0 8px 16px rgba(38, 8, 89, .35);

  --press: 90ms;
  --release: 180ms;
  --enter: 300ms;
  --ease-out: cubic-bezier(.215, .61, .355, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  /* a damped spring (damping 0.74, ~3 % overshoot) for the language thumb, like iOS switches; older browsers fall back */
  --spring: cubic-bezier(.3, 1.25, .5, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
/* smooth only for an in-page link the visitor taps (it holds focus); a page opened at #section (the language switch,
   a shared link) lands there at once instead of gliding down from the top */
html:focus-within { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--white);
  background: var(--purple-ink);
  background-image:
    radial-gradient(1200px 700px at 50% -10%, rgba(106, 43, 216, .55), transparent 70%),
    linear-gradient(180deg, var(--purple-deep) 0%, var(--purple-ink) 40%, #1d0a45 100%);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--gold-light); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; color: inherit; }
ul, ol { padding: 0; margin: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
/* balanced last lines only where text is short (on long paragraphs the extra line-breaking work slows the opening) */
.lead, .sec-lead, .feat p, .support-lead, .hint, .steps span { text-wrap: pretty; }
[hidden] { display: none !important; }

.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 12px; background: var(--gold); color: var(--navy); font-family: var(--display); text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: min(var(--content), 100%); margin: 0 auto; padding: 0 max(var(--edge), env(safe-area-inset-left)) 0 max(var(--edge), env(safe-area-inset-right)); }
.wrap.narrow { width: min(820px, 100%); }

/* ---------- display type (Luckiest Guy, upper case, outside stroke like the game's texts) ---------- */
.display, .kicker, .title, .tagline, .btn, .ribbon, .chips, .nav a, .brand-word, .lang, .feat h3, .arena-n, .arena-name, .fn-label, .pn, .legal-toc h2,
.shot figcaption, .qa summary, .steps b, .pill, .trophy span, .board-msg, .support-h, .doc h2, .nf h1 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1.05;
}

.kicker { color: var(--gold); font-size: 15px; letter-spacing: .08em; margin-bottom: 8px; }
.title {
  font-size: clamp(34px, 6vw, 56px);
  color: var(--white);
  -webkit-text-stroke: 6px var(--navy);
  paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--navy);
  margin-bottom: 14px;
  text-wrap: balance;
}
.sec-lead { color: var(--lavender); max-width: 640px; font-size: 18px; }

/* ---------- buttons: Figma "Buton / primary | secondary | success | ad" ---------- */
.btn {
  --top: #ffe040; --bot: #ff8000; --lip: #9e4500; --ink: #733305;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 64px; padding: 0 1.45em;
  border: 0; border-radius: 999px;
  background: linear-gradient(180deg, var(--top), var(--bot));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), 0 6px 0 var(--lip), 0 12px 18px rgba(20, 6, 50, .35);
  color: var(--white);
  font-size: 26px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--release) var(--ease-back);
}
.btn span {
  position: relative;
  -webkit-text-stroke: 6px var(--ink);
  paint-order: stroke fill;
}
.btn::before { /* gloss band: 20/64 of the height, inset 19/220 of the width, white 28 % */
  content: "";
  position: absolute; top: 6.25%; left: 8.6%; right: 8.6%; height: 31%;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
  pointer-events: none;
}
.btn:hover { color: var(--white); filter: brightness(1.05); }
.btn:active { transform: translateY(4px) scale(.97); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), 0 2px 0 var(--lip), 0 4px 8px rgba(20, 6, 50, .35); transition-duration: var(--press); }
.btn-secondary { --top: #9e66ff; --bot: #5c1fc2; --lip: #330a73; --ink: #2b0a61; }
.btn-success { --top: #73e580; --bot: #1f9e47; --lip: #0a5c26; --ink: #054d1f; }
.btn-ad { --top: #59e5d9; --bot: #008c94; --lip: #005257; --ink: #00474d; }
.btn-sm { min-height: 44px; font-size: 18px; padding: 0 1.1em; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), 0 4px 0 var(--lip), 0 8px 12px rgba(20, 6, 50, .3); }
.btn-sm span { -webkit-text-stroke-width: 5px; }
.btn-sm:active { transform: translateY(3px) scale(.97); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), 0 1px 0 var(--lip); }
.btn-lg { min-height: 72px; font-size: 32px; padding: 0 1.6em; }
.btn-lg span { -webkit-text-stroke-width: 7px; }
.breathe { animation: breathe 2.2s ease-in-out infinite; }
.breathe:hover, .breathe:active { animation-play-state: paused; }
@keyframes breathe { 50% { transform: scale(1.035); } }

/* Apple's badge (self-hosted SVG, unmodified): the link keeps the badge's exact size and black face until it is
   drawn, so nothing shifts and no empty gap shows (151 x 40 TR, 120 x 40 EN, drawn 54 px high) */
.badge { display: inline-block; flex: none; height: 54px; aspect-ratio: var(--ar, 120 / 40); border-radius: 11.4px; line-height: 0; background: #000; box-shadow: inset 0 0 0 1px #a6a6a6; } /* radius = the SVG's 8.44 of 40 */
.badge img { height: 100%; width: 100%; }
:lang(tr) .badge { --ar: 151 / 40; }
.badge:focus-visible { outline-offset: 4px; }

/* ---------- panel + ribbon: Figma "Krem kart, 4px altın kenar, 28 köşe; başlık mor kurdele" ---------- */
.panel {
  position: relative;
  background: var(--cream);
  color: var(--navy);
  border: 4px solid var(--gold);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.ribbon {
  position: relative;
  display: flex; justify-content: center;
  width: fit-content; max-width: calc(100% - 40px);
  margin: -50px auto 18px;
  padding: 0 1.2em;
  min-height: 48px; align-items: center;
  border: 3px solid var(--gold);
  border-radius: 22px;
  background: linear-gradient(180deg, #8c45f2, #541aad);
  color: var(--white);
  font-size: 26px;
  box-shadow: 0 5px 0 #2b0a61;
}
.ribbon span { -webkit-text-stroke: 5px var(--navy); paint-order: stroke fill; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top);
}
/* the bar's backing fades in as an opacity change of its own layer (compositor), not as a background/shadow
   transition (main thread) */
.top::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(21, 27, 86, .96); box-shadow: 0 6px 20px rgba(10, 4, 30, .35);
  opacity: 0; transition: opacity var(--enter) var(--ease-out); pointer-events: none; }
.top.scrolled::before { opacity: 1; }
.top-in { display: flex; align-items: center; gap: 12px; width: min(var(--content), 100%); margin: 0 auto; padding: 12px max(var(--edge), env(safe-area-inset-right)) 12px max(var(--edge), env(safe-area-inset-left)); min-height: 68px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex: none; }
.brand img { width: 40px; }
.brand-word {
  font-size: 24px;
  background: linear-gradient(180deg, #fff799, #ffc429 50%, #ff8000);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 var(--navy)) drop-shadow(0 -1px 0 var(--navy)) drop-shadow(1px 0 0 var(--navy)) drop-shadow(-1px 0 0 var(--navy));
}
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 2px; }
.nav a { display: flex; align-items: center; min-height: 44px; padding: 0 11px; border-radius: 12px; color: var(--white); text-decoration: none; font-size: 16px; }
.nav a:hover { background: rgba(255, 255, 255, .1); color: var(--gold-light); }
.top-actions { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; }
@media (min-width: 1081px) { .top-actions { margin-left: 0; } }
.lang { /* segmented control: EN | TR in a fixed order, the gold thumb slides to the chosen language */
  --seg: 44px;
  position: relative; display: inline-grid; grid-template-columns: var(--seg) var(--seg); height: 44px; padding: 3px;
  border-radius: 999px; background: rgba(21, 27, 86, .55); border: 2px solid rgba(255, 196, 41, .65);
  font-size: 15px; isolation: isolate;
}
.lang a { display: flex; align-items: center; justify-content: center; border-radius: 999px; color: var(--lavender);
  text-decoration: none; transition: color var(--fast, 150ms) var(--ease-out); }
.lang a:hover { color: var(--white); }
.lang a { position: relative; }
.lang a::after { content: ""; position: absolute; inset: -5px 0; } /* 44 px tall touch area over the 34 px segment */
.lang a[aria-current] { color: var(--navy); cursor: default; }
.lang-thumb {
  position: absolute; z-index: -1; top: 3px; left: 3px; width: var(--seg); height: calc(100% - 6px); border-radius: 999px;
  background: linear-gradient(180deg, #ffe040, #ffc429); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45), 0 2px 0 #b07800;
  transition: translate 380ms var(--spring), scale 160ms var(--ease-out);
  transform-origin: var(--grow-from, left) center;
}
/* finger down on the other language: the thumb stretches towards it, as an iOS switch's knob does */
.lang.press .lang-thumb { scale: 1.16 1; }
.lang[data-lang="tr"] { --grow-from: right; }
.lang[data-lang="tr"] .lang-thumb { translate: var(--seg) 0; }
/* chosen: the thumb slides first (site.js), then the other page opens; the labels swap colour with it */
.lang[data-lang="en"].going .lang-thumb { translate: var(--seg) 0; }
.lang[data-lang="tr"].going .lang-thumb { translate: 0 0; }
.lang.going a[aria-current] { color: var(--lavender); }
.lang.going a:not([aria-current]) { color: var(--navy); }
.menu-btn { /* the game's #menu: gold disc, three navy bars */
  display: none; position: relative; width: 44px; height: 44px; border: 0; border-radius: 50%; flex: none;
  background: linear-gradient(180deg, #ffe040, #ff9900); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), 0 3px 0 #9e4500; cursor: pointer;
}
.menu-btn i { position: absolute; left: 12px; width: 20px; height: 3.8px; border-radius: 2px; background: var(--navy); transition: transform var(--release) var(--ease-out), opacity var(--release); }
.menu-btn i:nth-of-type(1) { top: 13.6px; } .menu-btn i:nth-of-type(2) { top: 20.1px; } .menu-btn i:nth-of-type(3) { top: 26.6px; }
.menu-btn[aria-expanded="true"] i:nth-of-type(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] i:nth-of-type(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] i:nth-of-type(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 1080px) {
  .menu-btn { display: block; }
  .nav {
    position: absolute; left: 12px; right: 12px; top: calc(100% + 4px);
    padding: 10px; border-radius: 22px; border: 3px solid var(--gold);
    background: rgba(21, 27, 86, .96); box-shadow: 0 16px 30px rgba(8, 2, 26, .5);
    visibility: hidden; opacity: 0; transform: translateY(-8px) scale(.98); transform-origin: top right;
    transition: opacity var(--release) var(--ease-out), transform var(--release) var(--ease-out), visibility 0s linear var(--release);
  }
  .nav.open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav ul { flex-direction: column; }
  .nav a { font-size: 22px; min-height: 52px; padding: 0 14px; }
}
@media (max-width: 560px) {
  .top-cta { display: none; }
  .brand-word { font-size: 21px; }
}
@media (max-width: 380px) {
  .top-in { gap: 8px; }
  .top-actions { gap: 8px; }
  .brand { gap: 6px; }
  .brand img { width: 34px; }
  .brand-word { font-size: 18px; }
  .lang { --seg: 38px; }
}
@media (max-width: 339px) { .brand-word { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; margin-top: -68px; padding: 108px 0 72px; isolation: isolate; }
.hero::before { /* the home screen background (V2-02 v2_bg_menu), faded into the page at the sides and bottom */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("/assets/img/bg_menu.webp") center top / max(100%, 900px) auto no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  opacity: .9;
}
.rays {
  position: absolute; left: 50%; top: -60vmax; z-index: -1;
  width: 140vmax; height: 140vmax; margin-left: -70vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 226, 140, .09) 0deg 7deg, transparent 7deg 20deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 18%, transparent 70%);
  mask-image: radial-gradient(closest-side, #000 18%, transparent 70%);
  animation: spin 90s linear infinite;
  pointer-events: none;
}
@keyframes spin { to { transform: rotate(1turn); } }
/* endless decoration (rays, bobbing art, the breathing button) stops while its section is off screen (site.js sets
   .offscreen): no work the visitor cannot see */
.offscreen :is(.rays, .float, .breathe, .final-art), .offscreen.rays { animation-play-state: paused !important; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 40px; }
/* the logo is a centred composition (crown over the words, ribbon under them), so the whole column is centred on it */
.hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-logo { width: min(440px, 100%); margin: 0 auto 10px; }
.logo { width: 100%; height: auto; overflow: visible; }
.logo text { font-family: var(--display); }
/* the logo as three stacked layers in one 440 x 372 box (318 without the ribbon): crown 104 wide at x 168 */
.logo-stack { position: relative; display: block; aspect-ratio: 440 / 372; }
.logo-stack.no-ribbon { aspect-ratio: 440 / 318; }
.logo-stack > * { position: absolute; }
.logo-stack .logo-words, .logo-stack .logo-ribbon { inset: 0; display: block; }
.logo-stack svg { display: block; width: 100%; height: 100%; overflow: visible; }
.logo-stack .logo-crown { left: 38.18%; top: 0; width: 23.64%; height: auto; }
.logo-stack text { font-family: var(--display); }
.tagline {
  font-size: clamp(28px, 4.2vw, 42px);
  color: var(--gold-pale);
  -webkit-text-stroke: 6px var(--navy); paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--navy);
  margin-bottom: 12px;
  text-wrap: balance;
}
.lead { font-size: 19px; color: var(--lavender); max-width: 540px; margin: 0 auto 26px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px 22px; }
.hero-cta.center { justify-content: center; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 26px; }
.chips li { padding: 6px 12px; border-radius: var(--radius-chip); background: rgba(21, 27, 86, .55); border: 2px solid rgba(255, 255, 255, .14); font-size: 14px; color: var(--gold-light); }

.hero-phone { position: relative; display: flex; justify-content: center; padding: 20px 0 36px; }
.phone {
  position: relative; width: min(330px, 74vw, calc((100svh - 150px) * 443 / 960)); min-width: 240px; aspect-ratio: 443 / 960;
  border-radius: 46px; padding: 10px; background: var(--navy);
  box-shadow: 0 0 0 4px var(--gold), 0 0 0 7px #9e6a00, 0 30px 60px rgba(8, 2, 26, .55), 0 0 120px rgba(255, 196, 41, .25);
}
/* the screen: the video's own first frame (an eager image, the LCP) lies under the video; the video stays invisible
   until it really plays and then fades in over that same frame, so the screen never shows an empty colour, a
   different picture or a jump (the old cover image was another moment of the clip) */
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 37px; overflow: hidden; background: var(--navy); }
.phone-poster, .phone-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone-video { opacity: 0; transition: opacity .3s ease-out; }
.phone-video.playing { opacity: 1; }
.video-toggle { /* sits on the bezel's lower edge like a home button, never over the game's own buttons */
  position: absolute; left: 50%; bottom: -24px; width: 48px; height: 48px; margin-left: -24px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; z-index: 3;
  background: linear-gradient(180deg, #9e66ff, #5c1fc2); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), 0 0 0 3px var(--gold), 0 4px 0 3px #9e6a00, 0 8px 14px rgba(8, 2, 26, .4);
  transition: transform var(--release) var(--ease-back);
}
.video-toggle:active { transform: translateY(2px) scale(.95); }
.video-toggle i { width: 0; height: 0; border-left: 14px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; }
.video-toggle.playing i { width: 14px; height: 16px; border: 0; margin: 0; background: linear-gradient(90deg, #fff 0 5px, transparent 5px 9px, #fff 9px); }
.float { position: absolute; z-index: 2; filter: drop-shadow(0 10px 14px rgba(8, 2, 26, .45)); animation: bob 1.8s ease-in-out infinite; pointer-events: none; }
.f1 { width: 118px; left: 2%; top: 14%; animation-delay: -.3s; }
.f2 { width: 76px; right: 6%; top: 8%; animation-delay: -1.1s; }
.f3 { width: 72px; left: 8%; bottom: 14%; animation-delay: -.7s; }
.f4 { width: 124px; right: 0; bottom: 6%; animation-delay: -1.5s; }
@keyframes bob { 50% { transform: translateY(-4px); } }

@media (min-width: 901px) and (max-height: 860px) {
  .hero { padding: 92px 0 48px; }
  .hero-logo { width: min(360px, 100%); }
  .lead { margin-bottom: 20px; }
  .chips { margin-top: 18px; }
}
@media (max-width: 900px) {
  .hero { padding: 92px 0 48px; }
  .hero-in { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .hero-copy { align-items: center; }
  .hero-logo { margin: 0 auto 6px; width: min(360px, 88%); }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-cta, .chips { justify-content: center; }
  .hero-phone { width: min(520px, 100%); margin: 0 auto; }
  .f1 { width: 88px; left: 0; } .f4 { width: 92px; }
}

/* ---------- sections ---------- */
.sec { position: relative; padding: 88px 0; }
/* content-visibility: auto was measured and left out: it cut the opening's main-thread work, but a section rendered
   for the first time as it scrolls in cannot hand its entrance animation to the compositor in that frame, so the
   cards' pops ran on the main thread (perf_check.mjs listed them) - smooth scrolling matters more here. */
.sec > .wrap > .kicker, .sec > .wrap > .title, .sec > .wrap > .sec-lead { text-align: center; margin-left: auto; margin-right: auto; }
.sec-lead { margin-bottom: 30px; }

/* how to play + the practice board */
.sec-play { background: linear-gradient(180deg, transparent, rgba(21, 27, 86, .45) 30%, rgba(21, 27, 86, .45) 70%, transparent); }
.play-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 48px; align-items: center; }
.play-copy .kicker, .play-copy .title { text-align: left; }
.steps { counter-reset: s; display: grid; gap: 14px; margin: 20px 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; }
.steps li::before {
  content: counter(s); grid-row: span 2; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-size: 24px; color: var(--navy); background: linear-gradient(180deg, #ffe040, #ff9900); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .4), 0 3px 0 #9e4500;
}
.steps b { font-size: 22px; color: var(--gold-light); }
.steps span { color: var(--lavender); }
.hint { color: var(--lavender); font-size: 15px; opacity: .85; }

.board-panel { padding: 18px 18px 20px; }
.trophies { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 10px; }
.trophy { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.trophy-art { position: relative; width: 56px; height: 56px; }
.trophy-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: transform var(--enter) var(--ease-back), opacity var(--enter); }
.trophy .t-full { opacity: 0; transform: scale(.6); }
.trophy.on .t-full { opacity: 1; transform: scale(1.12); animation: punch .22s var(--ease-back); }
.trophy.on .t-empty { opacity: 0; }
.trophy > span:last-child { font-size: 12px; color: var(--muted); text-align: center; }
.trophy.on > span:last-child { color: var(--navy); }
@keyframes punch { 0% { transform: scale(.8); } 60% { transform: scale(1.2); } 100% { transform: scale(1.15); } }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 12px; }
.pill { min-width: 64px; padding: 5px 12px; border-radius: 999px; text-align: center; font-size: 16px; color: var(--muted); background: var(--lavender); border: 2px solid var(--line); letter-spacing: .12em; }
.pill.found { color: var(--white); background: var(--green); border-color: #1f8f43; letter-spacing: .02em; animation: punch .22s var(--ease-back); }
.board {
  position: relative; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr);
  aspect-ratio: 1; padding: 10px; border-radius: 22px; background: var(--white); border: 4px solid var(--navy);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.trace { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); pointer-events: none; overflow: visible; }
.trace polyline, .trace .found-lines polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: .74; vector-effect: none; }
.trace .live { stroke: var(--trace); }
.trace .live.bonus { stroke: var(--gold); transition: stroke 120ms; }
.trace .found-lines polyline { stroke: var(--green); opacity: .28; }
.cell {
  position: relative; z-index: 1; display: grid; place-items: center; border: 0; background: none; cursor: pointer; padding: 0;
  font-family: var(--display); font-size: clamp(26px, 7vw, 40px); color: var(--navy); border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
.cell.on { color: var(--navy); transform: scale(1.12); transition: transform var(--press) var(--ease-out); }
.cell:focus-visible { outline-offset: -4px; }
.board-msg { min-height: 1.6em; margin: 12px 0 6px; text-align: center; font-size: 17px; color: var(--purple); }
.board-msg.good { color: var(--green); }
.board-msg.soft { color: var(--muted); }
.board-msg.bonus { color: #b07800; }
.board-bonus { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 10px; font-family: var(--display);
  text-transform: uppercase; font-size: 15px; color: var(--purple); }
.board-bonus img { width: 24px; height: auto; }
.board-bonus b { min-width: 30px; padding: 3px 9px; border-radius: 999px; background: var(--purple); color: var(--white); font-weight: 400; text-align: center; }
.board-bonus.bump b { animation: bump 260ms var(--ease-back); }
@keyframes bump { 50% { scale: 1.2; } }
.board-foot { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .play-in { grid-template-columns: 1fr; gap: 28px; }
  .play-copy { width: min(520px, 100%); margin: 0 auto; }
  .play-copy .kicker, .play-copy .title, .hint { text-align: center; }
  .board-panel { width: min(470px, 100%); margin: 0 auto; }
}

/* features */
.feats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 46px 20px; margin-top: 64px; }
.feat { padding: 64px 20px 22px; text-align: center; }
.feat img { position: absolute; left: 50%; top: -50px; width: 104px; height: 104px; object-fit: contain; transform: translateX(-50%); filter: drop-shadow(0 8px 10px rgba(38, 8, 89, .3)); }
.feat h3 { text-wrap: balance; font-size: 21px; color: var(--purple); margin-bottom: 8px; }
.feat p { color: var(--muted); font-size: 16px; line-height: 1.5; }
@media (max-width: 1000px) { .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .feats { gap: 54px 12px; } .feat { padding: 54px 12px 16px; } .feat img { width: 88px; height: 88px; top: -44px; } .feat h3 { font-size: 18px; } .feat p { font-size: 15px; } }

/* rails (arenas, screens): native scroll with snap, buttons for mouse users */
.rail { position: relative; }
.rail-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  --inset: max(var(--edge), calc((100% - var(--content)) / 2 + var(--edge)));
  padding: 18px var(--inset) 28px;
  scroll-padding: 0 var(--inset);
  scrollbar-width: none;
}
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > li { scroll-snap-align: start; flex: none; }
.rail-btn {
  position: absolute; top: 50%; z-index: 3; width: 52px; height: 52px; margin-top: -26px; border: 0; border-radius: 50%; cursor: pointer;
  background: linear-gradient(180deg, #9e66ff, #5c1fc2); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), 0 4px 0 #330a73, 0 8px 16px rgba(8, 2, 26, .4);
  display: grid; place-items: center; transition: transform var(--release) var(--ease-back), opacity var(--release);
}
.rail-btn:active { transform: translateY(3px) scale(.95); }
.rail-btn i { width: 14px; height: 14px; border: solid #fff; border-width: 0 4px 4px 0; border-radius: 2px; transform: rotate(135deg); margin-left: 5px; }
.rail-btn.next i { transform: rotate(-45deg); margin: 0 5px 0 0; }
.rail-btn.prev { left: max(8px, calc((100% - var(--content)) / 2 - 10px)); }
.rail-btn.next { right: max(8px, calc((100% - var(--content)) / 2 - 10px)); }
.rail-btn[disabled] { opacity: 0; pointer-events: none; }
@media (hover: none) { .rail-btn { display: none; } }

.arena { position: relative; width: 200px; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; border: 4px solid var(--gold); box-shadow: var(--shadow-card); background: var(--purple-deep); }
.arena { isolation: isolate; }
.arena .real { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out), opacity var(--enter) var(--ease-out); }
.arena:hover .real { transform: scale(1.05); }
.arena-n { position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: 10px; font-size: 13px; color: var(--white); background: rgba(21, 27, 86, .75); border: 1.5px solid var(--gold); }
.arena-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 10px 12px; text-align: center; font-size: 19px; color: var(--white);
  background: linear-gradient(180deg, transparent, rgba(21, 27, 86, .92) 60%);
  -webkit-text-stroke: 4px var(--navy); paint-order: stroke fill;
}

.shot { width: 250px; }
.shot figure { margin: 0; container-type: inline-size; }
.shot figcaption { text-wrap: balance; min-height: 2.3em; display: flex; align-items: flex-end; justify-content: center; text-align: center; margin-bottom: 12px; font-size: 20px; -webkit-text-stroke: 5px var(--navy); paint-order: stroke fill; text-shadow: 0 3px 0 var(--navy); }
.shot-frame { padding: 5px; border-radius: calc(8cqi + 5px); background: var(--gold); box-shadow: 0 16px 30px rgba(8, 2, 26, .45); }
.shot-img { position: relative; overflow: hidden; border-radius: 8cqi; background: var(--purple-deep); isolation: isolate; }
.shot-img .real { position: relative; width: 100%; }

/* blur-up: a 12 px copy (inlined) under every lazy image; the image fades in over it once it has arrived */
.lqip { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }

.js img.real { opacity: 0; transition: opacity var(--enter) var(--ease-out); }
.js img.real.loaded { opacity: 1; }
@media (max-width: 600px) { .shot { width: 64vw; } .arena { width: 40vw; max-width: 200px; } }

/* FAQ */
.faq { display: grid; gap: 14px; margin-top: 18px; }
.qa { border-radius: var(--radius-panel); }
.qa summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 18px 20px 18px 22px; font-size: 20px; color: var(--navy);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; flex: none; margin-left: auto; width: 34px; height: 34px; border-radius: 50%;
  background: var(--purple) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
  transition: transform var(--release) var(--ease-out);
}
.qa[open] summary::after { transform: rotate(180deg); }
.qa-a { padding: 0 22px 20px; color: #4a4360; }
.qa-a a { color: var(--purple); font-weight: 700; }

/* support */
.sec-support { padding-top: 110px; }
.support { padding: 18px 26px 30px; text-align: center; }
.support-art { width: 96px; margin: 0 auto 6px; }
.support-lead { color: #4a4360; max-width: 560px; margin: 0 auto 22px; }
.support-addr { margin-top: 14px; font-size: 15px; }
.support-links a { display: inline-flex; align-items: center; min-height: 44px; }
.support-addr a, .support-links a, .doc a:not(.btn) { color: var(--purple); font-weight: 700; }
.support-h { margin: 28px 0 10px; font-size: 18px; color: var(--purple); }
.support-tips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.support-tips li { padding: 6px 12px; border-radius: 12px; background: var(--lavender); border: 2px solid var(--line); font-size: 15px; color: var(--navy); }
.support-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 24px; }

/* final call */
.sec-final { overflow: hidden; isolation: isolate; text-align: center; padding: 100px 0 110px; }
.sec-final .rays { top: -40%; }
.final-in { display: flex; flex-direction: column; align-items: center; }
.final-art { width: 170px; margin-bottom: 10px; filter: drop-shadow(0 14px 18px rgba(8, 2, 26, .5)); animation: bob 1.8s ease-in-out infinite; }
.final-in .sec-lead { margin-bottom: 26px; }

/* footer */
.foot { padding: 50px 0 calc(40px + env(safe-area-inset-bottom)); background: rgba(13, 6, 36, .55); border-top: 3px solid rgba(255, 196, 41, .35); text-align: center; }
.foot-in { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.foot-logo { width: 170px; }
.foot-in > .lang { margin-top: 2px; }
/* the game's bottom menu (V2-02): a white rounded bar, a picture over a Luckiest Guy label, the current page purple
   with a short bar under it; pictures lift on hover, the whole item presses like a game button */
.foot-nav ul { display: flex; justify-content: center; gap: 4px; padding: 8px 10px 6px; border-radius: 32px; background: var(--white);
  box-shadow: 0 10px 24px rgba(8, 2, 26, .4), inset 0 -3px 0 rgba(21, 27, 86, .1); }
.foot-nav li { display: flex; }
.foot-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-width: 112px; min-height: 64px; padding: 4px 12px 6px; border-radius: 24px; color: var(--navy); text-decoration: none;
  transition: transform var(--release) var(--ease-back); -webkit-tap-highlight-color: transparent; }
.foot-nav a:hover { color: var(--purple); }
.foot-nav a:active { transform: scale(.95); transition-duration: var(--press); }
.fn-art { display: grid; place-items: center; width: 40px; height: 40px; transition: translate var(--release) var(--ease-back); }
.fn-art img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(38, 8, 89, .25)); }
.foot-nav a:hover .fn-art { translate: 0 -3px; }
.fn-avatar_knight img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--gold), 0 3px 4px rgba(38, 8, 89, .3); filter: none; }
.fn-label { font-size: 13px; white-space: nowrap; }
.foot-nav a[aria-current] { color: var(--purple); }
.foot-nav a[aria-current]::after { content: ""; position: absolute; bottom: 2px; left: 50%; width: 28px; height: 3px; margin-left: -14px; border-radius: 2px; background: var(--purple); }
@media (max-width: 420px) {
  .foot-nav { width: 100%; }
  .foot-nav ul { gap: 0; padding: 8px 4px 6px; }
  .foot-nav li { flex: 1; }
  .foot-nav a { min-width: 0; width: 100%; padding: 4px 4px 6px; }
  .fn-label { font-size: 12px; }
}
.foot-note, .foot-copy { font-size: 13px; color: #a79fc4; max-width: 640px; font-weight: 500; }

/* documents (account deletion) */
.doc { padding: 120px 0 80px; }
.doc-panel { padding: 22px 28px 32px; }
.doc-panel > .ribbon { font-size: 28px; }
.doc h2 { font-size: 22px; color: var(--purple); margin: 28px 0 10px; }
.doc p, .doc li { color: #3d3654; }
.doc-lead { font-size: 18px; }
.doc-steps { counter-reset: s; display: grid; gap: 10px; }
.doc-steps li { counter-increment: s; position: relative; padding-left: 46px; min-height: 34px; }
.doc-steps li::before { content: counter(s); position: absolute; left: 0; top: -3px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); color: var(--white); background: var(--purple); }
.doc-list { display: grid; gap: 10px; }
.doc-list li { position: relative; padding-left: 22px; }
.doc-list li::before { content: ""; position: absolute; left: 4px; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px #e0a400; }
.doc-btn { margin-top: 20px; text-align: center; }
.doc .support-addr { text-align: center; margin-top: 10px; }
.doc-note { margin-top: 20px; padding: 14px 16px; border-radius: 16px; background: var(--lavender); font-size: 15px; }
.page-doc .doc p + p { margin-top: 10px; }

/* 404 */
/* privacy policy: a formal document in the site's panel - letterhead logo, the policy's own title, a document block,
   numbered contents, numbered sections; tables become labelled cards on phones */
.legal-head { text-align: center; }
.logo-legal { display: block; width: min(230px, 64%); margin: 2px auto 12px; }
.pop-wrap { display: block; }
.legal-title { font-size: 19px; font-weight: 800; line-height: 1.35; color: var(--purple-deep); text-wrap: balance; }
.legal-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 18px 0 16px; padding: 14px 18px;
  text-align: left; border-radius: 16px; background: var(--white); border: 2px solid var(--line); font-size: 15px; }
.legal-meta div { display: contents; }
.legal-meta dt { font-weight: 800; color: var(--purple); }
.legal-meta dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: #3d3654; }
.legal-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; }
.legal-pdf-info { font-size: 14px; color: var(--muted); }
.legal-toc { margin: 22px 0 6px; padding: 14px 18px 12px; border-radius: 16px; border: 2px solid var(--line); background: rgba(255, 255, 255, .55); }
.legal-toc h2 { margin: 0 0 8px; font-size: 16px; color: var(--purple); letter-spacing: .06em; }
.legal-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: column; grid-template-rows: repeat(4, auto); gap: 2px 22px; }
.legal-toc a { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; line-height: 26px; color: var(--navy); font-weight: 700; text-decoration: none; }
.legal-toc a:hover { color: var(--purple); }
/* number discs: Luckiest Guy digits sit on the disc's centre through the font's metric overrides (top of this file) */
.pn { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--purple); color: var(--white); font-size: 15px; line-height: 1; box-shadow: inset 0 -2px 0 rgba(21, 27, 86, .25);
  padding-top: .4px; } /* digits' ink measured 0.2 px high (canvas measureText); "1" 0.27 px left of its advance: */
.pn[data-n="1"] { padding-left: .55px; }
.legal-toc .pn { width: 26px; height: 26px; font-size: 13px; background: linear-gradient(180deg, #ffe040, #ffc429); color: var(--navy); }
.legal-body { margin-top: 6px; }
.legal-body h2 { display: flex; align-items: flex-start; gap: 12px; font-size: 22px; line-height: 1.1; scroll-margin-top: 90px; }
/* a disc sits on the centre of the heading's first line (24.2 px), also when the heading wraps */
.legal-body h2 .pn { margin-top: -2.9px; }
.legal-body p, .legal-body li { color: #3d3654; }
.legal-body p + p { margin-top: 10px; }
.legal-body ul { display: grid; gap: 8px; margin: 10px 0; padding-left: 22px; list-style: disc; }
.legal-body li::marker { color: var(--gold); }
.legal-body a { color: var(--purple); font-weight: 700; overflow-wrap: anywhere; }
.legal-table { margin: 10px 0 14px; overflow-x: auto; border-radius: 14px; border: 2px solid var(--line); background: var(--white); }
.legal-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.legal-table th { text-align: left; padding: 10px 12px; background: var(--lavender); color: var(--purple-deep); font-weight: 800; border-bottom: 2px solid var(--purple); }
.legal-table td { vertical-align: top; padding: 10px 12px; border-top: 1px solid var(--line); color: #3d3654; }
.legal-table tr:first-child td { border-top: 0; }
@media (max-width: 640px) {
  .legal-meta { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .legal-meta dd { margin-bottom: 8px; }
  .legal-toc ol { grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; grid-template-rows: none; }
  .legal-table { border: 0; background: none; overflow: visible; }
  .legal-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .legal-table table, .legal-table tbody, .legal-table tr, .legal-table td { display: block; }
  .legal-table tr { margin: 0 0 10px; padding: 4px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--white); }
  .legal-table td { padding: 8px 0; border-top: 1px solid var(--line); }
  .legal-table td::before { content: attr(data-label); display: block; margin-bottom: 2px; font-family: var(--display);
    text-transform: uppercase; font-size: 12px; letter-spacing: .04em; color: var(--purple); }
}

.nf { position: relative; overflow: hidden; isolation: isolate; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px var(--edge); gap: 10px; }
.nf-art { width: 150px; animation: bob 1.8s ease-in-out infinite; }
.nf .sec-lead { margin: 0 auto; }
.nf .hero-cta { margin-top: 20px; }

/* page to page (language switch, deletion page, back): the old screen fades out (motion.exit 0.2 s) over the new one,
   whose parts pop in as on any page open; browsers without cross-document view transitions just load the page */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 200ms cubic-bezier(.55, .055, .675, .19) both vt-out; }
::view-transition-new(root) { animation: none; }
@keyframes vt-out { to { opacity: 0; } }

/* ENTRANCE - the game's "enter: 0.30 s OutBack" (V2_MOTION), tuned for a web page after two owner reviews: the first,
   bouncy version was overwhelming (scale .85 -> 1.04, every block, paragraphs and footer included), the second, calm one
   felt abrupt (an expo-like curve that does all its moving in the first 100 ms). Now:
   - movement: 16 px (12 px on phones) down from above, on a soft-start ease-out (cubic .4/.9/.5/1: half the start speed
     of an expo or cubic ease-out, so nothing jumps) to a small overshoot (1.5 px, cards also .95 -> 1.012 -> 1) at 60 %,
     then a soft settle - 700 ms in all, 95 % of the way after ~330 ms: it flows, then bounces once, gently;
   - opacity on its own, shorter track (320 ms ease-out): a block is solid before it lands, never a ghost;
   - top-down cascade 60 ms apart; the first screen is complete in about 0.95 s;
   - text moves but does not scale (stays crisp); cards, panels and art also scale;
   - the brand moment (crown, logo words, floating art) keeps its own, slightly bigger bounce;
   - the phone (the LCP picture) only settles and is never transparent; long text, the footer and lone buttons never move.
   Pure CSS from the first frame; translate/scale are the individual properties, so they compose with the buttons'
   press and the art's bob. */
:root { --ease-flow: cubic-bezier(.4, .9, .5, 1); --flow: 700ms; --appear: 320ms; --rise: -16px; }
@media (max-width: 600px) { :root { --rise: -12px; --flow: 660ms; } }
.pop { animation: appear var(--appear) ease-out both, flow-text var(--flow) var(--ease-flow) both; animation-delay: var(--d, 0ms), var(--d, 0ms); }
.panel-in { animation: appear var(--appear) ease-out both, flow-card var(--flow) var(--ease-flow) both; animation-delay: var(--d, 0ms), var(--d, 0ms); }
.drop { animation: appear var(--appear) ease-out both, flow-text 560ms var(--ease-flow) both; animation-delay: var(--d, 0ms), var(--d, 0ms); }
.settle { animation: settle 720ms var(--ease-flow) both; animation-delay: var(--d, 0ms); }
@keyframes appear { from { opacity: .001; } }
@keyframes flow-text { 0% { translate: 0 var(--rise); } 60% { translate: 0 1.5px; } 100% { translate: 0 0; } }
@keyframes flow-card { 0% { translate: 0 var(--rise); scale: .95; } 60% { translate: 0 1.5px; scale: 1.012; } 100% { translate: 0 0; scale: 1; } }
@keyframes settle { 0% { translate: 0 18px; } 65% { translate: 0 -2px; } 100% { translate: 0 0; } }
/* the brand moment: crown drops and bounces, the words swell, the floating art pops - as on the game's loading screen */
@keyframes crown-drop { 0% { opacity: .001; translate: 0 -22px; } 55% { opacity: 1; translate: 0 3px; } 78% { translate: 0 -1px; } 100% { translate: 0 0; } }
@keyframes brand-pop { 0% { opacity: .001; scale: .86; } 58% { opacity: 1; scale: 1.035; } 100% { scale: 1; } }
.d1 { --d: 60ms; } .d2 { --d: 120ms; } .d3 { --d: 180ms; } .d4 { --d: 240ms; } .d5 { --d: 300ms; } .d6 { --d: 360ms; }
.d7 { --d: 420ms; } .d8 { --d: 480ms; } .d9 { --d: 540ms; } .d10 { --d: 600ms; } .d11 { --d: 720ms; } .d12 { --d: 780ms; }
.d13 { --d: 840ms; } .d14 { --d: 900ms; }
/* the header's sections, left to right (wide screens) */
@media (min-width: 1081px) {
  .nav li { animation: appear var(--appear) ease-out both, flow-text var(--flow) var(--ease-flow) both; }
  .nav li:nth-child(1) { animation-delay: 60ms; } .nav li:nth-child(2) { animation-delay: 100ms; }
  .nav li:nth-child(3) { animation-delay: 140ms; } .nav li:nth-child(4) { animation-delay: 180ms; }
  .nav li:nth-child(5) { animation-delay: 220ms; } .nav li:nth-child(6) { animation-delay: 260ms; }
}
.logo-stack .logo-crown { transform-origin: 50% 70%; }
.logo-stack .logo-words { transform-origin: 50% 54%; }
.logo-stack .logo-ribbon { transform-origin: 50% 90%; }
.logo-hero .logo-crown { animation: crown-drop 700ms var(--ease-flow) 60ms both; }
.logo-hero .logo-words { animation: brand-pop 680ms var(--ease-flow) 160ms both; }
.logo-hero .logo-ribbon { animation: appear var(--appear) ease-out 320ms both, flow-text 560ms var(--ease-flow) 320ms both; }
/* floating art: pops in, then keeps bobbing */
.float.pop { animation: brand-pop 640ms var(--ease-flow) both, bob 1.8s ease-in-out infinite; }
.f1.pop { animation-delay: var(--d), -.3s; } .f2.pop { animation-delay: var(--d), -1.1s; }
.f3.pop { animation-delay: var(--d), -.7s; } .f4.pop { animation-delay: var(--d), -1.5s; }
/* a page opened at a section (#features from the language switch or a shared link): that section comes in top-down */
section:target :is(.kicker, .title, .sec-lead, .hint, .play-copy) {
  animation: appear var(--appear) ease-out both, flow-text var(--flow) var(--ease-flow) both; animation-timeline: auto, auto;
}
section:target :is(.board-panel, .support, .rail, .feats > *, .faq > *) {
  animation: appear var(--appear) ease-out both, flow-card var(--flow) var(--ease-flow) both; animation-timeline: auto, auto;
}
section:target .kicker { animation-delay: 0ms, 0ms; } section:target .title { animation-delay: 60ms, 60ms; }
section:target :is(.sec-lead, .play-copy) { animation-delay: 120ms, 120ms; }
section:target :is(.board-panel, .support, .rail) { animation-delay: 180ms, 180ms; }
section:target :is(.feats, .faq) > :nth-child(1) { animation-delay: 180ms, 180ms; } section:target :is(.feats, .faq) > :nth-child(2) { animation-delay: 240ms, 240ms; }
section:target :is(.feats, .faq) > :nth-child(3) { animation-delay: 300ms, 300ms; } section:target :is(.feats, .faq) > :nth-child(4) { animation-delay: 360ms, 360ms; }
section:target :is(.feats, .faq) > :nth-child(5) { animation-delay: 420ms, 420ms; } section:target :is(.feats, .faq) > :nth-child(6) { animation-delay: 480ms, 480ms; }
section:target :is(.feats, .faq) > :nth-child(7) { animation-delay: 540ms, 540ms; } section:target :is(.feats, .faq) > :nth-child(n+8) { animation-delay: 600ms, 600ms; }

/* scrolling: section headings and cards below the first screen come in the same way as they come into view, in
   reading order 70 ms apart (at most 8 in one wave). Long text (the policy), the footer and lone buttons do not move.
   site.js only arms a block that is still below the screen and plays it the moment it enters; it never hides what is
   already visible, and an armed block shows by itself after 6 s if nothing played it. Reduce Motion: nothing is armed. */
.armed { opacity: 0; animation: unarm 1ms 6s both; }
@keyframes unarm { to { opacity: 1; } }
.popping { animation: appear var(--appear) ease-out both, flow-card var(--flow) var(--ease-flow) both; animation-delay: var(--sd, 0ms), var(--sd, 0ms); }
.popping:is(.kicker, .title, .sec-lead) { animation-name: appear, flow-text; }
.final-art.popping { animation: brand-pop 640ms var(--ease-flow) both, bob 1.8s ease-in-out infinite; animation-delay: var(--sd, 0ms), 0s; }

@media (max-width: 600px) {
  .hero { padding-bottom: 28px; }
  .hero-phone { padding: 8px 0 32px; }
  .phone { width: min(300px, 72vw); border-radius: 40px; padding: 8px; }
  .phone-screen { border-radius: 33px; }
  /* the art stays on the bezel, never over the game's own buttons */
  .f1 { width: 66px; left: 0; top: 9%; }
  .f2 { width: 50px; right: 2px; top: 5%; }
  .f3 { width: 50px; left: 2px; bottom: 12%; }
  .f4 { width: 70px; right: 0; bottom: 3%; }
  .board-panel { padding: 14px 12px 16px; }
  .pills { gap: 6px; }
  .pill { flex: 0 0 calc((100% - 12px) / 3); min-width: 0; font-size: 15px; }
  body { font-size: 16px; }
  .sec { padding: 64px 0; }
  .btn { font-size: 22px; min-height: 58px; }
  .btn-lg { font-size: 26px; min-height: 64px; }
  .badge { height: 48px; border-radius: 10.1px; }
  .ribbon { font-size: 22px; }
  .doc-panel, .support { padding-left: 18px; padding-right: 18px; }
}

/* Reduce Motion: no breathing, bobbing, rays or slides; colour and state changes stay (docs/V2_MOTION.md) */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html, html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  /* Reduce Motion: every entrance becomes a 0.15 s fade with no movement (V2_MOTION "Reduce Motion") */
  .pop, .drop, .popping, .panel-in, .logo-hero :is(.logo-crown, .logo-words, .logo-ribbon), section:target :is(.kicker, .title, .sec-lead, .hint, .play-copy, .board-panel, .support, .rail, .feats > *, .faq > *) {
    animation: fade 150ms linear both !important;
  }
  .lang-thumb { transition: none; }
  .armed { opacity: 1; }
  .btn, .rail-btn, .arena img, .trophy-art img, .menu-btn i { transition-duration: 0s !important; }
  .js img.real { transition: opacity 150ms linear; }
  .btn:active { transform: none; }
}
@media (forced-colors: active) {
  .btn, .rail-btn, .menu-btn { border: 2px solid ButtonText; }
  .title, .tagline, .btn span, .ribbon span { -webkit-text-stroke: 0; text-shadow: none; }
}
@keyframes fade { from { opacity: 0; } }
@supports (transition-timing-function: linear(0, 0.028, 0.097, 0.192, 0.3, 0.41, 0.518, 0.617, 0.705, 0.781, 0.845, 0.898, 0.939, 0.971, 0.994, 1.011, 1.022, 1.028, 1.031, 1.031, 1.03, 1.028, 1.024, 1.021, 1.018, 1.014, 1.011, 1.009, 1.006, 1.004, 1.003, 1.002, 1)) {
  :root { --spring: linear(0, 0.028, 0.097, 0.192, 0.3, 0.41, 0.518, 0.617, 0.705, 0.781, 0.845, 0.898, 0.939, 0.971, 0.994, 1.011, 1.022, 1.028, 1.031, 1.031, 1.03, 1.028, 1.024, 1.021, 1.018, 1.014, 1.011, 1.009, 1.006, 1.004, 1.003, 1.002, 1); }
}
/* arriving through a view transition (language switch, link): the header stays as it was, only the page pops in */
.top { view-transition-name: top; }
.vt .top .pop, .vt .top .nav li { animation: none; }
