/* Self-hosted Scandia (scandia-web): body + headings. Wallpoet stays for arcade elements. */
@font-face {
  font-family: scandia-web;
  src: url("/assets/fonts/scandia-web-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: scandia-web;
  src: url("/assets/fonts/scandia-web-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* VICE GETAWAY — page chrome. Dark neon Vice City vibe. */

:root {
  --bg: #0d0a1a;
  --bg-2: #120c22;
  --ink: #f3ecff;
  --ink-muted: #9a8fc4;
  --pink: #ff2ec4;
  --teal: #2ee6d6;
  --orange: #ffb03a;
  --purple: #6a4bd6;
  --glass: rgba(28, 20, 52, 0.55);
  --glass-border: rgba(255, 255, 255, 0.12);
  --font-ui: scandia-web, Arial, sans-serif;
  --font-pixel: scandia-web, Arial, sans-serif;
  --card-radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(106, 75, 214, 0.22), transparent 60%),
    radial-gradient(900px 600px at 85% 110%, rgba(255, 46, 196, 0.12), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 20px 0;
}

/* ---------- Masthead ---------- */
.masthead {
  width: 100%;
  max-width: 1080px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: block;
  height: 48px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(255, 46, 196, 0.25));
}

.brand-name {
  font-family: var(--font-pixel);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--ink);
  text-shadow:
    0 0 8px rgba(255, 46, 196, 0.55),
    0 0 2px rgba(46, 230, 214, 0.6);
}

.brand-tag {
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Stage / canvas ---------- */
.stage {
  width: 100%;
  max-width: 1080px;
  display: flex;
  justify-content: center;
  /* keep the canvas at a true 2:1 so buffer pixels stay square */
  align-items: center;
  flex: 1;
}

.canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 1080px;
  aspect-ratio: 2 / 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 2px rgba(46, 230, 214, 0.35),
    0 0 34px rgba(255, 46, 196, 0.28),
    0 24px 80px rgba(0, 0, 0, 0.6);
  background: #05030d;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  /* buffer is high-res now; smooth upscale avoids uneven pixel doubling at 1.5x */
  image-rendering: auto;
  touch-action: none;
}

/* ---------- Touch zones (mobile only) ---------- */
.touch-zones {
  position: absolute;
  inset: 0;
  display: none;
  z-index: 3;
  pointer-events: none;
}
.steer-btn {
  position: absolute;
  bottom: 14px;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(10, 7, 22, 0.55);
  border: 2px solid var(--teal);
  box-shadow: 0 0 14px rgba(46, 230, 214, 0.55), inset 0 0 10px rgba(46, 230, 214, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  pointer-events: auto;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.steer-btn svg {
  width: 28px;
  height: 28px;
  fill: var(--teal);
}
.steer-left {
  left: 12px;
  border-color: var(--pink);
  box-shadow: 0 0 14px rgba(255, 46, 196, 0.55), inset 0 0 10px rgba(255, 46, 196, 0.25);
}
.steer-left svg {
  fill: var(--pink);
}
.steer-right {
  right: 12px;
}
.steer-btn.pressed {
  transform: scale(0.92);
  background: rgba(28, 20, 52, 0.85);
}
/* Steering buttons are for touch phones only: any hover-capable
   fine-pointer device (desktop/laptop) never shows them, even at
   narrow window widths. */
@media (hover: hover) and (pointer: fine) {
  .touch-zones {
    display: none !important;
  }
}

/* ---------- Waitlist glass card ---------- */
.waitlist-card {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: min(360px, 62%);
  padding: 18px 18px 16px;
  border-radius: var(--card-radius);
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  z-index: 4;
}

.wl-kicker {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.wl-title {
  margin: 0 0 6px;
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: #fff;
}

.wl-countdown {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--teal);
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

.wl-form {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.wl-input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 7, 20, 0.6);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.wl-input::placeholder {
  color: rgba(154, 143, 196, 0.8);
}
.wl-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 230, 214, 0.22);
}

.wl-button {
  flex: 0 0 auto;
  padding: 13.4px 16px 10.6px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(180deg, #ffc766, var(--orange));
  color: #2a1500;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(255, 176, 58, 0.35);
  transition: transform 120ms ease, box-shadow 160ms ease, filter 120ms ease;
}
.wl-button:hover {
  filter: brightness(1.05);
  box-shadow: 0 8px 22px rgba(255, 176, 58, 0.5);
}
.wl-button:active {
  transform: translateY(1px);
}
.wl-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.wl-status {
  margin: 10px 2px 0;
  min-height: 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.wl-status.ok {
  color: #57e39a;
}
.wl-status.dup {
  color: var(--teal);
}
.wl-status.err {
  color: #ff6a8a;
}

/* BUSTED pulse to draw the eye to the card */
@keyframes cardPulse {
  0%,
  100% {
    box-shadow:
      0 10px 40px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 0 0 0 rgba(255, 46, 196, 0);
  }
  50% {
    box-shadow:
      0 10px 40px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 0 0 6px rgba(255, 46, 196, 0.35);
  }
}
.waitlist-card.pulse {
  animation: cardPulse 1.1s ease-in-out 4;
}

/* ---------- Footer ---------- */
.about {
  width: 100%;
  max-width: 1080px;
  margin: 38px auto 10px;
  padding: 40px 44px;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 40px;
  background: linear-gradient(180deg, #1b1432, #140f24);
  border: 1px solid rgba(46, 230, 214, 0.16);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  text-align: left;
}

.about-rule {
  background: linear-gradient(
    180deg,
    transparent,
    rgba(46, 230, 214, 0.55),
    rgba(255, 46, 196, 0.55),
    transparent
  );
}

.about-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal, #2ee6d6);
  margin: 0 0 10px;
}

.about-kicker-pink {
  color: #ff2ec4;
}

.about h1 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 0 0 14px;
}

.about h2 {
  font-size: 21px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 14px;
}

.about p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-muted);
  margin: 0;
}

.about p + p {
  margin-top: 12px;
}

.about-cta {
  display: inline-block;
  margin-top: 18px;
  color: #2ee6d6;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid rgba(46, 230, 214, 0.5);
  padding-bottom: 3px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

a.about-cta:hover {
  color: #fff;
  border-color: #2ee6d6;
}

.about-cta-soon {
  color: #ffd23f;
  border-color: rgba(255, 210, 63, 0.45);
  cursor: pointer;
}

a.about-cta-soon:hover {
  color: #fff;
  border-color: #ffd23f;
}

@media (max-width: 860px) {
  .about {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 30px 24px;
  }

  .about-rule {
    height: 1px;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(46, 230, 214, 0.55),
      rgba(255, 46, 196, 0.55),
      transparent
    );
  }

  .about h1 {
    font-size: 18px;
  }

  .about h2 {
    font-size: 18px;
  }
}

.site-footer {
  width: 100%;
  max-width: 1080px;
  text-align: center;
  padding: 22px 0 26px;
  color: var(--ink-muted);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

/* ---------- Mobile: card becomes a bar under the canvas ---------- */
@media (max-width: 768px) {
  .page {
    padding: 16px 12px 0;
  }
  .masthead {
    margin-bottom: 14px;
  }
  .brand-tag {
    display: none;
  }
  .brand-logo {
    height: 34px;
  }
  .canvas-wrap {
    /* Taller aspect for portrait play */
    aspect-ratio: 3 / 4;
    max-width: 520px;
  }
  .touch-zones {
    display: block;
  }
  .waitlist-card {
    position: static;
    width: 100%;
    max-width: 520px;
    margin: 14px auto 0;
    right: auto;
    bottom: auto;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg-2);
    border-color: rgba(255, 255, 255, 0.1);
  }
  .stage {
    flex-direction: column;
    align-items: center;
  }
}

/* ---------- Busted record card overlay ---------- */
.busted-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 6;
  padding: 16px;
}
.busted-overlay.show {
  display: flex;
}

