:root {
  --bg: #07080a;
  --hud-text: rgba(255, 255, 255, 0.62);
  --hud-border: rgba(255, 255, 255, 0.16);
  --font-mono: "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Monaco, Consolas, monospace;
  --card-w: 1744px;
  --card-h: 981px;
  --paper-ivory: rgb(226, 212, 187);
  --active-ink-hex: #ff6200;
  --active-ink-safe: #ff7a29;
  --active-ink-glow: rgba(255, 98, 0, 0.35);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
:focus-visible {
  outline: 2px solid #ffffff !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px var(--active-ink-safe, #ff6200), 0 0 18px var(--active-ink-hex, #ff6200) !important;
  z-index: 99 !important;
}
body {
  background-color: var(--bg);
  color: #fff;
  font-family: var(--font-mono);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.viewport-bg {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: 1;
  contain: strict;
  transform: translateZ(0);
}
.viewport-glow {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 48%, var(--glow-color, rgba(255, 98, 0, 0.22)) 0%, rgba(28, 34, 46, 0.12) 44%, rgba(7, 8, 10, 0.96) 74%);
  pointer-events: none;
  z-index: 2;
  contain: strict;
  transform: translateZ(0);
}
header.hud-top {
  position: relative;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hud-text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #080a0e;
  contain: layout paint style;
  transform: translateZ(0);
  gap: 8px;
}
.hud-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.badge-indicator {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--active-ink-safe);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--active-ink-hex);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.hud-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}
.hud-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hud-border);
  color: rgba(255, 255, 255, 0.85);
  padding: 5px 10px;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.12em;
  cursor: pointer;
  border-radius: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.hud-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.hud-btn.active {
  background: rgba(255, 255, 255, 0.22);
  border-color: #fff;
  color: #fff;
}
.hud-btn-cta {
  background: rgba(230, 0, 38, 0.18);
  border: 1px solid var(--active-ink-safe);
  color: #ffffff;
  font-weight: 700;
  padding: 5px 12px;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.08);
}
.hud-btn-cta:hover {
  background: var(--active-ink-safe);
  border-color: #ffffff;
  color: #050608;
}
.hud-telemetry {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hud-telemetry-accent {
  color: #fff;
  border-left: 2px solid var(--active-ink-safe);
  padding-left: 8px;
  white-space: nowrap;
  transition: border-color 0.25s ease;
}
.scene-viewport {
  position: relative;
  flex: 1;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  cursor: grab;
  touch-action: none;
}
.scene-viewport:active {
  cursor: grabbing;
}
.scene-viewport.card-hover {
  cursor: pointer;
}
.stage-perspective {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
  perspective-origin: 50% 50%;
  -webkit-perspective-origin: 50% 50%;
  transform-style: flat;
  -webkit-transform-style: flat;
}
#onboarding-toast {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(8, 10, 14, 0.92);
  border: 1px solid var(--active-ink-safe);
  padding: 10px 20px;
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.2em;
  border-radius: 4px;
  z-index: 40;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.85);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
#onboarding-toast.hidden {
  opacity: 0;
  transform: translate(-50%, -40%);
}
@media (min-width: 769px) {
  .stage-perspective {
    perspective: 2950px;
    -webkit-perspective: 2950px;
  }
  .mobile-only { display: none !important; }
}
@media (max-width: 768px) {
  .stage-perspective {
    perspective: 1200px;
    -webkit-perspective: 1200px;
  }
  .desktop-only { display: none !important; }
  header.hud-top { padding: 0 10px; }
  .hud-telemetry { display: none; }
  .hud-brand span#hud-title-brand {
    display: inline-block;
    max-width: 85px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: clip;
  }
  .terminal-container {
    width: calc(100vw - 20px);
    left: 10px;
    bottom: 10px;
    height: 250px;
    transform: translateY(calc(100% + 20px));
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
    pointer-events: none;
  }
  .terminal-container.mobile-open {
    transform: translateY(0);
    pointer-events: auto;
  }
}
.wheel-indicator {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 36px;
  z-index: 25;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wheel-flipper {
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 18px solid var(--active-ink-safe);
  transform-origin: 100% 50%;
  transform: rotate(0deg);
  transition: transform 0.08s ease-out, border-right-color 0.25s ease;
}
.wheel-flipper.deflect {
  transform: rotate(26deg);
}
.carousel-stage {
  position: relative;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  pointer-events: none;
}
.cylinder-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  pointer-events: none;
}
.desktop-ring .card-facet {
  position: absolute;
  top: calc(var(--card-h) / -2);
  height: var(--card-h);
  background-repeat: no-repeat;
  background-size: var(--card-w) var(--card-h);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  image-rendering: -webkit-optimize-contrast;
  pointer-events: auto;
  cursor: pointer;
  background-color: var(--paper-ivory);
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  opacity: 1;
  transition: opacity 0.18s ease, border-color 0.18s ease;
}

