/* ==========================================================================
   TAMÁS HOJSZ (AGE-T) // SENIOR QA & TEST LEAD
   Cinematic Signal Observatory + Glitch Pixel Noir Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=Chakra+Petch:wght@600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700;800&family=Silkscreen:wght@400;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #03060c;
  --bg-2: #060e1a;
  --panel: rgba(7, 15, 28, 0.82);
  --panel-strong: rgba(8, 18, 34, 0.93);
  --line: rgba(102, 160, 224, 0.22);
  --line-soft: rgba(102, 160, 224, 0.11);
  --line-bright: rgba(94, 214, 255, 0.62);
  --text: #eaf3ff;
  --muted: #8ca5c5;
  --dim: #577190;
  --cyan: #57d8ff;
  --blue: #3f9bff;
  --purple: #9f84ff;
  --amber: #ffcf70;
  --hot: #ff477e;
  --green: #3df5a7;
  --font-ui: Inter, "Segoe UI", system-ui, sans-serif;
  --font-display: "Barlow Condensed", Impact, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, ui-monospace, monospace;
  --font-pixel: "JetBrains Mono", "Chakra Petch", Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
  min-width: 320px;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(ellipse at 50% -15%, rgba(28, 96, 176, 0.20), transparent 55%),
    radial-gradient(ellipse at 85% 40%, rgba(114, 62, 198, 0.09), transparent 44%),
    linear-gradient(180deg, #040914 0%, #03060c 52%, #050a14 100%);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }

/* ---- Fixed Multi-Layer Visual Engine Stack ---- */
.engine-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

#stripeCanvas {
  z-index: 0;
  opacity: 1;
}

#bayerCanvas {
  z-index: 1;
  image-rendering: pixelated;
  opacity: 0.36;
  mix-blend-mode: screen;
}

.scanline-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 1;
  background: repeating-linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.22) 2px,
    rgba(0, 0, 0, 0.22) 4px
  );
}

#sceneCanvas {
  z-index: 23;
  pointer-events: none;
}

#atmosCanvas {
  z-index: 24;
  pointer-events: none;
}

#bugsCanvas {
  z-index: 25;
  image-rendering: pixelated;
  pointer-events: none;
}

/* Subtle border glitch pulse while a digital bug is gnawing a floating box */
.being-nibbled {
  border-color: rgba(255, 71, 126, 0.62) !important;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36), 0 0 24px rgba(255, 71, 126, 0.16) !important;
}

#detectiveCanvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 26;
  image-rendering: pixelated;
  cursor: pointer;
  pointer-events: auto;
  will-change: transform;
  filter: drop-shadow(0 0 12px rgba(72, 190, 255, 0.12));
}

/* Off-screen single point light (no visible spotlight orb/handle on screen) */
.light-handle {
  display: none;
  pointer-events: none;
}

/* Detective Pixel Speech Bubble */
.detective-bubble {
  position: fixed;
  z-index: 29;
  max-width: 240px;
  padding: 8px 11px;
  background: rgba(5, 13, 25, 0.94);
  border: 1px solid rgba(94, 214, 255, 0.58);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(70, 190, 255, 0.18);
  color: #e2f5ff;
  font: 500 11px/1.45 var(--font-mono);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.detective-bubble.visible {
  opacity: 1;
  transform: translateY(0);
}
.detective-bubble::before {
  content: "DET.QA > ";
  color: var(--cyan);
  font-family: var(--font-pixel);
  font-size: 9px;
}

/* Storyboard v0.3 Dedicated 3-Beat Greeting Bubble ("Üdvözöllek!" -> "A nevem Tamás." -> "Kérlek, tarts velem!"):
   Light background, dark bold text, thin cyan outline, brief pixel glitch + springy pop-in! */
.hello-bubble {
  position: fixed;
  z-index: 32;
  padding: 10px 20px;
  border-radius: 15px;
  background: #f4faff;
  color: #071324;
  border: 1.5px solid #38d9ff;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.62), 0 0 20px rgba(56, 217, 255, 0.36);
  font: 700 18px/1 "Silkscreen", var(--font-pixel);
  letter-spacing: 0.08em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%) scale(0.55);
  transform-origin: center bottom;
  transition: opacity 0.42s ease, transform 0.42s ease;
}
.hello-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #f2f9ff;
  border-right: 1.5px solid #38d9ff;
  border-bottom: 1.5px solid #38d9ff;
}
.hello-bubble.show {
  opacity: 1;
  transform: translate(-50%, -100%) scale(1);
  animation: hello-pop-glitch 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.hello-bubble.fading {
  opacity: 0;
  transform: translate(-50%, calc(-100% - 8px)) scale(0.95);
  animation: none;
}

@keyframes hello-pop-glitch {
  0%   { opacity: 0.72; transform: translate(-50%, -88%) scale(0.72); text-shadow: -3px 0 #38d9ff, 3px 0 #ff477e; }
  22%  { opacity: 1; transform: translate(calc(-50% + 2px), -103%) scale(1.08); text-shadow: 2px 0 #38d9ff, -2px 0 #ff477e; }
  48%  { opacity: 1; transform: translate(calc(-50% - 2px), -99%) scale(0.97); text-shadow: -1.5px 0 #38d9ff, 1.5px 0 #ff477e; }
  74%  { opacity: 1; transform: translate(-50%, -101%) scale(1.02); text-shadow: none; }
  100% { opacity: 1; transform: translate(-50%, -100%) scale(1); text-shadow: none; }
}

/* ---- Sticky Signal Observatory HUD Header ---- */
.hud-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: linear-gradient(180deg, rgba(3, 7, 15, 0.90) 0%, rgba(3, 7, 15, 0.72) 100%);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.hud-inner {
  width: min(1440px, calc(100% - 36px));
  margin: 0 auto;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  border: 1px solid rgba(87, 216, 255, 0.5);
  background: linear-gradient(135deg, rgba(28, 108, 196, 0.28), rgba(6, 15, 29, 0.85));
  box-shadow: 0 0 22px rgba(60, 175, 255, 0.2);
  font: 700 12px var(--font-pixel);
  transform: skewX(-6deg);
}

.brand-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-eyebrow {
  font: 9px var(--font-mono);
  letter-spacing: 0.18em;
  color: var(--muted);
}

.brand-name {
  font: 800 22px/1 var(--font-display);
  letter-spacing: 0.08em;
  color: #f3f9ff;
}
.brand-name span {
  font: 500 11px var(--font-mono);
  color: var(--cyan);
  margin-left: 6px;
}

.hud-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.hud-nav a {
  font: 10px var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--muted);
  transition: color 0.18s;
}
.hud-nav a:hover { color: var(--cyan); }

.hud-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-chip {
  height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: rgba(9, 20, 38, 0.72);
  color: #b4d0ee;
  font: 500 10px var(--font-mono);
  letter-spacing: 0.11em;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s;
}
.hud-chip:hover {
  border-color: var(--line-bright);
  color: #fff;
  background: rgba(24, 58, 102, 0.65);
}
.hud-chip.active {
  border-color: var(--cyan);
  color: #dff8ff;
  background: rgba(24, 96, 152, 0.45);
  box-shadow: 0 0 18px rgba(87, 216, 255, 0.22);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}
.pulse-dot.hot {
  background: var(--hot);
  box-shadow: 0 0 10px var(--hot);
}

.scroll-progress-bar {
  height: 2px;
  width: 100%;
  background: rgba(84, 134, 188, 0.15);
}
.scroll-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3f9bff, #57d8ff, #ff477e);
  box-shadow: 0 0 12px rgba(87, 216, 255, 0.75);
}

/* ---- Floating Signal Observatory Event Monitor (Top Right under Header) ---- */
.event-monitor {
  position: fixed;
  top: 76px;
  right: 18px;
  z-index: 35;
  width: 248px;
  pointer-events: none;
}

.event-card {
  position: relative;
  overflow: hidden;
  padding: 10px 12px;
  border: 1px solid rgba(88, 168, 234, 0.28);
  background: linear-gradient(135deg, rgba(7, 18, 34, 0.90), rgba(4, 10, 20, 0.80));
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.36);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.event-card.pulse-alert {
  border-color: rgba(255, 71, 126, 0.85);
  box-shadow: 0 0 28px rgba(255, 71, 126, 0.24);
}
.event-card.pulse-ok {
  border-color: rgba(61, 245, 167, 0.78);
  box-shadow: 0 0 26px rgba(61, 245, 167, 0.2);
}

.event-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 8px var(--font-mono);
  letter-spacing: 0.16em;
  color: var(--muted);
}
.event-card-head b { color: var(--cyan); }
.event-card-title {
  margin-top: 6px;
  font: 700 15px/1.1 var(--font-display);
  letter-spacing: 0.08em;
  color: #eef6ff;
}
.event-card-meta {
  margin-top: 4px;
  font: 9px/1.35 var(--font-mono);
  color: #82a2c4;
}

.event-sweep {
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 55%;
  transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(87, 216, 255, 0.08), transparent);
  animation: sweep-scan 6s linear infinite;
}

.event-log {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.event-log-item {
  padding: 6px 8px;
  border-left: 2px solid var(--cyan);
  background: rgba(5, 13, 25, 0.84);
  font: 9px/1.3 var(--font-mono);
  color: #bcd6f2;
  animation: slide-in 0.35s ease both;
}
.event-log-item.is-bug { border-left-color: var(--hot); color: #ffc6d8; }
.event-log-item.is-ok { border-left-color: var(--green); color: #c4ffe6; }

/* ---- Main Content Shell & Scroll-Construction Spine ---- */
.page-shell {
  position: relative;
  z-index: 10;
  width: min(1140px, calc(100% - 320px));
  margin-left: max(54px, calc(50% - 690px));
  margin-right: auto;
  padding-top: 76px;
  padding-bottom: 90px;
}

/* Vertical Illuminated Signal Spine that "builds" downward as you scroll */
.signal-spine {
  position: fixed;
  top: 64px;
  bottom: 0;
  left: 24px;
  width: 2px;
  z-index: 12;
  background: rgba(84, 134, 188, 0.14);
  pointer-events: none;
}
.signal-spine-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, #57d8ff, #9f84ff, #ff477e);
  box-shadow: 0 0 12px rgba(87, 216, 255, 0.8);
}

/* ---- Scroll-Driven Progressive Construction ("Építkezés") ---- */
.build-block {
  opacity: 0;
  transform: translateY(22px) scale(0.99);
  filter: blur(1.5px);
  clip-path: inset(0 0 8% 0);
  transition:
    opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.44s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.34s ease,
    clip-path 0.40s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0ms);
}
.build-block.built {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  clip-path: none;
}

/* ---- ACT 00: HERO ---- */
.hero-section {
  min-height: calc(100vh - 76px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 790px) minmax(240px, 1fr);
  gap: 28px;
  align-items: center;
}

.hero-command-card {
  position: relative;
  padding: 24px 28px 22px;
  background: linear-gradient(168deg, rgba(8, 19, 38, 0.95) 0%, rgba(4, 9, 20, 0.96) 100%);
}

.hero-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px dashed rgba(87, 216, 255, 0.28);
}

.hero-agent-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 9.5px/1 var(--font-pixel);
  letter-spacing: 0.11em;
  color: var(--green);
}

.hero-loc-tag {
  padding: 3px 8px;
  background: rgba(12, 34, 62, 0.85);
  border: 1px solid rgba(255, 207, 112, 0.38);
  font: 700 9px/1 var(--font-mono);
  letter-spacing: 0.13em;
  color: var(--amber);
}

.hero-title-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 11px;
  border: 1px solid rgba(87, 216, 255, 0.36);
  background: rgba(8, 22, 42, 0.72);
  color: var(--cyan);
  font: 10px var(--font-mono);
  letter-spacing: 0.18em;
  margin-bottom: 14px;
}

.glitch-title {
  position: relative;
  margin: 0;
  font: 800 clamp(48px, 6.4vw, 88px)/0.92 var(--font-display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f4f9ff;
  text-shadow: 0 0 36px rgba(68, 174, 255, 0.25);
}
.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0.75;
}
.glitch-title::before {
  color: #57d8ff;
  transform: translate(-2px, 0);
  clip-path: inset(12% 0 68% 0);
  animation: glitch-slice-1 5.2s infinite linear alternate-reverse;
}
.glitch-title::after {
  color: #ff477e;
  transform: translate(2px, 0);
  clip-path: inset(64% 0 18% 0);
  animation: glitch-slice-2 4.3s infinite linear alternate-reverse;
}

.hero-alias {
  display: inline-block;
  margin-top: 2px;
  font: 700 clamp(12px, 1.5vw, 16px)/1.2 var(--font-pixel);
  color: var(--amber);
  letter-spacing: 0.08em;
  text-shadow: 0 0 18px rgba(255, 207, 112, 0.35);
}

.hero-main-headline {
  font: 800 clamp(38px, 4.9vw, 68px)/0.94 var(--font-display);
  letter-spacing: 0.03em;
}

.hero-lead {
  max-width: 710px;
  margin: 16px 0 8px;
  font-size: clamp(16.5px, 1.55vw, 20px);
  font-weight: 500;
  line-height: 1.48;
  color: #e8f4ff;
}

.hero-lead-hu {
  max-width: 710px;
  margin: 0 0 20px;
  font-size: clamp(13.5px, 1.25vw, 15.5px);
  line-height: 1.52;
  color: #9ec0e2;
}
.hero-lead-hu:empty {
  display: none;
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 22px;
}

