/* ============================================================
   Mon Louis Ventures — site.css
   Layout + components for all zones
   ============================================================ */

/* ====== HUD ====== */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  border-bottom: 2px solid var(--ink);
}
.hud-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 10px 24px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
}
.hud-left, .hud-right { display: flex; align-items: center; gap: 14px; }
.hud-right { justify-content: flex-end; }
.hud-level {
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.14em;
  background: var(--ink); color: var(--paper); padding: 6px 8px;
}
.hud-level-name {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em;
  color: var(--ink-muted); text-transform: uppercase;
}
.hud-brand {
  text-decoration: none; display: flex; align-items: center; gap: 10px;
}
.hud-brand-pill {
  display: inline-flex; align-items: center;
  padding: 5px 12px; background: var(--mlv-red); color: var(--paper);
  border: 2px solid var(--ink); border-radius: var(--r-pill);
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.14em;
  box-shadow: 2px 2px 0 var(--ink);
}
.hud-score { font-size: 11px; color: var(--ink); letter-spacing: 0.18em; }
.hud-score #hud-score-n { color: var(--mlv-red); font-weight: 600; }
.hud-sound {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1.5px solid var(--ink);
  padding: 6px 10px; cursor: pointer;
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 0.14em; color: var(--ink);
}
.hud-sound:hover { background: var(--ink); color: var(--paper); }
.hud-sound.is-on { background: var(--mlv-yellow); }
.hud-rail { height: 3px; background: var(--paper-edge); }
.hud-rail-fill { height: 100%; background: var(--mlv-red); width: 0%; transition: width 120ms linear; }

@media (max-width: 720px) {
  .hud-level-name { display: none; }
  .hud-score { font-size: 9px; }
  .hud-sound .sound-label { display: none; }
  .hud-inner { padding: 8px 14px; gap: 10px; }
}

/* ====== ZONES ====== */
.zone-seam {
  height: 0;
  border-top: 2px solid var(--ink);
  position: relative;
}
.zone-seam::before, .zone-seam::after {
  content: ''; position: absolute; top: -2px;
  width: 6px; height: 2px; background: var(--ink);
}
.zone-seam::before { left: 0; } .zone-seam::after { right: 0; }

.zone-head {
  font-size: clamp(40px, 7vw, 84px);
  font-weight: 700;
  margin: 22px 0 24px;
  max-width: 14ch;
}
.zone-head .head-accent { display: inline-block; }
.head-accent-red { color: var(--mlv-red); }
.head-accent-teal { color: var(--mlv-teal); }
.zone-lede {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  color: color-mix(in srgb, var(--paper) 70%, transparent);
  max-width: 56ch;
}
.zone-lede-ink { color: var(--ink-soft); }

/* ====== ZONE 0 — HERO ====== */
.zone-hero {
  min-height: 100vh;
  padding-top: 120px;
  padding-bottom: 0;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% 100%, color-mix(in srgb, var(--mlv-yellow) 14%, transparent), transparent 70%),
    var(--paper);
}
.hero-inner {
  position: relative; z-index: 2;
  padding: 40px 0 140px;
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(320px, 1.15fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

/* Wordmark lockup — transparent PNG, tight crop */
.wordmark {
  display: block;
  justify-self: end;
  width: 100%;
  max-width: 560px;
  min-width: 0;
}
.wordmark-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}
.hero-copy { text-align: left; justify-self: start; max-width: 520px; }
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 36px; justify-items: center; }
  .wordmark { justify-self: center; max-width: 480px; }
  .hero-copy { text-align: center; justify-self: center; }
  .hero-cta { justify-content: center; }
}
@media (max-width: 640px) {
  .wordmark { max-width: 340px; margin-bottom: 4px; }
}

/* Headline — display sans, two lines (setup / punch) */
.hero-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  font-size: clamp(52px, 7.6vw, 100px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 24px;
}
.hero-headline .hh-roman { display: block; font-style: normal; font-weight: 700; }
.hero-headline .serif-emph { display: block; }
.hero-sub {
  font-family: var(--font-sans);
  font-size: clamp(17px, 1.7vw, 20px);
  color: var(--ink-soft);
  max-width: 38ch;
  margin: 0 0 36px;
  line-height: 1.45;
}

.hero-cta { display: inline-flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero-prompt { display: none; }

/* Ambient pixel decoration — step-animated, never smooth */
.hero-ambient { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.amb { position: absolute; image-rendering: pixelated; }
.amb-coin-1 { top: 18%; left: 8%; }
.amb-coin-2 { top: 62%; right: 10%; }
.amb-cloud-1 { top: 14%; right: 8%; }
.amb-cloud-2 { top: 55%; left: 6%; opacity: 0.75; }
.amb-star-1 { top: 24%; right: 22%; }
.amb-star-2 { top: 36%; left: 20%; }
.amb-star-3 { top: 70%; left: 40%; }

.anim-bob { animation: bob 2.4s steps(2,end) infinite; }
.anim-bob-2 { animation: bob 3s steps(2,end) infinite 0.6s; }
.anim-drift { animation: drift 18s steps(12,end) infinite; }
.anim-drift-slow { animation: drift 26s steps(12,end) infinite reverse; }
.anim-twinkle { animation: twinkle 1.8s steps(2,end) infinite; }
.anim-twinkle-2 { animation: twinkle 2.2s steps(2,end) infinite 0.4s; }
.anim-hover { animation: hover 2.8s steps(4,end) infinite; }
.anim-blink { animation: blink 1.4s step-end infinite; }

@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes drift { from { transform: translateX(-30px); } to { transform: translateX(60vw); } }
@keyframes twinkle { 0%,40% { opacity: 1; transform: scale(1); } 50%,100% { opacity: 0.35; transform: scale(0.85); } }
@keyframes hover { 0%,100% { transform: translateY(0); } 25% { transform: translateY(-4px); } 50% { transform: translateY(-6px); } 75% { transform: translateY(-4px); } }
@keyframes blink { 50% { opacity: 0; } }

/* Pixel ground */
.hero-ground {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 48px; pointer-events: none;
}
.hero-ground-stripe {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, transparent 0, transparent 12px, var(--ink) 12px, var(--ink) 14px, transparent 14px, transparent 22px, color-mix(in srgb, var(--mlv-yellow) 30%, var(--paper)) 22px 100%);
}

/* ====== ZONE 1 — BROKEN WORLD ====== */
.zone-broken {
  background: var(--paper-dark);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.broken-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(230,58,46,0.025) 2px 3px),
    radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--mlv-red) 14%, transparent), transparent 60%);
  mix-blend-mode: screen;
}
.zone-broken .zone-tag { background: transparent; }
.zone-broken .zone-lede { color: color-mix(in srgb, var(--paper) 70%, transparent); max-width: 64ch; }
.head-accent-red { color: var(--mlv-red); }

