/* ==========================================================================
   NIGHT SHIFT AT PUMPKIN PETE'S — SURVIVAL HORROR TERMINAL STYLESHEET
   3-Layer Token Spine (Primitive -> Semantic -> Component)
   ========================================================================== */

:root {
  /* Layer 1: Primitives */
  --void-950: #050507;
  --void-900: #0b0c10;
  --void-850: #12141b;
  --void-800: #1a1d27;
  --void-700: #282c3a;
  --steel-500: #6b7280;
  --steel-300: #b0b7c3;
  --bone-100: #ece8df;

  --amber-500: #f27d16;
  --amber-400: #ff9838;
  --amber-900: rgba(242, 125, 22, 0.16);

  --phosphor-500: #35d46a;
  --crimson-500: #e53935;
  --crimson-900: rgba(229, 57, 53, 0.22);
  --violet-500: #a855f7;

  /* Layer 2: Semantic Tokens */
  --bg-canvas: var(--void-950);
  --bg-surface: rgba(14, 16, 22, 0.88);
  --bg-elevated: rgba(24, 27, 37, 0.95);
  --text-primary: var(--bone-100);
  --text-secondary: var(--steel-300);
  --text-muted: var(--steel-500);
  --accent-primary: var(--amber-500);
  --accent-hover: var(--amber-400);
  --border-subtle: rgba(255, 255, 255, 0.11);
  --border-accent: rgba(242, 125, 22, 0.45);

  /* Typography */
  --font-mono: "Consolas", "SFMono-Regular", "Liberation Mono", "Courier New", monospace;
  --font-display: "Georgia", "Palatino Linotype", "Book Antiqua", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Radius Scale */
  --r-xs: 3px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow: hidden;
}

#app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #0e0d12 0%, #030305 100%);
}

/* Global Analog CRT Overlays (No rapid strobing) */
.crt-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.24) 3px,
    rgba(0, 0, 0, 0.24) 4px
  );
  opacity: 0.7;
}

.crt-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 91;
  background: radial-gradient(circle at center, transparent 58%, rgba(0, 0, 0, 0.78) 100%);
}

/* Screen Management */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
}

.screen.active {
  display: flex;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   1. TITLE SCREEN
   ========================================================================== */
#title-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.title-ui {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1320px;
  height: 100%;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(5, 5, 8, 0.92) 0%, rgba(5, 5, 8, 0.68) 48%, rgba(5, 5, 8, 0.15) 100%);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.game-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 66px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  text-shadow: 0 6px 28px rgba(0, 0, 0, 0.9);
}

.game-title span {
  color: var(--accent-primary);
  font-size: 0.78em;
  display: block;
  margin-top: 6px;
}

.title-tagline {
  margin-top: 16px;
  max-width: 460px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.menu-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 410px;
}

.menu-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  background: rgba(18, 20, 28, 0.86);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 15px;
  cursor: pointer;
  transition: transform 140ms ease-out, background-color 140ms ease-out, border-color 140ms ease-out;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.menu-btn:hover,
.menu-btn:focus-visible {
  background: rgba(34, 38, 52, 0.95);
  border-color: var(--accent-primary);
  transform: translateX(4px);
  outline: none;
}

.menu-btn.primary {
  background: linear-gradient(180deg, rgba(242, 125, 22, 0.24) 0%, rgba(242, 125, 22, 0.11) 100%);
  border-color: var(--border-accent);
}

.menu-btn.primary:hover {
  background: linear-gradient(180deg, rgba(242, 125, 22, 0.36) 0%, rgba(242, 125, 22, 0.18) 100%);
}

.btn-indicator {
  color: var(--accent-primary);
  font-size: 14px;
}

.btn-label {
  flex: 1;
  text-align: left;
  font-weight: 600;
}

.btn-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.title-footer {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

/* Modals on Title Screen */
.modal-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(820px, 92vw);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--r-lg);
  padding: 26px 30px;
  z-index: 40;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.modal-header h2 {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--accent-primary);
}

