:root {
  --ink: #050a0d;
  --panel: #0b151b;
  --panel-soft: #11232b;
  --line: #2a4651;
  --white: #f7fbff;
  --muted: #9bb0b9;
  --green: #33e28e;
  --green-deep: #079b5c;
  --blue: #29b9ed;
  --orange: #ffb21b;
  --danger: #ff655a;
}

* { box-sizing: border-box; }

html,
body { min-height: 100%; }

html { background: var(--ink); }

body {
  margin: 0;
  color: var(--white);
  background: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body.is-booting { overflow: hidden; }

button,
input { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ambient {
  position: fixed;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 20%, rgba(41, 185, 237, 0.12), transparent 31rem),
    radial-gradient(circle at 85% 82%, rgba(51, 226, 142, 0.12), transparent 32rem),
    linear-gradient(145deg, #04080b 0%, #071119 56%, #040a0c 100%);
}

.grid {
  position: absolute;
  inset: -20%;
  opacity: 0.17;
  transform: perspective(650px) rotateX(62deg) translateY(35%);
  transform-origin: center bottom;
  background-image:
    linear-gradient(rgba(41, 185, 237, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41, 185, 237, 0.25) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to top, #000, transparent 74%);
}

.orb {
  position: absolute;
  width: 35rem;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.13;
  animation: orb-drift 12s ease-in-out infinite alternate;
}

.orb-blue { top: -15rem; left: -10rem; background: var(--blue); }
.orb-green { right: -14rem; bottom: -18rem; background: var(--green); animation-delay: -5s; }

.particles { position: absolute; inset: 0; }

.particle {
  position: absolute;
  bottom: -2rem;
  width: 2px;
  height: var(--particle-height, 8px);
  border-radius: 999px;
  opacity: 0;
  background: linear-gradient(180deg, transparent, var(--green));
  box-shadow: 0 0 8px rgba(51, 226, 142, 0.6);
  animation: particle-rise var(--particle-speed, 12s) linear var(--particle-delay, 0s) infinite;
}

@keyframes orb-drift {
  to { transform: translate3d(3rem, 2rem, 0) scale(1.08); }
}

@keyframes particle-rise {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  12% { opacity: 0.55; }
  88% { opacity: 0.35; }
  100% { transform: translate3d(var(--particle-drift, 20px), -110vh, 0); opacity: 0; }
}

/* Entry screen */
.boot-screen {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(2, 7, 10, 0.98) 0%, rgba(2, 8, 11, 0.89) 46%, rgba(2, 7, 10, 0.72) 100%),
    url("/slides/slide-01.png?v=20260820-hd") center / cover no-repeat;
  transition: opacity 480ms ease, visibility 480ms ease;
}

.boot-screen::before {
  content: "";
  position: fixed;
  z-index: 0;
  top: 0;
  right: 7vw;
  width: clamp(44px, 7vw, 112px);
  height: 100%;
  transform: skewX(-10deg);
  background: linear-gradient(180deg, transparent, rgba(255, 178, 27, 0.13) 30%, rgba(255, 178, 27, 0.03));
  border-inline: 1px solid rgba(255, 178, 27, 0.22);
}

.boot-screen.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-scan {
  position: fixed;
  z-index: 1;
  inset: -20%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 46%, rgba(51, 226, 142, 0.09) 49%, transparent 52%);
  animation: boot-scan 5s linear infinite;
}

@keyframes boot-scan {
  from { transform: translateY(-40%); }
  to { transform: translateY(40%); }
}

.boot-card {
  position: relative;
  z-index: 2;
  width: min(860px, 100%);
  padding: clamp(25px, 5vw, 62px);
  border: 1px solid rgba(155, 176, 185, 0.28);
  border-left: 4px solid var(--green);
  background:
    linear-gradient(140deg, rgba(14, 29, 35, 0.96), rgba(5, 12, 16, 0.94)),
    var(--panel);
  box-shadow:
    0 40px 130px rgba(0, 0, 0, 0.75),
    0 0 60px rgba(51, 226, 142, 0.08),
    inset 0 1px rgba(255, 255, 255, 0.03);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
  animation: card-arrive 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.boot-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-left: 1px solid rgba(255, 178, 27, 0.7);
  background: rgba(255, 178, 27, 0.13);
}

@keyframes card-arrive {
  from { opacity: 0; transform: translateY(20px) scale(0.988); }
  to { opacity: 1; transform: none; }
}

.boot-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font: 750 0.69rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.14em;
}

