/* ===== $STEVE Arcade — Minecraft-inspired, original CSS ===== */
:root {
  --grass: #5a9e3c;
  --grass-dark: #3d6b2a;
  --grass-light: #7bb85a;
  --dirt: #8b5a2b;
  --dirt-dark: #5c3a1a;
  --dirt-mid: #6b4423;
  --sky: #6eb8d8;
  --sky-deep: #4aa3c7;
  --sky-light: #b8e0f0;
  --sky-high: #5eb3d4;
  --gold: #e8b923;
  --gold-dark: #c49a12;
  --emerald: #2ecc71;
  --emerald-dark: #1e9e55;
  --purple: #9b59b6;
  --purple-dark: #7d3c98;
  --cream: #f5f0e1;
  --ink: #1a1a1a;
  --wood: #a0522d;
  --wood-dark: #6e3418;
  --steve-shirt: #2aa8a8;
  --steve-pants: #4a3c8c;
  --pixel: "Press Start 2P", system-ui, monospace;
  --body: "Nunito", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--sky);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.45;
}

.hidden { display: none !important; }

/* ===== LOADER ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: linear-gradient(180deg, var(--sky-deep) 0%, var(--sky) 55%, var(--grass) 55%, var(--dirt) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s ease, visibility 0.45s;
}
.loader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-inner {
  text-align: center;
  padding: 1.5rem;
}
.loader-title {
  font-family: var(--pixel);
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  color: var(--cream);
  text-shadow: 3px 3px 0 var(--ink), 0 0 12px rgba(232, 185, 35, 0.5);
  margin: 1.2rem 0 0.5rem;
}
.loader-sub {
  font-family: var(--pixel);
  font-size: 0.55rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.25rem;
}
.progress-track {
  width: min(280px, 70vw);
  height: 18px;
  margin: 0 auto;
  background: var(--dirt-dark);
  border: 3px solid var(--ink);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.25);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(
    90deg,
    var(--gold) 0 10px,
    var(--gold-dark) 10px 20px
  );
  transition: width 0.12s linear;
}
.loader-pct {
  font-family: var(--pixel);
  font-size: 0.55rem;
  color: var(--cream);
  margin-top: 0.6rem;
}

/* ===== STEVE CANVAS MASCOT (original pixel art) ===== */
.loader-steve-canvas,
.hero-steve-canvas {
  display: block;
  margin: 0 auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(3px 4px 0 rgba(0,0,0,0.28));
}
.loader-steve-canvas {
  width: 88px;
  height: 144px;
  animation: steve-bounce 0.7s ease-in-out infinite;
}
.hero-steve-canvas {
  width: min(132px, 36vw);
  height: auto;
  aspect-ratio: 264 / 432;
}

@keyframes steve-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ===== APP / WORLD ===== */
.app {
  position: relative;
  min-height: 100vh;
  padding: 1.5rem 1rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.plains-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -4;
  pointer-events: none;
  image-rendering: pixelated;
}
.sky-layer {
  position: fixed;
  inset: 0;
  z-index: -3;
  /* Soft veil only — plains canvas + CSS hills do the heavy lifting */
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 70%,
    rgba(90, 158, 60, 0.15) 82%,
    rgba(107, 68, 35, 0.25) 100%
  );
  opacity: 1;
  pointer-events: none;
}