.close-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--r-xs);
  cursor: pointer;
  font-size: 15px;
}

.close-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.modal-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 18px;
}

.custom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.custom-card {
  background: rgba(10, 11, 16, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 16px;
  text-align: center;
}

.custom-portrait {
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
}

.custom-card h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.role-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.level-stepper {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--void-900);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle);
}

.step-btn {
  width: 28px;
  height: 28px;
  background: var(--void-800);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--r-xs);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 16px;
}

.step-btn:hover {
  border-color: var(--accent-primary);
}

.lvl-val {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  min-width: 28px;
  font-variant-numeric: tabular-nums;
  color: var(--accent-primary);
}

.manual-mascots {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.mascot-dossier {
  display: flex;
  gap: 16px;
  align-items: center;
  background: rgba(9, 10, 14, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 12px 16px;
}

.mascot-dossier img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
}

.mascot-dossier h3 {
  font-size: 15px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-route {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 7px;
  background: var(--amber-900);
  color: var(--accent-primary);
  border-radius: var(--r-xs);
}

.mascot-dossier p {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.manual-controls {
  background: rgba(9, 10, 14, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 14px 18px;
}

.manual-controls h3 {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.manual-controls ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ==========================================================================
   2. NEWSPAPER / SHIFT INTRO SCREEN
   ========================================================================== */
#intro-screen {
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #141210 0%, #050507 100%);
}

.newspaper-card {
  width: min(680px, 90vw);
  background: #ded6c6;
  color: #181614;
  padding: 32px 38px;
  border-radius: var(--r-xs);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.92), inset 0 0 42px rgba(92, 74, 46, 0.35);
  border: 1px solid #9c917d;
}

.paper-masthead {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  border-bottom: 2px solid #2b2620;
  padding-bottom: 8px;
  margin-bottom: 14px;
  color: #3f382f;
}

.paper-headline {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: #12100e;
}

.paper-columns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.5;
  color: #26221d;
  border-bottom: 1px solid #8a7f6c;
  padding-bottom: 18px;
  margin-bottom: 20px;
}

.paper-disclaimer {
  font-size: 12.5px;
  color: #4f473d;
}

.shift-clock-announce {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shift-title {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: #181614;
  font-variant-numeric: tabular-nums;
}

.hud-action-btn {
  padding: 10px 18px;
  background: #181614;
  color: #f3ede0;
  border: 1px solid #181614;
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.hud-action-btn:hover {
  background: var(--amber-500);
  color: #0b0c10;
  border-color: var(--amber-500);
}

/* ==========================================================================
   3. MAIN GAMEPLAY SCREEN & OFFICE HUD
   ========================================================================== */
#game-screen {
  position: relative;
  overflow: hidden;
}

#office-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Top-Left Cassette Recorder */
.hud-top-left {
  position: absolute;
  top: 20px;
  left: 24px;
  z-index: 30;
}

.cassette-player {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
}

.cassette-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.cassette-wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 10px;
}

.cassette-wave span {
  width: 3px;
  height: 8px;
  background: var(--phosphor-500);
  animation: wavePulse 0.7s infinite ease-in-out alternate;
}

.cassette-wave span:nth-child(2) { animation-delay: 0.15s; }
.cassette-wave span:nth-child(3) { animation-delay: 0.3s; }
.cassette-wave span:nth-child(4) { animation-delay: 0.45s; }

@keyframes wavePulse {
  0% { height: 3px; opacity: 0.4; }
  100% { height: 10px; opacity: 1; }
}

.mute-call-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 9px;
  border-radius: var(--r-xs);
  cursor: pointer;
}

.mute-call-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Top-Right Clock */
.hud-top-right {
  position: absolute;
  top: 20px;
  right: 26px;
  z-index: 35;
  text-align: right;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: 10px 16px;
  min-width: 170px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
}

.clock-readout {
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.night-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: 6px;
}

.hour-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.hour-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--accent-primary);
  transition: width 250ms linear;
}

