/* Lebacoin Arcade: shared look for the hub and every game.
   One visual world, the brand's own: deep navy ground, the gold of the coin
   and the white of its rings. Single theme on purpose (an arcade screen), so
   every colour is set explicitly and colour-scheme is dark.
   Type: titles in Archivo 900 at 125% width, uppercase; body in Archivo;
   every number, code and eyebrow in JetBrains Mono. Gold gradient text on one
   element per screen and on primary buttons only. */
:root {
  --navy-950: #041729;
  --navy-900: #06223d;
  --navy-800: #0a3157;
  --navy-700: #0d4673;
  --navy-600: #145a8e;
  --ground: #041729;
  --card: #06223d;
  --card-line: rgba(159, 182, 207, 0.18);
  --gold: #e8bd45;
  --gold-hi: #fbeeb0;
  --gold-deep: #b98a22;
  --gold-grad: linear-gradient(180deg, #fbeeb0 0%, #e8bd45 48%, #b98a22 100%);
  --gold-btn: linear-gradient(180deg, #fbeeb0 0%, #e8bd45 38%, #d9ab2f 100%);
  --lit: linear-gradient(135deg, #0a3157 0%, #06223d 70%);
  --lit-line: rgba(232, 189, 69, 0.55);
  --ink: #f3f7fc;
  --soft: #c8d3df;
  --muted: #9fb6cf;
  --faint: #6f8aa8; /* decoration only: below 4.5:1 for text on navy */
  --line: rgba(255, 255, 255, 0.12);
  --glass: rgba(6, 34, 61, 0.82);
  --good: #36d399;
  --bad: #ff5a5f;
  --bronze: #d28b52;
  --silver: #c8d3df;
  --font-display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
a { color: var(--gold); }
/* iOS ignores user-scalable=no: a quick second tap on a button would zoom
   (or be swallowed). Pinch zoom and scrolling still work. */
html, button, a, .ac-btn { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 2px; }

/* ---------- Shared pieces: buttons, eyebrows, chips ---------- */
.ac-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px;
  border: 0; border-radius: 14px;
  font-family: var(--font-body); font-weight: 800; font-stretch: 100%; font-size: 17px; line-height: 1;
  letter-spacing: 0; text-decoration: none; text-align: center;
  cursor: pointer;
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out, border-color 0.15s ease-out, color 0.15s ease-out, filter 0.15s ease-out;
}
.ac-btn svg { width: 18px; height: 18px; flex: none; }
.ac-btn-primary {
  color: var(--navy-950);
  background: var(--gold-btn);
  box-shadow: 0 4px 0 var(--gold-deep), 0 14px 32px rgba(232, 189, 69, 0.22);
}
@media (hover: hover) {
  .ac-btn-primary:hover { filter: brightness(1.04); color: var(--navy-950); }
}
.ac-btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--gold-deep), 0 8px 20px rgba(232, 189, 69, 0.2); }
.ac-btn-ghost {
  color: var(--ink);
  background: rgba(4, 23, 41, 0.4);
  border: 2px solid rgba(159, 182, 207, 0.35);
}
/* hover looks only where there is a pointer that hovers: a tapped button on
   a phone must not stay lit */
@media (hover: hover) {
  .ac-btn-ghost:hover { color: var(--gold-hi); border-color: var(--gold); }
}
.ac-btn-ghost:active { transform: translateY(1px); }
.ac-btn[disabled] { opacity: 0.55; cursor: default; }
.ac-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ac-row > .ac-btn { flex: 1 1 140px; }

.ac-icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; flex: none; padding: 0;
  border: 1px solid var(--card-line); border-radius: 12px;
  background: var(--card); color: var(--ink); text-decoration: none; cursor: pointer;
}
@media (hover: hover) {
  .ac-icon-btn:hover { border-color: rgba(232, 189, 69, 0.55); }
}
.ac-icon-btn svg { width: 20px; height: 20px; }

