/* ---------- fonts (subset to Latin + Cyrillic; the same families the app ships) ---------- */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/inter-400.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/inter-600.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/inter-700.woff2) format("woff2"); }
@font-face { font-family: "Special Elite"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/special-elite.woff2) format("woff2"); }
@font-face { font-family: "PT Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/pt-mono.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/jetbrains-mono-600.woff2) format("woff2"); }

/* ---------- tokens ---------- */

:root {
  color-scheme: dark light;

  /* page */
  --bg: #16130f;
  --surface: #201b15;
  --surface-2: #2a2419;
  --fg: #f3efe4;
  --muted: #9b9384;
  --primary: #d7f24a;
  --on-primary: #16130f;
  --border: rgba(255, 255, 255, 0.09);
  --glow: rgba(215, 242, 74, 0.16);
  --store-border: rgba(255, 255, 255, 0.28);
  --max: 1080px;

  /* the app's own tokens (app/lib/shared/theme/colors.dart), used inside the phone */
  --a-bg: #16130f;
  --a-surface: #201b15;
  --a-surface-var: #2a2419;
  --a-primary: #d7f24a;
  --a-on-primary: #1a1512;
  --a-text: #f3efe4;
  --a-text2: #9b9384;
  --a-faint: #625b4d;
  --a-border: rgba(255, 255, 255, 0.08);
  --a-paper: #efe6d2;
  --a-ink: #1a1512;
  --a-mask: #3b362c;
  --a-error: #e07a5f;
  --a-spark: #f0a94e;
  --a-sniper: #e07a5f;
  --a-flashlight: #5fa8e0;
  --a-foundation: #8fcb6e;
  --a-clue: #b79be8;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f1e3;
    --surface: #ffffff;
    --surface-2: #ede4cf;
    --fg: #211c15;
    --muted: #5b5344;
    --primary: #5c7a2e;
    --on-primary: #ffffff;
    --border: #e1d7be;
    --glow: rgba(92, 122, 46, 0.14);
    --store-border: rgba(0, 0, 0, 0.4);

    --a-bg: #f7f1e3;
    --a-surface: #ffffff;
    --a-surface-var: #ede4cf;
    --a-primary: #5c7a2e;
    --a-on-primary: #ffffff;
    --a-text: #211c15;
    --a-text2: #5b5344;
    --a-faint: #847b68;
    --a-border: #e1d7be;
    --a-paper: #ffffff;
    --a-ink: #1a1512;
    --a-mask: #d8c9a4;
    --a-error: #b3261e;
    --a-spark: #c97a1f;
    --a-sniper: #b3261e;
    --a-flashlight: #2e6fb0;
    --a-foundation: #3f5a1e;
    --a-clue: #6d4bb0;
  }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.has-sticky { padding-bottom: 76px; }

a { color: inherit; }

.ic { width: 1em; height: 1em; flex: none; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
}

.skip:focus {
  left: 8px;
  z-index: 100;
  background: var(--primary);
  color: var(--on-primary);
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

/* ---------- header ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.top-row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img { width: 32px; height: 32px; border-radius: 9px; }

.main-nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
  margin-right: auto;
}

.main-nav a { color: var(--muted); text-decoration: none; }
.main-nav a:hover { color: var(--fg); }

.top-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* language dropdown */

.lang { position: relative; }

.lang summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { border-color: var(--primary); }
.lang summary .ic { font-size: 18px; }
.lang summary .chev { font-size: 16px; color: var(--muted); transition: transform 0.15s ease; }
.lang[open] summary .chev { transform: rotate(180deg); }
.lang-code { display: none; }

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 15px;
  text-decoration: none;
}

.lang-menu a:hover,
.lang-menu a:focus-visible { background: var(--surface-2); outline-offset: -2px; }
.lang-menu a[aria-current="true"] { color: var(--primary); font-weight: 700; }
.lang-menu .tick { visibility: hidden; font-size: 16px; }
.lang-menu a[aria-current="true"] .tick { visibility: visible; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn.small { padding: 9px 16px; font-size: 14px; border-radius: 12px; }
.btn.primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 28px var(--glow); }
.btn.primary:hover { transform: translateY(-2px); }

/* store badges */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 14px;
  align-items: center;
}

