@font-face {
  font-family: "VCR OSD Mono";
  src: url("fonts/VCR_OSD_MONO.ttf") format("truetype");
  font-display: swap;
}

:root {
  --foreground: #ffffff;
  --muted: rgba(255, 255, 255, .66);
  --primary: #83c3ff;
  --accent: #c1ff21;
  --surface: rgba(18, 20, 21, .82);
  --border: rgba(255, 255, 255, .14);
  --motion-fast: 160ms;
  --motion-ui: 280ms;
  --ease-lab: cubic-bezier(.22, .78, .18, 1);
  --ease-hover: cubic-bezier(.2, .72, .2, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --lab-modal-width: min(94vw, 167.111dvh);
  --lab-modal-height: min(94dvh, 52.875vw);
  --lab-modal-radius: clamp(16px, 1.35vw, 24px);
  --lab-stage-width: min(100vw, 177.778dvh);
  --lab-stage-height: min(100dvh, 56.25vw);
  /* Stage-relative UI tokens keep controls proportional through letterboxing. */
  --lab-hotspot-size: min(4.3vw, 7.64445dvh);
  --lab-dock-width: min(8.6vw, 15.2889dvh);
  --lab-dock-mascot-height: min(7.4vw, 13.1556dvh);
  --lab-stage-control-size: min(3.25vw, 5.77778dvh);
  --lab-inventory-size: min(5.2vw, 9.24445dvh);
  --lab-control-gap: min(.65vw, 1.15556dvh);
  --lab-small-label-size: min(.92vw, 1.63556dvh);
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; }
body { margin: 0; overflow: hidden; color: var(--foreground); background: #18120e; font-family: var(--font-sans); font-size: 16px; }
button {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  cursor: pointer;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.site, .terminal-intro, .lab-hub, .experience-overlay { min-height: 100dvh; width: 100%; }
.terminal-intro, .lab-hub {
  position: fixed;
  inset: 0;
  display: grid;
  overflow: hidden;
  place-items: center;
  background: #070b09;
}
.terminal-intro { z-index: 20; }
.lab-hub { z-index: 10; }
.terminal-stage, .lab-stage { position: relative; width: min(100vw, 177.778dvh); aspect-ratio: 16 / 9; overflow: hidden; }
.terminal-image, .lobby-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.terminal-image {
  z-index: 3;
  filter: brightness(.82) contrast(.86) saturate(.9);
  pointer-events: none;
}
.lab-entry-transition {
  position: absolute;
  z-index: 12;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.terminal-stage.is-transitioning .lab-entry-transition { opacity: 1; }
.terminal-stage.is-transitioning .terminal-image,
.terminal-stage.is-transitioning .crt-screen,
.terminal-stage.is-transitioning .stage-controls {
  opacity: 0;
  transition: opacity 180ms ease;
}
.terminal-intro.is-transition-complete {
  opacity: 0;
  transition: opacity 240ms ease;
}
.lobby-image { z-index: 0; }
.stage-controls, .overlay-controls {
  z-index: 220;
  display: flex;
  gap: clamp(3px, var(--lab-control-gap), 10px);
}
.stage-controls {
  position: absolute;
  bottom: clamp(10px, 1.6%, 22px);
  left: clamp(10px, 1.6%, 22px);
}
.asset-button {
  display: grid;
  width: clamp(44px, 4.25vw, 64px);
  min-width: 44px;
  height: clamp(44px, 4.25vw, 64px);
  min-height: 44px;
  place-items: center;
  border-radius: 18px;
  transition:
    filter var(--motion-fast) var(--ease-hover),
    transform var(--motion-fast) var(--ease-hover);
}
.asset-button img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.asset-button:hover { filter: brightness(1.12) drop-shadow(0 0 12px rgba(131, 195, 255, .34)); transform: scale(1.04); }
.asset-button:active { transform: scale(.97); }
.asset-button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.stage-controls .asset-button {
  width: clamp(28px, var(--lab-stage-control-size), 52px);
  min-width: 0;
  height: clamp(28px, var(--lab-stage-control-size), 52px);
  min-height: 0;
}
.music-toggle {
  position: relative;
}
.music-toggle::after {
  position: absolute;
  right: 4px;
  bottom: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(132, 148, 143, .62);
  box-shadow: 0 0 0 2px rgba(4, 9, 8, .72);
  content: "";
  pointer-events: none;
  transition: background var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}
.music-toggle[aria-pressed="true"] {
  filter:
    brightness(1.12)
    drop-shadow(0 0 11px rgba(193, 255, 33, .34));
}
.music-toggle[aria-pressed="true"]::after {
  background: var(--accent);
  box-shadow:
    0 0 0 2px rgba(4, 9, 8, .72),
    0 0 9px rgba(193, 255, 33, .8);
}
.music-toggle.is-loading {
  animation: sound-button-loading 900ms ease-in-out infinite alternate;
}
@keyframes sound-button-loading {
  to { filter: brightness(1.18) drop-shadow(0 0 12px rgba(80, 216, 255, .46)); }
}

.crt-screen {
  position: absolute;
  z-index: 1;
  top: 15.95%; left: 15.19%; width: 63.12%; height: 70.51%;
  overflow: hidden;
  isolation: isolate;
  color: var(--screen);
  background:
    radial-gradient(ellipse at 50% 46%, rgba(29, 78, 41, .88), rgba(1, 10, 5, .98) 78%),
    #020b05;
  border-radius: 7% / 10%;
  box-shadow:
    inset 0 0 74px rgba(0, 0, 0, .94),
    inset 0 0 18px rgba(166, 255, 117, .12),
    0 0 24px rgba(162, 255, 104, .15);
}
.crt-screen::before,
.crt-screen::after,
.crt-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
}
.crt-screen::before {
  z-index: 30;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, .24) 0 1px,
      rgba(115, 255, 139, .035) 1px 2px,
      transparent 2px 5px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 60, 45, .028) 0 1px,
      rgba(70, 255, 130, .02) 1px 2px,
      rgba(50, 135, 255, .032) 2px 3px
    );
  background-size: 100% 5px, 3px 100%;
  mix-blend-mode: hard-light;
  opacity: .82;
  animation: crt-scanline-drift 180ms steps(2, jump-none) infinite;
}
.crt-screen::after {
  z-index: 32;
  background:
    linear-gradient(
      180deg,
      transparent 0 45%,
      rgba(203, 255, 180, .09) 49%,
      rgba(103, 255, 142, .035) 51%,
      transparent 56% 100%
    ),
    radial-gradient(
      ellipse at center,
      transparent 40%,
      rgba(1, 8, 4, .22) 70%,
      rgba(0, 3, 1, .68) 100%
    );
  background-size: 100% 210%, 100% 100%;
  background-position: 0 -105%, 0 0;
  box-shadow:
    inset 0 0 22px rgba(173, 255, 133, .09),
    inset 0 0 80px rgba(0, 0, 0, .72);
  opacity: .9;
  animation:
    crt-beam-roll 3.8s linear infinite,
    crt-phosphor-flicker 5.6s steps(1, jump-none) infinite;
}
.crt-noise {
  z-index: 31;
  background:
    linear-gradient(110deg, transparent 15%, rgba(205, 255, 158, .08) 47%, transparent 75%),
    repeating-linear-gradient(90deg, transparent 0 7px, rgba(210, 255, 191, .018) 8px 9px);
  mix-blend-mode: screen;
  opacity: .38;
  animation:
    crt-noise-roll 2.2s linear infinite,
    crt-noise-pulse 240ms steps(2, jump-none) infinite;
}
@keyframes crt-scanline-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 5px, 3px 0; }
}
@keyframes crt-beam-roll {
  from { background-position: 0 -105%, 0 0; }
  to { background-position: 0 105%, 0 0; }
}
@keyframes crt-noise-roll {
  from { transform: translate3d(-3%, -112%, 0); }
  to { transform: translate3d(3%, 112%, 0); }
}
@keyframes crt-noise-pulse {
  0% { opacity: .27; }
  50% { opacity: .44; }
  100% { opacity: .32; }
}
@keyframes crt-phosphor-flicker {
  0%,
  73%,
  76%,
  100% { opacity: .9; }
  74% { opacity: .68; }
  75% { opacity: 1; }
}
@keyframes crt-signal-lag {
  0%,
  78%,
  84%,
  100% {
    transform: translate3d(0, 0, 0);
    filter: none;
  }
  79% {
    transform: translate3d(2px, 0, 0);
    filter: brightness(1.22) saturate(1.15);
  }
  80% {
    transform: translate3d(-3px, 1px, 0);
    filter: brightness(.78) contrast(1.3) hue-rotate(7deg);
  }
  81% {
    transform: translate3d(4px, 0, 0);
    filter: brightness(1.3) saturate(1.25);
  }
  82% { transform: translate3d(-1px, -1px, 0); }
  83% { transform: translate3d(1px, 0, 0); }
}
@keyframes crt-control-lag {
  0%,
  69%,
  75%,
  100% {
    transform: translate3d(0, 0, 0);
    filter: none;
  }
  70% {
    transform: translate3d(3px, 0, 0);
    filter:
      drop-shadow(-2px 0 rgba(255, 42, 70, .48))
      drop-shadow(2px 0 rgba(52, 222, 255, .48));
  }
  71% { transform: translate3d(-2px, 1px, 0); }
  72% {
    transform: translate3d(4px, 0, 0);
    filter:
      brightness(1.35)
      drop-shadow(-3px 0 rgba(255, 42, 70, .58))
      drop-shadow(3px 0 rgba(52, 222, 255, .58));
  }
  73% { transform: translate3d(-1px, 0, 0); }
  74% { transform: translate3d(1px, 0, 0); }
}
@keyframes crt-text-stutter {
  0%,
  82%,
  87%,
  100% {
    transform: translate3d(0, 0, 0);
    text-shadow: 0 0 10px rgba(193, 255, 33, .55);
  }
  83% {
    transform: translate3d(2px, 0, 0);
    text-shadow: -2px 0 rgba(255, 42, 70, .66), 2px 0 rgba(52, 222, 255, .72);
  }
  84% {
    transform: translate3d(-3px, 1px, 0);
    text-shadow: 2px 0 rgba(255, 42, 70, .54), -2px 0 rgba(52, 222, 255, .64);
  }
  85% { transform: translate3d(1px, 0, 0); }
  86% { transform: translate3d(0, 0, 0); }
}

