/* ============================================================
   WERCH — Deep Dive Casino
   Design tokens adapted from UI/UX Pro Max (oceanic + neon HUD)
   ============================================================ */
:root {
  /* Ocean depth palette */
  --sea-0:   #071c2e;   /* surface */
  --sea-1:   #04121f;   /* mid */
  --sea-2:   #020a13;   /* deep */
  --sea-3:   #01060c;   /* abyss */

  --cyan:    #22d3ee;
  --cyan-2:  #38f0d6;
  --aqua:    #4fd8e8;
  --gold:    #ffd54a;
  --gold-2:  #ffb020;
  --danger:  #ff4d5e;
  --danger-2:#b3122a;
  --success: #37e08f;

  --fg:      #eaf6ff;
  --fg-dim:  #93b2c7;
  --fg-mute: #5c7a90;

  --panel:   rgba(8, 26, 42, 0.82);
  --panel-b: rgba(120, 220, 255, 0.14);
  --glass:   rgba(10, 32, 52, 0.55);

  --radius:  18px;
  --radius-s:12px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io:  cubic-bezier(0.65, 0, 0.35, 1);

  --font-disp: 'Orbitron', ui-sans-serif, system-ui, sans-serif;
  --font-ui:   'Rajdhani', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  color: var(--fg);
  background: var(--sea-1);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.2px;
}

/* Deep gradient sits under everything and darkens with page depth */
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, #0b3350 0%, transparent 55%),
    linear-gradient(180deg, var(--sea-0) 0%, var(--sea-1) 30%, var(--sea-2) 62%, var(--sea-3) 100%);
  z-index: -3;
}

#ambient {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: -2;
  pointer-events: none;
}

.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5em;
  font-family: var(--font-disp);
  font-weight: 700;
  letter-spacing: 1.5px;
  font-size: .92rem;
  padding: 15px 30px;
  border: none; border-radius: 999px;
  cursor: pointer;
  color: var(--sea-2);
  text-decoration: none;
  overflow: hidden;
  transition: transform .2s var(--ease-out), box-shadow .3s var(--ease-out), filter .2s;
  user-select: none;
}
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.btn-primary {
  background: linear-gradient(120deg, var(--cyan) 0%, var(--cyan-2) 50%, var(--aqua) 100%);
  box-shadow: 0 8px 30px rgba(34,211,238,.35), inset 0 1px 0 rgba(255,255,255,.5);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 14px 44px rgba(34,211,238,.5); }
.btn-primary:active { transform: translateY(0) scale(.99); }
.btn.big { font-size: 1.15rem; padding: 20px 46px; }
.btn.full { width: 100%; }

.btn-glow {
  position: absolute; top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.6), transparent);
  transform: skewX(-20deg);
  animation: sheen 3.2s var(--ease-io) infinite;
}
@keyframes sheen { 0%,60% { left: -60%; } 100% { left: 130%; } }

.btn-ghost {
  background: transparent; color: var(--fg);
  border: 1px solid var(--panel-b);
  box-shadow: none;
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }

.btn-cash {
  background: linear-gradient(120deg, var(--gold) 0%, var(--gold-2) 100%);
  color: #2a1a00;
  box-shadow: 0 8px 30px rgba(255,176,32,.4), inset 0 1px 0 rgba(255,255,255,.6);
  font-size: 1.05rem; padding: 17px 34px;
}
.btn-cash:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 14px 46px rgba(255,176,32,.6); }
.btn-cash:disabled { filter: grayscale(.6) brightness(.7); cursor: not-allowed; transform: none; }

.link-btn {
  background: none; border: none; color: var(--fg-dim);
  font-family: var(--font-ui); font-size: .95rem; cursor: pointer;
  padding: 8px; transition: color .2s;
}
.link-btn:hover { color: var(--cyan); }

/* ============================================================
   LANDING
   ============================================================ */
#landing { position: relative; z-index: 1; }

/* Reveal-on-scroll. Content is visible by default; it only hides once JS is
   confirmed alive (html.js), so a JS failure can never leave the page blank. */
.reveal { transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.js .reveal { opacity: 0; transform: translateY(38px); }
.reveal.in { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---- Topbar ---- */
.topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(18px, 5vw, 60px);
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-name {
  font-family: var(--font-disp); font-weight: 900; font-size: 1.5rem;
  letter-spacing: 4px;
  background: linear-gradient(120deg, #fff, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-mark {
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--cyan) 45%, #0a5a72 100%);
  box-shadow: 0 0 18px var(--cyan), inset 0 0 8px rgba(255,255,255,.6);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: -6px;
  border: 1px solid rgba(34,211,238,.4); border-radius: 50%;
  animation: pulse 2.6s var(--ease-io) infinite;
}
.brand-mark.small { width: 20px; height: 20px; }
@keyframes pulse { 0% { transform: scale(1); opacity: .8;} 100% { transform: scale(1.5); opacity: 0; } }

.topbar-right { display: flex; align-items: center; gap: 16px; }
.btn-sm { padding: 9px 18px; font-size: .72rem; }
.topbar-balance { text-align: right; font-family: var(--font-disp); }
.tb-label { display: block; font-size: .62rem; letter-spacing: 3px; color: var(--fg-mute); }
.tb-value { font-size: 1.25rem; font-weight: 700; color: var(--gold); text-shadow: 0 0 16px rgba(255,213,74,.4); }
.tb-unit { font-size: .8em; margin-left: 2px; opacity: .8; }

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 20px 60px;
  overflow: hidden;
}
.light-rays {
  position: absolute; top: -10%; left: 50%; transform: translateX(-50%);
  width: 140%; height: 90%;
  background:
    conic-gradient(from 180deg at 50% 0%,
      transparent 0deg, rgba(120,220,255,.10) 8deg, transparent 16deg,
      transparent 30deg, rgba(120,220,255,.07) 40deg, transparent 50deg,
      transparent 66deg, rgba(120,220,255,.12) 76deg, transparent 86deg);
  filter: blur(6px);
  animation: rays 12s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes rays { from { transform: translateX(-50%) rotate(-4deg);} to { transform: translateX(-50%) rotate(4deg);} }

.hero-inner { position: relative; z-index: 3; max-width: 820px; }
.eyebrow {
  font-family: var(--font-disp); letter-spacing: 8px; font-size: .8rem;
  color: var(--cyan); margin-bottom: 22px; text-shadow: 0 0 20px rgba(34,211,238,.5);
}
.hero-title {
  font-family: var(--font-disp); font-weight: 900;
  font-size: clamp(2.6rem, 9vw, 6rem);
  line-height: .98; letter-spacing: 2px; margin-bottom: 26px;
}
.hero-title .line { display: block; }
.hero-title .grad {
  background: linear-gradient(120deg, var(--cyan) 0%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 30px rgba(34,211,238,.3));
}
.hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.28rem);
  color: var(--fg-dim); max-width: 620px; margin: 0 auto 38px; line-height: 1.55;
}
.hero-sub b { color: var(--fg); }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.scroll-hint {
  margin-top: 64px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--fg-mute); font-size: .72rem; letter-spacing: 3px; text-transform: uppercase;
}
.mouse {
  width: 24px; height: 40px; border: 2px solid var(--fg-mute); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 7px;
}
.wheel { width: 4px; height: 8px; border-radius: 2px; background: var(--cyan); animation: wheel 1.6s var(--ease-io) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1;} 70% { transform: translateY(12px); opacity: 0;} 100% { opacity: 0; } }

/* drifting diver */
.hero-diver {
  position: absolute; right: 8%; top: 32%;
  width: 90px; height: 120px; opacity: .9;
  animation: drift 9s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(34,211,238,.35));
}
.diver-body {
  position: absolute; left: 20px; top: 20px;
  width: 46px; height: 74px; border-radius: 40% 40% 46% 46%;
  background: linear-gradient(160deg, #123a52, #0a2233);
  border: 2px solid rgba(120,220,255,.4);
}
.diver-body::after { /* helmet glass */
  content: ""; position: absolute; top: 8px; left: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(180,240,255,.9), rgba(34,211,238,.35) 60%, transparent);
}
.diver-tank { position: absolute; right: 14px; top: 26px; width: 12px; height: 40px; border-radius: 8px; background: linear-gradient(#2a5f75, #103042); }
.diver-fin { position: absolute; left: 24px; bottom: 6px; width: 40px; height: 22px; border-radius: 0 0 60% 60%; background: linear-gradient(#0e2c3f, #0a2233); }
@keyframes drift { 0%,100% { transform: translateY(0) rotate(-3deg);} 50% { transform: translateY(-26px) rotate(3deg);} }
@media (max-width: 720px){ .hero-diver { display: none; } }

/* ---- Depth story ---- */
.story {
  position: relative;
  max-width: 1000px; margin: 0 auto;
  padding: clamp(60px, 12vh, 140px) 20px;
}
/* Scroll timeline: a dim track; a glowing fill grows with scroll and a spark rides its tip.
   Cards ignite (fly in from the sides) as the spark passes their node. */
.depth-line {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(148,190,215,.18) 10%, rgba(148,190,215,.18) 90%, transparent);
}
.dl-fill {
  /* full-height gradient pinned to the TRACK, revealed by a clip that follows --dlp:
     the beam is cyan in the shallow zone and turns gold only near the bottom, instead of
     dragging a stretched gold tip everywhere. Negative side insets keep the glow un-clipped. */
  position: absolute; left: -0.5px; top: 0; width: 3px; height: 100%;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(34,211,238,0), var(--cyan) 26%, var(--cyan-2) 68%, var(--gold));
  clip-path: inset(0 0 calc(100% - var(--dlp, 0%)) 0);
  /* drop-shadow runs AFTER clip-path, so the glow hugs the revealed beam — a clipped
     box-shadow left a visible rectangular seam of light at the tip */
  filter: drop-shadow(0 0 5px rgba(34,211,238,.6)) drop-shadow(0 0 15px rgba(34,211,238,.3));
}
.dl-spark {
  position: absolute; left: 50%; top: var(--dlp, 0%); width: 12px; height: 12px;
  transform: translate(-50%, -45%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #fff 0%, var(--cyan-2) 38%, rgba(34,211,238,0) 72%);
  box-shadow: 0 0 14px 4px rgba(56,240,214,.6), 0 0 36px 12px rgba(34,211,238,.28);
  animation: sparkPulse 1.5s ease-in-out infinite;
}
.dl-spark::after {                       /* faint tail trailing up the lit part of the line */
  content: ''; position: absolute; left: 50%; bottom: 9px;
  width: 2px; height: 30px; transform: translateX(-50%);
  background: linear-gradient(0deg, rgba(56,240,214,.55), transparent);
}
@keyframes sparkPulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.6); } }