/* Left & Right Door & Hall Light Quick Panels */
.door-panel {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(12, 14, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-md);
  padding: 12px 10px;
  width: 112px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8);
}

.left-panel {
  left: 16px;
}

.right-panel {
  right: 16px;
}

.panel-header {
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: center;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 5px;
}

.ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #1b1f2a;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 80ms ease-out, background-color 120ms ease-out, border-color 120ms ease-out;
}

.ctrl-btn:active {
  transform: scale(0.97);
}

.ctrl-btn .led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4b5563;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
}

.ctrl-btn kbd {
  font-size: 10px;
  padding: 1px 4px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 3px;
  color: var(--text-secondary);
}

/* Door States: Open = Red warning LED, Closed = Solid Green/Red Active Lock */
.door-btn .led {
  background: var(--crimson-500);
  box-shadow: 0 0 6px var(--crimson-500);
}

.door-btn.active {
  background: rgba(53, 212, 106, 0.22);
  border-color: var(--phosphor-500);
}

.door-btn.active .led {
  background: var(--phosphor-500);
  box-shadow: 0 0 10px var(--phosphor-500);
}

.door-btn.jammed {
  background: rgba(229, 57, 53, 0.28);
  border-color: var(--crimson-500);
  cursor: not-allowed;
}

/* Light States */
.light-btn.active {
  background: rgba(242, 125, 22, 0.28);
  border-color: var(--amber-400);
}

.light-btn.active .led {
  background: var(--amber-400);
  box-shadow: 0 0 10px var(--amber-400);
}

.panel-threat-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: center;
  color: var(--text-muted);
  padding-top: 2px;
}

.panel-threat-hint.alert {
  color: var(--amber-400);
  font-weight: 700;
}

/* Subtitle Bar */
.subtitle-bar {
  position: absolute;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 32;
  max-width: min(760px, 86vw);
  background: rgba(8, 9, 13, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.45;
  color: var(--bone-100);
  text-align: center;
  pointer-events: none;
}

/* Bottom HUD Bar */
.hud-bottom {
  position: absolute;
  bottom: 16px;
  left: 24px;
  right: 24px;
  z-index: 35;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  pointer-events: none;
}

.power-cluster {
  pointer-events: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: 10px 16px;
  min-width: 195px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
}

.power-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.power-lbl, .usage-lbl {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.power-val {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--phosphor-500);
}

.power-val.warn { color: var(--amber-400); }
.power-val.danger { color: var(--crimson-500); }

.usage-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.usage-bars {
  display: flex;
  gap: 4px;
}

.u-bar {
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 2px;
}

.u-bar.active:nth-child(1),
.u-bar.active:nth-child(2) {
  background: var(--phosphor-500);
}

.u-bar.active:nth-child(3) {
  background: var(--amber-400);
}

.u-bar.active:nth-child(4),
.u-bar.active:nth-child(5) {
  background: var(--crimson-500);
}

.monitor-toggle-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: min(460px, 48vw);
  padding: 12px 24px;
  background: rgba(22, 26, 36, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.8);
  transition: background-color 120ms ease-out, border-color 120ms ease-out, transform 120ms ease-out;
}

.monitor-toggle-bar:hover {
  background: rgba(242, 125, 22, 0.25);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.chevrons {
  color: var(--accent-primary);
  font-size: 12px;
}

.office-pan-hint {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================================================
   4. CCTV CAMERA TABLET OVERLAY
   ========================================================================== */
.camera-tablet {
  position: absolute;
  inset: 0;
  z-index: 28;
  background: #050608;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: tabletFlipUp 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tabletFlipUp {
  from {
    opacity: 0;
    transform: translateY(36px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cctv-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border: 12px solid #161820;
}

#cctv-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#game-screen.jumpscare-active .hud-top-left,
#game-screen.jumpscare-active .hud-top-right,
#game-screen.jumpscare-active .vent-control-bar,
#game-screen.jumpscare-active .door-panel,
#game-screen.jumpscare-active .hud-bottom,
#game-screen.jumpscare-active .subtitle-bar {
  display: none !important;
}

.cctv-header {
  position: absolute;
  top: 20px;
  left: 288px;
  z-index: 32;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(8, 10, 14, 0.86);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: 9px 16px;
}

.cctv-rec {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--crimson-500);
  box-shadow: 0 0 8px var(--crimson-500);
  animation: recBlink 1.2s infinite ease-in-out;
}

@keyframes recBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.cctv-motion-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--phosphor-500);
}