.terminal-page { position: absolute; inset: 0; padding: clamp(18px, 3vw, 48px); }
.terminal-home { display: grid; grid-template-rows: auto 1fr; justify-items: center; align-items: start; }
.terminal-kicker {
  margin: 0;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: clamp(10px, .8vw, 12px);
  font-weight: 700;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
}
.terminal-actions {
  z-index: 2;
  display: flex;
  width: min(88%, 760px);
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1vw, 16px);
  margin-top: clamp(8px, 1.25vw, 18px);
}
.crt-button, .back-button, .tariff-action {
  --detail-color: var(--primary);
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid color-mix(in srgb, var(--detail-color) 48%, var(--border));
  border-radius: 18px;
  color: var(--foreground);
  background:
    radial-gradient(circle at 22% 50%, color-mix(in srgb, var(--detail-color) 14%, transparent), transparent 52%),
    var(--surface);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, .28),
    inset 0 0 18px color-mix(in srgb, var(--detail-color) 8%, transparent);
  font-size: clamp(14px, 1.15vw, 17px);
  font-weight: 600;
  line-height: 1.2;
  transition:
    filter var(--motion-fast) var(--ease-hover),
    transform var(--motion-fast) var(--ease-hover),
    border-color var(--motion-fast) ease;
}
.crt-button:hover, .back-button:hover, .tariff-action:hover {
  filter: brightness(1.13);
  transform: scale(1.02);
}
.crt-button:focus-visible, .back-button:focus-visible, .tariff-action:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.crt-button--asset {
  width: min(46%, 360px);
  min-height: 44px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.crt-button--asset img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  animation: crt-control-lag 5.4s steps(1, jump-none) infinite;
}
.terminal-mascot {
  position: absolute;
  z-index: 1;
  bottom: 3.75%;
  left: 50%;
  width: auto;
  max-width: 48%;
  height: 50%;
  max-height: none;
  object-fit: contain;
  translate: -50% 0;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  filter:
    saturate(.96)
    contrast(1.03)
    blur(.18px)
    drop-shadow(-.8px 0 rgba(255, 72, 112, .28))
    drop-shadow(.8px 0 rgba(72, 222, 255, .28))
    drop-shadow(0 0 12px rgba(193, 255, 33, .25))
    drop-shadow(0 0 26px rgba(80, 216, 255, .18));
  animation: mascot-boot 1s steps(3, jump-none) both, mascot-glitch 3.4s steps(1) 1.2s infinite;
}
@keyframes mascot-boot { 0% { opacity: 0; filter: brightness(2); clip-path: inset(48% 0 48% 0); } 70% { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes mascot-glitch { 0%, 88%, 100% { transform: translate(0); } 89% { transform: translate(3px, -1px); } 91% { transform: translate(-2px, 1px); } }

.course-page.terminal-page {
  display: grid;
  overflow: hidden;
  place-items: center;
  padding: 0;
  font-family: "VCR OSD Mono", var(--font-mono);
}
.course-price-board {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.course-price-board::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: url("24_game_ready_assets/price-without-buttons.png") 0 0 / 100% 100% no-repeat;
  content: "";
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: crt-price-ghost 6.2s steps(1, jump-none) infinite;
}
@keyframes crt-price-ghost {
  0%,
  78%,
  84%,
  100% {
    opacity: 0;
    transform: translate3d(0, 0, 0);
    filter: none;
  }
  79% {
    opacity: .22;
    transform: translate3d(4px, 0, 0);
    filter: hue-rotate(155deg) saturate(1.8);
  }
  80% {
    opacity: .34;
    transform: translate3d(-4px, 1px, 0);
    filter: hue-rotate(310deg) saturate(1.9);
  }
  81% {
    opacity: .18;
    transform: translate3d(2px, 0, 0);
    filter: brightness(1.5);
  }
  82% { opacity: .08; transform: translate3d(-1px, 0, 0); }
  83% { opacity: 0; }
}
.course-price-art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  animation: crt-signal-lag 6.2s steps(1, jump-none) infinite;
}
.course-back {
  position: absolute;
  z-index: 6;
  top: 50%;
  right: auto;
  left: clamp(8px, 2%, 20px);
  width: clamp(52px, 5vw, 74px);
  min-width: 44px;
  height: clamp(52px, 5vw, 74px);
  min-height: 44px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: translateY(-50%);
}
.course-back img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: hue-rotate(-105deg) saturate(1.18) brightness(1.05);
  animation: course-back-prompt 1.45s ease-in-out infinite;
}
.course-back:hover {
  filter: brightness(1.16) drop-shadow(0 0 12px rgba(183, 255, 22, .58));
  transform: translateY(-50%) scale(1.04);
}
.course-back:active {
  transform: translateY(-50%) scale(.94);
}
@keyframes course-back-prompt {
  0%,
  100% { transform: translateX(7px); }
  55% { transform: translateX(-5px); }
}
.course-purchase {
  position: absolute;
  z-index: 4;
  width: 19.8%;
  min-width: 44px;
  min-height: 44px;
  aspect-ratio: 317 / 129;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.course-purchase--lessons { top: 59.1%; left: 17.8%; }
.course-purchase--participant { top: 59.1%; left: 62.7%; }
.course-purchase--guidebook { top: 76.7%; left: 72.4%; }
.course-purchase img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transition: opacity var(--motion-fast) ease, filter var(--motion-fast) ease;
  animation: crt-control-lag 5.4s steps(1, jump-none) .12s infinite;
}
.course-purchase-active,
.course-purchase-added { opacity: 0; }
.course-purchase .course-purchase-added {
  inset: auto;
  top: 50%;
  left: 50%;
  width: 123.66%;
  height: auto;
  transform: translate(-50%, -50%);
  animation: none;
}
.course-purchase:is(:hover, :focus-visible, :active) {
  filter: none;
  transform: none;
}
.course-purchase:is(:hover, :focus-visible, :active) .course-purchase-idle { opacity: 0; }
.course-purchase:is(:hover, :focus-visible, :active) .course-purchase-active { opacity: 1; }
.course-purchase:disabled {
  cursor: default;
  opacity: 1;
}
.course-purchase:disabled .course-purchase-idle,
.course-purchase:disabled .course-purchase-active { opacity: 0; }
.course-purchase[data-cart-state="sent"]:disabled .course-purchase-added {
  opacity: 1;
  filter: none;
}
.purchase-status {
  position: absolute;
  z-index: 5;
  right: 4%;
  bottom: 1.5%;
  left: 4%;
  min-height: 1.2em;
  margin: 0;
  color: #dfff9a;
  font-family: "VCR OSD Mono", var(--font-mono);
  font-size: clamp(8px, .75vw, 11px);
  text-align: center;
  text-shadow: 0 0 10px rgba(193, 255, 33, .55);
  animation: crt-text-stutter 5.1s steps(1, jump-none) infinite;
}