.sys-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 56px;
}
.sys-tile {
  background: var(--paper-dark-2);
  border: 2px solid #2a3144;
  padding: 22px 20px;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  position: relative;
  font-family: var(--font-mono);
  animation: jitter calc(3.5s + var(--x,0)*0.4s + var(--y,0)*0.3s) steps(2,end) infinite;
}
.sys-tile::after {
  content: ''; position: absolute; inset: -2px;
  border: 2px solid var(--mlv-red);
  opacity: 0;
  animation: glitchFlicker 6s infinite steps(2,end);
  pointer-events: none;
}
.sys-tile:nth-child(2)::after { animation-delay: 1.3s; }
.sys-tile:nth-child(3)::after { animation-delay: 2.1s; }
.sys-tile:nth-child(4)::after { animation-delay: 3.4s; }
.sys-tile:nth-child(5)::after { animation-delay: 0.7s; }
.sys-tile:nth-child(6)::after { animation-delay: 4.8s; }

.sys-name {
  font-family: var(--font-pixel); font-size: 11px; letter-spacing: 0.14em;
  color: var(--paper);
}
.sys-tag {
  font-size: 10px; letter-spacing: 0.14em; color: var(--mlv-red);
  text-transform: uppercase;
}

.sys-glitch {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: -1;
}
.sys-glitch .g {
  stroke: var(--mlv-red); stroke-width: 0.5; fill: none;
  stroke-dasharray: 2 2;
  opacity: 0.4;
  animation: wireFlicker 2s steps(4) infinite;
}
.sys-glitch .g2 { animation-delay: 0.5s; }
.sys-glitch .g3 { animation-delay: 1s; }

@keyframes jitter {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(1px, -1px); }
}
@keyframes glitchFlicker {
  0%, 90%, 100% { opacity: 0; }
  91%, 93% { opacity: 0.6; }
  92% { opacity: 0.2; transform: translateX(2px); }
}
@keyframes wireFlicker {
  0%, 70%, 100% { opacity: 0.25; }
  75% { opacity: 0.8; }
  80% { opacity: 0.1; }
}

.broken-foot {
  margin-top: 48px;
  color: color-mix(in srgb, var(--paper) 45%, transparent);
  font-size: 12px;
}

@media (max-width: 720px) {
  .sys-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .sys-tile { padding: 16px 14px; }
}

/* ====== ZONE 2 — POWER-UPS + REALITY TOGGLE ====== */
.zone-powerups {
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, color-mix(in srgb, var(--mlv-teal) 18%, transparent), transparent 70%),
    var(--paper);
}

/* Reality toggle */
.reality {
  margin: 56px auto 0;
  padding: 28px;
  border: 2.5px solid var(--ink);
  background: var(--paper-warm);
  box-shadow: 6px 6px 0 var(--ink);
  max-width: 820px;
}
.reality-rail {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 6px; border-radius: 40px;
  overflow: hidden;
}
.reality-opt {
  position: relative; z-index: 2;
  background: transparent; border: none;
  padding: 12px 14px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em;
  color: var(--ink-muted); text-transform: uppercase;
  cursor: pointer;
  transition: color var(--t-med);
}
.reality-opt.is-active { color: var(--paper); }
.reality-knob {
  position: absolute;
  top: 6px; bottom: 6px; left: 6px;
  width: calc(50% - 6px);
  background: var(--mlv-red);
  border-radius: 40px;
  z-index: 1;
  transition: transform var(--t-med) var(--ease-crisp), background var(--t-med);
}
.reality-stage[data-state="after"] ~ * .reality-knob,
.reality[data-state="after"] .reality-knob { transform: translateX(100%); background: var(--mlv-teal); }

.reality-stage {
  margin-top: 20px;
  position: relative;
}
.reality-svg { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.reality-svg .node rect {
  fill: var(--paper); stroke: var(--ink); stroke-width: 2;
  transform-origin: center;
}
.reality-svg .node.n5 rect { fill: var(--mlv-yellow); }
.reality-svg .node-label {
  font-family: var(--font-pixel); font-size: 7px;
  text-anchor: middle; fill: var(--ink);
}
.reality-svg .wire {
  stroke: var(--mlv-teal); stroke-width: 3; fill: none;
  stroke-linecap: square; stroke-linejoin: miter;
  stroke-dasharray: 200; stroke-dashoffset: 200;
  opacity: 0;
  transition: stroke-dashoffset 520ms steps(6), opacity 200ms;
}
.reality[data-state="after"] .wire,
#reality[data-state="after"] .wire {
  opacity: 1; stroke-dashoffset: 0;
}
.reality[data-state="after"] .wire.w1,
#reality[data-state="after"] .wire.w1 { transition-delay: 0ms; }
.reality[data-state="after"] .wire.w2,
#reality[data-state="after"] .wire.w2 { transition-delay: 100ms; }
.reality[data-state="after"] .wire.w3,
#reality[data-state="after"] .wire.w3 { transition-delay: 200ms; }
.reality[data-state="after"] .wire.w4,
#reality[data-state="after"] .wire.w4 { transition-delay: 300ms; }
.reality[data-state="after"] .wire.w5,
#reality[data-state="after"] .wire.w5 { transition-delay: 400ms; }
.reality[data-state="after"] .wire.w6,
#reality[data-state="after"] .wire.w6 { transition-delay: 500ms; }

.reality-cap {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px; font-size: 11px;
}
.cap { transition: opacity var(--t-med); }
.cap-today { color: var(--mlv-red); }
.cap-after { color: var(--mlv-teal); opacity: 0.35; }
#reality[data-state="after"] .cap-today { opacity: 0.35; }
#reality[data-state="after"] .cap-after { opacity: 1; }