/* Stepped grass hills */
.hills-layer {
  position: fixed;
  left: 0; right: 0; bottom: 18vh;
  height: 28vh;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.hill {
  position: absolute;
  bottom: 0;
  image-rendering: pixelated;
}
.hill-back {
  left: -5%;
  width: 55%;
  height: 70%;
  background:
    linear-gradient(180deg, var(--grass-light) 0 14%, var(--grass) 14% 78%, var(--dirt) 78% 100%);
  clip-path: polygon(
    0% 100%, 0% 55%, 4% 55%, 4% 40%, 10% 40%, 10% 28%, 18% 28%, 18% 18%,
    28% 18%, 28% 28%, 36% 28%, 36% 40%, 48% 40%, 48% 55%, 60% 55%, 60% 70%,
    75% 70%, 75% 85%, 100% 85%, 100% 100%
  );
  box-shadow: inset -8px 0 0 rgba(0,0,0,0.12);
}
.hill-mid {
  left: 35%;
  width: 50%;
  height: 85%;
  background:
    linear-gradient(180deg, var(--grass-light) 0 12%, var(--grass) 12% 72%, var(--dirt) 72% 100%);
  clip-path: polygon(
    0% 100%, 0% 70%, 8% 70%, 8% 50%, 16% 50%, 16% 35%, 26% 35%, 26% 22%,
    40% 22%, 40% 35%, 52% 35%, 52% 48%, 68% 48%, 68% 62%, 85% 62%, 85% 78%,
    100% 78%, 100% 100%
  );
}
.hill-front {
  right: -8%;
  width: 48%;
  height: 55%;
  background:
    linear-gradient(180deg, var(--grass-light) 0 16%, var(--grass) 16% 80%, var(--dirt) 80% 100%);
  clip-path: polygon(
    0% 100%, 0% 60%, 10% 60%, 10% 42%, 22% 42%, 22% 28%, 38% 28%, 38% 42%,
    55% 42%, 55% 55%, 72% 55%, 72% 70%, 100% 70%, 100% 100%
  );
}

.dirt-band {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 14vh;
  z-index: -2;
  background:
    repeating-linear-gradient(90deg, var(--dirt) 0 28px, var(--dirt-mid) 28px 56px),
    var(--dirt);
  border-top: 8px solid var(--grass-dark);
  box-shadow:
    inset 0 10px 0 var(--grass),
    inset 0 18px 0 var(--grass-light);
  pointer-events: none;
}

/* Blocky Minecraft-style clouds */
.cloud {
  position: fixed;
  z-index: -1;
  background: #fff;
  border-radius: 0;
  image-rendering: pixelated;
  width: 20px;
  height: 12px;
  box-shadow:
    16px 0 0 #fff,
    32px 0 0 #fff,
    48px 0 0 rgba(255,255,255,0.95),
    8px -10px 0 #fff,
    24px -10px 0 #fff,
    40px -10px 0 #fff,
    16px 10px 0 rgba(255,255,255,0.9),
    32px 10px 0 rgba(255,255,255,0.9);
  animation: drift 40s linear infinite;
  pointer-events: none;
  opacity: 0.92;
}
.cloud-1 { top: 6%; left: -12%; animation-duration: 52s; }
.cloud-2 { top: 14%; left: 22%; width: 24px; height: 14px; animation-duration: 60s; animation-delay: -15s; }
.cloud-3 { top: 9%; left: 58%; animation-duration: 45s; animation-delay: -28s; }
.cloud-4 { top: 20%; left: 78%; width: 18px; height: 10px; animation-duration: 70s; animation-delay: -8s; }
@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(130vw); }
}

/* CSS sunflowers */
.sunflower {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 28px;
}
.sf-stalk {
  width: 6px;
  height: 48px;
  background: #3d8b3d;
  box-shadow: 8px 12px 0 -1px #3d8b3d, -6px 20px 0 -1px #3d8b3d;
}
.sf-head {
  width: 22px;
  height: 22px;
  background: #f1c40f;
  box-shadow:
    0 -6px 0 #f4d03f,
    0 6px 0 #f4d03f,
    -6px 0 0 #f4d03f,
    6px 0 0 #f4d03f,
    inset 0 0 0 6px #5c4033;
  image-rendering: pixelated;
}
.sf-1 { left: 6%; bottom: 16vh; transform: scale(0.85); }
.sf-2 { left: 18%; bottom: 22vh; transform: scale(1.05); }
.sf-3 { right: 12%; bottom: 18vh; transform: scale(0.95); }
.sf-4 { right: 28%; bottom: 26vh; transform: scale(0.75); }

/* Distant blocky trees */
.distant-trees {
  position: fixed;
  left: 2%;
  bottom: 32vh;
  z-index: -1;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  pointer-events: none;
  opacity: 0.9;
}
.tree {
  display: block;
  width: 14px;
  height: 28px;
  background: #2d5a2d;
  box-shadow:
    0 -10px 0 -2px #2d5a2d,
    0 -18px 0 -4px #1e4a1e,
    inset 5px 18px 0 #1a3a1a;
}
.tree.t2 { height: 36px; width: 16px; }
.tree.t3 { height: 24px; width: 12px; }