.hub-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, transparent 25%, rgba(1,6,3,.48) 100%); }
.progress-panel {
  position: absolute;
  z-index: 200;
  top: clamp(10px, 1.6%, 22px);
  left: clamp(10px, 1.6%, 22px);
  width: min(21%, 290px);
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  pointer-events: none;
}
.progress-panel::before {
  position: absolute;
  z-index: 0;
  inset: 18% 8%;
  border-radius: 40%;
  background: rgba(193, 255, 33, .52);
  content: "";
  filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transform: scale(.9);
}
.progress-panel img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 5px 9px rgba(0,0,0,.7));
  pointer-events: none;
}
.progress-panel.is-complete {
  cursor: pointer;
  pointer-events: auto;
}
.progress-panel.is-complete::before {
  animation: progress-reward-glow 2.8s ease-in-out infinite;
}
.progress-panel.is-complete img {
  animation: progress-reward-pulse 2.8s ease-in-out infinite;
}
.progress-panel.is-complete:hover img,
.progress-panel.is-complete:focus-visible img {
  filter:
    brightness(1.08)
    drop-shadow(0 5px 9px rgba(0, 0, 0, .7))
    drop-shadow(0 0 15px rgba(193, 255, 33, .68));
}
.progress-panel.is-complete:active img { transform: scale(.98); }
.progress-panel.is-complete:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
@keyframes progress-reward-glow {
  0%, 100% { opacity: .38; transform: scale(.92); }
  50% { opacity: .68; transform: scale(1.04); }
}
@keyframes progress-reward-pulse {
  0%, 100% {
    filter:
      drop-shadow(0 5px 9px rgba(0, 0, 0, .7))
      drop-shadow(0 0 7px rgba(193, 255, 33, .38));
    transform: scale(1);
  }
  50% {
    filter:
      brightness(1.035)
      drop-shadow(0 5px 9px rgba(0, 0, 0, .7))
      drop-shadow(0 0 13px rgba(193, 255, 33, .6));
    transform: scale(1.018);
  }
}
.persistent-lab-hud {
  position: fixed;
  z-index: 1450;
  top: 50%;
  left: 50%;
  width: var(--lab-stage-width);
  height: var(--lab-stage-height);
  overflow: visible;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.persistent-lab-hud .stage-controls,
.persistent-lab-hud .inventory-toggle {
  pointer-events: auto;
}
.persistent-lab-hud .stage-controls {
  bottom: clamp(6px, 1.6%, 22px);
  left: clamp(6px, 1.6%, 22px);
}
.persistent-lab-hud .progress-panel {
  top: clamp(6px, 1.6%, 22px);
  left: clamp(6px, 1.6%, 22px);
}
.persistent-lab-hud .inventory-toggle {
  top: clamp(6px, 1.6%, 22px);
  right: clamp(6px, 1.6%, 22px);
}
.tariff-dock {
  position: fixed;
  z-index: 1750;
  right: calc((100vw - var(--lab-stage-width)) / 2 + max(6px, env(safe-area-inset-right)));
  bottom: calc((100dvh - var(--lab-stage-height)) / 2 + max(6px, env(safe-area-inset-bottom)));
  display: grid;
  grid-template-rows: max(36px, var(--lab-dock-mascot-height)) auto;
  width: clamp(44px, var(--lab-dock-width), 138px);
  min-height: 44px;
  padding: clamp(2px, min(.35vw, .62222dvh), 5px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--primary) 68%, var(--border));
  border-radius: clamp(8px, min(1.1vw, 1.95556dvh), 17px);
  color: #101714;
  background:
    radial-gradient(circle at 50% 32%, rgba(80, 216, 255, .16), transparent 56%),
    rgba(8, 15, 14, .94);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, .5),
    inset 0 0 24px rgba(80, 216, 255, .07);
  cursor: pointer;
  font: inherit;
  touch-action: manipulation;
  transition:
    border-color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    transform var(--motion-fast) var(--ease-hover);
}
.tariff-dock-mascot {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  pointer-events: none;
}
.tariff-dock-mascot::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 15% 8% 5%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(193, 255, 33, .34) 0 18%, rgba(80, 216, 255, .2) 42%, transparent 72%);
  filter: blur(10px);
  opacity: .8;
  transform: scale(1.08);
}
.tariff-dock-mascot img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  pointer-events: none;
  filter:
    blur(.16px)
    drop-shadow(-.7px 0 rgba(255, 72, 112, .26))
    drop-shadow(.7px 0 rgba(72, 222, 255, .26))
    drop-shadow(0 0 7px rgba(193, 255, 33, .24))
    drop-shadow(0 0 12px rgba(80, 216, 255, .16));
  transform: translateY(3%) scale(1.16);
  transform-origin: 50% 50%;
}
.tariff-dock-label {
  display: grid;
  min-height: clamp(24px, 2.7vw, 42px);
  place-items: center;
  padding: clamp(3px, .5vw, 7px) clamp(4px, .6vw, 8px);
  border-radius: clamp(7px, .8vw, 12px);
  background: var(--accent);
  font-size: clamp(9px, var(--lab-small-label-size), 15px);
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
}
.tariff-dock:hover {
  border-color: var(--primary);
  box-shadow:
    0 16px 42px rgba(0, 0, 0, .54),
    0 0 20px rgba(80, 216, 255, .2);
  transform: translateY(-3px);
}
.tariff-dock:active { transform: translateY(0) scale(.97); }
.tariff-dock:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.lab-hotspot {
  --spot-color: var(--primary);
  --hotspot-visual-size: clamp(26px, var(--lab-hotspot-size), 70px);
  position: absolute;
  z-index: 5;
  display: grid;
  width: max(44px, var(--hotspot-visual-size));
  min-width: 0;
  height: max(44px, var(--hotspot-visual-size));
  min-height: 0;
  place-items: center;
  border-radius: 16px;
  color: white;
  transform: translate(-50%, -50%);
}
.lab-hotspot[hidden] { display: none; }
.lab-hotspot:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
.hotspot-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: var(--hotspot-visual-size);
  height: var(--hotspot-visual-size);
  margin-top: calc(var(--hotspot-visual-size) / -2);
  margin-left: calc(var(--hotspot-visual-size) / -2);
  background: url("15_web_ui_assets/web/hotspot-marker-192.png") center / contain no-repeat;
  filter: drop-shadow(0 0 11px rgba(80, 216, 255, .28));
  animation: hotspot-breathe 2.8s ease-in-out infinite;
}
@keyframes hotspot-breathe {
  0%, 100% { filter: brightness(.92) drop-shadow(0 0 8px rgba(80, 216, 255, .2)); transform: scale(.94); }
  50% { filter: brightness(1.16) drop-shadow(0 0 18px rgba(80, 216, 255, .48)); transform: scale(1.06); }
}
.hotspot-label {
  position: absolute;
  top: calc(100% + 7px);
  display: grid;
  width: max-content;
  max-width: 180px;
  justify-items: center;
  gap: 2px;
  padding: 8px 12px;
  opacity: 0;
  border: 1px solid color-mix(in srgb, var(--spot-color) 48%, var(--border));
  border-radius: 18px;
  color: var(--foreground);
  background:
    radial-gradient(circle at 24% 50%, color-mix(in srgb, var(--spot-color) 14%, transparent), transparent 58%),
    var(--surface);
  box-shadow: 0 12px 28px rgba(0,0,0,.34), inset 0 0 18px color-mix(in srgb, var(--spot-color) 8%, transparent);
  font-size: clamp(12px, .85vw, 14px);
  font-weight: 600;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity var(--motion-fast) ease, transform var(--motion-fast) var(--ease-hover);
}
.hotspot-label small {
  color: rgba(255, 255, 255, .62);
  font-size: .72em;
  font-weight: 520;
  letter-spacing: .01em;
  line-height: 1.15;
  white-space: nowrap;
}
.lab-hotspot:hover .hotspot-label, .lab-hotspot:focus-visible .hotspot-label { opacity: 1; transform: translateY(0); }
.hotspot-pipes { left: 23.48%; top: 59.49%; }
.hotspot-tetris { left: 36.22%; top: 59.63%; }
.hotspot-cryo { left: 8.02%; top: 56.79%; }
.hotspot-director { left: 92.22%; top: 54.81%; }
.hotspot-board { left: 65.53%; top: 57.95%; }
.hotspot-flask { left: 50.02%; top: 35.44%; }
.hotspot-team { left: 81.7%; top: 48.8%; }
.team-overlay {
  position: absolute;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(14px, 2vw, 28px);
  background: rgba(3, 7, 8, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 220ms ease-out;
}
.team-overlay.is-open { opacity: 1; }
.team-card {
  position: relative;
  width: min(46vw, calc(78dvh * .87955), 760px);
  max-width: 78%;
  padding: 0;
  overflow: visible;
  border: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
  transform: translateY(14px) scale(.975);
  transition: transform 260ms var(--ease-hover);
}
.team-overlay.is-open .team-card { transform: translateY(0) scale(1); }
.team-card figure {
  display: grid;
  width: 100%;
  grid-template-rows: auto auto;
  gap: clamp(7px, .7vw, 11px);
  margin: 0;
}
.team-photo-frame {
  width: 100%;
  aspect-ratio: 3213 / 3653;
  overflow: hidden;
  border: 1px solid rgba(80, 216, 255, .52);
  border-radius: clamp(14px, 1.5vw, 22px);
  background: #050807;
  box-shadow:
    0 28px 76px rgba(0, 0, 0, .62),
    0 0 28px rgba(80, 216, 255, .08);
}
.team-photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-card figcaption {
  padding: 0;
  color: rgba(255, 255, 255, .74);
  font-family: var(--font-mono);
  font-size: clamp(10px, .82vw, 13px);
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}
.team-close {
  position: absolute;
  z-index: 3;
  top: clamp(12px, 1.2vw, 18px);
  right: clamp(12px, 1.2vw, 18px);
  width: clamp(48px, 4vw, 58px);
  height: clamp(48px, 4vw, 58px);
  padding: 0;
  border: 0;
  background: transparent;
  transition: filter var(--motion-fast) ease, transform var(--motion-fast) ease;
}
.team-close img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.team-close:hover,
.team-close:focus-visible {
  filter: brightness(1.12) drop-shadow(0 0 10px rgba(80, 216, 255, .42));
  transform: scale(1.04);
}
.team-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.completion-reward-overlay {
  position: absolute;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(14px, 2vw, 28px);
  background: rgba(2, 6, 5, .78);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  opacity: 0;
  transition: opacity 220ms ease-out;
}
.completion-reward-overlay.is-open { opacity: 1; }
.completion-reward-card {
  position: relative;
  display: grid;
  width: min(88%, 560px);
  justify-items: center;
  padding: clamp(26px, 3vw, 42px);
  border: 1px solid color-mix(in srgb, var(--primary) 62%, var(--border));
  border-radius: var(--lab-modal-radius);
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(80, 216, 255, .11), transparent 38%),
    linear-gradient(180deg, rgba(31, 34, 34, .98), rgba(10, 14, 14, .98));
  box-shadow:
    0 32px 92px rgba(0, 0, 0, .7),
    inset 0 0 38px rgba(80, 216, 255, .045);
  text-align: center;
  transform: translateY(16px) scale(.97);
  transition: transform 260ms var(--ease-hover);
}
.completion-reward-overlay.is-open .completion-reward-card { transform: translateY(0) scale(1); }
.completion-reward-kicker {
  margin: 0;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: clamp(10px, .8vw, 12px);
  font-weight: 800;
  letter-spacing: .13em;
}
.completion-reward-card h2 {
  margin: 8px 0 0;
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 680;
  letter-spacing: -.055em;
  line-height: .95;
}
.completion-reward-card > p:not(.completion-reward-kicker) {
  max-width: 40ch;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, .7);
  font-size: clamp(13px, 1.1vw, 16px);
  line-height: 1.42;
}
.completion-reward-prize {
  display: grid;
  gap: 5px;
  width: min(100%, 450px);
  margin-top: clamp(18px, 2vw, 26px);
  padding: 14px 16px;
  border: 1px solid rgba(80, 216, 255, .22);
  border-radius: 14px;
  background: rgba(80, 216, 255, .045);
}
.completion-reward-prize span {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.completion-reward-prize strong {
  max-width: 30ch;
  font-size: clamp(17px, 1.6vw, 23px);
  line-height: 1.15;
}
.completion-reward-prize small {
  margin-top: 3px;
  color: rgba(255, 255, 255, .56);
  font-size: clamp(10px, .78vw, 12px);
  line-height: 1.3;
}
.completion-reward-prize > [hidden] { display: none; }
.completion-reward-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  width: min(100%, 450px);
  margin-top: 18px;
}
.completion-reward-options[hidden] { display: none; }
.completion-reward-options button {
  display: grid;
  min-height: 58px;
  align-content: center;
  gap: 3px;
  padding: 9px 12px;
  border: 1px solid rgba(80, 216, 255, .38);
  border-radius: 14px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(57, 61, 61, .72), rgba(24, 28, 28, .82));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .07),
    inset 0 -8px 16px rgba(0, 0, 0, .16);
  text-align: center;
  transition:
    border-color var(--motion-fast) ease,
    background var(--motion-fast) ease,
    transform var(--motion-fast) ease;
}
.completion-reward-options button:hover,
.completion-reward-options button:focus-visible {
  border-color: rgba(193, 255, 33, .62);
  background: rgba(193, 255, 33, .08);
  transform: translateY(-2px);
}
.completion-reward-options button[aria-pressed="true"] {
  border-color: var(--accent);
  background: rgba(193, 255, 33, .13);
  box-shadow: inset 0 0 20px rgba(193, 255, 33, .05);
}
.completion-reward-options button:disabled {
  cursor: default;
  opacity: .62;
}
.completion-reward-options button:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
.completion-reward-options strong {
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.15;
}
.completion-reward-options span {
  color: rgba(255, 255, 255, .58);
  font-size: clamp(10px, .78vw, 12px);
  line-height: 1.2;
}
.completion-reward-confirmation {
  display: grid;
  justify-items: center;
  width: min(100%, 450px);
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(193, 255, 33, .46);
  border-radius: 14px;
  background: rgba(193, 255, 33, .055);
}
.completion-reward-confirmation[hidden] { display: none; }
.completion-reward-confirmation-label {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
}
.completion-reward-confirmation > strong {
  margin-top: 6px;
  font-size: clamp(16px, 1.4vw, 20px);
}
.completion-reward-confirmation > p:not(.completion-reward-confirmation-label) {
  max-width: 36ch;
  margin: 6px 0 0;
  color: rgba(255, 255, 255, .68);
  font-size: clamp(11px, .86vw, 13px);
  line-height: 1.35;
}
.completion-reward-confirmation-actions {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  gap: 8px;
  margin-top: 12px;
}
.completion-reward-secondary,
.completion-reward-primary {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: clamp(11px, .86vw, 13px);
  font-weight: 820;
  transition: filter var(--motion-fast) ease, transform var(--motion-fast) ease;
}
.completion-reward-secondary {
  border: 1px solid rgba(80, 216, 255, .32);
  color: #fff;
  background: rgba(80, 216, 255, .055);
}
.completion-reward-primary {
  color: #101714;
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(193, 255, 33, .14);
}
.completion-reward-secondary:hover,
.completion-reward-secondary:focus-visible,
.completion-reward-primary:hover,
.completion-reward-primary:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-2px);
}
.completion-reward-secondary:active,
.completion-reward-primary:active { transform: translateY(0) scale(.98); }
.completion-reward-secondary:focus-visible,
.completion-reward-primary:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
.completion-reward-result {
  display: grid;
  justify-items: center;
  width: min(100%, 450px);
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px solid rgba(193, 255, 33, .42);
  border-radius: 14px;
  background: rgba(193, 255, 33, .055);
}
.completion-reward-result[hidden] { display: none; }
.completion-reward-result-label {
  margin: 0;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.completion-reward-result-value {
  margin-top: 7px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 850;
  letter-spacing: .04em;
  overflow-wrap: anywhere;
}
.completion-reward-result-copy {
  max-width: 39ch;
  margin: 7px 0 0;
  color: rgba(255, 255, 255, .7);
  font-size: clamp(11px, .86vw, 13px);
  line-height: 1.35;
}
.completion-reward-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.completion-reward-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: 11px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  color: #101714;
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(193, 255, 33, .14);
  font-size: clamp(12px, .9vw, 14px);
  font-weight: 850;
  text-decoration: none;
  transition: filter var(--motion-fast) ease, transform var(--motion-fast) ease;
}
.completion-reward-action:hover,
.completion-reward-action:focus-visible { filter: brightness(1.08); transform: translateY(-2px); }
.completion-reward-action:active { transform: translateY(0) scale(.98); }
.completion-reward-action:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.completion-reward-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: clamp(46px, 3.8vw, 56px);
  height: clamp(46px, 3.8vw, 56px);
  padding: 0;
  border: 0;
  background: transparent;
  transition: filter var(--motion-fast) ease, transform var(--motion-fast) ease;
}
.completion-reward-close img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.completion-reward-close:hover,
.completion-reward-close:focus-visible { filter: brightness(1.12); transform: scale(1.04); }
.completion-reward-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.hotspot-terminal {
  --spot-color: #ff584f;
  left: 50%;
  top: 72%;
}
.hotspot-terminal .hotspot-ring {
  filter:
    hue-rotate(132deg)
    saturate(1.9)
    brightness(1.15)
    drop-shadow(0 0 13px rgba(255, 62, 55, .58));
}
.hotspot-terminal .hotspot-label {
  border-color: rgba(255, 88, 79, .52);
}

