/* ================================================================
   MATHAMPHETAMINES — shared neon-underground theme
   ================================================================ */

:root {
  --bg:           #07070d;
  --bg-elev:      #11111d;
  --bg-card:      #16162a;
  --grid:         #1d1d33;
  --neon-green:   #00ff88;
  --neon-pink:    #ff2d95;
  --neon-purple:  #b026ff;
  --neon-yellow:  #ffe14d;
  --neon-cyan:    #00e5ff;
  --text:         #ececf5;
  --text-dim:     #8d8db0;
  --danger:       #ff4444;
  --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;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Mono', ui-monospace, Menlo, monospace;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body::before {
  /* subtle grid background */
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

body::after {
  /* film grain */
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.6;
  mix-blend-mode: overlay;
}

main, header, footer, .page {
  position: relative;
  z-index: 2;
}

/* ----------------------------------------------------------------
   Typography
   ---------------------------------------------------------------- */
h1, h2, h3, .display {
  font-family: 'Bebas Neue', 'Anton', Impact, sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: 0;
  line-height: 1;
}

h1 { font-size: clamp(2.6rem, 10vw, 5rem); }
h2 { font-size: clamp(1.8rem, 6vw, 3rem); }
h3 { font-size: clamp(1.3rem, 4.5vw, 2rem); }

.mono { font-family: 'Space Mono', monospace; }

.neon-green  { color: var(--neon-green);  text-shadow: 0 0 8px var(--neon-green); }
.neon-pink   { color: var(--neon-pink);   text-shadow: 0 0 8px var(--neon-pink); }
.neon-purple { color: var(--neon-purple); text-shadow: 0 0 8px var(--neon-purple); }
.neon-yellow { color: var(--neon-yellow); text-shadow: 0 0 8px var(--neon-yellow); }
.neon-cyan   { color: var(--neon-cyan);   text-shadow: 0 0 8px var(--neon-cyan); }

/* ----------------------------------------------------------------
   Site header
   ---------------------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(0.9rem + var(--safe-top)) 1rem 0.9rem;
  border-bottom: 1px solid #20203a;
  background: rgba(7,7,13,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--neon-green);
  text-shadow: 0 0 10px var(--neon-green);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.logo .pill {
  display: inline-block;
  width: 14px;
  height: 22px;
  border-radius: 11px;
  background: linear-gradient(180deg, var(--neon-pink) 50%, var(--neon-purple) 50%);
  box-shadow: 0 0 8px var(--neon-pink);
  transform: rotate(-25deg);
}

.hits-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--neon-yellow);
  border-radius: 999px;
  background: rgba(255, 225, 77, 0.08);
  color: var(--neon-yellow);
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 0.85rem;
  text-shadow: 0 0 6px var(--neon-yellow);
  text-decoration: none;
  white-space: nowrap;
}

.back-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid #2a2a44;
  border-radius: 8px;
  background: rgba(0,0,0,0.4);
}
.back-link:hover, .back-link:active { color: var(--neon-cyan); border-color: var(--neon-cyan); }

/* ----------------------------------------------------------------
   Buttons
   ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.2rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 2px solid var(--neon-green);
  background: transparent;
  color: var(--neon-green);
  border-radius: 6px;
  cursor: pointer;
  text-shadow: 0 0 6px var(--neon-green);
  box-shadow: 0 0 0 0 var(--neon-green), inset 0 0 12px rgba(0,255,136,0.1);
  transition: transform 0.08s, box-shadow 0.15s, background 0.15s;
  user-select: none;
}
.btn:active {
  transform: translateY(1px) scale(0.98);
  background: rgba(0,255,136,0.12);
  box-shadow: 0 0 12px var(--neon-green), inset 0 0 12px rgba(0,255,136,0.25);
}
.btn.pink   { border-color: var(--neon-pink);   color: var(--neon-pink);   text-shadow: 0 0 6px var(--neon-pink); }
.btn.pink:active { background: rgba(255,45,149,0.12); box-shadow: 0 0 12px var(--neon-pink); }
.btn.purple { border-color: var(--neon-purple); color: var(--neon-purple); text-shadow: 0 0 6px var(--neon-purple); }
.btn.purple:active { background: rgba(176,38,255,0.12); box-shadow: 0 0 12px var(--neon-purple); }
.btn.cyan   { border-color: var(--neon-cyan);   color: var(--neon-cyan);   text-shadow: 0 0 6px var(--neon-cyan); }
.btn.cyan:active { background: rgba(0,229,255,0.12); box-shadow: 0 0 12px var(--neon-cyan); }
.btn.solid  { background: var(--neon-green); color: #07070d; text-shadow: none; }
.btn.solid:active { background: #00cc6e; }
.btn.block { width: 100%; }

/* ----------------------------------------------------------------
   Landing page
   ---------------------------------------------------------------- */
.hero {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
  position: relative;
}
.hero h1 {
  background: linear-gradient(180deg, var(--neon-green), var(--neon-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(0,255,136,0.4));
  word-break: break-word;
}
.hero .tag {
  margin-top: 0.6rem;
  color: var(--neon-pink);
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1rem, 4vw, 1.6rem);
  letter-spacing: 0.18em;
  text-shadow: 0 0 8px var(--neon-pink);
}
.hero .pitch {
  margin: 1.2rem auto 0;
  max-width: 540px;
  color: var(--text-dim);
  font-size: 0.95rem;
}
.hero .pitch strong { color: var(--text); }

.section-label {
  display: block;
  text-align: center;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  font-size: 0.95rem;
  margin: 2rem 0 0.6rem;
}

.games {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 0 1rem 2rem;
  max-width: 720px;
  margin: 0 auto;
}
@media (min-width: 720px) {
  .games { grid-template-columns: 1fr 1fr 1fr; }
}

.game-card {
  display: block;
  position: relative;
  padding: 1.2rem 1.1rem 1.3rem;
  border: 1px solid #2a2a44;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--bg-card), #0c0c1a);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.game-card:active { transform: scale(0.98); }
.game-card .card-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.game-card h3 {
  font-size: 2rem;
  margin: 0.2rem 0 0.4rem;
}
.game-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.45;
}
.game-card .corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 64px;
  height: 64px;
  background: radial-gradient(circle at top right, currentColor 0%, transparent 65%);
  opacity: 0.35;
  pointer-events: none;
}
.game-card.green  { color: var(--neon-green); }
.game-card.green:hover  { border-color: var(--neon-green);  box-shadow: 0 0 22px rgba(0,255,136,0.25); }
.game-card.pink   { color: var(--neon-pink); }
.game-card.pink:hover   { border-color: var(--neon-pink);   box-shadow: 0 0 22px rgba(255,45,149,0.25); }
.game-card.purple { color: var(--neon-purple); }
.game-card.purple:hover { border-color: var(--neon-purple); box-shadow: 0 0 22px rgba(176,38,255,0.3); }
.game-card h3, .game-card .card-tag { color: currentColor; text-shadow: 0 0 8px currentColor; }
.game-card p { color: var(--text-dim); }

