/* ==========================================================================
   Ventona Design System
   Light mode, pixel typography, clean utility layout
   Domain: ventona.xyz
   ========================================================================== */

:root {
  /* Surfaces (light) */
  --bg-deep: #f4f7f2;
  --bg-base: #eef3ea;
  --bg-raised: #ffffff;
  --bg-panel: #f7faf5;
  --bg-hover: #e8efe3;

  /* Lines */
  --line: #d5decd;
  --line-strong: #b8c4ae;
  --line-focus: #6eab00;

  /* Text */
  --text-primary: #1a2418;
  --text-secondary: #4a5846;
  --text-muted: #6f7d6a;
  --text-inverse: #1a2418;

  /* Accent (lime grass, solid, no glow) */
  --lime: #8fd000;
  --lime-deep: #6eab00;
  --lime-soft: #a8e020;
  --lime-wash: rgba(143, 208, 0, 0.12);
  --lime-border: rgba(110, 171, 0, 0.35);

  /* Semantic */
  --success: #2f9e62;
  --warning: #c4921a;
  --danger: #d04545;
  --info: #3a7eb0;

  /* Pixel palette */
  --pixel-grass: #8fd000;
  --pixel-grass-dark: #6eab00;
  --pixel-dirt: #8b5a2b;
  --pixel-dirt-dark: #6b4420;
  --pixel-sky: #87ceeb;
  --pixel-char: #b8ff00;

  /* Typography: pixel faces */
  --font-pixel: "Pixelify Sans", "Segoe UI", system-ui, sans-serif;
  --font-pixel-display: "Press Start 2P", "Pixelify Sans", monospace;
  --font-sans: var(--font-pixel);
  --font-mono: "Press Start 2P", "Pixelify Sans", monospace;

  --fs-xs: 0.7rem;
  --fs-sm: 0.85rem;
  --fs-base: 1rem;
  --fs-md: 1.1rem;
  --fs-lg: 1.2rem;
  --fs-xl: clamp(1.15rem, 1rem + 0.8vw, 1.45rem);
  --fs-2xl: clamp(1.35rem, 1.05rem + 1.2vw, 1.85rem);
  --fs-3xl: clamp(1.55rem, 1.15rem + 1.8vw, 2.35rem);

  --lh-tight: 1.35;
  --lh-snug: 1.5;
  --lh-body: 1.65;

  --nav-h: 4rem;
  --container: 72rem;
  --gutter: clamp(1rem, 4vw, 1.75rem);
  --radius: 0.5rem;
  --radius-sm: 0.25rem;
  --radius-lg: 0.75rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 150ms;
  --dur: 220ms;

  --shadow-sm: 0 1px 0 rgba(26, 36, 24, 0.06);
  --shadow-md: 0 10px 28px rgba(26, 36, 24, 0.08);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  min-height: 100vh;
  font-family: var(--font-pixel);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text-primary);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul,
ol {
  list-style: none;
}

.container {
  width: min(100% - var(--gutter) * 2, var(--container));
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100%;
  z-index: 1000;
  padding: 0.6rem 1rem;
  background: var(--lime);
  color: var(--text-inverse);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 0.75rem;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: var(--font-pixel-display);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: var(--lh-tight);
  color: var(--text-primary);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-pixel-display);
  font-size: 0.55rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lime-deep);
}

.eyebrow::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  background: var(--lime);
  border-radius: 1px;
  flex-shrink: 0;
}

.lead {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  max-width: 36rem;
  line-height: var(--lh-snug);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.85rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  font-family: var(--font-pixel-display);
  font-weight: 400;
  font-size: 0.58rem;
  letter-spacing: 0.03em;
  border: 2px solid transparent;
  transition:
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    transform var(--dur-fast) var(--ease);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 2px solid var(--line-focus);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--lime);
  color: var(--text-inverse);
  border-color: var(--lime-deep);
}

.btn-primary:hover {
  background: var(--lime-soft);
  border-color: var(--lime-deep);
}

.btn-secondary {
  background: var(--bg-raised);
  color: var(--text-primary);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  background: var(--bg-hover);
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 0.9em;
  height: 0.9em;
  flex-shrink: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 2px solid var(--line);
  background: rgba(244, 247, 242, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-pixel-display);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  z-index: 2;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border: 2px solid var(--line);
  background: var(--bg-raised);
}

.brand-text {
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.5rem 0.75rem;
  font-family: var(--font-pixel-display);
  font-size: 0.52rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  z-index: 2;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--line-focus);
  outline-offset: 2px;
}