/* --- HARDWARE-ACCELERATED FALLBACK OVERLAYS --- */
.desktop-ring .card-facet.unbaked::before,
.mobile-facet.unbaked::before,
.refl-facet.unbaked::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--paper-ivory);
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}

.desktop-ring .card-facet.backface-culled,
.refl-facet.backface-culled {
  visibility: hidden;
  pointer-events: none;
}
.desktop-ring .card-facet.edge-left {
  border-left: 1.5px solid rgba(0, 0, 0, 0.78);
}
.desktop-ring .card-facet.edge-right {
  border-right: 1.5px solid rgba(0, 0, 0, 0.78);
}
.carousel-stage.has-hovered .card-facet:not(.is-hovered) {
  opacity: 0.32;
}
.carousel-stage.has-hovered .refl-facet:not(.is-hovered) {
  opacity: 0.12;
}
.card-facet.is-hovered {
  opacity: 1 !important;
  z-index: 15;
  border-top-color: var(--hover-card-color, #ff6200);
  border-bottom-color: var(--hover-card-color, #ff6200);
}
.card-facet.edge-left.is-hovered {
  border-left: 2px solid var(--hover-card-color, #ff6200) !important;
  box-shadow: -8px 0 20px var(--hover-card-glow, rgba(255, 98, 0, 0.4));
}
.card-facet.edge-right.is-hovered {
  border-right: 2px solid var(--hover-card-color, #ff6200) !important;
  box-shadow: 8px 0 20px var(--hover-card-glow, rgba(255, 98, 0, 0.4));
}
.mobile-facet {
  position: absolute;
  left: calc(var(--m-w) / -2);
  top: calc(var(--m-h) / -2);
  width: var(--m-w);
  height: var(--m-h);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-color: var(--paper-ivory);
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.85);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  image-rendering: -webkit-optimize-contrast;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.3);
}
.mobile-facet.active-center {
  border: 2px solid var(--card-color);
  box-shadow: 0 0 24px var(--card-glow);
}
.refl-facet {
  position: absolute;
  top: calc(var(--card-h) / -2);
  height: var(--card-h);
  background-repeat: no-repeat;
  background-size: var(--card-w) var(--card-h);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  pointer-events: none;
  opacity: 0.38;
  transition: opacity 0.18s ease;
}
.refl-facet.unbaked {
  background-color: var(--paper-ivory);
  opacity: 0.22;
}
.floor-mirror-mask {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18%;
  background: linear-gradient(to bottom, transparent 0%, rgba(7, 8, 10, 0.72) 52%, #07080a 100%);
  pointer-events: none;
  z-index: 6;
  contain: strict;
  transform: translateZ(0);
}
.enclosure-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
  transform: translateZ(0);
}
#svg-enclosure-back { z-index: 3; }
#svg-enclosure-front { z-index: 7; }
.cylinder-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 8, 10, 0.86) 0%, rgba(7, 8, 10, 0.22) 14%, rgba(7, 8, 10, 0.0) 30%, rgba(7, 8, 10, 0.0) 70%, rgba(7, 8, 10, 0.22) 86%, rgba(7, 8, 10, 0.86) 100%);
  pointer-events: none;
  z-index: 8;
  contain: strict;
  transform: translateZ(0);
}
.mobile-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 8, 10, 0.94) 0%, rgba(7, 8, 10, 0.15) 22%, transparent 35%, transparent 65%, rgba(7, 8, 10, 0.15) 78%, rgba(7, 8, 10, 0.94) 100%);
  pointer-events: none;
  z-index: 8;
  contain: strict;
}
.inspection-sheen {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 85% at 50% 48%, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9;
  contain: strict;
  transform: translateZ(0);
}
.center-axis-reticle {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  opacity: 0.75;
}
.reticle-notch {
  width: 9px;
  height: 9px;
  border-left: 1.5px solid var(--active-ink-safe);
  border-top: 1.5px solid var(--active-ink-safe);
  transform: rotate(45deg);
  transition: border-color 0.25s ease;
}
.reticle-notch.bottom { transform: rotate(225deg); }
.terminal-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 370px;
  height: 290px;
  background: rgba(6, 8, 12, 0.92);
  border: 1px solid var(--active-ink-safe);
  border-radius: 4px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  font-size: 11px;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.65);
}
.terminal-quick-chips {
  display: flex;
  gap: 4px;
}
.terminal-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: inherit;
  font-size: 8px;
  padding: 2px 5px;
  border-radius: 2px;
  cursor: pointer;
  text-transform: uppercase;
}
.terminal-chip:hover {
  background: var(--active-ink-safe);
  border-color: var(--active-ink-safe);
  color: #050608;
  font-weight: 700;
}
.terminal-output {
  flex: 1;
  padding: 12px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
  user-select: text;
  -webkit-user-select: text;
}
.terminal-output p {
  margin: 0;
  line-height: 1.5;
}
.terminal-output .user-cmd {
  color: var(--active-ink-safe);
  font-weight: 600;
}
.terminal-input-line {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.65);
}
.terminal-prompt {
  color: var(--active-ink-safe);
  margin-right: 8px;
  white-space: nowrap;
  font-weight: 700;
}
#terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: inherit;
  outline: none;
  caret-color: var(--active-ink-safe);
}
#terminal-input:disabled {
  opacity: 0.5;
}
#hover-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 30;
  background: rgba(13, 16, 23, 0.96);
  border: 1px solid var(--active-ink-safe);
  padding: 6px 12px;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #fff;
  border-radius: 2px;
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.1s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.75);
}
#hover-tooltip strong { color: #fff; }
#hover-tooltip span { color: var(--active-ink-safe); margin-left: 6px; font-weight: 700; }
.toc-drawer {
  position: fixed;
  top: 52px;
  right: 16px;
  width: min(410px, calc(100vw - 32px));
  max-height: 82vh;
  background: rgba(10, 13, 18, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 3px;
  z-index: 50;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  display: none;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}
.toc-drawer.open { display: flex; }
.toc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--hud-text);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.toc-search {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 8px 10px;
  border-radius: 2px;
  outline: none;
  text-transform: uppercase;
}
.toc-search:focus {
  border-color: var(--active-ink-safe);
  background: rgba(255, 255, 255, 0.09);
}
.toc-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.toc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 2px;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.12em;
}
.toc-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}
.toc-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
}
.toc-locate-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  font-size: 8px;
  padding: 3px 6px;
  border-radius: 2px;
  cursor: pointer;
}
.toc-locate-btn:hover {
  background: var(--active-ink-safe);
  border-color: var(--active-ink-safe);
  color: #000;
  font-weight: 700;
}
.shutter-door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50vw;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.015) 25%, transparent 25%),
    linear-gradient(225deg, rgba(255, 255, 255, 0.015) 25%, transparent 25%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.015) 25%, transparent 25%),
    linear-gradient(315deg, rgba(255, 255, 255, 0.015) 25%, #080a0e 25%);
  background-position: 12px 0, 12px 0, 0 0, 0 0;
  background-size: 24px 24px;
  background-color: #080a0e;
  z-index: 101;
  pointer-events: none;
  transition: transform 0.42s cubic-bezier(0.77, 0, 0.175, 1);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.95);
}
.shutter-door::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 12px var(--active-ink-hex);
}
.shutter-left { left: 0; transform: translateX(0); }
.shutter-left::after { right: 0; }
.shutter-right { right: 0; transform: translateX(0); }
.shutter-right::after { left: 0; }
.modal-overlay.doors-open .shutter-left { transform: translateX(-101%); }
.modal-overlay.doors-open .shutter-right { transform: translateX(101%); }
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 7, 0.94);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  perspective: 2000px;
  -webkit-perspective: 2000px;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-frame {
  position: relative;
  z-index: 102;
  width: min(96vw, 1744px);
  height: 94vh;
  background: #0b0d11;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  box-shadow: 0 35px 120px rgba(0, 0, 0, 0.98);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.85) translateZ(-250px);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.06s, opacity 0.35s ease 0.06s;
}
.modal-overlay.doors-open .modal-frame { transform: scale(1) translateZ(0); opacity: 1; }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: #0e1117;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  letter-spacing: 0.15em;
  gap: 12px;
  flex-wrap: wrap;
}
.modal-title-group { display: flex; align-items: center; gap: 10px; }
.modal-accent-bar { width: 4px; height: 18px; background: var(--active-ink-safe); border-radius: 1px; }
.modal-title { color: #fff; font-weight: 700; font-size: 13px; }
.modal-tag { color: #fff; font-size: 10px; border: 1px solid rgba(255, 255, 255, 0.35); padding: 3px 8px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); }
.modal-mode-switch { display: inline-flex; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 2px; overflow: hidden; }
.mode-tab { background: transparent; border: none; color: rgba(255, 255, 255, 0.7); padding: 6px 12px; font-family: inherit; font-size: 10px; letter-spacing: 0.12em; cursor: pointer; text-transform: uppercase; }
.mode-tab.active { background: var(--active-ink-safe); color: #050608; font-weight: 700; }
.modal-actions { display: flex; align-items: center; gap: 6px; }
.modal-btn { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.24); color: rgba(255, 255, 255, 0.9); padding: 6px 10px; font-family: inherit; font-size: 10px; letter-spacing: 0.12em; cursor: pointer; text-decoration: none; border-radius: 2px; display: inline-flex; align-items: center; gap: 4px; text-transform: uppercase; }
.modal-btn:hover { background: rgba(255, 255, 255, 0.16); border-color: #fff; color: #fff; }
.modal-btn.close-btn { background: rgba(255, 50, 75, 0.18); border-color: rgba(255, 80, 100, 0.55); color: #ff8598; }
.modal-body {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  background: #060709;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12px;
}
.modal-specimen-wrap {
  position: relative;
  display: none;
  max-width: 100%;
  max-height: 100%;
  background-color: var(--paper-ivory);
  border-radius: 3px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.modal-specimen-wrap.active { display: inline-flex; }
.modal-specimen-wrap img {
  max-width: 100%;
  max-height: 84vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  mix-blend-mode: multiply;
  filter: contrast(1.14) brightness(0.97);
}
.modal-iframe-wrap { position: absolute; inset: 0; width: 100%; height: 100%; display: none; flex-direction: column; background: #050608; }
.modal-iframe-wrap.active { display: flex; }
.modal-iframe { width: 100%; height: 100%; border: none; background: #050608; }
.iframe-loader { position: absolute; inset: 0; background: rgba(6, 7, 9, 0.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-size: 11px; letter-spacing: 0.18em; color: #fff; z-index: 5; opacity: 0; pointer-events: none; transition: opacity 0.18s ease; }
.iframe-loader.loading { opacity: 1; }
.loader-bar { width: 180px; height: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; position: relative; }
.loader-bar::after { content: ""; position: absolute; inset: 0; width: 45%; background: var(--active-ink-safe); animation: loaderSweep 0.9s infinite ease-in-out; }
@keyframes loaderSweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(220%); } }
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  font-size: 10px;
  color: var(--hud-text);
  background: #0b0d11;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .shutter-door {
    display: none !important;
  }
  .modal-frame,
  .modal-overlay.doors-open .modal-frame {
    transform: none !important;
    opacity: 1 !important;
  }
}