/* ----------------------------------------------------------------
   Game shell
   ---------------------------------------------------------------- */
.game-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.game-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.hud {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.4rem;
  width: 100%;
  margin-bottom: 0.8rem;
}
.hud .stat {
  border: 1px solid #2a2a44;
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  background: rgba(0,0,0,0.4);
  text-align: center;
}
.hud .stat .label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.hud .stat .value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  margin-top: 0.1rem;
}

.problem {
  width: 100%;
  text-align: center;
  padding: 1.4rem 0.5rem;
  border: 1px solid #25253f;
  border-radius: 14px;
  background: rgba(11,11,22,0.7);
  margin-bottom: 1rem;
}
.problem .q-prompt {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.problem .q {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.6rem, 12vw, 4.4rem);
  letter-spacing: 0.05em;
  color: var(--neon-cyan);
  text-shadow: 0 0 14px var(--neon-cyan);
  margin-top: 0.2rem;
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  width: 100%;
}
.choice {
  appearance: none;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.05em;
  padding: 1.1rem 0.5rem;
  border: 2px solid #2a2a44;
  background: rgba(20,20,40,0.6);
  color: var(--text);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.08s, background 0.1s, border-color 0.1s;
  user-select: none;
  touch-action: manipulation;
}
.choice:active { transform: scale(0.97); }
.choice.correct { border-color: var(--neon-green); color: var(--neon-green); background: rgba(0,255,136,0.12); text-shadow: 0 0 10px var(--neon-green); }
.choice.wrong   { border-color: var(--danger);     color: var(--danger);     background: rgba(255,68,68,0.12); }

/* ----------------------------------------------------------------
   Game-over overlay
   ---------------------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,7,13,0.92);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.overlay.show { display: flex; }
.overlay .panel {
  width: 100%;
  max-width: 420px;
  border: 1px solid #2a2a44;
  border-radius: 16px;
  background: linear-gradient(180deg, #14142a, #0a0a18);
  padding: 1.4rem 1.2rem;
  text-align: center;
  box-shadow: 0 0 40px rgba(0,255,136,0.12);
}
.overlay h2 {
  font-size: 2.6rem;
  color: var(--neon-pink);
  text-shadow: 0 0 12px var(--neon-pink);
  margin-bottom: 0.4rem;
}
.overlay .summary {
  margin: 0.5rem 0 1.2rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.overlay .big-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  color: var(--neon-yellow);
  text-shadow: 0 0 16px var(--neon-yellow);
  margin: 0.4rem 0;
}
.overlay .actions { display: flex; flex-direction: column; gap: 0.6rem; }

/* ----------------------------------------------------------------
   Toast / pop text
   ---------------------------------------------------------------- */
