/* Game Over UI — mobile portrait, calming neon on dark violet */
:root {
  --bg-0: #0d0420;
  --bg-1: #1a0a3a;
  --bg-2: #2a1356;
  --violet-glow: #5b2ea8;
  --neon-cyan: #7df9ff;
  --neon-mint: #9bffd4;
  --neon-pink: #ff9ed8;
  --neon-lavender: #c8a8ff;
  --text-soft: #e8dcff;
  --text-dim: #9d8bc4;
  --text-faint: #5d4d82;
}

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

.go-root {
  width: 100%;
  height: 100%;
  font-family: "Inter", "Helvetica Neue", system-ui, sans-serif;
  font-weight: 300;
  color: var(--text-soft);
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

/* Stage — fills the device viewport */
.stage {
  position: relative;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 90% 60% at 50% 38%, var(--bg-2) 0%, var(--bg-1) 42%, var(--bg-0) 85%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  overflow: hidden;
  padding: 0 22px;
}

/* Vignette */
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 110% 80% at 50% 50%, transparent 45%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
}

/* Subtle grain */
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Drifting neon squares — ambient backdrop */
.ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.square {
  position: absolute;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  opacity: 0;
  filter: drop-shadow(0 0 8px currentColor) drop-shadow(0 0 22px currentColor);
  animation: drift var(--dur, 22s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes drift {
  0%   { transform: translate3d(var(--x0), var(--y0), 0) rotate(0deg) scale(var(--s, 1)); opacity: 0; }
  18%  { opacity: var(--op, 0.5); }
  50%  { transform: translate3d(var(--x1), var(--y1), 0) rotate(45deg) scale(calc(var(--s, 1) * 1.08)); }
  82%  { opacity: var(--op, 0.5); }
  100% { transform: translate3d(var(--x2), var(--y2), 0) rotate(90deg) scale(var(--s, 1)); opacity: 0; }
}

/* Content wrapper — sits above ambient */
.content {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: contentIn 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes contentIn {
  from { opacity: 0; transform: translateY(10px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: center;
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0;
}

.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--neon-pink);
  box-shadow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink);
  animation: breath 4s ease-in-out infinite;
}

@keyframes breath {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.25); }
}

/* Title block */
.titleblock {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.title {
  font-size: 52px;
  font-weight: 200;
  letter-spacing: 0.015em;
  line-height: 1.0;
  color: #fff;
  text-shadow:
    0 0 18px rgba(199,168,255,0.55),
    0 0 40px rgba(125,249,255,0.25);
  animation: titleBreath 6s ease-in-out infinite;
}

@keyframes titleBreath {
  0%, 100% { text-shadow: 0 0 18px rgba(199,168,255,0.45), 0 0 40px rgba(125,249,255,0.18); }
  50%      { text-shadow: 0 0 24px rgba(199,168,255,0.72), 0 0 56px rgba(125,249,255,0.32); }
}

.subtitle {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-align: center;
  max-width: 280px;
}

/* Score block — single hero stat */
.score-block {
  position: relative;
  margin-top: 14px;
  padding: 28px 24px 24px;
  border-radius: 22px;
  background:
    radial-gradient(ellipse 100% 110% at 50% 0%, rgba(125,249,255,0.10) 0%, transparent 70%),
    linear-gradient(180deg, rgba(40,18,80,0.55) 0%, rgba(20,8,48,0.55) 100%);
  border: 1px solid rgba(200,168,255,0.14);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.02) inset,
    0 12px 40px rgba(0,0,0,0.35),
    0 0 60px rgba(91,46,168,0.15);
  text-align: center;
  overflow: visible;
}

/* The little neon square mascot — bobbing above the score */
.score-block::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 50%;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--neon-cyan);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(125,249,255,0.16), rgba(125,249,255,0.04));
  box-shadow:
    0 0 16px rgba(125,249,255,0.7),
    0 0 36px rgba(125,249,255,0.35),
    inset 0 0 12px rgba(125,249,255,0.25);
  transform-origin: center;
  animation: bob 4.6s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0) rotate(-7deg); }
  50%      { transform: translate(-50%, -7px) rotate(9deg); }
}

.score-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
}

.score-value {
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  font-size: 68px;
  font-weight: 400;
  line-height: 1;
  color: #fff;
  text-shadow:
    0 0 18px rgba(125,249,255,0.7),
    0 0 40px rgba(125,249,255,0.35);
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.score-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--neon-mint);
  text-shadow: 0 0 10px rgba(155,255,212,0.55);
  opacity: 0;
  animation: tagIn 600ms ease 1.8s forwards;
}

.score-tag::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--neon-mint);
  transform: rotate(45deg);
  box-shadow: 0 0 8px var(--neon-mint);
}