.lab-return-transition {
  position: absolute;
  z-index: 260;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020403;
  pointer-events: none;
}
.lab-return-transition[hidden] { display: none; }

.modal-card { position: absolute; z-index: 10; top: 50%; left: 50%; width: min(92vw, 540px); padding: clamp(22px, 4vw, 48px); border: 1px solid color-mix(in srgb, var(--primary) 48%, var(--border)); border-radius: 22px; background: radial-gradient(circle at 24% 50%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 44%), var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.42), inset 0 0 34px color-mix(in srgb, var(--primary) 8%, transparent); transform: translate(-50%, -50%); }
.modal-eyebrow { margin: 0 0 .65em; color: var(--primary); font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.modal-card h2 { margin: 0; color: var(--foreground); font-size: clamp(30px, 5vw, 56px); font-weight: 650; line-height: 1; letter-spacing: -.035em; }
.modal-card p:not(.modal-eyebrow) { max-width: 42ch; margin: 1em 0 1.3em; color: rgba(255,255,255,.78); font-size: clamp(16px, 2vw, 19px); line-height: 1.55; }
.crt-button--small { font-size: .9rem; }

.experience-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  background: transparent;
  animation: overlay-enter .26s ease-out both;
}
.experience-overlay::before,
.experience-overlay::after {
  position: fixed;
  inset: -24px;
  z-index: 0;
  pointer-events: none;
  content: "";
}
.experience-overlay::before {
  background-color: #050807;
  background-image: var(--lab-backdrop-image, url("01_lobby_states/lobby_01_empty_on.jpeg"));
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: blur(18px) brightness(.5) saturate(.82);
  transform: scale(1.045);
}
.experience-overlay::after {
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 42%, rgba(9, 18, 16, .12), rgba(2, 6, 4, .48) 78%),
    rgba(2, 6, 4, .28);
}
@keyframes overlay-enter { from { opacity: 0; filter: blur(8px); } to { opacity: 1; filter: blur(0); } }
.overlay-controls {
  position: fixed;
  z-index: 220;
  top: 50%;
  left: 50%;
  width: var(--lab-modal-width);
  height: var(--lab-modal-height);
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.overlay-controls .asset-button {
  position: absolute;
  top: max(8px, env(safe-area-inset-top));
  right: max(8px, env(safe-area-inset-right));
  pointer-events: auto;
}
.game-mount {
  position: relative;
  z-index: 2;
  width: var(--lab-modal-width);
  height: var(--lab-modal-height);
  min-height: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--primary) 42%, var(--border));
  border-radius: var(--lab-modal-radius);
  background: #0b0f0e;
  box-shadow:
    0 34px 100px rgba(0, 0, 0, .68),
    0 0 38px rgba(83, 218, 255, .12);
}
.game-mount[data-module="maze"] {
  width: min(92vw, 88dvh, 980px);
  height: min(92vw, 88dvh, 980px);
  min-height: 0;
  overflow: hidden;
}
.game-mount[data-module="pipes"] {
  width: min(92vw, 88dvh, 980px);
  height: min(92vw, 88dvh, 980px);
}
.game-mount[data-module="tetris"] {
  width: min(86vw, 79.12dvh, 860px);
  height: min(92dvh, 100vw, 1000px);
  min-height: 0;
}
.game-mount[data-module="director"],
.game-mount[data-module="flasks"] {
  width: min(100vw, 177.778dvh);
  height: min(100dvh, 56.25vw);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.game-mount[data-module="maze"] .game-module-host {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.game-module-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0b0f0e;
}
.game-mount[data-module="maze"] .game-module-frame {
  height: 100%;
}
.game-module-host,
.game-module-host > body {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
}
.game-mount[data-loading="true"]::before,
.game-load-error {
  position: fixed;
  z-index: 4;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.game-mount[data-loading="true"]::before {
  width: 54px;
  aspect-ratio: 1;
  border: 2px solid rgba(80, 216, 255, .18);
  border-top-color: #50d8ff;
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(80, 216, 255, .2);
  animation: game-loading .8s linear infinite;
  content: "";
}
@keyframes game-loading { to { transform: translate(-50%, -50%) rotate(1turn); } }
.game-load-error {
  display: grid;
  width: min(440px, calc(100vw - 40px));
  gap: 8px;
  padding: 24px;
  border: 1px solid rgba(80, 216, 255, .32);
  border-radius: 22px;
  color: white;
  background: rgba(10, 15, 14, .9);
  text-align: center;
}
.game-load-error span { color: rgba(255, 255, 255, .65); font-size: 14px; }
.room-frame {
  position: relative;
  z-index: 2;
  display: grid;
  width: var(--lab-modal-width);
  height: var(--lab-modal-height);
  min-height: 0;
  place-items: center;
  padding: 60px 24px 24px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--primary) 42%, var(--border));
  border-radius: var(--lab-modal-radius);
  background: #050807;
  box-shadow:
    0 34px 100px rgba(0, 0, 0, .68),
    0 0 38px rgba(83, 218, 255, .12);
}
.room-media { position: relative; width: min(100%, 1500px); }
.room-frame img { display: block; width: 100%; max-height: calc(var(--lab-modal-height) - 90px); object-fit: contain; border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--border)); border-radius: 22px; }
.room-copy { max-width: 700px; margin-top: 18px; padding: 18px 22px; border: 1px solid color-mix(in srgb, var(--primary) 48%, var(--border)); border-radius: 22px; color: rgba(255,255,255,.78); background: radial-gradient(circle at 24% 50%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 44%), var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.42), inset 0 0 34px color-mix(in srgb, var(--primary) 8%, transparent); text-align: center; line-height: 1.55; }
.room-frame--fullscreen {
  display: block;
  width: min(100vw, 177.778dvh);
  height: min(100dvh, 56.25vw);
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.room-frame--fullscreen .room-media {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
}
.room-frame--fullscreen img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 0;
  object-fit: contain;
}
.cryo-maze-hotspot {
  --hotspot-visual-size: clamp(26px, var(--lab-hotspot-size), 70px);
  position: absolute;
  z-index: 12;
  top: 57.5%;
  left: 56.353125%;
  display: grid;
  width: max(44px, var(--hotspot-visual-size));
  min-width: 0;
  height: max(44px, var(--hotspot-visual-size));
  min-height: 0;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -50%);
}
.cryo-maze-hotspot .hotspot-ring {
  display: block;
  background: url("15_web_ui_assets/web/hotspot-marker-192.png") center / contain no-repeat;
  filter: drop-shadow(0 0 12px rgba(83, 218, 255, .42));
  animation: hotspot-scan 2.2s var(--ease-lab) infinite;
}
.cryo-maze-hotspot .hotspot-label {
  display: grid;
  top: calc(100% + 7px);
  right: auto;
  bottom: auto;
  left: 50%;
  width: max-content;
  padding: 7px 12px 8px;
  border: 1px solid rgba(83, 218, 255, .52);
  border-radius: 12px;
  background: rgba(5, 16, 21, .72);
  box-shadow:
    inset 0 0 18px rgba(83, 218, 255, .07),
    0 0 16px rgba(83, 218, 255, .1);
  opacity: 0;
  transform: translate(-50%, -4px);
}
.cryo-maze-hotspot:hover .hotspot-label,
.cryo-maze-hotspot:focus-visible .hotspot-label {
  border-color: rgba(83, 218, 255, .9);
  opacity: 1;
  transform: translate(-50%, 0);
}