.popup-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 60;
}
.pop {
  position: absolute;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  pointer-events: none;
  animation: pop-up 0.9s ease-out forwards;
}
@keyframes pop-up {
  0%   { transform: translate(-50%, 0) scale(0.7); opacity: 0; }
  20%  { transform: translate(-50%, -10px) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, -80px) scale(1); opacity: 0; }
}

/* ----------------------------------------------------------------
   Footer
   ---------------------------------------------------------------- */
.site-footer {
  text-align: center;
  padding: 2rem 1rem calc(2rem + var(--safe-bottom));
  color: var(--text-dim);
  font-size: 0.78rem;
  border-top: 1px solid #1a1a2e;
  margin-top: 2rem;
}
.site-footer a { color: var(--neon-cyan); text-decoration: none; }
.site-footer .disclaim { max-width: 540px; margin: 0.6rem auto 0; line-height: 1.5; }

/* ----------------------------------------------------------------
   Number Crusher specific
   ---------------------------------------------------------------- */
.target-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0.4rem 0 1rem;
  width: 100%;
}
.target-row .target {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.2rem;
  color: var(--neon-pink);
  text-shadow: 0 0 14px var(--neon-pink);
  line-height: 1;
}
.target-row .sum {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.4rem;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
  line-height: 1;
  min-width: 3ch;
  text-align: left;
}
.target-row .label {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  text-transform: uppercase;
  display: block;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 0.8rem;
}
.tile {
  appearance: none;
  border: 2px solid #2a2a44;
  background: linear-gradient(180deg, #1a1a30, #0e0e1c);
  color: var(--text);
  border-radius: 10px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.2rem, 5vw, 2rem);
  cursor: pointer;
  transition: transform 0.08s, background 0.1s, border-color 0.1s, box-shadow 0.15s;
  user-select: none;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.tile:active { transform: scale(0.96); }
.tile.selected {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0,229,255,0.4), inset 0 0 10px rgba(0,229,255,0.15);
}
.tile.clear   { animation: tile-clear 0.35s ease-out forwards; }
.tile.bust    { animation: tile-bust 0.35s ease-out; }
@keyframes tile-clear {
  to { transform: scale(0.2) rotate(20deg); opacity: 0; }
}
@keyframes tile-bust {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.crusher-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  width: 100%;
}

/* ----------------------------------------------------------------
   Equation Builder specific
   ---------------------------------------------------------------- */
.eb-expr {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  letter-spacing: 0.06em;
  margin-top: 0.3rem;
  min-height: 1.4em;
  color: var(--text);
}
.eb-expr.empty { color: var(--text-dim); font-size: 1rem; letter-spacing: 0.15em; text-transform: uppercase; }
.eb-eval {
  margin-top: 0.2rem;
  font-size: 0.85rem !important;
  color: var(--text-dim);
}
.eb-tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  width: 100%;
  margin-bottom: 0.7rem;
}
.eb-tile {
  appearance: none;
  border: 2px solid #2a2a44;
  background: linear-gradient(180deg, #1a1a30, #0e0e1c);
  color: var(--text);
  border-radius: 10px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  padding: 0.7rem 0.2rem;
  cursor: pointer;
  transition: transform 0.08s, background 0.1s, border-color 0.1s;
  user-select: none;
  touch-action: manipulation;
  min-height: 3rem;
}
.eb-tile:active { transform: scale(0.95); }
.eb-tile.op {
  color: var(--neon-pink);
  border-color: var(--neon-pink);
  text-shadow: 0 0 6px var(--neon-pink);
}
.eb-tile.used {
  opacity: 0.25;
  pointer-events: none;
}
.eb-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 0.5rem;
  width: 100%;
}

/* ----------------------------------------------------------------
   Math Runner specific
   ---------------------------------------------------------------- */
.runner-stage {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 9 / 16;
  position: relative;
  border: 1px solid #25253f;
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(ellipse at top, #1a1a30, #06060c 80%);
  margin-bottom: 0.8rem;
  touch-action: none;
  user-select: none;
}
.runner-track {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}
.runner-lane {
  border-right: 1px dashed #20203a;
  position: relative;
}
.runner-lane:last-child { border-right: none; }

.runner-question {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  text-align: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.6rem, 7vw, 2.6rem);
  letter-spacing: 0.05em;
  color: var(--neon-cyan);
  text-shadow: 0 0 14px var(--neon-cyan);
  background: rgba(7,7,13,0.7);
  padding: 0.3rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #25253f;
  pointer-events: none;
}

.runner-player {
  position: absolute;
  bottom: 8%;
  width: 14%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, var(--neon-green), #00aa55);
  border-radius: 12px;
  box-shadow: 0 0 18px var(--neon-green);
  z-index: 3;
  transition: left 0.12s ease-out;
}
.runner-player::before, .runner-player::after {
  content: '';
  position: absolute;
  top: 30%;
  width: 14%;
  height: 14%;
  background: #07070d;
  border-radius: 50%;
}
.runner-player::before { left: 22%; }
.runner-player::after  { left: 64%; }