.store {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  height: 58px;
  padding: 0 20px 0 15px;
  border-radius: 13px;
  background: #000;
  color: #fff;
  border: 1px solid var(--store-border);
  text-decoration: none;
}

.store-logo { width: 28px; height: 28px; flex: none; }
.store-text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-text small { font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.85; }
.store-text strong { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }

.store.play {
  box-shadow: 0 10px 34px var(--glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.store.play:hover { transform: translateY(-2px); box-shadow: 0 14px 40px var(--glow); }

.store.soon { cursor: default; background: #14110d; }
.store.soon > :not(.soon-tag) { opacity: 0.62; }

.soon-tag {
  position: absolute;
  top: -15px;
  right: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 56px;
  align-items: center;
  padding-top: 48px;
  padding-bottom: 80px;
}

/* a text input's intrinsic width must not push the grid column past the viewport */
.hero > * { min-width: 0; }

.eyebrow {
  display: inline-block;
  margin: 0 0 20px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}

h1 {
  font-size: clamp(38px, 5.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}

h1 em { font-style: normal; color: var(--primary); }

.lead {
  font-size: 19px;
  color: var(--muted);
  max-width: 34em;
  margin: 0 0 30px;
}

.lead strong { color: var(--fg); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--muted);
}

.chips .ic { font-size: 16px; color: var(--primary); }

/* "scan to install": only where there is a mouse and room, i.e. a desktop visitor who has to move to their phone */
.qr { display: none; }

@media (min-width: 961px) and (hover: hover) {
  .qr {
    display: flex;
    align-items: center;
    gap: 14px;
    width: fit-content;
    margin-top: 30px;
    padding: 10px 18px 10px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
  }
}

.qr-code { display: block; line-height: 0; padding: 7px; background: #fff; border-radius: 10px; }
.qr-code img { width: 92px; height: 92px; }
.qr-text { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); line-height: 1.4; }
.qr-text strong { color: var(--fg); font-size: 15px; }

/* ---------- phone + demo (mirrors the app's solo round) ---------- */

.phone-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-stage::before {
  content: "";
  position: absolute;
  inset: 8% 0;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}

.demo-caption {
  position: relative;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.demo-note {
  position: relative;
  margin: 14px 8px 0;
  max-width: 340px;
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
  color: var(--muted);
}

.phone {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 10px;
  border-radius: 46px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 700px;
  overflow: hidden;
  border-radius: 36px;
  background: var(--a-bg);
  color: var(--a-text);
  font-family: "Inter", -apple-system, "Segoe UI", sans-serif;
}

/* punch-hole camera + gesture bar, so it reads as a phone */
.app::before,
.app::after {
  content: "";
  position: absolute;
  left: 50%;
  z-index: 6;
  transform: translateX(-50%);
  pointer-events: none;
}

.app::after { top: 12px; width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #2b3140 0 18%, #05070c 55%); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.06); }
.app::before { bottom: 7px; width: 112px; height: 4px; border-radius: 2px; background: var(--a-text); opacity: 0.35; }

/* header */

.app-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 34px 14px 8px;
  background: var(--a-surface);
  border-bottom: 1px solid var(--a-border);
}

.app-back {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--a-text);
  font-size: 22px;
  cursor: pointer;
}

.app-back:hover { background: color-mix(in srgb, var(--a-primary) 16%, transparent); }

.app-title { flex: 1; min-width: 0; text-align: center; }

.artist {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub {
  margin-top: 2px;
  font: 600 11px "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color: var(--a-text2);
}

.timer {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  color: var(--a-text);
}

.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 3.5; }
.timer .ring-bg { stroke: var(--a-border); }
.timer .ring-fg { stroke: var(--a-primary); stroke-linecap: round; transition: stroke-dashoffset 0.3s linear; }
.timer span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 600 10.5px "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

.timer.low { color: var(--a-error); }
.timer.low .ring-fg { stroke: var(--a-error); }

/* lyrics */

.app-body { position: relative; flex: 1; min-height: 0; }

.lyrics-scroll {
  height: 100%;
  overflow-y: auto;
  padding: 14px 6px 30px;
  scrollbar-width: thin;
  scrollbar-color: var(--a-faint) transparent;
}

.lyrics { display: flex; flex-direction: column; gap: 10px; }

.lline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8px;
  row-gap: 8px;
  padding: 4px 8px;
  font-family: "Special Elite", "PT Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 16.5px;
  line-height: 1.5;
  letter-spacing: 0.4px;
  color: var(--a-text);
}

.piece { display: inline-flex; align-items: center; white-space: nowrap; }

.tok { display: inline-block; }

/* a revealed word: a paper pill with ink text, as in the app */
.tok.word {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.25em;
  padding: 0.1em 0.5em 0;
  border-radius: 4px;
  background: var(--a-paper);
  color: var(--a-ink);
  font-weight: 700;
  line-height: 1;
}

.tok.late { color: var(--a-text2); }

/* a hidden word (Easy): a pill as wide as the word, with one tick per letter */
.tok.mask {
  height: 1.25em;
  width: calc(var(--n, 4) * 0.62em + 0.9em);
  min-width: 26px;
  padding: 0 0.45em;
  border-radius: 6px;
  vertical-align: middle;
  /* two layers: letter ticks inside the content box, the grey fill over the whole rounded border box */
  background-image: radial-gradient(circle at 50% 50%, var(--a-faint) 1.3px, transparent 1.8px), linear-gradient(var(--a-mask), var(--a-mask));
  background-size: 0.62em 100%, 100% 100%;
  background-repeat: repeat-x, no-repeat;
  background-origin: content-box, border-box;
  background-clip: content-box, border-box;
}

.tok.mask.target {
  cursor: pointer;
  outline: 2px solid var(--a-foundation);
  outline-offset: 1px;
  animation: aim 1.1s ease-in-out infinite;
}

.tok.pop { animation: pop 0.8s ease-out; }

@keyframes pop {
  0% { transform: scale(1.25); filter: brightness(1.3); }
  100% { transform: scale(1); filter: none; }
}

@keyframes aim {
  50% { outline-color: transparent; }
}

.banner {
  position: absolute;
  left: 50%;
  bottom: 10px;
  max-width: calc(100% - 24px);
  padding: 9px 14px;
  border-radius: 14px;
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.banner.show { opacity: 1; transform: translate(-50%, 0); }
.banner.ok { color: var(--a-primary); }
.banner.bad { color: var(--a-error); }

/* action row: four superpowers + Guess the song */

.actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px 14px;
  background: var(--a-surface);
  border-top: 1px solid var(--a-border);
}

.ab {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--a-ab, var(--a-text));
  font-size: 17px;
  cursor: pointer;
}

.ab[data-ab="spark"] { --a-ab: var(--a-spark); }
.ab[data-ab="sniper"] { --a-ab: var(--a-sniper); }
.ab[data-ab="flashlight"] { --a-ab: var(--a-flashlight); }
.ab[data-ab="foundation"] { --a-ab: var(--a-foundation); }
.ab[data-ab="clue"] { --a-ab: var(--a-clue); }

.ab-circle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--a-surface-var);
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.ab:active .ab-circle { transform: scale(0.92); }
.ab.armed .ab-circle { border-color: var(--a-primary); }
.ab.dim { opacity: 0.4; }

