/* ============================================================================
   FDL - Final Defense Line - Wide Arcade Cabinet Stylesheet
   ============================================================================ */
:root {
  --bezel-dark: #141720;
  --bezel-mid: #212636;
  --bezel-edge: #3a4259;
  --crt-bg: #020308;
  --konami-orange: #ff8c1a;
  --konami-yellow: #ffe047;
  --konami-cyan: #22e6ff;
  --konami-red: #ff3355;
  --konami-blue: #2e6bff;
  --led-green: #22ff66;
  --text-main: #e8edf7;
  --text-muted: #8b95ad;
  --font-pixel: ui-monospace, "Cascadia Mono", "Consolas", "MS Gothic", monospace;
  --font-jp: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
}

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

html, body {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, #191f33 0%, #090b12 68%, #040508 100%);
  color: var(--text-main);
  font-family: var(--font-jp);
  overflow-x: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.hidden { display: none !important; }
.mono { font-family: var(--font-pixel); font-variant-numeric: tabular-nums; }

/* CABINET BEZEL */
.cabinet-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 14px 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.arcade-bezel {
  width: 100%;
  background: linear-gradient(180deg, #272c3d 0%, #171a24 14%, #12141c 88%, #1d212f 100%);
  border: 2px solid var(--bezel-edge);
  border-radius: 14px;
  padding: 10px 14px 12px;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.94),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -2px 0 rgba(0, 0, 0, 0.72);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bezel-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.power-led {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--led-green);
  box-shadow: 0 0 8px var(--led-green), 0 0 14px rgba(34, 255, 102, 0.6);
  flex-shrink: 0;
}

.brand-logo {
  font-family: var(--font-pixel);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #e2e8f0;
}
.brand-logo span { color: var(--konami-orange); }

.brand-model {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  padding: 1px 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
}

.bezel-switches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.hw-btn {
  font-family: var(--font-pixel);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 5px;
  background: linear-gradient(180deg, #2b3042, #191d28);
  border: 1px solid #434b63;
  color: #cbd5e1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 2px 4px rgba(0, 0, 0, 0.45);
  transition: all 0.12s;
}
.hw-btn:hover { border-color: var(--konami-cyan); color: #fff; }
.hw-btn.on {
  border-color: var(--konami-orange);
  color: var(--konami-yellow);
  background: linear-gradient(180deg, #3c2916, #24180d);
}
.hw-btn.guard-touch {
  border-color: #22ff88;
  color: #b7ffda;
  background: linear-gradient(180deg, #133b28, #0c2318);
}

/* CRT HOUSING */
.crt-housing {
  position: relative;
  width: 100%;
  background: #04060c;
  border: 3px solid #0b0d14;
  border-radius: 8px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.96);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* TOP HUD */
.arcade-hud-top {
  background: #04050c;
  border-bottom: 2px solid #263152;
  padding: 5px 10px;
  display: grid;
  grid-template-columns: 0.9fr 0.9fr 0.85fr 1fr 1.45fr;
  gap: 8px;
  align-items: center;
  font-family: var(--font-pixel);
  font-size: 11px;
}
@media (max-width: 780px) {
  .arcade-hud-top { grid-template-columns: repeat(2, 1fr); font-size: 10px; }
}

.hud-cell { display: flex; flex-direction: column; gap: 2px; }
.hud-k { font-size: 9px; letter-spacing: 0.1em; color: var(--konami-cyan); font-weight: 800; }
.hud-v { font-size: 13px; font-weight: 900; color: #fff; letter-spacing: 0.05em; }
.hud-v.orange { color: var(--konami-orange); }
.hud-v.yellow { color: var(--konami-yellow); }

.life-icons { display: flex; align-items: center; gap: 3px; margin-top: 2px; }
.life-pip {
  width: 11px; height: 8px;
  background: var(--konami-cyan);
  border: 1px solid #aef6ff;
  clip-path: polygon(0% 50%, 100% 0%, 82% 50%, 100% 100%);
  transition: opacity 0.2s;
}
.life-pip.lost { opacity: 0.15; }

.hero-hp-wrap { display: flex; flex-direction: column; gap: 3px; }
.hero-hp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9.5px;
  font-weight: 800;
  gap: 6px;
}
.pixel-bar {
  width: 100%;
  height: 9px;
  background: #14192b;
  border: 1px solid #4c5d8a;
  padding: 1px;
}
.pixel-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff2244, #ff7700, #ffe047);
  transition: width 0.06s linear;
}
.pixel-bar-fill.wave { background: linear-gradient(90deg, #0ea5e9, #22e6ff); }

/* 800x450 16:9 STAGE */
.canvas-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 800 / 450;
  max-height: 66vh;
  background: var(--crt-bg);
  overflow: hidden;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: crosshair;
  touch-action: none;
}

.crt-scanlines {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.25) 0px,
      rgba(0, 0, 0, 0.25) 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(ellipse at center, transparent 64%, rgba(0, 0, 0, 0.45) 100%);
}

/* BOTTOM TACTICAL HUD */
.arcade-hud-bottom {
  background: #04050c;
  border-top: 2px solid #263152;
  padding: 6px 10px;
  display: grid;
  grid-template-columns: 1.15fr 1.25fr 1.1fr;
  gap: 10px;
  align-items: center;
}
@media (max-width: 820px) {
  .arcade-hud-bottom { grid-template-columns: 1fr; gap: 6px; }
}

.cmd-panel { display: flex; flex-direction: column; gap: 3px; }
.meter-caption {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: #8ea2cc;
  letter-spacing: 0.06em;
}
.cmd-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.cmd-btn {
  font-family: var(--font-pixel);
  font-size: 9.5px;
  font-weight: 800;
  padding: 5px 4px;
  background: #0e1426;
  border: 1.5px solid #2b3a63;
  color: #7c8db5;
  text-align: center;
  transition: all 0.12s;
}
.cmd-btn:hover { border-color: var(--konami-cyan); color: #fff; }
.cmd-btn.active {
  background: linear-gradient(180deg, #0284c7, #0369a1);
  border-color: #a5f3fc;
  color: #fff;
  box-shadow: 0 0 8px rgba(34, 230, 255, 0.45);
}

.fleet-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 10px;
  border-left: 1px solid #263152;
  border-right: 1px solid #263152;
  font-family: var(--font-pixel);
}
@media (max-width: 820px) {
  .fleet-panel { padding: 0; border: none; }
}
.fleet-ratio-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  font-weight: 900;
}
.invasion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.inv-lbl {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #94a3b8;
  white-space: nowrap;
}
.inv-lbl.lv-low { color: #ffe047; }
.inv-lbl.lv-mid { color: #ff8c1a; }
.inv-lbl.lv-high { color: #ff3355; text-shadow: 0 0 6px rgba(255, 51, 85, 0.7); }
.invasion-pips {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
  flex: 1;
}
.inv-pip {
  height: 6px;
  background: #14192b;
  border: 1px solid #2b3a63;
}
.inv-pip.lv-low {
  background: #ffe047;
  border-color: #fef08a;
  box-shadow: 0 0 4px rgba(255, 224, 71, 0.55);
}
.inv-pip.lv-mid {
  background: #ff8c1a;
  border-color: #fed7aa;
  box-shadow: 0 0 5px rgba(255, 140, 26, 0.65);
}
.inv-pip.lv-high {
  background: #ff2244;
  border-color: #fecdd3;
  box-shadow: 0 0 6px rgba(255, 34, 68, 0.85);
  animation: invPulse 0.7s ease-in-out infinite alternate;
}
@keyframes invPulse {
  from { filter: brightness(0.9); }
  to { filter: brightness(1.35); }
}
.bullet-legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9.5px;
  color: #cbd5e1;
  background: #0a1020;
  border: 1px solid #233054;
  padding: 3px 6px;
}
.dot-ally { color: #22e6ff; font-weight: 900; }
.dot-enemy { color: #ff2244; font-weight: 900; }

.zako-status-box { display: flex; flex-direction: column; gap: 3px; font-family: var(--font-pixel); }
.zako-head { display: flex; justify-content: space-between; align-items: center; font-size: 10px; gap: 6px; }
.zako-name { font-weight: 900; color: var(--konami-cyan); }
.zako-hp-row { display: flex; align-items: center; gap: 3px; }
.zako-hp-pip { width: 8px; height: 6px; background: var(--konami-cyan); border: 1px solid #aef6ff; }
.zako-hp-pip.turret { background: #34d399; border-color: #a7f3d0; }
.zako-hp-pip.lost { opacity: 0.16; }

.gauge-row { display: flex; align-items: center; gap: 6px; font-size: 9.5px; }
.gauge-fill-fuel { height: 100%; background: linear-gradient(90deg, #0099ff, #22e6ff); }
.gauge-fill-armor { height: 100%; background: linear-gradient(90deg, #00cc66, #44ff99); }
.gauge-fill-danger { background: linear-gradient(90deg, #cc1133, #ff4466) !important; }

/* OVERLAYS */
.crt-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(3, 5, 14, 0.90);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow-y: auto;
}

/* CINEMATIC TRANSPARENT ARCADE TITLE SCREEN */
.crt-overlay.title-cinematic {
  background: radial-gradient(ellipse at center, rgba(4, 8, 22, 0.36) 0%, rgba(2, 4, 14, 0.80) 100%);
  padding: 6px 14px;
}

.title-hero-stage {
  width: 100%;
  max-width: 740px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}

.title-top-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.title-badge {
  font-family: var(--font-pixel);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 2px 8px;
  background: rgba(6, 12, 30, 0.82);
  border: 1px solid rgba(34, 230, 255, 0.45);
  color: #a5f3fc;
}
.title-badge.accent {
  border-color: rgba(255, 140, 26, 0.6);
  color: #ffe047;
}

.title-logo-wrap {
  padding: 2px 12px 0;
}
.title-kicker {
  font-family: var(--font-pixel);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.32em;
  color: #22e6ff;
  text-shadow: 0 0 10px rgba(34, 230, 255, 0.7);
}
.chrome-logo {
  position: relative;
  font-family: Impact, "Arial Black", "Segoe UI Black", var(--font-pixel), sans-serif;
  font-size: clamp(72px, 11.5vw, 128px);
  font-weight: 900;
  letter-spacing: 0.22em;
  padding-left: 0.22em;
  line-height: 0.92;
  margin: 2px 0 4px;
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #e2f4ff 26%,
    #38bdf8 48%,
    #0c2a5e 52%,
    #ffe047 76%,
    #ff661a 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 0 #180600) drop-shadow(0 0 24px rgba(34, 230, 255, 0.65));
  animation: logoShimmer 3.8s ease-in-out infinite;
}
@keyframes logoShimmer {
  0%, 100% { filter: drop-shadow(0 4px 0 #180600) drop-shadow(0 0 20px rgba(34, 230, 255, 0.55)); }
  50% { filter: drop-shadow(0 4px 0 #180600) drop-shadow(0 0 34px rgba(255, 224, 71, 0.85)); }
}

.title-emblem {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 900;
  letter-spacing: 0.22em;
  padding: 4px 28px;
  margin-top: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 34, 68, 0.78), transparent);
  border-top: 1px solid rgba(255, 224, 71, 0.7);
  border-bottom: 1px solid rgba(255, 224, 71, 0.7);
  color: #fff8d6;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95);
}
.title-jp-sub {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #e2e8f0;
  text-shadow: 0 2px 6px #000;
  margin-top: 3px;
}

.title-cta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.start-btn.cta-main {
  font-size: 13.5px;
  padding: 8px 22px;
  animation: ctaPulse 1.4s ease-in-out infinite alternate;
}
@keyframes ctaPulse {
  from { box-shadow: 0 0 14px rgba(34, 230, 255, 0.45); }
  to { box-shadow: 0 0 24px rgba(34, 230, 255, 0.85); }
}

.title-manual {
  width: 100%;
  background: rgba(6, 10, 24, 0.92);
  border: 1.5px solid #38bdf8;
  padding: 8px;
}
.title-manual .briefing-grid { margin-bottom: 0; }

.title-dock {
  width: 100%;
  background: rgba(5, 9, 22, 0.78);
  border: 1px solid rgba(64, 104, 200, 0.55);
  backdrop-filter: blur(2px);
  padding: 7px 10px;
}
.title-dock .select-group { margin-bottom: 5px; }
.title-dock .stage-select-grid { margin-bottom: 0; }

.arcade-modal {
  width: 100%;
  max-width: 720px;
  background: #080d1e;
  border: 2px solid #4068c8;
  box-shadow: 0 0 0 2px #03050c, 0 0 32px rgba(46, 107, 255, 0.4);
  padding: 14px 18px;
  text-align: center;
}

.arcade-kicker { font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.22em; color: var(--konami-cyan); font-weight: 800; }
.arcade-title {
  font-family: var(--font-pixel);
  font-size: clamp(20px, 3.2vw, 30px);
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 3px 0 2px;
  background: linear-gradient(180deg, #ffffff 0%, #ffe047 45%, #ff661a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 #330c00);
}
.arcade-subjp { font-size: 12px; font-weight: 700; color: #c8d6f5; margin-bottom: 8px; }

.title-demo-hint {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: #ffe047;
  margin-top: 7px;
  min-height: 14px;
  letter-spacing: 0.08em;
}

.briefing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: left; margin-bottom: 9px; }
@media (max-width: 680px) { .briefing-grid { grid-template-columns: repeat(2, 1fr); } }
.brief-box { background: #0e152d; border: 1px solid #2b3c6e; padding: 6px 8px; font-size: 10px; color: #cbd5e1; line-height: 1.4; }
.brief-box strong { display: block; font-family: var(--font-pixel); font-size: 10px; color: var(--konami-yellow); margin-bottom: 2px; }

.select-group { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.mode-btn {
  font-family: var(--font-pixel);
  font-size: 10px;
  font-weight: 800;
  padding: 4px 9px;
  background: #10162b;
  border: 1.5px solid #354778;
  color: #93a4cc;
  transition: all 0.12s;
}
.mode-btn:hover { border-color: var(--konami-cyan); color: #fff; }
.mode-btn.selected {
  background: linear-gradient(180deg, #ff8c1a, #b83d00);
  border-color: #fff1b8;
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 140, 26, 0.5);
}

.stage-select-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 10px; }
@media (max-width: 600px) { .stage-select-grid { grid-template-columns: repeat(2, 1fr); } }
.st-chip {
  font-family: var(--font-pixel);
  font-size: 9.5px;
  font-weight: 800;
  padding: 5px 4px;
  background: #0d1428;
  border: 1.5px solid #2c3d6b;
  color: #9fb0d6;
  text-align: center;
  transition: all 0.12s;
}
.st-chip:hover { border-color: var(--konami-cyan); color: #fff; }
.st-chip.selected {
  border-color: var(--konami-cyan);
  background: linear-gradient(180deg, #0c3559, #071e36);
  color: #ffffff;
  box-shadow: 0 0 8px rgba(34, 230, 255, 0.45);
}
.st-chip .star { color: var(--konami-yellow); margin-left: 3px; }

.start-btn {
  font-family: var(--font-pixel);
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 8px 18px;
  background: linear-gradient(180deg, #22e6ff 0%, #0066dd 100%);
  border: 2px solid #d4fbff;
  color: #ffffff;
  text-shadow: 1px 1px 0 #002255;
  box-shadow: 0 0 16px rgba(34, 230, 255, 0.45);
  transition: transform 0.1s, filter 0.12s;
}
.start-btn:hover { filter: brightness(1.14); transform: translateY(-1px); }
.start-btn:active { transform: scale(0.97); }
.start-btn.orange {
  background: linear-gradient(180deg, #ff991a 0%, #c84b00 100%);
  border-color: #fff2b2;
  box-shadow: 0 0 16px rgba(255, 140, 26, 0.45);
}
.start-btn.gold {
  background: linear-gradient(180deg, #fbbf24 0%, #b45309 100%);
  border-color: #fef08a;
  color: #fff;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.45);
}

/* ARCADE NAME ENTRY & TOP 10 RANKING */
.ne-slots {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 14px 0;
}
.ne-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ne-arrow {
  font-family: var(--font-pixel);
  font-size: 11px;
  padding: 3px 14px;
  background: #141d38;
  border: 1px solid #3c548a;
  color: #cbd5e1;
}
.ne-arrow:hover { border-color: var(--konami-cyan); color: #fff; }
.ne-char {
  font-family: var(--font-pixel);
  font-size: 32px;
  font-weight: 900;
  width: 54px;
  height: 56px;
  line-height: 52px;
  text-align: center;
  background: #050914;
  border: 2px solid #354778;
  color: #fff;
}
.ne-char.active {
  border-color: #ffe047;
  color: #ffe047;
  box-shadow: 0 0 14px rgba(255, 224, 71, 0.55);
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-pixel);
  font-size: 11.5px;
  margin: 8px 0 10px;
}
.ranking-table th {
  color: var(--konami-cyan);
  border-bottom: 1.5px solid #2e4070;
  padding: 4px 6px;
  font-size: 10px;
  text-align: center;
}
.ranking-table td {
  padding: 4px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  color: #cbd5e1;
}
.ranking-table tr.rank-1 td { color: #ffe047; font-weight: 900; }
.ranking-table tr.rank-2 td { color: #e2e8f0; font-weight: 800; }
.ranking-table tr.rank-3 td { color: #ff8c1a; font-weight: 800; }
.ranking-table tr.new-entry {
  background: rgba(34, 230, 255, 0.16);
  outline: 1px solid #22e6ff;
}

/* PERSONNEL ORDER EVALUATION CARD */
.eval-card {
  background: #0d152b;
  border: 1.5px solid #3c548a;
  padding: 10px 12px;
  margin: 8px 0 12px;
  text-align: left;
}
.eval-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.eval-badge { font-family: var(--font-pixel); font-size: 11px; font-weight: 900; padding: 3px 10px; border-radius: 3px; }
.eval-badge.promote { background: #0f5132; border: 1px solid #34d399; color: #a7f3d0; }
.eval-badge.reassign { background: #1e3a8a; border: 1px solid #60a5fa; color: #dbeafe; }
.eval-badge.demote { background: #7f1d1d; border: 1px solid #ff4466; color: #fecaca; }
.eval-badge.hold { background: #334155; border: 1px solid #94a3b8; color: #f1f5f9; }
.eval-transfer {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-pixel); font-size: 12px; font-weight: 900;
  padding: 6px; background: #060a16; border: 1px solid #26365e; margin-bottom: 5px;
}
.eval-reason { font-size: 11px; color: #cbd5e1; text-align: center; }

/* STORY DIALOGUE BOX */
.story-overlay {
  position: absolute; inset: 0; z-index: 25;
  background: rgba(2, 4, 12, 0.72);
  display: flex; align-items: flex-end; justify-content: center; padding: 18px;
}
.story-box {
  width: 100%; max-width: 720px;
  background: linear-gradient(180deg, #0b1229, #060916);
  border: 2px solid var(--konami-cyan);
  box-shadow: 0 0 28px rgba(34, 230, 255, 0.35);
  padding: 12px 14px;
  display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center;
}
.portrait-frame {
  width: 84px; height: 84px; background: #040712; border: 2px solid #3c4f82;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.portrait-frame canvas { width: 80px; height: 80px; image-rendering: auto; }
.story-meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.story-speaker { font-family: var(--font-pixel); font-size: 12px; font-weight: 900; }
.story-role { font-size: 10px; color: #93a4cc; }
.story-text { font-size: 12.5px; line-height: 1.55; color: #f1f5f9; min-height: 40px; }
.story-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.movie-controls-overlay {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 26;
  display: flex;
  gap: 6px;
}

.result-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; }
.res-cell { background: #0e142a; border: 1px solid #2b3c6e; padding: 6px 4px; }
.res-cell .k { font-family: var(--font-pixel); font-size: 9px; color: #8ea2cc; }
.res-cell .v { font-family: var(--font-pixel); font-size: 15px; font-weight: 900; color: #fff; margin-top: 2px; }

.credits-scroll {
  background: #050814; border: 1px solid #2b3c6e; padding: 10px; margin: 8px 0 12px;
  font-family: var(--font-pixel); font-size: 10.5px; line-height: 1.8; color: #cbd5e1;
}

/* X (TWITTER) SCORE SHARE BUTTON */
.tweet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 4px;
  border: 1.5px solid #38bdf8;
  background: linear-gradient(180deg, #111827 0%, #050811 100%);
  color: #f8fafc;
  font-family: var(--font-pixel);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: transform 0.12s ease, border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.tweet-btn .x-mark {
  font-size: 14px;
  line-height: 1;
  color: var(--konami-cyan);
}
.tweet-btn:hover {
  border-color: #ffe047;
  background: linear-gradient(180deg, #172540 0%, #091020 100%);
  box-shadow: 0 0 18px rgba(34, 230, 255, 0.45);
  transform: translateY(-1px);
}
.tweet-btn:active {
  transform: translateY(0);
}
.tweet-btn:focus-visible {
  outline: 2px solid var(--konami-yellow);
  outline-offset: 2px;
}

/* BOTTOM STRIP */
.bezel-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px; padding: 2px 4px 0; font-size: 11px; color: var(--text-muted);
}
.ctrl-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ctrl-strip kbd {
  font-family: var(--font-pixel); font-size: 10px; padding: 1px 5px; border-radius: 3px;
  background: #0c0e16; border: 1px solid #3c4359; color: #e2e8f0;
}

/* FULLSCREEN MODE (Aspect-Preserving 16:9 Maximized Cabinet) */
#arcade-cabinet:fullscreen,
#arcade-cabinet:-webkit-full-screen,
#arcade-cabinet.is-fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  border-radius: 0;
  border-width: 0;
  padding: 6px 10px;
  gap: 5px;
  background: #04050a;
}

#arcade-cabinet:fullscreen .crt-housing,
#arcade-cabinet:-webkit-full-screen .crt-housing,
#arcade-cabinet.is-fullscreen .crt-housing {
  flex: 1;
  min-height: 0;
}

#arcade-cabinet:fullscreen .canvas-stage,
#arcade-cabinet:-webkit-full-screen .canvas-stage,
#arcade-cabinet.is-fullscreen .canvas-stage {
  flex: 1;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  container-type: size;
  display: flex;
  align-items: center;
  justify-content: center;
}

#arcade-cabinet:fullscreen #game-canvas,
#arcade-cabinet:-webkit-full-screen #game-canvas,
#arcade-cabinet.is-fullscreen #game-canvas {
  width: min(100cqw, calc(100cqh * 16 / 9));
  height: min(100cqh, calc(100cqw * 9 / 16));
}

/* RELATED LINKS FOOTER (hidden cleanly during fullscreen play) */
.site-footer {
  width: 100%;
  margin-top: 10px;
  padding: 8px 6px 2px;
  border-top: 1px solid rgba(58, 66, 89, 0.55);
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
}

.site-footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.site-footer-link:hover {
  color: var(--konami-cyan);
  border-bottom-color: var(--konami-cyan);
}

.site-footer-link:focus-visible {
  color: var(--konami-cyan);
  border-bottom-color: var(--konami-cyan);
  outline: 2px solid rgba(34, 230, 255, 0.45);
  outline-offset: 2px;
}

:fullscreen .site-footer,
:-webkit-full-screen .site-footer {
  display: none;
}