.hero-stat-card {
  position: relative;
  padding: 16px 18px 14px;
  background: linear-gradient(165deg, rgba(8, 22, 42, 0.94) 0%, rgba(4, 11, 23, 0.96) 100%);
  border: 2px solid rgba(87, 216, 255, 0.36);
  box-shadow:
    0 0 0 2px #02060e,
    4px 4px 0 rgba(2, 6, 14, 0.92),
    inset 0 1px 0 rgba(154, 228, 255, 0.16);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.hero-stat-card:nth-child(1) { border-top: 3px solid var(--cyan); }
.hero-stat-card:nth-child(2) { border-top: 3px solid var(--amber); }
.hero-stat-card:nth-child(3) { border-top: 3px solid var(--green); }

.hero-stat-num {
  font: 800 clamp(34px, 3.6vw, 48px)/0.95 var(--font-display);
  letter-spacing: 0.03em;
  color: #f4faff;
}
.hero-stat-num.cyan { color: var(--cyan); text-shadow: 0 0 22px rgba(87, 216, 255, 0.28); }
.hero-stat-num.amber { color: var(--amber); text-shadow: 0 0 22px rgba(255, 207, 112, 0.28); }
.hero-stat-num.green { color: var(--green); text-shadow: 0 0 22px rgba(61, 245, 167, 0.28); }

.hero-stat-label {
  margin-top: 4px;
  font: 700 13px/1.2 var(--font-ui);
  letter-spacing: 0.04em;
  color: #eef7ff;
}

.hero-stat-sub {
  font: 600 10px/1.2 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #82a7cc;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-footer-bar {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(87, 216, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-stage-pills {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.hero-stage-pill {
  padding: 3px 7px;
  font: 700 8.5px/1 var(--font-pixel);
  letter-spacing: 0.08em;
  color: #6d8fb2;
  background: rgba(6, 15, 30, 0.85);
  border: 1px solid rgba(87, 216, 255, 0.20);
}
.hero-stage-pill.active {
  color: #030c18;
  background: var(--cyan);
  border-color: #b4f2ff;
}

.hero-stage-sep {
  font: 700 10px/1 var(--font-mono);
  color: rgba(87, 216, 255, 0.45);
}

.btn-cyber {
  min-height: 44px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(87, 216, 255, 0.52);
  background: rgba(11, 27, 49, 0.82);
  color: #e6f5ff;
  font: 600 11px var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.18s, background 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.btn-cyber:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  background: rgba(24, 68, 120, 0.85);
  box-shadow: 0 0 28px rgba(87, 216, 255, 0.25);
}
.btn-cyber-primary {
  background: linear-gradient(110deg, #57d8ff, #3b82f6);
  color: #030b16;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 0 32px rgba(64, 178, 255, 0.32);
}
.btn-cyber-primary:hover {
  color: #030b16;
  background: linear-gradient(110deg, #87e6ff, #6aa6ff);
}

.hero-scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font: 9.5px var(--font-mono);
  letter-spacing: 0.14em;
}
.scroll-arrow {
  display: inline-block;
  color: var(--cyan);
  animation: bob-down 1.6s ease-in-out infinite;
}

/* Telemetry Ribbon (Signal Observatory v9 signature!) */
.telemetry-ribbon {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid rgba(118, 206, 255, 0.42);
  border-bottom: 1px solid rgba(102, 160, 224, 0.30);
  border-left: 1px solid rgba(102, 160, 224, 0.18);
  border-right: 1px solid rgba(102, 160, 224, 0.18);
  background: rgba(4, 10, 20, 0.92);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(168, 228, 255, 0.18);
}

.tel-cell {
  padding: 14px 18px;
  border-left: 1px solid var(--line-soft);
}
.tel-cell:first-child { border-left: 0; }
.tel-label {
  display: flex;
  justify-content: space-between;
  font: 9px var(--font-mono);
  letter-spacing: 0.15em;
  color: var(--muted);
}
.tel-val {
  display: block;
  margin-top: 5px;
  font: 700 24px/1 var(--font-display);
  letter-spacing: 0.04em;
  color: #eef6ff;
}
.tel-val.cyan { color: var(--cyan); }
.tel-val.amber { color: var(--amber); }
.tel-val.green { color: var(--green); }
.tel-bar {
  margin-top: 8px;
  height: 2px;
  background: rgba(84, 130, 180, 0.2);
}
.tel-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 0 10px rgba(87, 216, 255, 0.7);
  transition: width 0.25s ease;
}

/* ---- Generic Section Structure ---- */
.act-section {
  position: relative;
  padding: 86px 0 42px;
  scroll-margin-top: 74px;
}

.act-head {
  position: relative;
  margin-bottom: 30px;
  max-width: 780px;
  padding: 10px 18px 10px 0;
  background: radial-gradient(ellipse 95% 95% at 30% 50%, rgba(3, 7, 16, 0.84) 48%, rgba(3, 7, 16, 0) 100%);
}
.act-index {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 10px var(--font-pixel);
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 8px;
}
.act-title {
  margin: 0;
  font: 800 clamp(32px, 4.4vw, 56px)/0.98 var(--font-display);
  letter-spacing: 0.04em;
  color: #f4faff;
  text-shadow: 0 4px 24px rgba(2, 6, 16, 0.92);
}
.act-subtitle {
  margin: 10px 0 0;
  font-size: 16px;
  color: #b4cce6;
}

/* Glass / HUD Card Frame with Corner Reticles */
.hud-panel {
  position: relative;
  padding: 22px 24px;
  border: 1px solid rgba(108, 174, 240, 0.32);
  border-top-color: rgba(138, 222, 255, 0.48);
  background: rgba(4, 9, 19, 0.94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 26px 66px rgba(0, 0, 0, 0.68), inset 0 1px 0 rgba(164, 226, 255, 0.18), inset 0 0 40px rgba(32, 102, 188, 0.04);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.hud-panel::before,
.hud-panel::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: rgba(87, 216, 255, 0.55);
  border-style: solid;
  pointer-events: none;
}
.hud-panel::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.hud-panel::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.hud-panel:hover {
  border-color: rgba(87, 216, 255, 0.48);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42), 0 0 32px rgba(60, 175, 255, 0.10);
}

/* ---- SCREEN 02: SCENE 02 — THE PAPER TRAIL (WHAT IS QA?) ---- */
.paper-trail-section {
  min-height: calc(100vh - 88px);
  display: flex;
  align-items: center;
  padding: 36px 0 44px;
}

.paper-stage-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 910px) minmax(180px, 1fr);
  gap: 28px;
  align-items: center;
}

.paper-doc-slot {
  min-height: 490px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* Deep Obsidian Signal Observatory Case File card — 100% consistent with site palette, zero scanlines! */
.paper-doc-card {
  position: relative;
  border-radius: 6px;
  background: linear-gradient(168deg, rgba(7, 16, 33, 0.96) 0%, rgba(4, 9, 20, 0.97) 100%);
  color: #e8f3ff;
  border: 1px solid rgba(87, 216, 255, 0.38);
  border-top-color: rgba(136, 224, 255, 0.58);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.78),
    0 0 34px rgba(56, 217, 255, 0.14),
    inset 0 1px 0 rgba(164, 228, 255, 0.18);
  overflow: hidden;
  transform-origin: left center;
  will-change: transform, opacity;
}
.paper-doc-card::before,
.paper-doc-card::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--cyan);
  border-style: solid;
  pointer-events: none;
}
.paper-doc-card::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.paper-doc-card::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.paper-doc-card.state-hidden {
  width: 304px;
  padding: 24px 26px;
  opacity: 0;
  transform: translateX(-92px) scale(0.76) rotate(-2deg);
  pointer-events: none;
}

.paper-doc-card.state-arrived {
  width: 304px;
  padding: 24px 26px;
  opacity: 1;
  transform: translateX(0) scale(1);
  transition: transform 0.62s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
  animation: paper-hover-float 2.6s ease-in-out 0.6s infinite;
}

.paper-doc-card.state-shaking {
  width: 304px;
  padding: 24px 26px;
  opacity: 1;
  animation: paper-shake-wobble 0.56s ease-in-out forwards;
}

.paper-doc-card.state-open {
  width: 100%;
  max-width: 906px;
  padding: 30px 34px 28px;
  opacity: 1;
  transform: translateX(0) scale(1);
  animation: paper-pop-open 0.46s cubic-bezier(0.34, 1.48, 0.64, 1) forwards;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.paper-doc-card.state-open.is-grabbed {
  border-right-color: #96f2ff !important;
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.78),
    6px 0 24px rgba(87, 230, 255, 0.28),
    inset -2px 0 0 rgba(150, 242, 255, 0.45) !important;
}

.paper-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.paper-teleport-btn {
  height: 28px;
  padding: 0 10px;
  border: 2px solid rgba(87, 216, 255, 0.44);
  background: rgba(10, 28, 52, 0.85);
  color: var(--cyan);
  font: 700 9.5px/1 var(--font-pixel);
  letter-spacing: 0.10em;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(2, 6, 14, 0.92);
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}
.paper-teleport-btn:hover {
  background: rgba(24, 72, 126, 0.82);
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.paper-spread-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 26px;
  align-items: stretch;
}

.paper-page-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  overflow: hidden;
}

.paper-page-right {
  position: relative;
  min-width: 0;
  padding: 18px 20px;
  background: linear-gradient(165deg, rgba(10, 26, 48, 0.88) 0%, rgba(5, 13, 27, 0.94) 100%);
  border: 2px solid rgba(87, 216, 255, 0.30);
  border-left: 3px solid var(--amber);
  box-shadow: inset 0 0 0 1px rgba(255, 207, 112, 0.10), 4px 4px 0 rgba(2, 6, 14, 0.88);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.paper-personal-tag {
  font: 700 9.5px/1.2 var(--font-pixel);
  letter-spacing: 0.11em;
  color: var(--amber);
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255, 207, 112, 0.28);
}

.paper-personal-quote {
  margin: 0;
  padding: 10px 12px;
  background: rgba(4, 12, 24, 0.78);
  border-left: 2px solid var(--cyan);
  font: italic 500 13.5px/1.48 var(--font-ui);
  color: #e4f3ff;
}

.paper-personal-notes {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.paper-note-item {
  padding: 8px 11px;
  background: rgba(6, 17, 34, 0.86);
  border: 1px solid rgba(87, 216, 255, 0.24);
  box-shadow: 2px 2px 0 rgba(2, 6, 14, 0.78);
}

.paper-note-code {
  display: block;
  font: 700 9px/1.1 var(--font-mono);
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 3px;
}

.paper-note-text {
  margin: 0;
  font: 400 12.2px/1.42 var(--font-ui);
  color: #c2daf2;
}

@media (max-width: 1120px) {
  .paper-spread-grid {
    grid-template-columns: 1fr;
  }
}

.paper-closed-face {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.paper-doc-card.state-open .paper-closed-face {
  display: none;
}

.paper-closed-tab {
  font: 700 13px/1.1 var(--font-pixel);
  letter-spacing: 0.12em;
  color: var(--cyan);
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(87, 216, 255, 0.24);
}

.paper-closed-lines {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 6px 4px;
}
.paper-closed-lines span {
  display: block;
  height: 5px;
  border-radius: 2px;
  background: rgba(116, 182, 238, 0.24);
}
.paper-closed-lines span:nth-child(1) { width: 92%; }
.paper-closed-lines span:nth-child(2) { width: 78%; }
.paper-closed-lines span:nth-child(3) { width: 86%; }
.paper-closed-lines span:nth-child(4) { width: 62%; }

.paper-closed-foot {
  font: 600 10px var(--font-mono);
  letter-spacing: 0.16em;
  color: var(--amber);
  text-align: center;
  text-transform: uppercase;
}

.paper-open-face {
  display: none;
}
.paper-doc-card.state-open .paper-open-face {
  display: block;
}

.paper-open-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.paper-file-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 3px;
  background: rgba(87, 216, 255, 0.10);
  border: 1px solid rgba(87, 216, 255, 0.38);
  font: 600 10px var(--font-pixel);
  letter-spacing: 0.14em;
  color: var(--cyan);
}

.paper-replay-btn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid rgba(87, 216, 255, 0.34);
  background: rgba(10, 24, 46, 0.78);
  color: var(--cyan);
  font: 700 13px/1 var(--font-mono);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}
.paper-replay-btn:hover {
  background: rgba(24, 72, 126, 0.72);
  border-color: var(--cyan);
  transform: rotate(-30deg);
}

.paper-title {
  margin: 0 0 14px;
  font: 800 clamp(28px, 3.6vw, 44px)/1.02 var(--font-display);
  letter-spacing: 0.04em;
  color: #f4faff;
  text-shadow: 0 0 26px rgba(68, 174, 255, 0.22);
}

.paper-body {
  margin: 0 0 20px;
  font: 400 15.5px/1.64 var(--font-ui);
  color: #bfd6ee;
}

.paper-objective-box {
  padding: 16px 18px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(13, 36, 66, 0.78), rgba(7, 19, 38, 0.84));
  border-left: 3px solid var(--cyan);
  border-top: 1px solid rgba(87, 216, 255, 0.22);
  border-right: 1px solid rgba(87, 216, 255, 0.18);
  border-bottom: 1px solid rgba(87, 216, 255, 0.18);
  margin-bottom: 24px;
}

.paper-objective-label {
  font: 600 10px var(--font-mono);
  letter-spacing: 0.18em;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.paper-objective-text {
  margin: 0;
  font: 600 16px/1.48 var(--font-ui);
  color: #f2f8ff;
}

/* Integrated Static Document Stamps: PREVENT -> VERIFY -> IMPROVE */
.paper-stamps-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  padding-top: 14px;
  border-top: 1px dashed rgba(87, 216, 255, 0.24);
}

.paper-stamp {
  min-width: 0;
  padding: 8px 6px;
  border-radius: 4px;
  border: 1px solid rgba(87, 216, 255, 0.28);
  background: rgba(8, 20, 40, 0.86);
  text-align: center;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.paper-stamp.stamp-active {
  border-color: var(--cyan);
  background: rgba(20, 82, 134, 0.44);
  box-shadow: 0 0 0 2px rgba(87, 216, 255, 0.24), 0 0 22px rgba(87, 216, 255, 0.28);
  transform: translateY(-2px);
}

.stamp-code {
  display: block;
  font: 700 11px/1.15 var(--font-pixel);
  letter-spacing: 0.04em;
  color: #eef7ff;
  white-space: nowrap;
}
.paper-stamp.stamp-active .stamp-code {
  color: var(--cyan);
}

.stamp-sub {
  display: block;
  margin-top: 3px;
  font: 500 9.5px/1.2 var(--font-mono);
  color: #8ab4dc;
}

.stamp-arrow {
  font: 700 13px/1 var(--font-mono);
  color: var(--cyan);
  opacity: 0.72;
  align-self: center;
  flex-shrink: 0;
}

@keyframes paper-hover-float {
  0%, 100% { transform: translateY(0px); }
  50%      { transform: translateY(-6px); }
}

@keyframes paper-shake-wobble {
  0%   { transform: translateX(0) rotate(0deg); }
  16%  { transform: translateX(-8px) rotate(-3.2deg); }
  34%  { transform: translateX(8px) rotate(3.0deg); }
  52%  { transform: translateX(-6px) rotate(-2.4deg); }
  70%  { transform: translateX(6px) rotate(2.1deg); }
  86%  { transform: translateX(-3px) rotate(-1.0deg); }
  100% { transform: translateX(0) rotate(0deg); }
}

@keyframes paper-pop-open {
  0%   { transform: scale(0.76); opacity: 0.86; }
  62%  { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1.0); opacity: 1; }
}