/* Tiny pink pig silhouette */
.pixel-pig {
  position: fixed;
  left: 24%;
  bottom: 30vh;
  z-index: -1;
  width: 28px;
  height: 16px;
  background: #f5a9b8;
  box-shadow:
    20px 2px 0 0 #f5a9b8,
    24px 4px 0 -2px #e8909e,
    2px 14px 0 -4px #f5a9b8,
    14px 14px 0 -4px #f5a9b8,
    26px 6px 0 -5px #1a1a1a;
  pointer-events: none;
  image-rendering: pixelated;
  opacity: 0.95;
}

/* ===== HERO ===== */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem 2.5rem;
  padding: 1.25rem 0 1.5rem;
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero-mascot { position: relative; }
.mascot-shadow {
  width: 80px;
  height: 12px;
  margin: 4px auto 0;
  background: rgba(0,0,0,0.22);
  border-radius: 50%;
  filter: blur(2px);
}
.logo {
  font-family: var(--pixel);
  font-size: clamp(1.6rem, 6vw, 2.8rem);
  color: var(--cream);
  text-shadow:
    4px 4px 0 var(--ink),
    -1px -1px 0 var(--grass-dark),
    0 0 18px rgba(232, 185, 35, 0.45);
  letter-spacing: 2px;
}
.tagline {
  font-family: var(--pixel);
  font-size: clamp(0.5rem, 1.8vw, 0.7rem);
  color: var(--ink);
  margin-top: 0.85rem;
  line-height: 1.8;
  background: rgba(245, 240, 225, 0.75);
  display: inline-block;
  padding: 0.6rem 0.9rem;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
}

/* ===== BUTTONS ===== */
.btn {
  font-family: var(--pixel);
  font-size: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  padding: 0.7rem 0.85rem;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  display: inline-block;
  transition: transform 0.08s, box-shadow 0.08s;
  user-select: none;
  white-space: nowrap;
}
.btn:hover, .btn:focus-visible {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
  outline: none;
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}
.btn-gold { background: var(--gold); }
.btn-emerald { background: var(--emerald); color: #fff; }
.btn-sky { background: var(--sky-light); }
.btn-purple { background: var(--purple); color: #fff; }
.btn-social {
  background: var(--cream);
  min-width: 2.6rem;
  text-align: center;
  padding: 0.65rem 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-social .social-icon {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}
.btn-copy {
  background: var(--grass-light);
  font-size: 0.5rem;
  padding: 0.5rem 0.7rem;
}
.btn-start {
  background: var(--gold);
  font-size: 0.75rem;
  padding: 0.9rem 1.4rem;
  margin-top: 0.75rem;
}

/* ===== ACTION BAR ===== */
.action-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0 1rem;
}
.buy-row, .social-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

/* ===== CA ROW ===== */
.ca-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.65rem;
  margin: 0 auto 1.75rem;
  padding: 0.65rem 0.9rem;
  max-width: 640px;
  background: rgba(26, 26, 26, 0.82);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.25);
  color: var(--cream);
  position: relative;
}
.ca-label {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--gold);
}
.ca-value {
  font-family: var(--pixel);
  font-size: clamp(0.4rem, 1.5vw, 0.55rem);
  word-break: break-all;
  color: var(--cream);
  flex: 1 1 auto;
  text-align: center;
  min-width: 0;
}
.copy-toast {
  position: absolute;
  top: -1.6rem;
  right: 0.5rem;
  font-family: var(--pixel);
  font-size: 0.45rem;
  background: var(--emerald);
  color: #fff;
  padding: 0.3rem 0.5rem;
  border: 2px solid var(--ink);
}