.ds-node {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: 12px; height: 12px; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #0b2233; border: 2px solid rgba(148,190,215,.35);
  transition: background .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.ds-node::after {                         /* ignition ripple */
  content: ''; position: absolute; inset: -8px; border-radius: 50%;
  border: 1px solid rgba(34,211,238,.65); opacity: 0; transform: scale(.4);
}
.story-step.lit .ds-node { background: var(--cyan); border-color: #d8fbff; box-shadow: 0 0 16px rgba(34,211,238,.85); }
.story-step.danger.lit .ds-node { background: var(--danger); border-color: #ffd9dd; box-shadow: 0 0 16px rgba(255,77,94,.85); }
.story-step.danger.lit .ds-node::after { border-color: rgba(255,77,94,.6); }
.story-step.gold.lit .ds-node { background: var(--gold); border-color: #fff3c8; box-shadow: 0 0 16px rgba(255,213,74,.85); }
.story-step.gold.lit .ds-node::after { border-color: rgba(255,213,74,.6); }
.story-step.lit .ds-node::after { animation: nodeRing .75s var(--ease-out) forwards; }
@keyframes nodeRing { from { opacity: .9; transform: scale(.4); } to { opacity: 0; transform: scale(1.6); } }

/* armed by JS only — with no JS the section simply stays visible (failsafe by construction) */
.story.tl-armed .ds-card, .story.tl-armed .ds-marker {
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out), border-color .3s;
}
.story.tl-armed .story-step:not(.lit) .ds-card   { opacity: 0; transform: translateX(72px); }
.story.tl-armed .story-step:nth-child(even):not(.lit) .ds-card   { transform: translateX(-72px); }
.story.tl-armed .story-step:not(.lit) .ds-marker { opacity: 0; transform: translateX(-48px); }
.story.tl-armed .story-step:nth-child(even):not(.lit) .ds-marker { transform: translateX(48px); }

/* day theme: waiting nodes become light hollow rings, markers get ink that survives the pale sky */
:root[data-theme="day"] .ds-node { background: #dcedf6; border-color: rgba(12,92,130,.4); }
:root[data-theme="day"] .ds-marker { color: #0a6e8f; opacity: .8; text-shadow: none; }
:root[data-theme="day"] .story-step.gold .ds-marker { color: #a87900; }
:root[data-theme="day"] .story-step.danger .ds-marker { color: #d92638; }
.story-step {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  gap: 30px; margin: 40px 0;
}
.story-step:nth-child(even) .ds-marker { order: 2; text-align: left; }
.story-step:nth-child(even) .ds-card { order: 1; text-align: right; }
.ds-marker {
  font-family: var(--font-disp); font-weight: 900; font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--cyan); text-align: right; opacity: .55;
  text-shadow: 0 0 24px rgba(34,211,238,.35);
}
.ds-card {
  background: var(--glass);
  border: 1px solid var(--panel-b);
  border-radius: var(--radius);
  padding: 26px 28px;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  transition: transform .3s var(--ease-out), border-color .3s;
}
.ds-card:hover { transform: translateY(-4px); border-color: rgba(34,211,238,.5); }
.ds-card h3 { font-family: var(--font-disp); font-size: 1.2rem; margin-bottom: 8px; letter-spacing: .5px; }
.ds-card p { color: var(--fg-dim); line-height: 1.5; }
.story-step.danger .ds-marker { color: var(--danger); text-shadow: 0 0 24px rgba(255,77,94,.4); }
.story-step.danger .ds-card:hover { border-color: rgba(255,77,94,.5); }
.story-step.gold .ds-marker { color: var(--gold); text-shadow: 0 0 24px rgba(255,213,74,.4); }
.story-step.gold .ds-card:hover { border-color: rgba(255,213,74,.55); }

@media (max-width: 680px) {
  .story-step, .story-step:nth-child(even) .ds-marker, .story-step:nth-child(even) .ds-card {
    grid-template-columns: 1fr; text-align: left !important; order: unset !important;
  }
  .depth-line { left: 16px; }
  .ds-marker { text-align: left; }
  .ds-node { left: 16px; margin-left: -20px; }   /* section padding is 20px — node lands ON the moved line */
  /* single column: everything slides in from the right, markers from the left */
  .story.tl-armed .story-step:not(.lit) .ds-card,
  .story.tl-armed .story-step:nth-child(even):not(.lit) .ds-card   { transform: translateX(46px); }
  .story.tl-armed .story-step:not(.lit) .ds-marker,
  .story.tl-armed .story-step:nth-child(even):not(.lit) .ds-marker { transform: translateX(-28px); }
}

/* ---- Final CTA ---- */
.final-cta {
  text-align: center; padding: clamp(80px, 16vh, 180px) 20px 40px;
  position: relative;
}
.fc-inner h2 { font-family: var(--font-disp); font-size: clamp(2rem, 6vw, 3.4rem); margin-bottom: 12px; letter-spacing: 1px; }
.fc-inner p { color: var(--fg-dim); font-size: 1.15rem; margin-bottom: 34px; }
.site-foot { margin-top: 90px; color: var(--fg-mute); font-size: .82rem; letter-spacing: .5px; }
.site-foot span:first-child { font-family: var(--font-disp); color: var(--fg-dim); letter-spacing: 2px; }
.foot-dim { opacity: .7; }

/* ============================================================
   GAME
   ============================================================ */
.game {
  position: fixed; inset: 0; z-index: 50;
  background: var(--sea-2);
  overflow: hidden;
}
#stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }

/* HUD */
.hud { position: absolute; left: 0; right: 0; z-index: 3; pointer-events: none; }
.hud-top {
  top: 0; display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; padding: 18px clamp(14px, 3vw, 30px);
}
.hud-left { display: flex; gap: 12px; flex-wrap: wrap; }
.gauge {
  background: var(--panel); border: 1px solid var(--panel-b);
  border-radius: var(--radius-s); padding: 8px 16px; min-width: 92px;
  backdrop-filter: blur(8px);
}
.g-label { display: block; font-size: .58rem; letter-spacing: 2.5px; color: var(--fg-mute); font-family: var(--font-disp); }
.g-value { font-family: var(--font-disp); font-weight: 700; font-size: 1.4rem; }
.g-value small { font-size: .55em; color: var(--fg-dim); margin-left: 2px; }
.g-value.mult { color: var(--cyan); text-shadow: 0 0 16px rgba(34,211,238,.5); }
.g-value.gold { color: var(--gold); text-shadow: 0 0 16px rgba(255,213,74,.45); }

.hud-right { display: flex; flex-direction: column; gap: 8px; min-width: 160px; align-items: flex-end; }
.next-bunker {
  background: var(--panel); border: 1px solid var(--panel-b);
  border-radius: var(--radius-s); padding: 8px 16px; backdrop-filter: blur(8px); text-align: right;
}
.nb-label { display: block; font-size: .56rem; letter-spacing: 2.5px; color: var(--fg-mute); font-family: var(--font-disp); }
.nb-value { font-family: var(--font-disp); font-weight: 700; font-size: 1.3rem; color: var(--success); text-shadow: 0 0 14px rgba(55,224,143,.4); }
.air-flag {
  font-family: var(--font-disp); font-size: .58rem; letter-spacing: 2px; color: var(--danger);
  border: 1px dashed rgba(255,77,94,.5); border-radius: 999px; padding: 4px 12px; opacity: .85;
}

/* Bottom HUD — the single bunker-gated cash button */
.hud-bottom {
  bottom: 0; display: flex; justify-content: center; align-items: center;
  gap: 16px; padding: 18px clamp(14px, 3vw, 30px);
}
.btn-cash { pointer-events: auto; min-width: 280px; justify-content: center; }
.btn-cash.ready { animation: cashPulse 0.85s ease-in-out infinite; }
@keyframes cashPulse { 0%,100% { box-shadow: 0 8px 30px rgba(255,176,32,.45);} 50% { box-shadow: 0 10px 48px rgba(255,176,32,.9);} }
.cash-main { font-weight: 800; }

/* passive "collected so far" readout (auto cash-out at the vault — no manual button) */
.collect-box {
  pointer-events: none; display: flex; align-items: center; justify-content: center;
  min-width: 300px; padding: 13px 24px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--panel-b); backdrop-filter: blur(8px);
  font-family: var(--font-disp); font-weight: 700; letter-spacing: .5px; color: var(--fg-dim);
  transition: color .2s, border-color .2s, box-shadow .2s;
}
.collect-box.good { color: var(--success); border-color: rgba(55,224,143,.55); box-shadow: 0 8px 30px rgba(55,224,143,.28); }
.collect-box.stole { color: var(--danger); border-color: rgba(255,77,94,.6); }

/* Jump button (surface phase — the manual dive start) */
.btn-jump {
  pointer-events: auto;
  background: linear-gradient(120deg, var(--success) 0%, #22d3ee 100%);
  color: #04121f; font-size: 1.05rem; padding: 17px 34px;
  box-shadow: 0 8px 30px rgba(55,224,143,.4), inset 0 1px 0 rgba(255,255,255,.6);
  animation: jumpPulse 1.4s ease-in-out infinite;
}
.btn-jump:hover { transform: translateY(-2px) scale(1.03); }
@keyframes jumpPulse { 0%,100% { box-shadow: 0 8px 30px rgba(55,224,143,.4);} 50% { box-shadow: 0 8px 40px rgba(55,224,143,.75);} }
.key-badge {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 6px;
  background: rgba(0,0,0,.22); font-family: var(--font-ui); font-size: .72em; font-weight: 700;
  border: 1px solid rgba(0,0,0,.25);
}
.key-badge.dark { background: rgba(0,0,0,.3); }

/* Skin picker (bet overlay) */
.skin-picker { margin-bottom: 20px; }
.sp-label { display: block; font-size: .62rem; letter-spacing: 2.5px; color: var(--fg-mute); font-family: var(--font-disp); margin-bottom: 8px; }
.skin-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.skin {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 8px 2px; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid var(--panel-b); color: var(--fg-mute);
  font-family: var(--font-ui); font-size: .68rem; transition: all .18s;
}
.skin:hover { border-color: rgba(34,211,238,.5); color: var(--fg-dim); }
.skin.active { border-color: var(--cyan); background: rgba(34,211,238,.12); color: var(--fg); }
.skin-dot { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 6px rgba(0,0,0,.4); }

/* Story icons — pop in on reveal */
.ds-icon {
  display: inline-flex; width: 44px; height: 44px; margin-bottom: 12px;
  align-items: center; justify-content: center; border-radius: 12px;
  background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.3); color: var(--cyan);
  /* visible by default — hidden ONLY once JS arms the section, so no-JS never loses the icons */
}
.story.tl-armed .story-step:not(.lit) .ds-icon { transform: scale(0) rotate(-20deg); animation: none; }
.ds-icon svg { width: 24px; height: 24px; }
.reveal.in .ds-icon, .story-step.lit .ds-icon { animation: iconPop .6s var(--ease-out) .15s forwards; }
@keyframes iconPop { 0% { transform: scale(0) rotate(-20deg);} 60% { transform: scale(1.25) rotate(6deg);} 100% { transform: scale(1) rotate(0);} }
.story-step.danger .ds-icon { background: rgba(255,77,94,.1); border-color: rgba(255,77,94,.35); color: var(--danger); }
.story-step.gold .ds-icon { background: rgba(255,213,74,.1); border-color: rgba(255,213,74,.35); color: var(--gold); }
.story-step:nth-child(even) .ds-card { display: flex; flex-direction: column; align-items: flex-end; }
@media (prefers-reduced-motion: reduce) {
  .ds-icon, .story-step.lit .ds-icon { animation: none; transform: none; }
  .reveal.in .ds-icon { animation: none; }
  .story-step.lit .ds-node::after { animation: none; }
  .dl-spark, .dl-spark::after { animation: none; display: none; }   /* static line, no pulsing comet */
}
@media (max-width: 680px) { .story-step:nth-child(even) .ds-card { align-items: flex-start; } }

/* Controls / How to play */
.controls { max-width: 1000px; margin: 0 auto; padding: clamp(40px, 8vh, 90px) 20px; text-align: center; }
.controls .eyebrow { margin-bottom: 14px; }
.controls h2 { font-family: var(--font-disp); font-size: clamp(1.8rem, 5vw, 3rem); margin-bottom: 40px; }
.controls-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 30px; }
.ctrl-card {
  background: var(--glass); border: 1px solid var(--panel-b); border-radius: var(--radius);
  padding: 24px 20px; backdrop-filter: blur(10px); transition: transform .3s var(--ease-out), border-color .3s;
}
.ctrl-card:hover { transform: translateY(-4px); border-color: rgba(34,211,238,.5); }
.ctrl-card.danger:hover { border-color: rgba(255,77,94,.5); }
.ctrl-card h4 { font-family: var(--font-disp); font-size: 1rem; margin: 14px 0 8px; }
.ctrl-card p { color: var(--fg-dim); font-size: .9rem; line-height: 1.5; }
.keys { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; min-height: 74px; align-items: center; }
.key {
  min-width: 40px; height: 40px; padding: 0 10px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-disp); font-weight: 700; font-size: 1rem; color: var(--fg);
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.03));
  border: 1px solid var(--panel-b); box-shadow: 0 3px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.15);
}
.key.wide { min-width: 120px; }
.key.esc { color: var(--danger); }
.controls-note { color: var(--fg-dim); max-width: 640px; margin: 0 auto 26px; line-height: 1.6; }
.controls-note b { color: var(--danger); }