.nav-toggle-bars {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--text-primary);
  position: relative;
  transition: background var(--dur-fast) var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--dur) var(--ease), top var(--dur) var(--ease);
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

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

  .nav-links {
    position: fixed;
    inset: 0;
    top: var(--nav-h);
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 1.25rem var(--gutter) 2rem;
    background: var(--bg-deep);
    border-top: 2px solid var(--line);
    transform: translateY(-0.5rem);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity var(--dur) var(--ease),
      transform var(--dur) var(--ease),
      visibility var(--dur) var(--ease);
  }

  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links a {
    padding: 0.9rem 1rem;
    font-size: 0.58rem;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-raised);
  }
}

/* --------------------------------------------------------------------------
   Hero (centered, image background, no side card)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: clamp(26rem, 68vh, 38rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(3.5rem, 9vw, 6rem) 0;
  border-bottom: 2px solid var(--line);
  overflow: hidden;
  background-color: #bfe4f4;
  background-image: url("/hero-bg.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(244, 247, 242, 0.42) 0%,
      rgba(244, 247, 242, 0.28) 40%,
      rgba(244, 247, 242, 0.55) 100%
    );
  pointer-events: none;
}

.hero-layout {
  position: relative;
  z-index: 1;
  width: min(100% - var(--gutter) * 2, 40rem);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-copy .eyebrow {
  justify-content: center;
}

.hero-copy h1 {
  font-size: var(--fs-3xl);
  margin: 1rem 0 1.15rem;
  max-width: 18ch;
}

.hero-copy .lead {
  margin-bottom: 1.75rem;
  max-width: 34rem;
  margin-inline: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Sections */
.section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.section + .section {
  border-top: 2px solid var(--line);
}

.section-head {
  max-width: 36rem;
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}

.section-head-center {
  max-width: 40rem;
  margin-inline: auto;
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
  text-align: center;
}

.section-head-center .eyebrow {
  justify-content: center;
}

.section-head h2 {
  font-size: var(--fs-2xl);
  margin: 0.85rem 0 1rem;
}

.section-head p {
  color: var(--text-secondary);
}

.section-alt {
  background: var(--bg-base);
}

.feature-grid,
.feature-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: start;
}

.split-copy h2 {
  font-size: var(--fs-2xl);
  margin: 0.85rem 0 1rem;
}

.split-copy p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  max-width: 32rem;
}

.split-panels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

  .feature-grid,
  .feature-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .feature-grid,
  .feature-grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .feature-grid .feature-card:last-child,
  .feature-grid-3 .feature-card:last-child {
    grid-column: 1 / -1;
  }
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.35rem 1.25rem;
  background: var(--bg-raised);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.feature-card:hover {
  border-color: var(--line-strong);
  background: var(--bg-panel);
}

.feature-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--lime-border);
  background: var(--lime-wash);
  border-radius: var(--radius-sm);
  color: var(--lime-deep);
}

.feature-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.feature-card h3 {
  font-size: 0.72rem;
  line-height: 1.45;
}

.feature-card p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-body);
}

.feature-card .tag {
  margin-top: auto;
  padding-top: 0.75rem;
  font-family: var(--font-pixel-display);
  font-size: 0.48rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-top: 2px solid var(--line);
}

.mech-panel {
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.mech-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 2px solid var(--line);
  background: var(--bg-panel);
}

.mech-panel-head h3 {
  font-size: 0.62rem;
}

.mech-panel-head span {
  font-family: var(--font-pixel-display);
  font-size: 0.48rem;
  color: var(--text-muted);
}

.mech-list {
  padding: 0.5rem 0;
}

.mech-list li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.mech-list li:last-child {
  border-bottom: none;
}

.mech-list .idx {
  font-family: var(--font-pixel-display);
  font-size: 0.48rem;
  color: var(--lime-deep);
  padding-top: 0.25rem;
}

.mech-list strong {
  display: block;
  font-family: var(--font-pixel);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

/* CTA */
.cta-band {
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: var(--bg-base);
  padding: clamp(2.5rem, 6vw, 3.5rem) 0;
}

.cta-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cta-band h2 {
  font-size: var(--fs-xl);
  margin-bottom: 0.55rem;
}

.cta-band p {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  max-width: 32rem;
}

.cta-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Footer */
.site-footer {
  padding: 2.5rem 0 2rem;
  border-top: 2px solid var(--line);
  background: var(--bg-deep);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer-nav a {
  font-family: var(--font-pixel-display);
  font-size: 0.5rem;
  color: var(--text-secondary);
  transition: color var(--dur) var(--ease);
}

.footer-nav a:hover {
  color: var(--lime-deep);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--line);
  font-family: var(--font-pixel-display);
  font-size: 0.48rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   App page
   -------------------------------------------------------------------------- */
body.app-body {
  background: var(--bg-deep);
}

.app-shell {
  min-height: calc(100vh - var(--nav-h));
  padding: clamp(1.5rem, 4vw, 2.25rem) 0 clamp(2rem, 5vw, 3rem);
  border-bottom: 2px solid var(--line);
}

.app-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--line);
}