.record-card {
  width: min(340px, 92%);
  background: linear-gradient(180deg, rgba(24, 16, 46, 0.96), rgba(14, 9, 28, 0.97));
  border: 1px solid rgba(46, 230, 214, 0.45);
  border-radius: 12px;
  padding: 16px 16px 14px;
  box-shadow:
    0 0 0 1px rgba(255, 46, 196, 0.25),
    0 20px 60px rgba(0, 0, 0, 0.7);
  color: var(--ink);
  font-family: var(--font-ui);
}

.record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.record-badge {
  font-family: var(--font-pixel);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 8px;
  color: var(--teal);
  letter-spacing: 0.5px;
}
.record-case {
  font-family: var(--font-pixel);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 7px;
  color: var(--ink-muted);
}

.record-line {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.record-sub {
  margin: 0 0 8px;
  font-family: var(--font-pixel);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 8px;
  color: var(--ink-muted);
  letter-spacing: 0.5px;
}
.record-hint {
  margin: 8px 0 10px;
  font-size: 10px;
  color: var(--ink-muted);
}

.initials-row {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin: 6px 0;
}
.initial-cell {
  width: 34px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 20px;
  color: var(--teal);
  background: rgba(10, 7, 20, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
}
.initial-cell.active {
  border-color: var(--pink);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 46, 196, 0.25);
}

.record-btn,
.record-retry {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12.4px 11px 9.6px;
  border: none;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
.record-btn {
  background: linear-gradient(180deg, #43e0ff, var(--teal));
  color: #04231f;
}
.record-retry {
  background: linear-gradient(180deg, #ffc766, var(--orange));
  color: #2a1500;
}
.record-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.board-list {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
}
.board-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.board-row + .board-row {
  margin-top: 2px;
}
.board-rank {
  font-family: var(--font-pixel);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 8px;
  color: var(--ink-muted);
}
.board-ini {
  font-family: var(--font-pixel);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 10px;
  color: var(--ink);
  letter-spacing: 1px;
}
.board-score {
  font-weight: 700;
  color: var(--teal);
}
.board-row.you {
  background: rgba(255, 46, 196, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 46, 196, 0.5);
}
.board-row.you .board-ini {
  color: var(--pink);
}
.board-row.you .board-score {
  color: #fff;
}
.board-loading {
  list-style: none;
  text-align: center;
  font-family: var(--font-pixel);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 8px;
  color: var(--ink-muted);
  padding: 10px 0;
}

@media (max-width: 768px) {
  .record-card {
    width: min(340px, 96%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .waitlist-card.pulse {
    animation: none;
  }
  .wl-button,
  .wl-input {
    transition: none;
  }
}

/* ---------- Top navigation (variant 2: arcade tabs) ---------- */
.masthead {
  position: relative;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  position: relative;
  color: var(--ink-muted, #9d93b8);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 12px 14px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: linear-gradient(90deg, #2ee6d6, #ff2ec4);
  border-radius: 2px;
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nav-link:hover {
  color: var(--ink, #efeaff);
}

.nav-link:hover::after {
  opacity: 1;
  transform: scaleX(1);
  box-shadow: 0 0 12px rgba(255, 46, 196, 0.7);
}

.nav-cta {
  color: #2ee6d6;
  border: 1.5px solid rgba(46, 230, 214, 0.6);
  border-radius: 10px;
  margin-left: 12px;
  /* top/bottom padding offset by 0.05em: Scandia caps sit high in the line box */
  padding: 11.5px 16px 8.5px;
  box-shadow:
    inset 0 0 14px rgba(46, 230, 214, 0.12),
    0 0 14px rgba(46, 230, 214, 0.25);
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta::after {
  display: none;
}

.nav-cta:hover {
  color: #fff;
  border-color: #2ee6d6;
  box-shadow:
    inset 0 0 20px rgba(46, 230, 214, 0.25),
    0 0 22px rgba(46, 230, 214, 0.5);
}

.soon-tag {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ffd23f;
  border: 1px solid rgba(255, 210, 63, 0.5);
  border-radius: 4px;
  padding: 1px 4px;
  margin-left: 6px;
  vertical-align: 2px;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 38px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(157, 147, 184, 0.35);
  border-radius: 9px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink, #efeaff);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1120px) {
  .nav-toggle {
    display: flex;
  }

  .top-nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 40;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    background: linear-gradient(180deg, rgba(29, 22, 49, 0.98), rgba(21, 16, 36, 0.98));
    border: 1px solid rgba(46, 230, 214, 0.18);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  }

  .top-nav.open {
    display: flex;
  }

  .top-nav .nav-link {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(157, 147, 184, 0.15);
  }

  .top-nav .nav-link::after {
    display: none;
  }

  .top-nav .nav-cta {
    margin: 10px 4px 4px;
    text-align: center;
    border-bottom: none;
  }
}

/* ---------- About page ---------- */
.apage {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto 10px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.ap-hero {
  display: grid;
  grid-template-columns: 1fr 1px 1.05fr;
  gap: 40px;
  padding: 40px 44px;
  background: linear-gradient(180deg, #1b1432, #140f24);
  border: 1px solid rgba(46, 230, 214, 0.16);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.ap-hero h1 {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 0 0 14px;
}

.ap-story p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-muted);
  margin: 0 0 14px;
}

.ap-link {
  color: #2ee6d6;
  text-decoration: none;
  border-bottom: 1px solid rgba(46, 230, 214, 0.45);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.ap-link:hover {
  color: #fff;
  border-color: #2ee6d6;
}

.ap-tl {
  position: relative;
  padding-left: 26px;
}

.ap-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: -19.5px;
  top: 18px;
  bottom: -4px;
  width: 2px;
  border-radius: 2px;
}

.ap-now::after {
  background: linear-gradient(180deg, #2ee6d6, #ff2ec4);
}

.ap-next::after {
  background: linear-gradient(180deg, #ff2ec4, #b44cff);
}

.ap-beta::after {
  background: linear-gradient(180deg, #b44cff, #ffd23f);
}

.ap-step {
  position: relative;
  padding: 0 0 20px 14px;
}

.ap-step:last-child {
  padding-bottom: 0;
}

.ap-step::before {
  content: "";
  position: absolute;
  box-sizing: border-box;
  left: -26px;
  top: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #1b1432;
  border: 3px solid #2ee6d6;
  box-shadow: 0 0 12px rgba(46, 230, 214, 0.6);
}

.ap-next::before {
  border-color: #ff2ec4;
  box-shadow: 0 0 12px rgba(255, 46, 196, 0.6);
}

.ap-beta::before {
  border-color: #b44cff;
  box-shadow: 0 0 12px rgba(180, 76, 255, 0.6);
}

.ap-launch::before {
  border-color: #ffd23f;
  box-shadow: 0 0 12px rgba(255, 210, 63, 0.6);
}

.ap-step h2 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 6px;
}

.ap-step p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0;
}

.ap-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3.1px 8px 0.9px;
  border-radius: 5px;
  margin-left: 8px;
  vertical-align: 2px;
}

.ap-tag-live {
  color: #0d0a1a;
  background: #2ee6d6;
}

.ap-tag-soon {
  color: #ffd23f;
  border: 1px solid rgba(255, 210, 63, 0.5);
}

.ap-tag-plan {
  color: #ff2ec4;
  border: 1px solid rgba(255, 46, 196, 0.5);
}

.ap-section {
  padding: 36px 44px;
  background: linear-gradient(180deg, #1b1432, #140f24);
  border: 1px solid rgba(157, 147, 184, 0.16);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.ap-h2 {
  font-size: 24px;
  font-weight: 900;
  color: var(--ink);
  margin: 0 0 12px;
}

.ap-lead {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-muted);
  margin: 0 0 22px;
}

.ap-eco {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.ap-eco-card {
  display: block;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(157, 147, 184, 0.2);
  border-radius: 14px;
  padding: 18px;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

a.ap-eco-card:hover {
  border-color: rgba(46, 230, 214, 0.55);
  transform: translateY(-3px);
}

.ap-eco-card .ap-tag {
  margin: 0 0 10px;
}

.ap-eco-card h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 8px;
}

.ap-eco-card p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-muted);
  margin: 0;
}

.ap-miss {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ap-mcard {
  position: relative;
  border-radius: 4px;
  padding: 22px 22px 20px 30px;
  background: #120d22;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.ap-mcard::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.ap-m1::before {
  background: #2ee6d6;
  box-shadow: 2px 0 14px rgba(46, 230, 214, 0.6);
}

.ap-m2::before {
  background: #ff2ec4;
  box-shadow: 2px 0 14px rgba(255, 46, 196, 0.6);
}

.ap-m3::before {
  background: #b44cff;
  box-shadow: 2px 0 14px rgba(180, 76, 255, 0.6);
}

.ap-m4::before {
  background: #ffd23f;
  box-shadow: 2px 0 14px rgba(255, 210, 63, 0.6);
}

.ap-mtop {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ap-mcode {
  font-family: "Wallpoet", cursive;
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
}

.ap-mstat {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 13px;
  padding: 6px 9px 3px;
  border-radius: 4px;
}

.ap-mstat-rdy {
  color: #2ee6d6;
  border: 1px solid rgba(46, 230, 214, 0.45);
}

.ap-mstat-lck {
  color: var(--ink-muted);
  border: 1px solid rgba(157, 147, 184, 0.35);
}

.ap-mcard h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 7px;
}

.ap-mcard p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0;
}

.ap-mpips {
  display: flex;
  gap: 5px;
  margin-top: 14px;
}

.ap-mpip {
  width: 26px;
  height: 5px;
  border-radius: 2px;
  background: rgba(157, 147, 184, 0.25);
}

.ap-m1 .ap-mpip.on {
  background: #2ee6d6;
  box-shadow: 0 0 8px rgba(46, 230, 214, 0.7);
}

.ap-m2 .ap-mpip.on {
  background: #ff2ec4;
  box-shadow: 0 0 8px rgba(255, 46, 196, 0.7);
}

.ap-m3 .ap-mpip.on {
  background: #b44cff;
  box-shadow: 0 0 8px rgba(180, 76, 255, 0.7);
}

.ap-m4 .ap-mpip.on {
  background: #ffd23f;
  box-shadow: 0 0 8px rgba(255, 210, 63, 0.7);
}

.ap-faq details {
  border-bottom: 1px solid rgba(157, 147, 184, 0.2);
}

.ap-faq details:last-child {
  border-bottom: none;
}

.ap-faq summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 16px 34px 16px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.ap-faq summary::-webkit-details-marker {
  display: none;
}

.ap-faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: #2ee6d6;
  font-size: 20px;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.ap-faq details[open] summary::after {
  content: "−";
  color: #ff2ec4;
}

.ap-faq details p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-muted);
  margin: 0;
  padding: 0 0 18px;
}

.nav-link.active {
  color: var(--ink);
}

.nav-link.active::after {
  opacity: 1;
  transform: scaleX(1);
}



/* Homepage: socials micro pill */
.home-soc {
  display: flex;
  justify-content: center;
  margin: 20px 0 0;
}

.home-soc-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 13px;
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #17102b, #110c20);
  border: 1px solid rgba(46, 230, 214, 0.22);
  box-shadow: 0 0 18px rgba(46, 230, 214, 0.06), inset 0 0 12px rgba(0, 0, 0, 0.35);
}

.home-soc-label {
  color: var(--teal);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  margin-right: 3px;
}

.home-soc-a {
  color: var(--ink-muted);
  transition: color 0.18s, filter 0.18s;
}

.home-soc-a svg {
  display: block;
  width: 15px;
  height: 15px;
}

.home-soc-a:hover {
  color: var(--ink);
  filter: drop-shadow(0 0 6px rgba(255, 46, 196, 0.8));
}

@media (max-width: 480px) {
  .home-soc-pill {
    gap: 9px;
    padding: 9px 13px;
  }
  .home-soc-label {
    letter-spacing: 0.18em;
  }
}

/* Mod categories: arcade select screen */
.ap-cat-frame {
  background: #0b0817;
  border: 1px solid rgba(46, 230, 214, 0.28);
  border-radius: 14px;
  padding: 26px 24px 24px;
  position: relative;
  overflow: hidden;
}

.ap-cat-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 4px
  );
}

.ap-cat-head {
  font-family: "Wallpoet", scandia-web, Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--teal);
  text-shadow: 0 0 12px rgba(46, 230, 214, 0.55);
  margin: 0 0 20px;
  text-align: center;
}

.ap-cat-dot {
  opacity: 0;
}

.ap-cat-head .ap-cat-dot:nth-child(1) {
  animation: ap-cat-dot-1 2s steps(1, end) infinite;
}

.ap-cat-head .ap-cat-dot:nth-child(2) {
  animation: ap-cat-dot-2 2s steps(1, end) infinite;
}

.ap-cat-head .ap-cat-dot:nth-child(3) {
  animation: ap-cat-dot-3 2s steps(1, end) infinite;
}

@keyframes ap-cat-dot-1 {
  0% { opacity: 0; }
  25%, 100% { opacity: 1; }
}

@keyframes ap-cat-dot-2 {
  0%, 45% { opacity: 0; }
  50%, 100% { opacity: 1; }
}

@keyframes ap-cat-dot-3 {
  0%, 70% { opacity: 0; }
  75%, 100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ap-cat-dot {
    opacity: 1;
    animation: none;
  }
}

.ap-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  position: relative;
  z-index: 1;
}

.ap-cat-tile {
  border: 1px solid rgba(157, 147, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 16px 10px 8px;
  text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ap-cat-icon {
  width: 30px;
  height: 30px;
  stroke-width: 1.7;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ap-cat-name {
  font-family: "Wallpoet", scandia-web, Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  margin: 12px 0 4px;
  color: var(--ink);
}

.ap-cat-slot {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-muted);
  margin: 0 0 6px;
}

.ap-cat-tile.ct-teal   { color: var(--teal); }
.ap-cat-tile.ct-pink   { color: var(--pink); }
.ap-cat-tile.ct-yellow { color: #ffd23f; }
.ap-cat-tile.ct-purple { color: #b44cff; }

.ap-cat-tile.ct-teal:hover   { border-color: var(--teal);   box-shadow: 0 0 18px rgba(46, 230, 214, 0.25), inset 0 0 14px rgba(46, 230, 214, 0.08); }
.ap-cat-tile.ct-pink:hover   { border-color: var(--pink);   box-shadow: 0 0 18px rgba(255, 46, 196, 0.25), inset 0 0 14px rgba(255, 46, 196, 0.08); }
.ap-cat-tile.ct-yellow:hover { border-color: #ffd23f; box-shadow: 0 0 18px rgba(255, 210, 63, 0.25), inset 0 0 14px rgba(255, 210, 63, 0.08); }
.ap-cat-tile.ct-purple:hover { border-color: #b44cff; box-shadow: 0 0 18px rgba(180, 76, 255, 0.25), inset 0 0 14px rgba(180, 76, 255, 0.08); }

@media (max-width: 900px) {
  .ap-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 24px;
  }

  .ap-hero .about-rule {
    height: 1px;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(46, 230, 214, 0.55),
      rgba(255, 46, 196, 0.55),
      transparent
    );
  }

  .ap-hero h1 {
    font-size: 24px;
  }

  .ap-section {
    padding: 26px 22px;
  }

  .ap-h2 {
    font-size: 20px;
  }

  .ap-eco {
    grid-template-columns: 1fr 1fr;
  }

  .ap-miss {
    grid-template-columns: 1fr;
  }

  .ap-cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .ap-eco {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   LEADERBOARD PAGE (/leaderboard/) — arcade CRT high scores
   ============================================================ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.lbpage {
  width: 100%;
  min-width: 0;
  max-width: 1080px;
  margin: 0 auto;
  padding: 34px 0 0;
}

/* --- CRT screen --- */
.lb-crt {
  position: relative;
}

.lb-screen {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 2px solid rgba(46, 230, 214, 0.35);
  background: #0a0716;
  padding: 40px 40px 34px;
  box-shadow: inset 0 0 80px rgba(46, 230, 214, 0.06), 0 0 40px rgba(46, 230, 214, 0.1);
}

.lb-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
}

.lb-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.5));
}

.lb-title {
  font-family: "Wallpoet", cursive;
  text-align: center;
  font-size: clamp(26px, 4.4vw, 38px);
  letter-spacing: 0.08em;
  margin: 0 0 6px;
  color: var(--pink, #ff2ec4);
  text-shadow: 0 0 18px rgba(255, 46, 196, 0.8), 0 0 40px rgba(255, 46, 196, 0.4);
}

.lb-sub {
  text-align: center;
  font-family: "Wallpoet", cursive;
  font-size: 12px;
  color: #2ee6d6;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin: 0 0 30px;
  text-shadow: 0 0 10px rgba(46, 230, 214, 0.7);
}

.lb-rows {
  font-family: "Wallpoet", cursive;
  font-size: 17px;
  max-width: 660px;
  margin: 0 auto;
  min-height: 340px;
}

.lb-state {
  text-align: center;
  color: #2ee6d6;
  font-size: 13px;
  letter-spacing: 0.24em;
  padding: 130px 10px;
  margin: 0;
  text-shadow: 0 0 10px rgba(46, 230, 214, 0.7);
  animation: lbBlink 1.2s steps(2, start) infinite;
}

@keyframes lbBlink {
  50% {
    opacity: 0.35;
  }
}

.lb-row {
  display: grid;
  grid-template-columns: 86px 52px 1fr 170px;
  align-items: center;
  padding: 9px 6px;
}

.lb-med {
  font-size: 16px;
  line-height: 1;
}

/* The viewer's own best run, matched by anonymous device cookie. */
.lb-row.lb-you {
  background: #7fe9d9;
  border-radius: 10px;
  box-shadow: 0 0 22px rgba(46, 230, 214, 0.35);
}

.lb-row.lb-you .lb-rk {
  color: #0a0716;
  opacity: 0.5;
  text-shadow: none;
}

.lb-row.lb-you .lb-med {
  color: #0a0716;
  text-shadow: none;
  font-size: 13px;
}

.lb-row.lb-you .lb-nm,
.lb-row.lb-you .lb-sc {
  color: #0a0716;
  text-shadow: none;
}

/* Pinned "your best" bar shown when the run sits on another page. */
.lb-best {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 14px 0 0;
  font-family: "Wallpoet", scandia-web, Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #2ee6d6;
  text-shadow: 0 0 12px rgba(46, 230, 214, 0.45);
}

.lb-best[hidden] {
  display: none;
}

.lb-rk {
  color: #9d93b8;
}

.lb-nm {
  letter-spacing: 0.12em;
}

.lb-sc {
  text-align: right;
  letter-spacing: 0.1em;
}

.lb-p1 {
  color: #ffd23f;
  text-shadow: 0 0 14px rgba(255, 210, 63, 0.7);
}

.lb-p2 {
  color: #2ee6d6;
  text-shadow: 0 0 14px rgba(46, 230, 214, 0.6);
}

.lb-p3 {
  color: #ff2ec4;
  text-shadow: 0 0 14px rgba(255, 46, 196, 0.6);
}

.lb-rest {
  color: #cfc6ec;
  font-size: 15px;
}

.lb-p1 .lb-rk {
  color: #ffd23f;
}

.lb-p2 .lb-rk {
  color: #2ee6d6;
}

.lb-p3 .lb-rk {
  color: #ff2ec4;
}

.lb-empty {
  color: rgba(157, 147, 184, 0.4);
  font-size: 15px;
}

.lb-foot {
  text-align: center;
  margin: 26px 0 0;
}

.lb-foot a {
  font-family: "Wallpoet", cursive;
  font-size: 12px;
  letter-spacing: 0.26em;
  color: #ffd23f;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 0 12px rgba(255, 210, 63, 0.7);
}

.lb-foot a:hover {
  color: #ffe27a;
}

.lb-cursor {
  animation: lbBlink 1s steps(2, start) infinite;
}

/* --- Info section --- */
.lb-info {
  margin-top: 54px;
}

.lb-info h2 {
  font-size: 26px;
  font-weight: 900;
  margin: 0 0 22px;
}

.lb-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.lb-step {
  background: #120d22;
  border: 1px solid rgba(157, 147, 184, 0.22);
  border-radius: 12px;
  padding: 20px 20px 22px;
  position: relative;
}

.lb-step-no {
  font-family: "Wallpoet", cursive;
  font-size: 13px;
  color: var(--teal, #2ee6d6);
  text-shadow: 0 0 10px rgba(46, 230, 214, 0.5);
}

.lb-step h3 {
  font-size: 17px;
  font-weight: 800;
  margin: 10px 0 8px;
}

.lb-step p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-muted, #9d93b8);
}

.lb-note {
  margin: 22px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted, #9d93b8);
}

@media (max-width: 860px) {
  .lb-steps {
    grid-template-columns: 1fr;
  }

  .lb-screen {
    padding: 30px 18px 26px;
  }

  .lb-rows {
    font-size: 14px;
  }

  .lb-row {
    grid-template-columns: 56px 34px 1fr 104px;
  }

  .lb-med {
    font-size: 13px;
  }

  .lb-rest,
  .lb-empty {
    font-size: 13px;
  }

  .lb-state {
    font-size: 11px;
    padding: 110px 6px;
  }
}

/* --- CRT pager --- */
.lb-pager[hidden] {
  display: none;
}

.lb-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin-top: 20px;
}

.lb-pbtn {
  font-family: "Wallpoet", cursive;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: #2ee6d6;
  background: none;
  border: 1px solid rgba(46, 230, 214, 0.45);
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  text-shadow: 0 0 10px rgba(46, 230, 214, 0.6);
  transition: background 0.15s ease, color 0.15s ease;
}

.lb-pbtn:hover:not(:disabled) {
  background: rgba(46, 230, 214, 0.12);
}

.lb-pbtn:disabled {
  opacity: 0.25;
  cursor: default;
  text-shadow: none;
}

.lb-pcount {
  font-family: "Wallpoet", cursive;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: #9d93b8;
}

@media (max-width: 860px) {
  .lb-pager {
    gap: 12px;
  }

  .lb-pbtn {
    font-size: 10px;
    padding: 7px 10px;
  }

  .lb-pcount {
    font-size: 10px;
  }
}

/* ---------- Pre-registration page ---------- */
.pr-crt {
  width: 100%;
  border-radius: 20px;
  border: 1px solid rgba(46, 230, 214, 0.35);
  background: #0a0716;
  padding: 14px;
  box-shadow:
    0 0 34px rgba(46, 230, 214, 0.12),
    0 20px 50px rgba(0, 0, 0, 0.35),
    inset 0 0 60px rgba(0, 0, 0, 0.6);
}

.pr-screen {
  position: relative;
  border-radius: 12px;
  padding: 42px 44px 46px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(46, 230, 214, 0.06), transparent 60%),
    #0a0716;
}

.pr-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.035) 0 1px,
    transparent 1px 3px
  );
}

.pr-title {
  margin: 0 0 22px;
  font-family: "Wallpoet", var(--font-ui);
  font-size: clamp(22px, 4vw, 34px);
  letter-spacing: 0.1em;
  color: var(--pink);
  text-shadow: 0 0 18px rgba(255, 46, 196, 0.5);
}

.pr-line {
  margin: 0 0 14px;
  font-family: "Wallpoet", var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.14em;
  line-height: 1.7;
  color: var(--teal);
}

.pr-line-dim {
  color: rgba(46, 230, 214, 0.55);
}

.pr-line-gold {
  color: #ffd23f;
}

.pr-prompt {
  margin: 26px 0 10px;
  font-family: "Wallpoet", var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
}

.pr-cursor::after {
  content: "\258C";
  color: var(--teal);
  animation: pr-blink 1s steps(1) infinite;
}

@keyframes pr-blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pr-cursor::after {
    animation: none;
  }
}