.ab-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 2px;
  border: 2px solid var(--a-surface);
  border-radius: 999px;
  background: var(--a-bg);
  color: var(--a-text);
  font: 600 9px "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  box-sizing: content-box;
  line-height: 1;
}

.ab-pips {
  position: absolute;
  left: 50%;
  bottom: -8px;
  display: flex;
  gap: 3px;
  padding: 3px 4px;
  transform: translateX(-50%);
  border: 1px solid var(--a-border);
  border-radius: 999px;
  background: var(--a-bg);
}

.ab-pips i { width: 5px; height: 5px; border-radius: 50%; background: color-mix(in srgb, var(--a-text2) 35%, transparent); }
.ab-pips i.on { background: var(--a-ab); }

.guess-btn,
.primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 16px;
  background: var(--a-primary);
  color: var(--a-on-primary);
  font: 600 14px "Inter", sans-serif;
  letter-spacing: 0.2px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--a-primary) 35%, transparent);
  transition: transform 0.1s ease;
}

.guess-btn:active,
.primary-btn:active { transform: scale(0.97); }

.guess-btn { flex: 1; min-width: 0; height: 44px; padding: 0 6px; }
.guess-label { min-width: 0; padding-right: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guess-btn .ic { font-size: 15px; margin-left: 2px; }
.guess-btn b { font-weight: 600; margin-left: -2px; }

.primary-btn { width: 100%; height: 48px; padding: 0 16px; font-size: 15px; }
.primary-btn .ic { font-size: 15px; margin-left: 2px; }
.primary-btn b { font-weight: 600; margin-left: -2px; }

.ghost-btn {
  width: 100%;
  height: 46px;
  border: 1px solid var(--a-border);
  border-radius: 16px;
  background: transparent;
  color: var(--a-text);
  font: 600 14px "Inter", sans-serif;
  cursor: pointer;
}

.ghost-btn:hover { border-color: var(--a-primary); }

/* word bar */

.wordbar {
  flex: none;
  display: flex;
  gap: 8px;
  padding: 8px 16px 22px;
  background: var(--a-surface);
  border-top: 1px solid var(--a-border);
}

.field {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--a-border);
  border-radius: 14px;
  background: var(--a-surface-var);
  color: var(--a-text);
  font: 400 16px "Inter", sans-serif; /* 16px keeps iOS from zooming the page on focus */
  caret-color: var(--a-primary);
}