.runner-gate {
  position: absolute;
  top: -16%;
  width: 31%;
  height: 14%;
  background: rgba(20,20,40,0.85);
  border: 2px solid var(--neon-pink);
  color: var(--neon-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.4rem, 6vw, 2.2rem);
  border-radius: 8px;
  text-shadow: 0 0 8px var(--neon-pink);
  box-shadow: 0 0 14px rgba(255,45,149,0.35);
  z-index: 2;
  pointer-events: none;
}
.runner-gate.right { border-color: var(--neon-green); color: var(--neon-green); text-shadow: 0 0 8px var(--neon-green); box-shadow: 0 0 14px rgba(0,255,136,0.4); }
.runner-coin {
  position: absolute;
  top: -6%;
  width: 7%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff7b3, var(--neon-yellow) 60%, #b59a00 100%);
  box-shadow: 0 0 10px var(--neon-yellow);
  z-index: 2;
  pointer-events: none;
}

.runner-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  width: 100%;
  max-width: 480px;
}
.runner-controls .lane-btn {
  appearance: none;
  border: 2px solid #2a2a44;
  background: rgba(20,20,40,0.6);
  color: var(--text);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  padding: 0.8rem 0;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}
.runner-controls .lane-btn:active { transform: scale(0.97); background: rgba(0,229,255,0.1); border-color: var(--neon-cyan); color: var(--neon-cyan); }

.lives-row {
  display: inline-flex;
  gap: 0.25rem;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.05em;
}
.life {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--neon-pink);
  box-shadow: 0 0 8px var(--neon-pink);
  display: inline-block;
}
.life.lost {
  background: transparent;
  border: 2px solid #2a2a44;
  box-shadow: none;
}

/* tiny helper: hide on mobile */
@media (max-width: 480px) {
  .desktop-only { display: none; }
}

/* ================================================================
   AVATAR LOCKER + SHOP
   ================================================================ */

.locker, .alley {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.6rem 0.8rem 1.5rem;
}

.avatar-stage {
  width: 100%;
  max-width: 360px;
  margin: 0.4rem auto 0.6rem;
  aspect-ratio: 200 / 270;
  border: 1px solid #25253f;
  border-radius: 16px;
  background: #06060c;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0,255,136,0.15);
}
.avatar-stage svg { width: 100%; height: 100%; display: block; }

/* Home Base scene (wider aspect for the room) */
.base-stage {
  width: 100%;
  max-width: 540px;
  margin: 0.4rem auto 0.6rem;
  aspect-ratio: 400 / 280;
  border: 1px solid #25253f;
  border-radius: 16px;
  background: #06060c;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(176,38,255,0.18);
}
.base-stage svg { width: 100%; height: 100%; display: block; }

/* Tab group labels (used in shop to separate YOU vs YOUR CRIB groups) */
.tab-group-label {
  flex: 0 0 auto;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  font-size: 0.7rem;
  padding: 0.5rem 0.4rem 0.5rem 0.2rem;
  white-space: nowrap;
  align-self: center;
}

.avatar-meta {
  max-width: 360px;
  margin: 0.2rem auto 0.8rem;
  border: 1px solid #20203a;
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  background: rgba(11,11,22,0.6);
}
.meta-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.78rem;
}
.meta-line + .meta-line { margin-top: 0.25rem; }
.meta-label {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.22em;
  color: var(--text-dim);
}
.meta-name {
  color: var(--neon-cyan);
  text-shadow: 0 0 6px var(--neon-cyan);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.05em;
  font-size: 1rem;
  text-align: right;
  flex: 1;
}

.hair-color-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.6rem 0 0.4rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid #20203a;
  border-radius: 10px;
  background: rgba(11,11,22,0.6);
  overflow-x: auto;
}
.row-label {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  font-size: 0.78rem;
  white-space: nowrap;
}
.swatches { display: inline-flex; gap: 0.4rem; }
.swatch {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid #2a2a44;
  cursor: pointer;
  flex: 0 0 auto;
  transition: transform 0.1s, box-shadow 0.15s, border-color 0.15s;
  padding: 0;
}
.swatch:active { transform: scale(0.92); }
.swatch.active {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 10px var(--neon-yellow);
}

/* category tabs (avatar + shop) */
.cat-tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.4rem 0;
  margin-bottom: 0.6rem;
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  appearance: none;
  flex: 0 0 auto;
  padding: 0.5rem 0.85rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  border: 1px solid #2a2a44;
  border-radius: 999px;
  background: rgba(20,20,40,0.5);
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
}
.cat-tab.active {
  color: var(--neon-green);
  border-color: var(--neon-green);
  background: rgba(0,255,136,0.08);
  text-shadow: 0 0 6px var(--neon-green);
}

