@charset "UTF-8";

:root {
  --ink: #10242a;
  --ink-soft: #405a60;
  --night: #0c171d;
  --night-2: #14272d;
  --paper: #f3efe7;
  --paper-warm: #e9ded0;
  --teal: #176d6b;
  --teal-bright: #47c6b6;
  --orange: #e45d38;
  --orange-soft: #f4a075;
  --lime: #a9bf55;
  --line: rgba(30, 58, 63, .18);
  --glass: rgba(10, 25, 31, .91);
  --shadow: 0 22px 65px rgba(4, 13, 17, .26);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--night);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body { overflow: hidden; background: var(--night); }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, [role="button"]:focus-visible { outline: 3px solid #f4bb58; outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------- Title ---------- */

.title-screen {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background:
    linear-gradient(112deg, #f4efe6 0 44%, rgba(244,239,230,.86) 56%, rgba(13,29,35,.16) 75%),
    linear-gradient(180deg, #90bbb7 0%, #d4ddd5 47%, #15282e 100%);
}

.title-sky, .title-cast { position: absolute; inset: 0; pointer-events: none; }
.title-grid {
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(24,77,78,.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24,77,78,.25) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, #000 0 48%, transparent 77%);
}
.title-sky::after {
  content: "";
  position: absolute;
  left: -8vw;
  bottom: -20vh;
  width: 72vw;
  height: 50vh;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(40,126,118,.24), transparent 66%);
}
.runway-line { position: absolute; left: 49%; bottom: -9vh; width: 1px; height: 65vh; background: rgba(255,255,255,.58); transform-origin: bottom; }
.runway-line.line-a { transform: rotate(63deg); }
.runway-line.line-b { transform: rotate(78deg); }
.title-orbit { position: absolute; right: 4vw; top: 10vh; width: 42vw; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.32); border-radius: 50%; transform: rotate(-20deg); }

.title-character { position: absolute; margin: 0; }
.title-character img { display: block; width: 100%; height: 100%; object-fit: contain; }
.title-alfa { right: 18vw; bottom: -9vh; width: min(41vw, 610px); height: 108vh; z-index: 2; }
.title-alfa img { filter: saturate(.95) contrast(1.02); }
.title-q { right: -5vw; bottom: -12vh; width: min(37vw, 555px); height: 103vh; z-index: 1; opacity: .78; }
.title-q img { filter: saturate(.7) contrast(.98); }
.title-m0 { right: 4vw; bottom: 2vh; width: min(29vw, 440px); aspect-ratio: 1.5; z-index: 3; animation: title-hover 4.5s ease-in-out infinite; }
.title-m0 img { filter: drop-shadow(0 18px 28px rgba(5,15,18,.3)); }

.title-copy { position: relative; z-index: 5; width: min(610px, 46vw); margin-left: clamp(34px, 8vw, 150px); padding-top: clamp(52px, 11vh, 120px); }
.title-copy h1 { margin: 0; color: #102c32; font-family: "STZhongsong", "Songti SC", serif; font-weight: 900; letter-spacing: -.06em; }
.title-copy h1 span { display: block; font-size: clamp(54px, 6.4vw, 105px); line-height: .98; }
.title-copy h1 small { display: block; margin-top: 8px; margin-left: .08em; color: var(--orange); font-size: clamp(28px, 3.05vw, 50px); line-height: 1; letter-spacing: .22em; }
.title-lead { margin: clamp(24px, 4vh, 44px) 0 0; color: #304a50; font-size: clamp(15px, 1.25vw, 20px); font-weight: 520; line-height: 1.85; letter-spacing: .04em; }
.title-actions { display: flex; gap: 12px; align-items: stretch; margin-top: clamp(25px, 4.5vh, 48px); }
.title-primary, .title-secondary { min-width: 190px; padding: 15px 20px; border: 0; text-align: left; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.title-primary { color: #fff; background: var(--orange); box-shadow: 0 12px 28px rgba(199,70,39,.22); }
.title-secondary { color: #17363b; background: rgba(255,255,255,.54); border: 1px solid rgba(23,71,73,.25); backdrop-filter: blur(10px); }
.title-primary:hover, .title-secondary:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(13,39,44,.18); }
.title-actions span, .title-actions small { display: block; }
.title-actions span { font-size: 15px; font-weight: 800; letter-spacing: .03em; }
.title-actions small { margin-top: 5px; opacity: .66; font: 700 9px/1 ui-monospace, "Cascadia Code", monospace; letter-spacing: .16em; }
.title-note { margin: 17px 0 0; color: #667c7f; font-size: 11px; letter-spacing: .04em; }
.title-version { position: absolute; z-index: 5; left: 26px; bottom: 22px; margin: 0; color: rgba(19,52,58,.54); font: 700 9px/1 ui-monospace, monospace; letter-spacing: .17em; writing-mode: vertical-rl; }

/* ---------- VN stage ---------- */

.vn-game, .vn-stage { width: 100%; height: 100vh; height: 100dvh; }
.vn-stage { position: relative; isolation: isolate; overflow: hidden; background: #cad5cf; }
.scene-backdrop { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(180deg, #cbd9d4 0 56%, #778c8a 56% 100%); transition: filter .8s ease, background .8s ease; }
.night-window { position: absolute; z-index: 1; left: 5vw; top: 8vh; width: 31vw; height: 49vh; overflow: hidden; border: 10px solid #dbe1dc; box-shadow: inset 0 0 0 2px #53696c, 0 18px 38px rgba(12,27,32,.17); background: linear-gradient(180deg, #172b39, #244951 67%, #0a1d24 68%); }
.night-window::before { content: ""; position: absolute; inset: 0; opacity: .32; background: radial-gradient(circle at 78% 20%, #d8ece5 0 2%, transparent 2.2%), linear-gradient(115deg, transparent 44%, rgba(227,245,239,.15) 45%, transparent 46%); }
.night-window i { position: absolute; z-index: 2; background: #cbd4cf; }
.night-window i:nth-child(1) { left: 49%; top: 0; width: 7px; height: 100%; }
.night-window i:nth-child(2) { left: 0; top: 58%; width: 100%; height: 7px; }
.night-window i:nth-child(3) { right: 18%; top: 0; width: 3px; height: 100%; opacity: .55; }
.campus-lights { position: absolute; left: 0; right: 0; bottom: 10%; height: 24%; opacity: .7; background: radial-gradient(circle at 7% 80%, #f0b55d 0 2px, transparent 3px), radial-gradient(circle at 21% 47%, #f0b55d 0 2px, transparent 3px), radial-gradient(circle at 36% 75%, #e9c680 0 2px, transparent 3px), radial-gradient(circle at 68% 50%, #f0b55d 0 2px, transparent 3px), linear-gradient(165deg, transparent 48%, #16272c 49% 67%, transparent 68%); }
.ceiling-light { position: absolute; z-index: 2; top: -6vh; width: 22vw; height: 18vh; background: radial-gradient(ellipse, rgba(255,255,240,.98) 0 16%, rgba(255,255,235,.28) 31%, transparent 70%); }
.light-left { left: 36vw; }
.light-right { right: 7vw; }
.lab-wall { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0 39%, rgba(230,233,221,.35) 39% 100%), linear-gradient(180deg, transparent 0 55.5%, rgba(27,55,60,.2) 55.8% 56%, transparent 56.2%); }
.wall-number { position: absolute; right: 3vw; top: 17vh; color: rgba(19,58,63,.15); font: 900 clamp(55px, 8vw, 130px)/1 ui-monospace, monospace; letter-spacing: -.08em; }
.wall-rule { position: absolute; right: 4vw; top: 34vh; width: 27vw; height: 2px; background: rgba(22,76,76,.18); }
.safety-card { position: absolute; right: 6vw; top: 37vh; padding-left: 12px; color: rgba(20,56,61,.53); border-left: 3px solid var(--orange); font: 750 10px/1.7 ui-monospace, monospace; letter-spacing: .13em; }
.lab-bench { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 42vh; background: linear-gradient(178deg, #829693 0 5%, #435c5e 5.3% 8%, #728481 8.3% 100%); clip-path: polygon(0 12%, 100% 0, 100% 100%, 0 100%); }
.bench-edge { position: absolute; top: 6%; left: 0; right: 0; height: 14px; background: linear-gradient(180deg, #d3d3c8, #596b69); transform: rotate(-.7deg); }
.instrument-rack { position: absolute; right: 11vw; top: 17%; width: 25vw; height: 21vh; border: 5px solid #344b4e; border-radius: 5px; background: linear-gradient(180deg, #e2e0d5, #a8b4ac); box-shadow: 0 18px 25px rgba(13,31,36,.26); }
.instrument-rack::before { content: "STRAIN / 8 CH"; position: absolute; inset: 13% 8% auto; height: 42%; padding: 9px; color: #6ee0ca; background: #12282d; border: 3px solid #51676a; font: 700 9px/1 ui-monospace, monospace; letter-spacing: .12em; box-shadow: inset 0 0 18px rgba(38,203,181,.16); }
.instrument-rack::after { content: "●  ●  ●  ●"; position: absolute; left: 10%; bottom: 13%; color: #d95b39; font-size: 10px; letter-spacing: 1.2em; }
.beam-rig { position: absolute; z-index: 4; left: 16vw; right: 24vw; bottom: 29vh; height: 12vh; filter: drop-shadow(0 13px 10px rgba(8,23,28,.26)); }
.beam-rig .beam { position: absolute; left: 0; right: 0; height: 12px; border: 1px solid #4b5151; background: linear-gradient(180deg, #e6e5dc, #86918d 60%, #4c5857); }
.beam-rig .upper { top: 30px; }
.beam-rig .lower { top: 42px; }
.support { position: absolute; top: 54px; width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent; border-bottom: 30px solid #263e43; }
.support.pin { left: 2%; }
.support.roller { right: 2%; }
.support.roller::after { content: ""; position: absolute; left: -15px; top: 27px; width: 30px; height: 6px; border-radius: 50%; background: #d7d7ca; }
.load-point { position: absolute; top: -7px; width: 2px; height: 36px; background: #d94f31; }
.load-point::before { content: ""; position: absolute; left: -5px; bottom: -2px; width: 10px; height: 10px; border-right: 2px solid #d94f31; border-bottom: 2px solid #d94f31; transform: rotate(45deg); }
.load-point.left { left: 31%; }
.load-point.right { right: 31%; }
.desk-lamp { position: absolute; z-index: 3; left: 41vw; top: 8vh; width: 1px; height: 49vh; background: linear-gradient(#455d60 0 45%, transparent 45%); transform: rotate(-12deg); transform-origin: bottom; }
.desk-lamp::after { content: ""; position: absolute; left: -38px; top: 33%; width: 78px; height: 35px; border-radius: 60px 60px 8px 8px; background: #354f52; box-shadow: 0 25px 55px 15px rgba(255,244,193,.2); }
.scene-vignette { position: absolute; z-index: 7; inset: 0; pointer-events: none; box-shadow: inset 0 0 140px rgba(7,19,24,.2); }
.scene-grain { position: absolute; z-index: 8; inset: 0; pointer-events: none; opacity: .08; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E"); mix-blend-mode: multiply; }

.vn-stage[data-scene="dark-lab"] .scene-backdrop { filter: brightness(.2) saturate(.65); }
.vn-stage[data-scene="dark-lab"] .ceiling-light { opacity: 0; }
.vn-stage[data-scene="dark-lab"] .instrument-rack::after { color: #ff5a32; text-shadow: 0 0 16px #ff4c28; }
.vn-stage[data-scene="morning-lab"] .scene-backdrop { filter: brightness(1.08) saturate(.88); background: linear-gradient(180deg, #edf0e5 0 56%, #819692 56%); }
.vn-stage[data-scene="morning-lab"] .night-window { background: linear-gradient(180deg, #ccdcd8, #e9d5a4 58%, #63807d 59%); }
.vn-stage[data-scene="report"] .beam-rig { opacity: .24; }
.vn-stage[data-scene="report"] .desk-lamp { transform: rotate(-31deg); }

.story-bar { position: absolute; z-index: 40; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: max(18px, env(safe-area-inset-top)) 24px 0; color: #183a3e; pointer-events: none; }
.scene-stamp { display: grid; grid-template-columns: auto auto; gap: 3px 10px; padding: 10px 12px; background: rgba(239,240,229,.67); border-left: 3px solid var(--orange); backdrop-filter: blur(12px); box-shadow: 0 8px 24px rgba(16,40,44,.08); }
.scene-stamp span { grid-column: 1 / -1; color: var(--orange); font: 800 8px/1 ui-monospace, monospace; letter-spacing: .18em; }
.scene-stamp b { font-size: 11px; line-height: 1.2; letter-spacing: .04em; }
.scene-stamp time { color: #577276; font: 700 10px/1.2 ui-monospace, monospace; }
.story-controls { display: flex; gap: 6px; pointer-events: auto; }
.story-controls button { display: flex; gap: 7px; align-items: center; min-height: 35px; padding: 7px 9px; color: #294b4e; background: rgba(240,241,231,.68); border: 1px solid rgba(26,70,72,.18); backdrop-filter: blur(12px); transition: background .18s ease, color .18s ease; }
.story-controls button:hover { color: #fff; background: rgba(20,76,75,.88); }
.story-controls span { font-size: 10px; font-weight: 750; }
.story-controls kbd { padding: 2px 4px; color: inherit; background: rgba(255,255,255,.28); border: 1px solid currentColor; border-radius: 2px; font: 700 8px/1 ui-monospace, monospace; opacity: .65; }
.vn-stage[data-scene="dark-lab"] .story-bar { color: #dce9e4; }
.vn-stage[data-scene="dark-lab"] .scene-stamp, .vn-stage[data-scene="dark-lab"] .story-controls button { color: #dce8e4; background: rgba(8,22,27,.55); border-color: rgba(174,220,211,.18); }

/* ---------- Characters ---------- */

.character-stage { position: absolute; inset: 0; pointer-events: none; }
.vn-character {
  --entry-y: 24px;
  --speak-y: 0px;
  --stance-x: 0px;
  --stance-y: 0px;
  --stance-rotate: 0deg;
  --actor-scale: .98;
  position: absolute;
  z-index: 12;
  bottom: 16vh;
  margin: 0;
  opacity: 0;
  transition: opacity .38s ease;
}
.character-motion, .character-body { position: absolute; inset: 0; transform-origin: 50% 100%; }
.character-body {
  transform: translate3d(var(--stance-x), calc(var(--entry-y) + var(--speak-y) + var(--stance-y)), 0) rotate(var(--stance-rotate)) scale(var(--actor-scale));
  transition: transform .48s cubic-bezier(.2,.75,.2,1), filter .32s ease;
}
.character-sprite { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .2s ease, filter .32s ease; }
.character-sprite.is-active { opacity: 1; }
.vn-character.is-visible { --entry-y: 0px; --actor-scale: 1; opacity: .82; }
.vn-character.is-speaking { --speak-y: -5px; --actor-scale: 1.025; z-index: 13; opacity: 1; }
.vn-character.is-speaking .character-body { filter: drop-shadow(0 22px 25px rgba(20,40,43,.2)); }
.vn-character.is-dim { opacity: .52; }
.vn-character.is-dim .character-body { filter: saturate(.65) brightness(.83); }
.vn-character.alfa { left: 12vw; width: min(37vw, 540px); height: 82vh; }
.vn-character.q { right: 7vw; width: min(35vw, 500px); height: 86vh; }
.vn-character.m0 { left: 5vw; bottom: 38vh; width: min(28vw, 405px); height: 28vw; max-height: 270px; }
.vn-character.m0 .character-body { filter: drop-shadow(0 18px 14px rgba(12,30,34,.24)); }
.vn-character.stage-left.alfa { left: 4vw; }
.vn-character.stage-center.alfa { left: 30vw; }
.vn-character.stage-left.q { right: auto; left: 6vw; }
.vn-character.stage-center.q { right: 30vw; }
.vn-character.stage-right.m0 { left: auto; right: 5vw; }
.vn-character.stage-center.m0 { left: 36vw; }

.vn-character.alfa.stance-engage { --stance-x: 7px; --stance-rotate: -.35deg; }
.vn-character.alfa.stance-think { --stance-y: 2px; --stance-rotate: .3deg; }
.vn-character.alfa.stance-discover { --stance-y: -4px; --stance-rotate: -.25deg; }
.vn-character.alfa.stance-serious { --stance-x: -2px; --stance-y: 2px; }
.vn-character.alfa.stance-rare_state { --stance-y: 7px; --stance-rotate: .35deg; }
.vn-character.q.stance-engage { --stance-x: -4px; --stance-rotate: .2deg; }
.vn-character.q.stance-think { --stance-y: 2px; --stance-rotate: .25deg; }
.vn-character.q.stance-discover { --stance-y: -3px; }
.vn-character.q.stance-serious { --stance-y: 1px; --stance-rotate: -.15deg; }
.vn-character.q.stance-rare_state { --stance-y: 5px; }

.vn-character.m0.motion-hover .character-motion { animation: m0-hover 4s ease-in-out infinite; }
.vn-character.m0.motion-scan .character-motion { animation: m0-scan 2.8s ease-in-out infinite; }
.vn-character.m0.motion-focus .character-motion { animation: m0-focus 3.4s ease-in-out infinite; }
.vn-character.m0.motion-alert .character-motion { animation: m0-alert 1.8s ease-in-out infinite; }
.vn-character.m0.motion-flat .character-motion { animation: m0-flat 4.8s ease-in-out infinite; }
.vn-character.motion-lean-in .character-motion { animation: character-lean-in .42s cubic-bezier(.2,.75,.2,1); }
.vn-character.motion-settle .character-motion { animation: character-settle .52s ease; }
.vn-character.motion-recoil .character-motion { animation: character-recoil .46s ease; }
.vn-character.motion-nod .character-motion { animation: character-nod .52s ease; }
.vn-character.motion-check .character-motion { animation: character-check .62s ease; }
.vn-stage[data-scene="dark-lab"] .vn-character.alfa,
.vn-stage[data-scene="dark-lab"] .vn-character.q { opacity: 0; }

.evidence-whisper { position: absolute; z-index: 31; top: 17vh; left: 50%; width: min(540px, 54vw); padding: 14px 18px; color: #18383c; background: rgba(244,241,230,.82); border-top: 1px solid rgba(30,79,79,.25); border-bottom: 1px solid rgba(30,79,79,.25); backdrop-filter: blur(14px); transform: translateX(-50%); box-shadow: 0 12px 35px rgba(11,35,39,.1); }
.evidence-whisper p { margin: 0; font-size: 12px; line-height: 1.7; font-weight: 650; }

/* ---------- Dialogue and choices ---------- */

.dialogue-box { position: absolute; z-index: 50; left: 50%; bottom: max(24px, calc(env(safe-area-inset-bottom) + 14px)); display: grid; grid-template-columns: 116px minmax(0, 1fr) 30px; grid-template-rows: 32px minmax(70px, auto); width: min(1160px, calc(100vw - 76px)); min-height: 156px; padding: 0; overflow: visible; color: #eef5f1; text-align: left; background: linear-gradient(110deg, rgba(9,24,30,.96), rgba(18,47,52,.92)); border: 1px solid rgba(181,226,215,.29); border-radius: 0; box-shadow: 0 25px 70px rgba(3,13,17,.35), inset 0 0 50px rgba(65,167,151,.05); backdrop-filter: blur(18px); transform: translateX(-50%); }
.dialogue-box::before { content: ""; position: absolute; left: -8px; top: -8px; width: 33%; height: 3px; background: linear-gradient(90deg, var(--orange), transparent); }
.dialogue-box::after { content: ""; position: absolute; right: 10px; bottom: 9px; width: 74px; height: 1px; background: rgba(133,208,195,.28); }
.speaker-name { grid-column: 1; grid-row: 1 / 3; align-self: start; min-width: 134px; margin: -17px 0 0 20px; padding: 13px 18px 11px; color: #fff; background: var(--orange); font: 850 18px/1 "STZhongsong", "Songti SC", serif; letter-spacing: .04em; box-shadow: 0 9px 22px rgba(202,69,37,.22); }
.speaker-name.narrator { color: #b9d2cb; background: #173b3e; }
.speaker-role { grid-column: 1; grid-row: 2; align-self: end; margin: 0 0 20px 20px; color: #7fa7a1; font: 750 8px/1 ui-monospace, monospace; letter-spacing: .13em; text-transform: uppercase; }
.dialogue-text { grid-column: 2; grid-row: 1 / 3; align-self: center; min-height: 84px; padding: 26px 28px 24px 34px; font-family: "STZhongsong", "Songti SC", "Microsoft YaHei", serif; font-size: clamp(15px, 1.25vw, 19px); font-weight: 520; line-height: 1.95; letter-spacing: .035em; white-space: pre-wrap; }
.advance-mark { grid-column: 3; grid-row: 2; align-self: end; justify-self: center; width: 15px; height: 19px; margin-bottom: 18px; }
.advance-mark i { display: block; width: 9px; height: 9px; border-right: 2px solid var(--teal-bright); border-bottom: 2px solid var(--teal-bright); transform: rotate(45deg); animation: advance 1.15s ease-in-out infinite; }
.dialogue-box.is-typing .advance-mark { opacity: .28; }
.dialogue-box[hidden] + .story-hint { display: none; }
.story-hint { position: absolute; z-index: 49; left: 50%; bottom: 6px; margin: 0; color: rgba(222,239,233,.63); font: 650 8px/1 ui-monospace, monospace; letter-spacing: .1em; transform: translateX(-50%); }

.choice-layer { position: absolute; z-index: 55; inset: 0; display: grid; place-items: center; padding: 10vh 20px 29vh; background: rgba(5,17,21,.26); backdrop-filter: blur(3px); }
.choice-card { width: min(700px, 88vw); padding: 26px; background: rgba(244,241,231,.95); border: 1px solid rgba(255,255,255,.75); box-shadow: var(--shadow); }
.choice-card > p { margin: 0 0 17px; color: #5b7072; font-size: 12px; font-weight: 700; letter-spacing: .07em; }
.choice-list { display: grid; gap: 9px; }
.choice-list button { position: relative; width: 100%; min-height: 52px; padding: 13px 50px 13px 17px; color: #18353a; text-align: left; background: rgba(255,255,255,.62); border: 1px solid rgba(22,75,75,.21); transition: color .18s ease, background .18s ease, transform .18s ease; }
.choice-list button::after { content: "→"; position: absolute; right: 17px; top: 50%; color: var(--orange); transform: translateY(-50%); }
.choice-list button:hover { color: #fff; background: var(--teal); transform: translateX(4px); }
.choice-list strong { display: block; font-size: 14px; }
.choice-list small { display: block; margin-top: 4px; opacity: .68; font-size: 10px; line-height: 1.5; }

/* ---------- Chapter curtain ---------- */

.chapter-curtain { position: absolute; z-index: 80; inset: 0; display: grid; place-content: center; color: #eef4ef; text-align: center; background: #0d2025; animation: curtain-in .45s ease both; }
.chapter-curtain::before, .chapter-curtain::after { content: ""; position: absolute; left: 50%; width: min(640px, 62vw); height: 1px; background: linear-gradient(90deg, transparent, rgba(119,202,188,.5), transparent); transform: translateX(-50%); }
.chapter-curtain::before { top: 33%; }
.chapter-curtain::after { bottom: 31%; }
.chapter-curtain h2 { margin: 0; font-family: "STZhongsong", "Songti SC", serif; font-size: clamp(34px, 5vw, 74px); letter-spacing: .12em; }
.chapter-curtain span { margin-top: 18px; color: #8da7a3; font-size: 11px; letter-spacing: .14em; }

/* ---------- Diegetic experiment close-ups ---------- */

.interaction-layer { position: absolute; z-index: 70; inset: 0; padding: max(54px, 7vh) clamp(18px, 5vw, 82px) max(24px, 4vh); background: rgba(9,24,29,.82); backdrop-filter: blur(15px) saturate(.72); }
.interaction-focus { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(1240px, 100%); height: 100%; margin: auto; overflow: hidden; color: var(--ink); background: linear-gradient(145deg, rgba(247,244,233,.98), rgba(220,228,219,.97)); border: 1px solid rgba(255,255,255,.55); box-shadow: 0 35px 90px rgba(0,0,0,.34); }
.interaction-focus::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .15; background-image: linear-gradient(rgba(27,77,76,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(27,77,76,.2) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(90deg, transparent 0, #000 45%, transparent 100%); }
.interaction-heading { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(270px, .85fr) 1.15fr; align-items: end; gap: 30px; padding: 23px clamp(22px, 4vw, 52px) 18px; border-bottom: 1px solid var(--line); }
.interaction-heading h2 { margin: 0; font-family: "STZhongsong", "Songti SC", serif; font-size: clamp(24px, 3vw, 42px); letter-spacing: .04em; }
.interaction-heading p { margin: 0; color: #4b6265; font-size: 13px; line-height: 1.8; }
.interaction-content { position: relative; z-index: 2; min-height: 0; overflow: auto; padding: clamp(18px, 3vh, 34px) clamp(22px, 4vw, 52px); }
.interaction-footer { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 76px; padding: 13px clamp(22px, 4vw, 52px); background: rgba(18,48,52,.96); color: #eaf2ee; }
.partner-line { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; min-width: 0; }
.partner-line b { padding-right: 12px; color: var(--orange-soft); border-right: 1px solid rgba(255,255,255,.18); font: 850 12px/1 ui-monospace, monospace; }
.partner-line span { overflow: hidden; color: #c7dbd6; font-size: 11px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.interaction-actions { display: flex; gap: 8px; flex: none; }
.interaction-actions button, .action-primary, .action-secondary { min-height: 42px; padding: 10px 17px; border: 1px solid rgba(255,255,255,.24); font-size: 12px; font-weight: 800; }
.interaction-actions button, .action-primary { color: #fff; background: var(--orange); }
.interaction-actions button:hover:not(:disabled), .action-primary:hover:not(:disabled) { background: #f16b44; }
.interaction-actions button:disabled, .action-primary:disabled { cursor: not-allowed; opacity: .38; }
.action-secondary { color: #e8f2ee; background: rgba(255,255,255,.08); }
.interaction-feedback { margin: 13px 0 0; padding: 10px 13px; color: #75502d; background: #fff1d8; border-left: 3px solid #e09142; font-size: 11px; line-height: 1.65; }
.interaction-feedback.pass { color: #285e58; background: #deeee7; border-color: var(--teal); }

/* Materials */
.specimen-scene { display: grid; grid-template-columns: minmax(280px, .9fr) 1.1fr; gap: clamp(25px, 5vw, 70px); align-items: center; min-height: 100%; }
.specimen-drawer { position: relative; height: 250px; padding: 27px; background: linear-gradient(155deg, #98a8a4, #526b6b); border: 7px solid #314d50; box-shadow: inset 0 0 0 2px rgba(255,255,255,.2), 0 25px 30px rgba(15,38,41,.18); transform: perspective(700px) rotateY(7deg); }
.specimen-drawer::before { content: "SPECIMEN / SAME MATERIAL"; position: absolute; left: 21px; top: 15px; color: #dce7df; font: 700 8px/1 ui-monospace, monospace; letter-spacing: .12em; }
.specimen-bar { position: relative; display: block; width: 88%; height: 26px; margin: 34px auto 0; color: #f4f0e5; background: linear-gradient(180deg, currentColor, color-mix(in srgb, currentColor, #24383a 48%)); border: 1px solid #3e5557; box-shadow: 0 6px 8px rgba(9,29,32,.26); }
.specimen-bar::after { content: attr(data-label); position: absolute; left: calc(100% + 14px); top: 50%; width: 72px; color: #e8eee9; font: 800 9px/1 ui-monospace, monospace; transform: translateY(-50%); }
.specimen-bar.steel { color: #c8d0cf; }
.specimen-bar.aluminum { color: #e7e6dc; }
.specimen-bar.copper { color: #b46f4f; }
.specimen-options { display: grid; gap: 9px; }
.evidence-option { position: relative; width: 100%; min-height: 60px; padding: 12px 62px 12px 16px; color: var(--ink); text-align: left; background: rgba(255,255,255,.58); border: 1px solid var(--line); }
.evidence-option:hover, .evidence-option.selected { color: #fff; background: var(--teal); border-color: var(--teal); }
.evidence-option strong, .evidence-option small { display: block; }
.evidence-option strong { font-size: 14px; }
.evidence-option small { margin-top: 5px; opacity: .7; font-size: 10px; }
.evidence-option code { position: absolute; right: 14px; top: 50%; font: 750 10px/1 ui-monospace, monospace; transform: translateY(-50%); }

/* Beam region */
.region-scene { display: grid; align-content: center; min-height: 100%; }
.beam-map { position: relative; width: min(950px, 92%); height: 230px; margin: 0 auto; }
.beam-map .map-beam { position: absolute; left: 5%; right: 5%; top: 91px; height: 32px; background: linear-gradient(180deg, #d9dcd5, #899795 70%, #546462); border: 2px solid #405356; box-shadow: 0 12px 16px rgba(17,42,45,.2); }
.beam-map .map-support { position: absolute; top: 123px; width: 0; height: 0; border-left: 20px solid transparent; border-right: 20px solid transparent; border-bottom: 35px solid #173c40; }
.beam-map .map-support.left { left: 5%; }
.beam-map .map-support.right { right: 5%; }
.beam-map .map-load { position: absolute; top: 43px; width: 3px; height: 48px; background: var(--orange); }
.beam-map .map-load::after { content: ""; position: absolute; left: -6px; bottom: -1px; width: 12px; height: 12px; border-right: 3px solid var(--orange); border-bottom: 3px solid var(--orange); transform: rotate(45deg); }
.beam-map .map-load.left { left: 31%; }
.beam-map .map-load.right { right: 31%; }
.beam-map .dimension { position: absolute; left: 5%; right: 5%; bottom: 27px; height: 1px; background: #6f8383; }
.beam-map .dimension::before, .beam-map .dimension::after { content: ""; position: absolute; top: -4px; width: 1px; height: 9px; background: #6f8383; }
.beam-map .dimension::after { right: 0; }
.beam-map .dimension span { position: absolute; left: 50%; top: 8px; color: #5d7375; font: 750 9px/1 ui-monospace, monospace; transform: translateX(-50%); }
.beam-zone { position: absolute; z-index: 3; top: 80px; height: 56px; color: transparent; background: transparent; border: 0; }
.beam-zone::after { content: attr(data-caption); position: absolute; left: 50%; top: -37px; color: #597072; font-size: 10px; font-weight: 700; white-space: nowrap; opacity: 0; transform: translateX(-50%); transition: opacity .18s ease; }
.beam-zone:hover, .beam-zone.selected { background: rgba(52,168,150,.28); outline: 2px solid var(--teal); }
.beam-zone:hover::after, .beam-zone.selected::after { opacity: 1; }
.beam-zone.left { left: 5%; width: 26%; }
.beam-zone.middle { left: 31%; width: 38%; }
.beam-zone.right { right: 5%; width: 26%; }
.region-facts { display: flex; justify-content: center; gap: 30px; margin-top: 5px; color: #607578; font-size: 10px; }
.region-facts b { color: var(--ink); }

/* Gauge section */
.gauge-scene { display: grid; grid-template-columns: minmax(270px, .82fr) 1.18fr; gap: clamp(26px, 5vw, 72px); align-items: center; min-height: 100%; }
.section-cut { position: relative; width: 265px; height: 360px; margin: auto; background: linear-gradient(90deg, #bdc8c2, #e3e5dd 48%, #a3b1ac); border: 3px solid #3e5658; box-shadow: 14px 18px 30px rgba(20,46,49,.19); }
.section-cut::before { content: "UPPER"; position: absolute; right: calc(100% + 10px); top: 24%; color: #6b7e7f; font: 700 8px/1 ui-monospace, monospace; letter-spacing: .1em; }
.section-cut::after { content: "LOWER"; position: absolute; right: calc(100% + 10px); bottom: 24%; color: #6b7e7f; font: 700 8px/1 ui-monospace, monospace; letter-spacing: .1em; }
.layer-seam { position: absolute; z-index: 2; left: 0; right: 0; top: 50%; height: 3px; background: #4d6263; }
.gauge-slot { position: absolute; z-index: 4; left: 50%; width: 80%; height: 25px; color: #315456; background: rgba(255,255,255,.66); border: 1px solid rgba(33,79,79,.3); transform: translate(-50%, 50%); }
.gauge-slot::before { content: ""; position: absolute; left: 8px; right: 40px; top: 50%; height: 3px; background: repeating-linear-gradient(90deg, #9d653a 0 5px, #e2b166 5px 8px); transform: translateY(-50%); }
.gauge-slot span { position: absolute; right: 7px; top: 50%; font: 800 8px/1 ui-monospace, monospace; transform: translateY(-50%); }
.gauge-slot:hover, .gauge-slot.selected { color: #fff; background: var(--teal); border-color: var(--teal); }
.gauge-copy h3 { margin: 0 0 10px; font-family: "STZhongsong", "Songti SC", serif; font-size: 25px; }
.gauge-copy > p { margin: 0 0 18px; color: #526a6c; font-size: 12px; line-height: 1.8; }
.gauge-count { display: inline-flex; align-items: baseline; gap: 7px; margin-bottom: 16px; padding: 10px 14px; color: #fff; background: #173d40; }
.gauge-count b { font: 850 25px/1 ui-monospace, monospace; }
.gauge-count span { font-size: 10px; opacity: .65; }
.angle-row { display: flex; gap: 8px; flex-wrap: wrap; }
.angle-row button { padding: 9px 13px; color: #2c5254; background: rgba(255,255,255,.54); border: 1px solid var(--line); font-size: 11px; font-weight: 750; }
.angle-row button.selected { color: #fff; background: var(--teal); }

/* Instrument */
.instrument-scene { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 4vw, 55px); align-items: start; }
.instrument-console { position: relative; min-height: 280px; padding: 25px; color: #cae3dc; background: #163336; border: 8px solid #70817e; box-shadow: inset 0 0 0 2px #263e40, 0 22px 28px rgba(16,38,40,.2); }
.instrument-screen { min-height: 175px; padding: 17px; background: #0b2023; border: 2px solid #425d5d; box-shadow: inset 0 0 35px rgba(35,205,179,.07); }
.bridge-sketch { position: relative; width: 160px; height: 95px; margin: 27px auto 0; transform: rotate(45deg); border: 2px solid #4dbda9; }
.bridge-sketch i { position: absolute; width: 18px; height: 5px; background: #ef8b5e; }
.bridge-sketch i:nth-child(1) { left: -9px; top: 44px; transform: rotate(-45deg); }
.bridge-sketch i:nth-child(2) { right: -9px; top: 44px; transform: rotate(-45deg); background: #6d8582; }
.bridge-sketch i:nth-child(3) { left: 70px; top: -3px; transform: rotate(-45deg); background: #6d8582; }
.bridge-sketch i:nth-child(4) { left: 70px; bottom: -3px; transform: rotate(-45deg); background: #6d8582; }
.instrument-config { display: grid; gap: 20px; }
.config-group h3 { margin: 0 0 8px; color: #4f6769; font-size: 10px; letter-spacing: .12em; }
.config-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.config-options button { min-height: 70px; padding: 10px; color: #23484a; background: rgba(255,255,255,.58); border: 1px solid var(--line); font-size: 11px; font-weight: 760; line-height: 1.5; }
.config-options button.selected, .config-options button:hover { color: #fff; background: var(--teal); }

/* Zeroing */
.zero-scene { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(26px, 5vw, 70px); align-items: center; min-height: 100%; }
.zero-monitor { padding: 20px; color: #a4e3d6; background: #0d2529; border: 7px solid #596e6c; box-shadow: inset 0 0 40px rgba(40,211,181,.06), 0 23px 35px rgba(13,34,37,.2); }
.zero-monitor > span { color: #769e98; font: 700 8px/1 ui-monospace, monospace; letter-spacing: .14em; }
.zero-channels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 15px; }
.zero-channel { padding: 11px 7px; text-align: center; background: rgba(255,255,255,.035); border: 1px solid rgba(108,195,181,.18); }
.zero-channel span, .zero-channel b { display: block; }
.zero-channel span { color: #638d87; font: 700 8px/1 ui-monospace, monospace; }
.zero-channel b { margin-top: 7px; font: 750 15px/1 ui-monospace, monospace; }
.zero-channel.is-zero b { color: #69ddc5; }
.zero-control { text-align: center; }
.zero-dial { position: relative; width: 155px; aspect-ratio: 1; margin: 0 auto 20px; border: 12px solid #879794; border-radius: 50%; background: radial-gradient(circle, #e7e4d9 0 35%, #536d6d 36% 39%, #b8c1bb 40% 58%, #4d6464 59%); box-shadow: 0 15px 25px rgba(14,39,42,.2); }
.zero-dial::after { content: ""; position: absolute; left: 50%; top: 10px; width: 3px; height: 48px; background: var(--orange); transform: translateX(-50%) rotate(var(--dial-angle, -38deg)); transform-origin: 50% 67px; transition: transform 1s ease; }
.zero-dial.balanced { --dial-angle: 0deg; }
.zero-control p { margin: 0; color: #5a6f71; font-size: 11px; line-height: 1.7; }

/* Loading */
.load-scene { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(22px, 4vw, 52px); min-height: 100%; }
.load-rig { position: relative; min-height: 310px; align-self: center; }
.load-frame { position: absolute; inset: 5% 7% 8%; border: 13px solid #385457; border-bottom-width: 18px; background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(62,91,91,.08)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.28), 0 20px 35px rgba(19,44,47,.18); }
.load-beams { position: absolute; z-index: 2; left: 13%; right: 13%; top: 50%; height: 30px; transform: translateY(-50%); transition: transform .5s ease; }
.load-beams i { display: block; height: 14px; background: linear-gradient(180deg, #dddcd4, #778887); border: 1px solid #3b5052; }
.load-beams i + i { border-top: 0; }
.load-actuator { position: absolute; z-index: 3; left: 50%; top: 5%; width: 64px; height: 43%; background: linear-gradient(90deg, #617977, #d3d4cb 50%, #607674); border: 4px solid #385052; transform: translateX(-50%); transition: height .45s ease; }
.load-actuator::after { content: ""; position: absolute; left: 50%; bottom: -17px; width: 88px; height: 17px; background: #293f42; transform: translateX(-50%); }
.load-frame::before, .load-frame::after { content: ""; position: absolute; bottom: 26%; width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-bottom: 27px solid #243e42; }
.load-frame::before { left: 9%; }
.load-frame::after { right: 9%; }
.load-value { position: absolute; z-index: 4; left: 50%; top: 10%; padding: 9px 13px; color: #70dbc6; background: #0d272b; border: 2px solid #506a69; font: 800 16px/1 ui-monospace, monospace; transform: translateX(-50%); }
.load-rig.loaded .load-beams { transform: translateY(-50%) scaleY(.96); }
.load-data { display: grid; grid-template-rows: auto 1fr auto; align-self: center; min-height: 310px; padding: 17px; background: rgba(255,255,255,.55); border: 1px solid var(--line); }
.load-data-head { display: flex; justify-content: space-between; align-items: baseline; }
.load-data-head b { font-family: "STZhongsong", "Songti SC", serif; font-size: 19px; }
.load-data-head span { color: #668082; font: 700 8px/1 ui-monospace, monospace; letter-spacing: .1em; }
.live-chart { width: 100%; min-height: 190px; }
.chart-axis { stroke: #718787; stroke-width: 1; }
.chart-grid { stroke: rgba(55,95,94,.14); stroke-width: 1; }
.chart-line-a { fill: none; stroke: var(--orange); stroke-width: 3; }
.chart-line-b { fill: none; stroke: var(--teal); stroke-width: 3; }
.chart-dot-a { fill: var(--orange); }
.chart-dot-b { fill: var(--teal); }
.load-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.load-step { padding: 7px 3px; color: #6a7f80; text-align: center; background: #e1e4dc; border: 1px solid var(--line); font: 750 8px/1 ui-monospace, monospace; }
.load-step.done { color: #fff; background: var(--teal); }
.load-step.next { color: #fff; background: var(--orange); }
.metrics-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 13px; }
.metrics-strip div { padding: 9px; background: rgba(23,68,69,.07); border-top: 2px solid var(--teal); }
.metrics-strip span, .metrics-strip b { display: block; }
.metrics-strip span { color: #63787a; font-size: 8px; }
.metrics-strip b { margin-top: 5px; font: 800 13px/1 ui-monospace, monospace; }

/* Wedges */
.wedge-scene { display: grid; align-content: center; min-height: 100%; }
.wedge-model { position: relative; width: min(850px, 92%); height: 235px; margin: auto; }
.wedge-model .wedge-beam { position: absolute; left: 7%; right: 7%; height: 31px; background: linear-gradient(180deg, #dde0d7, #82918f); border: 2px solid #3a5355; }
.wedge-model .wedge-beam.upper { top: 76px; }
.wedge-model .wedge-beam.lower { top: 107px; }
.wedge-interface { position: absolute; left: 7%; right: 7%; top: 106px; height: 3px; background: var(--orange); opacity: .7; }
.wedge-position { position: absolute; z-index: 3; top: 91px; width: 34px; height: 54px; color: #775437; background: rgba(255,255,255,.58); border: 1px dashed #7c6a57; transform: skewX(-10deg); }
.wedge-position::after { content: attr(data-label); position: absolute; left: 50%; top: 65px; color: #617678; font: 750 8px/1 ui-monospace, monospace; white-space: nowrap; transform: translateX(-50%) skewX(10deg); }
.wedge-position.one { left: 17%; }
.wedge-position.two { left: 25%; }
.wedge-position.three { right: 25%; }
.wedge-position.four { right: 17%; }
.wedge-position.installed { background: linear-gradient(135deg, #e99b5e, #984d2e); border: 1px solid #7a402c; box-shadow: 0 0 18px rgba(221,93,52,.27); }
.wedge-position.current { outline: 3px solid rgba(29,124,117,.35); animation: wedge-pulse 1.25s ease-in-out infinite; }
.wedge-sequence { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; width: min(850px, 92%); margin: 0 auto; }
.wedge-sequence button { min-height: 50px; padding: 9px; color: #36585a; background: rgba(255,255,255,.58); border: 1px solid var(--line); font-size: 10px; font-weight: 750; }
.wedge-sequence button.done { color: #fff; background: var(--teal); }
.wedge-sequence button.current { color: #fff; background: var(--orange); }

/* Analysis and report */
.analysis-scene { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(22px, 4vw, 50px); min-height: 100%; }
.profile-board, .claim-board { padding: 18px; background: rgba(255,255,255,.55); border: 1px solid var(--line); }
.profile-board h3, .claim-board h3 { margin: 0 0 14px; font-family: "STZhongsong", "Songti SC", serif; font-size: 19px; }
.profile-row { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 12px; margin: 13px 0; }
.profile-row > span { color: #587072; font-size: 10px; font-weight: 800; }
.profile-plot { position: relative; height: 83px; background: repeating-linear-gradient(0deg, transparent 0 20px, rgba(43,89,88,.1) 20px 21px); border-left: 1px solid #607879; border-bottom: 1px solid #607879; }
.profile-plot i { position: absolute; left: 50%; top: 0; width: 2px; height: 100%; background: #6c8584; }
.profile-plot.stacked::before, .profile-plot.stacked::after, .profile-plot.wedged::before { content: ""; position: absolute; width: 2px; background: var(--orange); transform-origin: center; }
.profile-plot.stacked::before { left: 48%; top: 2%; height: 46%; transform: rotate(43deg); }
.profile-plot.stacked::after { left: 52%; bottom: 2%; height: 46%; transform: rotate(43deg); }
.profile-plot.wedged::before { left: 50%; top: 1%; height: 98%; background: var(--teal); transform: rotate(26deg); }
.neutral-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.neutral-tags span { padding: 5px 7px; color: #486365; background: rgba(23,108,107,.08); font: 700 8px/1 ui-monospace, monospace; }
.claim-list { display: grid; gap: 7px; }
.claim-list button { min-height: 57px; padding: 11px 14px; color: #294b4e; text-align: left; background: rgba(255,255,255,.6); border: 1px solid var(--line); font-size: 11px; font-weight: 700; line-height: 1.55; }
.claim-list button:hover, .claim-list button.selected { color: #fff; background: var(--teal); }

.ending-layer { position: absolute; z-index: 90; inset: 0; overflow: auto; color: #18373a; background: #dce5e1; isolation: isolate; }
.ending-backdrop { position: fixed; z-index: -1; inset: 0; background-position: center; background-size: cover; filter: saturate(.62) brightness(1.04); opacity: .18; }
.ending-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(112deg, rgba(246, 243, 233, .92), rgba(213, 226, 221, .9)); }
.ending-scene { position: relative; z-index: 1; display: grid; grid-template-columns: 1.03fr .97fr; width: min(1180px, calc(100% - 60px)); min-height: calc(100vh - 80px); margin: 40px auto; background: rgba(255,255,255,.68); border: 1px solid rgba(31,79,78,.19); box-shadow: var(--shadow); }
.ending-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(35px, 6vw, 80px); }
.ending-copy h2 { margin: 0; font-family: "STZhongsong", "Songti SC", serif; font-size: clamp(39px, 5.5vw, 76px); line-height: 1.08; letter-spacing: .05em; }
.ending-copy > p { margin: 25px 0 0; color: #4c6466; font-size: 14px; line-height: 2; }
.ending-signatures { display: flex; gap: 18px; margin-top: 32px; padding-top: 21px; border-top: 1px solid var(--line); }
.ending-signatures span { color: #315759; font-family: "STKaiti", "KaiTi", serif; font-size: 19px; }
.ending-actions { display: flex; gap: 8px; margin-top: 30px; }
.ending-actions button, .ending-actions a { min-height: 43px; padding: 11px 16px; color: #fff; background: var(--teal); border: 0; font-size: 11px; font-weight: 800; text-decoration: none; }
.ending-actions .again { background: var(--orange); }
.report-paper { align-self: center; width: 88%; min-height: 74%; margin: 35px auto; padding: clamp(25px, 4vw, 48px); background: #f7f3e9; border: 1px solid #d4cec0; box-shadow: 15px 20px 40px rgba(25,52,54,.16); transform: rotate(1.2deg); }
.report-paper header { padding-bottom: 13px; border-bottom: 3px double #8e9a96; }
.report-paper h3 { margin: 0; font-family: "STZhongsong", "Songti SC", serif; font-size: 23px; }
.report-paper dl { display: grid; gap: 11px; margin: 23px 0; }
.report-paper dl div { display: grid; grid-template-columns: 95px 1fr; gap: 12px; font-size: 10px; line-height: 1.6; }
.report-paper dt { color: #71807f; }
.report-paper dd { margin: 0; font-weight: 680; }
.report-paper blockquote { margin: 20px 0 0; padding: 14px 16px; color: #34595a; background: #e5ede6; border-left: 3px solid var(--teal); font-family: "STZhongsong", "Songti SC", serif; font-size: 12px; line-height: 1.8; }
.report-paper small { display: block; margin-top: 17px; color: #7a8583; font-size: 8px; line-height: 1.6; }

/* ---------- Dialogs ---------- */

.story-dialog { width: min(720px, calc(100vw - 32px)); max-height: min(82vh, 760px); padding: 0; color: var(--ink); background: #f3f0e7; border: 1px solid rgba(113,151,145,.5); box-shadow: 0 30px 100px rgba(0,0,0,.4); }
.story-dialog::backdrop { background: rgba(5,17,21,.72); backdrop-filter: blur(8px); }
.story-dialog form { min-height: 100%; }
.story-dialog header { position: sticky; z-index: 2; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; color: #edf4ef; background: #14373a; }
.story-dialog header h2 { margin: 0; font-family: "STZhongsong", "Songti SC", serif; font-size: 24px; }
.story-dialog header button { width: 36px; height: 36px; color: #e8f3ef; background: transparent; border: 1px solid rgba(255,255,255,.24); font-size: 22px; }
.history-dialog ol { max-height: 60vh; margin: 0; padding: 8px 24px 26px; overflow: auto; list-style: none; }
.history-dialog li { display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.history-dialog li b { color: var(--orange); font: 800 10px/1.6 ui-monospace, monospace; }
.history-dialog li p { margin: 0; color: #3e5659; font-size: 12px; line-height: 1.75; }
.help-copy { padding: 23px 26px 28px; }
.help-copy > p { margin: 0 0 18px; color: #455f61; font-size: 13px; line-height: 1.8; }
.help-copy dl { margin: 0 0 22px; }
.help-copy dl div { display: grid; grid-template-columns: 80px 1fr; gap: 13px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.help-copy dt { color: var(--orange); font-size: 11px; font-weight: 800; }
.help-copy dd { margin: 0; color: #536b6c; font-size: 11px; line-height: 1.65; }
.dialog-primary, .dialog-link { min-height: 41px; padding: 10px 15px; border: 0; font-size: 11px; font-weight: 800; }
.dialog-primary { color: #fff; background: var(--teal); }
.dialog-link { color: #5b6f70; background: transparent; text-decoration: underline; }
.toast { position: fixed; z-index: 150; left: 50%; top: 22px; max-width: calc(100vw - 30px); padding: 11px 17px; color: #fff; background: rgba(11,38,41,.94); border-left: 3px solid var(--orange); box-shadow: 0 13px 35px rgba(0,0,0,.25); font-size: 11px; line-height: 1.5; opacity: 0; pointer-events: none; transform: translate(-50%, -16px); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Motion ---------- */

@keyframes title-hover { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-13px) rotate(1.2deg); } }
@keyframes m0-hover { 0%,100% { transform: translateY(0) rotate(-.5deg); } 50% { transform: translateY(-10px) rotate(.8deg); } }
@keyframes m0-scan { 0%,100% { transform: translate(-2px, 1px) rotate(-.8deg); } 50% { transform: translate(7px, -8px) rotate(1deg); } }
@keyframes m0-focus { 0%,100% { transform: translateY(1px); } 50% { transform: translateY(-4px); } }
@keyframes m0-alert { 0%,100% { transform: translateY(-2px) rotate(-.5deg); } 45% { transform: translateY(-15px) rotate(1.2deg); } }
@keyframes m0-flat { 0%,100% { transform: translateY(8px) rotate(-1deg); } 50% { transform: translateY(4px) rotate(-.4deg); } }
@keyframes advance { 0%,100% { transform: translateY(-3px) rotate(45deg); opacity: .35; } 50% { transform: translateY(3px) rotate(45deg); opacity: 1; } }
@keyframes curtain-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes character-lean-in { 0% { transform: translateX(-9px); } 55% { transform: translateX(6px); } 100% { transform: translateX(0); } }
@keyframes character-settle { 0% { transform: translateY(0); } 45% { transform: translateY(7px); } 100% { transform: translateY(0); } }
@keyframes character-recoil { 0%,100% { transform: translateY(0); } 42% { transform: translateY(-12px); } }
@keyframes character-nod { 0%,100% { transform: translateY(0); } 45% { transform: translateY(4px); } }
@keyframes character-check { 0%,100% { transform: translateX(0); } 45% { transform: translateX(-4px); } }
@keyframes wedge-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(23,109,107,.05); } 50% { box-shadow: 0 0 0 9px rgba(23,109,107,.18); } }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .title-copy { width: 52vw; margin-left: 5vw; }
  .title-alfa { right: 11vw; width: 49vw; }
  .title-q { right: -13vw; width: 44vw; }
  .title-m0 { right: 1vw; width: 34vw; }
  .vn-character.alfa { left: 2vw; width: 45vw; }
  .vn-character.q { right: 0; width: 42vw; }
  .vn-character.m0 { width: 33vw; }
  .dialogue-box { width: calc(100vw - 42px); }
  .interaction-layer { padding: 54px 24px 22px; }
  .interaction-heading { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  body { overflow: hidden; }
  .title-screen { background: linear-gradient(180deg, #edf0e8 0 58%, #173137 58% 100%); }
  .title-grid { mask-image: linear-gradient(#000 0 57%, transparent 83%); }
  .title-copy { width: auto; margin: 0; padding: max(46px, 7vh) 25px 0; }
  .title-copy h1 span { font-size: clamp(50px, 16vw, 72px); }
  .title-copy h1 small { font-size: clamp(25px, 8vw, 37px); }
  .title-lead { margin-top: 20px; font-size: 14px; }
  .title-actions { position: absolute; left: 22px; right: 22px; top: 63vh; display: grid; margin: 0; }
  .title-primary, .title-secondary { width: 100%; min-width: 0; }
  .title-note { position: absolute; left: 24px; right: 24px; top: 82vh; color: rgba(233,242,238,.65); }
  .title-alfa { right: -15vw; bottom: 25vh; width: 83vw; height: 66vh; opacity: .82; }
  .title-q { right: -42vw; bottom: 25vh; width: 74vw; height: 61vh; opacity: .32; }
  .title-m0 { right: 5vw; bottom: 28vh; width: 42vw; }
  .title-version { display: none; }

  .story-bar { padding: max(10px, env(safe-area-inset-top)) 10px 0; }
  .scene-stamp { padding: 8px 9px; }
  .scene-stamp b { max-width: 132px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .story-controls { gap: 3px; }
  .story-controls button { min-height: 32px; padding: 6px 7px; }
  .story-controls span { display: none; }
  .story-controls kbd { opacity: 1; font-size: 8px; }
  .night-window { left: 4vw; top: 9vh; width: 58vw; height: 37vh; }
  .wall-number { top: 16vh; right: -4vw; font-size: 63px; }
  .safety-card { display: none; }
  .instrument-rack { right: 4vw; width: 43vw; height: 16vh; }
  .beam-rig { left: 5vw; right: 8vw; bottom: 35vh; }
  .vn-character { bottom: 25vh; }
  .vn-character.alfa { left: -18vw; width: 85vw; height: 68vh; }
  .vn-character.q { right: -20vw; width: 83vw; height: 71vh; }
  .vn-character.m0 { left: -3vw; bottom: 41vh; width: 55vw; height: 35vw; }
  .vn-character.is-dim { opacity: .25; }
  .vn-character.is-speaking { opacity: 1; }
  .vn-character:not(.is-speaking).is-visible { opacity: .18; }
  .vn-character.stage-center.alfa { left: 7vw; }
  .vn-character.stage-center.q { right: 7vw; }
  .vn-character.stage-right.m0 { right: -3vw; }
  .vn-character.stage-center.m0 { left: 22vw; }
  .evidence-whisper { top: 16vh; width: calc(100vw - 28px); }

  .dialogue-box { left: 12px; right: 12px; bottom: max(17px, env(safe-area-inset-bottom)); grid-template-columns: 1fr 22px; grid-template-rows: 25px minmax(92px, auto); width: auto; min-height: 155px; transform: none; }
  .speaker-name { grid-column: 1; grid-row: 1; min-width: 0; width: max-content; margin: -12px 0 0 13px; padding: 9px 13px 8px; font-size: 15px; }
  .speaker-role { display: none; }
  .dialogue-text { grid-column: 1 / 3; grid-row: 2; align-self: start; min-height: 100px; padding: 15px 18px 18px; font-size: 14px; line-height: 1.85; }
  .advance-mark { grid-column: 2; grid-row: 2; margin: 0 9px 12px 0; }
  .story-hint { display: none; }
  .choice-layer { align-items: end; padding: 80px 12px 190px; }
  .choice-card { width: 100%; padding: 17px; }
  .choice-list button { min-height: 48px; }

  .interaction-layer { padding: 0; }
  .interaction-focus { width: 100%; height: 100%; border: 0; }
  .interaction-heading { grid-template-columns: 1fr; gap: 8px; padding: max(18px, env(safe-area-inset-top)) 18px 13px; }
  .interaction-heading h2 { font-size: 23px; }
  .interaction-heading p { font-size: 11px; line-height: 1.55; }
  .interaction-content { padding: 15px 17px; }
  .interaction-footer { min-height: 70px; padding: 10px 14px max(10px, env(safe-area-inset-bottom)); }
  .partner-line { display: block; }
  .partner-line b { display: block; margin-bottom: 5px; padding: 0; border: 0; }
  .partner-line span { display: block; max-width: 43vw; font-size: 9px; white-space: normal; }
  .interaction-actions button { min-height: 40px; padding: 9px 12px; font-size: 10px; }
  .specimen-scene, .gauge-scene, .instrument-scene, .zero-scene, .load-scene, .analysis-scene { grid-template-columns: 1fr; gap: 18px; }
  .specimen-drawer { height: 170px; padding: 12px; transform: none; }
  .specimen-bar { height: 19px; margin-top: 27px; }
  .specimen-options { gap: 6px; }
  .evidence-option { min-height: 49px; }
  .beam-map { width: 100%; height: 200px; }
  .region-facts { gap: 10px; flex-wrap: wrap; }
  .section-cut { width: 185px; height: 250px; }
  .gauge-slot { height: 21px; }
  .gauge-copy h3 { font-size: 18px; }
  .gauge-copy > p { display: none; }
  .gauge-count { margin-bottom: 8px; }
  .instrument-console { min-height: 190px; padding: 14px; border-width: 5px; }
  .instrument-screen { min-height: 110px; }
  .bridge-sketch { width: 100px; height: 65px; margin-top: 18px; }
  .bridge-sketch i:nth-child(3), .bridge-sketch i:nth-child(4) { left: 40px; }
  .config-options button { min-height: 53px; padding: 6px; font-size: 9px; }
  .zero-monitor { padding: 12px; border-width: 4px; }
  .zero-channels { gap: 4px; }
  .zero-channel { padding: 7px 2px; }
  .zero-channel b { font-size: 11px; }
  .zero-dial { width: 95px; margin-bottom: 5px; border-width: 8px; }
  .zero-dial::after { height: 30px; transform-origin: 50% 42px; }
  .load-rig, .load-data { min-height: 225px; }
  .load-frame { border-width: 8px; }
  .load-actuator { width: 45px; }
  .live-chart { min-height: 120px; }
  .metrics-strip { gap: 4px; }
  .metrics-strip div { padding: 6px; }
  .metrics-strip b { font-size: 10px; }
  .wedge-model { height: 190px; }
  .wedge-sequence { grid-template-columns: 1fr 1fr; }
  .profile-board, .claim-board { padding: 12px; }
  .claim-list button { min-height: 49px; font-size: 10px; }
  .ending-scene { grid-template-columns: 1fr; width: calc(100% - 20px); margin: 10px auto; }
  .ending-copy { padding: 34px 24px; }
  .ending-copy h2 { font-size: 44px; }
  .report-paper { width: calc(100% - 30px); margin: 0 auto 25px; transform: none; }
  .ending-signatures { flex-wrap: wrap; }
}

@media (max-height: 650px) and (min-width: 701px) {
  .dialogue-box { min-height: 126px; }
  .vn-character { bottom: 12vh; }
  .interaction-layer { padding-top: 28px; padding-bottom: 18px; }
  .interaction-heading { padding-top: 14px; padding-bottom: 11px; }
  .interaction-content { padding-top: 14px; padding-bottom: 14px; }
  .interaction-footer { min-height: 60px; }
}

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

/* ---------- v4 cinematic title, scenes, archive ---------- */

.title-screen {
  min-height: 100vh;
  min-height: 100dvh;
  color: #f7f6f1;
  background: #071015;
}
.title-media { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.title-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; filter: saturate(.72) contrast(1.05) brightness(.72); transform: scale(1.025); }
.title-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5,13,18,.97) 0 25%, rgba(5,13,18,.82) 42%, rgba(5,13,18,.24) 67%, rgba(5,13,18,.55) 100%),
    linear-gradient(180deg, rgba(4,12,17,.5), transparent 28%, rgba(4,12,17,.2) 66%, rgba(4,12,17,.92));
}
.title-film-grain { position: absolute; inset: 0; opacity: .055; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E"); mix-blend-mode: soft-light; }
.title-cast { overflow: hidden; }
.title-character img { filter: drop-shadow(0 0 1px rgba(255,255,255,.12)); }
.title-alfa { right: 19vw; bottom: -10vh; width: min(39vw, 590px); height: 106vh; opacity: .96; }
.title-alfa img { filter: saturate(.82) brightness(.83) contrast(1.05); }
.title-q { right: 1vw; bottom: -11vh; width: min(34vw, 520px); height: 99vh; opacity: .5; }
.title-q img { filter: grayscale(.28) saturate(.55) brightness(.74); }
.title-m0 { right: 5vw; bottom: 1vh; width: min(24vw, 360px); z-index: 4; opacity: .88; }
.title-m0 img { filter: brightness(.82) drop-shadow(0 12px 18px rgba(0,0,0,.32)); }
.title-frame {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(360px, 560px) 1fr;
  grid-template-rows: minmax(235px, 1fr) auto;
  gap: 0 40px;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(24px, 4vw, 58px) clamp(26px, 5vw, 80px) 24px;
}
.title-copy { grid-column: 1; grid-row: 1; align-self: center; width: auto; margin: 0; padding: clamp(28px, 7vh, 72px) 0 22px; }
.title-copy h1 { color: #f3f2ec; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-weight: 500; letter-spacing: -.065em; text-shadow: none; }
.title-copy h1 span { font-size: clamp(56px, 6vw, 92px); line-height: .96; }
.title-copy h1 small { margin: 12px 0 0 .05em; color: #f3f2ec; font-size: clamp(25px, 2.8vw, 42px); font-weight: 400; line-height: 1; letter-spacing: .22em; }
.title-lead { margin-top: clamp(22px, 3vh, 34px); color: rgba(240,244,240,.78); font-size: clamp(14px, 1.15vw, 18px); font-weight: 400; line-height: 1.7; letter-spacing: .025em; }
.title-menu { grid-column: 1; grid-row: 2; align-self: end; display: grid; max-width: 470px; border-bottom: 1px solid rgba(226,237,235,.22); }
.title-menu-action {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 9px 4px;
  color: rgba(239,244,241,.76);
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(226,237,235,.22);
  transition: color .2s ease, background .2s ease, padding .2s ease;
}
.title-menu-action:hover, .title-menu-action:focus-visible { padding-left: 11px; color: #fff; background: rgba(224,238,234,.075); }
.title-menu-action:disabled { color: rgba(205,219,216,.35); cursor: not-allowed; }
.title-menu-action:disabled:hover { padding-left: 4px; background: transparent; }
.title-menu-action.is-primary { color: #fff; border-top-color: rgba(244,145,105,.72); }
.title-menu-action.is-primary .menu-index { color: var(--orange-soft); }
.title-menu-action .menu-index { color: rgba(198,215,212,.48); font: 600 9px/1 ui-monospace, monospace; letter-spacing: .14em; }
.title-menu-action b { display: block; }
.title-menu-action b { font-size: 15px; font-weight: 540; letter-spacing: .05em; }
.title-record {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  justify-self: end;
  width: min(330px, 29vw);
  padding: 18px;
  color: #edf3ef;
  background: rgba(5,16,21,.76);
  border: 1px solid rgba(216,232,227,.22);
  border-radius: 4px;
  backdrop-filter: blur(14px);
}
.title-record-head, .title-record-meta { display: flex; justify-content: space-between; gap: 14px; color: rgba(195,215,211,.58); font: 550 8px/1.2 ui-monospace, monospace; letter-spacing: .12em; }
.title-record strong { display: block; margin-top: 17px; font-size: 15px; font-weight: 560; }
.title-record p { min-height: 2.7em; margin: 7px 0 18px; color: rgba(223,234,231,.7); font-size: 11px; line-height: 1.5; }
.title-record-meta { padding-top: 11px; border-top: 1px solid rgba(216,232,227,.14); color: var(--orange-soft); }

.scene-backdrop { background: #101b20; filter: none !important; }
.scene-images { position: absolute; inset: 0; overflow: hidden; --scene-scale: 1.035; --scene-x: 0%; --scene-y: 0%; }
.scene-image {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  object-position: 50% 52%;
  opacity: 0;
  transform: translate3d(var(--scene-x), var(--scene-y), 0) scale(var(--scene-scale));
  transition: opacity .85s ease, transform 1.35s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.vn-stage[data-scene="dark-lab"] [data-scene-image="dark-lab"],
.vn-stage[data-scene="lit-lab"] [data-scene-image="lit-lab"],
.vn-stage[data-scene="report"] [data-scene-image="report"],
.vn-stage[data-scene="morning-lab"] [data-scene-image="morning-lab"] { opacity: 1; }
.vn-stage[data-camera="wide"] .scene-images { --scene-scale: 1.035; --scene-x: 0%; --scene-y: 0%; }
.vn-stage[data-camera="cabinet"] .scene-images { --scene-scale: 1.12; --scene-x: -3.5%; --scene-y: .5%; }
.vn-stage[data-camera="rig"] .scene-images { --scene-scale: 1.12; --scene-x: 1.5%; --scene-y: 1%; }
.vn-stage[data-camera="section"] .scene-images { --scene-scale: 1.17; --scene-x: 3%; --scene-y: 1%; }
.vn-stage[data-camera="instrument"] .scene-images { --scene-scale: 1.15; --scene-x: -4%; --scene-y: 1%; }
.vn-stage[data-camera="load"] .scene-images { --scene-scale: 1.115; --scene-x: 1%; --scene-y: .5%; }
.vn-stage[data-camera="interface"] .scene-images { --scene-scale: 1.16; --scene-x: 2%; --scene-y: 1.2%; }
.vn-stage[data-camera="analysis"] .scene-images { --scene-scale: 1.08; --scene-x: 0%; --scene-y: .5%; }
.vn-stage[data-camera="desk"] .scene-images { --scene-scale: 1.035; --scene-x: 0%; --scene-y: 0%; }
.vn-stage[data-camera="dawn"] .scene-images { --scene-scale: 1.035; --scene-x: 0%; --scene-y: 0%; }
.scene-atmosphere { position: absolute; z-index: 3; inset: 0; background: linear-gradient(180deg, rgba(4,13,17,.08), transparent 45%, rgba(4,14,18,.42)); transition: background .8s ease; }
.vn-stage[data-scene="dark-lab"] .scene-atmosphere { background: radial-gradient(circle at 76% 57%, rgba(214,77,40,.08), transparent 19%), linear-gradient(180deg, rgba(1,7,12,.2), transparent 44%, rgba(1,8,12,.58)); }
.vn-stage[data-scene="report"] .scene-atmosphere { background: radial-gradient(circle at 72% 52%, rgba(245,192,112,.1), transparent 24%), linear-gradient(180deg, rgba(5,12,16,.04), transparent 54%, rgba(4,12,16,.52)); }
.vn-stage[data-scene="morning-lab"] .scene-atmosphere { background: linear-gradient(180deg, rgba(220,232,237,.03), transparent 55%, rgba(9,22,28,.32)); }
.scene-foreground { position: absolute; z-index: 4; left: -5%; right: -5%; bottom: -5%; height: 26%; background: linear-gradient(180deg, transparent, rgba(5,15,19,.34)); pointer-events: none; }
.scene-vignette { z-index: 7; box-shadow: inset 0 0 110px rgba(2,8,12,.28); }
.scene-grain { z-index: 8; opacity: .04; mix-blend-mode: soft-light; }
.scene-stamp { color: inherit; background: rgba(8,23,28,.64); border: 1px solid rgba(220,235,231,.2); border-left: 2px solid var(--orange); border-radius: 3px; box-shadow: none; backdrop-filter: blur(12px); }
.scene-stamp b { color: #eaf1ee; }
.scene-stamp time { color: rgba(205,221,217,.7); }
.story-controls button { color: #e4eeea; background: rgba(7,21,26,.58); border-color: rgba(218,233,229,.2); border-radius: 3px; box-shadow: none; backdrop-filter: blur(12px); }
.story-controls button:hover { color: #fff; background: rgba(17,50,56,.82); }
.vn-stage[data-scene="morning-lab"] .scene-stamp,
.vn-stage[data-scene="morning-lab"] .story-controls button { color: #18383d; background: rgba(239,242,235,.7); border-color: rgba(31,75,76,.2); }
.dialogue-box { border: 1px solid rgba(144,194,187,.42); border-top: 1px solid rgba(239,121,80,.78); border-radius: 3px; box-shadow: none; backdrop-filter: blur(18px); }
.speaker-name { color: #fff; background: transparent; border-left: 3px solid var(--orange); }

.archive-dialog { width: min(980px, calc(100vw - 40px)); }
.archive-dialog form, .settings-dialog form { max-height: min(82vh, 760px); background: #eef0e9; }
.archive-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow-y: auto; padding: 1px; background: rgba(31,65,68,.14); }
.archive-slot { position: relative; min-height: 168px; padding: 0; background: #f7f6f0; }
.archive-slot.is-empty { background: rgba(247,246,240,.55); }
.archive-slot-main { display: flex; flex-direction: column; width: 100%; min-height: 168px; padding: 18px 19px 15px; color: var(--ink); text-align: left; background: transparent; border: 0; }
.archive-slot-main:not(:disabled):hover { background: rgba(23,109,107,.07); }
.archive-slot-main:disabled { cursor: default; }
.archive-slot-head { display: flex; justify-content: space-between; gap: 12px; color: #697f80; font: 650 8px/1.2 ui-monospace, monospace; letter-spacing: .12em; }
.archive-slot-head b { color: var(--orange); font-weight: 700; }
.archive-slot h3 { margin: 18px 0 5px; font-size: 17px; font-weight: 600; }
.archive-slot p { display: -webkit-box; min-height: 2.9em; margin: 0; overflow: hidden; color: #607477; font-size: 11px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.archive-slot-meta { display: flex; gap: 14px; margin-top: auto; padding-top: 13px; color: #6d8585; border-top: 1px solid var(--line); font: 650 8px/1 ui-monospace, monospace; letter-spacing: .08em; }
.archive-slot-delete { position: absolute; z-index: 2; right: 13px; bottom: 12px; padding: 6px 8px; color: #7b5550; background: transparent; border: 1px solid rgba(123,85,80,.24); font-size: 9px; }
.archive-slot-delete:hover { color: #fff; background: #98594e; }
.archive-footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 24px; color: #6a7d7e; border-top: 1px solid var(--line); font-size: 10px; }
.archive-footer button { min-width: 94px; padding: 9px 13px; color: #fff; background: var(--teal); border: 0; }
.settings-dialog { width: min(760px, calc(100vw - 40px)); }
.setting-group { display: grid; grid-template-columns: minmax(150px, .65fr) 1.35fr; gap: 28px; padding: 24px; border-bottom: 1px solid var(--line); }
.setting-group h3 { margin: 0; font-size: 19px; font-weight: 600; }
.setting-group p { margin: 8px 0 0; color: #687d7e; font-size: 11px; line-height: 1.5; }
.setting-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.setting-options button, .setting-toggle { min-height: 64px; padding: 10px; color: #385356; background: rgba(255,255,255,.56); border: 1px solid var(--line); }
.setting-options button[aria-pressed="true"], .setting-toggle[aria-pressed="false"] { color: #fff; background: var(--teal); border-color: var(--teal); }
.setting-options small { display: block; margin-top: 5px; opacity: .68; font-size: 8px; }
.setting-sound { align-items: center; }
.setting-toggle { justify-self: end; width: 170px; }

@media (max-width: 980px) {
  .title-frame { grid-template-columns: minmax(310px, 500px) 1fr; padding-right: 28px; padding-left: 34px; }
  .title-record { width: 250px; }
  .title-alfa { right: 8vw; width: 50vw; }
  .title-q { right: -11vw; width: 43vw; }
  .title-m0 { right: 1vw; width: 28vw; }
}

@media (max-width: 700px) {
  .title-screen { background: #071116; }
  .title-media img { object-position: 43% center; filter: saturate(.68) contrast(1.04) brightness(.62); }
  .title-shade { background: linear-gradient(180deg, rgba(4,12,17,.74) 0 30%, rgba(4,12,17,.2) 48%, rgba(4,12,17,.92) 74% 100%); }
  .title-frame { display: block; min-height: 100dvh; padding: max(22px, env(safe-area-inset-top)) 20px max(15px, env(safe-area-inset-bottom)); }
  .title-copy { position: relative; z-index: 8; width: 92%; padding-top: clamp(32px, 6vh, 56px); }
  .title-copy h1 span { font-size: clamp(45px, 15vw, 64px); }
  .title-copy h1 small { margin-top: 8px; font-size: clamp(22px, 7.5vw, 31px); }
  .title-lead { margin-top: 17px; font-size: 12px; line-height: 1.65; }
  .title-cast { z-index: 3; }
  .title-alfa { right: -13vw; bottom: 26vh; width: 79vw; height: 61vh; opacity: .72; }
  .title-q { right: -41vw; bottom: 26vh; width: 67vw; height: 56vh; opacity: .2; }
  .title-m0 { right: 2vw; bottom: 31vh; width: 38vw; opacity: .76; }
  .title-menu { position: absolute; z-index: 9; left: 18px; right: 18px; bottom: max(48px, calc(env(safe-area-inset-bottom) + 40px)); max-width: none; background: rgba(5,16,21,.82); border: 1px solid rgba(220,234,230,.17); backdrop-filter: blur(14px); }
  .title-menu-action { min-height: 47px; padding: 7px 11px; }
  .title-menu-action:hover, .title-menu-action:focus-visible { padding-left: 16px; }
  .title-record { position: absolute; z-index: 9; left: 18px; right: 18px; bottom: max(252px, calc(env(safe-area-inset-bottom) + 244px)); width: auto; padding: 12px 14px; }
  .title-record strong { margin-top: 10px; font-size: 12px; }
  .title-record p { min-height: 0; margin: 5px 0 10px; font-size: 9px; }

  .scene-image { inset: -6%; width: 112%; height: 112%; object-position: 48% center; }
  .vn-stage[data-camera="cabinet"] .scene-images,
  .vn-stage[data-camera="instrument"] .scene-images { --scene-scale: 1.08; --scene-x: -4%; }
  .vn-stage[data-camera="rig"] .scene-images,
  .vn-stage[data-camera="section"] .scene-images,
  .vn-stage[data-camera="load"] .scene-images,
  .vn-stage[data-camera="interface"] .scene-images { --scene-scale: 1.1; --scene-x: 3%; }
  .vn-stage[data-scene="report"] .scene-image { object-position: 61% center; }
  .story-controls { max-width: 174px; flex-wrap: wrap; justify-content: end; }
  .story-controls button { min-width: 32px; }
  .dialogue-box { border-top-color: rgba(239,121,80,.84); }

  .archive-dialog, .settings-dialog { width: calc(100vw - 16px); max-width: none; }
  .archive-dialog form, .settings-dialog form { max-height: 92dvh; }
  .archive-slots { grid-template-columns: 1fr; }
  .archive-slot, .archive-slot-main { min-height: 139px; }
  .archive-slot-main { padding: 14px 15px 12px; }
  .archive-slot h3 { margin-top: 12px; font-size: 15px; }
  .archive-footer { padding: 11px 15px; }
  .setting-group { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
  .setting-options { grid-template-columns: 1fr; }
  .setting-options button { min-height: 48px; text-align: left; }
  .setting-options small { display: inline; margin-left: 7px; }
  .setting-toggle { justify-self: stretch; width: 100%; }
}

@media (max-height: 720px) and (min-width: 701px) {
  .title-frame { grid-template-rows: minmax(165px, 1fr) auto; padding-top: 24px; }
  .title-copy { padding-top: 20px; }
  .title-copy h1 span { font-size: clamp(50px, 5.2vw, 76px); }
  .title-lead { margin-top: 18px; }
  .title-menu-action { min-height: 45px; }
  .title-record { padding: 14px; }
}

/* ---------- v5 directed opening and scene stack ---------- */

:root {
  --cinema-ease: cubic-bezier(.2, .72, .2, 1);
  --stage-white: #f4f5f0;
  --stage-night: #061017;
  --stage-orange: #ef7c55;
}

body.is-booting { background: #050d12; }

.boot-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 25px;
  color: rgba(234, 241, 238, .72);
  background: #050d12;
  transition: opacity .34s ease;
}
.boot-screen.is-leaving { opacity: 0; }
.boot-mark { display: grid; grid-template-columns: repeat(8, 7px); gap: 8px; justify-content: center; }
.boot-mark i { width: 7px; aspect-ratio: 1; border-radius: 50%; background: rgba(190, 213, 208, .2); animation: boot-channel 1.2s ease-in-out infinite; }
.boot-mark i:nth-child(2) { animation-delay: .08s; }
.boot-mark i:nth-child(3) { animation-delay: .16s; }
.boot-mark i:nth-child(4) { animation-delay: .24s; }
.boot-mark i:nth-child(5) { animation-delay: .32s; }
.boot-mark i:nth-child(6) { animation-delay: .4s; }
.boot-mark i:nth-child(7) { animation-delay: .48s; }
.boot-mark i:nth-child(8) { background: var(--stage-orange); animation-delay: .56s; }
.boot-copy { width: min(280px, 72vw); text-align: center; }
.boot-copy p { margin: 0 0 15px; font-size: 12px; font-weight: 450; letter-spacing: .08em; }
.boot-track { height: 1px; overflow: hidden; background: rgba(206, 225, 220, .14); }
.boot-track i { display: block; width: 0; height: 100%; background: var(--stage-orange); transition: width .28s ease; }

.opening-sequence {
  position: fixed;
  z-index: 950;
  inset: 0;
  overflow: hidden;
  color: var(--stage-white);
  background: #030a0f;
  opacity: 1;
  transition: opacity .52s var(--cinema-ease);
}
.opening-sequence.is-leaving { opacity: 0; pointer-events: none; }
.opening-media, .opening-media img, .opening-moonwash { position: absolute; inset: 0; width: 100%; height: 100%; }
.opening-media img { object-fit: cover; object-position: 50% center; filter: brightness(.72) saturate(.86) contrast(1.04); transform: scale(1.018); transition: filter 1.2s ease, transform 4.8s ease; }
.opening-moonwash { background: rgba(2, 10, 17, .1); transition: background 1.2s ease; }
.opening-signal { position: absolute; right: 16.5%; top: 57.3%; width: 7px; aspect-ratio: 1; border-radius: 50%; background: #ff6d50; box-shadow: 0 0 8px #ff5a3b, 0 0 28px rgba(245, 75, 46, .74); }
.opening-signal i { position: absolute; inset: -12px; border: 1px solid rgba(255, 108, 78, .5); border-radius: 50%; animation: signal-ring 1.7s ease-out infinite; }
.opening-m0 { position: absolute; z-index: 3; right: 22%; bottom: 26%; width: min(24vw, 370px); aspect-ratio: 1.45; margin: 0; opacity: 0; transform: translate3d(38px, 15px, 0) rotate(3deg) scale(.93); transition: opacity .72s var(--cinema-ease), transform 1.15s var(--cinema-ease); }
.opening-m0 img { width: 100%; height: 100%; object-fit: contain; filter: brightness(.86) drop-shadow(0 20px 24px rgba(0, 0, 0, .35)); }
.opening-meta { position: absolute; z-index: 5; top: max(26px, env(safe-area-inset-top)); left: clamp(25px, 4.5vw, 72px); display: flex; gap: 16px; align-items: center; color: rgba(217, 231, 227, .58); font: 550 9px/1 ui-monospace, monospace; letter-spacing: .15em; }
.opening-meta span { color: var(--stage-orange); }
.opening-meta b { font-weight: 550; }
.opening-line { position: absolute; z-index: 5; left: clamp(25px, 7vw, 112px); bottom: clamp(86px, 13vh, 138px); width: min(620px, 55vw); padding-left: 17px; border-left: 2px solid var(--stage-orange); }
.opening-line span { color: rgba(210, 226, 221, .55); font: 600 8px/1 ui-monospace, monospace; letter-spacing: .2em; }
.opening-line p { margin: 12px 0 0; font-size: clamp(17px, 1.65vw, 25px); font-weight: 430; line-height: 1.6; letter-spacing: .035em; }
.opening-title { position: absolute; z-index: 5; left: clamp(25px, 7vw, 112px); top: 23vh; opacity: 0; transform: translateY(12px); transition: opacity .75s ease, transform .75s var(--cinema-ease); }
.opening-title span, .opening-title small { display: block; }
.opening-title span { font-size: clamp(45px, 5.2vw, 78px); font-weight: 520; line-height: 1; letter-spacing: -.055em; }
.opening-title small { margin-top: 10px; color: rgba(238, 242, 237, .82); font-size: clamp(18px, 2vw, 30px); font-weight: 420; letter-spacing: .26em; }
.opening-skip { position: absolute; z-index: 6; top: max(22px, env(safe-area-inset-top)); right: clamp(22px, 4vw, 64px); padding: 7px 0; color: rgba(225, 236, 232, .58); background: transparent; border: 0; font-size: 10px; letter-spacing: .08em; }
.opening-skip span { margin-left: 7px; color: rgba(225, 236, 232, .34); font: 600 8px/1 ui-monospace, monospace; }
.opening-skip:hover { color: #fff; }
.opening-advance { position: absolute; z-index: 6; right: clamp(22px, 4vw, 64px); bottom: max(25px, env(safe-area-inset-bottom)); display: flex; gap: 11px; align-items: center; padding: 8px 0; color: rgba(225, 236, 232, .56); background: transparent; border: 0; font-size: 9px; letter-spacing: .08em; }
.opening-advance i { width: 20px; height: 1px; background: currentColor; }
.opening-sequence[data-beat="approach"] .opening-m0,
.opening-sequence[data-beat="drift"] .opening-m0,
.opening-sequence[data-beat="title"] .opening-m0 { opacity: .92; transform: translate3d(0, 0, 0) rotate(-1deg) scale(1); }
.opening-sequence[data-beat="drift"] .opening-m0 { animation: opening-hover 3.2s ease-in-out infinite; }
.opening-sequence[data-beat="drift"] .opening-signal { animation: signal-alert .72s ease-in-out infinite alternate; }
.opening-sequence[data-beat="title"] .opening-title { opacity: 1; transform: none; }
.opening-sequence[data-beat="title"] .opening-line { opacity: .74; }
.opening-sequence[data-beat="title"] .opening-media img { filter: brightness(.82) saturate(.82) contrast(1.03); transform: scale(1.005); }

/* Title: one scene, two actions, quiet utilities. */
.title-screen { background: var(--stage-night); }
.title-screen.is-arriving .title-frame { animation: title-frame-in .62s var(--cinema-ease) both; }
.title-screen.is-arriving .title-character { animation: title-cast-in .78s .08s var(--cinema-ease) both; }
.title-media img { object-position: 50% center; filter: brightness(.88) saturate(.82) contrast(1.04); transform: scale(1.01); }
.title-shade {
  background:
    linear-gradient(90deg, rgba(4, 12, 17, .91) 0 27%, rgba(4, 12, 17, .58) 48%, rgba(4, 12, 17, .08) 71%, rgba(4, 12, 17, .18)),
    linear-gradient(180deg, rgba(3, 10, 14, .25), transparent 55%, rgba(3, 10, 14, .72));
}
.title-film-grain { opacity: .028; }
.title-frame { grid-template-columns: minmax(355px, 510px) 1fr; grid-template-rows: minmax(210px, 1fr) auto; padding: clamp(22px, 3vw, 42px) clamp(25px, 4vw, 64px) 19px; }
.title-copy { align-self: center; max-width: 490px; padding: clamp(28px, 6vh, 64px) 0 20px; }
.title-copy h1 { color: var(--stage-white); font-weight: 500; letter-spacing: -.055em; }
.title-copy h1 span { font-size: clamp(51px, 5vw, 76px); }
.title-copy h1 small { margin-top: 9px; font-size: clamp(23px, 2.4vw, 35px); font-weight: 400; }
.title-lead { margin-top: clamp(17px, 2.7vh, 28px); color: rgba(238, 243, 239, .75); font-size: clamp(13px, 1.05vw, 16px); line-height: 1.7; }
.title-cast { overflow: hidden; }
.title-alfa { right: 19vw; bottom: -6vh; width: min(34vw, 520px); height: 96vh; z-index: 3; opacity: 1; }
.title-alfa img { filter: saturate(.88) brightness(.92) contrast(1.02) drop-shadow(-10px 20px 28px rgba(0, 0, 0, .25)); }
.title-q { right: -1vw; bottom: -5vh; width: min(30vw, 460px); height: 89vh; z-index: 2; opacity: 1; }
.title-q img { filter: saturate(.78) brightness(.88) contrast(1.01); }
.title-m0 { right: 35vw; bottom: 48vh; width: min(17vw, 255px); z-index: 4; opacity: 1; animation: title-hover 4.2s ease-in-out infinite; }
.title-m0 img { filter: brightness(.94) drop-shadow(0 18px 20px rgba(0, 0, 0, .32)); }
.title-signal { position: absolute; z-index: 5; right: 39vw; top: 42vh; display: flex; gap: 9px; align-items: center; color: rgba(244, 164, 130, .7); font: 600 7px/1 ui-monospace, monospace; letter-spacing: .16em; }
.title-signal i { width: 5px; aspect-ratio: 1; border-radius: 50%; background: #ff6d50; box-shadow: 0 0 13px rgba(255, 89, 58, .85); animation: signal-alert 1.1s ease-in-out infinite alternate; }
.title-menu { grid-template-columns: 1fr 1fr; gap: 7px; max-width: 510px; border: 0; }
.title-menu-action { grid-template-columns: 29px 1fr; min-height: 47px; padding: 8px 12px; border: 0; border-radius: 3px; background: rgba(226, 235, 231, .08); transition: color .22s ease, background .22s ease; }
.title-menu-action:hover, .title-menu-action:focus-visible { padding-left: 12px; color: #fff; background: rgba(226, 235, 231, .16); }
.title-menu-action.is-primary { color: #0a171c; background: rgba(245, 246, 241, .94); }
.title-menu-action.is-primary:hover { color: #071217; background: #fff; }
.title-menu-action.is-primary .menu-index { color: #d65735; }
.title-screen[data-has-save="false"] #newGameButton { color: #08171c; background: rgba(245, 246, 241, .94); }
.title-screen[data-has-save="false"] #newGameButton .menu-index { color: #d65735; }
.title-menu-action:disabled { color: rgba(211, 225, 220, .33); background: rgba(226, 235, 231, .025); }
.title-menu-action:disabled:hover { padding-left: 12px; }
.title-menu-action b { font-size: 13px; font-weight: 520; }
.title-record { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 15px; width: min(405px, 34vw); padding: 0; overflow: hidden; background: rgba(5, 15, 20, .64); border: 0; border-radius: 3px; backdrop-filter: blur(12px); }
.title-record-thumb { min-height: 112px; background-position: center; background-size: cover; }
.title-record-copy { min-width: 0; padding: 13px 14px 11px 0; }
.title-record strong { margin-top: 12px; font-size: 13px; }
.title-record p { min-height: 0; margin: 5px 0 11px; font-size: 9px; }
.title-record-meta { padding-top: 8px; }

/* Dedicated shot buffers replace one-image camera zooms. */
.scene-backdrop { background: #071219; }
.scene-images { inset: 0; --plate-scale: 1.012; --plate-x: 0%; --plate-y: 0%; }
.scene-image {
  z-index: 0;
  inset: -2%;
  width: 104%;
  height: 104%;
  object-position: 50% center;
  opacity: 0;
  transform: translate3d(var(--plate-x), var(--plate-y), 0) scale(var(--plate-scale));
  transition: opacity .68s ease, transform 1.25s var(--cinema-ease), filter .68s ease;
}
.scene-image.is-active { z-index: 2; opacity: 1; }
.scene-image.is-leaving { z-index: 1; opacity: 0; }
.vn-stage[data-transition="chapter-cut"] .scene-image { transition-duration: .32s, .5s, .32s; }
.vn-stage[data-transition="light-on"] .scene-image { transition-duration: .82s, 1.1s, .82s; }
.vn-stage[data-transition="focus-pull"] .scene-image { transition-duration: .72s, 1.1s, .72s; }
.vn-stage[data-transition="time-lapse"] .scene-image { transition-duration: 1.48s, 1.8s, 1.48s; }
.vn-stage[data-camera="cabinet"] .scene-images { --plate-scale: 1.018; --plate-x: -.25%; }
.vn-stage[data-camera="rig"] .scene-images,
.vn-stage[data-camera="section"] .scene-images,
.vn-stage[data-camera="load"] .scene-images,
.vn-stage[data-camera="interface"] .scene-images { --plate-scale: 1.02; --plate-x: .2%; }
.vn-stage[data-camera="instrument"] .scene-images { --plate-scale: 1.018; }
.vn-stage[data-camera="analysis"] .scene-images { --plate-scale: 1.012; }
.scene-atmosphere { z-index: 5; background: rgba(3, 12, 17, .08); }
.vn-stage[data-shot="dark"] .scene-atmosphere { background: rgba(1, 7, 13, .17); }
.vn-stage[data-shot="cabinet"] .scene-atmosphere { background: rgba(8, 20, 26, .035); }
.vn-stage[data-shot="rig"] .scene-atmosphere { background: rgba(8, 20, 26, .045); }
.vn-stage[data-shot="instrument"] .scene-atmosphere,
.vn-stage[data-shot="report"] .scene-atmosphere { background: rgba(8, 18, 23, .08); }
.vn-stage[data-shot="analysis"] .scene-atmosphere { background: rgba(4, 16, 23, .03); }
.vn-stage[data-shot="dawn"] .scene-atmosphere { background: rgba(226, 212, 210, .02); }
.scene-foreground { z-index: 16; left: 0; right: 0; bottom: 0; height: 13%; background: rgba(3, 11, 15, .16); opacity: .55; }
.scene-event { position: absolute; z-index: 18; inset: 0; pointer-events: none; opacity: 0; }
.event-light-on .scene-event { animation: lab-light-on 1.05s ease both; }
.event-focus-pull .scene-event { animation: focus-pull .78s ease both; }
.event-projection .scene-event { animation: projector-start .9s ease both; }
.event-time-lapse .scene-event { animation: dawn-wash 1.6s ease both; }
.scene-vignette { z-index: 19; box-shadow: inset 0 0 90px rgba(2, 8, 12, .2); }
.scene-grain { z-index: 20; opacity: .022; }

/* The interface recedes while the scene is being read. */
.story-bar { padding: max(18px, env(safe-area-inset-top)) 22px 0; }
.scene-stamp { gap: 2px 9px; padding: 7px 0 7px 11px; background: transparent; border: 0; border-left: 2px solid var(--stage-orange); border-radius: 0; backdrop-filter: none; }
.scene-stamp span { color: var(--stage-orange); font-size: 7px; font-weight: 600; }
.scene-stamp b { color: rgba(242, 246, 242, .88); font-size: 10px; font-weight: 520; text-shadow: 0 1px 5px rgba(0, 0, 0, .45); }
.scene-stamp time { color: rgba(226, 236, 232, .62); font-size: 8px; text-shadow: 0 1px 5px rgba(0, 0, 0, .45); }
.story-controls { gap: 2px; opacity: .94; transition: opacity .28s ease, transform .28s ease; }
.vn-stage[data-controls="quiet"] .story-controls { opacity: .2; transform: translateY(-3px); }
.story-controls:hover, .story-controls:focus-within { opacity: 1 !important; transform: none !important; }
.story-controls button { position: relative; display: grid; place-items: center; width: 34px; min-width: 34px; min-height: 34px; padding: 0; color: rgba(239, 244, 241, .8); background: rgba(5, 15, 20, .22); border: 0; border-radius: 3px; backdrop-filter: blur(8px); }
.story-controls button:hover { color: #fff; background: rgba(8, 24, 30, .72); }
.story-controls span { position: absolute; top: calc(100% + 5px); right: 0; padding: 5px 7px; color: #edf3ef; background: rgba(5, 15, 20, .86); border-radius: 2px; opacity: 0; pointer-events: none; white-space: nowrap; font-size: 8px; transform: translateY(-3px); transition: opacity .18s ease, transform .18s ease; }
.story-controls button:hover span, .story-controls button:focus-visible span { opacity: 1; transform: none; }
.story-controls kbd { padding: 0; background: transparent; border: 0; font-size: 9px; opacity: .9; }
.vn-stage[data-shot="dawn"] .scene-stamp b,
.vn-stage[data-shot="dawn"] .scene-stamp time { color: #18353a; text-shadow: 0 1px 4px rgba(255, 255, 255, .55); }
.vn-stage[data-shot="dawn"] .scene-stamp { background: transparent; border: 0; border-left: 2px solid var(--stage-orange); backdrop-filter: none; }
.vn-stage[data-shot="dawn"] .story-controls button { color: #17373b; background: rgba(245, 246, 241, .48); }

.character-stage { z-index: 11; }
.vn-character { bottom: 7vh; transition: opacity .34s ease, filter .34s ease; }
.vn-character::before { content: ""; position: absolute; z-index: 0; left: 18%; right: 18%; bottom: 1.5%; height: 5%; border-radius: 50%; background: rgba(3, 11, 14, .24); filter: blur(8px); transform: scaleX(.9); opacity: 0; transition: opacity .34s ease; }
.vn-character.is-visible::before { opacity: .75; }
.vn-character.m0::before { display: none; }
.character-motion { z-index: 1; }
.vn-character.is-visible { opacity: 1; }
.vn-character.is-speaking { --speak-y: -4px; --actor-scale: 1.018; opacity: 1; }
.vn-character.is-speaking .character-body { filter: drop-shadow(0 20px 18px rgba(6, 20, 24, .18)); }
.vn-character.is-dim { opacity: 1; }
.vn-character.is-dim .character-body { filter: saturate(.72) brightness(.84) contrast(.96); }
.vn-stage[data-speaker="narrator"] .vn-character.is-visible,
.vn-stage[data-speaker="player"] .vn-character.is-visible { opacity: 1; }
.vn-stage[data-speaker="cut"] .vn-character.is-visible { opacity: 0; }
.vn-character.alfa { left: 5vw; width: min(31vw, 465px); height: 79vh; }
.vn-character.q { right: 12vw; width: min(30vw, 440px); height: 82vh; }
.vn-character.m0 { left: 38vw; bottom: 49vh; width: min(22vw, 325px); height: 22vw; max-height: 225px; }
.vn-character.stage-left.m0 { left: 38vw; bottom: 58vh; }
.vn-character.stage-left.alfa { left: 2vw; }
.vn-character.stage-center.alfa { left: 8vw; }
.vn-character.stage-left.q { right: auto; left: 25vw; }
.vn-character.stage-center.q { right: 25vw; }
.vn-character.stage-right.m0 { left: auto; right: 7vw; }
.vn-character.stage-center.m0 { left: 39vw; }
.vn-stage[data-shot="cabinet"] .vn-character.q,
.vn-stage[data-shot="instrument"] .vn-character.q { right: 15vw; }
.vn-stage[data-shot="report"] .vn-character.alfa { left: 0; width: min(29vw, 430px); }
.vn-stage[data-shot="report"] .vn-character.q { right: 12vw; width: min(28vw, 410px); }

.dialogue-box { left: clamp(20px, 4.2vw, 66px); bottom: max(21px, calc(env(safe-area-inset-bottom) + 12px)); grid-template-columns: 108px minmax(0, 1fr) 28px; grid-template-rows: 28px minmax(68px, auto); width: min(980px, calc(100vw - 92px)); min-height: 132px; color: #f0f4f1; background: rgba(5, 16, 21, .86); border: 0; border-radius: 3px; box-shadow: none; backdrop-filter: blur(16px) saturate(.82); transform: none; }
.dialogue-box::before { left: 0; top: 0; width: 68px; height: 2px; background: var(--stage-orange); }
.dialogue-box::after { display: none; }
.speaker-name { grid-column: 1; grid-row: 1; min-width: 0; width: max-content; margin: 13px 0 0 18px; padding: 0 0 0 10px; color: #fff; background: transparent; border-left: 2px solid var(--stage-orange); box-shadow: none; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-size: 14px; font-weight: 560; }
.speaker-name.narrator { color: rgba(216, 231, 226, .78); background: transparent; }
.speaker-role { grid-column: 1; grid-row: 2; align-self: end; margin: 0 0 17px 18px; color: rgba(154, 190, 182, .64); font-size: 7px; font-weight: 560; }
.dialogue-text { grid-column: 2; grid-row: 1 / 3; min-height: 74px; padding: 21px 23px 20px 25px; font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif; font-size: clamp(14px, 1.1vw, 17px); font-weight: 420; line-height: 1.85; letter-spacing: .025em; }
.advance-mark { margin-bottom: 15px; }
.advance-mark i { width: 8px; height: 8px; border-width: 1px; border-color: rgba(115, 218, 199, .82); }
.story-hint { left: auto; right: clamp(22px, 4vw, 62px); bottom: 9px; color: rgba(219, 234, 228, .42); transform: none; }

.chapter-curtain { place-content: end start; padding: 0 clamp(28px, 6vw, 96px) 26vh; color: #f3f5f1; text-align: left; background: rgba(2, 10, 14, .2); backdrop-filter: blur(1.5px); }
.chapter-curtain::before { left: clamp(28px, 6vw, 96px); top: auto; bottom: calc(26vh + 118px); width: 58px; height: 2px; background: var(--stage-orange); transform: none; }
.chapter-curtain::after { display: none; }
.chapter-curtain h2 { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-size: clamp(35px, 4.2vw, 60px); font-weight: 500; letter-spacing: .08em; }
.chapter-curtain span { margin-top: 13px; color: rgba(220, 233, 228, .66); font-size: 9px; }

.choice-layer { background: rgba(3, 12, 16, .38); backdrop-filter: blur(5px); }
.choice-card { border: 0; border-radius: 4px; box-shadow: none; }
.choice-list button { border: 0; border-radius: 3px; }
.interaction-layer { background: rgba(4, 14, 18, .6); backdrop-filter: blur(9px) saturate(.78); }
.interaction-focus { border: 0; border-radius: 4px; box-shadow: none; }
.interaction-focus::before { display: none; }

.archive-slot { display: grid; grid-template-columns: 132px minmax(0, 1fr); }
.archive-slot.is-empty { display: block; }
.archive-slot-thumb { min-height: 168px; background-position: center; background-size: cover; }
.archive-slot-main { min-width: 0; }
.archive-slot-delete { right: 12px; }

@keyframes boot-channel { 0%, 100% { opacity: .24; transform: scale(.82); } 50% { opacity: .88; transform: scale(1); } }
@keyframes signal-ring { from { opacity: .65; transform: scale(.4); } to { opacity: 0; transform: scale(1.45); } }
@keyframes signal-alert { from { opacity: .62; box-shadow: 0 0 7px rgba(255, 88, 58, .55); } to { opacity: 1; box-shadow: 0 0 18px rgba(255, 88, 58, .95); } }
@keyframes opening-hover { 0%, 100% { transform: translate3d(0, -2px, 0) rotate(-1deg); } 50% { transform: translate3d(-5px, 8px, 0) rotate(1deg); } }
@keyframes title-frame-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes title-cast-in { from { opacity: 0; transform: translateX(14px); } }
@keyframes lab-light-on { 0% { opacity: 0; background: #f8fff9; } 13% { opacity: .84; } 23% { opacity: .12; } 34% { opacity: .42; } 100% { opacity: 0; background: #f8fff9; } }
@keyframes focus-pull { 0%, 100% { opacity: 0; backdrop-filter: blur(0); } 45% { opacity: .14; backdrop-filter: blur(7px); background: #d7e1dc; } }
@keyframes projector-start { 0% { opacity: 0; background: #8be5dc; } 35% { opacity: .14; } 48% { opacity: .03; } 65% { opacity: .09; } 100% { opacity: 0; } }
@keyframes dawn-wash { 0%, 100% { opacity: 0; } 45% { opacity: .18; background: #f7c9bf; } }

@media (max-width: 980px) and (min-width: 701px) {
  .title-alfa { right: 11vw; width: 42vw; }
  .title-q { right: -7vw; width: 37vw; }
  .title-m0 { right: 37vw; width: 21vw; }
  .title-record { width: 300px; grid-template-columns: 98px minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .boot-screen { gap: 20px; }
  .opening-media img { object-position: 70% center; filter: brightness(.7) saturate(.84); }
  .opening-signal { right: 15%; top: 57%; }
  .opening-m0 { right: 1vw; bottom: 31vh; width: 54vw; }
  .opening-meta { top: max(19px, env(safe-area-inset-top)); left: 19px; font-size: 7px; }
  .opening-line { left: 20px; right: 20px; bottom: max(84px, calc(env(safe-area-inset-bottom) + 68px)); width: auto; }
  .opening-line p { font-size: 16px; line-height: 1.55; }
  .opening-title { left: 20px; top: 16vh; }
  .opening-title span { font-size: clamp(42px, 14vw, 58px); }
  .opening-title small { font-size: clamp(18px, 6.5vw, 26px); }
  .opening-skip { top: max(15px, env(safe-area-inset-top)); right: 17px; }
  .opening-advance { right: 18px; bottom: max(20px, env(safe-area-inset-bottom)); }

  .title-media img { object-position: 69% center; filter: brightness(.79) saturate(.76); }
  .title-shade { background: linear-gradient(180deg, rgba(3, 10, 14, .7) 0 25%, rgba(3, 10, 14, .14) 47%, rgba(3, 10, 14, .84) 74% 100%); }
  .title-frame { display: block; padding: max(18px, env(safe-area-inset-top)) 17px max(12px, env(safe-area-inset-bottom)); }
  .title-copy { width: 94%; padding-top: clamp(27px, 5vh, 47px); }
  .title-copy h1 span { font-size: clamp(42px, 14.5vw, 59px); }
  .title-copy h1 small { font-size: clamp(20px, 7vw, 28px); }
  .title-lead { width: 72%; margin-top: 13px; font-size: 11px; line-height: 1.55; }
  .title-alfa { right: 8vw; bottom: 18vh; width: 66vw; height: 56vh; opacity: 1; }
  .title-q { right: -5vw; bottom: 20vh; width: 56vw; height: 54vh; opacity: 1; }
  .title-q img { filter: saturate(.82) brightness(.96) contrast(1.02); }
  .title-m0 { right: 1vw; bottom: 44vh; width: 39vw; opacity: 1; }
  .title-signal { right: 34vw; top: 43vh; font-size: 5px; }
  .title-menu { position: absolute; z-index: 9; left: 16px; right: 16px; bottom: max(16px, calc(env(safe-area-inset-bottom) + 8px)); grid-template-columns: 1fr 1fr; gap: 5px; max-width: none; background: transparent; border: 0; backdrop-filter: none; }
  .title-menu-action { min-height: 45px; padding: 7px 9px; background: rgba(5, 16, 21, .68); backdrop-filter: blur(10px); }
  .title-menu-action:hover, .title-menu-action:focus-visible { padding-left: 9px; }
  .title-menu-action b { font-size: 11px; }
  .title-record { left: 16px; right: 16px; bottom: max(120px, calc(env(safe-area-inset-bottom) + 112px)); grid-template-columns: 92px minmax(0, 1fr); width: auto; min-height: 74px; padding: 0; }
  .title-record-thumb { min-height: 74px; }
  .title-record-copy { padding: 9px 10px 8px 0; }
  .title-record strong { margin-top: 7px; font-size: 10px; }
  .title-record p { margin: 3px 0 6px; font-size: 7px; }
  .title-record-meta, .title-record-head { font-size: 6px; }

  .scene-image { inset: -3%; width: 106%; height: 106%; }
  .vn-stage[data-shot="dark"] .scene-image,
  .vn-stage[data-shot="establishing"] .scene-image,
  .vn-stage[data-shot="dawn"] .scene-image { object-position: 65% center; }
  .vn-stage[data-shot="cabinet"] .scene-image { object-position: 72% center; }
  .vn-stage[data-shot="rig"] .scene-image { object-position: 58% center; }
  .vn-stage[data-shot="instrument"] .scene-image { object-position: 67% center; }
  .vn-stage[data-shot="analysis"] .scene-image { object-position: 48% center; }
  .vn-stage[data-shot="report"] .scene-image { object-position: 64% center; }
  .scene-foreground { height: 18%; opacity: .46; }
  .scene-vignette { box-shadow: inset 0 0 45px rgba(2, 8, 12, .18); }
  .story-bar { padding: max(10px, env(safe-area-inset-top)) 9px 0; }
  .scene-stamp { padding: 6px 0 6px 8px; }
  .scene-stamp b { max-width: 128px; font-size: 8px; }
  .story-controls { gap: 1px; }
  .story-controls button { width: 29px; min-width: 29px; min-height: 29px; }
  .story-controls span { display: none; }
  .story-controls kbd { display: block; font-size: 7px; }

  .vn-character { bottom: 3vh; }
  .vn-character.alfa { left: -17vw; width: 77vw; height: 65vh; }
  .vn-character.q { right: -18vw; width: 75vw; height: 68vh; }
  .vn-character.m0 { left: 24vw; bottom: 67vh; width: 51vw; height: 34vw; }
  .vn-character.is-visible { opacity: 1; }
  .vn-character.is-dim,
  .vn-character:not(.is-speaking).is-visible { opacity: 1; }
  .vn-character.is-speaking { opacity: 1; }
  .vn-stage[data-speaker="narrator"] .vn-character.is-visible,
  .vn-stage[data-speaker="player"] .vn-character.is-visible { opacity: 1; }
  .vn-stage[data-speaker="cut"] .vn-character.is-visible { opacity: 0; }
  .vn-stage[data-shot="cabinet"] .vn-character.is-dim,
  .vn-stage[data-shot="rig"] .vn-character.is-dim,
  .vn-stage[data-shot="instrument"] .vn-character.is-dim,
  .vn-stage[data-shot="analysis"] .vn-character.is-dim,
  .vn-stage[data-shot="report"] .vn-character.is-dim { opacity: 0; }
  .vn-character.stage-center.alfa { left: -3vw; }
  .vn-character.stage-center.q { right: -3vw; }
  .vn-character.stage-left.q { left: -12vw; }
  .vn-character.stage-right.m0 { right: -1vw; }
  .vn-character.stage-center.m0 { left: 24vw; }
  .vn-character.stage-left.m0 { left: 24vw; bottom: 67vh; }

  .dialogue-box { left: 9px; right: 9px; bottom: max(9px, env(safe-area-inset-bottom)); grid-template-columns: 1fr 22px; grid-template-rows: 24px minmax(82px, auto); width: auto; min-height: 132px; }
  .speaker-name { grid-column: 1; grid-row: 1; margin: 11px 0 0 13px; padding-left: 8px; font-size: 13px; }
  .speaker-role { display: none; }
  .dialogue-text { grid-column: 1 / 3; grid-row: 2; align-self: start; min-height: 90px; padding: 13px 16px 16px; font-size: 13px; line-height: 1.72; }
  .advance-mark { grid-column: 2; grid-row: 2; margin: 0 8px 10px 0; }
  .story-hint { display: none; }
  .choice-layer { padding-bottom: 158px; }
  .chapter-curtain { padding: 0 20px 24vh; }
  .chapter-curtain::before { left: 20px; bottom: calc(24vh + 91px); }
  .chapter-curtain h2 { font-size: clamp(31px, 10vw, 43px); }
  .chapter-curtain span { font-size: 7px; }

  .archive-slot { grid-template-columns: 104px minmax(0, 1fr); }
  .archive-slot-thumb { min-height: 139px; }
}

@media (max-height: 690px) and (min-width: 701px) {
  .title-copy { padding-top: 14px; }
  .title-copy h1 span { font-size: 48px; }
  .title-menu-action { min-height: 42px; }
  .vn-character { bottom: 5vh; }
  .dialogue-box { min-height: 118px; }
}

@media (prefers-reduced-motion: reduce) {
  .boot-mark i, .opening-signal i, .opening-m0, .title-m0, .title-signal i, .scene-event { animation: none !important; }
  .opening-sequence, .scene-image, .title-frame, .title-character { transition-duration: .01ms !important; }
}