@media (max-width: 640px) {
  .reality { padding: 20px; }
  .reality-cap { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* Power-up grid */
.pu-grid {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px;
}
.pu-card {
  position: relative;
  background: var(--paper-warm);
  border: 2.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 28px;
  transition: transform var(--t-fast) var(--ease-crisp), box-shadow var(--t-fast) var(--ease-crisp);
  cursor: default;
}
.pu-card:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--ink); }
.pu-card-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.pu-icon {
  width: 64px; height: 64px; background: var(--paper);
  border: 2px solid var(--ink);
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 3px 3px 0 var(--ink);
}
.pu-card[data-pu="scale"] .pu-icon { background: color-mix(in srgb, var(--mlv-yellow) 40%, var(--paper)); }
.pu-card[data-pu="decide"] .pu-icon { background: color-mix(in srgb, var(--mlv-teal) 30%, var(--paper)); }
.pu-card[data-pu="network"] .pu-icon { background: color-mix(in srgb, var(--mlv-teal) 40%, var(--paper)); }
.pu-card[data-pu="synth"] .pu-icon { background: color-mix(in srgb, var(--mlv-red) 30%, var(--paper)); }

.pu-meta { display: flex; flex-direction: column; gap: 4px; }
.pu-tag { color: var(--ink-muted); font-size: 10px; }
.pu-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.pu-body { color: var(--ink-soft); font-size: 15px; line-height: 1.6; }

/* Spark burst */
.pu-card::after {
  content: ''; position: absolute; top: -10px; right: -10px;
  width: 22px; height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 7' fill='%23F2C12E'%3E%3Crect x='3' width='1' height='1'/%3E%3Crect x='3' y='6' width='1' height='1'/%3E%3Crect y='3' width='1' height='1'/%3E%3Crect x='6' y='3' width='1' height='1'/%3E%3Crect x='3' y='2' width='1' height='3'/%3E%3Crect x='2' y='3' width='3' height='1'/%3E%3Crect x='1' y='1' width='1' height='1'/%3E%3Crect x='5' y='1' width='1' height='1'/%3E%3Crect x='1' y='5' width='1' height='1'/%3E%3Crect x='5' y='5' width='1' height='1'/%3E%3C/svg%3E") no-repeat;
  background-size: contain;
  opacity: 0; transform: scale(0.2);
  transition: opacity 120ms, transform 180ms steps(3);
  pointer-events: none;
}
.pu-card:hover::after { opacity: 1; transform: scale(1); }

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

/* ====== ZONE 3 — BOSS FIGHTS ====== */
.zone-bosses {
  background: var(--paper);
}
.bf-list { margin-top: 56px; display: flex; flex-direction: column; gap: 28px; }
.bf {
  background: var(--paper-warm);
  border: 2.5px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 32px;
}
.bf-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.bf-n { color: var(--mlv-red); font-size: 11px; }
.bf-title { font-size: clamp(24px, 3vw, 34px); font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.bf-body {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 28px;
  padding-top: 20px;
  border-top: 2px dashed var(--paper-edge);
}
.bf-col { display: flex; flex-direction: column; gap: 8px; }
.bf-lbl { color: var(--ink-muted); font-size: 10px; }
.bf-text { color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.bf-list-items { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-soft); }
.bf-list-items li { padding-left: 16px; position: relative; line-height: 1.5; }
.bf-list-items li::before { content: ''; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; background: var(--mlv-teal); }

.bf-col-outcome { background: var(--paper); border: 1.5px solid var(--ink); padding: 18px; }
.bf-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: 10px; }
.bf-stat .n { font-size: 28px; font-weight: 700; color: var(--mlv-red); line-height: 1; }
.bf-stat .mono { color: var(--ink-muted); font-size: 10px; }

.bf-placeholder { border-style: dashed; background: transparent; box-shadow: none; }
.bf-body-placeholder { display: block; border-top: none; padding-top: 0; }
.bf-placeholder .bf-title { color: var(--ink-muted); }

.inline-link { color: var(--mlv-red); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.inline-link:hover { color: var(--ink); }

@media (max-width: 820px) {
  .bf-body { grid-template-columns: 1fr; gap: 22px; }
}

/* ===== TIME COLLAPSE ===== */
.tc-wrap {
  margin-top: 72px;
  padding: 32px;
  background: var(--paper-warm);
  border: 2.5px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
}
.tc-head { color: var(--ink-muted); font-size: 11px; margin-bottom: 20px; }
.tc-row {
  display: grid; grid-template-columns: 220px 1fr auto;
  align-items: center; gap: 20px;
  margin-bottom: 14px;
  position: relative;
}
.tc-label { color: var(--ink); font-size: 11px; }
.tc-row-mlv .tc-label { color: var(--mlv-red); }
.tc-bar {
  height: 24px;
  background: var(--paper);
  border: 2px solid var(--ink);
  position: relative; overflow: hidden;
}
.tc-fill {
  height: 100%;
  background: var(--ink-soft);
  width: 0%;
  transition: width 1.4s steps(14, end);
  background-image: repeating-linear-gradient(90deg, transparent 0 6px, rgba(245,235,214,0.1) 6px 8px);
}
.tc-row-mlv .tc-fill { background: var(--mlv-red); background-image: repeating-linear-gradient(90deg, transparent 0 6px, rgba(0,0,0,0.12) 6px 8px); }
.tc-coin { opacity: 0; transform: scale(0.5); transition: opacity 200ms, transform 200ms steps(2); }
.tc-wrap.is-done .tc-coin { opacity: 1; transform: scale(1) rotate(360deg); transition: transform 600ms steps(4), opacity 200ms; }

@media (max-width: 720px) {
  .tc-row { grid-template-columns: 1fr; gap: 6px; }
  .tc-coin { position: absolute; right: 0; top: 0; }
}

/* ====== STATS — now inline inside Boss Fights ====== */
.stats-grid {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center; gap: 40px;
}
.stats-grid-inline {
  margin-top: 56px;
  padding: 40px 0 0;
  border-top: 2px solid var(--ink);
}
.stat { text-align: center; }
.stat-n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 9vw, 104px);
  line-height: 1;
  color: var(--ink);
}
.stat-unit { font-size: 0.45em; margin-left: 4px; color: var(--mlv-red); }
.stat-l { margin-top: 10px; font-size: 10px; }
.stat-div { width: 2px; height: 60px; background: var(--ink); }
@media (max-width: 820px) {
  .stats-grid { grid-template-columns: 1fr; gap: 24px; }
  .stat-div { width: 32px; height: 2px; margin: 0 auto; }
}