.field { text-overflow: ellipsis; }
.field::placeholder { color: var(--a-text2); text-overflow: ellipsis; }
.field:focus { outline: none; border-color: var(--a-primary); }

.go {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--a-primary);
  color: var(--a-on-primary);
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.go:active { transform: scale(0.92); }

.shake { animation: shake 0.35s ease; }

@keyframes shake {
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* sheet + dialog */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.overlay.center { justify-content: center; align-items: center; padding: 22px; }

.scrim {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: default;
}

.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 16px 16px;
  border-top: 1px solid var(--a-border);
  border-radius: 24px 24px 0 0;
  background: var(--a-surface);
  animation: rise 0.25s ease-out;
}

.sheet-grab { width: 38px; height: 4px; margin: 0 auto 2px; border-radius: 2px; background: var(--a-faint); opacity: 0.6; }

.sheet-head {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 8px;
}

.sheet-head h2,
.dialog h2 { margin: 0; font-size: 17px; font-weight: 700; text-align: center; }

.clue-label {
  margin: 0;
  text-align: center;
  font: 600 11.5px "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color: var(--a-primary);
}

.sheet .field { width: 100%; flex: none; }

.sheet-msg {
  min-height: 18px;
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--a-text2);
}

.sheet-msg.bad { color: var(--a-error); }

.dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 20px;
  border: 1px solid var(--a-border);
  border-radius: 20px;
  background: var(--a-surface);
  text-align: center;
  animation: rise 0.2s ease-out;
}

