/* ================ Aftershock Network — Node Wars ================ */
:root {
  --bg: #08120E;
  --bg-alt: #0C1A14;
  --card: #11211A;
  --card-2: #182C23;
  --border: #1F3A2D;
  --border-bright: #2D5142;
  --text: #F5F8F4;
  --text-secondary: #B8C8C0;
  --text-muted: #6E7E76;
  --green: #00A86B;          /* Irish emerald */
  --green-bright: #2BC48A;
  --green-dark: #00834F;
  --green-glow: rgba(0, 168, 107, 0.45);
  --gold: #F4C430;           /* warm gold */
  --gold-glow: rgba(244, 196, 48, 0.35);
  --orange-irish: #FF8C42;   /* Irish flag orange (used for enemy) */
  --cream: #F8F4E3;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  height: 100%;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

#game {
  display: block;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(ellipse at center, #0E1F18 0%, #050A07 80%);
}

/* ================ HUD ================ */
#hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  padding-top: max(14px, env(safe-area-inset-top));
  z-index: 5;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
#hud.hidden { opacity: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }

.hud-left { display: flex; align-items: center; gap: 12px; }
.hud-right { display: flex; align-items: center; gap: 8px; }

.hud-counts {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(12, 26, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.hud-counts .hc { display: inline-flex; align-items: center; gap: 6px; }
.hud-counts .hc-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
}
.hud-counts .green .hc-dot { background: var(--green); box-shadow: 0 0 6px var(--green-glow); }
.hud-counts .orange .hc-dot { background: var(--orange-irish); box-shadow: 0 0 6px rgba(255,140,66,0.5); }
.hud-counts .gray .hc-dot { background: #5A6B5F; }
@media (max-width: 540px) {
  .hud-counts { padding: 5px 10px; gap: 10px; font-size: 12px; }
  .hud-counts .hc-dot { width: 7px; height: 7px; }
}

/* On-screen control hint */
.hint-bar {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 4;
  background: rgba(12, 26, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  max-width: calc(100vw - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.hint-bar.hidden { opacity: 0; }
.hint-bar .kbd {
  display: inline-block;
  padding: 2px 7px;
  margin: 0 2px;
  border: 1px solid var(--border-bright);
  border-radius: 5px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--green-bright);
  background: rgba(0,168,107,0.05);
}
@media (max-width: 720px) {
  .hint-bar { font-size: 11px; padding: 6px 14px; }
  .hint-bar .kbd { font-size: 10px; padding: 1px 5px; }
}

/* ─── Page header (non-play screens) ─── */
.page-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  padding-top: max(12px, env(safe-area-inset-top));
  z-index: 12;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.page-header > * { pointer-events: auto; }
.page-header.hidden { opacity: 0; pointer-events: none; }
.page-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-size: 14px;
  background: rgba(12, 26, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 14px;
  transition: border-color 0.15s, color 0.15s;
}
.page-brand:hover { border-color: var(--border-bright); color: var(--green-bright); }
.page-brand img { width: 22px; height: auto; display: block; }
.page-brand strong { color: var(--green-bright); font-weight: 800; }
.page-header-right { display: flex; gap: 6px; }
.page-header-right .btn-icon { text-decoration: none; }
@media (max-width: 540px) {
  .page-header { padding: 10px 14px; }
  .page-brand { font-size: 12px; padding: 5px 10px; }
  .page-brand img { width: 20px; }
}

/* Persistent selection pill */
.selection-pill {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(12, 26, 20, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 6px 6px 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: border-color 0.15s, background 0.15s, opacity 0.2s, transform 0.2s;
  user-select: none;
}
.selection-pill.hidden { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(8px); }
.selection-pill.has-selection {
  border-color: rgba(0, 168, 107, 0.55);
  background: rgba(0, 168, 107, 0.18);
  color: var(--text);
}
.sel-btn {
  background: rgba(0, 168, 107, 0.15);
  border: 1px solid rgba(0, 168, 107, 0.4);
  color: var(--green-bright);
  font: inherit;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.sel-btn:hover { background: rgba(0, 168, 107, 0.3); color: #fff; }
.sel-btn.sel-clear {
  padding: 2px 9px;
  font-size: 16px;
  line-height: 1;
  background: rgba(255, 140, 66, 0.12);
  border-color: rgba(255, 140, 66, 0.35);
  color: var(--orange-irish);
}
.sel-btn.sel-clear:hover { background: rgba(255, 140, 66, 0.25); color: #fff; }
.sel-count {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--green-bright);
  min-width: 32px;
  text-align: center;
}
.selection-pill.has-selection .sel-count { color: #fff; }
.sel-label {
  white-space: nowrap;
  font-size: 12px;
  color: var(--text-muted, var(--text-secondary));
  letter-spacing: 0.01em;
}
@media (max-width: 540px) {
  .selection-pill { font-size: 12px; gap: 7px; padding: 5px 5px; }
  .sel-btn { padding: 3px 10px; font-size: 12px; }
  .sel-btn.sel-clear { padding: 1px 8px; font-size: 14px; }
  .sel-label { font-size: 11px; }
}
.brand-mark img { width: 28px; height: auto; display: block; opacity: 0.95; }
.hud-meta { line-height: 1.2; }
.hud-level {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-bright);
}
.hud-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  background: rgba(12, 26, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  border-radius: 10px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.btn-icon:hover { border-color: var(--green); color: var(--green-bright); }
.btn-icon:active { transform: scale(0.96); }

/* ================ Screens ================ */
.screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  background: rgba(8, 18, 14, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade-in 0.25s ease;
}
.screen.active { display: flex; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ================ Title screen ================ */
#screen-title {
  background: var(--bg);
  overflow: hidden;
}
.title-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 25% 35%, rgba(0, 168, 107, 0.18) 0%, transparent 38%),
    radial-gradient(circle at 75% 65%, rgba(244, 196, 48, 0.12) 0%, transparent 38%),
    radial-gradient(circle at 50% 50%, rgba(0, 168, 107, 0.08) 0%, transparent 60%);
}
.title-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 168, 107, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 168, 107, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 70%);
}

.title-content {
  position: relative;
  text-align: center;
  max-width: 540px;
  width: 100%;
}

/* Centerpiece A logo */
.title-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
}
.title-logo {
  width: clamp(140px, 30vw, 200px);
  height: auto;
  filter: drop-shadow(0 0 60px var(--green-glow)) drop-shadow(0 8px 24px rgba(0,0,0,0.6));
  animation: logo-float 4.5s ease-in-out infinite;
}
@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.title-line {
  font-size: clamp(20px, 4.5vw, 28px);
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
  color: var(--text);
  text-shadow: 0 0 40px var(--green-glow);
}
.title-line .green { color: var(--green-bright); }
.title-line .gold { color: var(--gold); }

.game-tagline {
  font-size: clamp(14px, 2.6vw, 16px);
  color: var(--text-secondary);
  margin: 0 0 36px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.title-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 280px;
  margin: 0 auto;
}

.btn {
  display: inline-block;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--green);
  color: white;
  box-shadow: 0 8px 24px rgba(0, 168, 107, 0.35);
}
.btn-primary:hover { background: var(--green-bright); }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary {
  background: var(--gold);
  color: #2A1F00;
  box-shadow: 0 8px 24px rgba(244, 196, 48, 0.30);
}
.btn-secondary:hover { background: #FFE066; }
.btn-secondary:active { transform: translateY(1px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-bright);
}
.btn-ghost:hover { border-color: var(--green-bright); color: var(--green-bright); }
.btn-ghost:active { transform: translateY(1px); }

.title-footer {
  position: absolute;
  bottom: -64px;
  left: 0;
  right: 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}
.title-footer a {
  color: var(--text-muted);
  text-decoration: none;
}
.title-footer a:hover { color: var(--green-bright); }

/* ================ Card screens (level select / how-to / pause / result) ================ */
.screen-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.screen-card.narrow { max-width: 380px; text-align: center; }

/* ─── Rate this game ─── */
.rate-card { position: relative; padding: 28px 24px 22px; }
.rate-card .btn-close {
  position: absolute; top: 12px; right: 12px;
}
.rate-head h2 { font-size: 20px; }
.rate-sub {
  margin: 6px 0 16px; color: var(--text-muted);
  font-size: 13px; line-height: 1.4;
}
.rate-stars {
  display: flex; justify-content: center; gap: 6px;
  margin: 6px 0 18px;
}
.star-btn {
  background: none; border: none; cursor: pointer;
  font-size: 36px; line-height: 1;
  color: rgba(244, 196, 48, 0.22);
  padding: 4px 6px; border-radius: 6px;
  transition: color 0.12s, transform 0.12s;
}
.star-btn:hover { color: rgba(244, 196, 48, 0.65); transform: scale(1.1); }
.star-btn.lit { color: var(--gold); text-shadow: 0 0 18px rgba(244, 196, 48, 0.45); }
.rate-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; text-align: left; }
.rate-form input,
.rate-form textarea {
  background: var(--bg-alt, rgba(255,255,255,0.04));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}
.rate-form input:focus,
.rate-form textarea:focus { border-color: var(--green); }
.rate-form textarea { min-height: 64px; }
.rate-status {
  min-height: 18px; font-size: 12px; margin-bottom: 6px;
  color: var(--text-muted); text-align: center;
}
.rate-status.error { color: var(--orange-irish); }
.rate-status.success { color: var(--green-bright); }
.rate-signup {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 12px; color: var(--text-muted); line-height: 1.4;
  padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 10px; background: rgba(0,168,107,0.05);
  cursor: pointer; user-select: none;
  text-align: left;
}
.rate-signup input[type="checkbox"] { margin-top: 2px; accent-color: var(--green); }
.rate-signup small { display: block; opacity: 0.75; font-size: 11px; }

/* ─── High Score modal ─── */
.hs-card { padding-top: 28px; text-align: center; }
.hs-trophy { font-size: 44px; margin-bottom: 4px; }
.hs-card h2 { margin-bottom: 6px; }
.hs-sub { margin: 0 0 18px; color: var(--text-muted); font-size: 13px; }
.hs-score-display {
  background: linear-gradient(135deg, rgba(244,196,48,0.10) 0%, rgba(255,140,66,0.10) 100%);
  border: 1px solid rgba(244,196,48,0.3);
  border-radius: 12px; padding: 16px; margin-bottom: 16px;
}
.hs-score-num {
  font-size: 36px; font-weight: 900;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--gold);
  letter-spacing: -0.02em;
  text-shadow: 0 0 20px rgba(244,196,48,0.4);
}
.hs-rank { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.hs-rank.high { color: var(--green-bright); font-weight: 700; }
.hs-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; text-align: left; }
.hs-form input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  color: var(--text); font: inherit; font-size: 14px; outline: none;
}
.hs-form input:focus { border-color: var(--gold); }
.hs-disclaimer { margin: 4px 0 8px; font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.hs-status { min-height: 18px; font-size: 12px; margin-bottom: 6px; color: var(--text-muted); text-align: center; }
.hs-status.error { color: var(--orange-irish); }
.hs-status.success { color: var(--green-bright); }

/* ─── Leaderboard ─── */
.lb-card { padding-top: 36px; max-width: 480px; }
.lb-sub { margin: 0 0 16px; color: var(--text-muted); font-size: 13px; }
.lb-list { list-style: none; padding: 0; margin: 0; }
.lb-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 6px;
}
.lb-list li.you { background: rgba(0, 168, 107, 0.12); border-color: rgba(0, 168, 107, 0.4); }
.lb-list li.lb-empty { justify-content: center; color: var(--text-muted); font-size: 13px; }
.lb-rank {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--card-2);
  font-weight: 800; font-size: 14px; color: var(--text-muted); flex-shrink: 0;
}
.lb-rank.gold { background: linear-gradient(135deg, #F4C430 0%, #D9A410 100%); color: #2A1F00; box-shadow: 0 0 14px rgba(244,196,48,0.4); }
.lb-rank.silver { background: linear-gradient(135deg, #C0C8C4 0%, #94A097 100%); color: #1A1F1B; }
.lb-rank.bronze { background: linear-gradient(135deg, #C58E5C 0%, #8E6238 100%); color: #1F1208; }
.lb-name { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-family: ui-monospace, monospace; font-weight: 800; font-size: 15px; color: var(--gold); font-variant-numeric: tabular-nums; flex-shrink: 0; }

.screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.screen-head h2,
.screen-card h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.btn-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 0;
  cursor: pointer;
}
.btn-close:hover { border-color: var(--green); color: var(--green-bright); }

/* Level grid */
.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.level-card {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border-color 0.15s ease, transform 0.06s ease;
  color: var(--text);
  font-family: inherit;
}
.level-card:hover { border-color: var(--green-bright); }
.level-card:active { transform: scale(0.97); }
.level-card.locked { opacity: 0.4; cursor: not-allowed; }
.level-card.locked:hover { border-color: var(--border); }
.level-num {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text);
}
.level-name {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: center;
  padding: 0 6px;
}
.level-card.completed::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 8px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
}
.level-stars {
  display: flex;
  gap: 2px;
  font-size: 14px;
  line-height: 1;
}
.level-stars span { color: var(--border-bright); }
.level-stars span.on {
  color: var(--gold);
  text-shadow: 0 0 8px var(--gold-glow);
}

/* Result screen stars */
.result-stars {
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: 36px;
  line-height: 1;
  margin: 4px 0 8px;
}
.result-stars span { color: var(--border-bright); transition: color 0.3s ease; }
.result-stars span.on {
  color: var(--gold);
  text-shadow: 0 0 16px var(--gold-glow);
}
.result-star-help {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.result-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.result-stat-grid > div {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 8px;
}
.result-stat-grid strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* How to play */
.howto-body { font-size: 14px; }
.howto-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}
.howto-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  color: white;
  letter-spacing: 0.05em;
}
.howto-text { line-height: 1.5; color: var(--text-secondary); }
.howto-text strong { color: var(--text); font-weight: 700; }
.howto-divider {
  height: 1px;
  background: var(--border);
  margin: 14px 0 4px;
}
.howto-tip {
  margin-top: 18px;
  padding: 12px 14px;
  background: rgba(0, 168, 107, 0.08);
  border: 1px solid rgba(0, 168, 107, 0.30);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Modal actions */
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

/* Result screen */
.result-icon {
  font-size: 56px;
  margin-bottom: 12px;
  line-height: 1;
}
.result-detail {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 8px 0 16px;
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
}
.result-stats > div {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 8px;
}
.result-stats strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* Result screen variants */
#screen-result.win .result-icon { color: var(--green-bright); }
#screen-result.lose .result-icon { color: var(--orange-irish); }

/* ─── Clear Back-to-Games button ─── */
.btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 14px; height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(0, 168, 107, 0.5);
  background: linear-gradient(135deg, rgba(0,168,107,0.18) 0%, rgba(0,168,107,0.10) 100%);
  color: var(--green-bright);
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  text-decoration: none; cursor: pointer;
  transition: all 0.15s;
}
.btn-back:hover {
  background: linear-gradient(135deg, rgba(0,168,107,0.30) 0%, rgba(0,168,107,0.18) 100%);
  color: #fff;
  border-color: rgba(0, 168, 107, 0.75);
}
.btn-back .ba-arrow { font-size: 16px; line-height: 1; }
@media (max-width: 540px) {
  .btn-back { padding: 0 10px; font-size: 12px; }
}