.ac-kicker {
  font-family: var(--font-mono); font-weight: 700; font-size: 11px; line-height: 1.3;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold);
}
.ac-h1 {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 900;
  font-size: clamp(30px, 10vw, 46px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: break-word;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ac-nw { white-space: nowrap; }
.ac-lead { margin: 0; color: var(--soft); font-size: 15px; line-height: 1.4; text-wrap: pretty; }

/* Target chips: Bronze / Silver / Gold */
.ac-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ac-tier {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  padding: 10px 12px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--card-line);
}
.ac-tier-name {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-weight: 700; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
}
.ac-tier-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ac-tier[data-tier="bronze"] { border-top: 3px solid var(--bronze); }
.ac-tier[data-tier="silver"] { border-top: 3px solid var(--silver); }
.ac-tier[data-tier="bronze"] .ac-tier-name { color: var(--bronze); }
.ac-tier[data-tier="silver"] .ac-tier-name { color: var(--silver); }
.ac-tier[data-tier="gold"] .ac-tier-name { color: var(--gold); }
.ac-tier[data-tier="bronze"] .ac-tier-dot { background: var(--bronze); }
.ac-tier[data-tier="silver"] .ac-tier-dot { background: var(--silver); }
.ac-tier[data-tier="gold"] .ac-tier-dot { background: var(--gold); }
.ac-tier[data-tier="gold"] { background: var(--lit); border-color: var(--lit-line); border-top: 3px solid var(--gold); }
.ac-tier-score { font-family: var(--font-mono); font-weight: 800; font-size: 18px; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ac-tier-reward { font-size: 12px; color: var(--soft); line-height: 1.3; }
.ac-tier[data-tier="gold"] .ac-tier-reward { color: var(--gold-hi); }
.ac-tier-got { font-family: var(--font-mono); font-weight: 700; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--good); }

/* ---------- Game shell: header + target bar + stage + overlays ---------- */
.ac-app {
  position: relative;
  display: grid;
  /* one column no wider than the screen: a long title or a big score
     shortens (ellipsis) instead of widening the whole app */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  height: 100%;
  overflow: hidden;
  background: var(--ground);
  user-select: none;
  -webkit-user-select: none;
}
.ac-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding-top: max(6px, env(safe-area-inset-top, 0px));
  padding-bottom: 6px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: var(--ground);
}
.ac-back svg { width: 22px; height: 22px; }
.ac-brand {
  display: none; flex: 1; min-width: 0;
  align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-mono); font-weight: 700; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap; overflow: hidden;
}
.ac-brand img { width: 24px; height: 24px; flex: none; }
.ac-title {
  flex: 1; min-width: 0;
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 900;
  font-size: 17px;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ac-hud { display: flex; align-items: flex-end; gap: 12px; flex: none; margin-right: 4px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ac-scorebox { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.ac-score-label { font-weight: 700; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); line-height: 1.2; }
.ac-score { font-size: 24px; font-weight: 800; line-height: 1; color: var(--gold); min-width: 2ch; text-align: right; }
.ac-best { font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.2; padding-bottom: 2px; }
/* Start screen: the brand in the middle, no title (the big one is below) */
.ac-app[data-screen="start"] .ac-brand { display: flex; }
.ac-app[data-screen="start"] .ac-title,
.ac-app[data-screen="start"] .ac-hud,
.ac-app[data-screen="over"] .ac-hud { display: none; }
.ac-app[data-screen="over"] .ac-title { text-align: center; }

@media (max-width: 480px) {
  .ac-best { display: none; }
  /* in play, a long title (CRYPTO MASTER, SCAM SPOTTER) stays whole beside a
     five-digit score: Archivo's width axis condenses it */
  .ac-app[data-screen="play"] .ac-title, .ac-app[data-screen="pause"] .ac-title { font-stretch: 80%; }
  .ac-bar { gap: 6px; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .ac-hud { margin-right: 0; }
  .ac-title { font-size: 15px; }
  .ac-score { font-size: 21px; }
}
@media (max-width: 370px) {
  .ac-title { font-size: 14px; font-stretch: 112%; }
  .ac-score { font-size: 19px; }
  .ac-brand { letter-spacing: 0.12em; }
}

/* Progress to the targets: one bar from 0 to Gold, a tick per target */
.ac-goal {
  display: flex; flex-direction: column; gap: 6px;
  padding-top: 4px;
  padding-bottom: 8px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: var(--ground);
}
/* On the start and game-over screens the bar keeps its place (so the game's
   stage never changes size) but shows nothing: the screen below says it. */
.ac-app[data-screen="start"] .ac-goal,
.ac-app[data-screen="over"] .ac-goal { visibility: hidden; }
.ac-track {
  position: relative; height: 10px; border-radius: 999px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--card-line);
}
.ac-track-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold) 70%, var(--gold-hi));
  box-shadow: 0 0 14px rgba(232, 189, 69, 0.55);
  transition: width 0.25s ease-out;
}
.ac-tick {
  position: absolute; top: 50%;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--gold);
  transform: translate(-50%, -50%);
}
.ac-tick[data-tier="bronze"] { border-color: var(--bronze); }
.ac-tick[data-tier="silver"] { border-color: var(--silver); }
.ac-tick.is-on { border-color: var(--ground); }
.ac-tick.is-on[data-tier="bronze"] { background: var(--bronze); }
.ac-tick.is-on[data-tier="silver"] { background: var(--silver); }
.ac-tick.is-on[data-tier="gold"] { background: var(--gold); }
.ac-track.is-small { height: 8px; background: var(--ground); }
.ac-track.is-small .ac-track-fill { box-shadow: none; }
.ac-track.is-small .ac-tick { width: 14px; height: 14px; }
.ac-track.is-small .ac-tick:not(.is-on) { background: var(--ground); }
.ac-track.is-small .ac-tick.is-on { border-color: var(--card); }
.ac-goal-cap { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 16px; }
.ac-goal-text {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--font-mono); font-weight: 700; font-size: 12px; color: var(--gold); font-variant-numeric: tabular-nums;
}
.ac-goal-text b { font-weight: 800; color: inherit; }
.ac-goal-reached { flex: none; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ac-goal-reached[data-tier="bronze"] { color: var(--bronze); }
.ac-goal-reached[data-tier="silver"] { color: var(--silver); }
.ac-goal-reached[data-tier="gold"] { color: var(--gold); }
@media (max-width: 370px) {
  .ac-goal-text, .ac-goal-reached { font-size: 11px; }
}

.ac-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
}
.ac-canvas { position: absolute; inset: 0; display: block; }