/* ====== Display emphasis ====== */
.serif-emph {
  font-family: var(--font-display);
  font-style: normal;
  color: var(--mlv-red);
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* ====== Canvas layers ====== */
.hero-stars {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 1; pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: multiply;
}
.broken-static {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 1; pointer-events: none;
}
.build-particles {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 1; pointer-events: none;
  opacity: 0.6;
}
.zone-build { position: relative; overflow: hidden; }
.zone-build .build-inner { position: relative; z-index: 2; }

/* Konami burst */
.konami-flash {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: var(--mlv-yellow);
  animation: konami-burst 1.6s ease-out forwards;
}
.konami-flash .konami-msg {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-pixel); font-size: 14px;
  color: var(--ink); letter-spacing: 3px; white-space: nowrap;
}
@keyframes konami-burst {
  0% { opacity: 0; }
  8% { opacity: 0.92; }
  30% { opacity: 0.88; }
  100% { opacity: 0; }
}
.stat { text-align: center; }
.stat-n {
  font-family: var(--font-display);
  font-size: clamp(64px, 10vw, 120px);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.stat-unit { color: var(--mlv-red); font-size: 0.5em; margin-left: 0.05em; }
.stat-l { color: var(--ink-muted); margin-top: 8px; font-size: 11px; }
.stat-div { width: 2px; height: 48px; background: var(--ink); opacity: 0.2; }

@media (max-width: 820px) {
  .stats-grid { grid-template-columns: 1fr; gap: 24px; }
  .stat-div { width: 32px; height: 2px; margin: 0 auto; }
}

/* ====== ZONE 5 — BUILD ROOM ====== */
.zone-build {
  background:
    radial-gradient(ellipse 60% 40% at 50% 100%, color-mix(in srgb, var(--mlv-red) 16%, transparent), transparent 70%),
    var(--paper);
}
.build-inner { max-width: 760px; margin: 0 auto; }
.build-header { text-align: center; margin-bottom: 56px; }
.build-header .zone-tag { margin: 0 auto; }
.build-header .zone-head { margin-left: auto; margin-right: auto; max-width: none; }
.build-header .zone-lede { margin-left: auto; margin-right: auto; }

.build-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  background: var(--paper-warm);
  border: 2.5px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 32px;
}
.field { display: flex; flex-direction: column; gap: 10px; }
.field-wide, .field-row { grid-column: 1 / -1; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field-label { display: block; color: var(--ink); }
.field-q { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.input {
  font-family: var(--font-body); font-size: 16px;
  padding: 12px 14px;
  background: var(--paper);
  border: 2px solid var(--ink);
  color: var(--ink);
  min-height: 48px;
  transition: box-shadow var(--t-fast), transform var(--t-fast);
  width: 100%;
}
.input:focus {
  outline: none; box-shadow: 4px 4px 0 var(--mlv-red);
  transform: translate(-2px,-2px);
}
textarea.input { min-height: 96px; resize: vertical; font-family: var(--font-mono); font-size: 14px; }

.pill-radio { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-radio label {
  position: relative;
  display: inline-flex; align-items: center;
  padding: 12px 18px; min-height: 44px;
  border: 2px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  user-select: none;
}
.pill-radio input { position: absolute; opacity: 0; inset: 0; }
.pill-radio label:has(input:checked) { background: var(--mlv-red); color: var(--paper); transform: translate(-1px,-1px); box-shadow: 2px 2px 0 var(--ink); }
.pill-radio label:hover { background: var(--paper-edge); }
.pill-radio label:has(input:checked):hover { background: var(--mlv-red); }

.build-submit { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 12px; border-top: 2px dashed var(--paper-edge); margin-top: 8px; padding-top: 24px; }
.btn-deploy { font-size: 14px; padding: 18px 34px; }
.btn-deploy[disabled], .btn-deploy.is-loading { opacity: 0.6; cursor: progress; transform: none !important; box-shadow: var(--shadow-hard) !important; }
.build-foot { color: var(--ink-muted); font-size: 11px; }
.build-error { flex-basis: 100%; color: var(--mlv-red-deep); border: 1.5px solid var(--mlv-red-deep); background: var(--paper); padding: 10px 14px; letter-spacing: 0.08em; }

/* Success */
.build-success { text-align: center; padding: 56px 32px; background: var(--paper-warm); border: 2.5px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.success-badge {
  display: inline-flex; padding: 14px; background: var(--mlv-yellow);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  margin-bottom: 28px;
  animation: successBounce 600ms steps(4) 1;
}
@keyframes successBounce { 0% { transform: scale(0.5); } 100% { transform: scale(1); } }
.success-actions { margin-top: 32px; }

@media (max-width: 720px) {
  .build-form { grid-template-columns: 1fr; padding: 22px; }
  .field-row { grid-template-columns: 1fr; }
  .build-submit { flex-direction: column; align-items: stretch; }
}

/* ====== FOOTER — styles moved to brand.css (shared with subpages) ====== */

/* ============================================================
   v2 ADDITIONS · LEVELS 05–07
   05 WORLDS CONQUERED  ·  06 TRANSMISSIONS  ·  07 NOW PLAYING
   Plus: DEBUG MODE (Konami reveal)
   ============================================================ */

/* ============================================================
   LEVEL 05 — WORLDS CONQUERED (proof-of-work, quest-log feel)
   ============================================================ */
.zone-worlds {
  background:
    radial-gradient(ellipse 70% 30% at 50% 0%, color-mix(in srgb, var(--mlv-yellow) 14%, transparent), transparent 70%),
    var(--paper);
}
.zone-worlds .zone-head { max-width: 18ch; }

.worlds-frame {
  margin-top: 56px;
  background: var(--paper-warm);
  border: 2.5px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.worlds-frame-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.16em;
}
.worlds-frame-head .wfh-r {
  display: inline-flex; align-items: center; gap: 10px;
  color: color-mix(in srgb, var(--paper) 70%, transparent);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em;
}
.worlds-frame-head .wfh-led {
  width: 8px; height: 8px; background: var(--mlv-yellow);
  animation: ledBlink 1.6s steps(2) infinite;
}
@keyframes ledBlink { 50% { opacity: 0.25; } }

.worlds-list { padding: 4px 0; }
.world-row {
  display: grid;
  grid-template-columns: 26px 96px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border-top: 1px dashed var(--paper-edge);
  transition: background var(--t-fast);
}
.world-row:first-child { border-top: none; }
.world-row:hover { background: var(--paper); }

.world-check {
  width: 18px; height: 18px;
  display: grid; place-items: center;
}
.world-check svg { display: block; image-rendering: pixelated; }

.world-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mlv-teal);
  padding: 4px 8px;
  border: 1.5px solid var(--mlv-teal);
  text-align: center;
  white-space: nowrap;
}
.world-row[data-tone="red"] .world-tag { color: var(--mlv-red); border-color: var(--mlv-red); }
.world-row[data-tone="yellow"] .world-tag { color: var(--mlv-yellow-deep); border-color: var(--mlv-yellow-deep); }
.world-row[data-tone="ink"]    .world-tag { color: var(--ink); border-color: var(--ink); }

.world-text {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  text-wrap: pretty;
}
.world-text b { font-weight: 700; color: var(--ink); }
.world-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

.worlds-foot {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 16px;
  padding: 14px 22px;
  border-top: 2px solid var(--ink);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.worlds-foot .wf-hint {
  display: inline-flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.worlds-foot .wf-or { color: var(--ink-muted); }
.worlds-foot .wf-call {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1.5px solid var(--mlv-red);
  padding-bottom: 1px;
  transition: color var(--t-fast);
}
.worlds-foot .wf-call:hover { color: var(--mlv-red); }
.kbd-seq {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  padding: 2px 4px;
  border-radius: 2px;
  transition: background var(--t-fast), transform var(--t-fast);
}
.kbd-seq:hover, .kbd-seq:focus-visible {
  background: var(--paper-warm);
  outline: none;
}
.kbd-seq:active { transform: translateY(1px); }
.kbd-seq .kbd {
  display: inline-grid; place-items: center;
  width: 16px; height: 16px;
  background: var(--paper-warm);
  border: 1.5px solid var(--ink);
  box-shadow: 1px 1px 0 var(--ink);
  font-size: 10px;
  transition: background var(--t-fast);
}
.kbd-seq:hover .kbd { background: var(--mlv-yellow); }

@media (max-width: 820px) {
  .world-row {
    grid-template-columns: 24px 1fr;
    grid-template-areas:
      "ck tag"
      "ck text"
      "ck meta";
    row-gap: 6px;
  }
  .world-check { grid-area: ck; align-self: start; padding-top: 4px; }
  .world-tag { grid-area: tag; justify-self: start; }
  .world-text { grid-area: text; }
  .world-meta { grid-area: meta; }
  .worlds-foot { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ============================================================
   LEVEL 06 — TRANSMISSIONS (dark, control-room signals)
   ============================================================ */
.zone-transmissions {
  background: var(--paper-dark);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.zone-transmissions::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(245,235,214,0.018) 2px 3px),
    radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--mlv-teal) 14%, transparent), transparent 60%);
  pointer-events: none;
}
.zone-transmissions .container { position: relative; z-index: 2; }
.zone-transmissions .zone-tag { background: transparent; color: var(--paper); border-color: var(--paper); }
.zone-transmissions .zone-tag .dot { background: var(--mlv-yellow); }
.zone-transmissions .zone-head { color: var(--paper); max-width: 18ch; }
.zone-transmissions .zone-lede { color: color-mix(in srgb, var(--paper) 65%, transparent); max-width: 60ch; }

.tx-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.tx-card {
  background: color-mix(in srgb, var(--paper-dark-2) 90%, transparent);
  border: 2px solid #2a3144;
  padding: 22px 22px 24px;
  display: flex; flex-direction: column;
  gap: 14px;
  min-height: 200px;
  position: relative;
}
.tx-card::before {
  content: '';
  position: absolute; left: -2px; top: -2px;
  width: 12px; height: 12px;
  background: var(--mlv-teal);
}
.tx-card[data-tone="red"]::before { background: var(--mlv-red); }
.tx-card[data-tone="yellow"]::before { background: var(--mlv-yellow); }
.tx-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.tx-card-id { color: color-mix(in srgb, var(--paper) 80%, transparent); white-space: nowrap; }
.tx-card-freq { color: var(--mlv-teal); white-space: nowrap; }
.tx-card[data-tone="red"] .tx-card-freq { color: var(--mlv-red); }
.tx-card[data-tone="yellow"] .tx-card-freq { color: var(--mlv-yellow); }

.tx-body {
  font-family: var(--font-display);
  font-weight: 600;
  font-style: normal;
  font-size: 20px;
  line-height: 1.28;
  color: var(--paper);
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.tx-card-foot {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: color-mix(in srgb, var(--paper) 40%, transparent);
}
.tx-cursor {
  display: inline-block;
  width: 7px; height: 12px;
  background: var(--mlv-yellow);
  margin-left: 4px;
  vertical-align: -1px;
  animation: blink 1s step-end infinite;
}

@media (max-width: 980px) {
  .tx-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .tx-grid { grid-template-columns: 1fr; }
  .tx-body { font-size: 18px; }
}

/* ============================================================
   LEVEL 07 — NOW PLAYING (pixel cartridges)
   ============================================================ */
.zone-nowplaying {
  background:
    radial-gradient(ellipse 60% 30% at 50% 0%, color-mix(in srgb, var(--mlv-red) 10%, transparent), transparent 70%),
    var(--paper);
  position: relative;
  overflow: hidden;
}

.np-head-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.np-head-row > div:first-child { flex: 1 1 60%; min-width: 280px; }
.np-head-row > .np-status-line { margin-top: 10px; }
.np-status-line {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.np-status-line .np-led {
  width: 8px; height: 8px; background: var(--mlv-red);
  animation: ledBlink 1.1s steps(2) infinite;
}

.cart-shelf {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
  position: relative;
}
.cart-shelf::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -24px;
  height: 8px;
  background:
    linear-gradient(to bottom, var(--ink) 0 2px, transparent 2px 100%),
    repeating-linear-gradient(90deg, var(--paper-edge) 0 8px, transparent 8px 16px);
  background-size: 100% 100%, 16px 8px;
  opacity: 0.7;
}

.cart {
  --cart-c: var(--mlv-teal);
  position: relative;
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease-crisp),
              box-shadow var(--t-fast) var(--ease-crisp);
  min-height: 360px;
}
.cart:hover {
  transform: translate(-3px, -5px) rotate(-0.4deg);
  box-shadow: 8px 9px 0 var(--ink);
}
.cart[data-c="red"]    { --cart-c: var(--mlv-red); }
.cart[data-c="teal"]   { --cart-c: var(--mlv-teal); }
.cart[data-c="yellow"] { --cart-c: var(--mlv-yellow); }
.cart[data-c="ink"]    { --cart-c: var(--ink); }

/* Cartridge "shoulders" — pixel notches at the top */
.cart-top {
  position: relative;
  display: flex; align-items: stretch;
  border-bottom: 2px solid var(--ink);
}
.cart-top::before, .cart-top::after {
  content: '';
  width: 14px; height: 14px;
  background: var(--ink);
}
.cart-top::before { margin-right: -1px; }
.cart-top::after { margin-left: -1px; }
.cart-tag-row {
  flex: 1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 0.14em;
}
.cart-cat {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--cart-c);
}
.cart-cat::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--cart-c);
}
.cart-pin { color: color-mix(in srgb, var(--paper) 50%, transparent); }

