/* CCS — Coyotes, Cobra Chickens & Swans — Comic-Dossier Design System */
:root {
  --void: #07080a;
  --ink: #1c1a2e;
  --paper: #f4ecd8;
  --paper-2: #eee8da;
  --bone: #fffdf6;
  --yellow: #f8e6a6;
  --amber: #f2b632;
  --orange: #ff6a13;
  --red: #e8413a;
  --violet: #7a68a8;
  --violet-deep: #5a4d8c;
  --green: #6f9a5e;
  --teal: #2c8fa3;
  --cyan: #cdeef0;
  --coyote: #d97a2b;
  --goose: #ff6a13;
  --swan: #2c8fa3;

  --sfx: 'Bangers', 'Impact', 'Arial Black', sans-serif;
  --hand: 'Comic Neue', 'Trebuchet MS', 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', 'Consolas', 'Courier New', monospace;

  --border: 3px solid var(--ink);
  --border-sm: 2px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --shadow-lg: 8px 8px 0 var(--ink);
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--void);
  color: var(--ink);
  font-family: var(--hand);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Main 3D WebGL Canvas inside comic frame */
#game-frame {
  position: fixed;
  inset: 8px;
  border: 3px solid var(--ink);
  background: #8ab8d4;
  overflow: hidden;
  box-shadow: 0 0 0 8px var(--paper);
}

#c {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Subtle halftone / print overlay (toggleable in Settings & Photo Mode) */
#halftone-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background-image: radial-gradient(rgba(28, 26, 46, 0.055) 0.9px, transparent 1.1px);
  background-size: 6px 6px;
  mix-blend-mode: multiply;
  opacity: 0.24;
  transition: opacity 0.25s;
}

#vignette-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  box-shadow: inset 0 0 80px rgba(28, 26, 46, 0.22);
}

/* Thermal Scan Mode Full-Screen Overlay */
#scan-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  display: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(16, 42, 74, 0.12) 0%, rgba(10, 22, 46, 0.58) 100%),
    repeating-linear-gradient(0deg, rgba(120, 230, 255, 0.06) 0 2px, transparent 2px 5px);
  border: 4px solid rgba(110, 231, 255, 0.65);
}
#scan-overlay.active { display: block; }
.scan-readout {
  position: absolute;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(12, 24, 48, 0.9);
  color: #7eeeff;
  border: 2px solid #7eeeff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  letter-spacing: 0.1em;
  box-shadow: 3px 3px 0 #071022;
}

/* Optical Lens Zoom Reticle Overlay */
#lens-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  display: none;
  background: radial-gradient(circle at 50% 50%, transparent 34%, rgba(12, 16, 28, 0.72) 78%);
}
#lens-overlay.active { display: block; }
.lens-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.lens-telemetry {
  position: absolute;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(28, 26, 46, 0.9);
  color: var(--yellow);
  border: 2px solid var(--yellow);
  font-family: var(--mono);
  font-size: 11px;
  padding: 10px 12px;
  min-width: 185px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.45);
}
.lens-telemetry .lt-title {
  color: var(--orange);
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: 0.08em;
}

/* Speed Lines Burst Overlay (Honk / Howl / Trumpet / Dive) */
#speed-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7;
  opacity: 0;
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    rgba(255, 253, 246, 0.0) 0deg 6deg,
    rgba(255, 253, 246, 0.42) 6deg 7.2deg
  );
  mask-image: radial-gradient(circle at 50% 50%, transparent 32%, black 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 32%, black 75%);
  transition: opacity 0.15s;
}
#speed-lines.burst { opacity: 1; }

/* Floating Comic SFX Words ("HONK!!", "SPLAT!", "AWOOO!!", "TAGGED!") */
#sfx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  overflow: hidden;
}
.sfx-pop {
  position: absolute;
  font-family: var(--sfx);
  font-size: 46px;
  letter-spacing: 0.06em;
  color: var(--yellow);
  -webkit-text-stroke: 2.5px var(--ink);
  text-shadow: 4px 4px 0 var(--ink);
  transform: translate(-50%, -50%) rotate(-8deg) scale(0.4);
  animation: sfxPop 0.95s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
  white-space: nowrap;
}
@keyframes sfxPop {
  0%   { opacity: 0; transform: translate(-50%, -50%) rotate(-12deg) scale(0.3); }
  22%  { opacity: 1; transform: translate(-50%, -68%) rotate(-5deg) scale(1.18); }
  70%  { opacity: 1; transform: translate(-50%, -86%) rotate(-3deg) scale(1.0); }
  100% { opacity: 0; transform: translate(-50%, -115%) rotate(2deg) scale(0.85); }
}