.cctv-motion-tag.occupied {
  color: var(--amber-400);
  font-weight: 700;
}

/* CAM 03 Carillon Music Box & CAM 05 Crow's Roost Panel */
.cam03-box-panel {
  position: absolute;
  bottom: 132px;
  left: 26px;
  z-index: 33;
  width: 310px;
  background: rgba(12, 13, 19, 0.92);
  border: 1px solid rgba(168, 85, 247, 0.55);
  border-radius: var(--r-md);
  padding: 14px 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85);
}

.box-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #c084fc;
  margin-bottom: 4px;
}

.box-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.box-meter-wrap {
  position: relative;
  width: 100%;
  height: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-xs);
  overflow: hidden;
  margin-bottom: 10px;
}

.box-meter-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #9333ea 0%, #c084fc 100%);
  transition: width 100ms linear;
}

.box-meter-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.wind-box-btn {
  width: 100%;
  padding: 11px 14px;
  background: rgba(168, 85, 247, 0.24);
  border: 1px solid #c084fc;
  border-radius: var(--r-sm);
  color: #f3e8ff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.wind-box-btn:hover,
.wind-box-btn.winding {
  background: rgba(168, 85, 247, 0.48);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.45);
}

/* Interactive Floorplan Map (Bottom Right of CCTV) */
.cctv-map-container {
  position: absolute;
  bottom: 84px;
  right: 24px;
  z-index: 33;
  width: 336px;
  background: rgba(8, 10, 15, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--r-md);
  padding: 10px 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.85);
}

.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.box-alert-pill {
  font-variant-numeric: tabular-nums;
  color: #c084fc;
  font-weight: 700;
}

.box-alert-pill.warn { color: var(--amber-400); }
.box-alert-pill.danger { color: var(--crimson-500); }

.map-blueprint {
  position: relative;
  width: 312px;
  height: 224px;
}

.map-lines {
  width: 100%;
  height: 100%;
}

.map-room-rect {
  fill: rgba(255, 255, 255, 0.03);
  stroke: rgba(255, 255, 255, 0.24);
  stroke-width: 1.2;
}

.map-office-rect {
  fill: rgba(53, 212, 106, 0.08);
  stroke: rgba(53, 212, 106, 0.5);
  stroke-width: 1.5;
}

.map-route-line {
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}

.map-route-line.danger {
  stroke: rgba(242, 125, 22, 0.55);
}

.cam-node {
  position: absolute;
  width: 78px;
  padding: 4px 6px;
  background: rgba(22, 26, 36, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--r-xs);
  color: var(--text-primary);
  font-family: var(--font-mono);
  text-align: left;
  cursor: pointer;
  transition: background-color 100ms ease-out, border-color 100ms ease-out;
}

.cam-node:hover {
  border-color: var(--amber-400);
}

.cam-node.active {
  background: rgba(53, 212, 106, 0.24);
  border-color: var(--phosphor-500);
  box-shadow: 0 0 10px rgba(53, 212, 106, 0.35);
}

.cam-id {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--phosphor-500);
}

.cam-node:not(.active) .cam-id {
  color: var(--text-primary);
}

.cam-name {
  display: block;
  font-size: 9.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cam-warn-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
}

.cam-warn-dot.warn {
  background: var(--amber-400);
  box-shadow: 0 0 6px var(--amber-400);
}

.cam-warn-dot.danger {
  background: var(--crimson-500);
  box-shadow: 0 0 8px var(--crimson-500);
}