/* Item tile (avatar locker — horizontal strip) */
.item-strip {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.3rem 0.1rem 0.6rem;
  scrollbar-width: thin;
}
.item-strip::-webkit-scrollbar { height: 6px; }
.item-strip::-webkit-scrollbar-thumb { background: #2a2a44; border-radius: 3px; }

.item-tile, .shop-tile {
  appearance: none;
  position: relative;
  flex: 0 0 130px;
  padding: 0;
  border: 1px solid #2a2a44;
  border-radius: 12px;
  background: linear-gradient(180deg, #14142a, #08080f);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  transition: transform 0.1s, border-color 0.15s, box-shadow 0.15s;
}
.item-tile:active, .shop-tile:active { transform: scale(0.98); }
.item-tile.equipped, .shop-tile.equipped {
  border-color: var(--neon-green);
  box-shadow: 0 0 16px rgba(0,255,136,0.35);
}
.item-tile.locked { opacity: 0.85; }
.shop-tile.broke  { opacity: 0.55; }
.shop-tile.owned:not(.equipped) { border-color: var(--neon-cyan); }

.tile-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #06060c;
  border-bottom: 1px solid #20203a;
  overflow: hidden;
}
.tile-art svg { width: 100%; height: 100%; display: block; }

.tile-foot {
  padding: 0.4rem 0.55rem 0.5rem;
}
.tile-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile-rar {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  margin-top: 0.1rem;
}
.tile-lock {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  background: rgba(0,0,0,0.78);
  color: var(--neon-yellow);
  border: 1px solid var(--neon-yellow);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  font-family: 'Space Mono', monospace;
  text-shadow: 0 0 4px var(--neon-yellow);
}
.tile-equipped {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: var(--neon-green);
  color: #07070d;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  font-family: 'Bebas Neue', sans-serif;
}

/* shop grid (multi-column) */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin: 0.4rem 0 0.8rem;
}
@media (min-width: 520px) {
  .shop-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 760px) {
  .shop-grid { grid-template-columns: repeat(4, 1fr); }
}
.shop-tile { flex: none; }
.tile-cta {
  border-top: 1px solid #20203a;
  padding: 0.45rem 0.55rem;
  background: rgba(0,0,0,0.4);
  text-align: center;
}
.cta-text {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
}
.cta-text.price-tag {
  color: var(--neon-yellow);
  text-shadow: 0 0 5px var(--neon-yellow);
}
.cta-text.equipped-tag {
  color: var(--neon-green);
  text-shadow: 0 0 5px var(--neon-green);
}
.shop-tile.owned .cta-text { color: var(--neon-cyan); }

.locker-cta {
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ----------------------------------------------------------------
   Dealer scene (shop top)
   ---------------------------------------------------------------- */
.dealer-scene {
  position: relative;
  width: 100%;
  margin: 0.4rem 0 0.6rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #2a2a44;
  background: #06060c;
}
.dealer-bg {
  width: 100%;
  aspect-ratio: 400 / 220;
}
.dealer-bubble {
  position: absolute;
  left: 50%;
  top: 8%;
  transform: translateX(-50%);
  max-width: 78%;
  padding: 0.55rem 0.85rem;
  background: rgba(7,7,13,0.92);
  border: 1px solid var(--neon-green);
  color: var(--neon-green);
  border-radius: 10px;
  font-family: 'Caveat', 'Bebas Neue', sans-serif;
  font-size: 1.15rem;
  text-align: center;
  text-shadow: 0 0 4px var(--neon-green);
  box-shadow: 0 0 16px rgba(0,255,136,0.25);
  pointer-events: none;
  line-height: 1.2;
}
.dealer-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 65%;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-top-color: var(--neon-green);
  filter: drop-shadow(0 2px 0 #07070d);
}
.dealer-bubble.flash {
  animation: bubble-pop 0.35s ease-out;
}
@keyframes bubble-pop {
  0%   { transform: translateX(-50%) scale(0.8); opacity: 0; }
  100% { transform: translateX(-50%) scale(1);   opacity: 1; }
}

.alley-tabs { margin-top: 0.3rem; }

/* Buy modal preview */
.buy-preview {
  width: 140px;
  height: 190px;
  margin: 0.6rem auto;
  border: 1px solid #2a2a44;
  border-radius: 12px;
  overflow: hidden;
  background: #06060c;
}
.buy-preview svg { width: 100%; height: 100%; display: block; }

/* ================================================================
   QUEST PANEL + JOB BOOK
   ================================================================ */
.quest-panel {
  margin: 0.4rem 0 0.8rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--neon-yellow);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,225,77,0.08), rgba(255,225,77,0.02));
  box-shadow: 0 0 14px rgba(255,225,77,0.18);
}
.qp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}
.qp-tag {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.22em;
  color: var(--neon-yellow);
  text-shadow: 0 0 6px var(--neon-yellow);
  font-size: 0.78rem;
}
.qp-link {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.15em;
  font-size: 0.78rem;
  color: var(--neon-cyan);
  text-decoration: none;
  text-shadow: 0 0 5px var(--neon-cyan);
}
.qp-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--text);
}
.qp-pitch {
  font-family: 'Caveat', 'Space Mono', monospace;
  font-size: 1.05rem;
  color: var(--neon-green);
  margin: 0.25rem 0 0.55rem;
  line-height: 1.25;
}
.qp-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid #2a2a44;
  overflow: hidden;
}
.qp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-yellow), var(--neon-pink));
  box-shadow: 0 0 8px var(--neon-yellow);
  transition: width 0.4s ease-out;
}
.qp-prog {
  margin-top: 0.4rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-align: right;
}
.qp-next {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #2a2a44;
  font-size: 0.82rem;
  color: var(--text);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.qp-next-hint {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  font-weight: 400;
}

/* job board page */
.quest-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}
@media (min-width: 720px) {
  .quest-list { grid-template-columns: 1fr 1fr; }
}
.quest-card {
  border: 1px solid #2a2a44;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: linear-gradient(180deg, #14142a, #0a0a18);
}
/* ===========================================================
   STAGE CARDS (jobs.html) — 6 stages with 12 quests each
   =========================================================== */