.boot-meta span:first-child { color: var(--green); }
.boot-meta i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  animation: signal-pulse 1.6s ease-in-out infinite;
}

@keyframes signal-pulse { 50% { opacity: 0.3; } }

.boot-identity {
  margin: clamp(28px, 5vw, 52px) 0 8px;
  color: var(--blue);
  font: 750 clamp(0.65rem, 1.5vw, 0.78rem)/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
}

.boot-card h1 {
  max-width: 750px;
  margin: 0;
  font-size: clamp(2.15rem, 7.5vw, 5.35rem);
  font-weight: 900;
  line-height: 0.93;
  letter-spacing: -0.065em;
  text-transform: uppercase;
}

.boot-card h1 em {
  color: var(--green);
  font-style: normal;
  text-shadow: 0 0 34px rgba(51, 226, 142, 0.18);
}

.boot-copy {
  max-width: 600px;
  margin: 24px 0 30px;
  color: #c8d6dc;
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  line-height: 1.58;
}

.boot-actions {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
}

.initialize,
.silent-entry {
  min-height: 58px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.initialize {
  position: relative;
  min-width: min(100%, 285px);
  padding: 12px 48px 12px 20px;
  overflow: hidden;
  border: 1px solid var(--green);
  color: #03100a;
  text-align: left;
  background: linear-gradient(115deg, #83f9bc, var(--green));
  box-shadow: 0 0 28px rgba(51, 226, 142, 0.18);
}

.initialize::after {
  content: "›";
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  width: 42px;
  height: 100%;
  place-items: center;
  color: var(--white);
  background: #072219;
  font-size: 1.9rem;
}

.initialize span {
  display: block;
  font-weight: 900;
  letter-spacing: 0.055em;
}

.initialize small {
  display: block;
  margin-top: 2px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  opacity: 0.65;
}

.silent-entry {
  padding: 0 20px;
  border: 1px solid #37515c;
  color: #c0d0d6;
  background: rgba(8, 20, 25, 0.8);
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.initialize:hover,
.initialize:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 7px 34px rgba(51, 226, 142, 0.3);
}

.silent-entry:hover,
.silent-entry:focus-visible {
  transform: translateY(-2px);
  color: var(--white);
  border-color: var(--blue);
  background: rgba(20, 47, 58, 0.9);
}

.audio-note,
.boot-credit {
  color: #80959e;
  font-size: 0.66rem;
  line-height: 1.45;
}

.audio-note { margin: 14px 0 0; }
.boot-credit { margin: 7px 0 0; }
.boot-credit a { color: #b9ccd3; text-underline-offset: 2px; }

/* Viewer */
.viewer-shell {
  width: min(1540px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px clamp(12px, 3vw, 44px) 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: scale(0.992);
  pointer-events: none;
  transition: opacity 500ms ease 150ms, transform 500ms ease 150ms;
}

.viewer-shell.is-ready {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.viewer-header {
  width: min(1370px, 100%);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.identity { display: flex; align-items: center; gap: 12px; min-width: 0; }

.signal {
  width: 5px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--green), var(--blue));
  box-shadow: 0 0 24px rgba(51, 226, 142, 0.42);
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--green);
  font: 760 0.65rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.13em;
}

h2 {
  margin: 0;
  font-size: clamp(0.92rem, 2vw, 1.35rem);
  font-weight: 780;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.header-tools { display: flex; align-items: center; gap: 15px; }

.audio-dock {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(75, 103, 113, 0.55);
  border-radius: 8px;
  background: rgba(6, 14, 18, 0.72);
  backdrop-filter: blur(12px);
}

.icon-button {
  min-height: 31px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #7f969f;
  background: transparent;
  cursor: pointer;
  font-size: 0.72rem;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.icon-button span { margin-right: 5px; }
.icon-button b { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.07em; }
.icon-button[aria-pressed="true"] { color: var(--green); background: rgba(51, 226, 142, 0.08); }
.icon-button:hover,
.icon-button:focus-visible { border-color: var(--blue); color: var(--white); }

.volume-control { display: flex; align-items: center; gap: 5px; padding: 0 7px 0 5px; color: #80959e; }
.volume-control input { width: 72px; accent-color: var(--green); cursor: pointer; }

.counter {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
  font: 700 0.75rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
}

.counter span:first-child { color: var(--white); font-size: 1.03rem; font-weight: 850; }
.counter-divider { color: var(--orange); }

.stage {
  width: min(1370px, 100%);
  aspect-ratio: 16 / 9;
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(155, 176, 185, 0.38);
  border-radius: clamp(8px, 1.2vw, 16px);
  outline: none;
  background: #07121b;
  box-shadow: 0 28px 85px rgba(0, 0, 0, 0.58), 0 0 0 1px rgba(255, 255, 255, 0.025) inset;
  touch-action: pan-y;
}

.stage:focus-visible { box-shadow: 0 0 0 2px var(--green), 0 28px 85px rgba(0, 0, 0, 0.58); }

.slide-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  backface-visibility: hidden;
  transform-origin: center;
}

.slide-image.move-forward { animation: slide-forward 390ms cubic-bezier(0.2, 0.75, 0.2, 1) both; }
.slide-image.move-back { animation: slide-back 390ms cubic-bezier(0.2, 0.75, 0.2, 1) both; }

@keyframes slide-forward {
  from { opacity: 0.2; transform: translateX(1.1%) scale(1.012); filter: brightness(1.18); }
  to { opacity: 1; transform: none; filter: none; }
}

@keyframes slide-back {
  from { opacity: 0.2; transform: translateX(-1.1%) scale(1.012); filter: brightness(1.18); }
  to { opacity: 1; transform: none; filter: none; }
}

.stage-accent,
.scanlines,
.energy-wipe,
.final-halo { position: absolute; pointer-events: none; }

.stage-accent { z-index: 4; }
.stage-accent-blue { inset: 0 auto 0 0; width: 3px; background: linear-gradient(180deg, var(--blue), transparent 36%, var(--green)); }
.stage-accent-orange { top: 0; right: 0; width: 82px; height: 3px; background: linear-gradient(90deg, transparent, var(--orange)); }

.scanlines {
  z-index: 2;
  inset: 0;
  opacity: 0.12;
  background: repeating-linear-gradient(180deg, transparent 0, transparent 3px, rgba(2, 10, 12, 0.32) 4px);
  mix-blend-mode: multiply;
}

.energy-wipe {
  z-index: 5;
  inset: -35% -25%;
  opacity: 0;
  transform: translateX(-100%) skewX(-17deg);
  background: linear-gradient(90deg, transparent 20%, rgba(41, 185, 237, 0.17) 42%, rgba(51, 226, 142, 0.86) 50%, rgba(255, 255, 255, 0.62) 51%, rgba(51, 226, 142, 0.13) 58%, transparent 80%);
}

.energy-wipe.forward { animation: wipe-forward 410ms cubic-bezier(0.3, 0.7, 0.2, 1); }
.energy-wipe.back { animation: wipe-back 410ms cubic-bezier(0.3, 0.7, 0.2, 1); }

@keyframes wipe-forward {
  0% { opacity: 0; transform: translateX(-105%) skewX(-17deg); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translateX(105%) skewX(-17deg); }
}

@keyframes wipe-back {
  0% { opacity: 0; transform: translateX(105%) skewX(-17deg); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-105%) skewX(-17deg); }
}

.final-halo {
  z-index: 1;
  inset: -20%;
  opacity: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(51, 226, 142, 0.28), transparent 58%);
  transform: scale(0.7);
}

.stage.is-finale .final-halo { animation: final-bloom 2.6s ease-out both; }

@keyframes final-bloom {
  0% { opacity: 0; transform: scale(0.62); }
  30% { opacity: 0.65; }
  100% { opacity: 0; transform: scale(1.2); }
}

.edge-button {
  position: absolute;
  z-index: 6;
  top: 0;
  bottom: 0;
  width: clamp(50px, 7vw, 96px);
  border: 0;
  color: var(--white);
  background: transparent;
  opacity: 0;
  cursor: pointer;
  transition: opacity 150ms ease, background 150ms ease;
}

.edge-button span {
  display: grid;
  width: 38px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  background: rgba(5, 12, 16, 0.84);
  font-size: 2.2rem;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.edge-button-left { left: 0; padding-left: 12px; background: linear-gradient(90deg, rgba(5, 11, 15, 0.56), transparent); }
.edge-button-right { right: 0; padding-right: 12px; background: linear-gradient(-90deg, rgba(5, 11, 15, 0.56), transparent); }
.edge-button-right span { margin-left: auto; }
.stage:hover .edge-button:not(:disabled),
.edge-button:focus-visible { opacity: 1; }
.edge-button:disabled { cursor: default; }

.controls {
  width: min(1370px, 100%);
  margin: 12px auto 0;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 140px;
  align-items: center;
  gap: 18px;
}

.control-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--white);
  background: rgba(11, 21, 27, 0.88);
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.control-button:not(:disabled):hover,
.control-button:focus-visible { border-color: var(--green); background: var(--panel-soft); transform: translateY(-1px); }
.control-button-next { border-color: rgba(51, 226, 142, 0.5); }
.control-button:disabled { color: #516772; cursor: default; }

.progress { display: flex; align-items: center; justify-content: center; gap: clamp(5px, 0.7vw, 9px); }

.progress-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid #4b6672;
  border-radius: 99px;
  background: #233943;
  cursor: pointer;
  transition: width 150ms ease, background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.progress-dot:hover,
.progress-dot:focus-visible { border-color: var(--blue); background: var(--blue); }
.progress-dot.is-active { width: 27px; border-color: var(--green); background: var(--green); box-shadow: 0 0 12px rgba(51, 226, 142, 0.42); }

.viewer-footer {
  width: min(1370px, 100%);
  margin: 8px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: #718791;
  font-size: 0.64rem;
}

.viewer-footer p { margin: 0; }
.viewer-footer a { color: #92a8b1; text-underline-offset: 2px; }
kbd { padding: 1px 4px; border: 1px solid #3c5661; border-radius: 3px; background: #0d1b21; font: inherit; }

@media (max-width: 780px) {
  .boot-screen { padding: 12px; }
  .boot-card { padding: 27px 22px; clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%); }
  .boot-card::after { width: 18px; height: 18px; }
  .boot-card h1 { font-size: clamp(2rem, 12vw, 3.6rem); }
  .boot-copy { margin: 18px 0 22px; }
  .boot-actions { display: grid; }
  .initialize { width: 100%; }
  .silent-entry { min-height: 46px; }
  .viewer-shell { padding: 10px 8px 12px; justify-content: flex-start; }
  .viewer-header { align-items: flex-start; margin-bottom: 8px; }
  .identity { padding-top: 3px; }
  .signal { height: 34px; }
  .eyebrow { font-size: 0.53rem; }
  h2 { font-size: 0.84rem; }
  .header-tools { gap: 8px; }
  .audio-dock { padding: 3px; }
  .icon-button { padding: 0 7px; }
  .icon-button b { display: none; }
  .icon-button span { margin: 0; }
  .volume-control { display: none; }
  .stage { border-radius: 7px; }
  .controls { grid-template-columns: 92px minmax(0, 1fr) 92px; gap: 8px; margin-top: 10px; }
  .control-button { min-height: 38px; font-size: 0.7rem; }
  .progress { gap: 4px; }
  .progress-dot { width: 6px; height: 6px; }
  .progress-dot.is-active { width: 16px; }
  .viewer-footer { display: block; text-align: center; line-height: 1.5; }
  .music-credit { margin-top: 3px !important; }
}

@media (max-width: 430px) {
  .boot-meta span:last-child { display: none; }
  .boot-identity { letter-spacing: 0.07em; }
  .counter { display: none; }
  .controls { grid-template-columns: 82px minmax(0, 1fr) 82px; }
  .control-button span { display: none; }
  .hint { display: none; }
}

@media (max-height: 760px) and (min-width: 781px) {
  .viewer-shell { justify-content: flex-start; padding-top: 10px; }
  .viewer-header { margin-bottom: 7px; }
  .stage { width: min(1120px, calc((100vh - 142px) * 16 / 9)); }
  .viewer-header,
  .controls,
  .viewer-footer { width: min(1120px, calc((100vh - 142px) * 16 / 9)); }
  .controls { margin-top: 8px; }
  .viewer-footer { margin-top: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .particles,
  .boot-scan,
  .scanlines { display: none; }
}

/* Experience layer */
.boot-progress {
  width: min(410px, 100%);
  height: 5px;
  margin-top: 19px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 180ms ease;
}

.boot-progress i {
  height: 100%;
  flex: 1;
  background: #18352c;
  transform: scaleX(0.1);
  transform-origin: left;
}

.boot-screen.is-initializing .boot-progress { opacity: 1; }
.boot-screen.is-initializing .boot-progress i { animation: system-load 900ms ease forwards; }
.boot-screen.is-initializing .boot-progress i:nth-child(2) { animation-delay: 90ms; }
.boot-screen.is-initializing .boot-progress i:nth-child(3) { animation-delay: 180ms; }
.boot-screen.is-initializing .boot-progress i:nth-child(4) { animation-delay: 270ms; }
.boot-screen.is-initializing .boot-progress i:nth-child(5) { animation-delay: 360ms; }
.boot-screen.is-initializing .boot-progress i:nth-child(6) { animation-delay: 450ms; }
.boot-screen.is-initializing .boot-progress i:nth-child(7) { animation-delay: 540ms; }
.boot-screen.is-initializing .boot-progress i:nth-child(8) { animation-delay: 630ms; }

@keyframes system-load {
  0% { transform: scaleX(0.1); background: #18352c; box-shadow: none; }
  100% { transform: scaleX(1); background: var(--green); box-shadow: 0 0 12px rgba(51, 226, 142, 0.7); }
}

.boot-screen.is-initializing .boot-card {
  animation: boot-impact 2.35s cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.boot-screen.is-initializing .initialize {
  color: var(--green);
  border-color: var(--green);
  background: #071a14;
  box-shadow: 0 0 36px rgba(51, 226, 142, 0.25), inset 0 0 22px rgba(51, 226, 142, 0.08);
}

.boot-screen.is-initializing .initialize::after { content: "✓"; color: var(--green); }
.boot-screen.is-initializing .silent-entry { opacity: 0.25; pointer-events: none; }

@keyframes boot-impact {
  0% { transform: none; filter: brightness(1); }
  8% { transform: scale(0.992); filter: brightness(1.45); }
  13% { transform: scale(1.006); filter: brightness(1); }
  78% { transform: scale(1.006); }
  100% { transform: scale(1.055); filter: brightness(1.08); }
}

.voice-caption {
  position: fixed;
  z-index: 4;
  left: 50%;
  bottom: clamp(28px, 6vh, 74px);
  width: min(900px, calc(100% - 32px));
  padding: 13px 18px 15px;
  color: var(--white);
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 18px);
  border-top: 1px solid rgba(51, 226, 142, 0.75);
  background: linear-gradient(90deg, transparent, rgba(4, 15, 14, 0.88) 20%, rgba(4, 15, 14, 0.88) 80%, transparent);
  pointer-events: none;
}

.voice-caption span {
  display: block;
  margin-bottom: 3px;
  color: var(--green);
  font: 800 0.62rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.15em;
}

.voice-caption strong {
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-shadow: 0 0 28px rgba(51, 226, 142, 0.35);
}

.boot-screen.is-initializing .voice-caption {
  animation: voice-caption 2.3s 90ms ease both;
}

@keyframes voice-caption {
  0%, 7% { opacity: 0; transform: translate(-50%, 18px); }
  17%, 76% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -9px); }
}

.viewer-shell {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 610px;
  padding: 13px clamp(12px, 2.2vw, 35px) 11px;
  overflow: hidden;
}

.scene-backdrop {
  position: fixed;
  z-index: -1;
  inset: -6%;
  background: url("/slides/slide-01.png?v=20260820-hd") center / cover no-repeat;
  filter: blur(30px) brightness(0.3) saturate(1.25);
  opacity: 0.6;
  transform: scale(1.09) translate3d(var(--backdrop-x, 0), var(--backdrop-y, 0), 0);
  transition: opacity 340ms ease, filter 500ms ease, transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.scene-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 8, 11, 0.68), rgba(3, 8, 11, 0.14) 38%, rgba(3, 8, 11, 0.75)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 72px);
}

.scene-backdrop.is-shifting { opacity: 0.15; filter: blur(42px) brightness(0.18) saturate(1.8); transform: scale(1.18); }

.viewer-header,
.scene-label,
.controls,
.viewer-footer {
  position: relative;
  z-index: 3;
  width: min(1480px, 100%);
}

.viewer-header { margin-bottom: 6px; }

.scene-label {
  margin: 0 auto 7px;
  display: flex;
  align-items: baseline;
  gap: 13px;
  min-height: 18px;
  white-space: nowrap;
  overflow: hidden;
}

.scene-label span {
  color: var(--orange);
  font: 800 0.59rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.13em;
}

.scene-label strong {
  overflow: hidden;
  color: #d9e5e9;
  font-size: 0.68rem;
  font-weight: 830;
  letter-spacing: 0.075em;
  text-overflow: ellipsis;
}

.stage {
  width: min(1480px, calc((100svh - 178px) * 16 / 9), calc(100vw - 28px));
  max-height: calc(100svh - 178px);
  border-color: rgba(135, 173, 183, 0.43);
  border-radius: 4px;
  perspective: 1600px;
  box-shadow:
    0 38px 110px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(255, 255, 255, 0.035) inset,
    0 0 48px rgba(41, 185, 237, 0.07);
  transition: transform 260ms ease, filter 260ms ease, opacity 260ms ease, box-shadow 260ms ease;
}

.stage::before {
  content: "";
  position: absolute;
  z-index: 7;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 46px rgba(0, 0, 0, 0.11);
}

.stage.is-exiting {
  opacity: 0.18;
  filter: blur(11px) brightness(1.7) saturate(0.7);
  transform: scale(0.92) rotateX(1deg);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.6), 0 0 70px rgba(51, 226, 142, 0.18);
}

.slide-frame {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: translate3d(var(--scene-x, 0), var(--scene-y, 0), 0) rotateX(var(--scene-rx, 0deg)) rotateY(var(--scene-ry, 0deg)) scale(1.002);
  transition: transform 550ms cubic-bezier(0.2, 0.78, 0.2, 1);
  will-change: transform, opacity, filter;
}

.slide-frame.enter-forward { animation: scene-enter-forward 720ms cubic-bezier(0.16, 0.8, 0.2, 1) both; }
.slide-frame.enter-back { animation: scene-enter-back 720ms cubic-bezier(0.16, 0.8, 0.2, 1) both; }

@keyframes scene-enter-forward {
  0% { opacity: 0; filter: blur(15px) brightness(1.8); transform: translate3d(8%, 0, 90px) rotateY(-3deg) scale(1.1); }
  55% { opacity: 1; filter: blur(0) brightness(1.06); }
  100% { opacity: 1; filter: none; transform: translate3d(var(--scene-x, 0), var(--scene-y, 0), 0) rotateX(var(--scene-rx, 0deg)) rotateY(var(--scene-ry, 0deg)) scale(1.002); }
}

@keyframes scene-enter-back {
  0% { opacity: 0; filter: blur(15px) brightness(1.8); transform: translate3d(-8%, 0, 90px) rotateY(3deg) scale(1.1); }
  55% { opacity: 1; filter: blur(0) brightness(1.06); }
  100% { opacity: 1; filter: none; transform: translate3d(var(--scene-x, 0), var(--scene-y, 0), 0) rotateX(var(--scene-rx, 0deg)) rotateY(var(--scene-ry, 0deg)) scale(1.002); }
}

.slide-image {
  animation: none !important;
  transform: scale(1.006);
}

.stage-reticle {
  position: absolute;
  z-index: 8;
  inset: 9px;
  pointer-events: none;
}

.stage-reticle i { position: absolute; width: 23px; height: 23px; opacity: 0.58; }
.stage-reticle i:nth-child(1) { top: 0; left: 0; border-top: 1px solid var(--green); border-left: 1px solid var(--green); }
.stage-reticle i:nth-child(2) { top: 0; right: 0; border-top: 1px solid var(--orange); border-right: 1px solid var(--orange); }
.stage-reticle i:nth-child(3) { bottom: 0; left: 0; border-bottom: 1px solid var(--blue); border-left: 1px solid var(--blue); }
.stage-reticle i:nth-child(4) { right: 0; bottom: 0; border-right: 1px solid var(--green); border-bottom: 1px solid var(--green); }

.chapter-splash {
  position: fixed;
  z-index: 15;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 24px;
  color: var(--white);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  background:
    linear-gradient(90deg, transparent, rgba(3, 11, 13, 0.94) 23%, rgba(3, 11, 13, 0.94) 77%, transparent),
    repeating-linear-gradient(180deg, transparent 0, transparent 4px, rgba(51, 226, 142, 0.035) 5px);
  pointer-events: none;
}

.chapter-splash p {
  margin: 0 0 7px;
  color: var(--green);
  font: 850 0.7rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.2em;
}

.chapter-splash strong {
  max-width: 900px;
  font-size: clamp(1.75rem, 5vw, 4.8rem);
  font-weight: 930;
  line-height: 0.96;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  text-shadow: 0 0 45px rgba(41, 185, 237, 0.25);
}

.chapter-splash span {
  display: block;
  width: 0;
  height: 3px;
  margin: 20px auto 0;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--orange));
  box-shadow: 0 0 16px rgba(51, 226, 142, 0.55);
}

