/* ==========================================================================
   NATEMAKESGAMES — GRID SYSTEM
   Colors and fonts live in :root below. Change --cyan / --amber to re-skin.
   ========================================================================== */
:root {
  --bg: #04060a;
  --bg-2: #070b12;
  --surface: #0a111b;
  --surface-2: #0e1825;
  --line: rgba(0, 229, 255, 0.16);
  --line-strong: rgba(0, 229, 255, 0.42);
  --text: #e4f4ff;
  --muted: #8aa1b4;
  --faint: #536a7c;
  --cyan: #00e5ff;
  --cyan-dim: #0aa9bf;
  --amber: #ff8a1f;
  --amber-dim: #c96a14;
  --ghost: #c9b8ff;
  --danger: #ff4d6d;

  --glow-c: 0 0 12px rgba(0, 229, 255, 0.55), 0 0 32px rgba(0, 229, 255, 0.18);
  --glow-a: 0 0 12px rgba(255, 138, 31, 0.55), 0 0 32px rgba(255, 138, 31, 0.18);

  --font-display: "Panchang", "Arial Black", sans-serif;
  --font-body: "General Sans", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --text-xs: clamp(0.75rem, 0.72rem + 0.1vw, 0.8rem);
  --text-sm: clamp(0.875rem, 0.85rem + 0.1vw, 0.94rem);
  --text-base: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --text-lg: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.2vw, 3.1rem);
  --text-hero: clamp(2.3rem, 1.2rem + 4.6vw, 5.4rem);

  --gutter: clamp(1.1rem, 0.6rem + 2.4vw, 3rem);
  --max: 1240px;
  --radius: 4px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* faint world grid behind everything */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: -1;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
::selection { background: var(--cyan); color: var(--bg); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: #000; padding: 8px 14px; z-index: 999; }
.skip:focus { left: 8px; }

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; line-height: 1.08; font-weight: 700; }
.display { font-family: var(--font-display); letter-spacing: 0.01em; text-transform: uppercase; }
.h-hero { font-family: var(--font-display); font-size: var(--text-hero); text-transform: uppercase; line-height: 0.98; letter-spacing: 0; }
.h-2 { font-family: var(--font-display); font-size: var(--text-2xl); text-transform: uppercase; line-height: 1.02; }
.h-3 { font-family: var(--font-display); font-size: var(--text-xl); text-transform: uppercase; line-height: 1.1; }
.h-4 { font-family: var(--font-body); font-size: var(--text-lg); font-weight: 600; }
.mono { font-family: var(--font-mono); }
.label {
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--cyan);
}
.label.amber { color: var(--amber); }
.lead { font-size: var(--text-lg); color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.c-cyan { color: var(--cyan); text-shadow: var(--glow-c); }
.c-amber { color: var(--amber); text-shadow: var(--glow-a); }
p { margin: 0 0 1em; }

/* ---------- header / HUD ---------- */
.hud {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(4, 6, 10, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.hud .wrap { height: 100%; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: 0.65rem; color: var(--text); font-family: var(--font-display); font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase; user-select: none; }
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; color: var(--cyan); filter: drop-shadow(0 0 6px rgba(0,229,255,.7)); flex: none; }
.brand b { color: var(--cyan); font-weight: 700; }
.nav { display: flex; gap: 0.25rem; margin-left: auto; }
.nav a {
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); padding: 0.55rem 0.7rem; border: 1px solid transparent; border-radius: var(--radius);
}
.nav a:hover { color: var(--text); text-decoration: none; border-color: var(--line); }
.nav a[aria-current="page"] { color: var(--cyan); border-color: var(--line-strong); box-shadow: inset 0 0 12px rgba(0,229,255,.12); }
.keys-chip {
  display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--muted); border: 1px solid var(--line); padding: 0.4rem 0.6rem; border-radius: var(--radius); white-space: nowrap;
}
.keys-chip:hover { text-decoration: none; color: var(--text); border-color: var(--line-strong); }
.keys-chip i { width: 9px; height: 9px; border: 1px solid var(--faint); transform: rotate(45deg); display: inline-block; }
.keys-chip i.on.k-cyan { background: var(--cyan); border-color: var(--cyan); box-shadow: var(--glow-c); }
.keys-chip i.on.k-amber { background: var(--amber); border-color: var(--amber); box-shadow: var(--glow-a); }
.keys-chip i.on.k-ghost { background: var(--ghost); border-color: var(--ghost); box-shadow: 0 0 10px rgba(201,184,255,.7); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line-strong); color: var(--cyan); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .14em; padding: .5rem .75rem; border-radius: var(--radius); cursor: pointer; }