/* UI Root Layer */
#ui {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}
#ui .interactive { pointer-events: auto; }

/* Shared Comic Card Primitives */
.comic-card {
  background: var(--bone);
  border: var(--border);
  box-shadow: var(--shadow);
  background-image: radial-gradient(rgba(28, 26, 46, 0.06) 1px, transparent 1px);
  background-size: 7px 7px;
}
.comic-card.yellow { background-color: var(--yellow); }
.comic-card.paper  { background-color: var(--paper); }

.comic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sfx);
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 18px;
  background: var(--bone);
  color: var(--ink);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s, background-color 0.12s;
}
.comic-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
  background: var(--yellow);
}
.comic-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}
.comic-btn.primary {
  background: var(--red);
  color: var(--bone);
}
.comic-btn.primary:hover { background: #f2524a; }
.comic-btn.orange {
  background: var(--orange);
  color: var(--bone);
}
.comic-btn.orange:hover { background: #ff7e30; }
.comic-btn.teal {
  background: var(--teal);
  color: var(--bone);
}

.hazard-strip {
  height: 11px;
  background: repeating-linear-gradient(
    -45deg,
    var(--amber) 0 10px,
    var(--ink) 10px 20px
  );
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.tape-strip {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 78px;
  height: 20px;
  background: rgba(248, 230, 166, 0.78);
  border: 1.5px solid rgba(28, 26, 46, 0.35);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.mono { font-family: var(--mono); }
.sfx  { font-family: var(--sfx); letter-spacing: 0.05em; }

/* ============================================================
   1. LOADING SCREEN (8 Phases)
   ============================================================ */
#loading-screen {
  position: absolute;
  inset: 0;
  z-index: 60;
  background:
    radial-gradient(rgba(28, 26, 46, 0.08) 1.2px, transparent 1.2px),
    linear-gradient(180deg, #8cc3e3 0%, #f4e6c6 62%, #d8c8a8 100%);
  background-size: 8px 8px, 100% 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 34px;
  pointer-events: auto;
  transition: opacity 0.45s ease;
}
#loading-screen.hidden { opacity: 0; pointer-events: none; display: none; }

.load-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.brand-lockup {
  transform: rotate(-3deg);
  display: inline-block;
}
.brand-ccs {
  font-family: var(--sfx);
  font-size: 86px;
  line-height: 0.85;
  color: var(--orange);
  -webkit-text-stroke: 3.5px var(--ink);
  text-shadow: 6px 6px 0 var(--ink);
  letter-spacing: 0.04em;
}
.brand-sub-pill {
  display: inline-block;
  margin-top: 6px;
  background: var(--yellow);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  padding: 4px 12px;
  font-family: var(--sfx);
  font-size: 20px;
  letter-spacing: 0.08em;
  transform: rotate(1.8deg);
}
.brand-tagline {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  background: var(--ink);
  color: var(--paper);
  padding: 3px 9px;
  display: inline-block;
  letter-spacing: 0.1em;
}

.whats-new-card {
  width: 340px;
  padding: 14px 16px;
  transform: rotate(1.4deg);
  position: relative;
}
.whats-new-card h3 {
  margin: 0 0 8px;
  font-family: var(--sfx);
  font-size: 22px;
  color: var(--violet-deep);
  letter-spacing: 0.05em;
}
.whats-new-card ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}
.whats-new-card li { margin-bottom: 4px; }

.load-center {
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}
.load-skyline {
  width: 100%;
  max-width: 620px;
  height: 115px;
  margin: 0 auto 10px;
}
.phase-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-bottom: 12px;
}
.phase-pill {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 2px solid var(--ink);
  background: var(--paper);
  opacity: 0.55;
}
.phase-pill.done {
  background: var(--green);
  color: var(--bone);
  opacity: 1;
}
.phase-pill.active {
  background: var(--orange);
  color: var(--bone);
  opacity: 1;
  box-shadow: 3px 3px 0 var(--ink);
  transform: translateY(-2px);
}
.load-bar-wrap {
  height: 22px;
  background: var(--bone);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.load-bar-fill {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(
    -45deg,
    var(--orange) 0 14px,
    #ff8438 14px 28px
  );
  border-right: 3px solid var(--ink);
  transition: width 0.22s ease;
}

.load-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}
.intercom-card {
  max-width: 480px;
  padding: 10px 14px;
  transform: rotate(-1deg);
}
.intercom-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.12em;
  margin-bottom: 3px;
}
#load-quip {
  font-size: 14px;
  font-weight: 700;
}