.cryo-capsule-segments {
  position: absolute;
  z-index: 10;
  inset: 0;
  pointer-events: none;
}
.cryo-capsule-segment {
  position: absolute;
  top: 27%;
  width: 12.5%;
  height: 67%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 44% 44% 22% 22% / 20% 20% 12% 12%;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}
.cryo-capsule-segment:nth-child(1) { left: 2.8%; }
.cryo-capsule-segment:nth-child(2) { left: 17.7%; }
.cryo-capsule-segment:nth-child(3) { left: 31.2%; }
.cryo-capsule-segment:nth-child(4) { left: 44.5%; }
.cryo-capsule-segment:nth-child(5) { left: 57.8%; }
.cryo-capsule-segment:nth-child(6) { left: 72.8%; }
.cryo-capsule-segment:nth-child(7) { left: 86.5%; width: 11%; }
.cryo-capsule-segment:focus-visible {
  outline: 2px solid rgba(83, 218, 255, .88);
  outline-offset: -8px;
  box-shadow: inset 0 0 36px rgba(83, 218, 255, .18);
}

.room-frame.has-teacher-dossier .room-media {
  filter: blur(10px) brightness(.44);
  transform: translate(-50%, -50%) scale(1.015);
}
.teacher-dossier-overlay {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding:
    max(12px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
  background: rgba(4, 8, 11, .3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 240ms ease-out;
}
.teacher-dossier-overlay.is-open { opacity: 1; }
.teacher-dossier {
  position: relative;
  display: block;
  width: min(68vw, calc(74dvh * .558091), 470px);
  height: auto;
  max-height: 74dvh;
  aspect-ratio: 1076 / 1928;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(83, 218, 255, .3);
  border-radius: clamp(16px, 1.8vw, 24px);
  color: #fff;
  background:
    radial-gradient(circle at 50% 35%, rgba(83, 218, 255, .1), transparent 52%),
    rgba(7, 11, 13, .96);
  box-shadow: 0 28px 78px rgba(0, 0, 0, .62);
  transform: translateY(14px) scale(.975);
  transition: transform 260ms var(--ease-hover);
}
.teacher-dossier-overlay.is-open .teacher-dossier { transform: translateY(0) scale(1); }
.teacher-dossier-close {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 8px;
  width: clamp(48px, 4vw, 58px);
  height: clamp(48px, 4vw, 58px);
  padding: 0;
  border: 0;
  background: transparent;
}
.teacher-dossier-close img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.teacher-dossier-close:hover,
.teacher-dossier-close:focus-visible {
  filter: brightness(1.12) drop-shadow(0 0 10px rgba(83, 218, 255, .42));
  transform: scale(1.04);
}
.teacher-dossier-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.teacher-dossier-visual {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.teacher-dossier-visual::after { content: none; }
.teacher-dossier .teacher-video,
.teacher-dossier .teacher-animation {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .34));
}
.teacher-dossier .teacher-video[hidden],
.teacher-dossier .teacher-animation[hidden] { display: none; }
.teacher-dossier-copy {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  min-width: 0;
  padding: clamp(54px, 9dvh, 96px) clamp(16px, 2.2vw, 26px) clamp(16px, 2.2vw, 26px);
  overflow: hidden;
  background: linear-gradient(to bottom, transparent, rgba(4, 8, 10, .86) 42%, rgba(4, 8, 10, .97));
  pointer-events: none;
}
.teacher-dossier-copy h2 {
  max-width: calc(100% - 46px);
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -.04em;
}
.teacher-dossier-role {
  margin: 9px 0 0;
  color: rgba(131, 195, 255, .9);
  font-family: var(--font-mono);
  font-size: clamp(10px, 1vw, 12px);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.teacher-dossier-copy > p:last-child {
  display: -webkit-box;
  max-width: 43ch;
  margin: 10px 0 0;
  overflow: hidden;
  color: rgba(255, 255, 255, .76);
  font-size: clamp(11px, 1.05vw, 13px);
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.inventory-toggle {
  position: absolute;
  z-index: 8;
  top: clamp(10px, 1.6%, 22px);
  right: clamp(10px, 1.6%, 22px);
  width: clamp(28px, var(--lab-inventory-size), 76px);
  min-width: 0;
  height: clamp(28px, var(--lab-inventory-size), 76px);
  min-height: 0;
  padding: clamp(2px, min(.28vw, .49778dvh), 4px);
  border: 1px solid rgba(83, 218, 255, .4);
  border-radius: clamp(9px, min(1.2vw, 2.13334dvh), 18px);
  background:
    radial-gradient(circle at 35% 30%, rgba(83, 218, 255, .16), transparent 58%),
    rgba(7, 15, 17, .82);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, .4),
    inset 0 0 20px rgba(83, 218, 255, .08);
  transition:
    border-color var(--motion-fast) ease,
    filter var(--motion-fast) ease,
    transform var(--motion-fast) var(--ease-hover);
}
.inventory-toggle::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, 44px);
  height: max(100%, 44px);
  content: "";
  transform: translate(-50%, -50%);
}
.inventory-toggle img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.inventory-toggle span {
  position: absolute;
  right: -6%;
  bottom: -6%;
  display: grid;
  min-width: clamp(18px, 42%, 31px);
  min-height: clamp(14px, 32%, 24px);
  place-items: center;
  padding: clamp(1px, 4%, 3px) clamp(3px, 8%, 7px);
  border: 2px solid #071011;
  border-radius: 999px;
  color: #0d1210;
  background: var(--accent);
  font-family: var(--font-mono);
  font-size: clamp(7px, var(--lab-small-label-size), 11px);
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}
.inventory-toggle:hover {
  border-color: rgba(83, 218, 255, .86);
  filter: brightness(1.12) drop-shadow(0 0 14px rgba(83, 218, 255, .28));
  transform: translateY(-2px);
}
.inventory-toggle:active { transform: scale(.96); }
.inventory-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.secret-collectible-layer {
  position: absolute;
  z-index: 7;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.secret-collectible {
  position: absolute;
  display: block;
  width: clamp(104px, 10vw, 164px);
  min-width: 64px;
  height: auto;
  min-height: 64px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: transparent;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .52));
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: filter var(--motion-fast) ease;
}
.secret-collectible img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 190px;
  border: 0;
  object-fit: contain;
  pointer-events: none;
  animation: collectible-idle 3.2s ease-in-out 1.2s infinite;
}
.secret-collectible:hover,
.secret-collectible:focus-visible {
  filter:
    brightness(1.12)
    drop-shadow(0 0 18px rgba(193, 255, 33, .38))
    drop-shadow(0 18px 22px rgba(0, 0, 0, .5));
}
.secret-collectible:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.secret-collectible-label {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  width: max-content;
  max-width: min(240px, 70vw);
  padding: 7px 11px;
  border: 1px solid rgba(193, 255, 33, .56);
  border-radius: 14px;
  color: #fff;
  background: rgba(7, 14, 14, .9);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .42);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity var(--motion-fast) ease, transform var(--motion-fast) ease;
}
.secret-collectible:hover .secret-collectible-label,
.secret-collectible:focus-visible .secret-collectible-label {
  opacity: 1;
  transform: translate(-50%, 0);
}
.secret-collectible--drop {
  animation: collectible-drop-in 1.15s var(--ease-lab) both;
}
.secret-collectible--peek-left {
  animation: collectible-peek-left 1s var(--ease-lab) both;
}
.secret-collectible--peek-right {
  animation: collectible-peek-right 1s var(--ease-lab) both;
}
.secret-collectible--swing {
  transform-origin: 50% 0;
  animation: collectible-swing-in 1.2s var(--ease-lab) both;
}
.secret-collectible.is-collected {
  pointer-events: none;
  animation: collectible-stash .6s ease-in both;
}
.secret-collectible.is-leaving {
  pointer-events: none;
  animation: collectible-leave .4s ease-in both;
}
@keyframes collectible-drop-in {
  0% { opacity: 0; transform: translate(-50%, -115vh) rotate(-18deg); }
  72% { opacity: 1; transform: translate(-50%, calc(-50% + 11px)) rotate(5deg); }
  88% { transform: translate(-50%, calc(-50% - 5px)) rotate(-2deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(0); }
}
@keyframes collectible-peek-left {
  from { opacity: 0; transform: translate(-180%, -50%) rotate(-8deg); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(0); }
}
@keyframes collectible-peek-right {
  from { opacity: 0; transform: translate(80%, -50%) rotate(8deg); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(0); }
}
@keyframes collectible-swing-in {
  0% { opacity: 0; transform: translate(-50%, -150%) rotate(-22deg); }
  62% { opacity: 1; transform: translate(-50%, -50%) rotate(9deg); }
  82% { transform: translate(-50%, -50%) rotate(-4deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(0); }
}
@keyframes collectible-idle {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
}
@keyframes collectible-stash {
  to { opacity: 0; filter: brightness(1.8) blur(6px); transform: scale(.24) translateY(-80px); }
}
@keyframes collectible-leave {
  to { opacity: 0; filter: blur(4px); transform: translate(-50%, -65%) scale(.82); }
}

.inventory-overlay {
  position: fixed;
  z-index: 1600;
  inset: 0;
  display: grid;
  place-items: center;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: rgba(3, 7, 8, .74);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 220ms ease-out;
}
.inventory-overlay.is-open { opacity: 1; }
.inventory-panel {
  display: grid;
  width: min(78vw, 138.667dvh, 1440px);
  height: min(78dvh, 43.875vw, 810px);
  max-height: none;
  grid-template-rows: auto auto minmax(0, 1fr);
  padding: clamp(18px, 2vw, 30px);
  overflow: hidden;
  border: 1px solid rgba(83, 218, 255, .45);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 10% 6%, rgba(83, 218, 255, .15), transparent 34%),
    rgba(14, 19, 21, .97);
  box-shadow:
    0 32px 100px rgba(0, 0, 0, .66),
    inset 0 0 48px rgba(83, 218, 255, .06);
  transform: translateY(18px) scale(.98);
  transition: transform 260ms var(--ease-hover);
}
.inventory-overlay.is-open .inventory-panel { transform: translateY(0) scale(1); }
.inventory-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.inventory-header h2 {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 50px);
  font-weight: 650;
  line-height: .96;
  letter-spacing: -.05em;
}
.inventory-close {
  flex: 0 0 auto;
  width: clamp(48px, 4vw, 60px);
  height: clamp(48px, 4vw, 60px);
  border-radius: 16px;
  transition: filter var(--motion-fast) ease, transform var(--motion-fast) ease;
}
.inventory-close img { display: block; width: 100%; height: 100%; object-fit: contain; }
.inventory-close:hover { filter: brightness(1.14); transform: scale(1.04); }
.inventory-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.inventory-intro {
  max-width: 64ch;
  margin: 8px 0 16px;
  color: rgba(255, 255, 255, .7);
  font-size: clamp(13px, 1.1vw, 16px);
  line-height: 1.4;
}
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  min-height: 0;
  gap: clamp(8px, 1vw, 14px);
}
.inventory-card {
  display: grid;
  grid-template-columns: minmax(112px, 36%) minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 20px;
  background: rgba(255, 255, 255, .045);
}
.inventory-card-visual {
  display: grid;
  min-height: 0;
  place-items: center;
  padding: clamp(8px, 1vw, 12px);
  overflow: hidden;
  background: transparent;
}
.inventory-card-visual img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .34));
}
.inventory-card-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(12px, 1.4vw, 20px);
}
.inventory-card-status {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}
.inventory-card h3 {
  margin: 0;
  font-size: clamp(18px, 1.75vw, 26px);
  line-height: 1;
  letter-spacing: -.03em;
}
.inventory-card-copy > p:not(.inventory-card-status) {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, .72);
  font-size: clamp(11px, .9vw, 13px);
  line-height: 1.36;
}
.inventory-card a {
  width: fit-content;
  margin-top: 9px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-underline-offset: 3px;
}
.inventory-card a:hover { color: #fff; }
.inventory-card a:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.inventory-card.is-locked .inventory-card-visual {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 10px, transparent 10px 20px),
    #171a1a;
}
.inventory-card.is-locked .inventory-card-visual img {
  opacity: .12;
  filter: grayscale(1) brightness(.18);
}
.inventory-card.is-locked .inventory-card-status { color: rgba(255, 255, 255, .4); }
.inventory-card.is-locked h3 { color: rgba(255, 255, 255, .48); }