.stage-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}
.stage-card {
  border: 1px solid #2a2a44;
  border-radius: 14px;
  background: linear-gradient(180deg, #14142a, #0a0a18);
  overflow: hidden;
}
.stage-card.current {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 18px rgba(255,225,77,0.3);
}
.stage-card.done    { border-color: var(--neon-green); }
.stage-card.locked  { opacity: 0.55; }
.stage-head {
  padding: 0.85rem 0.95rem 0.6rem;
  border-bottom: 1px solid #20203a;
}
.stage-title-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.stage-icon { font-size: 1.7rem; line-height: 1; }
.stage-id { flex: 1; }
.stage-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.7rem;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1;
}
.stage-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
  letter-spacing: 0.04em;
}
.stage-tag {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #2a2a44;
  color: var(--text-dim);
  white-space: nowrap;
}
.stage-card.current .stage-tag { color: var(--neon-yellow); border-color: var(--neon-yellow); text-shadow: 0 0 5px var(--neon-yellow); }
.stage-card.done    .stage-tag { color: var(--neon-green);  border-color: var(--neon-green);  text-shadow: 0 0 5px var(--neon-green);  }
.stage-blurb {
  font-family: 'Caveat', sans-serif;
  font-size: 1rem;
  color: var(--neon-green);
  margin: 0.35rem 0 0.55rem;
  line-height: 1.25;
}
.stage-progress {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.stage-progress .qp-bar { flex: 1; }
.stage-prog-text {
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.stage-quests {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  padding: 0.6rem 0.95rem 0.95rem;
}
@media (min-width: 720px) {
  .stage-quests { grid-template-columns: 1fr 1fr; }
}
.qrow {
  border: 1px solid #20203a;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  background: rgba(11,11,22,0.55);
}
.qrow.done {
  border-color: var(--neon-green);
  background: rgba(0,255,136,0.06);
  opacity: 0.85;
}
.qrow-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}
.qrow-num {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.18em;
}
.qrow-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--text);
  flex: 1;
}
.qrow-reward {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--neon-yellow);
  text-shadow: 0 0 4px var(--neon-yellow);
}
.qrow-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
  line-height: 1.35;
}
.qrow-foot {
  margin-top: 0.25rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
}
.qrow-prog { color: var(--neon-cyan); letter-spacing: 0.04em; }
.qrow.done .qrow-prog { color: var(--neon-green); }

.stage-locked {
  text-align: center;
  padding: 1rem;
  color: var(--text-dim);
}
.lock-icon { font-size: 2rem; margin-bottom: 0.4rem; }

/* legacy quest-card classes (kept for backwards-compat with anything still using them) */
.quest-card.active {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 14px rgba(255,225,77,0.25);
}
.quest-card.done {
  border-color: var(--neon-green);
  opacity: 0.85;
}
.quest-card.locked { opacity: 0.6; }
.qc-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.2rem;
}
.qc-num {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  font-size: 0.78rem;
}
.qc-stat {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
}
.quest-card.active  .qc-stat { color: var(--neon-yellow); text-shadow: 0 0 5px var(--neon-yellow); }
.quest-card.done    .qc-stat { color: var(--neon-green);  text-shadow: 0 0 5px var(--neon-green); }
.quest-card.locked  .qc-stat { color: var(--text-dim); }
.qc-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.qc-pitch {
  font-family: 'Caveat', 'Space Mono', monospace;
  font-size: 0.95rem;
  color: var(--neon-green);
  line-height: 1.3;
  margin-bottom: 0.3rem;
}
.qc-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.qc-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
}
.qc-prog { color: var(--neon-cyan); letter-spacing: 0.06em; }
.qc-reward { color: var(--neon-yellow); letter-spacing: 0.08em; }