/* ============================================================
   2. TITLE SCREEN
   ============================================================ */
#title-screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 28px 18px;
  pointer-events: none;
}
#title-screen.active { display: flex; }

.title-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.darkroom-badge {
  pointer-events: auto;
  padding: 8px 14px;
  transform: rotate(1.4deg);
  min-width: 225px;
}
.darkroom-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--violet-deep);
}
.darkroom-dots {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}
.darkroom-dot {
  flex: 1;
  height: 5px;
  background: #d8d1c2;
  border: 1.5px solid var(--ink);
}
.darkroom-dot.active { background: var(--orange); }

.title-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

/* Rotated Stacked Menu Cards (Title Menu!) */
.title-menu-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 335px;
  pointer-events: auto;
}
.menu-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  background: var(--bone);
  border: var(--border);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  transition: transform 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
}
.menu-card:nth-child(1) { transform: rotate(-1.6deg); background: var(--yellow); }
.menu-card:nth-child(2) { transform: rotate(0.9deg); }
.menu-card:nth-child(3) { transform: rotate(-0.8deg); }
.menu-card:nth-child(4) { transform: rotate(1.2deg); }
.menu-card:hover {
  transform: rotate(0deg) translate(8px, -2px) !important;
  background: var(--orange);
  color: var(--bone);
  box-shadow: 7px 7px 0 var(--ink);
}
.menu-card:hover .mc-sub { color: #fff4d9; }
.menu-card:hover .mc-num { background: var(--ink); color: var(--yellow); }

.mc-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 7px;
  background: var(--paper);
  border: 2px solid var(--ink);
  flex-shrink: 0;
}
.mc-title {
  font-family: var(--sfx);
  font-size: 25px;
  line-height: 1;
  letter-spacing: 0.05em;
}
.mc-sub {
  font-size: 12px;
  font-weight: 700;
  color: #4f4b63;
  margin-top: 2px;
}

.title-right-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: auto;
}
.title-fleet-card {
  padding: 10px 14px;
  transform: rotate(1deg);
  max-width: 390px;
}
.fleet-head {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--red);
  margin-bottom: 6px;
}
.fleet-pills {
  display: flex;
  gap: 8px;
}
.fleet-pill {
  flex: 1;
  padding: 6px 8px;
  border: 2px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
  transition: transform 0.1s, background 0.1s;
  text-align: center;
}
.fleet-pill:hover, .fleet-pill.selected {
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--yellow);
}
.fleet-pill .fp-key {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  display: inline-block;
  padding: 1px 5px;
  color: var(--bone);
  margin-bottom: 2px;
}
.fleet-pill .fp-name {
  font-family: var(--sfx);
  font-size: 16px;
  letter-spacing: 0.04em;
  display: block;
}
.fleet-pill .fp-role {
  font-size: 10px;
  font-weight: 700;
  color: #4d4a61;
}

.meanwhile-placard {
  background: var(--yellow);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 8px 16px;
  transform: rotate(-1.5deg);
  text-align: right;
}
.meanwhile-placard .mp-small {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--red);
}
.meanwhile-placard .mp-place {
  font-family: var(--sfx);
  font-size: 24px;
  letter-spacing: 0.05em;
}

/* ============================================================
   3. ORBITAL UPLINK ZOOM OVERLAY
   ============================================================ */
#orbital-overlay {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: rgba(12, 16, 30, 0.42);
  pointer-events: none;
}
#orbital-overlay.active { display: flex; }
.orbital-ring {
  width: 190px;
  height: 190px;
  border: 4px dashed var(--orange);
  border-radius: 50%;
  animation: orbitSpin 2s linear infinite;
}
@keyframes orbitSpin {
  from { transform: rotate(0deg) scale(1.3); }
  to   { transform: rotate(360deg) scale(0.55); }
}
.orbital-banner {
  margin-top: 14px;
  background: var(--yellow);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 8px 20px;
  font-family: var(--sfx);
  font-size: 26px;
  letter-spacing: 0.08em;
  transform: rotate(-1.5deg);
}

/* ============================================================
   4. IN-GAME HUD
   ============================================================ */
#hud {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
}
#hud.active { display: block; }