.office-marker {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--phosphor-500);
  pointer-events: none;
}

.you-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--phosphor-500);
}

/* ==========================================================================
   5. GAME OVER & 6:00 AM WIN SCREENS
   ========================================================================== */
#gameover-screen,
#win-screen {
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(16, 14, 18, 0.94) 0%, #040406 100%);
}

#static-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.22;
  pointer-events: none;
}

.end-card {
  position: relative;
  z-index: 20;
  width: min(580px, 90vw);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 36px 40px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.92);
}

.gameover-card {
  border-color: rgba(229, 57, 53, 0.5);
}

.win-card {
  border-color: rgba(242, 125, 22, 0.55);
}

.end-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.end-title {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.end-title.danger {
  color: var(--crimson-500);
}

.end-subtitle {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.survival-tip-box {
  background: rgba(10, 11, 16, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 24px;
}

.tip-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--amber-900);
  color: var(--accent-primary);
  border-radius: var(--r-xs);
  margin-bottom: 6px;
}

.survival-tip-box p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.clock-flip-banner {
  text-align: center;
  margin-bottom: 24px;
}

.six-am-digits {
  display: block;
  font-family: var(--font-mono);
  font-size: 64px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--amber-400);
  text-shadow: 0 0 28px rgba(242, 125, 22, 0.5);
}

.shift-survived-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--phosphor-500);
}

.paycheck-voucher {
  background: #e6decb;
  color: #1c1915;
  border: 1px solid #9e9178;
  border-radius: var(--r-sm);
  padding: 18px 20px;
  margin-bottom: 24px;
  font-family: var(--font-mono);
}

.paycheck-top {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #4f4639;
  border-bottom: 1px dashed #8c7f67;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.paycheck-pay-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  margin-bottom: 10px;
}

.paycheck-amount {
  font-size: 22px;
  font-weight: 700;
  color: #14532d;
}

.paycheck-memo {
  font-size: 11.5px;
  color: #3f382e;
}

.end-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


/* ==========================================================================
   6. PHASE 3 EXPANSION STYLES (5-Night Selector, Extras Vault, Thermal & CCTV Tools)
   ========================================================================== */
.eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 560px;
  margin-bottom: 10px;
}

.eyebrow-row .eyebrow {
  margin-bottom: 0;
}

.completion-stars {
  display: flex;
  gap: 6px;
}

.star-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-muted);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.star-badge.unlocked {
  background: rgba(242, 125, 22, 0.22);
  border-color: var(--amber-400);
  color: #ffd166;
  box-shadow: 0 0 10px rgba(242, 125, 22, 0.35);
}

.night-selector-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(12, 14, 20, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: 7px 12px;
  width: fit-content;
}

.night-sel-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-right: 4px;
}

.night-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: all 120ms ease-out;
}

.night-pill:hover {
  border-color: var(--amber-400);
  color: var(--text-primary);
}

.night-pill.active {
  background: var(--amber-500);
  border-color: var(--amber-400);
  color: #090a0e;
}

.custom-grid.four-cols {
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.custom-presets-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px 12px;
  background: rgba(9, 10, 14, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
}

.preset-lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-right: 4px;
}

.preset-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: var(--r-xs);
  cursor: pointer;
}

.preset-pill:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.preset-pill.danger {
  border-color: rgba(229, 57, 53, 0.55);
  color: #fca5a5;
}

.preset-pill.danger:hover {
  background: rgba(229, 57, 53, 0.25);
  border-color: var(--crimson-500);
}

/* Extras & Blueprints Vault Modal */
.extras-modal {
  width: min(940px, 94vw);
}

.extras-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.extras-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--r-xs);
  cursor: pointer;
}