@media (max-width: 1120px) {
  .paper-stage-grid { grid-template-columns: 1fr; }
  .paper-detective-spacer { display: none; }
}
@media (max-width: 640px) {
  .paper-doc-card.state-open { padding: 22px 20px; }
  .paper-stamps-row { flex-direction: column; align-items: stretch; }
  .stamp-arrow { transform: rotate(90deg); text-align: center; }
}

/* ---- ACT 01: DOSSIER ---- */
.dossier-lead {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: 16px;
  color: #d3e5f8;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 920px;
}

.ev-code {
  font: 10px var(--font-pixel);
  color: var(--amber);
  letter-spacing: 0.1em;
}
.ev-title {
  margin: 8px 0 8px;
  font: 700 22px/1.1 var(--font-display);
  letter-spacing: 0.04em;
  color: #f3f9ff;
}
.ev-body {
  margin: 0;
  color: #a9c2de;
  font-size: 14px;
}

/* ---- SCREEN 04: SCENE 04 — WHERE IS QA USEFUL? / 5 FLOATING MONITORS & BUG INFESTATION ---- */
.domains-section {
  min-height: calc(100vh - 76px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 56px;
  padding-bottom: 110px;
}

.domains-header-row {
  max-width: 1040px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 26px;
}

.domains-dominant-head {
  max-width: 820px;
  margin-bottom: 0;
}

.domains-main-title {
  font-size: clamp(40px, 5.2vw, 66px);
  letter-spacing: 0.04em;
  line-height: 0.96;
  color: #f6fbff;
}

.domains-lead-en {
  margin-top: 10px;
  font: 600 clamp(17px, 2vw, 22px)/1.36 var(--font-ui);
  color: var(--cyan);
}

.domains-story-lead {
  margin: 8px 0 0;
  font: 400 15px/1.55 var(--font-ui);
  color: #bfd7f0;
  max-width: 720px;
}

.domains-infestation-stage {
  position: relative;
  max-width: 1050px;
  padding-top: 8px;
  padding-bottom: 8px;
  overflow: visible;
}

.domains-row-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.domains-row-bottom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 336px));
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
  padding-right: 110px;
}

/* Clean, Larger, Story-Driven Floating Monitors (No fake graphs, no diagnostic clutter!) */
.domain-monitor {
  position: relative;
  min-height: 204px;
  padding: 20px 22px 18px;
  background: linear-gradient(170deg, rgba(7, 17, 34, 0.94) 0%, rgba(4, 9, 20, 0.97) 100%);
  border: 2px solid rgba(87, 216, 255, 0.30);
  box-shadow:
    0 0 0 2px #02060e,
    5px 5px 0 rgba(2, 6, 14, 0.92);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    opacity 0.28s ease,
    transform 0.28s ease,
    background 0.28s ease;
  animation: paper-hover-float 3.8s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}

/* Roaming Pixel-Bug Canvas inside each monitor */
.dm-roam-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
  image-rendering: pixelated;
}

.dm-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

/* Visual Hierarchy:
   1. Infested (bug still crawling on screen): text is calm & subdued so the moving bug is the focal point.
   2. Verified (bug cleared, non-spotlight): clean, readable, calm border so all 5 don't shout at once.
   3. Spotlight (the monitor just cleared by the wand or hovered/selected): crisp 100% contrast & glowing cyan frame! */
.domain-monitor.is-infested {
  border-color: rgba(255, 71, 126, 0.52);
  box-shadow:
    0 0 0 2px #02060e,
    5px 5px 0 rgba(2, 6, 14, 0.94),
    0 0 18px rgba(255, 59, 127, 0.16);
}
.domain-monitor.is-infested .dm-content,
.domain-monitor.is-infested .dm-proof {
  opacity: 0.40;
}

.domain-monitor.is-detecting {
  border-color: #7ef4ff;
  box-shadow:
    0 0 0 2px #02060e,
    0 0 0 3px rgba(87, 216, 255, 0.38),
    0 0 26px rgba(87, 216, 255, 0.35);
}
.domain-monitor.is-detecting .dm-content,
.domain-monitor.is-detecting .dm-proof {
  opacity: 0.56;
}

.domain-monitor.is-verified {
  opacity: 1;
  border-color: rgba(87, 216, 255, 0.50);
  background: linear-gradient(168deg, rgba(10, 25, 48, 0.96) 0%, rgba(5, 13, 27, 0.98) 100%);
  box-shadow:
    0 0 0 2px #02060e,
    5px 5px 0 rgba(2, 6, 14, 0.94),
    0 0 18px rgba(87, 216, 255, 0.16),
    inset 0 1px 0 rgba(154, 226, 255, 0.18);
}
.domain-monitor.is-verified .dm-content,
.domain-monitor.is-verified .dm-proof {
  opacity: 1;
}

.domain-monitor.is-spotlight,
.domain-monitor:hover {
  opacity: 1;
  border-color: #57d8ff;
  background: linear-gradient(168deg, rgba(11, 28, 54, 0.97) 0%, rgba(5, 13, 27, 0.99) 100%);
  box-shadow:
    0 0 0 2px #02060e,
    6px 6px 0 rgba(2, 6, 14, 0.95),
    0 0 28px rgba(87, 216, 255, 0.28),
    inset 0 1px 0 rgba(164, 232, 255, 0.25);
}
.domain-monitor.is-spotlight .dm-content,
.domain-monitor.is-spotlight .dm-proof,
.domain-monitor:hover .dm-content,
.domain-monitor:hover .dm-proof {
  opacity: 1;
}

/* Clean Monitor Typography: Title -> Subtitle -> Short Description -> Separated Personal Experience Line */
.dm-title {
  margin: 0;
  font: 800 22px/1.05 var(--font-display);
  letter-spacing: 0.04em;
  color: #dff5ff;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}
.domain-monitor.is-spotlight .dm-title,
.domain-monitor:hover .dm-title {
  color: #ffffff;
  text-shadow: 0 0 18px rgba(87, 216, 255, 0.35);
}

.dm-subtitle {
  font: 600 13px/1.3 var(--font-ui);
  color: var(--cyan);
}

.dm-desc {
  margin: 4px 0 0;
  font: 400 13.5px/1.5 var(--font-ui);
  color: #c4dbf2;
}
.domain-monitor.is-spotlight .dm-desc,
.domain-monitor:hover .dm-desc {
  color: #eaf5ff;
}

.dm-proof {
  position: relative;
  z-index: 2;
  padding-top: 10px;
  border-top: 1px solid rgba(87, 216, 255, 0.20);
  font: 500 12px/1.4 var(--font-ui);
  color: #a9c6e4;
  transition: opacity 0.28s ease, border-color 0.28s ease;
}
.dm-proof b {
  color: var(--amber);
  font-weight: 600;
}
.domain-monitor.is-spotlight .dm-proof,
.domain-monitor:hover .dm-proof {
  border-top-color: rgba(87, 216, 255, 0.38);
  color: #e4f2ff;
}

@media (max-width: 1180px) {
  .domains-row-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .domains-row-bottom { padding-right: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .domains-row-top,
  .domains-row-bottom { grid-template-columns: 1fr; }
}

.diag-console {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.diag-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
  font: 10px var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--muted);
}
.diag-terminal {
  font: 12px/1.6 var(--font-mono);
  background: rgba(2, 6, 14, 0.75);
  border: 1px solid var(--line-soft);
  padding: 14px 16px;
  color: #cde3fb;
}
.diag-terminal .lbl-fault { color: var(--hot); font-weight: 600; }
.diag-terminal .lbl-trace { color: var(--green); font-weight: 600; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tech-tag {
  padding: 4px 9px;
  border: 1px solid rgba(102, 160, 224, 0.28);
  background: rgba(12, 28, 52, 0.65);
  font: 10px var(--font-mono);
  color: #b7d7f7;
}

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

/* ---- ACT 03: SPECTRA 6-BAND STAGE ---- */
.spectra-stage-wrap {
  position: relative;
  height: clamp(320px, 44vh, 460px);
  border: 1px solid rgba(87, 170, 240, 0.34);
  background: #030711;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
#spectraCanvas {
  display: block;
  width: 100%;
  height: 100%;
}
.spectra-hud-top {
  position: absolute;
  top: 10px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  font: 9px var(--font-mono);
  letter-spacing: 0.15em;
  color: #84a5ca;
}
.spectra-hud-top strong { color: var(--cyan); }

.band-pillars {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-top: 0;
  background: rgba(6, 14, 27, 0.88);
}
.band-pillar {
  padding: 14px 12px;
  border-left: 1px solid var(--line-soft);
  position: relative;
}
.band-pillar:first-child { border-left: 0; }
.band-pillar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.band-pillar-code {
  font: 9px var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--band-color, var(--cyan));
}
.band-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.band-pillar h4 {
  margin: 8px 0 4px;
  font: 700 17px/1.05 var(--font-display);
  letter-spacing: 0.04em;
  color: #f1f8ff;
}
.band-pillar p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #93b0d0;
}
.band-meter-bar {
  margin-top: 10px;
  height: 3px;
  background: rgba(84, 130, 180, 0.18);
  overflow: hidden;
}
.band-meter-bar i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--band-color, var(--cyan));
  transform: scaleX(0.15);
  transform-origin: left;
  transition: transform 0.08s linear;
}

/* ---- ACT 04: GITHUB R&D LAB + ENGINE CONTROL DECK ---- */
.repo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.repo-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 196px;
}
.repo-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.repo-badge {
  padding: 3px 7px;
  font: 8px var(--font-pixel);
  color: var(--cyan);
  border: 1px solid rgba(87, 216, 255, 0.35);
  background: rgba(16, 54, 88, 0.38);
}
.repo-badge.live {
  color: var(--green);
  border-color: rgba(61, 245, 167, 0.55);
  background: rgba(12, 68, 48, 0.42);
}
.repo-lang {
  font: 10px var(--font-mono);
  color: var(--muted);
}
.repo-title {
  margin: 4px 0 6px;
  font: 700 22px/1.05 var(--font-display);
  letter-spacing: 0.04em;
  color: #f3f9ff;
}
.repo-desc {
  margin: 0;
  font-size: 13px;
  color: #a4bedc;
}
.repo-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 10px var(--font-mono);
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-top: 6px;
}
.repo-link:hover { text-decoration: underline; }

/* Live Engine Control Deck */
.lab-deck {
  margin-top: 24px;
}
.lab-deck-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.lab-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font: 10px var(--font-mono);
  color: var(--muted);
  letter-spacing: 0.1em;
}
.lab-control span {
  display: flex;
  justify-content: space-between;
}
.lab-control b { color: var(--cyan); }
.lab-control input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #1d365a);
  outline: none;
  cursor: pointer;
}
.lab-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 0;
  background: var(--cyan);
  border: 2px solid #e6f9ff;
  box-shadow: 0 0 10px var(--cyan);
}
.lab-buttons {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---- ACT 05: FIELD TIMELINE & SKILLS ---- */
.timeline-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 24px;
  align-items: start;
}

.timeline-list {
  position: relative;
  padding-left: 26px;
  border-left: 2px solid rgba(87, 216, 255, 0.28);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.timeline-item {
  position: relative;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 24px;
  width: 12px;
  height: 12px;
  background: #061224;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 14px rgba(87, 216, 255, 0.75);
}
.tl-era {
  font: 10px var(--font-mono);
  letter-spacing: 0.15em;
  color: var(--amber);
}
.tl-role {
  margin: 4px 0 2px;
  font: 700 24px/1.05 var(--font-display);
  color: #f4f9ff;
}
.tl-org {
  font: 500 12px var(--font-mono);
  color: var(--cyan);
  margin-bottom: 8px;
}
.tl-detail {
  margin: 0;
  font-size: 14px;
  color: #adc6e2;
}

.cred-box h3 {
  margin: 0 0 12px;
  font: 700 20px var(--font-display);
  letter-spacing: 0.08em;
  color: #f3f9ff;
}
.cred-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cred-list li {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  font: 12px var(--font-mono);
  color: #bfd7f2;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.cred-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.cred-list b { color: var(--cyan); font-weight: 500; }

/* ---- ACT 06: FINALE / UPLINK ---- */
.finale-panel {
  text-align: center;
  padding: 46px 28px;
  background: linear-gradient(160deg, rgba(10, 24, 46, 0.90), rgba(5, 11, 22, 0.92));
}
.finale-panel .hero-actions {
  justify-content: center;
  margin-top: 22px;
}
.finale-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid rgba(61, 245, 167, 0.45);
  color: var(--green);
  font: 10px var(--font-pixel);
  margin-bottom: 14px;
}

/* ---- Interactive Hidden Pixel Bugs (QA Mini-Game!) ---- */
.glitch-bug {
  position: absolute;
  z-index: 22;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 71, 126, 0.72);
  background: rgba(34, 6, 18, 0.88);
  color: #ff8fb1;
  font: 9px var(--font-pixel);
  cursor: crosshair;
  box-shadow: 0 0 18px rgba(255, 71, 126, 0.35);
  animation: bug-jitter 2.4s infinite steps(2);
  transition: border-color 0.25s, background 0.25s, color 0.25s, transform 0.25s;
}
.glitch-bug:hover {
  transform: scale(1.08);
  box-shadow: 0 0 26px rgba(255, 71, 126, 0.65);
}
.glitch-bug.squashed {
  animation: none;
  border-color: rgba(61, 245, 167, 0.6);
  background: rgba(7, 36, 26, 0.76);
  color: var(--green);
  box-shadow: 0 0 14px rgba(61, 245, 167, 0.22);
  cursor: default;
}

