:root {
  --bg: #020817;
  --bg-2: #050f2e;
  --maze: #123a92;
  --maze-hi: #2c74ff;
  --coin: #ffd84d;
  --coin-2: #ff9f1c;
  --pink: #ff3f8f;
  --cyan: #2ef6ff;
  --green: #4ef2a1;
  --text: #f6fbff;
  --muted: #8fa7d6;
  --line: rgba(80, 139, 255, 0.38);
  --panel: rgba(3, 13, 42, 0.82);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% -20%, rgba(44, 116, 255, 0.28), transparent 34%),
    linear-gradient(90deg, rgba(44, 116, 255, 0.18) 2px, transparent 2px),
    linear-gradient(rgba(44, 116, 255, 0.18) 2px, transparent 2px),
    var(--bg);
  background-size: auto, 84px 84px, 84px 84px, auto;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 9%, rgba(255, 216, 77, 0.12) 9% 9.35%, transparent 9.35% 31%, rgba(46, 246, 255, 0.1) 31% 31.35%, transparent 31.35%),
    linear-gradient(180deg, transparent 0 18%, rgba(255, 216, 77, 0.1) 18% 18.45%, transparent 18.45% 69%, rgba(255, 63, 143, 0.12) 69% 69.35%, transparent 69.35%);
  opacity: 0.75;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(2, 8, 23, 0.86);
  backdrop-filter: blur(18px);
}

.logo,
.nav,
.actions,
.marquee,
footer {
  display: flex;
  align-items: center;
}

.logo {
  gap: 10px;
  color: var(--coin);
  font-weight: 950;
  font-size: 1.05rem;
  text-shadow: 0 0 18px rgba(255, 216, 77, 0.42);
}

.logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(46, 246, 255, 0.35));
}

.nav {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.nav a,
.button,
#pause,
#restart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(80, 139, 255, 0.46);
  border-radius: 8px;
  background: rgba(8, 24, 67, 0.8);
  color: #dce9ff;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 12px 32px rgba(0, 0, 0, 0.22);
}

.nav a:hover,
.button:hover,
#pause:hover,
#restart:hover {
  border-color: var(--coin);
  color: var(--text);
}

.nav .buy,
.button.main,
#pause,
#restart {
  border-color: rgba(255, 216, 77, 0.78);
  color: #081126;
  background: linear-gradient(180deg, #fff07a, var(--coin) 48%, var(--coin-2));
  box-shadow: 0 0 24px rgba(255, 216, 77, 0.24), 0 14px 36px rgba(0, 0, 0, 0.32);
}

.button.ghost {
  color: var(--cyan);
}

.hero {
  min-height: calc(100vh - 69px);
  display: flex;
  align-items: center;
  position: relative;
  padding: 34px 0 58px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 8, 23, 0.96) 0 24%, rgba(2, 8, 23, 0.68) 52%, rgba(2, 8, 23, 0.9) 100%),
    linear-gradient(180deg, rgba(2, 8, 23, 0.16), rgba(2, 8, 23, 0.86));
}

.hero-inner,
.tokenomics,
.game-wrap {
  width: min(1180px, calc(100% - 34px));
  margin: 0 auto;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(300px, 0.62fr);
  align-items: center;
  gap: clamp(18px, 4vw, 58px);
  position: relative;
  z-index: 3;
}

.hero-copy {
  position: relative;
  z-index: 4;
  max-width: 650px;
}

.contract-panel {
  margin-top: 26px;
  max-width: 540px;
}

.contract-copy {
  display: block;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(18, 58, 146, 0.4), var(--panel));
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.contract-copy:hover,
.contract-copy:focus-visible {
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(46, 246, 255, 0.12);
}

.contract-copy:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.contract-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.contract-copy-label {
  color: var(--cyan);
  white-space: nowrap;
}

.contract-address {
  display: block;
  margin-top: 10px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
  user-select: text;
}

.contract-copy.is-copied { border-color: var(--green); }
.contract-copy.is-copied .contract-copy-label { color: var(--green); }
.contract-note,
.contract-status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}
.contract-status { min-height: 1.5em; color: var(--cyan); }

.footer-copy { min-width: 0; }