/* Top Center: Compass + Arched Suspicion Eye Meter */
.hud-top-center {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.compass-wrap {
  width: 246px;
  height: 26px;
  background: rgba(255, 253, 246, 0.94);
  border: var(--border-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
}
.compass-tape {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
  will-change: transform;
}
.compass-center-mark {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--orange);
  z-index: 2;
}

.suspicion-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bone);
  border: var(--border-sm);
  box-shadow: var(--shadow-sm);
  padding: 4px 12px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transform: rotate(-0.7deg);
}
.suspicion-pill.warn { background: var(--yellow); border-color: var(--orange); }
.suspicion-pill.alert { background: var(--red); color: var(--bone); animation: pulseAlert 0.6s infinite alternate; }
@keyframes pulseAlert { from { transform: rotate(-0.7deg) scale(1); } to { transform: rotate(0.7deg) scale(1.04); } }
#bylaw-banner {
  display: none;
  margin-top: 2px;
  background: #1f365c;
  color: var(--yellow);
  border: 2.5px solid var(--red);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 4px 14px;
  font-family: var(--sfx);
  font-size: 18px;
  letter-spacing: 0.06em;
  animation: pulseAlert 0.45s infinite alternate;
}
#bylaw-banner.active { display: block; }
.eye-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* Top-Right: Credits, Mode, Buttons */
.hud-top-right {
  position: absolute;
  top: 12px;
  right: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: auto;
}
.hud-quick-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.hud-chip {
  background: var(--bone);
  border: var(--border-sm);
  box-shadow: var(--shadow-sm);
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.hud-chip.btn { cursor: pointer; }
.hud-chip.btn:hover { background: var(--yellow); transform: translate(-1px, -1px); }
.hud-chip.credits { background: var(--yellow); }
#perf-overlay {
  font-family: var(--mono);
  font-size: 10px;
  background: rgba(28, 26, 46, 0.85);
  color: #cdeef0;
  padding: 4px 8px;
  border: 1.5px solid var(--ink);
  display: none;
}
#perf-overlay.active { display: block; }

/* Middle-Left: Status Chip + Radio Speech Bubble + Live Objective */
.hud-mid-left {
  position: absolute;
  top: 76px;
  left: 16px;
  width: 315px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
#status-chip {
  display: none;
  align-self: flex-start;
  background: var(--green);
  color: var(--bone);
  border: var(--border-sm);
  box-shadow: var(--shadow-sm);
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  transform: rotate(-1deg);
}
#status-chip.active { display: inline-block; }
#status-chip.warn { background: var(--orange); }

#radio-bubble {
  display: none;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bone);
  border: var(--border);
  box-shadow: var(--shadow);
  transform: rotate(-0.8deg);
}
#radio-bubble.active { display: flex; }
.radio-avatar {
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.radio-speaker {
  font-family: var(--sfx);
  font-size: 16px;
  color: var(--orange);
  letter-spacing: 0.06em;
  line-height: 1;
  margin-bottom: 3px;
}
.radio-text {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

#objective-box {
  display: none;
  padding: 10px 12px;
  background: var(--yellow);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  transform: rotate(0.7deg);
}
#objective-box.active { display: block; }
.obj-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.obj-main {
  font-family: var(--sfx);
  font-size: 18px;
  letter-spacing: 0.04em;
  line-height: 1.15;
}
.obj-dist {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--violet-deep);
  margin-top: 4px;
}

/* Bottom-Left: Rotating Circular Minimap + Speed/Alt + Yellow Street Placard */
.hud-bot-left {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.minimap-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.minimap-frame {
  position: relative;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  border: 3.5px solid var(--ink);
  box-shadow: var(--shadow);
  background: var(--paper);
  overflow: hidden;
  pointer-events: auto;
  cursor: pointer;
}
#minimap-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.minimap-north {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--red);
  color: var(--bone);
  border: 1.5px solid var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  line-height: 14px;
  pointer-events: none;
}
.telemetry-pills {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.tel-pill {
  background: var(--bone);
  border: var(--border-sm);
  box-shadow: var(--shadow-sm);
  padding: 3px 9px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.street-placard {
  background: var(--yellow);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  padding: 5px 12px;
  transform: rotate(-1.6deg);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  cursor: pointer;
}
.street-placard:hover { background: var(--amber); }
.sp-name {
  font-family: var(--sfx);
  font-size: 18px;
  letter-spacing: 0.05em;
}
.sp-key {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  background: var(--ink);
  color: var(--yellow);
  padding: 2px 5px;
}

/* Bottom-Center: 3-Animal Transport Switcher Dock */
.transport-dock {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  pointer-events: auto;
}
.t-card {
  width: 132px;
  padding: 6px 8px 7px;
  background: var(--bone);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.12s, background-color 0.12s, box-shadow 0.12s;
  position: relative;
}
.t-card:nth-child(1) { transform: rotate(-1.5deg); }
.t-card:nth-child(2) { transform: rotate(0.4deg); }
.t-card:nth-child(3) { transform: rotate(1.4deg); }
.t-card:hover { transform: translateY(-4px) rotate(0deg); }
.t-card.active {
  transform: translateY(-7px) rotate(0deg);
  background: var(--yellow);
  box-shadow: 5px 7px 0 var(--ink);
}
.t-card .tc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}
.tc-key {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--bone);
  padding: 1px 6px;
  border: 1.5px solid var(--ink);
}
.tc-tag {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: #4f4b63;
}
.tc-name {
  font-family: var(--sfx);
  font-size: 18px;
  line-height: 1.05;
  letter-spacing: 0.04em;
}
.tc-mode {
  font-size: 10px;
  font-weight: 700;
  color: #4f4b63;
}

