/* =========================================================================
   Repeazy — game-like DARK design system, Kayo Sports palette.
   100% monospace · whole app on Kayo "tarmac" (#0c161c) · chalk text + light
   hairline panels · Kayo lime primary (#40f87f) + yellow/blue/gold accents ·
   the four game pads keep their own colours · 4px radius on interactives.
   ========================================================================= */
:root {
  /* ink / neutrals — Kayo "chalk" text + tarmac grey ladder, on the dark field */
  --ink: #f9fafa;          /* chalk — primary text + light borders */
  --ink-deep: #ffffff;     /* strongest text / pressed */
  --charcoal: #3d4549;     /* panel hover (tarmac-light-20) */
  --body: #b3b9bb;         /* paragraph / body text */
  --mute: #9ea2a4;         /* secondary / metadata */
  --stone: #6d7377;        /* least-emphasis */
  --ash: #9ea2a4;          /* low-emphasis on dark */
  /* surfaces — Kayo "tarmac" dark */
  --canvas: #0c161c;       /* PAGE background (Kayo tarmac) */
  --surface-soft: #182229; /* sheets / inputs — a half-step up */
  --surface-card: #242d33; /* cards / panels / buttons (tarmac-light-10) */
  --surface-dark: #0c161c; /* game surface (== page) */
  --surface-dark-elev: #242d33;
  /* lines — light translucent, on dark */
  --hairline: rgba(255, 255, 255, 0.14);
  --hairline-strong: rgba(255, 255, 255, 0.30);
  --hairline-dark: rgba(255, 255, 255, 0.16);
  /* on dark */
  --on-dark: #f9fafa;
  --on-dark-mute: #9ea2a4;
  /* text that sits ON a light or coloured fill */
  --on-color: #0c161c;
  /* brand + semantic — the Kayo palette (UI accents; the game pads are
     separate literal colours in js, left untouched) */
  --accent: #06b2ff;       /* Kayo bright blue (info / links) */
  --danger: #fe3938;       /* Kayo red */
  --warning: #f7ff1a;      /* Kayo electric yellow */
  --success: #40f87f;      /* Kayo lime (primary action + positive) */
  --gold: #cfa120;         /* Kayo gold (reward / premium) */
  /* shape */
  --r: 4px;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular,
          Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
html { background: var(--canvas); }   /* so overscroll / leak area is the game black too */
body {
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.5;
  background: var(--canvas);
  color: var(--ink);
  overflow: hidden;
  user-select: none;
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
}
b, strong { font-weight: 700; }

#app {
  position: relative;
  height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--canvas);
}

/* ---------- Status bar (terminal chrome) ---------- */
.statusbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-top) + 10px) 14px 10px;
  border-bottom: 1px solid var(--hairline);
  font-size: 14px;
}
.status-cells { display: flex; gap: 18px; color: var(--mute); }
.status-cell b { color: var(--ink); margin-left: 2px; }
.brand-mark { display: flex; align-items: center; }
.brand-mark img { width: 22px; height: 22px; display: block; }
.status-actions { display: flex; align-items: center; gap: 4px; }
.kbd-btn {
  background: transparent; border: none; color: var(--ink);
  font-family: var(--mono); font-size: 16px; font-weight: 500;
  padding: 4px 6px; cursor: pointer;
}
.kbd-btn:active { color: var(--ink-deep); }
.premium-badge { color: var(--mute); }
.premium-badge.is-premium { color: var(--ink); font-weight: 700; }