.pr-form {
  display: flex;
  gap: 12px;
}

.pr-input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  font: 700 14px "Wallpoet", var(--font-ui);
  letter-spacing: 0.08em;
  color: var(--teal);
  background: transparent;
  border: 1px solid rgba(46, 230, 214, 0.45);
  border-radius: 8px;
  outline: none;
}

.pr-input::placeholder {
  color: rgba(46, 230, 214, 0.4);
}

.pr-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 14px rgba(46, 230, 214, 0.25);
}

.pr-btn {
  padding: 14px 24px;
  font: 700 13px "Wallpoet", var(--font-ui);
  letter-spacing: 0.14em;
  color: #0a0716;
  background: #ffd23f;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255, 210, 63, 0.4);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.pr-btn:hover {
  box-shadow: 0 0 28px rgba(255, 210, 63, 0.6);
  transform: translateY(-1px);
}

.pr-btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.pr-ticker {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border: 1px solid rgba(157, 147, 184, 0.16);
  border-radius: 14px;
  padding: 13px 22px;
  background: linear-gradient(180deg, #1b1432, #140f24);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.pr-ticker strong {
  color: #ffd23f;
  font-family: "Wallpoet", var(--font-ui);
  font-weight: 400;
}

@media (max-width: 640px) {
  .pr-screen {
    padding: 30px 20px 34px;
  }

  .pr-form {
    flex-direction: column;
  }

  .pr-ticker {
    justify-content: center;
    text-align: center;
  }
}

.pr-eco3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .pr-eco3 {
    grid-template-columns: 1fr;
  }
}