/* Bottom-Right: Battery Bar + Action Strips */
.hud-bot-right {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  pointer-events: auto;
}
.battery-card {
  width: 248px;
  padding: 7px 10px;
  background: var(--bone);
  border: var(--border);
  box-shadow: var(--shadow-sm);
}
.bat-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}
.bat-bar-bg {
  height: 13px;
  background: #ded7c6;
  border: 2px solid var(--ink);
  overflow: hidden;
}
.bat-bar-fill {
  height: 100%;
  width: 100%;
  background: var(--teal);
  transition: width 0.12s linear, background-color 0.2s;
}
.bat-bar-fill.charging { background: #4caf6a; }
.bat-bar-fill.low { background: var(--red); }

.action-strip {
  display: flex;
  gap: 5px;
}
.act-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 8px;
  min-width: 58px;
  background: var(--bone);
  border: var(--border-sm);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  transition: transform 0.08s, background-color 0.1s;
}
.act-btn:hover { background: var(--yellow); transform: translateY(-2px); }
.act-btn.active { background: var(--orange); color: var(--bone); }
.act-btn.cooldown { opacity: 0.55; }
.act-btn .ak {
  font-size: 9px;
  padding: 0 4px;
  background: var(--ink);
  color: var(--yellow);
  margin-bottom: 2px;
}

/* Interact / Perch Center Prompt */
#interact-prompt {
  position: absolute;
  top: 58%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  background: var(--yellow);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  padding: 5px 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}
#interact-prompt.active { display: block; }

/* Crosshair / Tag Reticle */
#crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  pointer-events: none;
  display: none;
}
#crosshair.active { display: block; }

/* CCTV Traffic Camera Feed Popup */
#cctv-modal {
  position: absolute;
  top: 84px;
  right: 22px;
  width: 280px;
  padding: 10px;
  display: none;
  z-index: 22;
  pointer-events: auto;
  transform: rotate(1deg);
}
#cctv-modal.active { display: block; }
.cctv-screen {
  height: 138px;
  background:
    repeating-linear-gradient(0deg, rgba(110, 231, 255, 0.09) 0 2px, transparent 2px 4px),
    linear-gradient(135deg, #1b2838 0%, #2a3e54 100%);
  border: 2px solid var(--ink);
  color: #8df0ff;
  font-family: var(--mono);
  font-size: 11px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Pointer-lock click hint */
#look-hint {
  position: absolute;
  top: 108px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(28, 26, 46, 0.88);
  color: var(--yellow);
  border: 2px solid var(--yellow);
  padding: 4px 12px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  display: none;
  pointer-events: none;
}
#look-hint.active { display: block; }

/* ============================================================
   5. CARTOGRAPHIC MAP SHEET (M) — Interactive 2D/3D Map
   ============================================================ */
#map-screen {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  background: var(--paper);
  pointer-events: auto;
}
#map-screen.active { display: block; }
#map-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
}
#map-canvas:active { cursor: grabbing; }