.dialog p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.5; color: var(--a-text2); }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
}

/* result (replaces the action row + word bar once the round is over) */

.result {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 24px;
  border-top: 1px solid var(--a-border);
  background: var(--a-surface);
  animation: rise 0.35s ease-out;
}

.result h3 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.result.won h3 { color: var(--a-primary); }
.result .was { margin: 0; font-size: 14px; color: var(--a-text2); }
.result .was strong { color: var(--a-text); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 2px 0 0; }

.stat {
  padding: 7px 12px;
  border: 1px solid var(--a-border);
  border-radius: 12px;
  background: var(--a-bg);
}

.stat dt { font-size: 11.5px; color: var(--a-text2); }
.stat dd { margin: 0; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }

.end-text { margin: 0; font-size: 13px; line-height: 1.45; color: var(--a-text2); }
.result-actions { display: flex; flex-direction: column; gap: 8px; }

/* ---------- sections ---------- */

section { padding: 72px 0; }

.band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head { max-width: 640px; margin-bottom: 40px; }

h2 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.section-head p,
.lede { color: var(--muted); font-size: 18px; margin: 0; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}

.step,
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px;
}

.band .card { background: var(--bg); }

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 800;
}

.step h3,
.card h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -0.01em; }
.step p,
.card p { margin: 0; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.card .tag {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }

.split ul { list-style: none; display: grid; gap: 14px; margin: 24px 0 0; padding: 0; }
.split li { display: flex; gap: 12px; color: var(--muted); }
.split li strong { color: var(--fg); }

.split li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 10px;
  border-radius: 50%;
  background: var(--primary);
}

.room {
  display: grid;
  gap: 12px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
}

.room h4 {
  margin: 0 0 4px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-weight: 600;
}

.player .dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #16130f;
  font-size: 13px;
}

.player:nth-of-type(2) .dot { background: #e9a23b; }
.player:nth-of-type(3) .dot { background: #6fa8dc; }
.player span:last-child { margin-left: auto; color: var(--primary); font-variant-numeric: tabular-nums; }

.cta-final { text-align: center; }
.cta-final .stores { justify-content: center; }
.cta-final p { max-width: 34em; margin: 0 auto 30px; color: var(--muted); font-size: 18px; }
.cta-final img { width: 84px; height: 84px; margin-bottom: 20px; border-radius: 22px; }

/* ---------- sticky install bar (phones) ---------- */

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}

.sticky-cta img { width: 36px; height: 36px; border-radius: 10px; }
.sticky-cta span { flex: 1; display: flex; flex-direction: column; font-weight: 700; line-height: 1.25; }
.sticky-cta small { font-size: 12.5px; font-weight: 400; color: var(--muted); }

/* ---------- footer ---------- */

footer { padding: 32px 0 48px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--fg); }

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

@media (min-width: 961px) {
  .sticky-cta { display: none; }
}

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 32px; }
  .main-nav { display: none; }
}

@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .steps,
  .grid { grid-template-columns: minmax(0, 1fr); }
  section { padding: 52px 0; }
}

@media (max-width: 520px) {
  .nav-cta { display: none; }
  .top-row { gap: 12px; }
  .lang-name { display: none; }
  .lang-code { display: inline; }
  .phone { padding: 7px; border-radius: 38px; }
  .actions { gap: 6px; padding: 10px 10px 13px; }
  .ab, .ab-circle { width: 32px; height: 32px; }
  .ab { font-size: 15px; }
  .guess-btn { padding: 0 6px; }
  .app { height: 640px; border-radius: 31px; }
  .lline { font-size: 15.5px; }
  .store { height: 56px; padding-right: 16px; }
  .store-text strong { font-size: 19px; }
  .stores { gap: 18px 10px; }
}

@media (max-width: 380px) {
  .actions { gap: 5px; padding: 10px 8px 13px; }
  .ab, .ab-circle { width: 30px; height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