/* Color band */
.cart-band {
  height: 16px;
  background: var(--cart-c);
  border-bottom: 2px solid var(--ink);
  position: relative;
}
.cart-band::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 4px;
  background: linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,0.18) 2px 100%);
}

/* Label area */
.cart-label {
  flex: 1;
  padding: 18px 18px 16px;
  display: flex; flex-direction: column;
  gap: 10px;
  background:
    repeating-linear-gradient(0deg, transparent 0 22px, color-mix(in srgb, var(--ink) 4%, transparent) 22px 23px),
    var(--paper);
}
/* Cart label "box art" — pixel sprite + NES-style stamp code */
.cart-art-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0 4px;
  border-bottom: 1.5px dashed color-mix(in srgb, var(--ink) 22%, transparent);
  margin-bottom: 4px;
}
.cart-art {
  width: 64px;
  height: 64px;
  display: block;
  image-rendering: pixelated;
  filter: drop-shadow(2px 2px 0 color-mix(in srgb, var(--ink) 28%, transparent));
}
.cart-stamp {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: right;
  font-family: var(--font-mono);
  text-transform: uppercase;
  line-height: 1;
  padding-top: 2px;
}
.cart-num {
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 600;
  padding: 3px 6px;
  border: 1.5px solid var(--ink);
  background: var(--cart-c);
  color: var(--paper);
}
.cart[data-c="yellow"] .cart-num { color: var(--ink); }
.cart-region {
  font-size: 8px;
  letter-spacing: 0.24em;
  color: var(--ink-muted);
}
.cart-copy {
  font-size: 7px;
  letter-spacing: 0.2em;
  color: var(--ink-muted);
  opacity: 0.7;
}
.cart-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.04;
  margin: 0;
}
.cart-sub {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
  flex: 1;
}
.cart-foot {
  margin-top: auto;
  padding: 10px 14px;
  border-top: 2px solid var(--ink);
  background: var(--paper-warm);
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.cart-status {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink);
}
.cart-status .status-led {
  width: 7px; height: 7px;
  background: var(--cart-c);
  animation: ledBlink 1.4s steps(2) infinite;
}
.cart-eject {
  color: var(--ink-muted);
}