/* ---- ACT 06: FINALE PORTRAIT MORPH (3D ZOOM -> BAYER DOTS -> REAL PHOTO) ---- */
.finale-portrait-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.finale-portrait-frame {
  position: relative;
  width: 248px;
  height: 248px;
  border: 1px solid rgba(94, 214, 255, 0.45);
  background: radial-gradient(circle at 50% 32%, rgba(28, 86, 152, 0.22), rgba(4, 10, 20, 0.92) 72%);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.55), inset 0 0 36px rgba(68, 180, 255, 0.12);
  overflow: hidden;
}

.finale-photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: contrast(1.06) saturate(0.92);
  transition: opacity 0.14s linear;
}

.finale-frame-corners {
  position: absolute;
  inset: 7px;
  pointer-events: none;
  z-index: 4;
}
.finale-frame-corners i {
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: rgba(110, 224, 255, 0.72);
  border-style: solid;
}
.finale-frame-corners i:nth-child(1) { top: 0; left: 0; border-width: 2px 0 0 2px; }
.finale-frame-corners i:nth-child(2) { top: 0; right: 0; border-width: 2px 2px 0 0; }
.finale-frame-corners i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.finale-frame-corners i:nth-child(4) { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

.finale-phase-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 5;
  padding: 3px 7px;
  background: rgba(3, 9, 18, 0.84);
  border: 1px solid rgba(94, 214, 255, 0.45);
  color: var(--cyan);
  font: 8px var(--font-pixel);
  letter-spacing: 0.08em;
}

.finale-portrait-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.finale-stage-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 9px var(--font-mono);
  letter-spacing: 0.12em;
  color: var(--dim);
}
.stage-pill {
  padding: 3px 8px;
  border: 1px solid var(--line-soft);
  background: rgba(6, 15, 29, 0.72);
  transition: border-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.stage-pill.active {
  border-color: var(--cyan);
  color: #e4f8ff;
  box-shadow: 0 0 14px rgba(87, 216, 255, 0.25);
}
.stage-arrow { color: var(--dim); }

.finale-mini-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* ---- HIDDEN SECRET CORNER GLITCH BUG (MINIGAME EASTER EGG) ---- */
.secret-glitch-bug {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 71, 126, 0.32);
  background: rgba(14, 6, 18, 0.62);
  color: rgba(255, 132, 174, 0.72);
  font: 8px var(--font-pixel);
  cursor: pointer;
  opacity: 0.42;
  backdrop-filter: blur(6px);
  animation: secret-twitch 5.4s infinite steps(2);
  transition: opacity 0.22s, transform 0.22s, border-color 0.22s, box-shadow 0.22s;
}
.secret-glitch-bug:hover {
  opacity: 1;
  transform: scale(1.08);
  border-color: var(--hot);
  color: #ffd4e3;
  box-shadow: 0 0 22px rgba(255, 71, 126, 0.48), -2px 0 0 rgba(87, 216, 255, 0.6);
}
.secret-bug-glyph {
  font-size: 11px;
  filter: hue-rotate(305deg) saturate(1.8);
}

@keyframes secret-twitch {
  0%, 91%, 100% { transform: translate(0, 0); }
  93% { transform: translate(-2px, 1px); box-shadow: 2px 0 0 rgba(87, 216, 255, 0.65); }
  95% { transform: translate(2px, -1px); box-shadow: -2px 0 0 rgba(255, 71, 126, 0.8); }
  97% { transform: translate(-1px, 0); }
}

/* ---- SECRET MINIGAME PLACEHOLDER ARCADE MODAL ---- */
.arcade-modal {
  border-color: rgba(255, 71, 126, 0.55);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65), 0 0 40px rgba(255, 71, 126, 0.18);
}
.arcade-screen-wrap {
  position: relative;
  margin: 14px 0 18px;
  border: 1px solid rgba(87, 216, 255, 0.38);
  background: #02050c;
  overflow: hidden;
}
#minigamePreviewCanvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
.arcade-overlay-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  background: radial-gradient(circle, rgba(3, 8, 18, 0.52), rgba(3, 8, 18, 0.84));
}
.arcade-badge {
  padding: 3px 9px;
  border: 1px solid var(--amber);
  color: var(--amber);
  font: 9px var(--font-pixel);
  margin-bottom: 10px;
}
.arcade-overlay-copy h3 {
  margin: 0 0 8px;
  font: 800 28px/1 var(--font-display);
  letter-spacing: 0.08em;
  color: #f3f9ff;
}
.arcade-overlay-copy p {
  margin: 0;
  max-width: 440px;
  font: 12px/1.55 var(--font-mono);
  color: #bfd8f4;
}

/* ---- Modal ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(2, 6, 14, 0.78);
  backdrop-filter: blur(8px);
  display: none;
  place-items: center;
  padding: 20px;
}
.modal-backdrop.open { display: grid; }
.modal-box {
  width: min(620px, 100%);
}
.modal-pre {
  background: rgba(2, 7, 16, 0.88);
  border: 1px solid var(--line);
  padding: 14px;
  font: 12px/1.55 var(--font-mono);
  color: #cde3fb;
  white-space: pre-wrap;
  margin: 14px 0 18px;
}

.site-footer {
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font: 10px var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--dim);
}
.site-footer b { color: var(--cyan); font-weight: 500; }

/* ---- Animations ---- */
@keyframes glitch-slice-1 {
  0%, 84%, 100% { clip-path: inset(10% 0 74% 0); transform: translate(-1.5px, 0); }
  86% { clip-path: inset(42% 0 38% 0); transform: translate(-5px, 1px); }
  89% { clip-path: inset(75% 0 6% 0); transform: translate(3px, -1px); }
  92% { clip-path: inset(18% 0 65% 0); transform: translate(-2px, 0); }
}
@keyframes glitch-slice-2 {
  0%, 79%, 100% { clip-path: inset(68% 0 14% 0); transform: translate(1.5px, 0); }
  82% { clip-path: inset(20% 0 58% 0); transform: translate(5px, -1px); }
  85% { clip-path: inset(52% 0 28% 0); transform: translate(-3px, 1px); }
  88% { clip-path: inset(65% 0 15% 0); transform: translate(2px, 0); }
}
@keyframes bob-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}
@keyframes sweep-scan {
  to { left: 150%; }
}
@keyframes slide-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes bug-jitter {
  0%, 88%, 100% { transform: translate(0, 0); }
  91% { transform: translate(-2px, 1px); }
  94% { transform: translate(2px, -1px); }
  97% { transform: translate(-1px, -1px); }
}
@keyframes shake-glitch {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

/* ==========================================================================
   UNIFIED PIXEL-ART WINDOW SYSTEM (ALL 4 STYLES: A TERMINAL · B 16-BIT RPG · C DOSSIER · D NEO-PIXEL)
   Default body[data-px-mode="mix"] assigns each window its thematic pixel-art style;
   clicking UI: PX-MIX in the HUD cycles: MIX -> A -> B -> C -> D globally!
   ========================================================================== */

/* Shared crisp pixel-art micro-controls (buttons, chips, stamps, layer nodes) */
.hud-chip,
.btn-cyber,
.layer-node,
.paper-stamp,
.paper-replay-btn {
  border-radius: 0;
  border-width: 2px;
  box-shadow: 2px 2px 0 rgba(2, 6, 14, 0.92);
}
.btn-cyber:hover,
.hud-chip:hover {
  box-shadow: 3px 3px 0 #02060e, 0 0 18px rgba(87, 216, 255, 0.24);
}

/* Optional pixel-art chrome elements inside #paperDocCard (toggled cleanly per active style) */
.px-folder-tab,
.px-term-bar,
.px-rivet,
.px-notch-tr {
  display: none;
}

.paper-doc-card.px-win {
  overflow: visible;
  border-radius: 0;
}

/* ---- STYLE A: NOIR PIXEL TERMINAL (16-bit Pixel Titlebar + Beveled Double Frame + Hard Shadow) ---- */
body[data-px-mode="mix"] .px-win[data-px-role="a"],
body[data-px-mode="a"] .px-win {
  border-radius: 0;
  background: #061022;
  border: 2px solid #57d8ff;
  box-shadow:
    0 0 0 2px #02060e,
    0 0 0 4px #184468,
    6px 6px 0 0 rgba(2, 6, 14, 0.94),
    inset 2px 2px 0 0 rgba(145, 232, 255, 0.24),
    inset -2px -2px 0 0 rgba(2, 8, 20, 0.85);
}
body[data-px-mode="mix"] .px-win[data-px-role="a"]::before,
body[data-px-mode="mix"] .px-win[data-px-role="a"]::after,
body[data-px-mode="a"] .px-win::before,
body[data-px-mode="a"] .px-win::after {
  display: none;
}
/* Subtle pixel terminal top accent stripe on .hud-panel cards in Style A */
body[data-px-mode="mix"] .hud-panel.px-win[data-px-role="a"],
body[data-px-mode="a"] .hud-panel.px-win {
  background:
    linear-gradient(180deg, rgba(16, 46, 84, 0.72) 0px, rgba(16, 46, 84, 0.72) 10px, rgba(87, 216, 255, 0.45) 10px, rgba(87, 216, 255, 0.45) 12px, transparent 12px),
    #061022;
  padding-top: 28px;
}
/* Dedicated 16-bit terminal titlebar inside #paperDocCard when Style A is active */
body[data-px-mode="a"] #paperDocCard.state-open {
  padding-top: 0;
}
body[data-px-mode="a"] #paperDocCard.state-open .px-term-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -38px 20px;
  padding: 9px 14px;
  background:
    repeating-linear-gradient(90deg, rgba(87, 216, 255, 0.16) 0 4px, rgba(87, 216, 255, 0.06) 4px 8px),
    #0c2342;
  border-bottom: 2px solid #57d8ff;
  font: 700 11px/1 var(--font-pixel);
  letter-spacing: 0.12em;
  color: #dff7ff;
}
.px-term-btns {
  display: inline-flex;
  gap: 5px;
}
.px-term-btns i {
  font-style: normal;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  background: #07152a;
  border: 2px solid #57d8ff;
  box-shadow: inset -1px -1px 0 #153c5e, inset 1px 1px 0 #9eeaff;
  color: #57d8ff;
  font: 700 10px/1 var(--font-mono);
}
.px-term-btns i.x {
  border-color: #ffcf70;
  color: #ffcf70;
}

/* ---- STYLE B: 16-BIT DETECTIVE RPG BOX (Double Cyan + Amber Frame & Gold Corner Rivets) ---- */
body[data-px-mode="mix"] .px-win[data-px-role="b"],
body[data-px-mode="b"] .px-win {
  border-radius: 0;
  background: linear-gradient(180deg, #091730 0%, #050d1e 28%, #040a18 100%);
  border: 2px solid #57d8ff;
  box-shadow:
    0 0 0 2px #02060e,
    0 0 0 4px #ffcf70,
    0 0 0 6px #02060e,
    0 18px 46px rgba(0, 0, 0, 0.82),
    inset 0 0 0 2px #143654;
}
body[data-px-mode="mix"] .px-win[data-px-role="b"]::before,
body[data-px-mode="mix"] .px-win[data-px-role="b"]::after,
body[data-px-mode="b"] .px-win::before,
body[data-px-mode="b"] .px-win::after {
  width: 6px;
  height: 6px;
  border: 0;
  background: #ffcf70;
  box-shadow: 0 0 0 2px #02060e;
}
body[data-px-mode="mix"] .px-win[data-px-role="b"]::before,
body[data-px-mode="b"] .px-win::before { top: -3px; left: -3px; }
body[data-px-mode="mix"] .px-win[data-px-role="b"]::after,
body[data-px-mode="b"] .px-win::after  { bottom: -3px; right: -3px; }

body[data-px-mode="b"] #paperDocCard .px-rivet {
  display: block;
  position: absolute;
  width: 7px;
  height: 7px;
  background: #ffcf70;
  box-shadow: 0 0 0 2px #02060e;
  z-index: 4;
  pointer-events: none;
}
.px-rivet.r1 { top: -4px; left: -4px; }
.px-rivet.r2 { top: -4px; right: -4px; }
.px-rivet.r3 { bottom: -4px; left: -4px; }
.px-rivet.r4 { bottom: -4px; right: -4px; }
body[data-px-mode="b"] #paperDocCard .paper-stamp.stamp-active {
  border-color: #ffcf70;
  box-shadow: 2px 2px 0 #02060e, inset 0 0 0 1px #57d8ff;
}
body[data-px-mode="b"] #paperDocCard .paper-stamp.stamp-active .stamp-code {
  color: #ffcf70;
}