.tag {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  color: var(--coin);
  font-size: clamp(4.6rem, 11vw, 9.6rem);
  line-height: 0.8;
  letter-spacing: 0;
  text-shadow:
    0 5px 0 #ff8a00,
    0 0 22px rgba(255, 216, 77, 0.45),
    0 32px 70px rgba(0, 0, 0, 0.55);
}

.hero-note {
  max-width: 430px;
  margin-bottom: 22px;
  color: #c7d7ff;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.45;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.6rem, 3.7vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.actions {
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  min-width: 132px;
}

.hero-scene {
  position: absolute;
  inset: 5% max(16px, calc((100vw - 1180px) / 2)) 7%;
  z-index: 0;
  min-height: 0;
  opacity: 0.34;
  isolation: isolate;
}

.hero-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  border: 2px solid rgba(44, 116, 255, 0.56);
  border-radius: 8px;
  background:
    radial-gradient(circle, rgba(255, 216, 77, 0.92) 0 4px, transparent 5px) 20px 20px / 44px 44px,
    linear-gradient(180deg, rgba(4, 15, 52, 0.88), rgba(3, 8, 29, 0.92));
  box-shadow: inset 0 0 36px rgba(44, 116, 255, 0.28), 0 0 42px rgba(44, 116, 255, 0.16);
}

.hero-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 8px;
  background:
    radial-gradient(circle at 28% 48%, transparent 0 19%, rgba(2, 8, 23, 0.72) 42%, rgba(2, 8, 23, 0.9) 100%),
    linear-gradient(90deg, rgba(2, 8, 23, 0.25), rgba(2, 8, 23, 0.82));
}

.hero-scene img,
.maze-track,
.pac-runner {
  position: absolute;
}

.maze-track {
  border: 3px solid var(--maze-hi);
  border-radius: 8px;
  box-shadow: inset 0 0 18px rgba(46, 246, 255, 0.24), 0 0 18px rgba(44, 116, 255, 0.46);
}

.track-a {
  width: 58%;
  height: 86px;
  right: 8%;
  top: 13%;
  border-left: 0;
}

.track-b {
  width: 54%;
  height: 110px;
  left: 8%;
  top: 38%;
  border-right: 0;
}

.track-c {
  width: 44%;
  height: 92px;
  right: 12%;
  bottom: 14%;
  border-left: 0;
}

.track-d {
  width: 12%;
  height: 48%;
  left: 46%;
  top: 20%;
  border-top: 0;
  border-bottom: 0;
}

.scene-coin {
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(255, 216, 77, 0.55)) drop-shadow(0 14px 14px rgba(0, 0, 0, 0.36));
}

.coin-a {
  left: 12%;
  top: 14%;
}

.coin-b {
  right: 4%;
  bottom: 30%;
}

.coin-c {
  left: 25%;
  bottom: 9%;
}

.pac-runner {
  left: 11%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: conic-gradient(from 34deg, transparent 0 72deg, var(--coin) 72deg 360deg);
  filter: drop-shadow(0 0 16px rgba(255, 216, 77, 0.55));
}

.character-frame {
  position: relative;
  z-index: 4;
  width: min(380px, 100%);
  margin-left: auto;
  aspect-ratio: 0.82;
  overflow: hidden;
  border: 2px solid rgba(255, 216, 77, 0.82);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 36%, rgba(46, 246, 255, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(7, 27, 76, 0.9), rgba(2, 8, 23, 0.94));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 0 44px rgba(44, 116, 255, 0.22),
    0 0 30px rgba(255, 216, 77, 0.18),
    0 28px 80px rgba(0, 0, 0, 0.5);
}

.character-frame::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(46, 246, 255, 0.35);
  border-radius: 6px;
}

.character-frame::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 7%;
  height: 22px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  filter: blur(10px);
}

.portrait-img {
  position: absolute;
  inset: 24px 24px 20px;
  z-index: 2;
  width: calc(100% - 48px);
  height: calc(100% - 44px);
  max-height: none;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(255, 216, 77, 0.22)) drop-shadow(0 30px 22px rgba(0, 0, 0, 0.48));
  animation: float 4s ease-in-out infinite;
}