.program-frame {
  position: relative;
  z-index: 2;
  width: var(--lab-modal-width);
  height: var(--lab-modal-height);
  min-height: 0;
  padding: clamp(72px, 8vw, 112px) clamp(16px, 4vw, 64px) 64px;
  overflow: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  border: 1px solid color-mix(in srgb, var(--primary) 42%, var(--border));
  border-radius: var(--lab-modal-radius);
  background:
    radial-gradient(circle at 50% 0%, rgba(131, 195, 255, .12), transparent 38%),
    #101213;
  box-shadow:
    0 34px 100px rgba(0, 0, 0, .68),
    0 0 38px rgba(83, 218, 255, .12);
}
.program-frame::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.program-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}
.program-header {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(280px, .94fr);
  gap: clamp(20px, 4vw, 54px);
  align-items: center;
  padding: clamp(24px, 4vw, 48px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--primary) 48%, var(--border));
  border-radius: 22px;
  background:
    radial-gradient(circle at 24% 50%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 46%),
    var(--surface);
  box-shadow: 0 24px 70px rgba(0,0,0,.42), inset 0 0 34px color-mix(in srgb, var(--primary) 8%, transparent);
}
.program-header-copy { min-width: 0; }
.program-header h1 {
  display: grid;
  gap: .08em;
  max-width: none;
  margin: 0;
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -.048em;
}
.program-header h1 span {
  display: block;
  white-space: nowrap;
}
.program-header h1 em {
  font-style: normal;
  color: var(--primary);
}
.program-header-copy > p {
  max-width: 58ch;
  margin: 24px 0 0;
  color: rgba(255,255,255,.74);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.55;
}
.program-header-asset {
  display: block;
  width: min(100%, 500px);
  height: auto;
  max-height: 270px;
  justify-self: end;
  object-fit: contain;
  filter:
    drop-shadow(0 18px 24px rgba(0, 0, 0, .42))
    drop-shadow(0 0 18px color-mix(in srgb, var(--primary) 18%, transparent));
}
.program-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.program-week {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 30px);
  min-width: 0;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--border));
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 18%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 36%),
    var(--surface);
  box-shadow: 0 18px 46px rgba(0,0,0,.28), inset 0 0 26px color-mix(in srgb, var(--primary) 6%, transparent);
}
.program-week--intro { --program-color: var(--primary); }
.program-week--final { --program-color: var(--accent); }
.program-week--wide { grid-column: 1 / -1; }
.program-index {
  margin: 0;
  color: var(--program-color, var(--primary));
  font-family: var(--font-mono);
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 700;
  line-height: 1;
}
.program-week h2 {
  margin: 0;
  color: var(--foreground);
  font-size: clamp(23px, 2.5vw, 34px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -.03em;
}
.program-subtitle {
  margin: 7px 0 0;
  color: var(--program-color, var(--primary));
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.program-week ul {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  color: rgba(255,255,255,.76);
  line-height: 1.48;
  list-style: none;
}
.program-week li {
  position: relative;
  padding-left: 17px;
}
.program-week li::before {
  position: absolute;
  top: .68em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--program-color, var(--primary));
  box-shadow: 0 0 9px color-mix(in srgb, var(--program-color, var(--primary)) 65%, transparent);
  content: "";
}
.program-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 30px; }
.program-extra {
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
}
.program-extra h3 {
  margin: 0;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.program-extra ul { margin-top: 12px; }
.program-week--final > div > p {
  margin: 16px 0 0;
  color: rgba(255,255,255,.76);
  font-size: 18px;
  line-height: 1.5;
}

/* Ровная последовательность недель: ассетный номер, сюжет и лабораторная стрелка. */
.program-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.program-week.is-enhanced,
.program-week.is-enhanced.program-week--wide {
  display: block;
  grid-column: auto;
  padding: 0;
  overflow: clip;
}
.program-week-summary {
  display: grid;
  grid-template-columns:
    clamp(94px, 10vw, 126px)
    minmax(220px, 1fr)
    minmax(220px, 34%)
    clamp(50px, 5vw, 66px);
  gap: clamp(14px, 2.2vw, 30px);
  width: 100%;
  min-height: 136px;
  align-items: center;
  padding: 14px clamp(22px, 3vw, 40px);
  border: 0;
  color: inherit;
  text-align: left;
  appearance: none;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}
.program-week-summary:hover .program-week-scene {
  transform: translateY(-2px) scale(1.025);
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .46));
}
.program-week-summary:active { opacity: .88; }
.program-week-summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -4px;
}
.program-index {
  display: grid;
  width: 100%;
  height: 88px;
  place-items: center;
}
.program-index img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 9px 12px rgba(0, 0, 0, .46))
    drop-shadow(0 0 10px color-mix(in srgb, var(--program-color, var(--primary)) 17%, transparent));
}
.program-week-title {
  display: grid;
  gap: 7px;
  min-width: 0;
  align-self: center;
  padding: 5px 12px 8px 2px;
}
.program-week-title strong {
  color: var(--foreground);
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -.03em;
}
.program-week-title span {
  color: var(--program-color, var(--primary));
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  line-height: 1.35;
  text-transform: uppercase;
  transform: translateY(-3px);
}
.program-week-scene {
  display: grid;
  width: 100%;
  height: 112px;
  place-items: center;
  opacity: 1;
  transform: translateY(0) scale(1);
  transform-origin: center;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .36));
  transition:
    opacity 220ms ease,
    transform 300ms var(--ease-hover),
    filter 300ms var(--ease-hover);
}
.program-week-scene img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.program-week-arrow {
  display: block;
  width: clamp(48px, 5vw, 62px);
  height: clamp(48px, 5vw, 62px);
  justify-self: end;
  object-fit: contain;
  filter:
    drop-shadow(0 8px 12px rgba(0, 0, 0, .46))
    drop-shadow(0 0 10px rgba(67, 214, 255, .22));
  transform: rotate(0deg);
  transition: transform 300ms var(--ease-hover), filter 300ms var(--ease-hover);
}
.program-week.is-open .program-week-arrow {
  transform: rotate(180deg);
  filter:
    drop-shadow(0 8px 12px rgba(0, 0, 0, .46))
    drop-shadow(0 0 17px rgba(67, 214, 255, .48));
}
.program-week.is-open .program-week-scene {
  opacity: 0;
  transform: translateY(-7px) scale(.92);
  pointer-events: none;
}
.program-week-content {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  border-top: 1px solid transparent;
  transition:
    grid-template-rows 360ms cubic-bezier(.2, .72, .2, 1),
    opacity 220ms ease,
    border-color 240ms ease;
}
.program-week.is-open .program-week-content {
  grid-template-rows: 1fr;
  opacity: 1;
  border-top-color: rgba(255, 255, 255, .08);
}
.program-week-content-inner {
  min-height: 0;
  padding-inline:
    calc(clamp(18px, 2.6vw, 34px) + clamp(94px, 10vw, 126px) + clamp(14px, 2.2vw, 30px))
    clamp(18px, 2.6vw, 34px);
  overflow: hidden;
}
.program-week-content-inner > :first-child { margin-top: 16px; }
.program-week-content-inner > :last-child { margin-bottom: clamp(30px, 3.4vw, 42px); }
.program-week--final .program-week-content-inner > p {
  margin: 16px 0 0;
  color: rgba(255,255,255,.76);
  font-size: 18px;
  line-height: 1.5;
}