/* ---------- Screens ---------- */
.screen { display: none; flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.screen.active { display: flex; flex-direction: column; }

/* Sheets (modals) */
#screen-leaderboard, #screen-shop, #screen-invite, #screen-menu {
  position: absolute; inset: 0; z-index: 40;
  background: rgba(15, 0, 0, 0.28);
  display: none; align-items: flex-end;
}
#screen-leaderboard.active, #screen-shop.active, #screen-invite.active, #screen-menu.active { display: flex; }
.sheet {
  width: 100%; max-height: 90%; overflow-y: auto;
  background: var(--surface-soft);
  border-top: 1px solid var(--hairline-strong);
  padding: 16px 16px calc(28px + var(--safe-bottom));
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h2 { margin: 0; font-size: 16px; font-weight: 700; }

/* ---------- Home ---------- */
#screen-home { padding: 16px; gap: 28px; }

/* Hero — the single dark TUI mockup */
.hero-tui {
  background: var(--surface-dark);
  color: var(--on-dark);
  border-radius: 0;
  overflow: hidden;
  flex-shrink: 0;   /* don't let the flex column squash + clip the card */
}
.tui-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--hairline-dark);
  font-size: 13px; color: var(--on-dark-mute);
}
.tui-title { font-weight: 500; }
.tui-body {
  margin: 0; padding: 28px 16px 20px;
  font-family: var(--mono); white-space: pre-wrap; word-break: break-word;
  font-size: 13px; line-height: 1.6; color: var(--on-dark);
}
.tui-mark {
  display: block; font-weight: 700; letter-spacing: 1px;
  font-size: clamp(18px, 6.2vw, 26px); color: var(--on-dark);
}
.tui-dim { color: var(--on-dark-mute); }
.tui-ok { color: var(--success); }
.cursor { display: inline-block; background: var(--on-dark); color: var(--on-dark); animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tui-hint {
  padding: 10px 16px 14px;
  border-top: 1px solid var(--hairline-dark);
  font-size: 12px; color: var(--ash);
}

/* Hero game preview — a mini 2×2 of the real pads that loops a light-up demo,
   so the menu shows the game at a glance. Mirrors .mem-pad colours/feel. */
.hero-demo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  width: 124px; margin: 4px auto 18px; padding-top: 2px;
}
.hero-demo .demo-pad {
  aspect-ratio: 1; border-radius: var(--r);
  background: var(--c); border: 1px solid var(--hairline-dark);
  opacity: .32; transition: opacity .2s ease, transform .2s ease;
}
.hero-demo .demo-pad.lit {
  opacity: 1; background: var(--l); transform: scale(1.06);
}

/* Section blocks */
.block { display: flex; flex-direction: column; gap: 10px; }
.block-label {
  font-size: 16px; font-weight: 700; color: var(--ink);
  padding-bottom: 8px; border-bottom: 1px solid var(--hairline);
  letter-spacing: 0.5px;
}

/* ---------- Buttons (dark) ----------
   Every button mirrors the in-game panel: an elevated dark surface, a white
   hairline edge, white text, a subtle bottom shadow for depth, and a press
   that pushes it down. Primary = a white CTA accent; Play = green (see below). */
.btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  background: var(--surface-dark-elev);
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r);
  box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.35);
  font-family: var(--mono); font-size: 16px; font-weight: 500;
  padding: 12px 16px; cursor: pointer;
  transition: background .12s ease, color .12s ease, border-color .12s ease,
              transform .05s ease, box-shadow .05s ease;
}
@media (hover: hover) {
  .btn:hover { background: var(--charcoal); }
  .btn-primary:hover { background: #e9e7e7; }
  .btn-reward:hover { background: var(--charcoal); }
}
.btn:active {
  background: var(--charcoal);
  transform: translateY(2px);
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.35);
}
.btn:focus-visible { outline: 2px solid var(--on-dark); outline-offset: 3px; }
.btn .mk { color: var(--on-dark-mute); font-weight: 700; flex: none; min-width: 1.5em; text-align: center; font-size: 18px; line-height: 1; }
.btn-text { display: flex; flex-direction: column; gap: 1px; }
.btn-text small { font-weight: 400; font-size: 13px; color: var(--mute); }
/* Primary = white panel accent (dark text) */
.btn-primary { background: var(--on-dark); color: var(--on-color); border-color: var(--on-dark); }
.btn-primary .mk { color: var(--on-color); }
.btn-primary .btn-text small { color: var(--stone); }
.btn-primary:active { background: #e9e7e7; transform: translateY(2px); box-shadow: 0 0 0 0 rgba(0,0,0,0.35); }
/* Reward (watch ad) = elevated dark with a gold "reward" edge */
.btn-reward { background: var(--surface-dark-elev); border-color: var(--gold); color: var(--ink); justify-content: flex-start; }
.btn-reward .mk { color: var(--gold); }
.btn-reward:active { background: var(--charcoal); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 14px; font-size: 14px; }
.btn-sm .btn-text small { display: none; }
.btn:disabled {
  background: transparent; color: var(--ash);
  border-color: var(--hairline); box-shadow: none; cursor: default;
  transform: none; opacity: .55;
}
.btn:disabled .mk { color: var(--ash); }

/* ---------- Colour accents (the square colours, across the app) ---------- */
/* Play / Play Again = green "go" — the signature action. */
.btn-play-giant.btn-primary, .btn-playagain {
  background: var(--success); color: var(--on-color); border-color: var(--success);
}
.btn-play-giant.btn-primary .mk, .btn-playagain .mk { color: var(--on-color); }
@media (hover: hover) {
  .btn-play-giant.btn-primary:hover, .btn-playagain:hover { background: #28fb94; }
}
.btn-play-giant.btn-primary:active, .btn-playagain:active { background: #14854d; }
/* Scores = blue edge. */
#btn-leaderboard.btn-play-giant { border-color: var(--accent); }
/* Daily = orange star. */
#btn-daily .mk { color: var(--warning); }
/* Reset progress = red (destructive). */
#btn-reset { color: var(--danger); border-color: var(--danger); }

.lock-tag {
  border: 1px solid currentColor; font-size: 10px; font-weight: 700;
  padding: 0 4px; border-radius: var(--r); vertical-align: middle; margin-left: 4px;
}

/* link rows (utility menu) */
.link-rows { display: flex; flex-direction: column; }
.link-row {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: none; border-bottom: 1px solid var(--hairline);
  color: var(--ink); font-family: var(--mono); font-size: 16px; font-weight: 500;
  padding: 12px 2px; text-align: left; cursor: pointer;
}
.link-row:last-child { border-bottom: none; }
.link-row:active { color: var(--ink-deep); }
.link-row .mk { color: var(--mute); font-weight: 700; min-width: 1.6em; text-align: center; font-size: 18px; }

/* ---------- Game (live TUI dark surface) ---------- */
#screen-game { padding: 14px 16px 16px; background: var(--surface-dark); color: var(--on-dark); }

/* Terminal title bar — the right-hand [x] quits the run back to the menu,
   mirroring closing a terminal window. */
.game-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px; margin-bottom: 8px;
  border-bottom: 1px solid var(--hairline-dark);
}
.game-bar-title { font-size: 13px; font-weight: 500; color: var(--on-dark-mute); }
.game-quit {
  background: var(--surface-dark-elev); color: var(--on-dark);
  border: 1px solid var(--hairline-dark); border-radius: var(--r);
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  padding: 6px 12px; cursor: pointer;
  transition: background .12s ease, color .12s ease, border-color .12s ease, transform .05s ease;
}
@media (hover: hover) { .game-quit:hover { background: var(--charcoal); border-color: var(--on-dark-mute); } }
.game-quit:active { background: var(--danger); color: var(--on-dark); border-color: var(--danger); transform: translateY(1px); }
.game-quit:focus-visible { outline: 2px solid var(--on-dark); outline-offset: 3px; }

/* Big live LEVEL = the Flappy-style "number go up" you chase, with the best to
   beat right under it. */
.game-hud { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0 14px; }
.hud-main { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hud-level-big { font-size: 64px; font-weight: 700; line-height: 1; color: var(--on-dark); font-variant-numeric: tabular-nums; }
.hud-best-chip { font-size: 12px; letter-spacing: .5px; color: var(--ash); }
.hud-best-chip b { color: var(--on-dark); font-weight: 700; }
.timer-bar { width: 100%; height: 6px; background: var(--surface-dark-elev); border-radius: var(--r); overflow: hidden; }
.timer-fill { height: 100%; width: 100%; background: var(--success); transition: width .12s linear; }
.timer-fill.low { background: var(--danger); }

.game-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }

/* Death feedback — a red flash + shake over the whole game surface. */
#screen-game { position: relative; }
#screen-game::after {
  content: ""; position: absolute; inset: 0; z-index: 6;
  background: var(--danger); opacity: 0; pointer-events: none;
}
#screen-game.hit { animation: screenShake .42s ease; }
#screen-game.hit::after { animation: flashRed .5s ease; }
@keyframes screenShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(4px); }
}
@keyframes flashRed { 0% { opacity: 0; } 14% { opacity: .5; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  #screen-game.hit, #screen-game.hit::after { animation: none; }
}

/* Question card */
.q-card { width: 100%; text-align: center; animation: fade .14s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.q-sub { color: var(--ash); font-size: 13px; margin-bottom: 16px; }
.q-sub::before { content: "// "; }
.q-prompt { font-weight: 700; margin-bottom: 28px; line-height: 1.2; color: var(--on-dark); }
.q-prompt.q-big { font-size: 46px; }
.q-prompt.q-mid { font-size: 30px; }
.q-prompt { font-size: 38px; }
.q-options { display: grid; gap: 10px; }
.q-options.opt-4 { grid-template-columns: 1fr 1fr; }
.q-options.opt-2 { grid-template-columns: 1fr 1fr; }
.opt {
  background: var(--surface-dark-elev); border: 1px solid var(--hairline-dark);
  color: var(--on-dark); font-family: var(--mono);
  font-size: 24px; font-weight: 700; padding: 20px 10px; border-radius: var(--r); cursor: pointer;
  transition: background .1s ease;
}
.opt:active { background: var(--charcoal); }
.opt.correct { background: var(--success); color: var(--on-color); border-color: var(--success); }
.opt.wrong { background: var(--danger); color: var(--on-dark); border-color: var(--danger); }
.opt.eliminated { opacity: .25; }

.score-float {
  position: absolute; top: 28%; left: 50%; transform: translateX(-50%);
  font-size: 26px; font-weight: 700; pointer-events: none;
  animation: floatUp .7s ease forwards;
}
.score-float.good { color: var(--success); }
.score-float.bad { color: var(--danger); }
@keyframes floatUp { to { transform: translate(-50%, -36px); opacity: 0; } }

/* Power-up tray */
.powerup-tray { display: flex; gap: 8px; justify-content: center; padding-top: 8px; }
.powerup {
  position: relative; background: var(--surface-dark-elev); border: 1px solid var(--hairline-dark);
  color: var(--on-dark); font-family: var(--mono); font-weight: 700;
  min-width: 60px; height: 44px; border-radius: var(--r); font-size: 15px; cursor: pointer;
}
.powerup { transition: background .12s ease, transform .05s ease; }
@media (hover: hover) { .powerup:hover { background: var(--charcoal); } }
.powerup:active { background: var(--charcoal); transform: translateY(1px); }
.powerup:focus-visible { outline: 2px solid var(--on-dark); outline-offset: 2px; }
.powerup small {
  position: absolute; top: -7px; right: -7px; background: var(--on-dark); color: var(--on-color);
  border: 1px solid var(--on-dark);
  font-size: 11px; min-width: 18px; height: 18px; border-radius: var(--r);
  display: grid; place-items: center; padding: 0 3px; font-weight: 700;
}

/* ---------- Result ---------- */
#screen-result { padding: 16px; gap: 14px; }

/* Screenshot zone: brand + score-dominant, built to be screenshotted/shared. */
.result-card {
  background: var(--surface-card); border: 1px solid var(--hairline);
  border-radius: var(--r); padding: 18px 18px 16px; width: 100%; text-align: center;
}
.result-brand { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .5px; color: var(--mute); }
.result-logo { width: 20px; height: 20px; display: block; }
.result-title { font-size: 18px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.result-hero { margin: 12px 0 6px; }
.result-score-num { font-size: 72px; font-weight: 700; color: var(--ink); display: block; line-height: 1; font-variant-numeric: tabular-nums; }
.result-score-label { color: var(--mute); font-size: 13px; }
.result-score-label b { color: var(--ink); font-weight: 700; }
.result-new-best { color: var(--success); font-weight: 700; margin: 8px 0 0; }
.result-stats { display: flex; gap: 12px; margin-top: 14px; border-top: 1px solid var(--hairline); padding-top: 12px; }
.result-stats div { display: flex; flex-direction: column; flex: 1; }
.result-stats b { font-size: 20px; font-weight: 700; color: var(--ink); }
.result-stats span { font-size: 12px; color: var(--mute); }

/* Actions — Play Again is the dominant, thumb-reachable target; share/home demoted. */
.result-actions { display: flex; flex-direction: column; gap: 8px; }
.btn-playagain { justify-content: center; padding: 18px 16px; }
.btn-playagain .btn-text b { font-size: 19px; }
.result-secondary { display: flex; gap: 8px; }
.btn-mini { flex: 1; justify-content: center; padding: 9px 12px; font-size: 14px; gap: 8px; }
.btn-mini .mk { font-size: 16px; min-width: 1.2em; }

/* Buttons give a small shake when the game-over screen appears. */
@keyframes btnShake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-5px); }
  30% { transform: translateX(5px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
}
#screen-result.shake .result-actions .btn { animation: btnShake .45s ease; }
@media (prefers-reduced-motion: reduce) {
  #screen-result.shake .result-actions .btn { animation: none; }
}

/* ---------- Leaderboard ---------- */
.tabs { display: flex; gap: 0; margin-bottom: 14px; border-bottom: 1px solid var(--hairline-strong); }
.tab {
  background: transparent; border: none; color: var(--mute);
  font-family: var(--mono); font-size: 15px; font-weight: 500;
  padding: 8px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab.active { color: var(--ink); border-bottom-color: var(--ash); }
.lb-list { list-style: none; margin: 0; padding: 0; counter-reset: lb; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.lb-rank { width: 28px; color: var(--mute); font-weight: 700; }
.lb-name { flex: 1; color: var(--ink); }
.lb-score { font-weight: 700; color: var(--ink); }
.lb-empty { color: var(--mute); padding: 20px 0; }

/* ---------- Shop ---------- */
.shop-balance { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 0 16px; border-bottom: 1px solid var(--hairline); margin-bottom: 8px; }
.shop-balance > b { color: var(--mute); font-weight: 400; }
.shop-balance > b span { color: var(--ink); font-weight: 700; }
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 4px; }
.shop-item { border: 1px solid var(--hairline); border-radius: 0; padding: 10px 8px; }
.shop-ic { font-size: 16px; font-weight: 700; color: var(--ink); }
.shop-name { font-weight: 700; font-size: 13px; margin-top: 4px; }
.shop-desc { font-size: 11px; color: var(--mute); margin: 2px 0 6px; min-height: 30px; }
.shop-owned { font-size: 11px; color: var(--stone); margin-bottom: 8px; }
.buy-power { width: 100%; justify-content: center; }
.premium-card { border: 1px solid var(--hairline-strong); border-radius: 0; padding: 14px; margin-top: 8px; }
.premium-card ul { margin: 0 0 14px; padding: 0; list-style: none; line-height: 1.9; font-size: 14px; color: var(--body); }

/* ---------- Invite ---------- */
.invite-link { display: flex; gap: 8px; margin: 14px 0; }
.invite-link input {
  flex: 1; background: var(--surface-soft); border: 1px solid var(--hairline); color: var(--ink);
  border-radius: var(--r); padding: 8px 12px; font-family: var(--mono); font-size: 13px;
}
.invite-link input:focus { background: var(--canvas); border-color: var(--ink); outline: none; }
.invite-stat { margin-top: 16px; color: var(--mute); }
.invite-stat b { color: var(--ink); }

/* ---------- Menu ---------- */
.row-toggle { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--hairline); margin-bottom: 4px; }
.row-toggle input { width: 20px; height: 20px; accent-color: var(--success); }

/* ---------- Memory game (in-TUI, semantic palette) ---------- */
.mem-wrap { width: 100%; text-align: center; }
.mem-level { font-size: 14px; margin-bottom: 16px; color: var(--ash); }
.mem-level::before { content: "// level "; }
.mem-level b { color: var(--on-dark); font-size: 20px; }
.mem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 320px; margin: 0 auto; aspect-ratio: 1; }
.mem-pad {
  background: var(--c); border: 1px solid var(--hairline-dark); border-radius: var(--r); cursor: pointer;
  opacity: .42; transition: opacity .1s ease, transform .08s ease;
}
.mem-pad.lit { opacity: 1; transform: scale(1.02); background: var(--l); }
.mem-pad.mem-bad { animation: shake .4s; }
.mem-pad:active { transform: scale(.98); }
.mem-hint { margin-top: 18px; color: var(--ash); font-size: 13px; min-height: 20px; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-7px)} 75%{transform:translateX(7px)} }