/* small tilt rotation per cart for character */
.cart:nth-child(1) { transform: rotate(-0.4deg); }
.cart:nth-child(2) { transform: rotate(0.3deg); }
.cart:nth-child(3) { transform: rotate(-0.2deg); }
.cart:nth-child(4) { transform: rotate(0.4deg); }
.cart:nth-child(1):hover { transform: rotate(-0.4deg) translate(-3px, -5px); }
.cart:nth-child(2):hover { transform: rotate(0.3deg)  translate(-3px, -5px); }
.cart:nth-child(3):hover { transform: rotate(-0.2deg) translate(-3px, -5px); }
.cart:nth-child(4):hover { transform: rotate(0.4deg)  translate(-3px, -5px); }

@media (max-width: 1080px) {
  .cart-shelf { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (max-width: 600px) {
  .cart-shelf { grid-template-columns: 1fr; }
  .cart-shelf::after { display: none; }
}

/* ============================================================
   DEBUG MODE — declassified intelligence dossier
   ============================================================ */
.debug-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(245,235,214,0.018) 3px 4px),
    color-mix(in srgb, var(--paper-dark) 94%, transparent);
  display: grid; place-items: center;
  padding: 32px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms;
  overflow-y: auto;
}
.debug-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.debug-panel {
  width: min(820px, 100%);
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 14px 14px 0 var(--mlv-red);
  position: relative;
  font-family: var(--font-body);
  margin: auto;
}

/* DECLASSIFIED stamp — rotated red ink, on top-right of panel */
.debug-stamp {
  position: absolute;
  top: -22px; right: -18px;
  transform: rotate(-7deg);
  background: var(--paper);
  border: 3px solid var(--mlv-red);
  color: var(--mlv-red);
  padding: 8px 14px 6px;
  font-family: var(--font-pixel);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-align: center;
  box-shadow: 3px 3px 0 var(--ink);
  z-index: 3;
  white-space: nowrap;
}
.debug-stamp .ds-line { display: block; line-height: 1; }
.debug-stamp .ds-meta {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: color-mix(in srgb, var(--mlv-red) 70%, var(--ink));
}

/* Header bar */
.debug-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  background: var(--ink);
  color: var(--paper);
}
.debug-header-l {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-pixel); font-size: 11px; letter-spacing: 0.18em;
}
.debug-header-l .led {
  width: 9px; height: 9px;
  background: var(--mlv-yellow);
  animation: ledBlink 0.7s steps(2) infinite;
}
.debug-close {
  background: transparent;
  border: 1.5px solid var(--paper);
  color: var(--paper);
  font-family: var(--font-pixel); font-size: 9px;
  padding: 6px 10px; cursor: pointer; letter-spacing: 0.14em;
  transition: background var(--t-fast), color var(--t-fast);
}
.debug-close:hover { background: var(--paper); color: var(--ink); }

/* Body */
.debug-body { padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 44px) clamp(28px, 4vw, 40px); }
.debug-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--mlv-red);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.debug-h {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.025em;
  line-height: 1.02;
  color: var(--ink);
  margin: 0 0 12px;
  max-width: 14ch;
}
.debug-h em.serif-emph {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  color: var(--mlv-red);
}
.debug-sub {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 32px;
  max-width: 56ch;
}