/* ---- STYLE C: PIXEL CASE-FILE DOSSIER (Notched Top Folder Tab + Corner Cut + Stepped Stamps) ---- */
body[data-px-mode="mix"] .px-win[data-px-role="c"],
body[data-px-mode="c"] .px-win {
  border-radius: 0;
  background: #061124;
  border: 2px solid #57d8ff;
  box-shadow:
    5px 5px 0 #02060e,
    5px 5px 0 2px #19476b,
    inset 0 2px 0 rgba(130, 224, 255, 0.24);
}
body[data-px-mode="mix"] .px-win[data-px-role="c"]::before,
body[data-px-mode="mix"] .px-win[data-px-role="c"]::after,
body[data-px-mode="c"] .px-win::before,
body[data-px-mode="c"] .px-win::after {
  display: none;
}
body[data-px-mode="mix"] #paperDocCard[data-px-role="c"] .px-folder-tab,
body[data-px-mode="c"] #paperDocCard .px-folder-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  top: -28px;
  left: -2px;
  height: 28px;
  padding: 0 18px 0 12px;
  background: #0b203e;
  border: 2px solid #57d8ff;
  border-bottom: 2px solid #061124;
  font: 700 10px/1 var(--font-pixel);
  letter-spacing: 0.14em;
  color: #57d8ff;
  clip-path: polygon(4px 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%, 0 4px);
  pointer-events: none;
}
body[data-px-mode="mix"] #paperDocCard[data-px-role="c"] .px-notch-tr,
body[data-px-mode="c"] #paperDocCard .px-notch-tr {
  display: block;
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: #030711;
  border-left: 2px solid #57d8ff;
  border-bottom: 2px solid #57d8ff;
  pointer-events: none;
}
body[data-px-mode="mix"] #paperDocCard[data-px-role="c"] .paper-stamp,
body[data-px-mode="c"] #paperDocCard .paper-stamp {
  clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
}
body[data-px-mode="mix"] #paperDocCard[data-px-role="c"] .paper-stamp.stamp-active,
body[data-px-mode="c"] #paperDocCard .paper-stamp.stamp-active {
  border-color: #3df5a7;
  background: rgba(16, 68, 72, 0.54);
  box-shadow: inset 0 0 0 2px #3df5a7;
}
body[data-px-mode="mix"] #paperDocCard[data-px-role="c"] .paper-stamp.stamp-active .stamp-code,
body[data-px-mode="c"] #paperDocCard .paper-stamp.stamp-active .stamp-code {
  color: #3df5a7;
}
/* Folder tab accent strip on regular .hud-panel cards when global Style C is active */
body[data-px-mode="c"] .hud-panel.px-win {
  margin-top: 10px;
}
body[data-px-mode="c"] .hud-panel.px-win::before {
  display: block;
  content: "";
  position: absolute;
  top: -10px;
  left: -2px;
  width: 92px;
  height: 10px;
  background: #0b203e;
  border: 2px solid #57d8ff;
  border-bottom: 0;
  clip-path: polygon(4px 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
}

/* ---- STYLE D: MINIMAL NEO-PIXEL HUD (Stepped 4px Staircase Corners + Clean Modern Readability) ---- */
body[data-px-mode="mix"] .px-win[data-px-role="d"],
body[data-px-mode="d"] .px-win {
  border-radius: 0;
  background: rgba(5, 13, 30, 0.96);
  border: 2px solid rgba(87, 216, 255, 0.52);
  box-shadow:
    inset 0 0 0 2px rgba(10, 28, 56, 0.85),
    4px 4px 0 rgba(2, 6, 14, 0.92),
    0 18px 46px rgba(0, 0, 0, 0.68);
  clip-path: polygon(
    6px 0, calc(100% - 6px) 0, calc(100% - 6px) 3px, calc(100% - 3px) 3px, calc(100% - 3px) 6px, 100% 6px,
    100% calc(100% - 6px), calc(100% - 3px) calc(100% - 6px), calc(100% - 3px) calc(100% - 3px), calc(100% - 6px) calc(100% - 3px), calc(100% - 6px) 100%,
    6px 100%, 6px calc(100% - 3px), 3px calc(100% - 3px), 3px calc(100% - 6px), 0 calc(100% - 6px),
    0 6px, 3px 6px, 3px 3px, 6px 3px
  );
}
body[data-px-mode="mix"] .px-win[data-px-role="d"]::before,
body[data-px-mode="mix"] .px-win[data-px-role="d"]::after,
body[data-px-mode="d"] .px-win::before,
body[data-px-mode="d"] .px-win::after {
  width: 6px;
  height: 6px;
  border: 0;
  background: #57d8ff;
}
body[data-px-mode="mix"] .px-win[data-px-role="d"]::before,
body[data-px-mode="d"] .px-win::before { top: 4px; left: 4px; }
body[data-px-mode="mix"] .px-win[data-px-role="d"]::after,
body[data-px-mode="d"] .px-win::after  { bottom: 4px; right: 4px; background: #ffcf70; }

/* Keep #paperDocCard margin clean so Style C top folder tab breathes naturally */
.paper-doc-slot {
  padding-top: 26px;
}

/* ==========================================================================
   SCENE 03: THE COMPLAINT STORM — FULL-VIEWPORT 100vw x 100vh PINNED 386 RETRO PC
   ========================================================================== */
.storm-section {
  position: relative;
  height: 380vh;
  scroll-margin-top: 0px;
}

.storm-viewport {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 28;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
}
.storm-viewport.active {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

.storm-pc-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  pointer-events: none;
}

.storm-screen-canvas {
  position: absolute;
  z-index: 2;
  image-rendering: pixelated;
  pointer-events: none;
}

.storm-reaction-bubble {
  position: fixed;
  z-index: 38;
  padding: 10px 20px;
  border-radius: 15px;
  background: #f4faff;
  color: #071324;
  border: 1.5px solid #38d9ff;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.62), 0 0 20px rgba(56, 217, 255, 0.36);
  font: 700 18px/1 "Silkscreen", var(--font-pixel);
  letter-spacing: 0.08em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%) scale(0.55);
  transform-origin: center bottom;
  transition: opacity 0.36s ease, transform 0.36s ease;
}
.storm-reaction-bubble::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 12px;
  height: 12px;
  background: #f2f9ff;
  border-right: 1.5px solid #38d9ff;
  border-bottom: 1.5px solid #38d9ff;
  transform: translateX(-50%) rotate(45deg);
}
.storm-reaction-bubble.show {
  opacity: 1;
  transform: translate(-50%, -100%) scale(1);
  animation: hello-pop-glitch 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.storm-reaction-bubble.is-clean {
  color: #071324;
  border-color: #38d9ff;
}
.storm-reaction-bubble.is-clean::after {
  border-right-color: #38d9ff;
  border-bottom-color: #38d9ff;
}

.storm-hud-bar {
  position: fixed;
  left: 18px;
  top: 66px;
  z-index: 34;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: rgba(4, 10, 22, 0.92);
  border: 2px solid rgba(87, 216, 255, 0.42);
  box-shadow: 3px 3px 0 #02060e;
  pointer-events: auto;
}
.storm-pill {
  font: 700 9px/1 var(--font-pixel);
  letter-spacing: 0.08em;
  color: #7ea0c4;
  padding: 4px 6px;
  border: 1px solid rgba(87, 216, 255, 0.20);
  background: rgba(7, 17, 34, 0.85);
}
.storm-pill.active {
  color: #030b16;
  background: #57d8ff;
  border-color: #aef0ff;
}
.storm-pill-done.active {
  color: #03150e;
  background: #3df5a7;
  border-color: #aefce0;
}
.storm-sep {
  color: rgba(87, 216, 255, 0.55);
  font: 700 11px var(--font-mono);
}
.storm-auto-btn {
  height: 24px;
  padding: 0 9px;
  font-size: 9.5px;
}

/* ---- Responsive ---- */
@media (max-width: 1280px) {
  .page-shell {
    width: min(1140px, calc(100% - 40px));
    margin: 0 auto;
  }
  .hud-nav { display: none; }
  .event-monitor { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .repo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band-pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lab-deck-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .page-shell { width: calc(100% - 24px); }
  .signal-spine { display: none; }
  .telemetry-ribbon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evidence-grid,
  .matrix-layout,
  .repo-grid,
  .band-pillars,
  .lab-deck-grid { grid-template-columns: 1fr; }
}

/* Hide Engine Control Deck & Top HUD Tuning Buttons by default unless data-tuning-ui="visible" */
body:not([data-tuning-ui="visible"]) .dev-tuning-ui {
  display: none !important;
}

/* Smooth Cyber-Noir Portal Curtain for zero-stutter QA <-> Sound Designer page transitions */
.portal-page-curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at 50% 45%, #07162c 0%, #030712 75%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.portal-page-curtain.is-active {
  opacity: 1;
  pointer-events: all;
}

.portal-curtain-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  background: rgba(6, 18, 36, 0.94);
  border: 2px solid #57d8ff;
  box-shadow: 0 0 0 2px #02060e, 0 0 28px rgba(87, 216, 255, 0.28);
}

.portal-curtain-label {
  font: 700 11px/1.1 var(--font-pixel);
  letter-spacing: 0.14em;
  color: #dff8ff;
  text-transform: uppercase;
}

.portal-curtain-bar {
  width: 180px;
  height: 6px;
  background: rgba(8, 28, 54, 0.95);
  border: 1px solid rgba(87, 216, 255, 0.48);
  overflow: hidden;
  position: relative;
}

.portal-curtain-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #57d8ff, #ffcf70, #ff477e, #3df5a7);
  transform-origin: left center;
  transform: scaleX(0.15);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.portal-page-curtain.is-active .portal-curtain-fill {
  transform: scaleX(1);
}

/* ==========================================================================
   SINGLE-SCENE STAGE MODE (100vw x 100vh Discrete Scene Director: A + B + C)
   Only 1 scene is visible on stage at a time — zero vertical bleed!
   ========================================================================== */
html.stage-mode-root,
body.stage-mode {
  width: 100vw;
  height: 100vh;
  overflow: hidden !important;
}

body.stage-mode .page-shell {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0;
  z-index: 10;
  pointer-events: none;
}

body.stage-mode .page-shell > section[data-act] {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

body.stage-mode .page-shell > section[data-act].scene-active,
body.stage-mode .page-shell > section[data-act].scene-exiting {
  display: flex !important;
  flex-direction: column;
  justify-content: safe center;
  position: absolute;
  top: 64px;
  bottom: 58px;
  left: 50%;
  width: min(1240px, calc(100vw - 84px));
  min-height: 0 !important;
  max-height: calc(100vh - 122px);
  margin: 0 !important;
  padding: 12px 14px !important;
  transform: translate3d(-50%, 0, 0);
  opacity: 1;
  pointer-events: auto;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(87, 216, 255, 0.35) transparent;
}

/* Note: justify-content: safe center handles vertical centering natively without
   breaking sections whose :first-child is display:none or position:absolute! */

body.stage-mode .page-shell > section#dossier[data-act="2"] {
  pointer-events: none !important;
  overflow: hidden !important;
}

/* Effect B: 16-Bit Hologram Frame Shutter Enter / Exit Animations */
body.stage-mode .page-shell > section[data-act].scene-exiting {
  pointer-events: none !important;
  z-index: 11;
  animation: stage-hologram-exit 0.34s cubic-bezier(0.4, 0, 0.85, 1) forwards;
}

body.stage-mode .page-shell > section[data-act].scene-entering {
  z-index: 12;
  animation: stage-hologram-enter 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes stage-hologram-exit {
  0% {
    opacity: 1;
    transform: translate3d(-50%, 0, 0) scale(1);
    filter: brightness(1);
  }
  45% {
    opacity: 0.72;
    transform: translate3d(-50%, -6px, 0) scaleX(1.015) scaleY(0.92);
    filter: brightness(1.45) contrast(1.2);
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, -22px, 0) scaleX(0.96) scaleY(0.82);
    filter: brightness(1.8);
  }
}

@keyframes stage-hologram-enter {
  0% {
    opacity: 0;
    transform: translate3d(-50%, 24px, 0) scaleX(0.96) scaleY(0.86);
    filter: brightness(1.7) contrast(1.25);
  }
  55% {
    opacity: 1;
    transform: translate3d(-50%, -2px, 0) scaleX(1.005) scaleY(1.01);
    filter: brightness(1.18);
  }
  100% {
    opacity: 1;
    transform: translate3d(-50%, 0, 0) scale(1);
    filter: brightness(1);
  }
}

/* Keep Spectra & Finale compact inside 100vh stage */
body.stage-mode .spectra-stage-wrap {
  height: clamp(230px, 31vh, 320px);
}
body.stage-mode .act-head {
  margin-bottom: 18px;
}
body.stage-mode .finale-panel {
  padding: 20px 24px;
}
body.stage-mode .site-footer {
  margin-top: 14px;
  padding-top: 10px;
}

/* Effect A: Bayer Pixel-Dither Wave & Cyan Scanline Shutter Canvas */
.scene-switch-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 31;
  pointer-events: none;
  image-rendering: pixelated;
}

/* Effect C: Point-and-Click Adventure Stage Switcher Dock */
.stage-nav-dock {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 36;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  background: rgba(4, 11, 24, 0.94);
  border: 2px solid rgba(87, 216, 255, 0.45);
  box-shadow:
    0 0 0 2px #02060e,
    4px 4px 0 rgba(2, 6, 14, 0.95),
    0 12px 32px rgba(0, 0, 0, 0.75);
  pointer-events: auto;
}

.stage-nav-btn {
  height: 30px;
  padding: 0 12px;
  background: rgba(9, 25, 48, 0.92);
  border: 1.5px solid rgba(87, 216, 255, 0.42);
  color: #dff7ff;
  font: 700 9.5px/1 var(--font-pixel);
  letter-spacing: 0.08em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.stage-nav-btn:hover:not(:disabled) {
  background: rgba(20, 62, 110, 0.95);
  border-color: #7ef4ff;
  transform: translateY(-1px);
}
.stage-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Pulsing Adventure-Game "NEXT CLUE ->" prompt when current scene is ready */
.stage-nav-next.is-ready {
  border-color: var(--amber);
  color: #fff6dc;
  background: linear-gradient(135deg, rgba(44, 32, 10, 0.94), rgba(16, 48, 84, 0.94));
  box-shadow: 0 0 14px rgba(255, 207, 112, 0.38);
  animation: next-clue-pulse 1.5s ease-in-out infinite alternate;
}

@keyframes next-clue-pulse {
  0% { box-shadow: 0 0 8px rgba(255, 207, 112, 0.25); transform: translateY(0); }
  100% { box-shadow: 0 0 18px rgba(255, 207, 112, 0.58); transform: translateY(-1px); }
}

.stage-nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 270px;
}

.stage-dots-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stage-dot-btn {
  height: 15px;
  min-width: 22px;
  padding: 0 4px;
  background: rgba(8, 20, 40, 0.9);
  border: 1px solid rgba(87, 216, 255, 0.28);
  color: #7da3c9;
  font: 700 8px/1 var(--font-pixel);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.stage-dot-btn:hover {
  border-color: var(--cyan);
  color: #e6f7ff;
}
.stage-dot-btn.active {
  background: var(--cyan);
  border-color: #c2f6ff;
  color: #030c18;
}

.stage-scene-readout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 9.5px/1 var(--font-mono);
  letter-spacing: 0.10em;
  color: var(--cyan);
}