.chapter-splash.is-active {
  visibility: visible;
  animation: chapter-flash 790ms ease both;
}

.chapter-splash.is-active span { animation: chapter-line 600ms 90ms ease both; }

@keyframes chapter-flash {
  0% { opacity: 0; transform: scale(1.04); }
  18%, 62% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.985); }
}

@keyframes chapter-line { to { width: min(440px, 75vw); } }

.audio-visualizer {
  width: 22px;
  height: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-left: 3px;
}

.audio-visualizer i {
  width: 2px;
  height: 4px;
  border-radius: 4px;
  background: #536d77;
}

.audio-visualizer.is-playing i {
  background: var(--green);
  box-shadow: 0 0 6px rgba(51, 226, 142, 0.55);
  animation: audio-bars 650ms ease-in-out infinite alternate;
}

.audio-visualizer.is-playing i:nth-child(2) { animation-delay: -360ms; }
.audio-visualizer.is-playing i:nth-child(3) { animation-delay: -180ms; }
.audio-visualizer.is-playing i:nth-child(4) { animation-delay: -480ms; }

@keyframes audio-bars { to { height: 17px; } }

.controls { margin-top: 8px; }
.viewer-footer { margin-top: 5px; }

@media (max-width: 780px) {
  .viewer-shell { min-height: 510px; padding-top: 8px; }
  .scene-label { margin-bottom: 5px; padding-inline: 2px; }
  .scene-label span { font-size: 0.5rem; }
  .scene-label strong { font-size: 0.57rem; }
  .stage { width: calc(100vw - 16px); max-height: none; }
  .stage-reticle { inset: 5px; }
  .stage-reticle i { width: 13px; height: 13px; }
  .scene-backdrop { filter: blur(18px) brightness(0.25) saturate(1.25); }
  .chapter-splash strong { font-size: clamp(1.6rem, 9vw, 3rem); }
  .voice-caption { bottom: 22px; }
  .viewer-footer { margin-top: 4px; }
  .audio-visualizer { display: none; }
}

@media (max-height: 690px) and (min-width: 781px) {
  .scene-label { display: none; }
  .stage { width: min(1220px, calc((100svh - 122px) * 16 / 9)); max-height: calc(100svh - 122px); }
  .viewer-header,
  .controls,
  .viewer-footer { width: min(1220px, calc((100svh - 122px) * 16 / 9)); }
}

@media (prefers-reduced-motion: reduce) {
  .scene-backdrop { transform: scale(1.06); }
  .slide-frame { transform: none; }
  .chapter-splash.is-active { opacity: 1; }
}