@media (max-width: 960px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; height: calc(100svh - var(--header-h)); overflow-y: auto;
    background: #04060a; flex-direction: column; padding: 1.5rem var(--gutter); gap: .4rem;
    transform: translateX(100%); transition: transform .3s ease, visibility .3s; margin: 0; visibility: hidden;
  }
  .nav.open { transform: none; visibility: visible; }
  .nav a { font-size: var(--text-sm); padding: 1rem; border-color: var(--line); }
  .keys-chip { margin-left: 0; }
}

/* ---------- buttons ---------- */
.btn {
  --c: var(--cyan);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--c); background: transparent; border: 1px solid var(--c);
  padding: .9rem 1.4rem; border-radius: var(--radius); cursor: pointer; min-height: 48px;
  position: relative; transition: background .2s, color .2s, box-shadow .2s;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.btn:hover { background: var(--c); color: var(--bg); text-decoration: none; box-shadow: var(--glow-c); }
.btn.solid { background: var(--c); color: var(--bg); }
.btn.solid:hover { filter: brightness(1.15); }
.btn.amber { --c: var(--amber); }
.btn.amber:hover { box-shadow: var(--glow-a); }
.btn.small { padding: .55rem .9rem; min-height: 38px; font-size: var(--text-xs); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- panels ---------- */
.panel {
  position: relative; background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.2rem, 1rem + 1vw, 2rem);
}
.panel.corners::before, .panel.corners::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--cyan); pointer-events: none;
}
.panel.corners::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel.corners::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.panel.amber-corners::before, .panel.amber-corners::after { border-color: var(--amber); }

/* ---------- sections ---------- */
section { position: relative; }
.section { padding: clamp(4rem, 3rem + 5vw, 8rem) 0; }
.section-head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); max-width: 760px; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); border: 0; margin: 0; }

/* ---------- hero ---------- */
.hero { min-height: calc(100svh - var(--header-h)); display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% center; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(4,6,10,.94) 0%, rgba(4,6,10,.7) 42%, rgba(4,6,10,.15) 75%),
    linear-gradient(0deg, var(--bg) 0%, transparent 30%);
}
.hero .wrap { padding-top: 4rem; padding-bottom: 5rem; }
.hero-copy { max-width: 760px; display: grid; gap: 1.6rem; }
.boot { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--cyan); min-height: 4.8em; white-space: pre-line; }
.boot .cursor { display: inline-block; width: .6em; height: 1.1em; background: var(--cyan); vertical-align: -0.2em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.page-hero { padding: clamp(3.5rem, 2.5rem + 5vw, 7rem) 0 clamp(2.5rem, 2rem + 3vw, 4.5rem); position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.page-hero .bg { position: absolute; inset: 0; z-index: -2; }
.page-hero .bg img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4,6,10,.96) 10%, rgba(4,6,10,.55) 70%, rgba(4,6,10,.3)), linear-gradient(0deg, var(--bg), transparent 50%); }
.page-hero .wrap { display: grid; gap: 1.2rem; }

/* scanlines overlay */
.scan::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

/* ---------- grids ---------- */
.grid-3 { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-2 { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.split { display: grid; gap: clamp(2rem, 1rem + 4vw, 5rem); grid-template-columns: 1.05fr 1fr; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.frame { border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; position: relative; box-shadow: 0 0 60px rgba(0,229,255,.08); }
.frame img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* ---------- cartridges ---------- */
.cart { display: flex; flex-direction: column; gap: .9rem; min-height: 100%; transition: border-color .2s, transform .2s; }
.cart:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.cart-screen {
  aspect-ratio: 16/9; border: 1px solid var(--line); border-radius: 2px; background: #02040a;
  display: grid; place-items: center; overflow: hidden; position: relative;
}
.cart-screen img { width: 100%; height: 100%; object-fit: cover; }
.cart-screen .empty { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--faint); letter-spacing: .2em; text-align: center; padding: 1rem; }
.cart-screen .empty b { display: block; font-size: 2rem; color: var(--line-strong); margin-bottom: .4rem; font-weight: 400; }
.cart.is-empty { border-style: dashed; }
.status { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .14em; text-transform: uppercase; padding: .2rem .5rem; border: 1px solid currentColor; border-radius: 2px; }
.status.released { color: var(--cyan); }
.status.in-dev, .status.prototype { color: var(--amber); }
.status.jam { color: var(--ghost); }
.status.empty { color: var(--faint); }
.cart-meta { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.tag { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); background: rgba(0,229,255,.06); padding: .15rem .5rem; border-radius: 2px; }

/* ---------- path cards ---------- */
.path { display: flex; flex-direction: column; gap: .9rem; cursor: default; transition: border-color .2s, box-shadow .2s; }
.path .glyph { width: 44px; height: 44px; color: var(--cyan); }
.path.equipped { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber), 0 0 30px rgba(255,138,31,.15); }
.path.equipped .glyph { color: var(--amber); }
.path ol { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: var(--text-sm); }
.path ol li { margin-bottom: .35rem; }
.path .lvl { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--faint); border-top: 1px dashed var(--line); padding-top: .8rem; }
.path .lvl b { color: var(--amber); font-weight: 600; }
.path .btn { margin-top: auto; align-self: flex-start; }