/* Entries — simple list, no resume framing */
.debug-entries {
  list-style: none;
  margin: 0; padding: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.de-row {
  display: grid;
  grid-template-columns: 36px minmax(180px, 1.1fr) minmax(0, 2fr);
  align-items: baseline;
  gap: clamp(14px, 2vw, 28px);
  padding: 18px 4px;
  border-top: 1px dashed var(--paper-edge);
  position: relative;
  transition: background var(--t-fast);
}
.de-row:first-child { border-top: none; }
.de-row:hover { background: color-mix(in srgb, var(--mlv-yellow) 10%, transparent); }

.de-n {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--mlv-red);
  align-self: start;
  padding-top: 8px;
}
.de-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -0.018em;
  line-height: 1.05;
  color: var(--ink);
}
.de-note {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: pretty;
}

@media (max-width: 600px) {
  .de-row { grid-template-columns: 28px 1fr; row-gap: 6px; }
  .de-name { grid-column: 2 / -1; }
  .de-note { grid-column: 2 / -1; }
}

/* Footer block */
.debug-foot {
  margin-top: 24px;
  display: flex; flex-direction: column;
  gap: 12px;
}
.df-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: baseline;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.df-key {
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--paper);
  background: var(--ink);
  padding: 6px 0;
  text-align: center;
  align-self: start;
  margin-top: 2px;
}
.df-text { text-wrap: pretty; }
.df-reach .df-text a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--mlv-red);
  padding-bottom: 1px;
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 13px;
}
.df-reach .df-text a:hover { color: var(--mlv-red); }

@media (max-width: 600px) {
  .debug-stamp { top: -16px; right: -10px; padding: 6px 10px 4px; font-size: 11px; }
  .df-row { grid-template-columns: 54px 1fr; }
}

/* ============================================================
   TWEAKS PANEL — minimal float
   ============================================================ */
/* (defined inline in HTML using starter component) */

/* ============================================================
   DUCK HUNT mini-game (LEVEL_02 .sys-grid)
   ============================================================ */

/* Crosshair cursor — Duck Hunt style reticle (32×32, center hotspot) */
.sys-grid .sys-tile {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' shape-rendering='crispEdges'><g fill='%231A1A1A'><rect x='0' y='13' width='8' height='6'/><rect x='24' y='13' width='8' height='6'/><rect x='13' y='0' width='6' height='8'/><rect x='13' y='24' width='6' height='8'/></g><g fill='%23F5EBD6'><rect x='1' y='14' width='7' height='4'/><rect x='24' y='14' width='7' height='4'/><rect x='14' y='1' width='4' height='7'/><rect x='14' y='24' width='4' height='7'/></g><g fill='%23E63A2E'><rect x='13' y='10' width='6' height='1'/><rect x='11' y='11' width='3' height='1'/><rect x='18' y='11' width='3' height='1'/><rect x='10' y='12' width='2' height='1'/><rect x='20' y='12' width='2' height='1'/><rect x='10' y='13' width='1' height='6'/><rect x='21' y='13' width='1' height='6'/><rect x='10' y='19' width='2' height='1'/><rect x='20' y='19' width='2' height='1'/><rect x='11' y='20' width='3' height='1'/><rect x='18' y='20' width='3' height='1'/><rect x='13' y='21' width='6' height='1'/><rect x='15' y='15' width='2' height='2'/></g></svg>") 16 16, crosshair;
  user-select: none;
  -webkit-user-select: none;
}

/* TARGET window — yellow reticle border, jittery */
.sys-tile.is-target {
  border-color: var(--mlv-yellow) !important;
  box-shadow:
    0 0 0 2px var(--mlv-yellow),
    inset 0 0 0 1px color-mix(in srgb, var(--mlv-yellow) 50%, transparent);
  animation: jitter 0.18s steps(2,end) infinite;
}
.sys-tile.is-target::after {
  opacity: 0.85 !important;
  animation: none !important;
  border-color: var(--mlv-yellow) !important;
}
.sys-tile.is-target .sys-tag {
  color: var(--mlv-yellow);
}

/* SHOT — bright flash on hit */
.sys-tile.is-shot {
  animation: shotFlash 200ms steps(2) 1 !important;
}
@keyframes shotFlash {
  0%   { background: var(--mlv-yellow); transform: translate(0,0); }
  50%  { background: var(--paper); }
  100% { background: var(--paper-dark-2); }
}

/* DOWN — tile falls and fades */
.sys-tile.is-down {
  transition: transform 700ms cubic-bezier(0.4, 0, 1, 1), opacity 700ms;
  transform: translateY(120px) rotate(8deg);
  opacity: 0;
  pointer-events: none;
}
.sys-tile.is-down::after { display: none; }

/* MISS — quick shake, no destruction */
.sys-tile.is-miss {
  animation: missShake 180ms steps(4) 1 !important;
}
@keyframes missShake {
  0%, 100% { transform: translate(0,0); }
  25%      { transform: translate(3px, 1px); }
  75%      { transform: translate(-3px, -1px); }
}

/* HIT NOTCH — +100 / MISS popup floats up */
.hit-notch {
  position: absolute;
  transform: translateX(-50%);
  font-family: var(--font-pixel);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--mlv-yellow);
  text-shadow: 2px 2px 0 var(--ink);
  pointer-events: none;
  z-index: 30;
  animation: notchRise 800ms steps(8) forwards;
  white-space: nowrap;
}
.hit-notch.is-miss {
  color: var(--mlv-red);
  font-size: 11px;
}
@keyframes notchRise {
  0%   { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, -52px); opacity: 0; }
}

/* HUD score flash — fires whenever bumpHudScore() runs */
#hud-score-n.is-flash {
  animation: scoreFlash 460ms steps(3) 1;
}
@keyframes scoreFlash {
  0%, 100% { color: var(--mlv-red); }
  50%      { color: var(--mlv-yellow); }
}

/* ============================================================
   LEVEL 07 — NOW PLAYING console game (cursors, ribbon, console)
   ============================================================ */