.map-header-card {
  position: absolute;
  top: 16px;
  left: 18px;
  width: 445px;
  max-width: calc(100vw - 140px);
  padding: 14px 16px;
  transform: rotate(-1.2deg);
  z-index: 42;
}
.map-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #554f68;
}
.map-city-title {
  font-family: var(--sfx);
  font-size: 46px;
  line-height: 0.94;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 2px 0 4px;
}
.map-sub {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  color: #464059;
  line-height: 1.45;
}
.map-sub .red-star { color: var(--red); }
.map-live-bar {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
}
.live-stamp {
  background: var(--orange);
  color: var(--bone);
  border: 2px solid var(--ink);
  padding: 1px 6px;
  font-family: var(--sfx);
  font-size: 14px;
  letter-spacing: 0.06em;
}
.map-search-row {
  margin-top: 9px;
  display: flex;
  border: 2.5px solid var(--ink);
  background: var(--bone);
}
#map-search {
  flex: 1;
  border: none;
  outline: none;
  padding: 7px 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  background: transparent;
  color: var(--ink);
}
.map-search-key {
  border-left: 2px solid var(--ink);
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  background: var(--paper);
}
#map-search-results {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 100%;
  margin-top: 2px;
  background: var(--bone);
  border: var(--border-sm);
  box-shadow: var(--shadow-sm);
  display: none;
  max-height: 180px;
  overflow-y: auto;
  z-index: 50;
}
#map-search-results.open { display: block; }
.msr-item {
  padding: 7px 10px;
  border-bottom: 1.5px solid #dfd8c6;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}
.msr-item:hover { background: var(--yellow); }

.map-top-right {
  position: absolute;
  top: 16px;
  right: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 42;
}
.map-close-btn {
  padding: 7px 14px;
  text-align: center;
  line-height: 1.05;
}
.map-close-btn small {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  margin-top: 2px;
}

.map-zoom-col {
  position: absolute;
  top: 158px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 42;
}
.map-tool-btn {
  width: 40px;
  height: 40px;
  background: var(--bone);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-tool-btn:hover { background: var(--yellow); }
.map-tool-btn.orange { background: var(--orange); color: var(--bone); }
.map-tool-btn.small-txt { font-size: 11px; }

/* Taped Right Drop Zone Card (Taped Right Drop Zone Card) */
.map-drop-card {
  position: absolute;
  right: 74px;
  top: 52%;
  transform: translateY(-50%) rotate(0.7deg);
  width: 288px;
  padding: 15px 15px 14px;
  z-index: 42;
}
.mdc-meta {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: #5b5570;
  letter-spacing: 0.08em;
}
.mdc-title {
  font-family: var(--sfx);
  font-size: 31px;
  line-height: 0.96;
  color: var(--violet-deep);
  text-shadow: 2px 2px 0 var(--yellow);
  margin: 4px 0 3px;
}
.mdc-street {
  font-size: 12px;
  font-weight: 700;
  color: #4f4b63;
  margin-bottom: 10px;
}
.mdc-intel {
  background: var(--yellow);
  border-left: 4px solid var(--orange);
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
}
.mdc-intel-lbl {
  font-family: var(--sfx);
  font-size: 14px;
  color: var(--red);
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}
.mdc-transport-pick {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}
.mtp-btn {
  flex: 1;
  padding: 5px 4px;
  border: 2px solid var(--ink);
  background: var(--paper);
  font-family: var(--sfx);
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-align: center;
}
.mtp-btn.active {
  background: var(--ink);
  color: var(--yellow);
}
.mdc-drop-btn {
  width: 100%;
  padding: 10px 12px;
  background: var(--red);
  color: var(--bone);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: center;
}
.mdc-drop-btn:hover { background: #f2524a; }
.mdc-drop-main {
  font-family: var(--sfx);
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0.06em;
}
.mdc-drop-sub {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.map-bot-left {
  position: absolute;
  bottom: 14px;
  left: 18px;
  z-index: 42;
}
.map-key-panel {
  display: none;
  margin-bottom: 8px;
  width: 280px;
  padding: 10px 12px;
}
.map-key-panel.open { display: block; }
.mk-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  margin: 4px 0;
}
.mk-swatch {
  width: 14px;
  height: 14px;
  border: 2px solid var(--ink);
  flex-shrink: 0;
}

.map-bot-right {
  position: absolute;
  bottom: 14px;
  right: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  z-index: 42;
}
.map-scale-bar {
  background: var(--bone);
  border: var(--border-sm);
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}
.map-controls-bar {
  background: var(--bone);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ============================================================
   6. MODALS: OPERATIONS, COMIC BRIEFING, PAUSE, DOSSIER, SETTINGS, PHOTO
   ============================================================ */
.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 45;
  background: rgba(15, 16, 26, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: auto;
}
.modal-backdrop.active { display: flex; }

.comic-sheet {
  width: 920px;
  max-width: 96%;
  max-height: 90%;
  overflow-y: auto;
  padding: 20px 24px;
  position: relative;
}
.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 16px;
}
.sheet-title {
  font-family: var(--sfx);
  font-size: 36px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: 0.05em;
}
.sheet-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.1em;
}

.two-col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}
@media (max-width: 780px) {
  .two-col { grid-template-columns: 1fr; }
}

/* Operations Issue Grid */
.ops-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.op-issue-card {
  padding: 14px 16px;
  cursor: pointer;
  position: relative;
  transition: transform 0.12s, box-shadow 0.12s;
}
.op-issue-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--ink);
  background-color: var(--yellow);
}
.op-issue-num {
  display: inline-block;
  background: var(--orange);
  color: var(--bone);
  border: 2px solid var(--ink);
  font-family: var(--sfx);
  font-size: 15px;
  padding: 2px 8px;
  margin-bottom: 6px;
}
.op-issue-title {
  font-family: var(--sfx);
  font-size: 26px;
  line-height: 1.05;
  margin-bottom: 4px;
}
.op-issue-meta {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--violet-deep);
  margin-bottom: 7px;
}
.op-issue-desc { font-size: 13px; font-weight: 700; line-height: 1.35; }
.op-cleared-stamp {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 2.5px solid var(--green);
  color: var(--green);
  font-family: var(--sfx);
  font-size: 16px;
  padding: 1px 7px;
  transform: rotate(7deg);
}