/* Overlays sit under the header: start and game over from the target bar
   down (--ac-ov-top), pause over the stage only (--ac-stage-top). */
.ac-overlay {
  position: absolute;
  top: var(--ac-ov-top, 0px);
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: start;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-top: 8px;
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: var(--ground);
  user-select: text; -webkit-user-select: text;
  touch-action: pan-y;
}
/* Pause hides the board completely: a pause is not free thinking time with
   the clock stopped. */
.ac-overlay.is-pause {
  top: var(--ac-stage-top, 0px);
  align-items: center;
  background: var(--ground);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.ac-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-block: auto;
}
.ac-overlay.is-start .ac-panel,
.ac-overlay.is-over .ac-panel { margin-block: 0 auto; }
.ac-pausebox { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding-block: 8px; }
.ac-pausebox .ac-h1 { font-family: var(--font-mono); font-stretch: 100%; font-weight: 800; font-size: clamp(44px, 14vw, 64px); letter-spacing: -0.02em; line-height: 1; }

/* Start screen */
.ac-hero { position: relative; display: flex; gap: 12px; align-items: flex-start; min-height: 120px; }
.ac-hero-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
/* The start title never breaks inside a word ("NETWOR / K") beside the art:
   sized so RIGHT NETWORK, CRYPTO MASTER and SCAM SPOTTER fit whole words from
   320 px up. */