@keyframes tagIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 0.95; transform: none; }
}

/* Actions */
.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 20px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 220ms ease, box-shadow 320ms ease, background 320ms ease, color 320ms ease, border-color 320ms ease;
  background: transparent;
  color: var(--text-soft);
}

.btn:active { transform: scale(0.985); }

.btn-primary {
  background: linear-gradient(180deg, rgba(125,249,255,0.20) 0%, rgba(125,249,255,0.08) 100%);
  border-color: rgba(125,249,255,0.55);
  color: var(--neon-cyan);
  box-shadow:
    0 0 0 1px rgba(125,249,255,0.15) inset,
    0 0 24px rgba(125,249,255,0.28),
    0 0 60px rgba(125,249,255,0.12);
  text-shadow: 0 0 12px rgba(125,249,255,0.5);
}

.btn-secondary {
  background: linear-gradient(180deg, rgba(255,158,216,0.14) 0%, rgba(255,158,216,0.04) 100%);
  border-color: rgba(255,158,216,0.40);
  color: var(--neon-pink);
  box-shadow:
    0 0 0 1px rgba(255,158,216,0.10) inset,
    0 0 22px rgba(255,158,216,0.20);
  text-shadow: 0 0 10px rgba(255,158,216,0.45);
}

.btn-ghost {
  color: var(--text-dim);
  border-color: rgba(200,168,255,0.16);
}

.btn-ghost:active {
  background: rgba(200,168,255,0.05);
  color: var(--text-soft);
}

/* Icons */
.icon-play {
  width: 0; height: 0;
  border-left: 8px solid currentColor;
  border-top: 5.5px solid transparent;
  border-bottom: 5.5px solid transparent;
  filter: drop-shadow(0 0 6px currentColor);
}

.icon-gear {
  display: inline-flex;
  width: 16px; height: 16px;
  color: currentColor;
  filter: drop-shadow(0 0 6px currentColor);
}
.icon-gear svg { width: 100%; height: 100%; }

/* ── Main Menu additions ───────────────────────────────────── */