/* Quest banner inside game-over overlay */
.quest-banner {
  margin-bottom: 0.7rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--neon-yellow);
  border-radius: 10px;
  background: rgba(255,225,77,0.08);
  text-align: center;
}
.qb-tag {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.25em;
  color: var(--neon-yellow);
  text-shadow: 0 0 6px var(--neon-yellow);
  font-size: 0.78rem;
}
.qb-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  color: var(--neon-yellow);
  text-shadow: 0 0 8px var(--neon-yellow);
  margin: 0.05rem 0;
}
.qb-payoff {
  font-family: 'Caveat', sans-serif;
  font-size: 1rem;
  color: var(--neon-green);
  margin: 0.1rem 0 0.25rem;
}
.qb-reward {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.1em;
  color: var(--neon-yellow);
  text-shadow: 0 0 6px var(--neon-yellow);
}

/* Try-on banner (locker) */
.tryon-banner {
  position: sticky;
  bottom: 0.4rem;
  margin: 0.6rem 0 0.6rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--neon-yellow);
  border-radius: 12px;
  background: rgba(20,15,5,0.95);
  box-shadow: 0 0 18px rgba(255,225,77,0.25);
  z-index: 30;
}
.tb-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.tb-row + .tb-row { margin-top: 0.45rem; }
.tb-tag {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.22em;
  color: var(--neon-yellow);
  text-shadow: 0 0 6px var(--neon-yellow);
  font-size: 0.78rem;
}
.tb-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  color: var(--text);
}
.tb-price {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  color: var(--neon-yellow);
  text-shadow: 0 0 5px var(--neon-yellow);
  flex: 1;
}
.tb-actions .btn { padding: 0.55rem 0.8rem; font-size: 1rem; }
.item-tile.previewing {
  border-color: var(--neon-yellow) !important;
  box-shadow: 0 0 12px rgba(255,225,77,0.35);
}

/* ================================================================
   LEGAL PAGES (about / privacy / terms / contact)
   ================================================================ */
.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.2rem 1.1rem 2rem;
  color: var(--text);
  line-height: 1.6;
}
.legal-h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.4rem, 9vw, 4rem);
  letter-spacing: 0.04em;
  color: var(--neon-green);
  text-shadow: 0 0 12px var(--neon-green);
  margin-bottom: 0.4rem;
}
.legal-page h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.4rem, 5vw, 2rem);
  letter-spacing: 0.04em;
  margin: 1.6rem 0 0.5rem;
  color: var(--neon-pink);
  text-shadow: 0 0 8px var(--neon-pink);
}
.legal-page h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  margin: 1rem 0 0.3rem;
  color: var(--neon-cyan);
}
.legal-page p, .legal-page li {
  font-family: 'Space Mono', monospace;
  font-size: 0.92rem;
  color: var(--text);
}
.legal-page a {
  color: var(--neon-cyan);
  text-decoration: underline;
  text-decoration-color: rgba(0,229,255,0.4);
}
.legal-page a:hover { text-decoration-color: var(--neon-cyan); }
.legal-lede {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
  border-left: 3px solid var(--neon-green);
  padding-left: 0.8rem;
}
.legal-updated {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.legal-list {
  padding-left: 1.2rem;
}
.legal-list li { margin-bottom: 0.4rem; }
.legal-mail {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--neon-yellow) !important;
  text-shadow: 0 0 6px var(--neon-yellow);
}
.legal-aside {
  font-size: 0.78rem;
  color: var(--text-dim);
  background: rgba(255,225,77,0.05);
  border: 1px dashed #2a2a44;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
}
.legal-cta {
  margin-top: 1.5rem;
  text-align: center;
}