.ac-hero .ac-h1 { font-size: clamp(26px, 8.2vw, 46px); overflow-wrap: normal; word-break: normal; }
.ac-hero-art {
  position: relative; flex: none; width: 108px; height: 120px; margin-top: 8px;
  border: 1px solid rgba(232, 189, 69, 0.3); border-bottom: 0; border-radius: 8px 8px 0 0;
  background-color: var(--ground);
  background-image: linear-gradient(rgba(159, 182, 207, 0.09) 1px, transparent 1px), linear-gradient(90deg, rgba(159, 182, 207, 0.09) 1px, transparent 1px);
  background-size: 18px 18px;
  overflow: hidden;
}
.ac-hero-art i {
  position: absolute; bottom: 0; width: 24px; border-radius: 5px 5px 0 0;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.ac-hero-art i:nth-child(1) { left: 14px; height: 34px; background: var(--bronze); }
.ac-hero-art i:nth-child(2) { left: 42px; height: 54px; background: var(--silver); }
.ac-hero-art i:nth-child(3) { left: 70px; height: 76px; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 50%, var(--gold-deep)); }
.ac-hero-art img { position: absolute; left: 68px; bottom: 80px; width: 28px; height: 28px; filter: drop-shadow(0 0 10px rgba(232, 189, 69, 0.45)); }
@media (max-width: 340px) { .ac-hero-art { display: none; } }

.ac-howto {
  margin: 0; padding: 10px 14px; list-style: none;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--card); border: 1px solid var(--card-line); border-radius: 16px;
}
.ac-howto li { display: flex; gap: 10px; align-items: center; min-height: 34px; padding-block: 3px; font-size: 14px; line-height: 1.35; color: var(--ink); }
.ac-howto li svg { width: 20px; height: 20px; flex: none; color: var(--gold); }
.ac-btn-xl { min-height: 60px; font-size: 19px; }
.ac-btn-xl svg { width: 20px; height: 20px; }