/* Top bar (best score, sound toggle) */
.topbar {
  position: absolute;
  top: 58px; left: 22px; right: 22px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.best-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 10px;
  border-radius: 999px;
  background: rgba(40, 18, 80, 0.45);
  border: 1px solid rgba(200, 168, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.best-chip .star {
  width: 8px; height: 8px;
  background: var(--neon-mint);
  transform: rotate(45deg);
  box-shadow: 0 0 8px var(--neon-mint);
}
.best-chip .val {
  color: var(--neon-mint);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(200, 168, 255, 0.16);
  background: rgba(40, 18, 80, 0.45);
  color: var(--text-dim);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  -webkit-tap-highlight-color: transparent;
  transition: color 220ms ease, border-color 220ms ease;
}
.icon-btn:active { transform: scale(0.96); }
.icon-btn svg { width: 16px; height: 16px; }

/* Brand / logo area on the menu */
.brand {
  display: flex; flex-direction: column; align-items: center; gap: 28px;
  text-align: center;
}

/* Hero mascot — a single bobbing neon square, large */
.hero-square {
  position: relative;
  width: 72px; height: 72px;
}
.hero-square::before {
  content: "";
  position: absolute; inset: 0;
  border: 1.5px solid var(--neon-cyan);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(125,249,255,0.18), rgba(125,249,255,0.04));
  box-shadow:
    0 0 22px rgba(125,249,255,0.7),
    0 0 48px rgba(125,249,255,0.35),
    inset 0 0 16px rgba(125,249,255,0.25);
  animation: heroBob 5s ease-in-out infinite;
}
.hero-square::after {
  /* soft halo on the ground */
  content: "";
  position: absolute;
  bottom: -22px; left: 50%;
  transform: translateX(-50%);
  width: 90px; height: 14px;
  background: radial-gradient(ellipse at center, rgba(125,249,255,0.35) 0%, transparent 70%);
  filter: blur(4px);
  animation: heroShadow 5s ease-in-out infinite;
}

@keyframes heroBob {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50%      { transform: translateY(-10px) rotate(10deg); }
}
@keyframes heroShadow {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50%      { opacity: 0.3; transform: translateX(-50%) scale(0.85); }
}

.wordmark {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 44px;
  font-weight: 200;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #fff;
  text-shadow:
    0 0 18px rgba(199,168,255,0.55),
    0 0 40px rgba(125,249,255,0.25);
  animation: titleBreath 6s ease-in-out infinite;
}
.wordmark .amp {
  font-style: italic;
  font-weight: 300;
  color: var(--neon-cyan);
  text-shadow: 0 0 14px rgba(125,249,255,0.7);
  margin: 0 4px;
}

.tagline {
  font-size: 12px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Secondary link row (How To Play, Settings, Credits) */
.linkrow {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 22px;
}

.linkrow .lnk {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 6px 2px;
  transition: color 220ms ease;
  -webkit-tap-highlight-color: transparent;
}
.linkrow .lnk:active,
.linkrow .lnk:hover {
  color: var(--text-soft);
}

/* Footer / version */
.footer {
  position: absolute;
  bottom: 16px; left: 0; right: 0;
  z-index: 3;
  text-align: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.32em;
  color: var(--text-faint);
}
.footer .swatch {
  display: inline-block;
  width: 5px; height: 5px;
  background: var(--neon-pink);
  transform: rotate(45deg) translateY(-1px);
  margin: 0 6px;
  box-shadow: 0 0 6px var(--neon-pink);
}

/* Menu-specific stage padding so brand sits high, buttons low */
.stage.menu {
  justify-content: space-between;
  padding: 110px 22px 56px;
}

/* ── Credits screen ─────────────────────────────────────────── */

.stage.credits {
  justify-content: flex-start;
  padding: 64px 22px 40px;
}

/* Back button up top */
.backbar {
  position: absolute;
  top: 58px; left: 22px; right: 22px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(200, 168, 255, 0.16);
  background: rgba(40, 18, 80, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.back-btn .chev {
  width: 10px; height: 10px;
  position: relative;
}
.back-btn .chev::before {
  content: "";
  position: absolute;
  left: 2px; top: 50%;
  width: 6px; height: 6px;
  border-left: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

.page-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.credits-content {
  position: relative;
  z-index: 3;
  margin-top: 110px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  animation: contentIn 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.credits-head {
  text-align: center;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}

.credits-mark {
  width: 40px; height: 40px;
  border: 1.5px solid var(--neon-cyan);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(125,249,255,0.18), rgba(125,249,255,0.04));
  box-shadow:
    0 0 16px rgba(125,249,255,0.6),
    0 0 36px rgba(125,249,255,0.3),
    inset 0 0 12px rgba(125,249,255,0.2);
  transform: rotate(8deg);
  animation: heroBob 5s ease-in-out infinite;
}

.credits-title {
  font-size: 34px;
  font-weight: 200;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #fff;
  text-shadow:
    0 0 16px rgba(199,168,255,0.55),
    0 0 36px rgba(125,249,255,0.25);
}

.credits-tag {
  font-size: 11px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.credit-group {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.credit-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 4px 0;
  border-top: 1px solid rgba(200, 168, 255, 0.10);
}
.credit-row .role {
  flex: 0 0 96px;
  font-family: "Inter", sans-serif;
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-top: 4px;
}
.credit-row .name {
  flex: 1;
  font-size: 18px;
  font-weight: 300;
  color: var(--text-soft);
  letter-spacing: 0.005em;
  line-height: 1.25;
}
.credit-row .name .you {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--neon-mint);
  text-shadow: 0 0 10px rgba(155, 255, 212, 0.5);
}

.thanks {
  margin-top: 4px;
  padding: 22px 22px 20px;
  border-radius: 18px;
  background:
    radial-gradient(ellipse 100% 110% at 50% 0%, rgba(255, 158, 216, 0.10) 0%, transparent 70%),
    linear-gradient(180deg, rgba(40,18,80,0.5) 0%, rgba(20,8,48,0.5) 100%);
  border: 1px solid rgba(200, 168, 255, 0.14);
  text-align: center;
}
.thanks .heading {
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--neon-pink);
  text-shadow: 0 0 10px rgba(255, 158, 216, 0.5);
  margin-bottom: 10px;
}
.thanks .copy {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-soft);
  letter-spacing: 0.01em;
  max-width: 260px;
  margin: 0 auto;
  text-wrap: pretty;
}

.colophon {
  margin-top: 4px;
  text-align: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--text-faint);
  line-height: 1.7;
}
.colophon .sep {
  display: inline-block;
  margin: 0 8px;
  width: 4px; height: 4px;
  background: var(--neon-lavender);
  transform: rotate(45deg) translateY(-1px);
  box-shadow: 0 0 6px var(--neon-lavender);
}

/* ── Settings screen ────────────────────────────────────────── */

.stage.settings {
  justify-content: flex-start;
  padding: 64px 22px 40px;
  overflow-y: auto;
}

.settings-content {
  position: relative;
  z-index: 3;
  margin-top: 110px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: contentIn 1s cubic-bezier(0.22, 1, 0.36, 1) both;
  padding-bottom: 20px;
}

.section-label {
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0 6px 8px;
  border-bottom: 1px solid rgba(200, 168, 255, 0.10);
}

.s-group {
  display: flex;
  flex-direction: column;
}

.s-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 6px;
  border-bottom: 1px solid rgba(200, 168, 255, 0.08);
}
.s-row:last-child { border-bottom: none; }

.s-row .s-text {
  display: flex; flex-direction: column; gap: 3px;
  min-width: 0;
}
.s-row .s-label {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-soft);
  letter-spacing: 0.01em;
}
.s-row .s-hint {
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  line-height: 1.35;
}