.frame-corner {
  position: absolute;
  z-index: 3;
  width: 42px;
  height: 42px;
  border-color: var(--coin);
  filter: drop-shadow(0 0 10px rgba(255, 216, 77, 0.44));
}

.corner-a {
  top: 12px;
  left: 12px;
  border-top: 4px solid;
  border-left: 4px solid;
}

.corner-b {
  right: 12px;
  bottom: 12px;
  border-right: 4px solid;
  border-bottom: 4px solid;
}

.marquee {
  width: min(1180px, calc(100% - 34px));
  margin: 0 auto 76px;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.marquee span {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 17, 52, 0.78);
  color: #dbe7ff;
  font-weight: 950;
  box-shadow: var(--shadow);
}

.tokenomics {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 24px;
  padding-bottom: 72px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stats article,
.game-side,
#maze {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.stats article {
  min-height: 118px;
  padding: 16px;
}

.stats small {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 900;
  font-size: 0.78rem;
}

.stats strong {
  display: block;
  color: var(--text);
  font-size: clamp(1.15rem, 2vw, 1.9rem);
  line-height: 1;
}

.stats article:nth-child(1) strong,
.stats article:nth-child(3) strong {
  color: var(--coin);
}

.stats article:nth-child(2) strong {
  color: var(--green);
}

.game-wrap {
  padding-bottom: 76px;
}

.game-title {
  max-width: 760px;
  margin-bottom: 22px;
}

.game-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.game-side {
  padding: 16px;
}

.game-side img {
  width: 132px;
  height: 132px;
  object-fit: contain;
  display: block;
  margin: 0 auto 16px;
  filter: drop-shadow(0 0 16px rgba(255, 63, 143, 0.35));
}

.scoreline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-weight: 950;
}

.scoreline span {
  color: var(--muted);
}

.scoreline strong {
  color: var(--coin);
  font-size: 1.8rem;
}

#pause,
#restart {
  width: 100%;
  margin: 10px 0 0;
  border: 0;
  font: inherit;
  cursor: pointer;
}

#restart {
  margin-bottom: 14px;
}

.game-side p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

#maze {
  display: block;
  width: 100%;
  aspect-ratio: 720 / 520;
  height: auto;
  background: #020817;
}

footer {
  justify-content: center;
  gap: 12px;
  padding: 28px 18px 36px;
  border-top: 1px solid var(--line);
  color: var(--coin);
  font-weight: 950;
  background: rgba(2, 8, 23, 0.8);
}

footer img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-18px) rotate(2deg);
  }
}