/* Cards */
.ac-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 14px; border-radius: 16px;
  border: 1px solid var(--card-line); background: var(--card);
}
.ac-card-title {
  margin: 0;
  font-family: var(--font-mono); font-weight: 700; font-size: 11px; line-height: 1.35;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
.ac-field { display: flex; gap: 8px; }
.ac-field .ac-btn { min-height: 52px; padding: 0 20px; flex: none; }
.ac-input {
  flex: 1; min-width: 0; min-height: 52px; padding: 0 14px;
  border-radius: 12px; border: 1px solid rgba(159, 182, 207, 0.3); background: var(--ground);
  font-size: 16px; font-weight: 600;
}
.ac-input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(232, 189, 69, 0.25); }
.ac-input::placeholder { color: var(--muted); font-weight: 500; }
.ac-note { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.ac-note.is-bad { color: #ff8a8e; }
.ac-note.is-good { color: var(--good); }

/* Game over: the score */
.ac-result { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 6px; text-align: center; }
.ac-result::before {
  content: ""; position: absolute; left: 50%; top: -40px; z-index: -1;
  width: 420px; height: 420px; transform: translateX(-50%);
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(232, 189, 69, 0.22) 0%, rgba(232, 189, 69, 0.05) 40%, transparent 65%);
}
.ac-result .ac-kicker { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.ac-result .ac-kicker.is-best { color: var(--good); }
.ac-result .ac-kicker svg { width: 14px; height: 14px; }
.ac-bigscore {
  font-family: var(--font-mono); font-weight: 800; font-size: clamp(52px, 19vw, 76px); line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ac-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 0; font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--muted); }
.ac-stats span + span::before { content: "·"; padding: 0 8px; }
.ac-stats b { color: var(--soft); font-weight: 700; }

/* Game over: which target this score reached */
.ac-reward {
  display: flex; flex-direction: column; gap: 9px;
  padding: 12px 14px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--card-line);
}
.ac-reward[data-tier="bronze"] { border-color: rgba(210, 139, 82, 0.5); }
.ac-reward[data-tier="silver"] { border-color: rgba(200, 211, 223, 0.45); }
.ac-reward[data-tier="gold"] { background: var(--lit); border-color: var(--lit-line); }
.ac-reward-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ac-reward-label { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 15px; font-weight: 800; line-height: 1.25; }
.ac-reward-label i { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
.ac-reward[data-tier="bronze"] .ac-reward-label i { background: var(--bronze); }
.ac-reward[data-tier="silver"] .ac-reward-label i { background: var(--silver); }
.ac-reward[data-tier="gold"] .ac-reward-label i { background: var(--gold); }
.ac-reward-next { flex: none; max-width: 45%; text-align: right; font-family: var(--font-mono); font-weight: 700; font-size: 12px; line-height: 1.3; color: var(--gold); }

/* Game over: posting, the claim-code ticket and the rank line */
.ac-post.is-plain { padding: 0; border: 0; background: none; border-radius: 0; gap: 12px; }
.ac-post .ac-note.is-good { font-size: 14px; color: var(--soft); text-align: center; text-wrap: balance; }
.ac-post .ac-note.is-good svg { display: inline-block; width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; color: var(--gold); }
.ac-claim {
  position: relative;
  display: flex;
  border-radius: 18px;
  border: 1px solid rgba(232, 189, 69, 0.6);
  background: var(--lit);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.ac-claim-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 16px 12px 14px 14px; }
.ac-claim-title {
  margin: 0;
  font-family: var(--font-mono); font-weight: 700; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold);
}
.ac-claim-code {
  font-family: var(--font-mono); font-weight: 800; font-size: clamp(22px, 6.9vw, 27px); line-height: 1.1; letter-spacing: 0.04em;
  color: var(--ink); white-space: nowrap;
  user-select: all; -webkit-user-select: all;
}
.ac-claim-help { margin: 0; font-size: 13px; line-height: 1.45; color: var(--soft); text-wrap: pretty; }
.ac-claim-perf { position: relative; flex: none; width: 0; border-left: 2px dashed rgba(159, 182, 207, 0.4); }
.ac-claim-perf::before, .ac-claim-perf::after {
  content: ""; position: absolute; left: -11px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ground); border: 1px solid rgba(232, 189, 69, 0.6);
}
.ac-claim-perf::before { top: -11px; }
.ac-claim-perf::after { bottom: -11px; }
.ac-claim-side {
  flex: 0 0 98px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 10px; background: rgba(232, 189, 69, 0.06);
}
.ac-claim-side .ac-btn { width: 100%; min-height: 48px; padding: 0 10px; font-size: 15px; gap: 6px; box-shadow: 0 3px 0 var(--gold-deep); }
.ac-claim-side .ac-btn svg { width: 16px; height: 16px; }
.ac-claim-kept { font-family: var(--font-mono); font-weight: 500; font-size: 10px; line-height: 1.35; letter-spacing: 0.1em; text-transform: uppercase; text-align: center; color: var(--muted); }
@media (max-width: 374px) {
  .ac-claim { flex-direction: column; }
  .ac-claim-perf { width: auto; height: 0; border-left: 0; border-top: 2px dashed rgba(159, 182, 207, 0.4); }
  .ac-claim-perf::before, .ac-claim-perf::after { top: -11px; bottom: auto; }
  .ac-claim-perf::before { left: -11px; }
  .ac-claim-perf::after { left: auto; right: -11px; }
  .ac-claim-side { flex: none; flex-direction: row; justify-content: space-between; gap: 12px; padding: 12px 14px; }
  .ac-claim-side .ac-btn { width: auto; flex: none; padding: 0 18px; }
  .ac-claim-kept { text-align: right; }
}