.loadout { position: sticky; bottom: 0; z-index: 30; background: rgba(4,6,10,.94); border-top: 1px solid var(--amber); backdrop-filter: blur(8px); }
.loadout .wrap { display: flex; align-items: center; gap: 1rem; padding-top: .9rem; padding-bottom: .9rem; flex-wrap: wrap; }
.loadout-items { display: flex; gap: .5rem; flex-wrap: wrap; flex: 1; min-width: 0; }

/* mission board */
.mission { display: grid; gap: .6rem; }
.task { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(0,229,255,.02); cursor: pointer; }
.task input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; flex: none; border: 1px solid var(--cyan); margin-top: .2rem; border-radius: 2px; cursor: pointer; }
.task input:checked { background: var(--cyan); box-shadow: var(--glow-c); }
.task input:checked + span { color: var(--faint); text-decoration: line-through; }
.task small { display: block; font-family: var(--font-mono); color: var(--amber); font-size: var(--text-xs); letter-spacing: .1em; text-transform: uppercase; }
.xp-bar { height: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.xp-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--amber)); transition: width .5s ease; box-shadow: var(--glow-c); }

/* ---------- codex ---------- */
.rules { counter-reset: rule; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.rule { background: var(--bg-2); padding: clamp(1.2rem, 1rem + 1vw, 2rem); display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.4rem; }
.rule::before { counter-increment: rule; content: counter(rule, decimal-leading-zero); font-family: var(--font-display); font-size: var(--text-xl); color: var(--cyan); text-shadow: var(--glow-c); grid-row: span 2; line-height: 1; }
.rule h3 { font-family: var(--font-body); font-size: var(--text-lg); font-weight: 600; }
.rule p { color: var(--muted); margin: 0; max-width: 70ch; }

.spark-out { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .spark-out { grid-template-columns: 1fr; } }
.spark-slot { background: var(--bg-2); padding: 1.3rem; min-height: 130px; display: grid; align-content: start; gap: .5rem; }
.spark-slot .v { font-family: var(--font-display); font-size: clamp(1.05rem, .9rem + .6vw, 1.4rem); text-transform: uppercase; line-height: 1.15; }
.spark-slot.rolling .v { color: var(--faint); filter: blur(1px); }

.tool-list { display: grid; gap: 0; }
.tool { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: .85rem 0; border-bottom: 1px dashed var(--line); align-items: baseline; }
.tool:last-child { border-bottom: 0; }
.tool a { font-weight: 600; color: var(--text); }
.tool a:hover { color: var(--cyan); }
.tool span { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--amber); }
.tool p { grid-column: 1 / -1; margin: 0; font-size: var(--text-sm); color: var(--muted); }

.ladder { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.rung { display: flex; gap: .7rem; align-items: center; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; font-size: var(--text-sm); user-select: none; }
.rung b { font-family: var(--font-mono); color: var(--faint); font-weight: 400; font-size: var(--text-xs); }
.rung.done { border-color: var(--cyan); background: rgba(0,229,255,.07); }
.rung.done b { color: var(--cyan); }

/* ---------- game ---------- */
.arena-wrap { display: grid; gap: 1rem; }
.arena-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; font-family: var(--font-mono); font-size: var(--text-sm); }
.score b { font-size: 1.4rem; font-weight: 700; }
.score .p { color: var(--cyan); } .score .r { color: var(--amber); }
.arena { position: relative; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #01030a; overflow: hidden; box-shadow: 0 0 80px rgba(0,229,255,.1); touch-action: none; }
.arena canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.arena-overlay { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1.5rem; background: rgba(1,3,10,.78); backdrop-filter: blur(2px); }
.arena-overlay[hidden] { display: none; }
.arena-overlay .inner { display: grid; gap: 1rem; justify-items: center; max-width: 440px; }
.dpad { display: none; grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(2, 56px); gap: 8px; justify-content: center; }
.dpad button { background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--cyan); border-radius: var(--radius); font-size: 1.3rem; touch-action: manipulation; }
.dpad button:active { background: var(--cyan); color: var(--bg); }
.dpad .u { grid-column: 2; grid-row: 1; } .dpad .l { grid-column: 1; grid-row: 2; } .dpad .d { grid-column: 2; grid-row: 2; } .dpad .r { grid-column: 3; grid-row: 2; }
@media (pointer: coarse), (max-width: 760px) { .dpad { display: grid; } }
kbd { font-family: var(--font-mono); font-size: .85em; border: 1px solid var(--line-strong); border-bottom-width: 2px; padding: .05rem .4rem; border-radius: 3px; color: var(--text); }