.extras-tab.active {
  background: rgba(242, 125, 22, 0.22);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.blueprint-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.bp-char-btn {
  flex: 1;
  background: rgba(10, 12, 18, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 10px;
  border-radius: var(--r-xs);
  cursor: pointer;
}

.bp-char-btn.active {
  background: rgba(59, 130, 246, 0.22);
  border-color: #60a5fa;
  color: #eff6ff;
  font-weight: 700;
}

.blueprint-viewer {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
  align-items: center;
  background: rgba(8, 10, 16, 0.85);
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: var(--r-md);
  padding: 16px;
}

.blueprint-img-wrap img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid rgba(96, 165, 250, 0.4);
}

.blueprint-meta h3 {
  font-family: var(--font-mono);
  font-size: 16px;
  color: #93c5fd;
  margin-bottom: 6px;
}

.bp-specs {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber-400);
  margin-bottom: 10px;
}

.bp-lore {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.bp-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hud-action-btn.danger {
  background: rgba(229, 57, 53, 0.22);
  border-color: var(--crimson-500);
  color: #fecaca;
}

.hud-action-btn.danger:hover {
  background: var(--crimson-500);
  color: #ffffff;
}

.tape-archive-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tape-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(9, 10, 15, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: 10px 14px;
}

.tape-row h4 {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber-400);
  margin-bottom: 3px;
}

.tape-row p {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.lore-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  align-items: center;
  background: rgba(9, 10, 15, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 16px;
}

.lore-clipping-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle);
}

.lore-text h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber-400);
  margin-bottom: 4px;
}

.lore-text h4 {
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 10px;
}

.lore-text p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

/* Power + Thermal Desk Fan Cluster */
.power-thermal-group {
  display: flex;
  align-items: stretch;
  gap: 10px;
  pointer-events: auto;
}

.thermal-cluster {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  min-width: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
}

.temp-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.temp-lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.temp-val {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #60a5fa;
}

.temp-val.warn { color: var(--amber-400); }
.temp-val.danger { color: var(--crimson-500); }

.fan-toggle-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--r-xs);
  cursor: pointer;
}

.fan-toggle-btn.active {
  background: rgba(53, 212, 106, 0.18);
  border-color: var(--phosphor-500);
  color: var(--phosphor-500);
}

/* Overheat Vignette Overlay */
.overheat-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 22;
  background: radial-gradient(circle at center, rgba(229, 57, 53, 0.08) 30%, rgba(220, 38, 38, 0.46) 100%);
  transition: opacity 300ms ease;
}

/* CCTV Tactical Utility Bar (Audio Decoy & Feed Reboot) */
.cctv-utility-bar {
  position: absolute;
  top: 20px;
  right: 215px;
  z-index: 33;
  display: flex;
  gap: 10px;
}

.cctv-tool-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: rgba(10, 12, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 120ms ease-out;
}

.cctv-tool-btn:hover:not(:disabled) {
  border-color: var(--amber-400);
  background: rgba(242, 125, 22, 0.22);
}

.cctv-tool-btn.alert {
  border-color: var(--crimson-500);
  background: rgba(229, 57, 53, 0.28);
}

.cctv-tool-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tool-sub {
  font-size: 10px;
  font-weight: 400;
  color: var(--phosphor-500);
}

.cam05-roost-panel {
  border-color: rgba(245, 158, 11, 0.55);
}

.cam05-roost-panel .box-title {
  color: var(--amber-400);
}

.roost-bar {
  background: linear-gradient(90deg, #d97706 0%, #fbbf24 100%);
}

.map-alerts {
  display: flex;
  gap: 8px;
}

.roost-pill {
  color: var(--amber-400);
}

.win-artwork-wrap {
  width: 100%;
  height: 145px;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid rgba(242, 125, 22, 0.45);
  margin-bottom: 16px;
}

.win-artwork-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   6. V4.0 DIRECTOR'S CUT: 5-MASCOT GRID, CEILING VENT BAR, BPM & SALVAGE MODE
   ========================================================================== */
.menu-btn.salvage-highlight {
  border-color: rgba(56, 189, 248, 0.52);
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.16) 0%, rgba(16, 19, 26, 0.92) 100%);
}

.menu-btn.salvage-highlight:hover {
  border-color: #38bdf8;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.28) 0%, rgba(22, 26, 36, 0.96) 100%);
}