/* Comic Strip Briefing Panels */
.comic-panels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.comic-panel-box {
  background: var(--yellow);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
  min-height: 105px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cp-speaker {
  display: inline-block;
  align-self: flex-start;
  background: var(--ink);
  color: var(--yellow);
  font-family: var(--sfx);
  font-size: 15px;
  padding: 2px 8px;
  margin-bottom: 6px;
}
.cp-speech {
  background: var(--bone);
  border: 2px solid var(--ink);
  padding: 8px 10px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
}

/* Pause Menu Markers Legend */
.markers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.marker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  padding: 5px 7px;
}
.marker-dot {
  width: 14px;
  height: 14px;
  border: 2px solid var(--ink);
  flex-shrink: 0;
}

.pause-btn-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pause-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 13px;
  background: var(--bone);
  border: var(--border-sm);
  box-shadow: var(--shadow-sm);
  font-family: var(--sfx);
  font-size: 21px;
  letter-spacing: 0.05em;
  cursor: pointer;
  text-align: left;
}
.pause-btn:hover { background: var(--orange); color: var(--bone); transform: translateX(4px); }
.pause-btn .pn {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  background: var(--yellow);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 2px 6px;
}

/* Dossier Tabs */
.tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.tab-btn {
  font-family: var(--sfx);
  font-size: 18px;
  letter-spacing: 0.05em;
  padding: 6px 14px;
  background: var(--paper);
  border: var(--border-sm);
  cursor: pointer;
}
.tab-btn.active {
  background: var(--orange);
  color: var(--bone);
  box-shadow: 3px 3px 0 var(--ink);
}
.dossier-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.dossier-item {
  padding: 10px 12px;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.dossier-item h4 {
  margin: 0 0 4px;
  font-family: var(--sfx);
  font-size: 19px;
  letter-spacing: 0.04em;
}
.dossier-item p { margin: 0; font-size: 12.5px; font-weight: 700; line-height: 1.35; }

#settings-modal .comic-sheet {
  width: 980px;
  padding: 14px 20px;
}
#settings-modal .sheet-header {
  padding-bottom: 7px;
  margin-bottom: 10px;
}
/* Settings Rows */
.setting-group {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 8px 11px;
  margin-bottom: 8px;
}
.setting-group h4 {
  margin: 0 0 5px;
  font-family: var(--sfx);
  font-size: 18px;
  color: var(--violet-deep);
}
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}
.setting-row select, .setting-row input[type="range"] {
  font-family: var(--mono);
  font-weight: 700;
  border: 2px solid var(--ink);
  background: var(--bone);
  padding: 3px 7px;
  max-width: 240px;
}
.gpu-status-card {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--bone);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.4;
}
.gpu-status-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
}
.gpu-badge {
  display: inline-block;
  padding: 1px 6px;
  border: 1.5px solid var(--ink);
  background: var(--violet);
  color: var(--bone);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.gpu-badge.discrete { background: #3b8d57; }
.gpu-badge.integrated { background: var(--amber); color: var(--ink); }
.gpu-badge.software { background: var(--red); }
.gpu-active-name {
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gpu-caps-line {
  color: #4d4862;
  font-weight: 700;
  font-size: 10px;
}
.gpu-dual-line {
  margin-top: 4px;
  font-weight: 700;
  font-size: 10px;
  color: var(--teal);
}
.gpu-dual-line.warn { color: #b54708; }
.gpu-dual-line.good { color: #2b7a48; }
.gpu-os-tip {
  display: none;
  margin-top: 5px;
  padding: 5px 7px;
  background: var(--yellow);
  border-left: 3px solid var(--orange);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}
.gpu-os-tip.active { display: block; }
.gpu-reload-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding: 7px 9px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}
.gpu-reload-bar.active { display: flex; }
.controls-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
}
.ctrl-key {
  background: var(--ink);
  color: var(--yellow);
  padding: 1px 7px;
  text-align: center;
}
.attribution-note {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 2px dashed rgba(28, 26, 46, 0.3);
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.4;
  color: #4d4862;
}

/* ============================================================
   7. PHOTO MODE TRAY (P)
   ============================================================ */
#photo-ui {
  position: absolute;
  inset: 0;
  z-index: 38;
  display: none;
  pointer-events: none;
}
#photo-ui.active { display: block; }
#photo-frame-overlay {
  position: absolute;
  inset: 18px;
  pointer-events: none;
  display: none;
}
#photo-frame-overlay.comic-cover {
  display: block;
  border: 6px solid var(--ink);
}
.pfo-masthead {
  position: absolute;
  top: 12px;
  left: 16px;
  font-family: var(--sfx);
  font-size: 54px;
  color: var(--orange);
  -webkit-text-stroke: 2.5px var(--ink);
  text-shadow: 4px 4px 0 var(--ink);
}
.pfo-caption {
  position: absolute;
  bottom: 128px;
  right: 18px;
  background: var(--yellow);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 6px 14px;
  font-family: var(--sfx);
  font-size: 22px;
  transform: rotate(-1.5deg);
}