.stage-replay-chip {
  width: 18px;
  height: 18px;
  background: rgba(12, 34, 64, 0.9);
  border: 1px solid rgba(87, 216, 255, 0.42);
  color: var(--cyan);
  font: 700 10px/1 var(--font-mono);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.stage-replay-chip:hover {
  border-color: var(--amber);
  color: var(--amber);
  transform: rotate(-35deg);
}

@media (max-width: 820px) {
  .stage-nav-center { min-width: 170px; }
  .stage-scene-readout span { display: none; }
}

/* ==========================================================================
   SCENE 05: THE EVIDENCE BOARD (Human Expertise Meets Artificial Intelligence)
   - #robotCanvas: Real-Time 3D WebGL2 Voxel AI Robot Companion
   - #shieldArenaCanvas: Pixel-Art Cyan Bug Shield Dome & High-Five Burst
   - Central 4-Card Evidence Board + Fast AI Data Analysis + Role Synergy
   ========================================================================== */
.robot-companion-canvas {
  position: fixed;
  left: 0;
  top: 0;
  width: 325px;
  height: 325px;
  z-index: 26;
  image-rendering: pixelated;
  pointer-events: none;
  opacity: 0;
  cursor: pointer;
  will-change: transform, opacity;
  filter: drop-shadow(0 18px 26px rgba(1, 5, 14, 0.78));
}

.shield-arena-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9;
  pointer-events: none;
  image-rendering: pixelated;
}

/* Hide Developer Event Monitor on the visitor-facing stage */
.event-monitor {
  display: none !important;
}