/* ===== CABINETS ===== */
.cabinets {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (max-width: 1100px) {
  .cabinets { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .cabinets { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .cabinets { grid-template-columns: 1fr; max-width: 320px; margin-left: auto; margin-right: auto; }
}

.cabinet {
  position: relative;
  background: linear-gradient(180deg, #5c3a1a 0%, #3d2612 100%);
  border: 4px solid var(--ink);
  box-shadow:
    5px 5px 0 rgba(0,0,0,0.3),
    inset 0 0 0 3px var(--wood);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.12s, box-shadow 0.12s;
}
.cabinet:hover, .cabinet:focus-visible {
  transform: translateY(-4px);
  box-shadow: 6px 8px 0 rgba(0,0,0,0.35), inset 0 0 0 3px var(--gold);
  outline: none;
}
.cabinet:active { transform: translateY(-1px); }

.cabinet-preview {
  background: #1a2a1a;
  border-bottom: 3px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  min-height: 108px;
}
.preview-canvas {
  width: 100%;
  max-width: 160px;
  height: auto;
  image-rendering: pixelated;
  background: #0d1a0d;
  border: 2px solid #2a3a2a;
}

.cabinet-meta {
  padding: 0.75rem 0.7rem 0.9rem;
  text-align: center;
  background: linear-gradient(180deg, #6e4420 0%, #4a2e14 100%);
}
.cabinet-title {
  font-family: var(--pixel);
  font-size: 0.65rem;
  color: var(--cream);
  margin-bottom: 0.45rem;
  text-shadow: 2px 2px 0 #000;
}
.skill-tag {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 0.4rem;
  padding: 0.25rem 0.45rem;
  border: 2px solid var(--ink);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}
.skill-speed { background: #e74c3c; color: #fff; }
.skill-nerve { background: #27ae60; color: #fff; }
.skill-aim { background: #3498db; color: #fff; }
.skill-memory { background: #f39c12; color: #fff; }
.skill-fly { background: #9b59b6; color: #fff; }

.cabinet-desc {
  font-size: 0.8rem;
  color: rgba(245, 240, 225, 0.9);
  margin-bottom: 0.55rem;
  line-height: 1.35;
}
.best-score {
  font-family: var(--pixel);
  font-size: 0.45rem;
  color: var(--gold);
}
.best-score strong { color: #fff; }

.cabinet-glow {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(232,185,35,0.12) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.2s;
}
.cabinet:hover .cabinet-glow { opacity: 1; }

/* ===== FOOTER ===== */
.site-footer {
  text-align: center;
  padding: 1rem 0 2.5rem;
  font-family: var(--pixel);
  font-size: 0.4rem;
  color: rgba(26,26,26,0.75);
  line-height: 1.7;
}

/* ===== PHONE MODAL ===== */
.game-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(10, 20, 10, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(3px);
}
.phone-frame {
  width: min(320px, 92vw);
  background: #2c2c2c;
  border: 5px solid #111;
  border-radius: 28px;
  box-shadow:
    0 0 0 3px #555,
    0 20px 50px rgba(0,0,0,0.55),
    inset 0 0 0 2px #444;
  padding: 10px 10px 14px;
  position: relative;
}
.phone-notch {
  width: 90px;
  height: 10px;
  background: #111;
  border-radius: 0 0 8px 8px;
  margin: 0 auto 8px;
}
.phone-home {
  width: 40px;
  height: 4px;
  background: #555;
  border-radius: 2px;
  margin: 10px auto 0;
}
.phone-screen {
  background: linear-gradient(180deg, #4aa3c7 0%, #5a8f3c 70%, #5c3a1a 100%);
  border: 3px solid #111;
  border-radius: 8px;
  height: min(560px, 78vh);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.phone-hud {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.5rem;
  background: rgba(0,0,0,0.75);
  color: #fff;
  border-bottom: 2px solid #111;
  flex-shrink: 0;
  z-index: 5;
}
.phone-title {
  font-family: var(--pixel);
  font-size: 0.45rem;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phone-stats {
  display: flex;
  gap: 0.55rem;
  font-family: var(--pixel);
  font-size: 0.35rem;
  color: var(--gold);
}
.phone-stats strong { color: #fff; }
.btn-close {
  background: #c0392b;
  color: #fff;
  border: 2px solid #111;
  font-family: var(--pixel);
  font-size: 0.5rem;
  width: 1.6rem;
  height: 1.6rem;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}
.btn-close:hover { background: #e74c3c; }

.start-screen, .game-over-screen {
  position: absolute;
  inset: 40px 0 0 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.85rem 0.85rem 1.1rem;
  text-align: center;
  background: rgba(20, 40, 20, 0.94);
  color: var(--cream);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.start-screen { justify-content: center; }
.start-title, .go-title {
  font-family: var(--pixel);
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
  text-shadow: 2px 2px 0 #000;
}
.start-instructions {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 0.6rem;
  max-width: 240px;
}
.start-best, .go-score, .go-best {
  font-family: var(--pixel);
  font-size: 0.5rem;
  margin: 0.3rem 0;
}
.go-title { color: #e74c3c; }

.game-canvas {
  flex: 1;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  background: #87ceeb;
  cursor: crosshair;
  touch-action: none;
}
.game-dom {
  flex: 1;
  width: 100%;
  position: relative;
  background: #1a2a1a;
  overflow: hidden;
}

/* Steve Says DOM pads */
.ss-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 1.2rem;
  height: 100%;
  place-content: center;
}
.ss-pad {
  border: 4px solid #111;
  border-radius: 8px;
  min-height: 100px;
  cursor: pointer;
  transition: filter 0.1s, transform 0.08s;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,0.25);
}
.ss-pad:active, .ss-pad.lit {
  filter: brightness(1.45);
  transform: scale(0.97);
  box-shadow: inset 0 0 20px rgba(255,255,255,0.35);
}
.ss-pad[data-color="0"] { background: #e74c3c; }
.ss-pad[data-color="1"] { background: #3498db; }
.ss-pad[data-color="2"] { background: #f1c40f; }
.ss-pad[data-color="3"] { background: #2ecc71; }
.ss-status {
  position: absolute;
  top: 8px;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--pixel);
  font-size: 0.45rem;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  pointer-events: none;
}

/* ===== CABINET BOARD BTN ===== */
.btn-lb {
  margin-top: 0.45rem;
  font-family: var(--pixel);
  font-size: 0.38rem;
  letter-spacing: 1px;
  padding: 0.28rem 0.5rem;
  background: #2c3e50;
  color: #fff;
  border: 2px solid var(--ink);
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.35);
}
.btn-lb:hover { background: #3d566e; color: var(--gold); }

/* ===== LEADERBOARD ===== */
.lb-panel {
  width: 100%;
  max-width: 250px;
  margin: 0.55rem 0 0.7rem;
  padding: 0.55rem 0.5rem 0.65rem;
  background: rgba(0,0,0,0.35);
  border: 2px solid rgba(232,185,35,0.45);
  text-align: left;
}
.lb-heading, .lb-only-title {
  font-family: var(--pixel);
  font-size: 0.48rem;
  color: var(--gold);
  text-align: center;
  margin: 0 0 0.35rem;
  text-shadow: 1px 1px 0 #000;
}
.lb-note {
  font-size: 0.68rem;
  color: rgba(245,240,225,0.75);
  text-align: center;
  margin: 0 0 0.45rem;
  line-height: 1.3;
}
.lb-list {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  max-height: 132px;
  overflow-y: auto;
}
.lb-list li {
  display: grid;
  grid-template-columns: 1.4rem 1fr auto;
  gap: 0.25rem;
  align-items: baseline;
  font-size: 0.72rem;
  padding: 0.18rem 0.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #f5f0e1;
}
.lb-list li.lb-empty {
  display: block;
  text-align: center;
  color: rgba(245,240,225,0.65);
  border: none;
  font-size: 0.75rem;
  padding: 0.4rem 0;
}
.lb-rank {
  font-family: var(--pixel);
  font-size: 0.36rem;
  color: var(--gold);
}
.lb-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-score-text {
  font-family: var(--pixel);
  font-size: 0.38rem;
  color: #fff;
}
.lb-entry { margin-top: 0.25rem; }
.lb-label {
  display: block;
  font-family: var(--pixel);
  font-size: 0.36rem;
  margin-bottom: 0.3rem;
  color: rgba(245,240,225,0.85);
  text-align: center;
}
.lb-row {
  display: flex;
  gap: 0.35rem;
  align-items: stretch;
}
.lb-name {
  flex: 1;
  min-width: 0;
  font-family: var(--sans, "Nunito", sans-serif);
  font-size: 0.85rem;
  padding: 0.35rem 0.45rem;
  border: 2px solid #111;
  background: #f5f0e1;
  color: #1a1a1a;
}
.btn-lb-submit {
  font-family: var(--pixel);
  font-size: 0.4rem;
  padding: 0.35rem 0.55rem;
  background: var(--gold);
  color: #1a1a1a;
  border: 2px solid #111;
  cursor: pointer;
  white-space: nowrap;
}
.btn-lb-submit:hover { filter: brightness(1.08); }
.lb-msg {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  text-align: center;
}
.lb-msg.lb-ok { color: #2ecc71; }
.lb-msg.lb-err { color: #e74c3c; }
.game-over-screen .btn-start { margin-top: 0.35rem; flex-shrink: 0; }
.go-title { margin-bottom: 0.45rem; }



/* ===== MUTE TOGGLE ===== */
.btn-mute {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: #2a4a2a;
  color: var(--gold);
  border: 2px solid #111;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.25);
}
.btn-mute:hover { filter: brightness(1.12); }
.btn-mute.is-muted {
  background: #4a2a2a;
  color: #f0c0c0;
}
.btn-mute svg { display: block; pointer-events: none; }

/* ===== PLAYER BAR ===== */
.player-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 0.35rem auto 0.75rem;
  padding: 0.35rem 0.75rem;
  max-width: 520px;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(0, 0, 0, 0.45);
  border-radius: 10px;
  backdrop-filter: blur(2px);
}
.player-status {
  font-family: var(--pixel);
  font-size: 0.42rem;
  color: #fff;
  letter-spacing: 0.02em;
}
.btn-player {
  font-family: var(--pixel);
  font-size: 0.38rem;
  padding: 0.35rem 0.65rem;
  background: #3d566e;
  color: var(--gold);
  border: 2px solid #111;
  cursor: pointer;
  border-radius: 4px;
}
.btn-player:hover { filter: brightness(1.1); }

.lb-as {
  font-family: var(--pixel);
  font-size: 0.38rem;
  color: rgba(255,255,255,0.9);
  margin: 0 0 0.35rem;
}
.lb-as strong { color: var(--gold); }

/* ===== AUTH MODAL ===== */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(10, 20, 10, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(3px);
}
.auth-card {
  width: min(340px, 94vw);
  background: linear-gradient(180deg, #3a6b8c 0%, #4a7a3a 70%, #5c3a1a 100%);
  border: 4px solid #111;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
  padding: 1.1rem 1rem 1.15rem;
  position: relative;
  color: #fff;
}
.auth-close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
}
.auth-title {
  font-family: var(--pixel);
  font-size: 0.55rem;
  margin: 0 1.5rem 0.55rem 0;
  color: var(--gold);
  text-shadow: 2px 2px 0 #111;
}
.auth-note {
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.35;
  margin: 0 0 0.75rem;
  color: rgba(255,255,255,0.92);
}
.auth-label {
  display: block;
  font-family: var(--pixel);
  font-size: 0.35rem;
  margin: 0.45rem 0 0.25rem;
  color: var(--gold);
}
.auth-input {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.45rem 0.55rem;
  border: 2px solid #111;
  border-radius: 6px;
  background: rgba(255,255,255,0.95);
  color: #111;
}
.auth-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.auth-actions .btn {
  flex: 1;
  text-align: center;
  font-family: var(--pixel);
  font-size: 0.4rem;
  padding: 0.55rem 0.4rem;
  border: 2px solid #111;
  cursor: pointer;
  border-radius: 6px;
}
.auth-msg {
  margin: 0.55rem 0 0;
  font-family: var(--pixel);
  font-size: 0.35rem;
  line-height: 1.5;
}
.auth-msg.auth-ok { color: #2ecc71; }
.auth-msg.auth-err { color: #ffb4a8; }
