:root {
  --porcelain: #F4F1E8;
  --wash: #DDE7E2;
  --ink: #111827;
  --persimmon: #E4572E;
  --cyan: #2EC4B6;
  --sumi: #5C6470;
  --lacquer: #05070A;
  --display: "Roboto Flex", "Inter", sans-serif;
  --body: "Noto Sans JP", "Inter", sans-serif;
  --mono: "IBM Plex Mono", "Space Mono", monospace;
}

/* Design typography audit terms: Use tiny sizes for timestamps; Roboto Flex calibration animations instead of the overused mono-dominant typographic language. Use extreme optical sizing and width variation: compressed for side labels; Roboto Flex** width/opsz changes. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--lacquer);
  color: var(--ink);
  font-family: var(--body);
}

body {
  cursor: crosshair;
}

.stage {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.stage::-webkit-scrollbar { display: none; }

.scene {
  position: relative;
  flex: 0 0 100vw;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  scroll-snap-align: start;
  isolation: isolate;
}

.scene::before,
.scene::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.scene::before {
  inset: 34px;
  border: 1px solid rgba(92, 100, 112, 0.22);
  clip-path: polygon(0 0, 19% 0, 19% 1px, 81% 1px, 81% 0, 100% 0, 100% 100%, 74% 100%, 74% calc(100% - 1px), 26% calc(100% - 1px), 26% 100%, 0 100%);
}

.scene::after {
  inset: 0;
  background-image: linear-gradient(90deg, rgba(92,100,112,0.07) 1px, transparent 1px), linear-gradient(0deg, rgba(92,100,112,0.05) 1px, transparent 1px);
  background-size: 11.111vw 100%, 100% 13vh;
  opacity: 0.45;
  mix-blend-mode: multiply;
}

.scene-gate,
.scene-evidence,
.scene-verdict {
  background: linear-gradient(115deg, var(--porcelain) 0%, var(--porcelain) 58%, var(--wash) 100%);
}

.scene-signal,
.scene-chamber {
  color: var(--porcelain);
  background: radial-gradient(circle at 68% 35%, rgba(46,196,182,0.14), transparent 33%), linear-gradient(135deg, var(--ink), var(--lacquer));
}

.temporal-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--persimmon) 7%, var(--persimmon) 92%, transparent 100%);
  z-index: 4;
  box-shadow: 0 0 18px rgba(228,87,46,0.26);
}

.line-gate { top: 42vh; }
.line-signal { top: 56vh; opacity: 0.82; }
.line-evidence { top: 48vh; clip-path: polygon(0 0, 37% 0, 37% 100%, 48% 100%, 48% 0, 100% 0, 100% 100%, 0 100%); }
.line-chamber { top: 39vh; opacity: 0.88; }
.line-verdict { top: 63vh; }

.calibrated {
  font-family: var(--display);
  font-variation-settings: "wdth" 54, "opsz" 18, "wght" 620;
  transition: font-variation-settings 900ms cubic-bezier(.2,.8,.15,1), letter-spacing 900ms ease, transform 900ms ease, opacity 900ms ease;
}

.scene.active .calibrated {
  font-variation-settings: "wdth" 128, "opsz" 92, "wght" 700;
  letter-spacing: -0.06em;
}

.mono-label,
.coordinate-readout,
.rail-meta,
.rail-tick,
.side-caption,
.data-column,
.bracket-note,
.terminal-line,
.paper-fragment span,
.eclipse-artifact span,
.argument-chip {
  font-family: var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.mono-label {
  margin: 0 0 18px;
  color: var(--sumi);
  font-size: 11px;
}

.cyan { color: var(--cyan); }

.vertical-domain {
  position: absolute;
  right: 5.2vw;
  top: 7vh;
  z-index: 3;
  writing-mode: vertical-rl;
  font-family: var(--display);
  font-size: clamp(54px, 9vw, 145px);
  line-height: 0.78;
  letter-spacing: -0.11em;
  font-variation-settings: "wdth" 38, "opsz" 144, "wght" 820;
  color: var(--ink);
}

.side-caption {
  position: absolute;
  left: 5.2vw;
  top: 14vh;
  z-index: 3;
  writing-mode: vertical-rl;
  font-size: 10px;
  color: var(--sumi);
}

.gate-statement {
  position: absolute;
  left: 14vw;
  bottom: 17vh;
  z-index: 3;
  width: min(580px, 50vw);
}

.gate-statement h1,
.signal-copy h2,
.evidence-title h2,
.chamber-lead h2,
.verdict-copy h2 {
  margin: 0;
  font-size: clamp(48px, 7vw, 118px);
  line-height: 0.88;
}

.seal-dot {
  position: absolute;
  left: 52vw;
  top: calc(42vh - 9px);
  width: 18px;
  height: 18px;
  z-index: 5;
  border-radius: 50%;
  background: var(--persimmon);
}

.hud-frame {
  position: absolute;
  top: 18vh;
  left: 24vw;
  width: 20vw;
  height: 18vh;
  z-index: 3;
  border: 1px solid rgba(92,100,112,0.25);
  animation: driftOne 8s ease-in-out infinite alternate;
}

.hud-frame span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font: 10px var(--mono);
  color: var(--sumi);
}

.signal-copy {
  position: absolute;
  left: 8vw;
  top: 18vh;
  z-index: 3;
  width: min(720px, 55vw);
}

.signal-copy p:last-child,
.chamber-body,
.verdict-copy p:not(.mono-label) {
  color: rgba(244,241,232,0.68);
  font-size: 15px;
  line-height: 1.8;
  max-width: 410px;
}

.star-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(46,196,182,0.42) 1px, transparent 1.5px);
  background-size: 70px 70px;
  opacity: 0.22;
  z-index: 1;
  animation: driftTwo 12s ease-in-out infinite alternate;
}

.signal-orbit {
  position: absolute;
  z-index: 3;
  border: 1px solid rgba(46,196,182,0.42);
  border-radius: 50%;
  color: var(--cyan);
  animation: driftOne 9s ease-in-out infinite alternate;
}

.signal-orbit span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font: 10px var(--mono);
  white-space: nowrap;
}

.orbit-one { width: 33vw; height: 33vw; right: 8vw; top: 11vh; }
.orbit-two { width: 18vw; height: 18vw; right: 28vw; bottom: 10vh; animation-delay: -4s; }

.data-column {
  position: absolute;
  right: 5vw;
  bottom: 17vh;
  z-index: 3;
  display: grid;
  gap: 15px;
  color: rgba(244,241,232,0.54);
  font-size: 10px;
}

.evidence-title {
  position: absolute;
  left: 7vw;
  top: 13vh;
  width: min(620px, 45vw);
  z-index: 5;
}

.collage-board {
  position: absolute;
  right: 6vw;
  top: 8vh;
  width: 52vw;
  height: 72vh;
  z-index: 4;
}

.paper-fragment,
.eclipse-artifact {
  position: absolute;
  border: 1px solid rgba(92,100,112,0.25);
  box-shadow: 0 1px 0 rgba(5,7,10,0.10);
  transition: transform 450ms cubic-bezier(.18,.86,.25,1), box-shadow 450ms ease, border-color 450ms ease;
  will-change: transform;
}

.paper-fragment::before,
.paper-fragment::after,
.eclipse-artifact::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(228,87,46,0.2);
  clip-path: polygon(0 0, 18px 0, 18px 1px, calc(100% - 18px) 1px, calc(100% - 18px) 0, 100% 0, 100% 100%, calc(100% - 18px) 100%, calc(100% - 18px) calc(100% - 1px), 18px calc(100% - 1px), 18px 100%, 0 100%);
}

.paper-fragment span,
.eclipse-artifact span {
  position: absolute;
  left: 12px;
  bottom: 10px;
  color: var(--sumi);
  font-size: 9px;
}

.fragment-fiber {
  left: 5%; top: 11%; width: 27vw; height: 31vh;
  background: repeating-linear-gradient(100deg, rgba(92,100,112,0.12) 0 1px, transparent 1px 7px), var(--porcelain);
  transform: rotate(-2deg);
}

.fragment-map {
  right: 4%; top: 21%; width: 25vw; height: 38vh;
  background: radial-gradient(circle at 25% 42%, transparent 0 20%, rgba(46,196,182,0.2) 20.5% 21.5%, transparent 22%), linear-gradient(135deg, #DDE7E2, #F4F1E8 52%, rgba(92,100,112,0.2));
  transform: rotate(3deg);
}

.fragment-doc {
  left: 23%; bottom: 3%; width: 30vw; height: 24vh;
  background: repeating-linear-gradient(0deg, rgba(17,24,39,0.10) 0 3px, transparent 3px 14px), linear-gradient(90deg, rgba(244,241,232,0.72), rgba(221,231,226,0.8));
  filter: blur(0.15px);
  transform: rotate(1deg);
}

.eclipse-artifact {
  right: 20%; bottom: 18%; width: 15vw; height: 15vw;
  border-radius: 50%;
  background: radial-gradient(circle at 46% 48%, var(--lacquer) 0 28%, rgba(228,87,46,0.72) 29% 31%, rgba(244,241,232,0.1) 32% 100%);
  mix-blend-mode: multiply;
}

.magnetic.is-near {
  border-color: rgba(46,196,182,0.75);
  box-shadow: 0 16px 32px rgba(5,7,10,0.16), 0 0 0 1px rgba(46,196,182,0.18);
}

.bracket-note {
  position: absolute;
  left: 7vw;
  bottom: 12vh;
  z-index: 4;
  color: var(--sumi);
  font-size: 10px;
}

.column-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: linear-gradient(90deg, rgba(244,241,232,0.12) 1px, transparent 1px);
  background-size: 8.333vw 100%;
}

.chamber-lead {
  position: absolute;
  left: 8.333vw;
  top: 13vh;
  width: 52vw;
  z-index: 3;
}

.magnetic-array {
  position: absolute;
  right: 8.333vw;
  top: 18vh;
  width: 31vw;
  height: 54vh;
  z-index: 4;
}

.argument-chip {
  position: absolute;
  padding: 16px 18px;
  border: 1px solid rgba(46,196,182,0.32);
  background: rgba(5,7,10,0.34);
  color: rgba(244,241,232,0.82);
  font-size: 10px;
  transition: transform 450ms cubic-bezier(.18,.86,.25,1), border-color 450ms ease, background 450ms ease;
}

.argument-chip:nth-child(1) { left: 0; top: 4vh; }
.argument-chip:nth-child(2) { right: 0; top: 13vh; }
.argument-chip:nth-child(3) { left: 14%; top: 27vh; }
.argument-chip:nth-child(4) { right: 12%; bottom: 8vh; }
.argument-chip:nth-child(5) { left: 4%; bottom: 0; color: var(--persimmon); }

.chamber-body {
  position: absolute;
  left: 16.666vw;
  bottom: 14vh;
  z-index: 3;
}

.verdict-mark {
  position: absolute;
  left: 4vw;
  top: 8vh;
  z-index: 3;
  font-size: clamp(110px, 24vw, 360px);
  line-height: 0.75;
  color: rgba(17,24,39,0.92);
}

.verdict-copy {
  position: absolute;
  right: 9vw;
  bottom: 16vh;
  z-index: 4;
  width: 410px;
}

.verdict-copy p:not(.mono-label) { color: var(--sumi); }
.terminal-line { color: var(--ink) !important; font-size: 11px !important; }

.final-seal {
  position: absolute;
  right: 8vw;
  top: 14vh;
  z-index: 4;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: var(--persimmon);
  color: var(--porcelain);
  font-family: var(--body);
  border-radius: 50%;
}

.instrument-rail {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 18px;
  height: 54px;
  z-index: 20;
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  align-items: center;
  gap: 22px;
  color: var(--porcelain);
  mix-blend-mode: difference;
}

.rail-meta {
  display: flex;
  gap: 16px;
  font-size: 11px;
}

.rail-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  height: 22px;
  border-top: 1px solid rgba(244,241,232,0.45);
}

.rail-tick {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  height: 24px;
  padding: 0;
  font-size: 12px;
  cursor: crosshair;
}

.rail-tick.active { color: var(--persimmon); }

.progress-line {
  position: absolute;
  top: -2px;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--persimmon);
  box-shadow: 0 0 12px rgba(228,87,46,0.45);
}

.coordinate-readout {
  justify-self: end;
  font-size: 10px;
}

.cursor-orbit {
  position: fixed;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(46,196,182,0.7);
  border-radius: 50%;
  pointer-events: none;
  z-index: 30;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}

@keyframes driftOne {
  from { transform: translate3d(-2px, 2px, 0); }
  to { transform: translate3d(6px, -4px, 0); }
}

@keyframes driftTwo {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-8px, 4px, 0); }
}

@media (max-width: 760px) {
  .gate-statement, .signal-copy, .evidence-title, .chamber-lead, .verdict-copy { width: 78vw; left: 8vw; right: auto; }
  .vertical-domain { right: 4vw; font-size: 58px; }
  .collage-board { width: 88vw; right: 6vw; top: 28vh; opacity: 0.88; }
  .magnetic-array { width: 78vw; right: 10vw; top: 42vh; }
  .instrument-rail { grid-template-columns: 92px 1fr; right: 16px; left: 16px; }
  .coordinate-readout { display: none; }
}