.ac-actions { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 10px; }
.ac-actions .ac-btn { padding: 0 14px; }
.ac-linkbtn {
  align-self: center; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px;
  background: none; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
@media (hover: hover) {
  .ac-linkbtn:hover { color: var(--ink); }
}

/* Scoreboard */
.ac-boardcard { padding: 12px 10px 10px; gap: 6px; }
.ac-boardhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; padding: 0 4px; }
.ac-boardhead .ac-card-title { min-width: 0; }
.ac-ends { flex: none; font-family: var(--font-mono); font-weight: 500; font-size: 11px; color: var(--muted); white-space: nowrap; }
.ac-tabs { display: inline-flex; flex: none; padding: 3px; border-radius: 999px; background: var(--ground); }
.ac-tab {
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--muted); font-weight: 700; font-size: 12px; white-space: nowrap; cursor: pointer;
  position: relative;
}
/* 44px touch target around a 26px pill */
.ac-tab::after { content: ""; position: absolute; left: 0; right: 0; top: -9px; bottom: -9px; }
.ac-tab[aria-selected="true"] { background: var(--navy-600); color: var(--ink); }
.ac-board { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.ac-board li {
  display: flex; align-items: center; gap: 10px;
  min-height: 34px; padding: 0 10px; border-radius: 10px; font-size: 14px;
}
.ac-board .ac-rank { flex: none; width: 24px; font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ac-board li.is-top .ac-rank { color: var(--gold); }
.ac-board .ac-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ac-board .ac-tag { flex: none; font-family: var(--font-mono); font-weight: 700; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.ac-board .ac-pts { flex: none; min-width: 58px; text-align: right; font-family: var(--font-mono); font-weight: 700; font-size: 14px; color: var(--soft); font-variant-numeric: tabular-nums; }
.ac-board li.is-me { background: rgba(232, 189, 69, 0.12); box-shadow: inset 0 0 0 1.5px var(--gold); }
.ac-board li.is-me .ac-rank { color: var(--gold); }
.ac-board li.is-me .ac-name { font-weight: 800; color: var(--gold-hi); }
.ac-board li.is-me .ac-pts, .ac-board li.is-me .ac-tag { color: var(--gold-hi); }
.ac-board-empty { padding: 8px 10px; color: var(--muted); font-size: 13px; }
.ac-mode { padding: 0 6px; font-size: 12px; color: var(--muted); }

/* The Lebacoin link */
.ac-cta {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 16px; border-radius: 14px;
  background: var(--card); box-shadow: inset 0 0 0 1.5px rgba(232, 189, 69, 0.5);
  color: var(--ink); text-decoration: none;
}
.ac-cta img { width: 26px; height: 26px; flex: none; }
.ac-cta-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ac-cta-text b { font-size: 15px; font-weight: 700; line-height: 1.25; }
.ac-cta-text span { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.ac-cta svg { width: 18px; height: 18px; flex: none; color: var(--gold); }
@media (hover: hover) {
  .ac-cta:hover { box-shadow: inset 0 0 0 1.5px var(--gold); }
}

/* Toasts (target reached etc.) */
.ac-toast {
  position: absolute; left: 50%; top: 14px; z-index: 30;
  transform: translate(-50%, -20px); opacity: 0;
  max-width: calc(100% - 24px);
  padding: 10px 16px; border-radius: 999px;
  background: var(--gold-btn);
  color: var(--navy-950); font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 3px 0 var(--gold-deep), 0 10px 30px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transition: transform 0.25s ease-out, opacity 0.25s ease-out;
}
.ac-toast.is-on { transform: translate(-50%, 0); opacity: 1; }
/* A short stage (a phone on its side): a slimmer toast, close to the top, so
   it hides less of the play area. A game's toastTop still wins. */
@media (max-height: 560px) {
  .ac-toast { top: 3px; padding: 4px 12px; font-size: 12px; line-height: 1.2; }
}
.ac-app[data-screen="start"] .ac-toast, .ac-app[data-screen="over"] .ac-toast { visibility: hidden; }

.ac-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