.game-exit {
  position: absolute; top: 16px; right: 50%; transform: translateX(50%);
  z-index: 6; width: 42px; height: 42px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--panel-b); color: var(--fg-dim);
  font-size: 1.1rem; cursor: pointer; backdrop-filter: blur(8px); transition: all .2s;
  display: flex; align-items: center; justify-content: center;
}
.game-exit:hover { color: var(--danger); border-color: var(--danger); transform: translateX(50%) scale(1.08); }
/* ---- volume control: BE-UI range slider (ported from 21st.dev @saurabh10102) ---- */
.vol-ctl {
  position: fixed; bottom: 18px; right: 18px; z-index: 75;   /* floats over the landing AND the game */
  display: flex; flex-direction: column; gap: 6px;           /* two channels: music + effects */
  padding: 9px 12px 9px 30px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--panel-b); backdrop-filter: blur(8px);
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
  /* paper-glide: the pill slides off-screen leaving only its tab, with a soft settle */
  transition: transform .65s cubic-bezier(.22, .95, .25, 1);
  will-change: transform;
}
.vol-ctl.tucked { transform: translateX(calc(100% - 26px)) rotate(.4deg); }
.vol-tuck {
  position: absolute; left: 0; top: 0; bottom: 0; width: 26px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.04); border: none; border-right: 1px solid var(--panel-b);
  border-radius: 16px 0 0 16px; cursor: pointer;
  color: var(--fg-mute); font-size: .72rem; transition: color .2s, transform .65s cubic-bezier(.22, .95, .25, 1);
}
.vol-tuck:hover { color: var(--cyan); }
.vol-ctl.tucked .vol-tuck { transform: scaleX(-1); }   /* the chevron flips to point back out */
@media (max-width: 640px) {                             /* compact on phones */
  .vol-ctl { bottom: 12px; right: 12px; gap: 5px; }
  .beui-slider { width: 92px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) { .vol-ctl, .vol-tuck { transition: none !important; } }
.vol-row { display: flex; align-items: center; gap: 8px; }
.vol-ic { font-size: .85rem; width: 1.25em; text-align: center; user-select: none; }
.vol-name { font-family: var(--font-ui); font-size: .74rem; color: var(--fg-dim); min-width: 66px; }
.mv-sound { display: flex; flex-direction: column; gap: 10px; }
.beui-slider {
  position: relative; width: 118px; height: 24px; border-radius: 8px;
  background: rgba(255,255,255,.07); overflow: hidden;
  cursor: grab; touch-action: none; user-select: none; outline: none;
}
.beui-slider.wide { flex: 1; width: auto; height: 30px; border-radius: 9px; }
.beui-slider.active { cursor: grabbing; }
.beui-slider:focus-visible { box-shadow: 0 0 0 3px rgba(34,211,238,.3); }
.bs-fill {
  position: absolute; inset: 0 auto 0 0; width: 70%;
  background: rgba(34,211,238,.20);
  transition: width .18s cubic-bezier(.3, 1.2, .5, 1);
}
.beui-slider.active .bs-fill { transition: none; }
.bs-tick {
  position: absolute; top: 50%; width: 4px; height: 4px; border-radius: 50%;
  background: rgba(230,245,255,.22); transform: translate(-50%, -50%); pointer-events: none;
}
.bs-thumb {
  position: absolute; top: 50%; left: 70%; width: 6px; height: 16px; border-radius: 3px;
  background: var(--cyan); box-shadow: 0 0 10px rgba(34,211,238,.7), 0 1px 2px rgba(0,0,0,.5);
  transform: translate(var(--tx, -70%), -50%) scaleY(1);
  transition: left .18s cubic-bezier(.3, 1.2, .5, 1), transform .22s cubic-bezier(.34, 1.56, .64, 1);
  pointer-events: none;
}
.beui-slider.active .bs-thumb { transform: translate(var(--tx, -70%), -50%) scaleY(1.35); transition: transform .22s cubic-bezier(.34, 1.56, .64, 1); }
@media (prefers-reduced-motion: reduce) { .bs-fill, .bs-thumb { transition: none !important; } }

/* Overlays (bet + result) */
.overlay {
  position: absolute; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: radial-gradient(120% 100% at 50% 0%, rgba(4,18,31,.72), rgba(1,6,12,.92));
  backdrop-filter: blur(6px);
  animation: fadein .35s var(--ease-out);
}
.overlay.hidden { display: none; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.panel {
  width: min(440px, 100%);
  background: linear-gradient(180deg, rgba(12,36,58,.95), rgba(6,20,34,.97));
  border: 1px solid var(--panel-b);
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 30px 90px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06);
  animation: pop .45s var(--ease-out);
}
@keyframes pop { from { transform: translateY(20px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.panel-head h2 { font-family: var(--font-disp); font-size: 1.5rem; letter-spacing: 1px; }

.balance-row { display: flex; justify-content: space-between; align-items: center; color: var(--fg-dim); margin-bottom: 18px; font-size: 1.05rem; }
.balance-row b { color: var(--gold); font-family: var(--font-disp); font-size: 1.2rem; }

.bet-input { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.bet-input input {
  flex: 1; text-align: center;
  font-family: var(--font-disp); font-size: 1.8rem; font-weight: 700; color: var(--fg);
  background: rgba(0,0,0,.3); border: 1px solid var(--panel-b); border-radius: 12px;
  padding: 12px; outline: none;
}
.bet-input input:focus { border-color: var(--cyan); }
.bet-input input::-webkit-outer-spin-button, .bet-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bet-input input[type=number] { -moz-appearance: textfield; }
.step {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  background: rgba(255,255,255,.06); border: 1px solid var(--panel-b);
  color: var(--fg); font-size: 1.6rem; cursor: pointer; transition: all .2s;
}
.step:hover { background: rgba(34,211,238,.15); border-color: var(--cyan); color: var(--cyan); }

.chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 22px; }
.chip {
  padding: 11px 0; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid var(--panel-b);
  color: var(--fg-dim); font-family: var(--font-disp); font-weight: 700; font-size: .9rem;
  transition: all .18s;
}
.chip:hover, .chip.active { background: rgba(34,211,238,.16); border-color: var(--cyan); color: var(--fg); transform: translateY(-2px); }

.hint { margin: 18px 0 6px; color: var(--fg-mute); font-size: .86rem; line-height: 1.45; text-align: center; }
.hint b { color: var(--fg-dim); }

/* Result panel */
.panel.result { text-align: center; }
.res-icon { font-size: 3rem; margin-bottom: 8px; line-height: 1; }
.panel.result h2 { font-family: var(--font-disp); font-size: 1.9rem; margin-bottom: 6px; }
.res-text { color: var(--fg-dim); margin-bottom: 16px; }
.res-amount {
  font-family: var(--font-disp); font-weight: 900; font-size: 2.8rem;
  margin: 6px 0 18px; letter-spacing: 1px;
}
.res-win .res-amount { color: var(--gold); text-shadow: 0 0 30px rgba(255,213,74,.5); }
.res-lose .res-amount { color: var(--danger); text-shadow: 0 0 30px rgba(255,77,94,.4); }
.res-win .res-icon { color: var(--gold); filter: drop-shadow(0 0 20px rgba(255,213,74,.6)); }
.res-lose .res-icon { color: var(--danger); }
.res-stats { display: flex; justify-content: center; gap: 22px; margin-bottom: 22px; color: var(--fg-mute); font-size: .88rem; }
.res-stats b { display: block; font-family: var(--font-disp); color: var(--fg); font-size: 1.1rem; }
.res-actions { display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 560px) {
  .hud-right { min-width: 150px; }
  .g-value { font-size: 1.1rem; }
  .gauge { min-width: 76px; padding: 7px 12px; }
  .wb-value { font-size: 1.4rem; }
  .btn-cash { padding: 14px 20px; font-size: .95rem; }
}

/* ============================================================
   CASHIER (payment sandbox)
   ============================================================ */
.cashier-overlay { z-index: 80; }
.foot-link, .foot-link:visited { color: var(--fg-mute); text-decoration: none; border-bottom: 1px dotted rgba(120,220,255,.3); }
.foot-link:hover { color: var(--cyan); }

.panel.cashier { position: relative; width: min(460px, 100%); max-height: 92vh; overflow-y: auto; }
.panel-x {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.06); border: 1px solid var(--panel-b); color: var(--fg-dim);
  cursor: pointer; font-size: 1rem; transition: all .2s;
}
.panel-x:hover { color: var(--danger); border-color: var(--danger); }
/* back link in the top-left of a panel (bet screen → landing) */
.panel-back {
  position: absolute; top: 14px; left: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-ui); font-size: .86rem; color: var(--fg-mute); transition: color .2s;
}
.panel-back:hover { color: var(--cyan); }

.sandbox-badge {
  font-family: var(--font-disp); font-size: .58rem; letter-spacing: 2px; font-weight: 700;
  color: #ffcf5a; background: rgba(255,176,32,.12); border: 1px solid rgba(255,176,32,.4);
  padding: 4px 8px; border-radius: 6px; margin-left: auto; margin-right: 40px;
}
.cashier-balance {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(0,0,0,.25); border: 1px solid var(--panel-b); border-radius: 12px;
  padding: 12px 18px; margin-bottom: 18px; color: var(--fg-dim);
}
.cashier-balance b { font-family: var(--font-disp); font-size: 1.4rem; color: var(--gold); }

.tabs { display: flex; gap: 6px; background: rgba(0,0,0,.25); border-radius: 12px; padding: 5px; margin-bottom: 20px; }
.tab {
  flex: 1; padding: 10px; border-radius: 8px; border: none; cursor: pointer;
  background: transparent; color: var(--fg-dim); font-family: var(--font-ui); font-weight: 600; font-size: .95rem;
  transition: all .2s;
}
.tab.active { background: rgba(34,211,238,.16); color: var(--fg); }

.methods { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 16px; }
.method {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 6px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid var(--panel-b); color: var(--fg-dim);
  font-family: var(--font-ui); font-weight: 600; font-size: .9rem; transition: all .18s;
}
.method .m-ic { font-size: 1.4rem; }
.method:hover { border-color: rgba(34,211,238,.5); }
.method.active { background: rgba(34,211,238,.14); border-color: var(--cyan); color: var(--fg); }

.amount-chips { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 14px; }
.achip {
  padding: 12px 0; border-radius: 10px; cursor: pointer; min-height: 44px;
  background: rgba(255,255,255,.05); border: 1px solid var(--panel-b);
  color: var(--fg-dim); font-family: var(--font-disp); font-weight: 700; font-size: .85rem; transition: all .18s;
}
.achip:hover { background: rgba(34,211,238,.16); border-color: var(--cyan); color: var(--fg); transform: translateY(-2px); }
.achip.wd-all { color: var(--gold); border-color: rgba(255,213,74,.4); }

.field { margin-bottom: 12px; position: relative; }
.field label { display: block; font-size: .72rem; letter-spacing: 1px; color: var(--fg-mute); margin-bottom: 6px; font-family: var(--font-disp); text-transform: uppercase; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: rgba(0,0,0,.3); border: 1px solid var(--panel-b); color: var(--fg);
  font-family: var(--font-ui); font-size: 1.05rem; outline: none; transition: border-color .2s;
}
.field input:focus, .field select:focus { border-color: var(--cyan); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cc-brand { position: absolute; right: 12px; top: 34px; font-family: var(--font-disp); font-weight: 700; font-size: .8rem; color: var(--cyan); letter-spacing: 1px; }

.crypto-addr { background: rgba(0,0,0,.3); border: 1px dashed var(--panel-b); border-radius: 10px; padding: 12px 14px; }
.crypto-addr span { display: block; font-size: .72rem; color: var(--fg-mute); margin-bottom: 6px; }
.crypto-addr code { font-family: 'JetBrains Mono', monospace; color: var(--cyan); word-break: break-all; font-size: .9rem; }

.pay-form { margin-bottom: 6px; }
.sandbox-note { margin-top: 14px; font-size: .78rem; color: var(--fg-mute); line-height: 1.5; text-align: center; }
.sandbox-note code { color: var(--cyan); font-family: 'JetBrains Mono', monospace; font-size: .9em; }

.history-list { display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.history-list .empty { text-align: center; color: var(--fg-mute); padding: 30px 0; }
.hrow { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.05); }
.h-l b { display: block; font-size: .95rem; }
.h-l span { font-size: .74rem; color: var(--fg-mute); }
.h-a { font-family: var(--font-disp); font-weight: 700; }
.h-a.pos { color: var(--success); }
.h-a.neg { color: var(--fg-dim); }

.pay-status {
  position: absolute; inset: 0; z-index: 5; border-radius: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: rgba(4,18,31,.92); backdrop-filter: blur(6px);
}
.pay-spinner { width: 54px; height: 54px; border-radius: 50%; border: 4px solid rgba(34,211,238,.2); border-top-color: var(--cyan); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pay-check { width: 54px; height: 54px; border-radius: 50%; background: var(--success); color: #04121f; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 700; animation: pop .4s var(--ease-out); }
.pay-status p { color: var(--fg-dim); font-size: 1.05rem; }

@media (max-width: 480px) {
  .methods { grid-template-columns: repeat(3,1fr); }
  .panel.cashier { padding: 22px; }
  .sandbox-badge { margin-right: 44px; }
}

/* ============================================================
   THEME SWITCH (day / night)
   ============================================================ */
.theme-switch {
  --ts-w: 62px; --ts-h: 30px; --ts-pad: 4px;
  appearance: none; -webkit-appearance: none;
  border: none; background: none; padding: 0; margin: 0;
  cursor: pointer; line-height: 0;
  border-radius: 999px;
}
.theme-switch:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.ts-track {
  position: relative; display: block;
  width: var(--ts-w); height: var(--ts-h);
  border-radius: 999px;
  border: 1px solid var(--panel-b);
  background:
    radial-gradient(120% 160% at 82% 30%, rgba(120,220,255,.10), transparent 60%),
    linear-gradient(180deg, #06253c, #020c16);
  box-shadow: inset 0 2px 8px rgba(0,0,0,.55), inset 0 0 0 1px rgba(120,220,255,.06);
  transition: background .45s var(--ease-out), border-color .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.theme-switch:hover .ts-track { border-color: rgba(120,220,255,.35); }

.ts-thumb {
  position: absolute; top: var(--ts-pad); left: var(--ts-pad);
  width: calc(var(--ts-h) - var(--ts-pad) * 2);
  height: calc(var(--ts-h) - var(--ts-pad) * 2);
  border-radius: 50%;
  display: grid; place-items: center;
  color: #eaf6ff;
  background: radial-gradient(circle at 36% 30%, #ffffff, #a7ecff 46%, #2aa7c8 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,.45), 0 0 14px rgba(120,220,255,.55);
  transition: transform .4s var(--ease-out), background .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.theme-switch:active .ts-thumb { transform: scale(.92); }

.ts-i {
  grid-area: 1 / 1; width: 15px; height: 15px;
  color: #063243;
  transition: opacity .35s var(--ease-out), transform .4s var(--ease-out);
}
/* Night (default): show moon, hide sun */
.ts-sun  { opacity: 0; transform: rotate(-90deg) scale(.4); color: #7a3d00; }
.ts-moon { opacity: 1; transform: rotate(0) scale(1); }

/* Day state */
:root[data-theme="day"] .ts-track {
  border-color: rgba(255,255,255,.7);
  background:
    radial-gradient(120% 160% at 20% 30%, rgba(255,255,255,.9), transparent 55%),
    linear-gradient(180deg, #8fd4f4, #4aa9dd);
  box-shadow: inset 0 2px 6px rgba(4,40,60,.25), inset 0 0 0 1px rgba(255,255,255,.4);
}
:root[data-theme="day"] .ts-thumb {
  transform: translateX(calc(var(--ts-w) - var(--ts-h)));
  background: radial-gradient(circle at 36% 30%, #fff7e0, #ffd766 45%, #ff9e1b 100%);
  box-shadow: 0 2px 8px rgba(120,60,0,.35), 0 0 16px rgba(255,180,40,.7);
}
:root[data-theme="day"] .ts-sun  { opacity: 1; transform: rotate(0) scale(1); }
:root[data-theme="day"] .ts-moon { opacity: 0; transform: rotate(90deg) scale(.4); }

@media (prefers-reduced-motion: reduce) {
  .ts-track, .ts-thumb, .ts-i { transition: none; }
}

/* ============================================================
   DAY THEME — sunlit-surface token overrides
   Gameplay canvas (#stage) draws its own colours and stays deep.
   ============================================================ */
:root[data-theme="day"] {
  --sea-0: #eaf7fe;
  --sea-1: #cdecfa;
  --sea-2: #a9dcf3;
  --sea-3: #7fc4e6;

  --fg:      #082436;
  --fg-dim:  #2f5b73;
  --fg-mute: #5a7d92;

  --panel:   rgba(255, 255, 255, 0.74);
  --panel-b: rgba(12, 92, 130, 0.20);
  --glass:   rgba(255, 255, 255, 0.58);
}

/* Smooth cross-fade of the whole page when the theme flips */
body { transition: background .5s var(--ease-out), color .5s var(--ease-out); }
body::before { transition: background .5s var(--ease-out); }

:root[data-theme="day"] body::before {
  background:
    radial-gradient(120% 80% at 50% -10%, #ffffff 0%, transparent 55%),
    linear-gradient(180deg, #eaf7fe 0%, #c6e8f8 34%, #9dd6f0 66%, #74c0e6 100%);
}

/* Brand wordmark: #fff→cyan is invisible on a light sky — darken it for day */
:root[data-theme="day"] .brand-name {
  background: linear-gradient(120deg, #0a3a52, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
:root[data-theme="day"] .eyebrow { text-shadow: 0 0 18px rgba(34,211,238,.35); }
:root[data-theme="day"] .light-rays { mix-blend-mode: multiply; opacity: .5; }

@media (prefers-reduced-motion: reduce) {
  body, body::before { transition: none; }
}

/* ============================================================
   SKIN LOCKER (live 3D models) + tutorial-card feedback + fixes
   ============================================================ */
.sp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.sp-head .sp-label { margin-bottom: 0; }
.sp-locker {
  font-family: var(--font-disp); font-size: .64rem; letter-spacing: 1.5px; font-weight: 700;
  color: var(--cyan); padding: 5px 10px; border-radius: 8px;
  border: 1px solid rgba(34,211,238,.3); background: rgba(34,211,238,.08);
}
.sp-locker:hover { background: rgba(34,211,238,.18); color: var(--fg); border-color: var(--cyan); }

.locker-overlay { z-index: 20; }
.panel.locker { width: min(920px, 100%); max-height: 92vh; overflow-y: auto; }
.locker-tag {
  font-family: var(--font-disp); font-size: .58rem; letter-spacing: 2px; font-weight: 700;
  color: var(--cyan); background: rgba(34,211,238,.12); border: 1px solid rgba(34,211,238,.35);
  padding: 4px 8px; border-radius: 6px; margin-left: auto; margin-right: 40px;
}
.locker-sub { color: var(--fg-dim); font-size: .9rem; margin-bottom: 18px; line-height: 1.5; }
.locker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }

.locker-card {
  appearance: none; -webkit-appearance: none;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px 12px 12px; cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  border: 1px solid var(--panel-b); border-radius: 16px; color: var(--fg-dim);
  transition: transform .28s var(--ease-out), border-color .28s, box-shadow .3s, background .28s;
}
.locker-card:hover { transform: translateY(-4px); border-color: var(--accent, var(--cyan)); box-shadow: 0 16px 40px rgba(0,0,0,.42); color: var(--fg); }
.locker-card.selected {
  border-color: var(--accent, var(--cyan));
  background: radial-gradient(120% 120% at 50% 0%, var(--glow, rgba(34,211,238,.3)), rgba(255,255,255,.02) 70%);
  box-shadow: 0 0 0 1px var(--accent, var(--cyan)), 0 18px 46px rgba(0,0,0,.45);
}

/* --- ported from a 21st.dev generation: animated cyan→gold rim + holographic sheen --- */
@property --lrim { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.locker-card { position: relative; }
.locker-card::after {           /* masked ring border that flows cyan→gold */
  content: ""; position: absolute; inset: 0; border-radius: 16px; padding: 1.6px; pointer-events: none; z-index: 5;
  background: conic-gradient(from var(--lrim), var(--accent, #22d3ee), #7af0ff, var(--gold), #ffe9a8, var(--accent, #22d3ee));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s var(--ease-out); animation: lockerRim 7s linear infinite;
}
.locker-card:hover::after, .locker-card.selected::after { opacity: .85; }
@keyframes lockerRim { to { --lrim: 360deg; } }
.lc-frame::after {              /* iridescent sheen sweeps across the model on hover */
  content: ""; position: absolute; top: -30%; left: -140%; width: 55%; height: 160%; z-index: 4;
  pointer-events: none; transform: skewX(-18deg); filter: blur(2px);
  background: linear-gradient(100deg, transparent 0%, rgba(120,240,255,.22) 45%, rgba(255,213,74,.26) 55%, rgba(255,180,220,.16) 62%, transparent 78%);
  transition: left .9s cubic-bezier(.22, .61, .36, 1);
}
.locker-card:hover .lc-frame::after { left: 150%; }

.lc-frame {
  position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 18%, #0c2c42 0%, #05131f 60%, #02080e 100%);
  box-shadow: inset 0 0 30px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.05);
  transform-style: preserve-3d; will-change: transform;
}
.lc-canvas { display: block; width: 100%; height: 100%; }
.lc-check {
  position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: .82rem; font-weight: 700; color: #04121f;
  background: var(--accent, var(--cyan)); box-shadow: 0 2px 10px var(--glow, rgba(34,211,238,.6));
  opacity: 0; transform: scale(.4); transition: opacity .25s var(--ease-out), transform .3s var(--ease-out);
}
.locker-card.selected .lc-check { opacity: 1; transform: scale(1); }
.lc-name { font-family: var(--font-disp); font-weight: 700; font-size: .92rem; letter-spacing: .5px; color: var(--fg); }
.lc-pick {
  font-family: var(--font-disp); font-size: .58rem; letter-spacing: 2px; color: var(--accent, var(--cyan));
  opacity: 0; transition: opacity .25s; min-height: .7em;
}
.locker-card:hover .lc-pick { opacity: .9; }
.locker-card.selected .lc-pick { opacity: 0; }

/* ---- premium (locked) skins: shop ---- */
.locker-card.locked .lc-canvas { filter: grayscale(.55) brightness(.72); }
.locker-card.locked:hover .lc-canvas { filter: grayscale(.15) brightness(.9); }
.lc-lock {
  position: absolute; top: 8px; left: 8px; z-index: 2; font-size: .8rem;
  width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px;
  background: rgba(6,14,22,.72); border: 1px solid rgba(255,255,255,.14);
}
.lc-buy {
  font-family: var(--font-disp); font-size: .62rem; letter-spacing: 1px; font-weight: 700;
  color: #06202b; background: linear-gradient(135deg, var(--gold), #ffe17a);
  padding: 4px 8px; border-radius: 999px; box-shadow: 0 4px 14px rgba(255,176,32,.35);
}
.skin { position: relative; }
.skin.locked { opacity: .82; }
.skin.locked .skin-dot { filter: grayscale(.4) brightness(.85); }
.skin-lock { position: absolute; top: 3px; right: 4px; font-size: .62rem; opacity: .9; }

/* menu character cards — premium lock */
.mv-card { position: relative; }
.mv-card.locked .mvc-canvas { filter: grayscale(.5) brightness(.75); }
.mvc-lock { position: absolute; top: 6px; left: 6px; z-index: 2; font-size: .72rem;
  width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px;
  background: rgba(6,14,22,.72); border: 1px solid rgba(255,255,255,.14); }
.mvc-price { font-family: var(--font-disp); font-size: .62rem; font-weight: 700; color: var(--gold); letter-spacing: .5px; }

/* ---- skin shop modal ---- */
.buy-overlay { position: fixed; inset: 0; z-index: 90; }   /* top-level: above menu (70) & cashier (80) */
.buy-panel { max-width: 380px; text-align: center; }
.buy-preview {
  width: 150px; height: 180px; margin: 6px auto 4px; border-radius: 16px;
  background: radial-gradient(circle at 50% 34%, rgba(34,211,238,.12), rgba(4,10,18,.9));
  border: 1px solid var(--panel-b); overflow: hidden;
}
.buy-preview canvas { width: 100%; height: 100%; display: block; }
.buy-info { display: flex; align-items: baseline; justify-content: center; gap: 12px; margin-top: 6px; }
.buy-name { font-family: var(--font-disp); font-weight: 800; font-size: 1.25rem; color: var(--fg); }
.buy-price { font-family: var(--font-disp); font-weight: 800; font-size: 1.25rem; color: var(--gold); }
.buy-note { color: var(--fg-mute); font-size: .82rem; margin: 8px 4px 4px; }
.buy-status {
  font-family: var(--font-ui); font-size: .86rem; color: var(--cyan);
  margin: 8px auto; padding: 8px 12px; border-radius: 10px; background: rgba(34,211,238,.08);
}
.buy-status.processing { color: var(--fg-dim); background: rgba(255,255,255,.05); }
.buy-actions { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.buy-sandbox { color: var(--fg-mute); font-size: .68rem; opacity: .7; margin-top: 12px; }

/* ---- Global Network — live server map (ported from 21st.dev @shailendrakumar19999/map) ---- */
.hero-net { margin-top: 12px; }
.net-btn { font-size: .82rem; padding: 10px 22px; letter-spacing: 1px; }
.net-overlay {
  position: fixed; inset: 0; z-index: 85; display: flex; align-items: center; justify-content: center;
  background: rgba(2, 6, 12, .82); backdrop-filter: blur(8px); padding: 18px;
}
.net-overlay.hidden { display: none; }
.net-panel {
  position: relative; width: min(940px, 96vw); max-height: 92vh; overflow-y: auto;
  background: #04070d;                                  /* deep black, как любят в этом доме */
  border: 1px solid rgba(120, 220, 255, .14); border-radius: 20px;
  padding: 26px 26px 20px; box-shadow: 0 30px 90px rgba(0, 0, 0, .7);
}
.net-head { text-align: center; }
.net-eyebrow { font-family: var(--font-disp); font-size: .62rem; letter-spacing: 4px; color: var(--cyan); }
.net-head h2 { font-family: var(--font-disp); font-size: 1.5rem; margin: 6px 0 8px; color: #eaf6ff; }
.net-sub { color: var(--fg-dim); font-size: .88rem; max-width: 580px; margin: 0 auto; }
.net-map {
  position: relative; width: 100%; aspect-ratio: 2 / 1; margin-top: 16px;
  border-radius: 14px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #071522 0%, #020408 70%);
  border: 1px solid rgba(120, 220, 255, .08);
}
#netCanvas { width: 100%; height: 100%; display: block; }
.net-legend { display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 14px; color: var(--fg-dim); font-size: .8rem; }
.net-node { display: inline-flex; gap: 7px; align-items: center; }
.net-node b { font-size: .58rem; font-family: var(--font-disp); color: var(--cyan); border: 1px solid rgba(34,211,238,.4); padding: 1px 7px; border-radius: 999px; letter-spacing: 1.5px; }
.nl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px rgba(34,211,238,.85); }
.nl-dot.de { background: var(--gold); box-shadow: 0 0 10px rgba(255,213,74,.85); }
.net-beamtag { font-family: var(--font-disp); font-size: .6rem; letter-spacing: 2px; color: var(--fg-mute); text-transform: uppercase; }
@media (max-width: 640px) { .net-panel { padding: 18px 14px 14px; } .net-head h2 { font-size: 1.15rem; } }

/* ---- ban screen (admin blocked this browser) ---- */
.ban-screen {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center;
  background: rgba(2, 8, 14, .88); backdrop-filter: blur(6px);
}
.ban-screen.hidden { display: none; }
.ban-card {
  max-width: 420px; text-align: center; padding: 36px 30px; border-radius: 18px;
  background: var(--panel); border: 1px solid rgba(255,77,94,.5); box-shadow: 0 20px 70px rgba(0,0,0,.6);
}
.ban-ic { font-size: 2.4rem; display: block; margin-bottom: 12px; }
.ban-card h2 { font-family: var(--font-disp); color: var(--danger); margin-bottom: 10px; }
.ban-card p { color: var(--fg-dim); }

/* tutorial cards feel tappable (soft spring handled in JS) */
.tappable { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* panels never overflow short screens (bet / result / locker) */
.panel { max-height: calc(100% - 32px); overflow-y: auto; }

/* cashier must stay pinned even when opened from a scrolled landing */
.cashier-overlay { position: fixed; }

@media (max-width: 560px) {
  .panel.locker { padding: 22px; }
  .locker-grid { grid-template-columns: repeat(2, 1fr); }
  .locker-tag { margin-right: 44px; }
}

/* reduced-motion: silence looping ambient animations + panel slide-in (payment spinner still spins) */
@media (prefers-reduced-motion: reduce) {
  .btn-glow, .brand-mark::after, .light-rays, .hero-diver, .wheel,
  .btn-cash.ready, .btn-jump, .panel, .pay-check, .locker-card::after { animation: none !important; }
}

/* ============================================================
   SKIN COLLECTION showcase — cards built from a 21st.dev generation,
   framing the game's own live 3D diver models.
   ============================================================ */
.showcase { max-width: 1220px; margin: 0 auto; padding: clamp(50px, 10vh, 110px) 20px; text-align: center; }
.showcase-head { margin-bottom: 42px; }
.showcase-head .eyebrow { margin-bottom: 12px; }
.showcase-head h2 { font-family: var(--font-disp); font-size: clamp(1.8rem, 5vw, 3rem); margin-bottom: 12px; letter-spacing: 1px; }
.showcase-sub { color: var(--fg-dim); max-width: 580px; margin: 0 auto; line-height: 1.55; }
.showcase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(198px, 1fr)); gap: 18px; }

.show-card { position: relative; opacity: 0; transform: translateY(30px); }
.showcase.in .show-card { opacity: 1; transform: none; transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.showcase.in .show-card:nth-child(1) { transition-delay: .05s; }
.showcase.in .show-card:nth-child(2) { transition-delay: .13s; }
.showcase.in .show-card:nth-child(3) { transition-delay: .21s; }
.showcase.in .show-card:nth-child(4) { transition-delay: .29s; }
.showcase.in .show-card:nth-child(5) { transition-delay: .37s; }

.sc-rim {
  border-radius: 20px; padding: 1.5px;
  background: linear-gradient(120deg, var(--accent, var(--cyan)), #7be3ff 25%, var(--gold) 55%, var(--accent, var(--cyan)) 85%);
  background-size: 250% 250%;
  animation: scRim 7s ease-in-out infinite;
  box-shadow: 0 22px 55px -22px rgba(0,0,0,.72);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.show-card:hover .sc-rim { transform: translateY(-6px); box-shadow: 0 0 46px -6px var(--glow, rgba(34,211,238,.5)), 0 28px 62px -22px rgba(0,0,0,.78); }
@keyframes scRim { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.sc-inner {
  position: relative; overflow: hidden; border-radius: 18px; text-align: left;
  background: linear-gradient(180deg, rgba(10,34,54,.94), rgba(4,18,31,.97));
}
.sc-sheen {
  position: absolute; top: 0; left: -85%; width: 55%; height: 100%; z-index: 6; pointer-events: none;
  background: linear-gradient(115deg, transparent 10%, rgba(255,255,255,.08) 35%, rgba(120,240,255,.32) 48%, rgba(255,213,74,.32) 58%, rgba(255,255,255,.06) 68%, transparent 90%);
  transform: skewX(-18deg); mix-blend-mode: screen;
  transition: left .85s cubic-bezier(.2,.7,.2,1);
}
.show-card:hover .sc-sheen { left: 140%; }

.sc-ribbon {
  position: absolute; top: 15px; right: -42px; width: 160px; z-index: 7; transform: rotate(45deg);
  text-align: center; font-family: var(--font-disp); font-size: .58rem; letter-spacing: 2px; font-weight: 800;
  padding: 5px 0; color: #251400; background: linear-gradient(90deg, var(--gold), #ffb020);
  box-shadow: 0 4px 12px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.3);
}
.sc-ribbon.r-common { background: linear-gradient(90deg, #a6dde9, #5bb3c8); color: #04121f; }
.sc-ribbon.r-rare   { background: linear-gradient(90deg, #7be3ff, #2aa7c8); color: #04121f; }
.sc-ribbon.r-epic   { background: linear-gradient(90deg, #cba3ff, #8a4fd8); color: #150532; }
.sc-ribbon.r-legend { background: linear-gradient(90deg, #ffe38a, #ffb020); color: #251400; }

.sc-preview {
  position: relative; margin: 12px; border-radius: 14px; overflow: hidden; height: 208px;
  border: 1px solid rgba(120,200,255,.08);
  background:
    radial-gradient(circle at 50% 22%, rgba(34,211,238,.16), transparent 55%),
    radial-gradient(circle at 50% 100%, rgba(0,0,0,.5), transparent 60%),
    linear-gradient(180deg, rgba(10,35,54,.9), rgba(4,18,31,.95));
}
.sc-scan { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .4;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px); }
.sc-pglow { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .7; filter: blur(8px);
  background: radial-gradient(closest-side, var(--glow, rgba(34,211,238,.4)), transparent 70%) 50% 42% / 74% 74% no-repeat; }
.sc-diver { position: relative; z-index: 1; display: block; width: 100%; height: 100%;
  filter: drop-shadow(0 0 22px var(--glow, rgba(34,211,238,.5))); animation: scFloat 5s ease-in-out infinite; }
@keyframes scFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.sc-tick { position: absolute; width: 12px; height: 12px; z-index: 4; pointer-events: none; border: 1.5px solid rgba(34,211,238,.45); }
.sc-tick.tl { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.sc-tick.tr { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.sc-tick.bl { bottom: 8px; left: 8px; border-right: none; border-top: none; }
.sc-tick.br { bottom: 8px; right: 8px; border-left: none; border-top: none; }
.sc-read { position: absolute; z-index: 4; bottom: 8px; left: 8px; font-family: var(--font-disp); font-size: .5rem; letter-spacing: 1.5px;
  padding: 3px 6px; border-radius: 5px; color: rgba(190,235,255,.85); background: rgba(120,200,255,.08); border: 1px solid rgba(120,200,255,.18); }
.sc-bubbles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; }
.sc-bubble { position: absolute; bottom: -8px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.7), rgba(180,235,255,.1) 60%, transparent 75%);
  animation: scRise linear infinite; }
@keyframes scRise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-206px) translateX(6px); opacity: 0; } }

.sc-body { padding: 4px 18px 18px; }
.sc-namerow { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sc-name { font-family: var(--font-disp); font-size: 1.12rem; letter-spacing: .5px;
  background: linear-gradient(90deg, #7af0ff, var(--accent, var(--cyan)) 45%, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.sc-tag { color: var(--fg-mute); font-size: .76rem; margin-top: 3px; }
.sc-value { text-align: right; flex-shrink: 0; }
.sc-value-l { display: block; font-size: .52rem; letter-spacing: 2px; color: var(--fg-mute); font-family: var(--font-disp); }
.sc-value b { font-family: var(--font-disp); color: var(--gold); font-size: .92rem; }

.sc-stats { display: flex; flex-direction: column; gap: 9px; margin: 14px 0 16px; }
.sc-stat-head { display: flex; justify-content: space-between; font-size: .6rem; letter-spacing: 1.5px; font-family: var(--font-disp); color: var(--fg-dim); margin-bottom: 4px; }
.sc-stat-head b { color: var(--fg); }
.sc-stat-track { height: 6px; border-radius: 5px; overflow: hidden; background: rgba(255,255,255,.06); box-shadow: inset 0 1px 2px rgba(0,0,0,.5); }
.sc-stat-fill { display: block; height: 100%; border-radius: 5px; position: relative; overflow: hidden;
  background: linear-gradient(90deg, var(--accent, var(--cyan)), #7af0ff 60%, var(--gold)); box-shadow: 0 0 10px rgba(34,211,238,.5); }
.sc-stat-fill.gold { background: linear-gradient(90deg, #ffd54a, #ffe9a8); box-shadow: 0 0 10px rgba(255,213,74,.6); }
.sc-stat-fill::after { content: ""; position: absolute; inset: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent); animation: scShine 2.6s linear infinite; }
@keyframes scShine { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }

.sc-btn {
  width: 100%; padding: 12px; border-radius: 999px; cursor: pointer;
  font-family: var(--font-disp); font-weight: 700; font-size: .76rem; letter-spacing: 2px; color: var(--fg);
  background: linear-gradient(90deg, rgba(34,211,238,.16), rgba(34,211,238,.05));
  border: 1px solid rgba(34,211,238,.4); transition: all .3s var(--ease-out);
}
.sc-btn:hover { background: linear-gradient(90deg, var(--accent, var(--cyan)), var(--gold)); color: #04121f; border-color: transparent; box-shadow: 0 0 24px -4px var(--glow, rgba(34,211,238,.6)); transform: translateY(-1px); }
.sc-btn:active { transform: translateY(0) scale(.99); }

@media (prefers-reduced-motion: reduce) {
  .show-card { opacity: 1 !important; transform: none !important; }
  .sc-rim, .sc-stat-fill::after, .sc-bubble, .sc-diver { animation: none !important; }
  .sc-sheen { display: none; }
}

/* ============================================================
   INTRO SPLASH — spiral animation (3s), ported from 21st.dev
   ============================================================ */
#intro {
  position: fixed; inset: 0; z-index: 9999; background: #000;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden;
  transition: opacity .7s var(--ease-out);
}
#intro.intro-hide { opacity: 0; pointer-events: none; }
#introCanvas { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; }
.intro-brand {
  position: relative; z-index: 2; pointer-events: none; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  opacity: 0; animation: introIn 1.1s var(--ease-out) .55s forwards;
}
.intro-word {
  font-family: var(--font-disp); font-weight: 900; letter-spacing: 10px;
  font-size: clamp(2.6rem, 9vw, 5rem);
  background: linear-gradient(120deg, #ffffff, var(--cyan) 55%, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 34px rgba(34,211,238,.4));
}
.intro-sub { font-family: var(--font-disp); font-size: clamp(.6rem, 1.6vw, .8rem); letter-spacing: 8px; color: var(--cyan); }
.intro-skip { margin-top: 18px; font-family: var(--font-ui); font-size: .72rem; letter-spacing: 2px; color: rgba(150,220,255,.4); text-transform: uppercase; }
@keyframes introIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .intro-brand { animation: none; opacity: 1; }
  #intro { transition: none; }
}

/* ============================================================
   RADIAL ORBITAL MENU (ported from 21st.dev @jatin-yadav05)
   + section panels with a deep-black "cool" background
   ============================================================ */
.menu-overlay { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; overflow: hidden; animation: fadein .4s var(--ease-out); }
.menu-overlay.hidden { display: none !important; }

.menu-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 44%, rgba(20,64,96,.30), transparent 70%),
    radial-gradient(130% 100% at 50% 50%, rgba(4,12,22,.5), #000 74%), #000; }
.menu-bg::before { content: ""; position: absolute; left: 50%; top: 44%; width: 720px; height: 720px; transform: translate(-50%,-50%);
  border-radius: 50%; filter: blur(46px); opacity: .85;
  background: conic-gradient(from 0deg, transparent, rgba(34,211,238,.12), transparent 30%, rgba(192,38,211,.09), transparent 60%, rgba(255,213,74,.06), transparent);
  animation: menuAurora 26s linear infinite; }
@keyframes menuAurora { to { transform: translate(-50%,-50%) rotate(360deg); } }
.menu-bg::after { content: ""; position: absolute; inset: 0; opacity: .45;
  background-image:
    radial-gradient(1px 1px at 18% 28%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 72% 62%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 42% 82%, rgba(255,255,255,.35), transparent),
    radial-gradient(1px 1px at 86% 22%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 54% 12%, rgba(255,255,255,.3), transparent),
    radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,.3), transparent); }

.menu-close { position: absolute; top: 18px; right: 18px; z-index: 6; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.7);
  font-size: 1.1rem; cursor: pointer; backdrop-filter: blur(6px); transition: all .2s; }
.menu-close:hover { color: #fff; border-color: #fff; transform: scale(1.06); }

.menu-stage { position: relative; z-index: 2; width: min(680px, 92vw); height: min(680px, 76vh); display: flex; align-items: center; justify-content: center; }

.menu-core { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; z-index: 10;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6 55%, #14b8a6); animation: corePulse 3s var(--ease-io) infinite; }
.menu-core-dot { font-family: var(--font-disp); font-weight: 900; font-size: 1.2rem; color: rgba(255,255,255,.95); }
.menu-core-ring { position: absolute; inset: -8px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); animation: corePing 2.6s var(--ease-io) infinite; }
.menu-core-ring.d2 { inset: -16px; border-color: rgba(255,255,255,.12); animation-delay: .6s; }
@keyframes corePulse { 0%,100% { box-shadow: 0 0 34px rgba(59,130,246,.45);} 50% { box-shadow: 0 0 56px rgba(59,130,246,.78);} }
@keyframes corePing { 0% { transform: scale(.9); opacity: .8;} 100% { transform: scale(1.55); opacity: 0;} }

.menu-orbit { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 1; border-radius: 50%;
  width: calc(var(--orbit, 200px) * 2); height: calc(var(--orbit, 200px) * 2); border: 1px solid rgba(255,255,255,.1); }
.menu-nodes { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 3; }

.menu-node { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: none; border: none; cursor: pointer; padding: 0; will-change: transform;
  transition: opacity .35s var(--ease-out), filter .35s var(--ease-out); }
.menu-node:focus-visible { outline: none; }
.mn-glow { position: absolute; top: 23px; left: 50%; transform: translate(-50%,-50%); width: 72px; height: 72px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%); opacity: calc(.25 + var(--depth,.5) * .75); pointer-events: none; }
.mn-dot { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  background: rgba(8,12,20,.92); border: 2px solid rgba(255,255,255,.35); box-shadow: 0 4px 20px rgba(0,0,0,.55);
  transition: transform .3s var(--ease-out), border-color .3s, box-shadow .3s, background .3s; }
.menu-node:hover .mn-dot, .menu-node:focus-visible .mn-dot { transform: scale(1.2); border-color: #fff; background: rgba(22,30,44,.95); box-shadow: 0 0 26px rgba(255,255,255,.5); }
.mn-label { font-family: var(--font-disp); font-size: .7rem; letter-spacing: 2px; color: rgba(255,255,255,.72); white-space: nowrap; text-transform: uppercase; transition: color .3s, transform .3s; }
.menu-node:hover .mn-label, .menu-node:focus-visible .mn-label { color: #fff; transform: scale(1.08); }

.menu-hint { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 4; text-align: center;
  font-family: var(--font-disp); font-size: .64rem; letter-spacing: 3px; color: rgba(180,220,255,.4); text-transform: uppercase; }

.menu-view { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(80% 60% at 50% 38%, rgba(12,32,50,.5), rgba(0,0,0,.94) 76%); backdrop-filter: blur(10px); animation: fadein .3s var(--ease-out); }
.menu-view.hidden { display: none !important; }
.menu-back { position: absolute; top: 20px; left: 20px; z-index: 3; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.8);
  font-family: var(--font-disp); font-size: .72rem; letter-spacing: 1.5px; padding: 9px 16px; border-radius: 999px; transition: all .2s; }
.menu-back:hover { color: #fff; border-color: #fff; }
.menu-view-inner { width: min(560px, 100%); max-height: 86vh; overflow-y: auto; padding: 30px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(10,16,26,.92), rgba(2,6,12,.97)); border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 30px 90px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.06); animation: pop .4s var(--ease-out); }
.view-character .menu-view-inner { width: min(880px, 100%); }

.mv-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.mv-ic { font-size: 1.4rem; }
.mv-head h2 { font-family: var(--font-disp); font-size: 1.5rem; letter-spacing: 1px; color: #fff; }
.mv-badge { margin-left: auto; font-family: var(--font-disp); font-size: .56rem; letter-spacing: 2px; font-weight: 700;
  color: #ffcf5a; background: rgba(255,176,32,.12); border: 1px solid rgba(255,176,32,.4); padding: 4px 8px; border-radius: 6px; }
.mv-block { margin-bottom: 22px; }
.mv-label { display: block; font-family: var(--font-disp); font-size: .62rem; letter-spacing: 2.5px; color: rgba(180,220,255,.55); margin-bottom: 10px; }
.mv-opts { display: flex; gap: 10px; flex-wrap: wrap; }
.mv-opt { flex: 1; min-width: 120px; padding: 13px 14px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.75);
  font-family: var(--font-ui); font-size: .95rem; font-weight: 600; transition: all .2s; }
.mv-opt:hover { border-color: rgba(255,255,255,.5); color: #fff; background: rgba(255,255,255,.08); }
.mv-opt.active { border-color: var(--cyan); color: #fff; background: rgba(34,211,238,.14); box-shadow: 0 0 22px -6px rgba(34,211,238,.6); }
.mv-about { color: rgba(210,235,255,.82); line-height: 1.65; font-size: 1rem; }
.mv-sub { color: rgba(180,210,230,.7); margin-bottom: 18px; line-height: 1.5; }
.mv-cta { width: 100%; margin-top: 18px; padding: 15px; border-radius: 999px; cursor: pointer; border: none;
  font-family: var(--font-disp); font-weight: 700; letter-spacing: 2px; font-size: .9rem; color: #04121f;
  background: linear-gradient(120deg, var(--cyan), var(--cyan-2), var(--aqua)); box-shadow: 0 10px 34px -8px rgba(34,211,238,.6); transition: transform .2s, box-shadow .3s; }
.mv-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 44px -8px rgba(34,211,238,.8); }

.mv-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.mv-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; border-radius: 14px; cursor: pointer;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.12); transition: transform .25s var(--ease-out), border-color .25s, box-shadow .3s, background .25s; }
.mv-card:hover { transform: translateY(-4px); border-color: var(--accent, #fff); }
.mv-card.selected { border-color: var(--accent, #fff); box-shadow: 0 0 0 1px var(--accent, #fff), 0 0 26px -6px var(--glow, rgba(255,255,255,.5));
  background: radial-gradient(120% 100% at 50% 0%, var(--glow, rgba(255,255,255,.2)), transparent 70%); }
.mvc-frame { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 20%, #0c2c42, #04121f 70%); }
.mvc-check { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: .7rem; color: #04121f; background: var(--accent, #fff); opacity: 0; transform: scale(.4); transition: opacity .25s, transform .3s; }
.mv-card.selected .mvc-check { opacity: 1; transform: scale(1); }
.mvc-name { font-family: var(--font-disp); font-size: .78rem; letter-spacing: .5px; color: #fff; }

@media (max-width: 560px) {
  .menu-view-inner, .view-character .menu-view-inner { padding: 22px; }
  .mn-label { font-size: .62rem; letter-spacing: 1.5px; }
}
/* card that rises from the active node (like the 21st original) */
.menu-card { position: absolute; left: 50%; top: 50%; z-index: 400; width: min(360px, 88vw); }
.menu-card.wide { width: min(460px, 92vw); }
.menu-card.wide .mc-inner { max-height: min(74vh, 540px); }
.menu-card.hidden { display: none !important; }
.mc-line { display: block; width: 1px; height: 20px; margin: 0 auto; opacity: 0; transition: opacity .3s;
  background: linear-gradient(rgba(255,255,255,.55), transparent); }
.menu-card.show .mc-line { opacity: .6; }
.mc-inner { position: relative; pointer-events: auto; max-height: min(64vh, 440px); overflow-y: auto; padding: 24px 20px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(10,16,26,.95), rgba(2,6,12,.98)); border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 24px 70px rgba(0,0,0,.72), 0 0 44px -12px rgba(59,130,246,.4), inset 0 1px 0 rgba(255,255,255,.06);
  opacity: 0; transform: translateY(16px) scale(.95); transition: opacity .4s var(--ease-out), transform .5s var(--ease-out); }
.menu-card.show .mc-inner { opacity: 1; transform: none; }
.mc-x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); color: rgba(255,255,255,.7); font-size: .8rem; transition: all .2s; }
.mc-x:hover { color: #fff; border-color: #fff; }

.mc-body .mv-head { margin-bottom: 16px; }
.mc-body .mv-head h2 { font-size: 1.2rem; }
.mc-body .mv-block { margin-bottom: 16px; }
.mc-body .mv-opts { gap: 8px; }
.mc-body .mv-opt { min-width: 0; flex: 1 1 30%; padding: 10px 8px; font-size: .84rem; }
.mc-body .mv-about { font-size: .92rem; }
.mc-body .mv-cta { margin-top: 14px; padding: 13px; }
.mc-body .mv-cards { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mc-body .mvc-name { font-size: .66rem; }

.menu-node.active .mn-label { opacity: 0; }
.menu-node.active .mn-dot { border-color: #fff; background: #fff; box-shadow: 0 0 30px rgba(255,255,255,.6); }
.menu-node.dim { filter: saturate(.55); }

/* live animated diver canvases (showcase + character cards) */
.sc-canvas { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }
.mvc-canvas { display: block; width: 100%; height: 100%; }

@media (prefers-reduced-motion: reduce) {
  .menu-core, .menu-core-ring, .menu-bg::before { animation: none !important; }
  .mc-inner, .mc-line { transition: none !important; }
}

/* ============================================================
   Descent-speed control — vertical rail on the right of the dive.
   Purely a pacing tool: the odds are placed by depth, never by time.
   ============================================================ */
.speed-ctl {
  --sp-thumb: 28px;                     /* shared by the thumb size and its travel range */
  position: absolute; right: 18px; top: 50%; z-index: 76;   /* above the volume pill if they ever meet */
  width: 82px;                          /* one column width — parts line up instead of stair-stepping */
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 12px 8px 10px; border-radius: 20px;
  background: var(--panel); border: 1px solid var(--panel-b);
  backdrop-filter: blur(9px); box-shadow: 0 10px 34px rgba(0,0,0,.42);
  /* hidden until the diver is actually underwater — fades/slides in, never pops */
  opacity: 0; pointer-events: none;
  transform: translate(26px, -50%) scale(.94);
  transition: opacity .5s ease, transform .62s cubic-bezier(.22,.95,.25,1);
  will-change: transform, opacity;
}
.speed-ctl.on { opacity: 1; pointer-events: auto; transform: translate(0, -50%) scale(1); }
.sp-title {
  font-family: Orbitron, sans-serif; font-size: .5rem; letter-spacing: .18em;
  color: var(--fg-mute); writing-mode: horizontal-tb;
}
.sp-btn {
  width: 46px; height: 26px; border-radius: 9px; cursor: pointer;
  background: rgba(255,255,255,.045); border: 1px solid var(--panel-b);
  color: var(--fg-dim); display: flex; align-items: center; justify-content: center;
  transition: background .22s ease, color .22s ease, border-color .22s ease, transform .18s cubic-bezier(.3,1.4,.5,1);
}
.sp-btn svg { width: 15px; height: 15px; fill: currentColor; }
.sp-btn:hover { color: var(--cyan); border-color: rgba(34,211,238,.5); background: rgba(34,211,238,.10); }
.sp-btn:active { transform: scale(.86); }
.sp-btn:disabled { opacity: .3; pointer-events: none; }

.sp-rail {
  position: relative; width: 34px; height: 152px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; touch-action: none;
}
.sp-rail:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 12px; }
.sp-track {
  position: absolute; inset: 0 12px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.05));
  border: 1px solid var(--panel-b);
}
/* fill grows from the BOTTOM: more fill = faster */
.sp-fill {
  position: absolute; left: 12px; right: 12px; bottom: 0; height: 30%;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan-2), var(--cyan) 55%, rgba(34,211,238,.35));
  box-shadow: 0 0 14px rgba(34,211,238,.45);
  transition: height .38s cubic-bezier(.22,.95,.25,1), box-shadow .3s ease;
}
.speed-ctl.dragging .sp-fill { transition: none; }
.sp-ticks {
  position: absolute; inset: 4px 0; display: flex; flex-direction: column;
  justify-content: space-between; align-items: center; pointer-events: none;
}
.sp-ticks i { width: 9px; height: 1px; background: rgba(234,246,255,.20); border-radius: 1px; }
.sp-thumb {
  position: absolute; left: 50%; bottom: 30%;
  width: var(--sp-thumb); height: var(--sp-thumb);
  margin-left: calc(var(--sp-thumb) / -2); margin-bottom: calc(var(--sp-thumb) / -2);
  border-radius: 50%; background: linear-gradient(160deg, #eafcff, #9fe9f5 60%, #4fd8e8);
  box-shadow: 0 3px 10px rgba(0,0,0,.5), 0 0 16px rgba(34,211,238,.55);
  display: flex; align-items: center; justify-content: center;
  transition: bottom .38s cubic-bezier(.22,.95,.25,1), transform .2s cubic-bezier(.3,1.4,.5,1), box-shadow .3s ease;
}
.speed-ctl.dragging .sp-thumb { transition: transform .2s cubic-bezier(.3,1.4,.5,1); }
.sp-thumb-core { width: 9px; height: 9px; border-radius: 50%; background: #04121f; opacity: .55; }
.sp-rail:hover .sp-thumb, .speed-ctl.dragging .sp-thumb { transform: scale(1.14); }
.speed-ctl.dragging .sp-fill { box-shadow: 0 0 22px rgba(34,211,238,.7); }

.sp-read { font-family: Orbitron, sans-serif; color: var(--fg); font-size: .82rem; line-height: 1; }
.sp-read small { color: var(--fg-mute); font-size: .6rem; margin-left: 1px; }
.sp-read b { transition: color .25s ease; }
.speed-ctl.fast .sp-read b { color: var(--gold); }
.speed-ctl.slow .sp-read b { color: var(--aqua); }
.sp-note {
  max-width: 100%; text-align: center; font-size: .54rem; line-height: 1.35;
  color: var(--fg-mute); letter-spacing: .02em;
}

:root[data-theme="day"] .speed-ctl { box-shadow: 0 10px 30px rgba(10,40,70,.18); }

@media (max-width: 720px) {
  .speed-ctl { --sp-thumb: 24px; right: 10px; width: 60px; gap: 7px; padding: 10px 6px 9px; border-radius: 16px; }
  .sp-rail { height: 116px; width: 30px; }
  .sp-btn { width: 40px; height: 23px; }
  .sp-note { display: none; }           /* keep the pill slim on a phone */
}
/* short / landscape screens: lift the rail so it never lands under the volume pill */
@media (max-height: 620px) {
  .speed-ctl { top: 42%; gap: 6px; }
  .sp-rail { height: 92px; }
  .sp-note { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .speed-ctl, .sp-fill, .sp-thumb, .sp-btn { transition: none !important; }
}

/* ============================================================
   Submarine era (v28): vault decision card, hull cells, dramatic X
   ============================================================ */
.vault-choice {
  position: absolute; inset: 0; z-index: 8;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: clamp(30px, 7vh, 70px);   /* low enough to clear the hovering sub and the vault sign */
  pointer-events: none;
  background: radial-gradient(90% 60% at 50% 100%, rgba(2,10,19,.55), transparent 70%);
  opacity: 0; transition: opacity .45s ease;
}
.vault-choice:not(.hidden) { opacity: 1; }
.vc-card {
  pointer-events: auto;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 22px 28px 16px; border-radius: 22px;
  background: var(--panel); border: 1px solid rgba(255,213,74,.35);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 70px rgba(0,0,0,.55), 0 0 40px rgba(255,213,74,.12);
  animation: vcIn .5s var(--ease-out);
  max-width: min(480px, 92vw); text-align: center;
}
@keyframes vcIn { from { transform: translateY(26px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.vc-eyebrow { font-family: Orbitron, sans-serif; font-size: .62rem; letter-spacing: .22em; color: var(--gold); }
.vc-mult {
  font-family: Orbitron, sans-serif; font-weight: 900; line-height: 1;
  font-size: clamp(2.6rem, 7vw, 3.6rem); color: var(--fg);
  text-shadow: 0 0 26px rgba(255,213,74,.45);
}
.vc-mult b { color: var(--gold); }
.vc-sub { color: var(--fg-dim); font-size: .95rem; }
.vc-sub b { color: var(--fg); }
.vc-actions { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.vc-take b { margin-left: 6px; }
.vc-deeper {
  background: rgba(255,77,94,.12); border: 1px solid rgba(255,77,94,.55); color: #ffb9c1;
  transition: transform .2s cubic-bezier(.3,1.4,.5,1), background .25s, box-shadow .25s;
}
.vc-deeper:hover { background: rgba(255,77,94,.22); box-shadow: 0 0 24px rgba(255,77,94,.35); transform: translateY(-2px); }
.vc-deeper .vc-seg { opacity: .75; font-family: Orbitron, sans-serif; font-size: .78rem; }
.vc-hint { color: var(--fg-mute); font-size: .74rem; max-width: 380px; line-height: 1.4; }

/* hull integrity cells in the HUD */
.g-value.hull { display: inline-flex; gap: 5px; align-items: center; }
.g-value.hull i {
  width: 16px; height: 10px; border-radius: 3px;
  background: var(--success); box-shadow: 0 0 10px rgba(55,224,143,.5);
  transition: background .3s ease, box-shadow .3s ease, transform .3s ease;
}
.g-value.hull i.off { background: rgba(148,190,215,.16); box-shadow: none; }
.g-value.hull.crit i:not(.off) { background: var(--danger); box-shadow: 0 0 12px rgba(255,77,94,.6); animation: hullPulse 0.9s ease-in-out infinite; }
@keyframes hullPulse { 50% { transform: scaleY(.7); } }

/* dramatic multiplier: pops on every coin, heats up as it grows */
.g-value.mult { transition: color .3s ease, text-shadow .3s ease; }
.g-value.mult.hot { color: var(--gold); text-shadow: 0 0 18px rgba(255,213,74,.55); }
.g-value.mult.blaze { color: #ff9c3d; text-shadow: 0 0 22px rgba(255,140,50,.65); }
.g-value.mult.pop { animation: multPop .38s cubic-bezier(.3,1.5,.5,1); }
@keyframes multPop { 30% { transform: scale(1.22); } 100% { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .vc-card, .g-value.mult.pop, .g-value.hull.crit i:not(.off) { animation: none !important; }
}

/* consumable booster charges */
.skin-charges {
  margin-left: 5px; font-family: Orbitron, sans-serif; font-size: .58rem;
  color: var(--gold); background: rgba(255,213,74,.12);
  border: 1px solid rgba(255,213,74,.4); padding: 1px 6px; border-radius: 8px;
}
.lc-boost {
  display: block; margin-top: 3px; min-height: 2em;
  font-size: .6rem; line-height: 1.3; color: var(--fg-dim); letter-spacing: .03em;
}

/* explicit "+ pack" rebuy on owned locker cards — packs are infinite */
.lc-more {
  display: inline-block; margin-top: 5px; padding: 3px 10px; border-radius: 9px;
  font-family: Orbitron, sans-serif; font-size: .56rem; letter-spacing: .06em;
  color: var(--gold); background: rgba(255,213,74,.1); border: 1px solid rgba(255,213,74,.4);
  cursor: pointer; transition: background .25s ease, box-shadow .25s ease, transform .18s cubic-bezier(.3,1.4,.5,1);
}
.lc-more:hover { background: rgba(255,213,74,.2); box-shadow: 0 0 14px rgba(255,213,74,.3); transform: translateY(-1px); }

/* ============ Auth screen — порт 21st.dev modern-stunning-sign-in ============
   Стеклянная карточка с градиентом, пилюли-кнопки, Google, шаги: main→code→avatar */
.auth-overlay { z-index: 90; backdrop-filter: blur(7px); flex-direction: column; gap: 1.6rem; }
.auth-card {
  position: relative; width: min(92vw, 400px);
  border-radius: 26px; padding: 2rem 1.9rem 1.6rem;
  background: linear-gradient(135deg, rgba(160,220,255,.10) 0%, rgba(10,30,48,.55) 55%, rgba(4,18,31,.75) 100%);
  border: 1px solid rgba(160,220,255,.14);
  box-shadow: 0 30px 70px rgba(0,0,0,.55), inset 0 1px 0 rgba(200,235,255,.12);
  backdrop-filter: blur(14px);
}
.auth-step { display: flex; flex-direction: column; align-items: center; }
.auth-logo {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(200,235,255,.12); box-shadow: 0 6px 18px rgba(0,0,0,.4), 0 0 24px rgba(34,211,238,.25);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;
}
.auth-logo .brand-mark { transform: scale(1.05); }
.auth-title { font-family: Orbitron, sans-serif; font-weight: 900; letter-spacing: .12em; font-size: 1.5rem; color: var(--fg); }
.auth-sub { color: var(--fg-mute); font-size: .82rem; margin: .45rem 0 1.15rem; text-align: center; line-height: 1.45; }
.auth-input {
  width: 100%; margin-bottom: .65rem; padding: .78rem 1.15rem;
  border-radius: 14px; border: 1px solid transparent;
  background: rgba(200,235,255,.09); color: var(--fg);
  font: 600 .92rem Rajdhani, sans-serif; letter-spacing: .03em;
}
.auth-input::placeholder { color: rgba(180,215,240,.45); }
.auth-input:focus { outline: none; border-color: rgba(34,211,238,.55); box-shadow: 0 0 0 3px rgba(34,211,238,.14); }
.auth-code { text-align: center; font: 700 1.6rem 'JetBrains Mono', monospace; letter-spacing: .55em; padding-left: 1.6em; }
.auth-pill {
  width: 100%; padding: .8rem 1.2rem; border-radius: 999px; border: none; cursor: pointer;
  font: 700 .84rem Orbitron, sans-serif; letter-spacing: .1em; color: var(--fg);
  display: flex; align-items: center; justify-content: center; gap: .55rem;
  transition: filter .2s ease, transform .15s ease, background .2s ease;
}
.auth-pill:hover { filter: brightness(1.18); transform: translateY(-1px); }
.auth-pill:disabled { opacity: .55; cursor: default; transform: none; }
.auth-guest {
  background: linear-gradient(135deg, #22d3ee, #38f0c8); color: #04222e;
  box-shadow: 0 8px 26px rgba(34,211,238,.35); margin-bottom: .35rem;
}
.auth-main { background: rgba(200,235,255,.12); margin-top: .35rem; }
.auth-main:hover { background: rgba(200,235,255,.2); }
.auth-google { background: linear-gradient(180deg, #232526, #2d2e30); margin-top: .6rem; font-family: Rajdhani, sans-serif; font-weight: 700; font-size: .95rem; letter-spacing: .04em; }
.auth-divider {
  width: 100%; display: flex; align-items: center; gap: .7rem; margin: .9rem 0 .85rem;
  color: var(--fg-mute); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: rgba(160,220,255,.15); }
.auth-error { color: var(--danger); font-size: .8rem; margin: .15rem 0 .4rem; width: 100%; text-align: center; }
.auth-note { color: var(--fg-mute); font-size: .78rem; margin-top: .95rem; text-align: center; }
.auth-note a { color: rgba(234,246,255,.85); text-decoration: underline; }
.auth-note a:hover { color: #fff; }
.auth-devcode {
  font: 600 .8rem 'JetBrains Mono', monospace; color: var(--gold);
  background: rgba(255,213,74,.1); border: 1px dashed rgba(255,213,74,.4);
  border-radius: 10px; padding: .4rem .8rem; margin-bottom: .6rem;
}
/* социальное доказательство под картой — ряд субмарин-«пловцов» */
.auth-proof { text-align: center; color: var(--fg-mute); font-size: .8rem; }
.auth-proof-row { display: flex; justify-content: center; margin-top: .55rem; }
.auth-proof-row canvas {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(10,30,48,.9);
  background: radial-gradient(circle at 35% 30%, #12405e, #071e30); margin-left: -8px;
}
.auth-proof-row canvas:first-child { margin-left: 0; }
/* сетка аватаров (шаг 3 и смена из навбара) */
.avatar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; width: 100%; margin-bottom: .5rem; }
.avatar-cell {
  position: relative; aspect-ratio: 1; border-radius: 18px; cursor: pointer;
  background: rgba(200,235,255,.07); border: 2px solid transparent;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  transition: border-color .2s ease, transform .15s ease;
}
.avatar-cell:hover { transform: translateY(-2px); }
.avatar-cell.selected { border-color: #22d3ee; box-shadow: 0 0 16px rgba(34,211,238,.35); }
.avatar-cell canvas, .avatar-cell img { width: 100%; height: 100%; object-fit: cover; }
.avatar-cell.upload { flex-direction: column; gap: .2rem; color: var(--fg-mute); font-size: .68rem; letter-spacing: .05em; }
.avatar-cell.upload .up-ic { font-size: 1.5rem; }
/* аватар в навбаре */
.nav-avatar {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; cursor: pointer;
  border: 2px solid rgba(34,211,238,.5); background: rgba(10,30,48,.7); padding: 0;
  transition: box-shadow .2s ease, transform .15s ease;
}
.nav-avatar:hover { box-shadow: 0 0 14px rgba(34,211,238,.45); transform: translateY(-1px); }
.nav-avatar canvas, .nav-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* провайдер-плейсхолдер в кассе: карточных полей больше нет */
.provider-slot {
  border: 1px dashed rgba(140,200,240,.3); border-radius: 12px;
  padding: 1.1rem 1rem; text-align: center; color: var(--fg-mute); font-size: .82rem;
  display: flex; flex-direction: column; gap: .5rem; align-items: center;
}

/* provably fair: ссылка на пересчёт раунда в оверлее результата */
.res-fair { margin: .4rem 0 0; font-size: .74rem; }
.res-fair a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); }
.res-fair a:hover { border-bottom-style: solid; }

/* незавершённые платёжные заявки в истории кассы */
.hrow.pending { opacity: .75; border-left: 2px solid var(--gold); }
.hrow.pending .h-l span { color: var(--gold); }

/* ============ Профиль / Магазин / Лидеры (полноэкранные оверлеи) ============ */
.profile-overlay, .shop-overlay, .board-overlay { z-index: 95; backdrop-filter: blur(7px); align-items: flex-start; overflow-y: auto; padding: 3vh 0; }
.profile-sheet, .shop-sheet, .board-sheet {
  position: relative; width: min(94vw, 560px); margin: auto;
  border-radius: 22px; padding: 1.7rem 1.6rem 1.5rem;
  background: linear-gradient(135deg, rgba(160,220,255,.08), rgba(6,26,42,.72) 60%, rgba(4,18,31,.85));
  border: 1px solid rgba(160,220,255,.14); box-shadow: 0 30px 70px rgba(0,0,0,.55);
}

/* профиль */
.profile-head { display: flex; gap: 1.1rem; align-items: center; margin: .3rem 0 1.2rem; }
.profile-ava { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; flex: none;
  border: 3px solid rgba(34,211,238,.5); box-shadow: 0 0 22px rgba(34,211,238,.3); background: rgba(10,30,48,.7); }
.profile-ava canvas, .profile-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-id { flex: 1; min-width: 0; }
.profile-name-row { display: flex; gap: .5rem; align-items: center; }
.profile-name { flex: 1; min-width: 0; padding: .5rem .8rem; border-radius: 10px; border: 1px solid rgba(160,220,255,.2);
  background: rgba(200,235,255,.08); color: var(--fg); font: 700 1rem Rajdhani, sans-serif; }
.profile-name:focus { outline: none; border-color: rgba(34,211,238,.55); }
.profile-bal { margin-top: .55rem; color: var(--fg-mute); font-size: .9rem; }
.profile-bal b { color: var(--gold); }
.profile-err { color: var(--danger); font-size: .78rem; margin-top: .35rem; }
.profile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1.3rem; }
.pf-btn { display: flex; align-items: center; gap: .55rem; justify-content: center; padding: .8rem .9rem; border-radius: 14px;
  border: 1px solid rgba(160,220,255,.16); background: rgba(200,235,255,.07); color: var(--fg);
  font: 600 .86rem Rajdhani, sans-serif; letter-spacing: .02em; cursor: pointer; transition: background .2s, transform .15s; }
.pf-btn:hover { background: rgba(200,235,255,.15); transform: translateY(-1px); }
.pf-btn.danger { border-color: rgba(255,90,110,.35); color: #ff9aa6; }
.pf-btn.danger:hover { background: rgba(255,90,110,.14); }
.pf-ic { font-size: 1.15rem; }
.profile-sub { margin: .2rem 0 .7rem; font-family: Orbitron, sans-serif; font-size: .78rem; letter-spacing: .12em; color: var(--fg-mute); text-transform: uppercase; }

/* магазин */
.shop-bal, .shop-sheet .shop-bal { color: var(--fg-mute); margin: .2rem 0 1rem; }
.shop-bal b { color: var(--gold); }
.shop-grid { display: flex; flex-direction: column; gap: .8rem; margin-bottom: 1rem; }
.shop-card { display: flex; gap: .9rem; align-items: center; padding: .7rem; border-radius: 16px;
  background: rgba(200,235,255,.05); border: 1px solid rgba(160,220,255,.12); }
.shop-cv { width: 90px; height: 90px; flex: none; border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 40% 30%, #0e3350, #06192b); }
.shop-cv canvas { width: 100%; height: 100%; }
.shop-info { flex: 1; min-width: 0; }
.shop-name { font: 700 1rem Rajdhani, sans-serif; color: var(--fg); }
.shop-have { color: var(--accent); font-size: .8rem; margin-left: .3rem; }
.shop-boost { color: var(--fg-mute); font-size: .8rem; margin: .1rem 0 .3rem; }
.shop-price { color: var(--gold); font-size: .82rem; margin-bottom: .5rem; }
.shop-qty { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.qbtn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(160,220,255,.25);
  background: rgba(200,235,255,.08); color: var(--fg); font-size: 1.1rem; cursor: pointer; line-height: 1; }
.qbtn:hover { background: rgba(200,235,255,.18); }
.qval { min-width: 1.6em; text-align: center; font: 700 1rem 'JetBrains Mono', monospace; color: var(--fg); }
.shop-buy { margin-left: auto; }
.shop-err { color: var(--danger); font-size: .82rem; margin: 0 0 .7rem; }

/* лидеры */
.board-sub { color: var(--fg-mute); font-size: .85rem; margin: .1rem 0 1rem; }
.board-list { display: flex; flex-direction: column; gap: .45rem; }
.board-row { display: flex; align-items: center; gap: .8rem; padding: .5rem .7rem; border-radius: 12px; background: rgba(200,235,255,.05); }
.board-row:nth-child(1) { border: 1px solid rgba(255,213,74,.4); background: rgba(255,213,74,.08); }
.board-rank { width: 1.8em; text-align: center; font: 800 1.05rem Orbitron, sans-serif; color: var(--fg-mute); }
.board-row:nth-child(1) .board-rank { color: var(--gold); }
.board-ava { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; background: rgba(10,30,48,.7); border: 2px solid rgba(34,211,238,.35); }
.board-ava canvas, .board-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.board-name { flex: 1; min-width: 0; font: 600 .95rem Rajdhani, sans-serif; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-win { font: 700 .95rem 'JetBrains Mono', monospace; color: var(--gold); }
.board-list .empty, .shop-grid .empty { color: var(--fg-mute); text-align: center; padding: 1.5rem; }
@media (max-width: 480px) { .profile-actions { grid-template-columns: 1fr; } }

/* лидерборд внутри меню-карты: своя прокрутка до самого низа (видно всех) */
.mc-body.view-board .board-list { max-height: 52vh; overflow-y: auto; padding-right: 6px; margin-right: -4px; }
.mc-body.view-board .board-list::-webkit-scrollbar { width: 7px; }
.mc-body.view-board .board-list::-webkit-scrollbar-thumb { background: rgba(160,220,255,.25); border-radius: 4px; }