.evidence-board-shell {
  width: min(1020px, calc(100% - 250px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 0;
}

.evidence-board-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.evidence-top-pills {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.bug-shield-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  background: rgba(8, 28, 52, 0.92);
  border: 1.5px solid rgba(87, 216, 255, 0.48);
  box-shadow: 2px 2px 0 #02060e;
  font: 700 10.5px/1 var(--font-pixel);
  letter-spacing: 0.12em;
  color: #96d4f4;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.bug-shield-badge i {
  width: 7px;
  height: 7px;
  background: #57d8ff;
  box-shadow: 0 0 8px #57d8ff;
}
.bug-shield-badge.is-active {
  border-color: #57e6ff;
  color: #e6fbff;
  background: rgba(12, 54, 92, 0.95);
  box-shadow: 0 0 20px rgba(87, 230, 255, 0.52), 2px 2px 0 #02060e;
}
.bug-shield-badge.is-active i {
  background: #3df5a7;
  box-shadow: 0 0 10px #3df5a7;
}

.evidence-main-title {
  font-size: clamp(28px, 3.3vw, 42px);
  line-height: 0.96;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-shadow: 0 4px 28px rgba(8, 24, 48, 0.95), 0 0 24px rgba(87, 216, 255, 0.22);
  margin: 0;
}

.evidence-lead-en {
  margin: 0;
  font: 600 clamp(14.5px, 1.5vw, 17.5px)/1.3 var(--font-ui);
  color: var(--cyan);
}

.evidence-intro-copy {
  margin: 2px auto 0;
  max-width: 860px;
  font: 400 13.8px/1.42 var(--font-ui);
  color: #d0e4f8;
}

/* Central 4 Evidence Cards stay hidden during 01 DUO ARRIVES & 02 HIGH FIVE so center stage is open! */
.evidence-board-center {
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateY(18px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}
.evidence-board-shell.is-revealed .evidence-board-center {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* 4 Taller, Detailed Evidence Cards (2x2 Grid Between Detective & Robot) */
.evidence-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 14px;
}

.evidence-service-card {
  padding: 12px 15px !important;
  background: linear-gradient(168deg, rgba(7, 19, 38, 0.92) 0%, rgba(4, 10, 22, 0.96) 100%);
  border: 2px solid rgba(87, 216, 255, 0.32);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;
}
.evidence-service-card:hover,
.evidence-service-card.is-active {
  border-color: #57e6ff;
  box-shadow: 0 0 24px rgba(87, 230, 255, 0.24), inset 0 1px 0 rgba(164, 232, 255, 0.25);
  transform: translateY(-1px);
}

.ev-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(87, 216, 255, 0.22);
}

.ev-card-title {
  margin: 0;
  font: 800 18.2px/1.05 var(--font-display);
  letter-spacing: 0.035em;
  color: #f4faff;
}
.evidence-service-card.is-active .ev-card-title {
  color: #ffffff;
  text-shadow: 0 0 14px rgba(87, 216, 255, 0.35);
}

.ev-card-subtitle {
  font: 600 12.5px/1.2 var(--font-ui);
  color: var(--cyan);
}

.ev-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ev-role-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 7px 10px;
  background: rgba(5, 14, 28, 0.82);
  border-left: 2.5px solid rgba(87, 216, 255, 0.38);
}
.ev-role-human {
  border-left-color: var(--amber);
}
.ev-role-ai {
  border-left-color: var(--cyan);
}

.ev-role-tag {
  font: 700 10.5px/1.1 var(--font-pixel);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ev-role-human .ev-role-tag {
  color: var(--amber);
}
.ev-role-ai .ev-role-tag {
  color: var(--cyan);
}

.ev-role-val {
  margin: 0;
  font: 400 13px/1.38 var(--font-ui);
  color: #e8f4ff;
}

.ev-card-foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px dashed rgba(87, 216, 255, 0.20);
}

.ev-card-result {
  font: 500 13px/1.35 var(--font-ui);
  color: #eaf7ff;
}
.ev-card-result b {
  font: 700 11px/1 var(--font-pixel);
  letter-spacing: 0.05em;
  color: #3df5a7;
  margin-right: 4px;
}

.ev-card-proof {
  font: 400 12.2px/1.34 var(--font-ui);
  color: #9ec0e2;
}
.ev-card-proof b {
  font-weight: 600;
  color: #c2dcf4;
}

/* Closing Synergy Message Block Below the 4 Cards */
.evidence-closing-block {
  text-align: center;
  padding: 9px 18px;
  background: linear-gradient(180deg, rgba(6, 17, 34, 0.88) 0%, rgba(4, 11, 23, 0.94) 100%);
  border-top: 1px solid rgba(87, 216, 255, 0.32);
  border-bottom: 1px solid rgba(87, 216, 255, 0.24);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ev-closing-eyebrow {
  font: 700 10.5px/1.1 var(--font-pixel);
  letter-spacing: 0.10em;
  color: var(--amber);
}

.ev-closing-headline-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ev-closing-title {
  font: 800 20px/1.08 var(--font-display);
  letter-spacing: 0.04em;
  color: #ffffff;
}

.ev-closing-sep {
  color: rgba(87, 216, 255, 0.55);
  font-weight: 700;
}

.ev-closing-lead {
  font: 600 14px/1.3 var(--font-ui);
  color: var(--cyan);
}

.ev-closing-body {
  margin: 0;
  font: 400 13.2px/1.42 var(--font-ui);
  color: #d2e6fa;
}

@media (max-width: 1180px) {
  .evidence-board-shell { width: 100%; }
  .evidence-cards-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   SCENE 06: THE QUALITY PIPELINE (Retro-Futuristic Pixel-Art Test Lab)
   - Moving Conveyor Belt + 5 Real QA Stations + Detective & AI Robot Flanking
   ========================================================================== */
.pipeline-shell {
  width: min(980px, calc(100% - 260px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.pipeline-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.pipeline-top-pills {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.pipeline-eyebrow {
  font: 700 11.5px/1.1 var(--font-pixel);
  letter-spacing: 0.12em;
  color: var(--amber);
}

.pipeline-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(7, 24, 46, 0.92);
  border: 1.5px solid rgba(87, 216, 255, 0.45);
  box-shadow: 2px 2px 0 #02060e;
  font: 700 11.5px/1.1 var(--font-pixel);
  letter-spacing: 0.08em;
  color: #bfeaff;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.pipeline-status-pill i {
  width: 7px;
  height: 7px;
  background: #57e6ff;
  box-shadow: 0 0 8px #57e6ff;
}
.pipeline-status-pill.is-verified {
  border-color: #3df5a7;
  color: #d6ffef;
  background: rgba(10, 52, 46, 0.94);
}
.pipeline-status-pill.is-verified i {
  background: #3df5a7;
  box-shadow: 0 0 10px #3df5a7;
}

.pipeline-main-title {
  font-size: clamp(30px, 3.5vw, 44px);
  line-height: 0.98;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-shadow: 0 4px 28px rgba(8, 24, 48, 0.95), 0 0 24px rgba(87, 216, 255, 0.22);
  margin: 0;
}

.pipeline-lead-en {
  margin: 0;
  font: 600 clamp(14.5px, 1.5vw, 17.5px)/1.32 var(--font-ui);
  color: var(--cyan);
}

/* Main Conveyor Lab Canvas Stage */
.pipeline-lab-frame {
  padding: 6px !important;
  background: rgba(4, 12, 26, 0.94);
  border: 2px solid rgba(87, 216, 255, 0.42);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(164, 232, 255, 0.16);
}

.pipeline-lab-canvas {
  display: block;
  width: 100%;
  height: clamp(248px, 32vh, 312px);
  image-rendering: pixelated;
}

/* 5 Interactive Station Nodes Bar */
.pipeline-station-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.pipeline-station-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  background: rgba(6, 18, 36, 0.92);
  border: 1.5px solid rgba(87, 216, 255, 0.34);
  color: #a8cbe8;
  font: 700 12px/1.15 var(--font-pixel);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.pipeline-station-btn b {
  color: var(--cyan);
}
.pipeline-station-btn:hover {
  border-color: #7ef4ff;
  color: #eef9ff;
  transform: translateY(-1px);
}
.pipeline-station-btn.is-done {
  border-color: rgba(61, 245, 167, 0.54);
  color: #c8fdec;
}
.pipeline-station-btn.is-done b {
  color: #3df5a7;
}
.pipeline-station-btn.is-active {
  background: linear-gradient(180deg, rgba(14, 48, 84, 0.96), rgba(8, 28, 52, 0.96));
  border-color: #57e6ff;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(87, 230, 255, 0.28);
}

/* Bottom Row: Single Active Station Spotlight + Discreet Real-World Case Study */
.pipeline-bottom-row {
  display: grid;
  grid-template-columns: minmax(0, 1.88fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.pipeline-spotlight-card {
  padding: 15px 18px !important;
  background: linear-gradient(168deg, rgba(7, 19, 38, 0.94) 0%, rgba(4, 10, 22, 0.97) 100%);
  border: 2px solid rgba(87, 216, 255, 0.38);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 168px;
}
.pipeline-spotlight-card.is-closing {
  border-color: rgba(61, 245, 167, 0.62);
  box-shadow: 0 0 24px rgba(61, 245, 167, 0.16);
}

.ps-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(87, 216, 255, 0.24);
}

.ps-title {
  margin: 0;
  font: 800 23px/1.08 var(--font-display);
  letter-spacing: 0.04em;
  color: #ffffff;
}
.pipeline-spotlight-card.is-closing .ps-title {
  color: #d6ffef;
}

.ps-tagline {
  font: 600 14px/1.25 var(--font-ui);
  font-style: italic;
  color: var(--cyan);
}
.pipeline-spotlight-card.is-closing .ps-tagline {
  color: #3df5a7;
}

.ps-body-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ps-desc {
  margin: 0;
  font: 400 14.2px/1.46 var(--font-ui);
  color: #e6f3ff;
}

.ps-metric-chip {
  flex: 0 0 auto;
  padding: 8px 13px;
  background: rgba(10, 46, 44, 0.92);
  border: 1.5px solid rgba(61, 245, 167, 0.55);
  text-align: center;
}
.ps-metric-chip strong {
  display: block;
  font: 800 24px/1 var(--font-display);
  color: #3df5a7;
}
.ps-metric-chip span {
  display: block;
  margin-top: 3px;
  font: 700 10.5px/1.2 var(--font-pixel);
  letter-spacing: 0.04em;
  color: #c2f8e3;
}

.ps-duties-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 8px;
  border-top: 1px dashed rgba(87, 216, 255, 0.24);
  font: 400 13px/1.38 var(--font-ui);
  color: #c6dff5;
}
.ps-duty-det b {
  font: 700 11.5px/1.1 var(--font-pixel);
  color: var(--amber);
  margin-right: 4px;
}
.ps-duty-rob b {
  font: 700 11.5px/1.1 var(--font-pixel);
  color: var(--cyan);
  margin-right: 4px;
}
.ps-ref-line {
  font: 400 12.8px/1.36 var(--font-ui);
  color: #a6c7e6;
}
.ps-ref-line b {
  color: #dbf0ff;
  font-weight: 600;
}

/* Discreet Real-World Case Study Card (LAKÓTÉR) */
.pipeline-casestudy-card {
  padding: 15px 16px !important;
  background: linear-gradient(168deg, rgba(6, 20, 38, 0.92) 0%, rgba(4, 11, 22, 0.96) 100%);
  border: 1.5px solid rgba(61, 245, 167, 0.38);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 7px;
}

.pcs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.pcs-eyebrow {
  font: 700 10.5px/1.1 var(--font-pixel);
  letter-spacing: 0.06em;
  color: #b4d4f0;
}
.pcs-tag {
  padding: 3px 8px;
  background: rgba(12, 54, 46, 0.92);
  border: 1px solid rgba(61, 245, 167, 0.55);
  font: 700 10.5px/1.1 var(--font-pixel);
  letter-spacing: 0.05em;
  color: #3df5a7;
}
.pcs-metric {
  font: 800 24px/1.08 var(--font-display);
  letter-spacing: 0.04em;
  color: #ffffff;
}
.pcs-desc {
  margin: 0;
  font: 400 13.2px/1.44 var(--font-ui);
  color: #d6e9fa;
}
.pcs-foot {
  font: 400 11.8px/1.3 var(--font-ui);
  color: #96badc;
}

@media (max-width: 1180px) {
  .pipeline-shell { width: 100%; }
  .pipeline-bottom-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   CONTENT & COPY REVISION STYLES (Scene 02 QA vs Testing, Scene 07 R&D Lab,
   Scene 08 Identity Reveal + 2 Contact Paths, CYBERBUG2077 Modal, SR-only)
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Scene 02: Crisp QA vs. Testing subblocks inside opened dossier */
.paper-subblock {
  margin-bottom: 10px;
}
.paper-subhead {
  margin: 0 0 4px;
  font: 700 11px/1.25 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7ef4ff;
}
.paper-vs-block {
  padding: 8px 10px;
  background: rgba(8, 28, 52, 0.52);
  border-left: 3px solid var(--amber);
}
.paper-vs-block .paper-subhead {
  color: #ffcf70;
}

/* Scene 07: Active R&D Lab Layout (clear of right-side 3D detective corridor!) */
.rnd-lab-section {
  justify-content: safe center;
}
.rnd-lab-shell {
  width: min(980px, calc(100vw - 360px));
  max-width: 100%;
  margin: 0;
}
.rnd-disclaimer {
  margin: 8px 0 0;
  font: 500 12.5px/1.4 var(--font-ui);
  color: #9bb8d6;
}
.rnd-lab-section .repo-grid {
  gap: 12px;
}
.rnd-lab-section .repo-card {
  min-height: 158px;
  padding: 13px 15px;
  gap: 8px;
}
.rnd-lab-section .repo-title {
  font-size: 18px;
  margin: 6px 0 5px;
}
.rnd-lab-section .repo-desc {
  font-size: 12.5px;
  line-height: 1.45;
  color: #c5dcf3;
}
.repo-tech-details {
  margin-top: 6px;
  border-top: 1px solid rgba(87, 216, 255, 0.16);
  padding-top: 6px;
}
.repo-tech-details summary {
  cursor: pointer;
  font: 700 10px/1.2 var(--font-mono);
  letter-spacing: 0.08em;
  color: #7ef4ff;
  list-style: none;
  user-select: none;
}
.repo-tech-details summary::-webkit-details-marker { display: none; }
.repo-tech-details summary::before {
  content: '▸ ';
  color: var(--amber);
}
.repo-tech-details[open] summary::before {
  content: '▾ ';
}
.repo-tech-body {
  margin: 5px 0 0;
  font: 400 11px/1.45 var(--font-mono);
  color: #93b5d6;
}

/* Scene 08: Identity Reveal + Unified Contact Card */
.identity-section {
  justify-content: safe center;
}
.identity-panel {
  width: min(1210px, 100%);
  margin: 0 auto;
  text-align: left;
}
.identity-top-grid {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.identity-top-grid .finale-portrait-wrap {
  margin: 0;
}
.identity-top-grid .finale-portrait-frame {
  width: 204px;
  height: 204px;
}
.identity-bio-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.identity-bio-col .finale-status {
  align-self: flex-start;
  margin-bottom: 4px;
}
.identity-name {
  margin: 2px 0 0;
  font-size: clamp(26px, 3vw, 38px);
}
.identity-role {
  font: 700 12px/1.2 var(--font-mono);
  letter-spacing: 0.12em;
  color: #ffcf70;
}
.identity-lead {
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.52;
  color: #d8ecff;
}
.identity-bg {
  margin: 2px 0 0;
  font-size: 12.5px;
  line-height: 1.48;
  color: #9ab9d8;
}
.identity-links-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.identity-links-row .btn-cyber {
  padding: 8px 14px;
  font-size: 10px;
  white-space: nowrap;
}

.contact-paths-grid {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(87, 216, 255, 0.22);
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.contact-path-card {
  padding: 16px 22px;
  background: rgba(6, 20, 40, 0.78);
  border: 1.5px solid rgba(87, 216, 255, 0.32);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
.contact-path-card.is-support {
  border-color: rgba(255, 207, 112, 0.38);
}
.cp-kicker {
  font: 700 9.5px/1 var(--font-mono);
  letter-spacing: 0.14em;
  color: #7ef4ff;
}
.contact-path-card.is-support .cp-kicker {
  color: #ffcf70;
}
.cp-title {
  margin: 2px 0 0;
  font: 700 19px/1.15 var(--font-display);
  letter-spacing: 0.03em;
  color: #f3f9ff;
}
.cp-body {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.46;
  color: #b7d2ed;
}
.cp-cta {
  align-self: center;
  justify-content: center;
  margin-top: 6px;
  padding: 9px 24px;
  font-size: 10.5px;
}

/* CYBERBUG2077 Minigame Modal Tagline & Rank Preview */
.arcade-tagline {
  margin: 2px 0 8px;
  font: 700 11px/1.2 var(--font-mono);
  letter-spacing: 0.12em;
  color: #ffcf70;
}
.arcade-rank-preview {
  margin-top: 8px;
  padding: 6px 10px;
  display: inline-block;
  background: rgba(8, 28, 52, 0.85);
  border: 1px solid rgba(61, 245, 167, 0.42);
  font: 700 9.5px/1.3 var(--font-mono);
  color: #7ef4ff;
}

@media (max-width: 1120px) {
  .rnd-lab-shell { width: 100%; }
  .rnd-lab-section .repo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .rnd-lab-section .repo-grid { grid-template-columns: 1fr; }
  .identity-top-grid { grid-template-columns: 1fr; text-align: center; }
  .identity-top-grid .finale-portrait-frame { margin: 0 auto; }
  .identity-links-row { justify-content: center; }
  .contact-paths-grid { grid-template-columns: 1fr; }
  .cp-cta { align-self: stretch; text-align: center; }
  .secret-glitch-bug { bottom: 68px; left: 10px; }
}

@media (max-width: 640px) {
  .hud-inner {
    padding: 8px 12px;
    gap: 8px;
  }
  .brand-eyebrow { display: none; }
  .brand-name { font-size: 13px; white-space: nowrap; }
  .brand-name span { display: none; }
  .hud-controls { gap: 6px; flex-shrink: 0; }
  .hud-controls .hud-chip {
    padding: 6px 8px;
    font-size: 9px;
    white-space: nowrap;
  }

  .hero-section,
  .act-section {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  .hero-command-card {
    padding: 16px 14px !important;
  }
  .hero-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .hero-stat-card {
    padding: 8px 6px;
    min-width: 0;
  }
  .hero-stat-num {
    font-size: 19px;
    line-height: 1.05;
  }
  .hero-stat-label {
    font-size: 10px;
    line-height: 1.25;
    word-break: break-word;
  }

  .stage-nav-dock {
    width: calc(100vw - 12px);
    max-width: calc(100vw - 12px);
    padding: 6px 8px;
    gap: 6px;
    box-sizing: border-box;
  }
  .stage-nav-btn {
    padding: 6px 8px;
    font-size: 9px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .stage-nav-center {
    min-width: 0;
    flex: 1 1 auto;
  }
  .stage-dots-row {
    gap: 3px;
    justify-content: center;
  }
  .stage-dot-btn {
    min-width: 19px;
    width: 19px;
    height: 19px;
    padding: 0;
    font-size: 8px;
  }
  .stage-scene-readout { display: none; }
}

/* ==========================================================================
   SCENE 08 HIDDEN GLITCH-BUG EASTER EGG -> LAUNCHES PLAYABLE GLITCH RACER
   Camouflaged on the bottom-right corner of .identity-panel with intermittent
   RGB-split pixel twitch; wakes up cleanly on hover!
   ========================================================================== */
.identity-panel {
  position: relative;
}

.uplink-glitch-bug {
  position: absolute;
  right: 8px;
  bottom: 7px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(126, 244, 255, 0.55);
  cursor: pointer;
  opacity: 0.28;
  transition: opacity 0.22s ease, transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
  animation: uplink-bug-stealth-glitch 5.2s steps(1, end) infinite;
}

.uplink-glitch-bug .glitch-bug-svg {
  display: block;
  image-rendering: pixelated;
  filter: saturate(0.45) drop-shadow(0 0 2px rgba(87, 216, 255, 0.25));
  transition: filter 0.22s ease, transform 0.22s ease;
}

.uplink-glitch-bug .glitch-bug-hint {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  font: 700 9px/1 var(--font-pixel);
  letter-spacing: 0.08em;
  color: #ff6aa2;
  transition: max-width 0.22s ease, opacity 0.22s ease;
  white-space: nowrap;
}

.uplink-glitch-bug:hover,
.uplink-glitch-bug:focus-visible {
  opacity: 1;
  background: rgba(10, 14, 30, 0.92);
  border-color: rgba(255, 59, 127, 0.72);
  box-shadow: -2px 0 0 rgba(87, 216, 255, 0.75), 2px 0 0 rgba(255, 59, 127, 0.75), 0 0 18px rgba(255, 59, 127, 0.35);
  outline: none;
  animation: uplink-bug-hover-jitter 0.34s steps(2, end) infinite;
}

.uplink-glitch-bug:hover .glitch-bug-svg,
.uplink-glitch-bug:focus-visible .glitch-bug-svg {
  filter: saturate(1.35) drop-shadow(-2px 0 0 rgba(87, 216, 255, 0.9)) drop-shadow(2px 0 0 rgba(255, 59, 127, 0.9));
  transform: scale(1.12);
}

.uplink-glitch-bug:hover .glitch-bug-hint,
.uplink-glitch-bug:focus-visible .glitch-bug-hint {
  max-width: 48px;
  opacity: 1;
}

@keyframes uplink-bug-stealth-glitch {
  0%, 84%, 100% {
    opacity: 0.26;
    transform: translate(0, 0);
    filter: none;
  }
  85% {
    opacity: 0.78;
    transform: translate(-2px, 0);
    filter: drop-shadow(2px 0 0 rgba(255, 59, 127, 0.85)) drop-shadow(-2px 0 0 rgba(87, 216, 255, 0.85));
  }
  87% {
    opacity: 0.40;
    transform: translate(2px, -1px);
  }
  89% {
    opacity: 0.85;
    transform: translate(-1px, 1px);
    filter: drop-shadow(-2px 0 0 rgba(255, 59, 127, 0.9)) drop-shadow(2px 0 0 rgba(87, 216, 255, 0.9));
  }
  91% {
    opacity: 0.28;
    transform: translate(0, 0);
    filter: none;
  }
}

@keyframes uplink-bug-hover-jitter {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-1px, 1px); }
  50%  { transform: translate(1px, -1px); }
  75%  { transform: translate(-1px, 0); }
  100% { transform: translate(0, 0); }
}

/* Widescreen Playable Glitch Racer Arcade Cabinet Modal */
.arcade-game-modal {
  width: min(1060px, 95vw) !important;
  max-width: 95vw !important;
  padding: 14px 16px !important;
}

.arcade-iframe-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 74vh;
  margin: 10px 0 12px;
  background: #040610;
  border: 2px solid rgba(87, 216, 255, 0.45);
  box-shadow: 0 0 28px rgba(87, 216, 255, 0.16), inset 0 0 24px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

.racer-game-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #040610;
}

/* ==========================================================================
   16:9 STAGE LOCK & CYBER-NOIR SIDE-WING FRAMING RAILS
   (Full HD 1920x1080, QHD 2560x1440, 21:9 & 32:9 Ultrawide Monitors)
   Locks central stage composition to 16:9 while filling outer side wings
   with translucent Cyber-Noir detective scope rails, radar grid & telemetry
   over the full-bleed 3D undulating code sea (never plain black bars!).
   ========================================================================== */
.hud-inner {
  max-width: 1460px;
  margin: 0 auto;
}

.stage-wing {
  display: none;
  position: fixed;
  top: 64px;
  bottom: 56px;
  width: max(0px, calc((100vw - 1480px) * 0.5));
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
}

.stage-wing-left {
  left: 0;
  background: linear-gradient(90deg, rgba(2, 6, 15, 0.72) 0%, rgba(4, 12, 26, 0.28) 82%, transparent 100%);
}

.stage-wing-right {
  right: 0;
  background: linear-gradient(270deg, rgba(2, 6, 15, 0.72) 0%, rgba(4, 12, 26, 0.28) 82%, transparent 100%);
}

/* Chunky 16-Bit Pixel-Art Dither & Stepped Arcade Tile Background */
.wing-grid-mesh {
  position: absolute;
  inset: 0;
  image-rendering: pixelated;
  background-image:
    repeating-linear-gradient(0deg, rgba(2, 6, 14, 0.42) 0px, rgba(2, 6, 14, 0.42) 2px, transparent 2px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(87, 216, 255, 0.04) 0px, rgba(87, 216, 255, 0.04) 2px, transparent 2px, transparent 16px),
    repeating-linear-gradient(0deg, rgba(87, 216, 255, 0.04) 0px, rgba(87, 216, 255, 0.04) 2px, transparent 2px, transparent 16px);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.92) 10%, rgba(0, 0, 0, 0.92) 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.92) 10%, rgba(0, 0, 0, 0.92) 90%, transparent 100%);
}

.wing-rail {
  position: absolute;
  top: 22px;
  bottom: 22px;
  width: 24px;
  pointer-events: none;
  image-rendering: pixelated;
  z-index: 2;
}

.wing-bug-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  pointer-events: auto;
  z-index: 1;
}

/* Chunky 16-Bit Double-Beveled Pixel Pillar Frame (Cyan + Dark Gap + Steel Blue Stripe) */
.stage-wing-left .wing-rail {
  right: 12px;
  border-right: 4px solid #57d8ff;
  box-shadow:
    2px 0 0 0 #02060e,
    4px 0 0 0 #235884,
    6px 0 0 0 #02060e,
    inset -2px 0 0 0 #123152;
}

.stage-wing-right .wing-rail {
  left: 12px;
  border-left: 4px solid #57d8ff;
  box-shadow:
    -2px 0 0 0 #02060e,
    -4px 0 0 0 #235884,
    -6px 0 0 0 #02060e,
    inset 2px 0 0 0 #123152;
}

/* Chunky 10x10 Gold 16-Bit Pixel Rivet Bolts at Top & Bottom Corners */
.wing-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #ffcf70;
  border: 2px solid #02060e;
  box-shadow:
    inset -2px -2px 0 #b57b14,
    inset 2px 2px 0 #fff2bd,
    0 0 0 2px #57d8ff;
  z-index: 3;
}
.wing-corner-tl { top: -4px; right: -7px; }
.wing-corner-bl { bottom: -4px; right: -7px; }
.wing-corner-tr { top: -4px; left: -7px; }
.wing-corner-br { bottom: -4px; left: -7px; }

@media (min-width: 1560px) {
  .stage-wing {
    display: block;
  }
  .signal-spine {
    left: max(18px, calc(50vw - 734px));
  }
}

/* Mobile (<= 640px): Readable HTML cards for Scene 03 CRT & clean Hero detective placement */
@media (max-width: 640px) {
  #stormViewport {
    display: none !important;
  }
  body.stage-mode .page-shell > section#dossier[data-act="2"].scene-active {
    pointer-events: auto !important;
    overflow-y: auto !important;
    justify-content: flex-start !important;
    padding-top: 22px !important;
    padding-bottom: 74px !important;
  }
  .storm-mobile-cards.sr-only {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 14px !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    background: rgba(5, 13, 28, 0.94);
    border: 1.5px solid rgba(87, 216, 255, 0.48);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.78);
    z-index: 36;
  }
  .storm-mobile-cards h2 {
    margin: 0 0 6px;
    font: 800 22px/1.1 var(--font-display);
    color: #ffffff;
  }
  .storm-mobile-cards p {
    margin: 0 0 10px;
    font: 400 12.5px/1.45 var(--font-ui);
    color: #c2dcf5;
  }
  .storm-mobile-cards ul {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .storm-mobile-cards li {
    padding: 9px 10px;
    background: rgba(8, 24, 46, 0.88);
    border-left: 3px solid #57d8ff;
    font: 400 12px/1.4 var(--font-ui);
    color: #dceeff;
  }
  .storm-mobile-cards li strong {
    display: block;
    margin-bottom: 3px;
    font: 700 10.5px/1.2 var(--font-mono);
    color: #7ef4ff;
  }
  /* Note: On mobile (<=900px), #detectiveCanvas visibility is controlled by body.is-mobile-stage & .mobile-intro-greeting */
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   4x4 BAYER-DITHERED PIXEL AURA & MOLTEN CHROME WAVE FX
   (Adapted from F:\UI_UX\google-studio-glow-demo\index.html)
   ========================================================================== */
.pixel-aura-overlay {
  position: fixed;
  left: 0;
  top: 0;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 16;
  opacity: 0;
  will-change: transform;
  transition: opacity 0.18s ease;
}

.pixel-molten-overlay {
  position: fixed;
  left: 0;
  top: 0;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 18;
  opacity: 0;
  mix-blend-mode: screen;
  will-change: transform;
  transition: opacity 0.15s ease;
}

/* ==========================================================================
   TOP HEADER CENTERPIECE: RETRO BOOMBOX FLEEING FROM PAC-MAN PORTAL BUTTON
   Distinct capsule-shaped variant of the molten/iridescent neon glow effect
   linking between the QA Portfolio and the Sound Designer Portfolio!
   ========================================================================== */
@property --portal-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes portalRunColors {
  0%   { --portal-angle: 0deg; }
  100% { --portal-angle: 360deg; }
}

.boombox-portal-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 18px 0 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(12, 24, 46, 0.94) 0%, rgba(6, 13, 27, 0.97) 100%);
  color: #f4faff;
  text-decoration: none;
  isolation: isolate;
  cursor: pointer;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease;
  --portal-conic: conic-gradient(
    from var(--portal-angle, 0deg) at 50% 50%,
    #ffcf70 0deg,
    #ff477e 42deg,
    rgba(87, 216, 255, 0.16) 95deg,
    rgba(87, 216, 255, 0.12) 155deg,
    #57d8ff 200deg,
    #3b82f6 245deg,
    #3df5a7 295deg,
    rgba(255, 207, 112, 0.22) 332deg,
    #ffcf70 360deg
  );
}

.boombox-portal-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.boombox-portal-btn .portal-glow-outer {
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  background: var(--portal-conic);
  filter: blur(13px);
  opacity: 0.78;
  z-index: -2;
  pointer-events: none;
  animation: portalRunColors 5.2s linear infinite;
}

.boombox-portal-btn:hover .portal-glow-outer {
  filter: blur(17px);
  opacity: 0.98;
}

.boombox-portal-btn .portal-border-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  padding: 1.75px;
  background: var(--portal-conic);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 4;
  animation: portalRunColors 5.2s linear infinite;
}