.custom-grid.five-cols {
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.custom-grid.five-cols .custom-portrait {
  height: 102px;
}

.custom-grid.five-cols h3 {
  font-size: 13px;
}

/* Top-Center Overhead Ceiling Vent Shutter & Strobe Flash Beacon Bar */
.vent-control-bar {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(9, 11, 16, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.78);
}

.vent-action-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--r-xs);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 120ms ease-out;
}

.vent-action-btn:hover:not(:disabled) {
  border-color: var(--amber-400);
  background: rgba(242, 125, 22, 0.18);
}

.vent-action-btn.active {
  background: rgba(229, 57, 53, 0.26);
  border-color: var(--crimson-500);
  color: #fecaca;
}

.vent-action-btn .led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--phosphor-500);
  box-shadow: 0 0 6px var(--phosphor-500);
}

.vent-action-btn.active .led {
  background: var(--crimson-500);
  box-shadow: 0 0 8px var(--crimson-500);
}

.vent-action-btn.flash-btn {
  border-color: rgba(56, 189, 248, 0.5);
  color: #bae6fd;
}

.vent-action-btn.flash-btn:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
}

.vent-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.vent-audio-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  padding-left: 4px;
}

.vent-audio-tag.danger {
  color: var(--crimson-500);
  font-weight: 700;
}

/* Heart Rate Pulse Cluster */
.pulse-cluster {
  min-width: 118px;
}

.pulse-cluster .temp-val {
  color: var(--phosphor-500);
}

.pulse-cluster .temp-val.warn {
  color: var(--amber-400);
}

.pulse-cluster .temp-val.danger {
  color: var(--crimson-500);
}

.pulse-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

/* Sub-Basement Workshop Salvage Screen */
#salvage-screen {
  background: #050608;
}

#salvage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.salvage-hud {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 26px;
  pointer-events: none;
}

.salvage-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8, 10, 15, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 12px 18px;
  pointer-events: auto;
}

.salvage-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-primary);
  letter-spacing: 0.03em;
}

.salvage-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.salvage-status-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--r-xs);
  background: rgba(53, 212, 106, 0.16);
  border: 1px solid var(--phosphor-500);
  color: var(--phosphor-500);
}

.salvage-status-pill.warn {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--amber-400);
  color: var(--amber-400);
}

.salvage-status-pill.danger {
  background: rgba(229, 57, 53, 0.28);
  border-color: var(--crimson-500);
  color: #fecaca;
}

.salvage-sidebar {
  width: 286px;
  background: rgba(8, 10, 15, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}

.salvage-box-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--amber-400);
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.salvage-unit-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 120ms ease;
}

.salvage-unit-btn small {
  font-size: 10px;
  font-weight: 400;
  color: #38bdf8;
}

.salvage-unit-btn.active {
  background: rgba(242, 125, 22, 0.22);
  border-color: var(--amber-500);
}

.salvage-unit-btn.completed small {
  color: var(--phosphor-500);
  font-weight: 700;
}

.salvage-rules-note {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.45);
  border-left: 3px solid var(--amber-500);
  padding: 8px 10px;
  border-radius: var(--r-xs);
}

.salvage-bottom-bar {
  background: rgba(8, 10, 15, 0.92);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
}

.salvage-steps-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.salvage-step.done {
  color: var(--phosphor-500);
  font-weight: 700;
}

.salvage-meter-wrap {
  height: 22px;
  margin-bottom: 0;
}

.salvage-meter-bar {
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 50%, #35d46a 100%);
}

.salvage-controls-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
}

.salvage-work-btn {
  background: rgba(14, 165, 233, 0.24);
  border-color: #38bdf8;
  color: #e0f2fe;
}

.salvage-work-btn:hover,
.salvage-work-btn.winding {
  background: rgba(14, 165, 233, 0.45);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.45);
}

.salvage-shock-btn {
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  display: flex;
  align-items: center;
}