/* Pixel grab/grabbing cursors on carts when console is visible */
.np-cart-active .cart {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 16 16' shape-rendering='crispEdges'><g fill='%231A1A1A'><rect x='3' y='0' width='2' height='1'/><rect x='6' y='0' width='2' height='1'/><rect x='9' y='0' width='2' height='1'/><rect x='12' y='0' width='2' height='1'/><rect x='2' y='1' width='1' height='3'/><rect x='5' y='1' width='1' height='3'/><rect x='8' y='1' width='1' height='3'/><rect x='11' y='1' width='1' height='3'/><rect x='14' y='1' width='1' height='3'/><rect x='2' y='4' width='13' height='1'/><rect x='0' y='5' width='2' height='1'/><rect x='0' y='6' width='1' height='3'/><rect x='1' y='9' width='1' height='1'/><rect x='2' y='5' width='1' height='5'/><rect x='14' y='5' width='1' height='5'/><rect x='3' y='10' width='11' height='1'/><rect x='3' y='11' width='1' height='2'/><rect x='13' y='11' width='1' height='2'/><rect x='3' y='13' width='11' height='1'/></g><g fill='%23F5EBD6'><rect x='3' y='1' width='2' height='3'/><rect x='6' y='1' width='2' height='3'/><rect x='9' y='1' width='2' height='3'/><rect x='12' y='1' width='2' height='3'/><rect x='3' y='5' width='11' height='5'/><rect x='1' y='6' width='1' height='3'/><rect x='4' y='11' width='9' height='2'/></g></svg>") 8 7, grab;
}
.np-cart-active .cart:active {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 16 16' shape-rendering='crispEdges'><g fill='%231A1A1A'><rect x='3' y='2' width='2' height='1'/><rect x='6' y='2' width='2' height='1'/><rect x='9' y='2' width='2' height='1'/><rect x='12' y='2' width='2' height='1'/><rect x='2' y='3' width='1' height='1'/><rect x='5' y='3' width='1' height='1'/><rect x='8' y='3' width='1' height='1'/><rect x='11' y='3' width='1' height='1'/><rect x='14' y='3' width='1' height='1'/><rect x='2' y='4' width='1' height='6'/><rect x='14' y='4' width='1' height='6'/><rect x='0' y='5' width='2' height='1'/><rect x='0' y='6' width='1' height='3'/><rect x='1' y='9' width='1' height='1'/><rect x='3' y='10' width='11' height='1'/><rect x='3' y='11' width='1' height='2'/><rect x='13' y='11' width='1' height='2'/><rect x='3' y='13' width='11' height='1'/></g><g fill='%23F5EBD6'><rect x='3' y='3' width='2' height='1'/><rect x='6' y='3' width='2' height='1'/><rect x='9' y='3' width='2' height='1'/><rect x='12' y='3' width='2' height='1'/><rect x='3' y='4' width='11' height='6'/><rect x='1' y='5' width='1' height='1'/><rect x='2' y='5' width='1' height='3'/><rect x='4' y='11' width='9' height='2'/></g><rect x='3' y='7' width='11' height='1' fill='%231A1A1A' fill-opacity='0.35'/></svg>") 8 7, grabbing;
}

/* "TAP TO INSERT" ribbon on hover (when console is active) */
.np-cart-active .cart::before {
  content: 'TAP TO INSERT';
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--paper);
  background: var(--ink);
  padding: 5px 10px;
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--mlv-yellow);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity 120ms, transform 120ms var(--ease-crisp);
  white-space: nowrap;
}
.np-cart-active .cart:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}
.np-cart-active .cart.is-booted::before { display: none; }

/* Booted state: dimmed, status reads BOOTED with checkmark */
.cart.is-booted {
  filter: saturate(0.55) brightness(0.95);
  pointer-events: none;
}
.cart.is-booted .cart-foot {
  background: var(--ink);
  color: var(--paper);
}
.cart.is-booted .cart-status { color: var(--mlv-yellow); }
.cart.is-booted .cart-status .status-led {
  background: var(--mlv-yellow);
  animation: ledBlink 0.6s steps(2) infinite;
}
.cart.is-booted .cart-eject::after { content: ' ✓'; color: var(--mlv-yellow); }

/* Pulse on cart click to confirm the eject moment */
.cart.is-ejecting { animation: cartEject 280ms steps(4) 1; }
@keyframes cartEject {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(0, -16px) scale(1.02); }
  100% { transform: translate(0, 0); }
}

/* Flying puck — colored div that flies from cart to console slot */
.np-puck {
  position: fixed;
  z-index: 9000;
  pointer-events: none;
  width: 56px;
  height: 22px;
  background: var(--mlv-red);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition:
    transform 540ms cubic-bezier(0.42, 0, 0.5, 1),
    opacity 200ms linear 540ms;
}
.np-puck::before {
  content: '';
  position: absolute;
  left: 4px; right: 4px;
  top: -4px;
  height: 4px;
  background: var(--ink);
}
.np-puck::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 4px;
  height: 4px;
  background: rgba(0,0,0,0.25);
}

/* Floating mini NES console widget */
.np-console {
  position: fixed;
  right: -260px;
  bottom: 32px;
  width: 200px;
  height: 120px;
  z-index: 80;
  transition: right 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.np-console.is-active {
  right: 24px;
  pointer-events: auto;
}
.np-console-art {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(4px 4px 0 rgba(0,0,0,0.18));
}

/* Screen overlay aligned to SVG screen rect */
.np-console-screen {
  position: absolute;
  left: 12%;
  top: 30%;
  width: 54%;
  height: 47%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-align: center;
  pointer-events: none;
  overflow: hidden;
}
.npc-line {
  display: block;
  animation: screenBlink 1.1s steps(2) infinite;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.06);
}
.npc-sub {
  font-size: 8px;
  color: var(--mlv-red);
  margin-top: 2px;
  animation: screenBlink 0.8s steps(2) infinite 0.2s;
}
@keyframes screenBlink {
  0%, 60%    { opacity: 1; }
  61%, 100%  { opacity: 0.25; }
}
.np-console.is-loaded .npc-line { animation: none; color: var(--mlv-red); }
.np-console.is-loaded .npc-sub  { animation: none; color: var(--ink-muted); }
.np-console.is-all-clear .npc-line { color: var(--mlv-red); animation: screenBlink 0.4s steps(2) infinite; }

/* Hot-zone overlay aligned to SVG cartridge slot (top of console) */
.np-console-slot-hot {
  position: absolute;
  left: 14%;
  top: 0;
  width: 72%;
  height: 14%;
  pointer-events: none;
}

/* Console "click" bounce when puck lands */
.np-console.is-receiving { animation: consoleClick 280ms steps(3) 1; }
@keyframes consoleClick {
  0%   { transform: translateY(0); }
  40%  { transform: translateY(3px) scale(0.99); }
  100% { transform: translateY(0); }
}

@media (max-width: 720px) {
  .np-console { width: 160px; height: 100px; bottom: 20px; }
  .np-console.is-active { right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .np-puck { transition: none; }
  .np-console { transition: none; }
  .cart.is-ejecting { animation: none; }
}