.photo-tray {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  max-width: 95%;
  padding: 12px 16px;
  pointer-events: auto;
}
.photo-tray-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.photo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

/* Toast Notification */
#toast {
  position: absolute;
  top: 134px;
  right: 20px;
  z-index: 55;
  background: var(--yellow);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 9px 15px;
  font-family: var(--sfx);
  font-size: 20px;
  letter-spacing: 0.05em;
  transform: translateX(130%) rotate(-1.2deg);
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
}
#toast.show { transform: translateX(0) rotate(-1.2deg); }

/* ============================================================
   8. PEDESTRIAN COMIC SPEECH BUBBLES, TRANSIT PA & HIJACK MINIGAME
   ============================================================ */
#bubble-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  overflow: hidden;
}
.npc-bubble {
  position: absolute;
  transform: translate(-50%, -100%);
  background: var(--bone);
  border: 2.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 4px 10px;
  font-family: var(--sfx);
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--ink);
  white-space: nowrap;
}
.npc-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--ink);
}
.npc-bubble.panic { background: var(--yellow); color: var(--red); }
.npc-bubble.admire { background: var(--cyan); color: var(--ink); }

/* Burlington Transit PA & Hijack Action Strip (Transit PA) */
#transit-pa {
  position: absolute;
  top: 82px;
  left: 50%;
  transform: translateX(-50%) rotate(-0.8deg);
  display: none;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  z-index: 18;
  pointer-events: auto;
  max-width: 620px;
}
#transit-pa.active { display: flex; }
.tpa-badge {
  background: #1f6da8;
  color: var(--bone);
  border: 2px solid var(--ink);
  font-family: var(--sfx);
  font-size: 15px;
  padding: 3px 8px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.tpa-msg {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
}

/* Vehicle Hijacking Tug-of-War Minigame (hijack-breach) */
#hijack-overlay {
  position: absolute;
  inset: 0;
  z-index: 36;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(28, 26, 46, 0.45);
  pointer-events: auto;
}
#hijack-overlay.active { display: flex; }
.hj-card {
  width: 440px;
  max-width: 92%;
  padding: 16px 18px;
  transform: rotate(-1.3deg);
  position: relative;
}
.hj-title {
  font-family: var(--sfx);
  font-size: 32px;
  line-height: 1;
  color: var(--red);
  letter-spacing: 0.05em;
  margin: 6px 0 4px;
}
.hj-sub {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
}
.hj-bar-bg {
  height: 26px;
  background: #ddd5c2;
  border: 3px solid var(--ink);
  overflow: hidden;
  margin-bottom: 10px;
}
.hj-bar-fill {
  height: 100%;
  width: 35%;
  background: repeating-linear-gradient(-45deg, var(--orange) 0 12px, var(--amber) 12px 24px);
  border-right: 3px solid var(--ink);
  transition: width 0.06s linear;
}
.hj-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}
.hj-stamp {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.hj-stamp.show { display: flex; }
.hj-stamp span {
  font-family: var(--sfx);
  font-size: 52px;
  color: var(--red);
  background: var(--yellow);
  border: 5px solid var(--red);
  padding: 6px 20px;
  transform: rotate(-11deg);
  box-shadow: 6px 6px 0 var(--ink);
}