.legal-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  overflow: visible;
  border: 0;
  place-items: center;
  color: var(--foreground);
  background: transparent;
  transform: none;
}
.legal-modal[open] { display: grid; }
.legal-modal::backdrop { background: rgba(2, 6, 5, .74); backdrop-filter: blur(14px); }
.legal-dialog {
  position: relative;
  width: min(76vw, 760px);
  height: auto;
  max-height: 88dvh;
  padding: clamp(24px, 4vw, 48px);
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--primary) 48%, var(--border));
  border-radius: 22px;
  background:
    radial-gradient(circle at 24% 42%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 46%),
    rgba(18, 20, 21, .96);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, .52),
    inset 0 0 34px color-mix(in srgb, var(--primary) 8%, transparent);
}
.legal-dialog h2 {
  max-width: calc(100% - 70px);
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -.035em;
}
.legal-close { position: absolute; top: 8px; right: 8px; width: clamp(56px, 5vw, 72px); height: clamp(56px, 5vw, 72px); }
.legal-links {
  display: grid;
  gap: 6px;
  margin-top: clamp(20px, 3vw, 30px);
}
.legal-links a {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 36%, var(--border));
  border-radius: 14px;
  color: var(--foreground);
  background: rgba(255, 255, 255, .035);
  font-size: clamp(13px, 1.1vw, 16px);
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition:
    color var(--motion-fast) ease,
    background var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    transform var(--motion-fast) var(--ease-hover);
}
.legal-links a:hover {
  border-color: color-mix(in srgb, var(--primary) 70%, var(--border));
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  transform: translateX(3px);
}
.legal-links a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.legal-owner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.legal-owner p { margin: 0; }
.legal-owner a { color: var(--primary); overflow-wrap: anywhere; }

.restart-confirmation {
  width: min(90vw, 440px);
  max-width: 440px;
  padding: 0;
  overflow: visible;
  border: 0;
  color: var(--foreground);
  background: transparent;
}
.restart-confirmation::backdrop {
  background: rgba(2, 6, 5, .76);
  backdrop-filter: blur(12px);
}
.restart-confirmation-card {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid color-mix(in srgb, var(--primary) 52%, var(--border));
  border-radius: 22px;
  background:
    radial-gradient(circle at 20% 15%, rgba(80, 216, 255, .12), transparent 42%),
    rgba(18, 23, 22, .98);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, .58),
    inset 0 0 30px rgba(80, 216, 255, .05);
}
.restart-confirmation h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
  letter-spacing: -.025em;
}
.restart-confirmation-card > p:not(.modal-eyebrow) {
  margin: 14px 0 22px;
  color: rgba(255, 255, 255, .72);
  font-size: 15px;
  line-height: 1.45;
}
.restart-confirmation-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.restart-choice {
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--foreground);
  background: rgba(255, 255, 255, .07);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  touch-action: manipulation;
  transition:
    border-color var(--motion-fast) ease,
    background var(--motion-fast) ease,
    transform var(--motion-fast) var(--ease-hover);
}
.restart-choice:hover { transform: translateY(-2px); }
.restart-choice:active { transform: translateY(0) scale(.98); }
.restart-choice:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.restart-choice--cancel:hover {
  border-color: color-mix(in srgb, var(--primary) 62%, var(--border));
  background: color-mix(in srgb, var(--primary) 9%, rgba(255, 255, 255, .07));
}
.restart-choice--confirm {
  border-color: rgba(255, 102, 92, .6);
  color: #fff;
  background: rgba(190, 48, 40, .72);
}
.restart-choice--confirm:hover {
  border-color: #ff756c;
  background: rgba(218, 59, 50, .86);
}

[hidden] { display: none !important; }
.is-leaving { animation: intro-leave .28s ease-in forwards; }
@keyframes intro-leave { to { opacity: 0; filter: blur(11px); transform: scale(1.02); } }

@media (max-width: 940px) and (hover: hover) and (pointer: fine) {
  .program-header {
    grid-template-columns: minmax(0, 1fr) minmax(220px, .7fr);
  }
  .program-week-summary {
    grid-template-columns: 92px minmax(190px, 1fr) minmax(160px, 28%) 50px;
    gap: 14px;
  }
}