.portal-wave-canvas {
  position: absolute;
  inset: 1px;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  border-radius: 999px;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
}

.boombox-chase-stage {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(3, 8, 18, 0.82);
  border: 1px solid rgba(87, 216, 255, 0.32);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.75);
}

.boombox-chase-canvas {
  width: 148px;
  height: 38px;
  display: block;
  image-rendering: pixelated;
}

.portal-btn-copy {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  gap: 2px;
}

.portal-btn-kicker {
  font: 700 8.5px/1 var(--font-mono);
  letter-spacing: 0.16em;
  color: #ffcf70;
  text-transform: uppercase;
}

.portal-btn-title {
  font: 700 12px/1.1 var(--font-pixel);
  letter-spacing: 0.06em;
  color: #ffffff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75);
  white-space: nowrap;
}

.boombox-portal-btn:hover .portal-btn-title {
  color: #7ef4ff;
}

@media (max-width: 760px) {
  .boombox-portal-btn {
    height: 34px;
    padding: 0 9px 0 5px;
    gap: 5px;
    max-width: calc(100vw - 110px);
    min-width: 0;
    flex: 0 1 auto;
  }
  .boombox-chase-stage {
    padding: 1px 4px;
    flex-shrink: 0;
  }
  .boombox-chase-canvas {
    width: 68px;
    height: 17px;
  }
  .portal-btn-copy {
    min-width: 0;
    overflow: hidden;
  }
  .portal-btn-kicker {
    display: none;
  }
  .portal-btn-title {
    font-size: 8.5px;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ==========================================================================
   MOBILE CONTENT-FIRST EDITION (<= 900px)
   - Scene 01 (Intro): 3D Detective appears centered first, delivers his 3-beat
     greeting bubble, then vanishes and the Hero Command Card fades in cleanly.
   - Scenes 02..08: All 3D figures, roaming bug canvases, and 3D conveyor belt
     are hidden; pure, touch-friendly content scrolls vertically inside each
     scene while scene-switch transitions run between scenes!
   ========================================================================== */
.pipeline-mobile-all-stations {
  display: none;
}

@media (max-width: 900px) {
  /* 1. Compact Mobile Top Header */
  .hud-inner {
    padding: 7px 8px !important;
    gap: 5px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .brand-meta {
    display: none !important;
  }
  .brand-mark {
    width: 28px !important;
    height: 28px !important;
    font-size: 10px !important;
    flex-shrink: 0;
  }
  .hud-controls {
    flex-shrink: 0;
  }
  .hud-controls .hud-chip {
    padding: 5px 6px !important;
    font-size: 8.5px !important;
  }

  /* 2. Hide non-intro 3D & canvas layers on mobile */
  #sceneCanvas,
  #bugsCanvas,
  #shieldArenaCanvas,
  #robotCanvas,
  #stormViewport,
  .stage-wing,
  .signal-spine,
  .dm-roam-canvas,
  .paper-detective-spacer,
  .paper-replay-btn,
  #heroReplayBtn {
    display: none !important;
  }

  /* Hide 3D Detective on mobile except during Scene 01 mobile-intro-greeting */
  body.is-mobile-stage.mobile-intro-greeting #detectiveCanvas {
    pointer-events: auto !important;
  }
  body.is-mobile-stage:not(.mobile-intro-greeting) #detectiveCanvas,
  body.is-mobile-stage:not(.mobile-intro-greeting) #atmosCanvas {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Scene 01 Mobile Intro Greeting: hide Hero card while Detective greets in the center */
  body.is-mobile-stage.mobile-intro-greeting #hero .hero-command-card {
    opacity: 0 !important;
    transform: translateY(16px) scale(0.98) !important;
    pointer-events: none !important;
  }
  body.is-mobile-stage:not(.mobile-intro-greeting) #hero .hero-command-card {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    transition: opacity 0.42s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* 3. Scrollable Single-Scene Container on Mobile (Top-aligned so tall scenes never clip at top) */
  body.stage-mode .page-shell > section[data-act].scene-active,
  body.stage-mode .page-shell > section[data-act].scene-exiting {
    top: 54px !important;
    bottom: 54px !important;
    width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 108px) !important;
    padding: 12px 6px 28px !important;
    justify-content: flex-start !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Scene 01 Hero centers nicely on mobile once greeting finishes */
  body.stage-mode .page-shell > section#hero[data-act="0"].scene-active {
    justify-content: safe center !important;
  }
  .hero-grid {
    grid-template-columns: 1fr !important;
  }
  .hero-command-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 18px 16px !important;
  }
  .hero-main-headline {
    font-size: clamp(28px, 7.5vw, 40px) !important;
  }

  /* 4. Scene 02 (What is QA? — The Paper Trail): Always open, 1-column scrollable dossier */
  .paper-stage-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }
  .paper-doc-slot {
    width: 100% !important;
  }
  #paperDocCard {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    padding: 16px 14px !important;
    transform: none !important;
    opacity: 1 !important;
  }
  #paperDocCard .paper-closed-face,
  #paperDocCard .px-folder-tab {
    display: none !important;
  }
  #paperDocCard .paper-open-face {
    display: block !important;
    opacity: 1 !important;
  }
  .paper-spread-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  .paper-page-right {
    border-left: 0 !important;
    border-top: 1px dashed rgba(87, 216, 255, 0.28) !important;
    padding-left: 0 !important;
    padding-top: 14px !important;
  }
  .paper-stamps-row {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  /* 5. Scene 03 (Why QA Matters?): Crisp Mobile Cyber-Noir Cards instead of tiny 386 CRT canvas */
  body.stage-mode .page-shell > section#dossier[data-act="2"].scene-active {
    pointer-events: auto !important;
    overflow-y: auto !important;
  }
  #stormSrSummary.sr-only {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 16px 14px !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    background: linear-gradient(168deg, rgba(7, 19, 38, 0.94) 0%, rgba(4, 10, 22, 0.97) 100%);
    border: 2px solid rgba(87, 216, 255, 0.45);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.78);
    display: flex !important;
    flex-direction: column;
    gap: 12px;
  }
  .storm-mob-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(87, 216, 255, 0.28);
    font: 700 10px/1.2 var(--font-mono);
  }
  .storm-mob-status { color: #3df5a7; }
  .storm-mob-badge { color: #ffcf70; white-space: nowrap; }
  .storm-mob-title {
    margin: 0;
    font: 800 26px/1.05 var(--font-display);
    color: #ffffff;
  }
  .storm-mob-lead {
    margin: 0;
    font: 400 13.5px/1.48 var(--font-ui);
    color: #d6eafa;
  }
  .storm-mob-pillars {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .storm-mob-pillar {
    padding: 12px 13px;
    background: rgba(8, 24, 46, 0.92);
    border: 1px solid rgba(87, 216, 255, 0.28);
    border-left: 4px solid #57d8ff;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .storm-mob-code {
    font: 700 10.5px/1.1 var(--font-mono);
    letter-spacing: 0.06em;
  }
  .storm-mob-ptitle {
    margin: 0;
    font: 700 17px/1.15 var(--font-display);
    color: #ffffff;
  }
  .storm-mob-pbody {
    margin: 0;
    font: 400 13px/1.45 var(--font-ui);
    color: #cde3f8;
  }
  .storm-mob-footer {
    padding: 10px 12px;
    background: rgba(10, 38, 62, 0.92);
    border: 1px solid rgba(61, 245, 167, 0.48);
    border-left: 4px solid #3df5a7;
    font: 600 12.5px/1.4 var(--font-ui);
    color: #e2fbf2;
  }

  /* 6. Scene 04 (Where is QA Useful? — 5 Monitors): 1-column bright cards */
  .domains-infestation-stage {
    width: 100% !important;
    max-width: 100% !important;
  }
  .domains-row-top,
  .domains-row-bottom {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
  }
  .domain-monitor {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    animation: none !important;
    min-height: 0 !important;
    padding: 14px 15px !important;
  }

  /* 7. Scene 05 (What Can I Do For You? — 4 Cards): Immediately revealed, 1-column stack */
  .evidence-board-shell {
    width: 100% !important;
  }
  .evidence-board-center {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }
  .evidence-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .ev-role-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  /* 8. Scene 06 (How I Work — Quality Pipeline): Hide 3D conveyor belt, stack all 5 stations + Case Study */
  .pipeline-shell {
    width: 100% !important;
  }
  .pipeline-lab-frame,
  .pipeline-station-bar,
  #pipelineSpotlightCard,
  #pipelineStatusPill {
    display: none !important;
  }
  .pipeline-bottom-row {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .pipeline-mobile-all-stations {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
  }
  .pipeline-mob-station-card {
    min-height: 0 !important;
  }
  .ps-body-row {
    flex-direction: column;
    align-items: flex-start !important;
  }

  /* 9. Scene 07 (R&D Lab) & Scene 08 (Contact): 1-column clean scrollable cards */
  .rnd-lab-shell {
    width: 100% !important;
  }
  .rnd-lab-section .repo-grid {
    grid-template-columns: 1fr !important;
  }
  .identity-panel {
    width: 100% !important;
    padding: 16px 14px !important;
  }
  .identity-top-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    text-align: center;
  }
  .identity-top-grid .finale-portrait-frame {
    width: 148px !important;
    height: 148px !important;
    margin: 0 auto !important;
  }
  #finalePhotoImg {
    opacity: 1 !important;
  }
  .identity-bio-col .finale-status {
    align-self: center !important;
  }
  .identity-links-row {
    justify-content: center !important;
  }
  .identity-links-row .btn-cyber {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
    text-align: center;
  }
}