/* ---------- devlog ---------- */
.log { display: grid; grid-template-columns: 180px 1fr; gap: 2rem; padding: 2.5rem 0; border-bottom: 1px solid var(--line); }
.log:first-child { padding-top: 0; }
@media (max-width: 700px) { .log { grid-template-columns: 1fr; gap: .8rem; } }
.log-meta { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); display: grid; gap: .3rem; align-content: start; }
.log-meta .id { color: var(--cyan); }
.log-body h2 { font-family: var(--font-display); font-size: var(--text-xl); text-transform: uppercase; margin-bottom: 1rem; }
.log-body p, .log-body li { color: #c7d9e6; max-width: 68ch; }
.template { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--muted); white-space: pre-wrap; background: #02050a; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin: 0; overflow-x: auto; }

/* ---------- form ---------- */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .45rem; }
.field label { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text); background: #02050a; border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: .85rem 1rem; min-height: 48px; width: 100%;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: var(--glow-c); }
.field .err { color: var(--danger); font-size: var(--text-xs); font-family: var(--font-mono); min-height: 1em; }
.hp { position: absolute; left: -5000px; }

/* ---------- vault ---------- */
.vault-slots { display: flex; gap: 1rem; flex-wrap: wrap; }
.vslot { flex: 1 1 180px; border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 1.1rem; display: grid; gap: .3rem; }
.vslot .gem { width: 22px; height: 22px; transform: rotate(45deg); border: 2px solid var(--faint); margin-bottom: .5rem; }
.vslot.on { border-style: solid; }
.vslot.on.k-cyan { border-color: var(--cyan); } .vslot.on.k-cyan .gem { background: var(--cyan); border-color: var(--cyan); box-shadow: var(--glow-c); }
.vslot.on.k-amber { border-color: var(--amber); } .vslot.on.k-amber .gem { background: var(--amber); border-color: var(--amber); box-shadow: var(--glow-a); }
.vslot.on.k-ghost { border-color: var(--ghost); } .vslot.on.k-ghost .gem { background: var(--ghost); border-color: var(--ghost); box-shadow: 0 0 12px rgba(201,184,255,.7); }
.letter { max-width: 720px; font-size: var(--text-lg); line-height: 1.75; color: #d6e8f4; }
.letter p { margin-bottom: 1.2em; }
.letter .sig { font-family: var(--font-mono); color: var(--amber); font-size: var(--text-base); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 3rem 0 2.5rem; margin-top: 2rem; }
.foot .wrap { display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 760px) { .foot .wrap { grid-template-columns: 1fr; } }
.foot h4 { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 .8rem; font-weight: 500; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: var(--text-sm); }
.foot ul a { color: var(--text); }
.foot .fine { grid-column: 1 / -1; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--faint); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 1.5rem; }
.pixel { display: inline-block; width: 6px; height: 6px; background: var(--amber); vertical-align: middle; cursor: pointer; animation: blink 2.4s steps(1) infinite; border: 0; padding: 0; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 200;
  background: var(--surface-2); border: 1px solid var(--amber); color: var(--text); padding: 1rem 1.3rem; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: var(--text-sm); box-shadow: var(--glow-a); transition: transform .4s cubic-bezier(.2,.9,.3,1.2); max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
.stat-row { display: flex; flex-wrap: wrap; gap: 2.5rem; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.stat-row b { display: block; font-family: var(--font-display); font-size: var(--text-xl); color: var(--text); letter-spacing: 0; }
.chip { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--amber); border: 1px solid var(--amber-dim); padding: .3rem .6rem; border-radius: 2px; white-space: nowrap; }
button.rung { background: transparent; color: inherit; font: inherit; text-align: left; width: 100%; }
button.rung.done { background: rgba(0,229,255,.07); }
.arena { width: 100%; max-width: min(100%, calc((100svh - var(--header-h) - 110px) * 1.6)); margin: 0 auto; }
@media (pointer: coarse) { .arena { max-width: 100%; } }
@media (max-width: 480px) {
  .brand { font-size: .72rem; gap: .45rem; }
  .brand svg { width: 24px; height: 24px; }
  .hud .wrap { gap: .6rem; }
  .menu-btn { padding: .45rem .6rem; }
  .page-hero h1.h-hero { font-size: 1.7rem !important; }
  .h-2 { font-size: 1.6rem; }
  .btn-row .btn { flex: 1 1 auto; }
}
@media (max-width: 480px) { .loadout-items .muted { display: none; } .loadout .wrap { padding-top: .6rem; padding-bottom: .6rem; justify-content: space-between; } .loadout .btn { flex: 0 0 auto; } }