.app-header-copy {
  max-width: 36rem;
}

.app-header-row h1 {
  font-size: var(--fs-xl);
  margin: 0.45rem 0 0.45rem;
}

.app-header-row .sub {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-snug);
}

.status-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  padding: 0.4rem 0.7rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--bg-raised);
  font-family: var(--font-pixel-display);
  font-size: 0.45rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.status-pill .dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 1px;
  background: var(--text-muted);
  flex-shrink: 0;
}

.status-pill.is-online .dot {
  background: var(--success);
}

.status-pill.is-offline .dot {
  background: var(--danger);
}

.status-pill.is-ready .dot {
  background: var(--lime-deep);
}

.status-pill.is-warn .dot {
  background: var(--warning);
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 19rem);
  gap: 1rem;
  align-items: start;
}

.panel {
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--line);
  background: var(--bg-panel);
}

.panel-head h2 {
  font-size: 0.58rem;
}

.panel-head .hint {
  font-family: var(--font-pixel-display);
  font-size: 0.45rem;
  color: var(--text-muted);
}

.game-panel {
  display: flex;
  flex-direction: column;
}

.game-viewport {
  position: relative;
  background: #6eb6d9;
  aspect-ratio: 16 / 10;
  min-height: 280px;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.game-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.75rem;
}

.hud-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.hud-stat {
  pointer-events: none;
  padding: 0.4rem 0.55rem;
  background: rgba(255, 255, 255, 0.88);
  border: 2px solid rgba(26, 36, 24, 0.15);
  border-radius: var(--radius-sm);
  font-family: var(--font-pixel-display);
  font-size: 0.48rem;
  color: var(--text-primary);
}

.hud-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(244, 247, 242, 0.72);
  pointer-events: auto;
  padding: 1rem;
}

.hud-overlay[hidden] {
  display: none !important;
}

.overlay-card {
  width: min(100%, 22rem);
  padding: 1.35rem 1.25rem;
  background: var(--bg-raised);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.overlay-card h3 {
  font-size: 0.72rem;
  margin-bottom: 0.55rem;
}

.overlay-card p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
}

.overlay-card .score-line {
  font-family: var(--font-pixel-display);
  font-size: 0.65rem;
  color: var(--lime-deep);
  margin-bottom: 1rem;
}

.overlay-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.game-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 2px solid var(--line);
  background: var(--bg-panel);
}

.control-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.6rem;
  padding: 0 0.4rem;
  border: 2px solid var(--line-strong);
  border-bottom-width: 3px;
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  font-family: var(--font-pixel-display);
  font-size: 0.42rem;
  color: var(--text-secondary);
}

.control-note {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.leaderboard-list {
  max-height: 22rem;
  overflow: auto;
}

.lb-row {
  display: grid;
  grid-template-columns: 2.25rem 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}

.lb-row:last-child {
  border-bottom: none;
}

.lb-rank {
  font-family: var(--font-pixel-display);
  font-size: 0.45rem;
  color: var(--text-muted);
}

.lb-name {
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-score {
  font-family: var(--font-pixel-display);
  font-size: 0.48rem;
  color: var(--lime-deep);
}

.lb-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
  margin-bottom: 0.85rem;
}

.form-field label {
  font-family: var(--font-pixel-display);
  font-size: 0.48rem;
  color: var(--text-secondary);
}

.form-field input {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-panel);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--dur) var(--ease);
}

.form-field input:focus {
  border-color: var(--lime-deep);
}

.form-field input::placeholder {
  color: var(--text-muted);
}

.info-list {
  padding: 0.25rem 0;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}

.info-list li:last-child {
  border-bottom: none;
}

.info-list .label {
  color: var(--text-muted);
}

.info-list .value {
  font-family: var(--font-pixel-display);
  font-size: 0.48rem;
  color: var(--text-primary);
  text-align: right;
  line-height: 1.4;
}

@media (max-width: 960px) {
  .app-grid {
    grid-template-columns: 1fr;
  }

  .side-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .side-stack {
    grid-template-columns: 1fr;
  }

  .game-viewport {
    aspect-ratio: 4 / 3;
  }
}

/* 404 */
.page-404 {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: center;
  padding: 3rem var(--gutter);
  text-align: center;
}

.page-404 .code {
  font-family: var(--font-pixel-display);
  font-size: clamp(2.5rem, 10vw, 4.5rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--lime-deep);
  line-height: 1;
  margin-bottom: 0.85rem;
}

.page-404 h1 {
  font-size: var(--fs-xl);
  margin-bottom: 0.75rem;
}

.page-404 p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 28rem;
  margin-inline: auto;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--line-focus);
  outline-offset: 2px;
}

::selection {
  background: rgba(143, 208, 0, 0.28);
  color: var(--text-primary);
}