/* Footer legal links */
.footer-links {
  margin-bottom: 0.6rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.footer-links a {
  color: var(--neon-cyan);
  text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }

/* ================================================================
   CONSENT BANNER
   ================================================================ */
.consent-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: calc(1rem + var(--safe-bottom));
  z-index: 200;
  border: 1px solid var(--neon-yellow);
  border-radius: 14px;
  background: rgba(7,7,13,0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 28px rgba(255,225,77,0.25);
  max-width: 560px;
  margin: 0 auto;
}
.consent-body {
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.consent-text {
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.45;
}
.consent-text a { color: var(--neon-cyan); }
.consent-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
.consent-actions .btn { padding: 0.5rem 1rem; font-size: 0.95rem; }
@media (min-width: 560px) {
  .consent-body { flex-direction: row; align-items: center; }
  .consent-actions { flex-shrink: 0; }
}

/* ================================================================
   AD SLOTS
   ================================================================ */
[data-ad-slot] {
  display: block;
  width: 100%;
  margin: 0.6rem auto;
  min-height: 90px;
  max-width: 728px;
}
[data-ad-slot].ad-rectangle { max-width: 336px; min-height: 280px; }
[data-ad-slot].ad-square    { max-width: 300px; min-height: 250px; }
.ad-placeholder {
  width: 100%;
  height: 100%;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #2a2a44;
  border-radius: 10px;
  background: rgba(20,20,40,0.4);
  color: var(--text-dim);
  font-family: 'Space Mono', monospace;
  padding: 0.6rem;
  text-align: center;
}
.ap-tag {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.25em;
  color: var(--text-dim);
}
.ap-sub {
  font-size: 0.7rem;
  margin-top: 0.2rem;
  letter-spacing: 0.08em;
}
.ad-placeholder.consent-pending {
  border-color: var(--neon-yellow);
  color: var(--neon-yellow);
}

/* ================================================================
   ACCOUNTS — header chip, forms, status card, leaderboard
   ================================================================ */
.user-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.55rem;
  margin-right: 0.4rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  background: rgba(0,0,0,0.5);
  color: var(--text-dim);
  border: 1px solid #2a2a44;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.user-chip:hover, .user-chip:active {
  color: var(--text);
  border-color: var(--neon-cyan);
}
.user-chip.signed-in {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  text-shadow: 0 0 5px var(--neon-cyan);
  background: rgba(0,229,255,0.06);
}
@media (max-width: 380px) {
  .user-chip { font-size: 0.7rem; padding: 0.25rem 0.45rem; margin-right: 0.3rem; }
}

/* Status card on account page */
.status-card {
  margin: 0.4rem 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #25253f;
  border-radius: 14px;
  background: linear-gradient(180deg, #14142a, #0a0a18);
  text-align: center;
}
.sc-tag {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.3em;
  font-size: 0.78rem;
  color: var(--text-dim);
}
.sc-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.4rem;
  letter-spacing: 0.04em;
  color: var(--neon-green);
  text-shadow: 0 0 8px var(--neon-green);
  margin: 0.1rem 0;
}
.sc-stats {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.sc-actions {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.sc-actions .btn { padding: 0.55rem 0.9rem; font-size: 1rem; }

/* Auth tabs / forms */
.auth-tabs {
  display: flex;
  gap: 0.4rem;
  margin: 0.4rem 0 0.6rem;
  border-bottom: 1px solid #20203a;
}
.auth-tab {
  appearance: none;
  flex: 1;
  padding: 0.6rem 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.18em;
  font-size: 1.1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.auth-tab.active {
  color: var(--neon-green);
  border-bottom-color: var(--neon-green);
  text-shadow: 0 0 6px var(--neon-green);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-width: 420px;
  margin: 0 auto;
  padding: 0.6rem 0;
}
.field { display: flex; flex-direction: column; gap: 0.25rem; }
.field-label {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  font-size: 0.78rem;
}
.field input[type="text"], .field input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid #2a2a44;
  background: rgba(11,11,22,0.7);
  color: var(--text);
  border-radius: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  letter-spacing: 0.04em;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
  border-color: var(--neon-green);
  box-shadow: 0 0 8px rgba(0,255,136,0.25);
}
.field-hint {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin-top: 0.05rem;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.check-row input { margin-top: 0.15rem; accent-color: var(--neon-green); }
.form-msg {
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  min-height: 1.2em;
  text-align: center;
}
.form-msg.err { color: var(--danger); }
.form-msg.neutral { color: var(--text-dim); }

/* other profiles list */
.other-profiles { max-width: 420px; margin: 0 auto; }
.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border: 1px solid #20203a;
  border-radius: 10px;
  background: rgba(11,11,22,0.5);
  margin-bottom: 0.45rem;
}
.pr-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: var(--neon-cyan);
  text-shadow: 0 0 5px var(--neon-cyan);
}
.profile-row .btn { padding: 0.4rem 0.7rem; font-size: 0.9rem; }

/* leaderboard */
.board-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 0.4rem;
}
.board-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #20203a;
  border-radius: 8px;
  background: rgba(11,11,22,0.5);
  font-family: 'Space Mono', monospace;
}
.board-row.board-head {
  border: none;
  background: transparent;
  padding: 0.2rem 0.7rem;
  color: var(--text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
}
.board-row.top {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 12px rgba(255,225,77,0.2);
}
.board-row.top .bc-rank,
.board-row.top .bc-score {
  color: var(--neon-yellow);
  text-shadow: 0 0 6px var(--neon-yellow);
}
.board-row.you {
  border-color: var(--neon-cyan);
  background: rgba(0,229,255,0.08);
}
.bc-rank {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  text-align: center;
  color: var(--text-dim);
}
.bc-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-score {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  color: var(--neon-green);
  text-shadow: 0 0 5px var(--neon-green);
  text-align: right;
}
.empty-board {
  text-align: center;
  padding: 1.2rem 1rem;
  border: 1px dashed #2a2a44;
  border-radius: 12px;
  background: rgba(0,0,0,0.4);
}
.empty-tag {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.empty-board p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0.4rem 0 0.7rem;
}

/* Landing page side-rail buttons */
.menu-rail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  max-width: 720px;
  margin: 0 auto 1.5rem;
  padding: 0 1rem;
}
@media (max-width: 380px) {
  .menu-rail { grid-template-columns: 1fr; }
}