[hidden] { display: none !important; }
button:disabled { opacity: .48; cursor: not-allowed; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.rewards-panel { padding: 24px; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.rewards-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.rewards-heading h3 { font-size: 1.5rem; margin: 12px 0 8px; }
.rewards-panel p { line-height: 1.6; color: var(--muted); }
.wallet-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 340px; }
.wallet-controls label { width: 100%; color: var(--muted); font-size: .85rem; }
.wallet-controls select, .withdraw-form input { padding: 11px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
.wallet-controls button, .withdraw-form button { cursor: pointer; }
.wallet-address { overflow-wrap: anywhere; font-family: ui-monospace, monospace; }
.player-identity { color: var(--cyan); font-size: .75rem; letter-spacing: .04em; }
.reward-balances { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin: 20px 0; }
.reward-balances > div { border: 1px solid var(--line); border-radius: 6px; padding: 16px; }
.reward-balances span { display: block; color: var(--muted); font-size: .8rem; margin-bottom: 8px; }
.reward-balances strong { color: var(--green); font-size: clamp(1rem,2vw,1.5rem); overflow-wrap: anywhere; }
.reward-balances small { display: block; margin-top: 8px; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.withdraw-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.withdraw-form label { display: grid; gap: 8px; font-size: .85rem; color: var(--muted); }
.withdraw-form input { width: 180px; }
.reward-note { font-size: .85rem; }
.wallet-status { min-height: 26px; }
.wallet-status.is-error { color: #ff9bb6; }
.test-network { color: var(--coin); }
.withdrawal-history { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.withdrawal-history summary { cursor: pointer; color: var(--cyan); }
.withdrawal-history ol { padding-left: 24px; color: var(--muted); }
.withdrawal-history li { padding: 8px 0; line-height: 1.7; }
.withdrawal-history a { color: var(--cyan); }
.withdrawal-history small { display: block; }
#maze { touch-action: none; }
.direction-controls { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }
.direction-controls button { width: 52px; height: 48px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); color: var(--coin); font-size: 1.5rem; cursor: pointer; touch-action: manipulation; }
.controls-hint { color: var(--muted); font-size: .8rem; text-align: center; line-height: 1.6; }

@media (max-width: 650px) {
  .rewards-panel { padding: 16px; }
  .rewards-heading { display: block; }
  .wallet-controls { max-width: none; margin-top: 16px; }
  .reward-balances { grid-template-columns: 1fr; }
  .reward-balances > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
  .reward-balances small { flex-basis: 100%; margin: 0; }
  .reward-balances span { margin: 0; }
  .withdraw-form label { width: 100%; }
  .withdraw-form input { width: 100%; }
  .withdraw-form button { flex: 1; }
}

@media (max-width: 930px) {
  .topbar,
  .hero-inner,
  .tokenomics,
  .game-layout {
    display: block;
  }

  .logo {
    margin-bottom: 12px;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
    padding-top: 52px;
  }

  .hero-scene {
    inset: 4% 17px auto;
    height: 560px;
    margin-top: 0;
  }

  .character-frame {
    width: min(380px, 88vw);
    margin: 34px auto 0;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 22px;
  }

  .game-side {
    margin-bottom: 14px;
  }
}

@media (max-width: 560px) {
  .nav a {
    flex: 1 1 calc(50% - 8px);
  }

  .hero-scene {
    height: 480px;
    opacity: 0.28;
  }

  .character-frame {
    width: min(320px, 92vw);
  }

  .hero-note {
    font-size: 0.98rem;
  }

  .scene-coin {
    width: 58px;
    height: 58px;
  }

  .pac-runner {
    width: 40px;
    height: 40px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

}

/* The lobby contains the wallet; the arcade is a separate viewport on /play. */
.arcade-launcher {
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  overflow: hidden;
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid rgba(46, 246, 255, .35);
  border-radius: 12px;
  background: radial-gradient(ellipse at 15% 50%, rgba(44, 116, 255, .22), transparent 55%), #030a1b;
}
.launcher-portrait { flex: 0 0 180px; position: relative; }
.launcher-portrait::before { content: ''; position: absolute; inset: -22px; border: 1px solid var(--maze-hi); transform: rotate(-12deg); box-shadow: 0 0 60px rgba(44, 116, 255, .18); }
.launcher-portrait img { position: relative; display: block; width: 100%; filter: drop-shadow(0 12px 30px #000); }
.launcher-copy { max-width: 580px; }
.launcher-copy h3 { font-size: clamp(1.8rem, 4vw, 3rem); margin: 0 0 14px; }
.launcher-copy > p { color: var(--muted); line-height: 1.7; }
.launcher-copy .launcher-note { margin: 14px 0 0; font-size: .8rem; }
#enterGame { min-height: 50px; gap: 32px; padding: 0 22px; cursor: pointer; }
body.is-playing { height: 100dvh; overflow: hidden; background: #01040d; }
.arcade-screen {
  --arcade-chrome: 230px;
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background:
    radial-gradient(ellipse at 50% 40%, rgba(14, 60, 133, .22), transparent 70%),
    linear-gradient(rgba(44, 116, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 116, 255, .035) 1px, transparent 1px), #01040d;
  background-size: auto, 48px 48px, 48px 48px, auto;
}
.arcade-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px clamp(16px, 3vw, 48px); border-bottom: 1px solid rgba(80, 139, 255, .18); }
.arcade-header button { color: #b8c8e5; background: transparent; border: 1px solid rgba(80, 139, 255, .22); border-radius: 8px; cursor: pointer; }
.arcade-exit { display: flex; align-items: center; gap: 14px; padding: 10px 16px; font-size: .8rem; }
.arcade-exit > span { color: var(--cyan); font-size: 1.25rem; }
.arcade-brand { display: flex; align-items: center; gap: 10px; color: var(--coin); font-size: 1rem; font-weight: 950; letter-spacing: .08em; }
.arcade-brand > img { width: 40px; height: 40px; object-fit: contain; }
.arcade-network { display: block; margin-top: 5px; color: var(--muted); font-size: .55rem; font-weight: 600; letter-spacing: .14em; }
.arcade-fullscreen { width: 42px; height: 42px; font-size: 1.5rem; }
.arcade-header button:hover { color: var(--cyan); border-color: var(--cyan); }
.arcade-stage { min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 12px 20px; }
.arcade-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 960px); gap: 20px; flex-shrink: 0; }
.arcade-stats > div { text-align: center; }
.arcade-stats span { display: block; color: #8a9bb7; font-size: .6rem; font-weight: 700; letter-spacing: .14em; margin-bottom: 4px; }
.arcade-stats strong { font-size: clamp(1.2rem, 2.5vw, 2rem); color: var(--coin); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.arcade-stats .arcade-earnings strong { color: var(--green); }
.arcade-screen .game-board { width: min(100%, calc((100dvh - var(--arcade-chrome)) * 18 / 13)); min-height: 0; flex-shrink: 0; aspect-ratio: 18 / 13; box-shadow: 0 0 80px rgba(18, 58, 146, .13); }
.arcade-screen #maze { width: 100%; height: 100%; border-color: rgba(44, 116, 255, .5); border-radius: 6px; }
.arcade-status { color: #8a9bb7; text-align: center; font-size: .72rem; line-height: 1.5; margin: 0; min-height: 18px; }
.arcade-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(80, 139, 255, .18); padding: 14px clamp(16px, 3vw, 48px); }
.arcade-toolbar .controls-hint { margin: 0; color: #64748f; font-size: .68rem; }
.controls-hint > span { color: #adc0df; margin: 0 5px; }
.arcade-actions { display: flex; gap: 10px; }
.arcade-actions #pause, .arcade-actions #restart { width: auto; min-width: 100px; min-height: 40px; margin: 0; font-size: .8rem; }
.arcade-actions #pause { color: #c6d7f5; border: 1px solid rgba(80, 139, 255, .35); background: #071126; box-shadow: none; }
.arcade-toolbar .direction-controls { display: none; margin: 0; }
.portal-transition { position: absolute; inset: 0; z-index: 10; overflow: hidden; background: #000; }
.portal-transition video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portal-topline { position: absolute; top: max(24px, env(safe-area-inset-top)); left: clamp(20px, 4vw, 64px); right: clamp(20px, 4vw, 64px); display: flex; justify-content: space-between; align-items: center; gap: 20px; color: #738dab; font-size: .62rem; letter-spacing: .18em; }
.portal-topline button { color: #a9c6e9; background: rgba(0, 8, 24, .6); border: 1px solid rgba(80, 139, 255, .25); border-radius: 6px; padding: 10px 14px; cursor: pointer; font-size: .7rem; }
.portal-caption { position: absolute; bottom: max(8%, env(safe-area-inset-bottom)); left: 20px; right: 20px; text-align: center; pointer-events: none; }
.portal-caption > span { color: #6c89af; font-size: .55rem; letter-spacing: .38em; }
.portal-caption strong { display: block; color: #d9edff; font-size: clamp(1.6rem, 4vw, 3.4rem); font-weight: 800; letter-spacing: .18em; margin: 14px 0 20px; text-shadow: 0 0 35px #0064ff; }
.portal-caption p { color: #7089a9; font-size: .72rem; margin: 16px 0 0; }
.portal-progress { width: 150px; height: 2px; background: #0b1830; margin: 0 auto; overflow: hidden; }
.portal-progress::after { content: ''; display: block; width: 100%; height: 100%; background: var(--cyan); transform-origin: left; animation: portal-progress 4.5s linear both; }
.portal-fallback { position: absolute; inset: 0; perspective: 600px; transition: opacity .3s; }
.video-playing .portal-fallback { opacity: 0; }
.portal-fallback > i { position: absolute; top: 50%; left: 50%; width: 180px; height: 130px; border: 2px dotted #148cff; box-shadow: 0 0 24px rgba(0, 123, 255, .4), inset 0 0 24px rgba(0, 123, 255, .2); animation: portal-tunnel 2s linear infinite; }
.portal-fallback > i:nth-child(2) { animation-delay: -.4s; }
.portal-fallback > i:nth-child(3) { animation-delay: -.8s; }
.portal-fallback > i:nth-child(4) { animation-delay: -1.2s; }
.portal-fallback > i:nth-child(5) { animation-delay: -1.6s; }
@keyframes portal-tunnel { from { transform: translate(-50%, -50%) scale(.1); opacity: 0; } 25% { opacity: .8; } to { transform: translate(-50%, -50%) scale(9); opacity: 0; } }
@keyframes portal-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 700px) {
  .arcade-launcher { flex-direction: column; text-align: center; padding-top: 44px; }
  .launcher-portrait { flex: auto; width: 140px; }
  .arcade-screen { --arcade-chrome: 320px; }
  .arcade-header { padding: 12px; gap: 8px; }
  .arcade-exit { font-size: .68rem; gap: 6px; padding: 8px 10px; }
  .arcade-brand { font-size: .8rem; gap: 6px; letter-spacing: 0; }
  .arcade-brand > img { width: 30px; height: 30px; }
  .arcade-network { font-size: .45rem; letter-spacing: .05em; }
  .arcade-fullscreen { width: 34px; height: 34px; }
  .arcade-stage { padding: 12px; gap: 20px; }
  .arcade-stats { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .arcade-stats span { font-size: .5rem; letter-spacing: .06em; }
  .arcade-stats strong { font-size: 1.1rem; }
  .arcade-status { font-size: .68rem; max-width: 300px; }
  .arcade-toolbar { flex-wrap: wrap; justify-content: center; padding: 12px; gap: 14px; }
  .arcade-toolbar .controls-hint { display: none; }
  .arcade-toolbar .direction-controls { display: flex; gap: 8px; }
  .direction-controls button { width: 44px; height: 44px; }
  .arcade-actions #pause, .arcade-actions #restart { min-width: 76px; }
  .portal-topline { font-size: .5rem; letter-spacing: .08em; }
  .portal-caption { bottom: 12%; }
}
@media (pointer: coarse) and (min-width: 701px) {
  .arcade-toolbar .controls-hint { display: none; }
  .arcade-toolbar .direction-controls { display: flex; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .arcade-screen { --arcade-chrome: 150px; }
  .arcade-header { padding: 6px 14px; }
  .arcade-brand > img { width: 26px; height: 26px; }
  .arcade-stage { gap: 5px; padding: 4px 12px; }
  .arcade-stats { position: absolute; left: 16px; top: 20%; display: flex; flex-direction: column; gap: 12px; width: 120px; }
  .arcade-stats span { font-size: .45rem; }
  .arcade-stats strong { font-size: 1rem; }
  .arcade-status { font-size: .6rem; }
  .arcade-toolbar { padding: 6px 14px; flex-wrap: nowrap; }
  .arcade-toolbar .direction-controls button { width: 38px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .portrait-img, .portal-fallback > i, .portal-progress::after { animation: none; }
}

/* Economy additions share the existing navy arcade shell and original assets. */
.info-page { max-width: 1180px; margin: auto; padding: 60px 24px 100px; }
.info-heading { padding: 20px 0 44px; max-width: 740px; }
.info-heading .tag { display: block; margin: 32px 0 16px; }
.info-heading h1 { text-shadow: none; font-size: clamp(2.6rem,6vw,5rem); line-height: 1; margin: 0 0 24px; letter-spacing: -.055em; color: #e8f7ff; }
.info-heading p { color: #9bb2cf; }
.back-lobby { color: #77d7ed; font-size: .75rem; letter-spacing: .1em; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.info-card { min-width: 0; padding: 30px; background: #08162b; border: 1px solid #173350; border-radius: 14px; }
.info-card h2 { color: #e3f5ff; font-size: 1.15rem; line-height: 1.45; margin: 16px 0 20px; }
.info-card p { color: #a5b6cc; font-size: .92rem; line-height: 1.7; }
.info-card .tag { color: #66cfe8; font-size: .65rem; letter-spacing: .13em; }
.info-card .info-callout { color: #8ce8f1; border-left: 2px solid #58bbd5; padding-left: 14px; }
.info-metric { display: block; font-size: clamp(1.5rem,3vw,2.5rem); color: #83e8fa; line-height: 1.2; margin: 24px 0 16px; font-variant-numeric: tabular-nums; }
.perfect-run { background: linear-gradient(145deg,#102b48,#11182e); }
.info-card table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
.info-card th { color: #8fa9c4; font-size: .72rem; font-weight: 500; }
.info-card td { color: #d7edf9; }
.info-card th,.info-card td { padding: 12px 6px; border-bottom: 1px solid #1b3048; }
.info-card label { display: block; color: #a5b6cc; font-size: .85rem; margin-bottom: 10px; }
.info-card input,.info-card select { background: #020c1d; border: 1px solid #2b5278; color: #e1f7ff; border-radius: 8px; padding: 13px; width: 100%; font: inherit; }
.info-values { margin: 0; font-variant-numeric: tabular-nums; }
.info-values > div { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid #18304b; padding: 11px 0; }
.info-values dt { color: #8da6c1; font-size: .78rem; }
.info-values dd { color: #d9f7ff; font-size: .85rem; margin: 0; text-align: right; overflow-wrap: anywhere; }
.calculator-result { display: block; color: #83e8fa; margin: 20px 0; font-size: 1.45rem; }
.pool-card { grid-column: 1 / -1; }
.pool-card .info-values { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
.economy-hud { width: min(100%,960px); display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 16px; background: #08162b; border: 1px solid #173350; border-radius: 8px; flex-shrink: 0; }
.economy-hud small { display: block; color: #8da6c1; font-size: .55rem; margin-bottom: 5px; letter-spacing: .07em; }
.economy-hud strong { color: #83e8fa; font-variant-numeric: tabular-nums; }
.economy-hud .button { font-size: .65rem; padding: 10px; }
.next-tier { color: #a8c7e0; font-size: .7rem; }
.next-tier progress { display: block; margin-top: 5px; width: 100%; height: 4px; accent-color: #71daed; }
.reward-toast { height: 16px; flex-shrink: 0; font-size: .75rem; color: #82e8f7; text-align: center; }
.arcade-screen { --arcade-chrome: 320px; }
.arcade-stage { position: relative; gap: 8px; }
.game-over { position: absolute; z-index: 5; inset: auto 20px; margin: auto; max-width: 540px; padding: 26px; background: #071326f5; border: 1px solid #2f6081; border-radius: 12px; text-align: center; box-shadow: 0 18px 80px #0008; }
.game-over h2 { color: #b1efff; margin: 0 0 10px; }
.game-over p { color: #a6bbd0; font-size: .85rem; }
.game-over dl { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.game-over dt { color: #8da6c1; font-size: .6rem; }
.game-over dd { color: #e4f7ff; margin: 5px 0 0; font-size: 1.15rem; }
#withdrawTitle { scroll-margin-top: 30px; color: #c4f3ff; }
#withdrawAvailability { color: #9cbcd3; font-size: .85rem; }
.reward-balances { grid-template-columns: repeat(auto-fit,minmax(155px,1fr)); }
@media (max-width: 700px) {
  .info-page { padding: 24px 16px 60px; }
  .info-grid { grid-template-columns: 1fr; }
  .info-card { padding: 22px; }
  .pool-card .info-values { display: block; }
  .arcade-screen { --arcade-chrome: 390px; }
  .economy-hud { flex-wrap: wrap; gap: 8px; padding: 8px; }
  .economy-hud > div { flex: 1; }
  .economy-hud .next-tier { flex: 2; min-width: 100px; }
  .economy-hud strong { font-size: .85rem; }
  .game-over { padding: 16px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .arcade-screen { --arcade-chrome: 180px; }
  .economy-hud { max-width: 65%; margin-left: 100px; }
  .game-over { max-width: 440px; padding: 12px; }
  .game-over dl { gap: 6px; margin: 8px 0; }
}