@media (max-width: 720px) and (hover: hover) and (pointer: fine) {
  .terminal-page { padding: 14px; }
  .terminal-actions { display: flex; width: min(92%, 620px); }
  .terminal-mascot { bottom: 3.75%; max-width: 48%; height: 50%; }
  .hotspot-label { display: none; }
  .modal-card { top: auto; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); }
  .legal-owner { grid-template-columns: 1fr; gap: 8px; }
  .program-grid { grid-template-columns: 1fr; }
  .program-week--wide { grid-column: auto; }
  .program-columns { grid-template-columns: 1fr; }
  .program-frame { padding-inline: 10px; }
  .program-header {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 20px;
  }
  .program-header h1 { font-size: clamp(30px, 8vw, 44px); }
  .program-header-asset {
    width: min(100%, 400px);
    max-height: 190px;
    justify-self: center;
  }
  .program-week-summary {
    grid-template-columns: 74px minmax(0, 1fr) 48px;
    grid-template-rows: auto 82px;
    gap: 8px 12px;
    min-height: 154px;
    padding: 10px 14px 8px;
  }
  .program-index {
    grid-column: 1;
    grid-row: 1;
    height: 62px;
  }
  .program-week-title {
    grid-column: 2;
    grid-row: 1;
  }
  .program-week-arrow {
    grid-column: 3;
    grid-row: 1;
    width: 46px;
    height: 46px;
  }
  .program-week-scene {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 80px;
  }
  .program-week-content-inner { padding-inline: 18px; }
  .program-week-title strong { font-size: clamp(19px, 5.6vw, 25px); }
  .teacher-dossier {
    width: min(76vw, calc(78dvh * .558091));
    max-height: 78dvh;
  }
  .teacher-dossier-visual,
  .teacher-dossier .teacher-video,
  .teacher-dossier .teacher-animation {
    min-height: 0;
    height: 100%;
    max-height: 100%;
  }
  .teacher-dossier-copy { padding: 58px 14px 14px; }
  .teacher-dossier-copy h2 { font-size: clamp(20px, 6vw, 30px); }
  .teacher-dossier-role { margin-top: 6px; font-size: 8px; }
  .teacher-dossier-copy > p:last-child { margin-top: 7px; font-size: clamp(9px, 2.5vw, 11px); line-height: 1.28; -webkit-line-clamp: 3; }
  .inventory-toggle {
    width: clamp(28px, var(--lab-inventory-size), 56px);
    height: clamp(28px, var(--lab-inventory-size), 56px);
  }
  .secret-collectible { width: clamp(88px, 25vw, 124px); }
  .inventory-overlay {
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }
  .inventory-panel {
    max-height: none;
    padding: 10px;
    border-radius: 16px;
  }
  .inventory-header .modal-eyebrow,
  .inventory-intro,
  .inventory-card-copy > p:not(.inventory-card-status),
  .inventory-card a { display: none; }
  .inventory-header h2 { font-size: clamp(22px, 6vw, 30px); }
  .inventory-close { width: 44px; height: 44px; }
  .inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .inventory-card {
    grid-template-columns: minmax(58px, 42%) minmax(0, 1fr);
    min-height: 0;
  }
  .inventory-card-visual { min-height: 0; padding: 4px; }
  .inventory-card-visual img { max-height: 100%; }
  .inventory-card-copy { padding: 7px; }
  .inventory-card-status { margin-bottom: 3px; font-size: 8px; }
  .inventory-card h3 { font-size: clamp(12px, 3vw, 16px); }
  .tariff-dock {
    right: calc((100vw - var(--lab-stage-width)) / 2 + max(6px, env(safe-area-inset-right)));
    bottom: calc((100dvh - var(--lab-stage-height)) / 2 + max(6px, env(safe-area-inset-bottom)));
    grid-template-rows: max(36px, var(--lab-dock-mascot-height)) auto;
    width: clamp(44px, var(--lab-dock-width), 96px);
    padding: clamp(2px, min(.35vw, .62222dvh), 4px);
    border-radius: clamp(8px, min(1.1vw, 1.95556dvh), 14px);
  }
  .tariff-dock-label {
    min-height: 24px;
    padding: 3px 4px;
    border-radius: 7px;
    font-size: clamp(9px, var(--lab-small-label-size), 11px);
  }
  .restart-confirmation-card { padding: 20px; border-radius: 18px; }
}

@media (hover: none) and (pointer: coarse) {
  html,
  body {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
    background: #020504;
  }

  body {
    position: fixed;
    inset: 0;
  }

  .site {
    --lab-modal-width: min(94cqw, 167.111cqh);
    --lab-modal-height: min(94cqh, 52.875cqw);
    --lab-stage-width: min(100cqw, 177.778cqh);
    --lab-stage-height: min(100cqh, 56.25cqw);
    --lab-hotspot-size: min(4.3cqw, 7.64445cqh);
    --lab-dock-width: min(8.6cqw, 15.2889cqh);
    --lab-dock-mascot-height: min(7.4cqw, 13.1556cqh);
    --lab-stage-control-size: min(3.25cqw, 5.77778cqh);
    --lab-inventory-size: min(5.2cqw, 9.24445cqh);
    --lab-control-gap: min(.65cqw, 1.15556cqh);
    --lab-small-label-size: min(.92cqw, 1.63556cqh);
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    container-type: size;
    transform: translate(-50%, -50%);
    transform-origin: center;
  }

  .site,
  .terminal-intro,
  .lab-hub,
  .experience-overlay {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .terminal-intro,
  .lab-hub,
  .experience-overlay,
  .inventory-overlay {
    position: absolute;
    inset: 0;
  }

  .persistent-lab-hud {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--lab-stage-width);
    height: var(--lab-stage-height);
    transform: translate(-50%, -50%);
  }

  .terminal-stage,
  .lab-stage {
    width: var(--lab-stage-width);
    height: var(--lab-stage-height);
    aspect-ratio: 16 / 9;
  }

  .experience-overlay::before,
  .experience-overlay::after {
    position: absolute;
  }

  .overlay-controls {
    position: absolute;
  }

  .persistent-lab-hud .stage-controls {
    bottom: clamp(6px, 1.6%, 18px);
    left: clamp(6px, 1.6%, 18px);
  }

  .persistent-lab-hud .progress-panel {
    top: clamp(6px, 1.6%, 18px);
    left: clamp(6px, 1.6%, 18px);
  }

  .persistent-lab-hud .inventory-toggle {
    top: clamp(6px, 1.6%, 18px);
    right: clamp(6px, 1.6%, 18px);
  }

  .stage-controls .asset-button {
    width: max(44px, var(--lab-stage-control-size));
    min-width: 44px;
    height: max(44px, var(--lab-stage-control-size));
    min-height: 44px;
  }

  .inventory-toggle {
    width: clamp(28px, var(--lab-inventory-size), 76px);
    min-width: 0;
    height: clamp(28px, var(--lab-inventory-size), 76px);
    min-height: 0;
  }

  .game-mount[data-module="maze"],
  .game-mount[data-module="pipes"] {
    width: min(92cqw, 88cqh, 980px);
    height: min(92cqw, 88cqh, 980px);
  }

  .game-mount[data-module="tetris"] {
    width: min(86cqw, 79.12cqh, 860px);
    height: min(92cqh, 100cqw, 1000px);
  }

  .game-mount[data-module="director"],
  .game-mount[data-module="flasks"],
  .room-frame--fullscreen {
    width: var(--lab-stage-width);
    height: var(--lab-stage-height);
  }

  .modal-card {
    width: min(92cqw, 540px);
  }

  .teacher-dossier {
    width: min(68cqw, calc(74cqh * .558091), 470px);
    max-height: 74cqh;
  }

  .teacher-dossier-copy {
    padding:
      clamp(54px, 9cqh, 96px)
      clamp(16px, 2.2cqw, 26px)
      clamp(16px, 2.2cqw, 26px);
  }

  .inventory-panel {
    width: min(78cqw, 138.667cqh, 1440px);
    height: min(78cqh, 43.875cqw, 810px);
  }

  .legal-modal {
    width: min(76cqw, 760px);
    height: auto;
    max-height: 88cqh;
  }

  .restart-confirmation {
    width: min(90cqw, 440px);
  }

  .terminal-mascot {
    bottom: 3.75%;
    max-width: 48%;
    height: 50%;
  }

  .tariff-dock {
    position: absolute;
    right: calc((100cqw - var(--lab-stage-width)) / 2 + max(6px, env(safe-area-inset-right)));
    bottom: calc((100cqh - var(--lab-stage-height)) / 2 + max(6px, env(safe-area-inset-bottom)));
    grid-template-rows: max(36px, var(--lab-dock-mascot-height)) auto;
    width: clamp(44px, var(--lab-dock-width), 118px);
    padding: clamp(2px, .35cqw, 4px);
    border-radius: clamp(8px, 1.1cqw, 14px);
  }

  .tariff-dock-label {
    min-height: 28px;
    padding: 4px 5px;
    border-radius: 8px;
    font-size: clamp(9px, var(--lab-small-label-size), 14px);
  }

  .cryo-maze-hotspot {
    left: 56.353125%;
  }
}

@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .site {
    width: 100dvh;
    height: 100vw;
    transform: translate(-50%, -50%) rotate(90deg);
  }

  .legal-modal {
    transform: translate(-50%, -50%) rotate(90deg);
  }

  .restart-confirmation {
    transform: rotate(90deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
  .progress-panel.is-complete::before {
    opacity: .52;
    transform: none;
  }
  .progress-panel.is-complete img {
    filter:
      drop-shadow(0 5px 9px rgba(0, 0, 0, .7))
      drop-shadow(0 0 10px rgba(193, 255, 33, .5));
    transform: none;
  }
}