/* ---------- Ads ---------- */
.ad-slot { margin-top: auto; min-height: 60px; }
.ad-banner { min-height: 100px; width: 100%; }   /* reserve a full 320x100 banner up front (no layout shift) */
.ad-rect { min-height: 200px; width: 100%; }
.ad-demo {
  border: 1px dashed var(--hairline-strong); border-radius: 0;
  padding: 14px; color: var(--mute); font-size: 13px;
  display: flex; flex-direction: column; gap: 4px;
}
.ad-demo span { font-weight: 700; color: var(--ink); }
.ad-demo span::before { content: "Ad · "; color: var(--mute); }
.ad-demo small { font-size: 11px; color: var(--stone); }

/* Rewarded overlay — transient dark terminal */
.reward-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(15, 0, 0, 0.55); display: grid; place-items: center; padding: 24px; }
.reward-box {
  background: var(--surface-dark); color: var(--on-dark);
  border: 1px solid var(--hairline-dark); border-radius: 0;
  padding: 24px; width: 100%; max-width: 340px; font-size: 14px;
}
.reward-tv { font-size: 14px; color: var(--success); font-weight: 700; }
.reward-box h3 { margin: 8px 0 4px; font-size: 16px; font-weight: 700; }
.reward-box p { color: var(--on-dark-mute); margin: 0 0 10px; }
.reward-count { font-size: 32px; font-weight: 700; margin: 8px 0; color: var(--success); }
.reward-skip { margin-top: 6px; }
.reward-box .btn { background: var(--surface-dark-elev); color: var(--on-dark); border-color: var(--hairline-dark); justify-content: center; }
.reward-box .btn.btn-primary { background: var(--success); color: var(--on-color); border-color: var(--success); }
.reward-box .btn:disabled { background: transparent; color: var(--ash); opacity: .55; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(22px + var(--safe-bottom));
  transform: translateX(-50%) translateY(16px);
  background: var(--surface-dark-elev); color: var(--on-dark);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r); padding: 10px 16px;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  opacity: 0; pointer-events: none; z-index: 200; max-width: 90%; text-align: center;
  transition: opacity .18s ease, transform .18s ease;
}
.toast::before { content: "> "; color: var(--success); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.muted { color: var(--mute); }
.small { font-size: 12px; }
.muted.small { margin-top: 14px; line-height: 1.6; }
.legal-links { margin-top: 18px; }
.legal-links a { color: var(--accent); text-decoration: underline; }

/* ---------- Achievements ---------- */
.ach-list { list-style: none; margin: 0; padding: 0; }
.ach-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--hairline); color: var(--mute); }
.ach-row.got { color: var(--ink); }
.ach-mk { color: var(--ash); font-weight: 700; }
.ach-row.got .ach-mk { color: var(--success); }
.ach-label { flex: 1; }
.ach-coins { color: var(--mute); font-weight: 700; }
.ach-row.got .ach-coins { color: var(--ink); }

/* larger hero PLAY button (legacy) */
.btn-hero { padding: 18px 16px; }
.btn-hero .btn-text b { font-size: 18px; }

/* Flappy-style start screen: two big buttons, Play dominant via the dark fill. */
.home-cta { display: flex; gap: 12px; }
.btn-play-giant {
  flex: 1; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 14px 12px; text-align: center; min-height: 72px;
}
.btn-play-giant .mk { font-size: 26px; min-width: auto; line-height: 1; }
.btn-play-giant .btn-text { align-items: center; gap: 0; }
.btn-play-giant .btn-text b { font-size: 17px; letter-spacing: 1px; text-transform: uppercase; }

/* ---------- Responsive ---------- */
@media (max-width: 360px) {
  .tui-mark { font-size: 17px; letter-spacing: 0; }
  .q-prompt.q-big { font-size: 38px; }
  .opt { font-size: 20px; padding: 16px 8px; }
}