/* Slider — for volume */
.s-row.with-slider {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.s-row.with-slider .head {
  display: flex; justify-content: space-between; align-items: baseline;
}
.s-row.with-slider .pct {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(125, 249, 255, 0.5);
  letter-spacing: 0.04em;
}
.slider {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 28px;
  background: transparent;
  cursor: pointer;
  --val: 60%;
}
.slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(90deg,
      var(--neon-cyan) 0%,
      var(--neon-cyan) var(--val),
      rgba(200,168,255,0.14) var(--val),
      rgba(200,168,255,0.14) 100%);
  box-shadow: 0 0 8px rgba(125, 249, 255, 0.35);
}
.slider::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(200,168,255,0.14);
}
.slider::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px rgba(125, 249, 255, 0.5);
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 4px;
  background: #fff;
  border: 1.5px solid var(--neon-cyan);
  box-shadow:
    0 0 10px rgba(125, 249, 255, 0.8),
    0 0 24px rgba(125, 249, 255, 0.4);
  margin-top: -5px;
  transform: rotate(45deg);
}
.slider::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 4px;
  background: #fff;
  border: 1.5px solid var(--neon-cyan);
  box-shadow:
    0 0 10px rgba(125, 249, 255, 0.8),
    0 0 24px rgba(125, 249, 255, 0.4);
  transform: rotate(45deg);
}

/* Toggle switch — square + neon glow */
.toggle {
  position: relative;
  width: 48px; height: 26px;
  border-radius: 13px;
  border: 1px solid rgba(200, 168, 255, 0.22);
  background: rgba(40, 18, 80, 0.5);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
  flex-shrink: 0;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 50%; left: 4px;
  width: 16px; height: 16px;
  border-radius: 4px;
  background: var(--text-dim);
  transform: translateY(-50%);
  transition: left 260ms cubic-bezier(0.22, 1, 0.36, 1), background 260ms ease, box-shadow 260ms ease;
}
.toggle.on {
  background: rgba(125, 249, 255, 0.12);
  border-color: rgba(125, 249, 255, 0.5);
  box-shadow:
    0 0 12px rgba(125, 249, 255, 0.3),
    inset 0 0 10px rgba(125, 249, 255, 0.15);
}
.toggle.on::after {
  left: 26px;
  background: var(--neon-cyan);
  box-shadow:
    0 0 8px rgba(125, 249, 255, 0.8),
    0 0 18px rgba(125, 249, 255, 0.4);
}

/* Segmented control — Theme picker */
.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid rgba(200, 168, 255, 0.18);
  background: rgba(40, 18, 80, 0.45);
  gap: 2px;
}
.segmented button {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 7px 12px;
  border-radius: 7px;
  -webkit-tap-highlight-color: transparent;
  transition: color 220ms ease, background 220ms ease;
}
.segmented button.active {
  background: rgba(125, 249, 255, 0.14);
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(125, 249, 255, 0.6);
}

/* Disclosure row */
.s-row.disclosure {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.s-row.disclosure .chev-right {
  width: 8px; height: 8px;
  border-right: 1px solid var(--text-faint);
  border-top: 1px solid var(--text-faint);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.s-row.disclosure .val {
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

/* Danger row */
.s-row.danger .s-label { color: var(--neon-pink); text-shadow: 0 0 8px rgba(255, 158, 216, 0.35); }
.s-row.danger .chev-right { border-color: var(--neon-pink); }

/* Build info pinned at bottom of scroll */
.build-info {
  text-align: center;
  margin-top: 6px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--text-faint);
}

.menu .content {
  gap: 36px;
}

.icon-replay {
  width: 14px;
  height: 14px;
  position: relative;
  filter: drop-shadow(0 0 6px currentColor);
}
.icon-replay::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(45deg);
}
.icon-replay::after {
  content: "";
  position: absolute;
  top: -2px; right: -1px;
  width: 0; height: 0;
  border-left: 5px solid currentColor;
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
}

.btn .arrow {
  width: 14px;
  height: 1px;
  background: currentColor;
  position: relative;
  transition: transform 220ms ease;
}
.btn .arrow::after {
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 6px; height: 6px;
  border-right: 1px solid currentColor;
  border-top: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}
.btn:active .arrow { transform: translateX(3px); }
