/* ==========================================================================
   冷库 B-17 · 凌晨 02:40
   界面样式：深冷暗场 / 技术图纸 / 值班台
   字体只用系统中文无衬线与等宽；无外链资源。
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #070d12;
  --bg-deep: #050a0e;
  --surface: #0a141b;
  --surface-2: #0c1921;
  --surface-3: var(--bg-subtle);
  --surface-raised: var(--surface);
  --line: rgba(28, 32, 36, 0.09);
  --line-soft: rgba(28, 32, 36, 0.055);
  --line-strong: rgba(28, 32, 36, 0.18);
  --line-bright: rgba(28, 32, 36, 0.28);
  --fg: var(--ink);
  --fg-2: var(--ink-2);
  --fg-3: var(--ink-2);
  --muted: var(--ink-2);
  --faint: var(--ink-2);
  --ghost: var(--line);
  --cold: var(--primary);
  --cold-bright: var(--primary-hover);
  --cold-dim: var(--primary-text);
  --warn: #f0b35b;
  --warn-dim: #9a6f35;
  --danger: #ff6b6b;
  --danger-dim: #a84343;
  --supply: var(--primary);
  --supply-dim: var(--primary-text);
  --time: #8fa6b2;
  --accent: var(--cold);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", "Source Han Sans CN", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 2px;
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --pad-x: clamp(20px, 2.4vw, 34px);
  --shadow-panel: 0 18px 50px rgba(0, 0, 0, 0.28);
}

/* ---------- 2. Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

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

a {
  color: inherit;
}

code, kbd, samp, pre {
  font-family: var(--font-mono);
}

::selection {
  background: rgba(62, 99, 221, 0.24);
  color: #f0fbfb;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 1px solid var(--cold);
  outline-offset: 3px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(28, 32, 36, 0.24) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(28, 32, 36, 0.2);
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(28, 32, 36, 0.34);
  background-clip: padding-box;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: inline-block;
  vertical-align: -0.18em;
}

.icon--sm {
  width: 14px;
  height: 14px;
}

.icon--lg {
  width: 22px;
  height: 22px;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 8px 14px;
  color: #ffffff;
  background: var(--cold);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.16s var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.eyebrow,
.kicker,
.panel-label,
.field-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cold);
  font-size: 10.5px;
  letter-spacing: 0.14em;
}

.kicker__rule {
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 19px;
  padding: 0 6px;
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--fg-3);
  white-space: nowrap;
}

.tag--gen {
  color: var(--warn);
  border-color: rgba(240, 179, 91, 0.38);
  background: rgba(240, 179, 91, 0.06);
}

.tag--offline {
  color: var(--muted);
}

.tag--cold {
  color: var(--cold);
  border-color: rgba(62, 99, 221, 0.34);
  background: rgba(62, 99, 221, 0.05);
}

.tag--danger {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.34);
  background: rgba(255, 107, 107, 0.05);
}

.tag--warn {
  color: var(--warn);
  border-color: rgba(240, 179, 91, 0.34);
  background: rgba(240, 179, 91, 0.05);
}

.tag--supply {
  color: var(--supply);
  border-color: rgba(62, 99, 221, 0.34);
  background: rgba(62, 99, 221, 0.05);
}

.tag--neutral {
  color: var(--fg-3);
}

.gen-model {
  color: var(--warn);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

#consequence-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- 3. Ambient background ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(1200px 800px at 72% -8%, rgba(28, 32, 36, 0.2), transparent 62%),
    radial-gradient(900px 700px at 8% 108%, rgba(28, 32, 36, 0.16), transparent 64%),
    var(--bg);
}

.ambient__grid {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(rgba(28, 32, 36, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 32, 36, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 56% 30%, #000 0%, rgba(0, 0, 0, 0.55) 52%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 56% 30%, #000 0%, rgba(0, 0, 0, 0.55) 52%, transparent 100%);
  opacity: 0.72;
}

.ambient__wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 46% at 78% 20%, rgba(62, 99, 221, 0.065), transparent 70%),
    radial-gradient(42% 36% at 12% 82%, rgba(240, 179, 91, 0.035), transparent 70%);
}

.ambient__scan {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(to bottom, rgba(28, 32, 36, 0.018) 0, rgba(28, 32, 36, 0.018) 1px, transparent 1px, transparent 4px);
  opacity: 0.55;
}

.ambient__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 86% at 50% 48%, transparent 40%, rgba(2, 6, 9, 0.62) 100%);
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ---------- 4. Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 19px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(12, 25, 33, 0.6);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 550;
  letter-spacing: 0.02em;
  line-height: 1;
  cursor: pointer;
  transition: background 0.16s var(--ease-out), border-color 0.16s var(--ease-out), color 0.16s var(--ease-out), transform 0.1s var(--ease-out);
}

.btn:hover {
  background: rgba(28, 32, 36, 0.9);
  border-color: var(--line-bright);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  color: #ffffff;
  background: var(--cold);
  border-color: var(--cold);
  font-weight: 600;
}

.btn--primary:hover {
  background: var(--cold-bright);
  border-color: var(--cold-bright);
}

.btn--ghost {
  background: transparent;
}

.btn--quiet {
  height: 36px;
  padding: 0 13px;
  font-size: 12.5px;
  border-color: var(--line);
  background: transparent;
  color: var(--fg-2);
}

.btn--quiet:hover {
  color: var(--fg);
  border-color: var(--line-strong);
}

.btn--danger {
  border-color: rgba(255, 107, 107, 0.45);
  color: var(--danger);
  background: rgba(255, 107, 107, 0.05);
}

.btn--wide {
  width: 100%;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
}

.btn:disabled:hover,
.btn[aria-disabled="true"]:hover {
  background: rgba(12, 25, 33, 0.6);
  border-color: var(--line-strong);
}

.btn--primary:disabled,
.btn--primary[aria-disabled="true"] {
  background: rgba(62, 99, 221, 0.18);
  border-color: rgba(62, 99, 221, 0.2);
  color: rgba(255, 255, 255, 0.5);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
  transition: color 0.15s var(--ease-out), border-color 0.15s var(--ease-out), background 0.15s var(--ease-out);
}

.icon-btn:hover {
  color: var(--fg);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
}

.sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 18, 24, 0.4);
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.16s var(--ease-out), border-color 0.16s var(--ease-out);
}

.sound-btn:hover {
  color: var(--fg);
  border-color: var(--line-strong);
}

.sound-btn[aria-pressed="true"] {
  color: var(--cold);
  border-color: rgba(62, 99, 221, 0.3);
}

.sound-btn .icon {
  width: 15px;
  height: 15px;
}

.sound-btn--compact {
  height: 28px;
  font-size: 9px;
  padding: 0 8px;
}

/* ---------- 5. Boot ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(800px 600px at 62% 34%, rgba(28, 32, 36, 0.2), transparent 66%),
    var(--bg);
}

.boot::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(28, 32, 36, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 32, 36, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 64% 60% at 50% 48%, #000, transparent 84%);
  mask-image: radial-gradient(ellipse 64% 60% at 50% 48%, #000, transparent 84%);
  pointer-events: none;
}

.boot__panel {
  position: relative;
  width: min(520px, 92vw);
  padding: 38px 40px 30px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(13, 28, 36, 0.96), rgba(8, 18, 24, 0.98));
  box-shadow: var(--shadow-panel);
}

.boot__panel::before,
.boot__panel::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.boot__panel::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--cold);
  border-left: 1px solid var(--cold);
}

.boot__panel::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid var(--line-bright);
  border-bottom: 1px solid var(--line-bright);
}

.boot__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(62, 99, 221, 0.4);
  color: var(--cold);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.boot__eyebrow {
  margin-top: 20px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
}

.boot__title {
  margin-top: 6px;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--fg);
}

.boot__bar {
  position: relative;
  height: 2px;
  margin: 24px 0 18px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.boot__bar span {
  position: absolute;
  top: 0;
  left: 0;
  width: 38%;
  height: 100%;
  background: var(--cold);
  animation: bootSweep 1.5s var(--ease-in-out) infinite;
}

.boot__bar--stalled span {
  width: 100%;
  background: var(--danger);
  animation: none;
  opacity: 0.55;
}

.boot__checks {
  display: grid;
  gap: 1px;
  border-top: 1px solid var(--line);
}

.boot__checks li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.boot__checks b {
  color: var(--muted);
  font-weight: 500;
}

.boot__checks b.is-ok {
  color: var(--cold);
}

.boot__checks b.is-bad {
  color: var(--danger);
}

.boot__error {
  margin-top: 18px;
  padding: 14px 15px;
  border: 1px solid rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.045);
  color: #e7c5c5;
  font-size: 12.5px;
  line-height: 1.7;
}

.boot__error p + p {
  margin-top: 9px;
}

.boot__error b {
  color: #ffd1d1;
  font-weight: 600;
}

.boot__error code {
  padding: 1px 4px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: #f5dddd;
}

.boot__reload {
  margin-top: 16px;
}

.boot__hint {
  margin-top: 22px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.6;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 30px;
  background: var(--bg);
  color: var(--fg);
  font-size: 15px;
  text-align: center;
}

/* ---------- 6. Screen base ---------- */
.screen {
  display: none;
  height: auto;
  min-height: 0;
  overflow: visible;
}

.screen.is-active {
  display: block;
  animation: screenIn 0.28s var(--ease-out) both;
}

.screen.is-active.is-current-scene {
  animation: none;
}

.scene-wipe {
  position: fixed;
  top: 64px;
  bottom: 26px;
  left: 0;
  width: 100%;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(62, 99, 221, 0.035) 32%, rgba(62, 99, 221, 0.16) 48%, rgba(62, 99, 221, 0.06) 60%, transparent 82%);
  transform: translateX(-110%);
}

.scene-wipe.is-running {
  animation: sceneWipe 0.72s var(--ease-in-out) both;
}

/* ---------- 7. Title ---------- */
.screen--title {
  position: relative;
  min-height: 100vh;
}

.title-shell {
  position: relative;
  min-height: 100vh;
  padding: 26px clamp(28px, 4vw, 64px) 22px;
  overflow: hidden;
}

.title-shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(28px, 4vw, 64px);
  right: clamp(28px, 4vw, 64px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 12%, var(--line-strong) 88%, transparent);
}

.title-shell::after {
  content: "SECTION A–A";
  position: absolute;
  right: clamp(24px, 3vw, 48px);
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.3em;
  color: var(--ghost);
  pointer-events: none;
}

.title-top {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.brandmark {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brandmark__code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(62, 99, 221, 0.32);
  color: var(--cold);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.brandmark__rule {
  width: 1px;
  height: 30px;
  background: var(--line-strong);
}

.brandmark__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brandmark__text b {
  color: var(--fg-2);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.brandmark__text i {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.14em;
}

.title-top__right {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 2px;
}

.signal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.signal__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--supply);
  box-shadow: 0 0 0 3px rgba(62, 99, 221, 0.09);
}

.title-copy {
  position: relative;
  z-index: 3;
  width: min(660px, 48vw);
  margin-top: clamp(42px, 9vh, 108px);
  opacity: 0;
  animation: titleCopyIn 0.85s 0.15s var(--ease-out) forwards;
}

.display {
  margin-top: 20px;
  font-family: var(--font-sans);
  font-size: clamp(61px, 6.7vw, 102px);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.035em;
}

.display__main {
  display: block;
  color: transparent;
  background: linear-gradient(180deg, var(--primary-tint) 8%, var(--bg-subtle) 48%, var(--line) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
}

.display__sub {
  display: block;
  margin-top: 10px;
  color: transparent;
  font-size: 0.64em;
  line-height: 1;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5);
  letter-spacing: -0.02em;
}

@supports not (-webkit-text-stroke: 1px #fff) {
  .display__sub {
    color: rgba(255, 255, 255, 0.42);
  }
}

.title-sub {
  max-width: 28em;
  margin-top: 24px;
  color: var(--fg-2);
  font-size: clamp(15px, 1.15vw, 17px);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.title-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 30px;
}

.title-actions .btn {
  height: 48px;
  min-width: 168px;
  padding: 0 22px;
  font-size: 15px;
}

.title-actions__note {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

.starters {
  width: min(540px, 100%);
  margin-top: clamp(30px, 5.5vh, 54px);
  border-top: 1px solid var(--line);
}

.starters li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 10px 0 11px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--fg-2);
  font-size: 13px;
  line-height: 1.55;
}

.starters__num {
  color: var(--cold-dim);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.title-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 22px;
}

.flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

.flag .icon {
  width: 14px;
  height: 14px;
  color: var(--cold-dim);
}

.title-art {
  position: absolute;
  right: 0;
  bottom: 7vh;
  z-index: 1;
  width: min(58vw, 940px);
  height: min(56vh, 520px);
  opacity: 0;
  animation: artIn 1.2s 0.3s var(--ease-out) forwards;
  pointer-events: none;
}

.title-art .facility-svg {
  opacity: 0.92;
}

.title-art::before {
  content: "";
  position: absolute;
  inset: -8% -4%;
  background: radial-gradient(ellipse at 55% 50%, rgba(62, 99, 221, 0.055), transparent 65%);
  pointer-events: none;
}

.title-feed {
  position: absolute;
  z-index: 3;
  top: 14vh;
  right: clamp(28px, 4vw, 64px);
  width: min(306px, 25vw);
  padding: 10px 12px 11px;
  border: 1px solid var(--line);
  background: rgba(7, 16, 21, 0.72);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
  opacity: 0;
  animation: titleCopyIn 0.8s 0.55s var(--ease-out) forwards;
}

.title-feed__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 7px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
}

.title-feed__live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--cold-dim);
}

.title-feed__live i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cold);
  animation: softPulse 2.6s ease-in-out infinite;
}

.title-feed__lines {
  display: grid;
  gap: 4px;
}

.feed-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 7px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.5;
}

.feed-row b {
  color: var(--faint);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.feed-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-foot {
  position: absolute;
  z-index: 4;
  left: clamp(28px, 4vw, 64px);
  right: clamp(28px, 4vw, 64px);
  bottom: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.title-foot__disclaimer {
  max-width: 58ch;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.6;
}

.title-foot__meta {
  color: var(--ghost);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-align: right;
  white-space: nowrap;
}

/* ---------- 8. Console chrome ---------- */
.console {
  position: relative;
  display: grid;
  grid-template-rows: 72px auto;
  height: auto;
  min-height: 100vh;
  overflow: visible;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 26px;
  padding: 0 var(--pad-x);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar::after {
  content: "";
  position: absolute;
  right: var(--pad-x);
  bottom: -1px;
  width: 90px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(62, 99, 221, 0.42));
  pointer-events: none;
}

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

.topbar__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(62, 99, 221, 0.27);
  color: var(--cold);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.topbar__div {
  width: 1px;
  height: 24px;
  background: var(--line-strong);
}

.topbar__name {
  display: flex;
  flex-direction: column;
  gap: 0;
  color: var(--fg-2);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.topbar__name em {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.12em;
}

.flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-width: 0;
  height: 100%;
}

.flow li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 clamp(8px, 1vw, 15px);
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1;
  white-space: nowrap;
  transition: color 0.2s var(--ease-out);
}

.flow li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 12px;
  margin-top: -6px;
  background: var(--line);
}

.flow li span {
  color: var(--ghost);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.flow li.is-done {
  color: var(--fg-3);
}

.flow li.is-done span {
  color: var(--cold-dim);
}

.flow li.is-current {
  color: var(--fg);
  font-weight: 550;
}

.flow li.is-current span {
  color: var(--cold);
}

.flow li.is-current::after {
  content: "";
  position: absolute;
  left: clamp(8px, 1vw, 15px);
  right: clamp(8px, 1vw, 15px);
  bottom: 0;
  height: 1px;
  background: var(--cold);
  opacity: 0.8;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mission-clock {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 146px;
}

.clock {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clock__ring {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  transform: rotate(-90deg);
}

.clock__track {
  fill: none;
  stroke: rgba(28, 32, 36, 0.1);
  stroke-width: 2;
}

.clock__arc {
  fill: none;
  stroke: var(--cold);
  stroke-width: 2;
  stroke-linecap: butt;
  transition: stroke-dashoffset 0.8s var(--ease-out), stroke 0.3s var(--ease-out);
}

.clock.is-tight .clock__arc {
  stroke: var(--warn);
}

.clock.is-critical .clock__arc {
  stroke: var(--danger);
}

.clock__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.clock__label {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.clock__value {
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.clock.is-tight .clock__value {
  color: var(--warn);
}

.clock.is-critical .clock__value {
  color: var(--danger);
}

.main {
  position: relative;
  min-height: 0;
  padding: 16px var(--pad-x) 14px;
  overflow: visible;
}

.main:focus {
  outline: none;
}

.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 var(--pad-x);
  border-top: 1px solid var(--line-soft);
  background: rgba(6, 13, 17, 0.66);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.045em;
  line-height: 1;
  white-space: nowrap;
}

.statusbar__left,
.statusbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.statusbar__left > span,
.statusbar__right > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.statusbar__fictional {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--fg-3);
}

.statusbar__fictional i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--warn);
  opacity: 0.8;
}

.statusbar__sep {
  color: var(--ghost);
}

/* ---------- 9. Brief ---------- */
#brief-mount,
#investigate-mount,
#diagnose-mount {
  height: 100%;
  min-height: 0;
}

#brief-mount {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.screen [tabindex="-1"]:focus,
.modal:focus {
  outline: none;
}

.brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: clamp(30px, 4.4vw, 66px);
  width: min(1340px, 100%);
  margin: 0 auto;
  padding: clamp(14px, 2.6vh, 30px) 0 34px;
}

.brief-main {
  min-width: 0;
  animation: riseIn 0.55s 0.04s var(--ease-out) both;
}

.brief-title {
  max-width: 18em;
  margin-top: 16px;
  font-size: clamp(36px, 3.4vw, 48px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--fg);
}

.brief-title em {
  color: var(--cold);
  font-style: normal;
}

.brief-lead {
  max-width: 48ch;
  margin-top: 16px;
  color: var(--fg-2);
  font-size: 15.5px;
  line-height: 1.7;
}

.brief-intro {
  max-width: 64ch;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 9px;
  color: var(--fg-3);
  font-size: 13.5px;
  line-height: 1.75;
}

.brief-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 26px;
  border: 1px solid var(--line);
  background: rgba(9, 20, 26, 0.42);
}

.brief-stat {
  position: relative;
  min-width: 0;
  padding: 13px 14px 12px;
}

.brief-stat + .brief-stat {
  border-left: 1px solid var(--line);
}

.brief-stat__code {
  display: block;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
}

.brief-stat__value {
  display: block;
  margin-top: 5px;
  color: var(--stat-color, var(--fg));
  font-family: var(--font-mono);
  font-size: 27px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.brief-stat__name {
  display: block;
  margin-top: 5px;
  color: var(--fg-2);
  font-size: 11.5px;
  font-weight: 550;
}

.brief-stat__desc {
  margin-top: 4px;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.45;
}

.brief-rules {
  margin-top: 26px;
  max-width: 68ch;
}

.brief-rules ol {
  margin-top: 9px;
  border-top: 1px solid var(--line);
}

.brief-rules li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--fg-3);
  font-size: 12.5px;
  line-height: 1.65;
}

.brief-rules li b {
  color: var(--cold-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
}

.brief-cta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}

.brief-cta__note {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.brief-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  animation: riseIn 0.6s 0.14s var(--ease-out) both;
}

.batch-file {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(28, 32, 36, 0.72), rgba(8, 18, 24, 0.72));
  padding: 15px 16px 14px;
}

.batch-file__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.batch-code {
  margin-top: 8px;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
}

.batch-name {
  margin-top: 5px;
  color: var(--fg-3);
  font-size: 11.5px;
}

.batch-specs {
  margin-top: 13px;
  border-top: 1px solid var(--line);
}

.batch-specs div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
}

.batch-specs dt,
.batch-specs span:first-child {
  color: var(--faint);
  font-size: 10px;
}

.batch-specs dd,
.batch-specs span:last-child {
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.barcode {
  height: 26px;
  margin-top: 12px;
  background-image: repeating-linear-gradient(90deg, rgba(28, 32, 36, 0.34) 0, rgba(28, 32, 36, 0.34) 1px, transparent 1px, transparent 3px, rgba(28, 32, 36, 0.2) 3px, rgba(28, 32, 36, 0.2) 4px, transparent 4px, transparent 7px);
  opacity: 0.55;
}

.batch-file__foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  color: var(--ghost);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
}

.deadline-file {
  border: 1px solid var(--line);
  background: rgba(9, 20, 26, 0.5);
  padding: 13px 16px 14px;
}

.deadline-file__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
}

.deadline-time {
  color: var(--warn);
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.deadline-note {
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.5;
  text-align: right;
}

.timeline-bar {
  position: relative;
  height: 3px;
  margin-top: 14px;
  background: linear-gradient(90deg, var(--cold-dim), rgba(240, 179, 91, 0.62));
  opacity: 0.72;
}

.timeline-bar::before,
.timeline-bar::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 1px;
  height: 9px;
  background: var(--line-bright);
}

.timeline-bar::before {
  left: 0;
}

.timeline-bar::after {
  right: 0;
}

.timeline-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: var(--ghost);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
}

.roster {
  border: 1px solid var(--line);
  background: rgba(8, 18, 24, 0.45);
  padding: 13px 14px 8px;
}

.roster__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.roster__list {
  display: grid;
}

.roster__item {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
}

.roster__avatar,
.avatar {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--avatar-color, var(--fg-3));
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  background: rgba(255, 255, 255, 0.02);
}

.roster__name {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--fg-2);
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.3;
}

.roster__name em {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.06em;
}

.roster__stance {
  margin-top: 2px;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.5;
}

/* ---------- 10. Panels & investigate layout ---------- */
.panel {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(13, 28, 36, 0.6), rgba(8, 18, 24, 0.58));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 12px;
  height: 12px;
  border-top: 1px solid var(--line-bright);
  border-left: 1px solid var(--line-bright);
  pointer-events: none;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 8px 13px;
  border-bottom: 1px solid var(--line-soft);
}

.panel__meta {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.investigate {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr) 374px;
  gap: 16px;
  height: 100%;
  min-height: 0;
}

.rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
}

.stage {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
}

.clue-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.clue-col > .clue-board {
  flex: 1;
  min-height: 0;
}

/* ---------- 11. Facility schematic (SVG) ---------- */
.facility-panel {
  overflow: hidden;
}

.facility-panel .panel__head {
  min-height: 32px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.facility-canvas {
  position: relative;
  height: 178px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 40% 20%, rgba(62, 99, 221, 0.055), transparent 62%),
    rgba(28, 32, 36, 0.55);
}

.facility-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(to bottom, rgba(28, 32, 36, 0.02) 0, rgba(28, 32, 36, 0.02) 1px, transparent 1px, transparent 3px);
  pointer-events: none;
}

.facility-readout {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 25px;
  padding: 0 10px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(90deg, rgba(6, 15, 20, 0.94), rgba(6, 15, 20, 0.62));
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  color: var(--faint);
  white-space: nowrap;
}

.facility-readout b {
  color: var(--fg-2);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
}

.facility-readout__value {
  margin-left: auto;
  color: var(--fg);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.facility-readout__value.is-danger {
  color: #ff9d9d;
}

.facility-readout__value.is-warn {
  color: var(--warn);
}

.facility-readout__alarm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--danger);
  font-size: 7.5px;
}

.facility-readout__alarm::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  animation: softPulse 2.4s ease-in-out infinite;
}

.facility-svg--compact .f-code {
  font-size: 32px;
}

.facility-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.f-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.f-line--faint {
  stroke: rgba(255, 255, 255, 0.11);
}

.f-line--strong {
  stroke: rgba(255, 255, 255, 0.5);
}

.f-room {
  fill: rgba(28, 32, 36, 0.5);
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transition: fill 0.3s var(--ease-out), stroke 0.3s var(--ease-out);
}

.f-room.is-active {
  fill: rgba(58, 91, 199, 0.23);
  stroke: rgba(62, 99, 221, 0.66);
}

.f-room.is-standby {
  fill: rgba(10, 22, 29, 0.34);
}

.f-code {
  fill: rgba(255, 255, 255, 0.16);
  font-family: var(--font-mono);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.f-room.is-active .f-code {
  fill: rgba(62, 99, 221, 0.25);
}

.f-name {
  fill: rgba(255, 255, 255, 0.82);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.f-target {
  fill: rgba(96, 100, 108, 0.9);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.f-label {
  fill: rgba(96, 100, 108, 0.8);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.12em;
}

.f-value {
  fill: rgba(255, 255, 255, 0.9);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
}

.f-value--danger {
  fill: #ff8c8c;
}

.f-value--warn {
  fill: #f0c47f;
}

.f-badge-bg {
  fill: rgba(7, 16, 21, 0.9);
  stroke: rgba(28, 32, 36, 0.2);
  stroke-width: 0.8;
}

.f-badge-bg.is-danger {
  stroke: rgba(255, 107, 107, 0.5);
}

.f-badge-text {
  fill: rgba(255, 140, 140, 0.95);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.08em;
}

.f-slat {
  stroke: rgba(255, 255, 255, 0.24);
  stroke-width: 0.8;
}

.f-air {
  fill: none;
  stroke: rgba(62, 99, 221, 0.34);
  stroke-width: 1;
  stroke-dasharray: 4 7;
  animation: airflow 7s linear infinite;
}

.f-air--warm {
  stroke: rgba(240, 179, 91, 0.34);
  animation-direction: reverse;
}

.f-fan {
  transform-box: fill-box;
  transform-origin: center;
  animation: fanSpin 6s linear infinite;
  stroke: rgba(62, 99, 221, 0.5);
  fill: none;
  stroke-width: 1;
}

.f-sensor {
  fill: var(--bg-deep);
  stroke: rgba(62, 99, 221, 0.7);
  stroke-width: 1;
}

.f-sensor-ring {
  fill: none;
  stroke: rgba(255, 107, 107, 0.5);
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: center;
  animation: sensorPulse 2.8s ease-out infinite;
}

.f-pallet {
  fill: rgba(28, 32, 36, 0.9);
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 0.8;
}

.f-pallet-line {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 0.7;
}

.f-hatch {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 0.8;
}

.title-art .facility-svg .f-room.is-active {
  fill: rgba(58, 91, 199, 0.17);
  stroke: rgba(62, 99, 221, 0.5);
}

.title-art .facility-svg .f-line {
  stroke: rgba(255, 255, 255, 0.2);
}

/* ---------- 12. Stats / batch rail ---------- */
.stats-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.stats-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  padding: 4px 13px 8px;
}

.stat-row {
  padding: 5px 0 6px;
  border-bottom: 1px solid var(--line-soft);
}

.stat-row:last-child {
  border-bottom: 0;
}

.stat-row__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
}

.stat-row__label {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.stat-row__code {
  color: var(--stat-color, var(--fg-3));
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  opacity: 0.82;
}

.stat-row__name {
  color: var(--fg-2);
  font-size: 11.5px;
  line-height: 1.3;
  white-space: nowrap;
}

.stat-row__value-group {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.stat-row__value {
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-row__delta {
  min-width: 0;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.stat-row__delta.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.stat-row__delta.is-up {
  color: var(--supply);
}

.stat-row__delta.is-down {
  color: var(--danger);
}

.stat-row__track {
  position: relative;
  height: 4px;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.055);
  overflow: hidden;
}

.stat-row__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: var(--stat-color, var(--cold));
  opacity: 0.9;
  transition: width 0.7s var(--ease-out), background 0.3s var(--ease-out);
}

.stat-row__ticks {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), rgba(7, 13, 18, 0.75) calc(10% - 1px), rgba(7, 13, 18, 0.75) 10%);
  pointer-events: none;
}

.stat-row__desc {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  color: var(--faint);
  font-size: 8.5px;
  line-height: 1.35;
}

.batch-panel {
  padding: 10px 13px 11px;
}

.batch-panel__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.batch-panel__code {
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.batch-panel__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--cold-dim);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.07em;
}

.batch-panel__status i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.batch-panel__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.03em;
}

.batch-panel__meta b {
  color: var(--fg-3);
  font-weight: 400;
}

/* ---------- 13. Scene center ---------- */
.scene-head {
  padding: 3px 2px 11px;
  border-bottom: 1px solid var(--line);
}

.scene-head__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
}

.scene-head__meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.scene-head__meta span + span::before {
  content: "";
  width: 3px;
  height: 3px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--ghost);
}

.scene-head__code {
  color: var(--cold);
}

.scene-head__title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.scene-title {
  color: var(--fg);
  font-size: clamp(28px, 2.5vw, 38px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.scene-head__room {
  flex: 0 0 auto;
  padding-bottom: 3px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.scene-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 9px;
  color: #ff9d9d;
  font-size: 11.5px;
  line-height: 1.55;
}

.scene-alert .icon {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--danger);
}

.scene-alert__pulse {
  width: 5px;
  height: 5px;
  margin-top: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.45);
  animation: alertPulse 2.6s ease-out infinite;
}

.scene-brief {
  display: grid;
  gap: 5px;
  max-width: 70ch;
  margin-top: 9px;
  color: var(--fg-3);
  font-size: 12.5px;
  line-height: 1.65;
}

.scene-handoff {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 12px;
  max-width: 76ch;
  margin-top: 10px;
  padding: 6px 10px 7px;
  border-left: 2px solid var(--line-bright);
  background: rgba(8, 18, 24, 0.44);
  color: var(--fg-3);
  font-size: 10.5px;
  line-height: 1.5;
}

.scene-handoff__label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

.scene-handoff__verdict {
  color: var(--supply);
  font-weight: 600;
}

.scene-handoff__verdict.is-warn {
  color: var(--warn);
}

.scene-handoff__action {
  color: var(--fg-3);
}

.scene-handoff__stats {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

.scene-handoff__effect {
  flex-basis: 100%;
  margin-top: 2px;
  padding-top: 2px;
  border-top: 1px solid var(--line-soft);
  color: var(--fg-2);
}

.readings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.reading {
  position: relative;
  min-width: 0;
  padding: 8px 10px 9px;
  border: 1px solid var(--line);
  background: rgba(8, 18, 24, 0.48);
}

.reading::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
}

.reading__label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.reading__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--fg-3);
}

.reading--ok .reading__dot {
  background: var(--supply);
}

.reading--warn .reading__dot {
  background: var(--warn);
}

.reading--danger .reading__dot {
  background: var(--danger);
}

.reading__value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 3px;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.reading--danger .reading__value {
  color: #ffa3a3;
}

.reading--warn .reading__value {
  color: #f3c98e;
}

.reading__delta {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 400;
  white-space: nowrap;
}

/* ---------- 14. Log terminal ---------- */
.log-panel {
  display: flex;
  flex-direction: column;
  min-height: 150px;
  overflow: hidden;
  background: rgba(4, 11, 15, 0.72);
}

.log-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.log-panel__title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.log-panel__title .icon {
  width: 12px;
  height: 12px;
  color: var(--cold-dim);
}

.log-panel__live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
}

.log-panel__live i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cold);
  animation: softPulse 2.4s ease-in-out infinite;
}

.log-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 5px 0 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.55;
  scroll-behavior: smooth;
}

.log-row {
  display: grid;
  grid-template-columns: 58px 46px minmax(0, 1fr);
  gap: 8px;
  padding: 2.5px 12px;
  color: var(--fg-3);
  opacity: 0;
  animation: logRowIn 0.24s var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 55ms + 60ms);
}

.log-row:hover {
  background: rgba(62, 99, 221, 0.035);
}

.log-row__t {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.log-row__who {
  color: var(--cold-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-row.is-human .log-row__who {
  color: var(--warn-dim);
}

.log-row__text {
  min-width: 0;
  color: var(--fg-3);
  overflow-wrap: anywhere;
}

.log-row.is-alert .log-row__text {
  color: #e6aaaa;
}

.log-cursor {
  display: inline-block;
  width: 5px;
  height: 10px;
  margin-left: 12px;
  background: rgba(62, 99, 221, 0.6);
  animation: cursorBlink 1.2s steps(1) infinite;
  opacity: 0.7;
}

/* ---------- 15. Council ---------- */
.council {
  overflow: hidden;
}

.council__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.council__title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.council__title .icon {
  width: 12px;
  height: 12px;
  color: var(--warn-dim);
}

.council__source {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.05em;
  color: var(--faint);
  white-space: nowrap;
}

.council__source b {
  color: var(--fg-3);
  font-weight: 400;
}

.council__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line-soft);
}

.council-item {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  padding: 7px 10px 8px;
  background: rgba(9, 20, 26, 0.9);
}

.council-item__avatar {
  width: 23px;
  height: 23px;
  font-size: 9px;
}

.council-item__body {
  min-width: 0;
}

.council-item__head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  line-height: 1.3;
}

.council-item__name {
  color: var(--fg-2);
  font-size: 10.5px;
  font-weight: 550;
  white-space: nowrap;
}

.council-item__role {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.council-item__model {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: var(--warn-dim);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.council-item__line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
  color: var(--fg-3);
  font-size: 9.5px;
  line-height: 1.5;
}

.council-item__line.is-loading {
  color: var(--faint);
  font-style: normal;
}

.council__note {
  padding: 5px 12px 6px;
  border-top: 1px solid var(--line-soft);
  color: var(--ghost);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.04em;
}

/* ---------- 16. Clue board ---------- */
.clue-board {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.clue-board__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 1px 1px 9px;
  border-bottom: 1px solid var(--line);
}

.clue-board__title {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--fg-2);
  font-size: 12px;
  font-weight: 550;
}

.clue-board__title span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.clue-board__read {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.clue-board__read b {
  color: var(--cold);
  font-weight: 500;
}

.clue-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.clue-card {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 7px 10px;
  align-items: start;
  width: 100%;
  min-height: 104px;
  max-height: 168px;
  flex: 1 1 0;
  padding: 11px 12px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(13, 28, 36, 0.62), rgba(8, 18, 24, 0.55));
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s var(--ease-out), background 0.16s var(--ease-out), transform 0.16s var(--ease-out);
  animation: riseIn 0.34s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 55ms + 100ms);
}

.clue-card:hover {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(28, 32, 36, 0.8), rgba(10, 23, 30, 0.7));
  transform: translateX(2px);
}

.clue-card.is-read {
  border-color: rgba(28, 32, 36, 0.14);
}

.clue-card.is-read .clue-card__icon-wrap {
  color: var(--cold-dim);
  border-color: rgba(62, 99, 221, 0.24);
}

.clue-card__icon-wrap {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.16s var(--ease-out), border-color 0.16s var(--ease-out);
}

.clue-card__icon-wrap .icon {
  width: 14px;
  height: 14px;
}

.clue-card__body {
  min-width: 0;
}

.clue-card__foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.clue-card__open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}

.clue-card__open .icon {
  width: 10px;
  height: 10px;
}

.clue-card:hover .clue-card__open {
  color: var(--cold);
}

.clue-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 7px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.clue-card__code {
  color: var(--cold-dim);
  letter-spacing: 0.08em;
}

.clue-card__kind {
  color: var(--ghost);
}

.clue-card__readtag {
  display: none;
  align-items: center;
  gap: 3px;
  color: var(--cold-dim);
  font-size: 7px;
}

.clue-card.is-read .clue-card__readtag {
  display: inline-flex;
}

.clue-card__readtag .icon {
  width: 9px;
  height: 9px;
}

.clue-card__title {
  display: block;
  margin-top: 4px;
  color: var(--fg);
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1.4;
  letter-spacing: 0.005em;
}

.clue-card__source {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clue-card__summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
}

.clue-card__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  min-width: 0;
}

.trust {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 17px;
  padding: 0 4px;
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--fg-3);
  white-space: nowrap;
}

.trust--a {
  color: var(--cold);
  border-color: rgba(62, 99, 221, 0.34);
}

.trust--b {
  color: var(--ink-2);
  border-color: rgba(28, 32, 36, 0.24);
}

.trust--c {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.34);
}

.sparkline {
  display: block;
  width: 52px;
  height: 24px;
  opacity: 0.72;
}

.clue-board__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 2px;
}

.clue-board__gate {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.clue-board__gate b {
  color: var(--cold);
  font-family: var(--font-mono);
  font-weight: 500;
}

.clue-board__gate.is-blocked b {
  color: var(--warn);
}

.clue-board__cta {
  width: 100%;
  height: 42px;
  font-size: 13px;
}

.clue-board__cta[aria-disabled="true"] {
  opacity: 0.62;
  cursor: pointer;
}

.clue-board__hint {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ghost);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.clue-board__legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 12px;
  padding: 1px 1px 2px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.03em;
}

.clue-board__legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.clue-board__legend i {
  width: 13px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

/* ---------- 17. Overlay & clue detail ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 26px;
}

.overlay__scrim {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 9, 0.76);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.18s var(--ease-out) both;
}

.modal {
  position: relative;
  z-index: 1;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #0c1a22 0%, #081218 100%);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.55);
  animation: modalIn 0.24s var(--ease-out) both;
  overflow: hidden;
}

.modal::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 18px;
  height: 18px;
  border-top: 1px solid var(--cold);
  border-left: 1px solid var(--cold);
  pointer-events: none;
  z-index: 2;
}

.modal--clue {
  display: flex;
  flex-direction: column;
  width: min(900px, 92vw);
  max-height: 86vh;
}

.modal--archive {
  display: flex;
  flex-direction: column;
  width: min(1000px, 93vw);
  max-height: 88vh;
}

.clue-head {
  position: relative;
  flex: 0 0 auto;
  padding: 20px 56px 15px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(28, 32, 36, 0.55), transparent);
}

.clue-head__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
}

.clue-head__code {
  color: var(--cold);
}

.clue-head__title {
  margin-top: 8px;
  color: var(--fg);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.018em;
}

.clue-head__source {
  margin-top: 5px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.clue-head__close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.clue-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px 24px;
  overscroll-behavior: contain;
}

.clue-summary {
  max-width: 74ch;
  color: var(--fg-2);
  font-size: 14.5px;
  line-height: 1.7;
}

.clue-detail {
  display: grid;
  gap: 9px;
  max-width: 78ch;
  margin-top: 17px;
  color: var(--fg-3);
  font-size: 12.5px;
  line-height: 1.8;
}

.clue-detail p {
  white-space: pre-line;
}

.clue-hint {
  margin-top: 22px;
  padding: 13px 15px 14px;
  border: 1px solid rgba(240, 179, 91, 0.2);
  background: rgba(240, 179, 91, 0.035);
}

.clue-hint__label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--warn);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.clue-hint__label .icon {
  width: 12px;
  height: 12px;
}

.clue-hint p {
  margin-top: 6px;
  color: var(--fg-3);
  font-size: 11.5px;
  line-height: 1.7;
}

.clue-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 24px;
  border-top: 1px solid var(--line);
  background: rgba(5, 12, 16, 0.5);
}

.clue-foot__note {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.clue-foot__note .icon {
  width: 11px;
  height: 11px;
  color: var(--cold-dim);
}

.evidence-doc {
  margin-top: 19px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
}

.evidence-doc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.evidence-doc__stamp {
  padding: 2px 6px;
  border: 1px solid rgba(28, 32, 36, 0.2);
  color: var(--fg-3);
  font-size: 7px;
  letter-spacing: 0.12em;
  transform: rotate(-1.5deg);
}

.evidence-doc__body {
  display: grid;
  gap: 8px;
  padding: 15px 16px 17px;
  color: var(--fg-3);
  font-size: 12.5px;
  line-height: 1.8;
}

.evidence-doc__body p {
  position: relative;
  padding-left: 13px;
}

.evidence-doc__body p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 4px;
  height: 1px;
  background: var(--ghost);
}

.interview-block {
  display: flex;
  gap: 13px;
  margin-top: 19px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  background: rgba(10, 22, 29, 0.55);
}

.interview-block__avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  font-size: 12px;
}

.interview-block__body {
  min-width: 0;
}

.interview-block__name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--fg-2);
  font-size: 12px;
  font-weight: 550;
}

.interview-block__name em {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.04em;
}

.interview-block__quote {
  display: grid;
  gap: 7px;
  margin-top: 6px;
  color: var(--fg-3);
  font-size: 12.5px;
  line-height: 1.75;
}

.log-evidence {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: rgba(4, 10, 14, 0.72);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.7;
  color: var(--fg-3);
}

.log-evidence p {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 7px;
}

.log-evidence p::before {
  content: "›";
  color: var(--cold-dim);
}

/* ---------- 18. Charts ---------- */
.chart-figure {
  margin-top: 19px;
  border: 1px solid var(--line);
  background: rgba(4, 11, 15, 0.62);
  overflow: hidden;
}

.chart-figure__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 13px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
}

.chart-wrap {
  position: relative;
  padding: 8px 8px 2px;
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.chart-axis-line {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1;
}

.chart-tick {
  fill: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
}

.chart-axis-label {
  fill: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.chart-band {
  fill: rgba(255, 107, 107, 0.06);
}

.chart-band-line {
  stroke: rgba(255, 107, 107, 0.42);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.chart-band-text {
  fill: rgba(255, 140, 140, 0.8);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.chart-series {
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: chartDraw 1.05s 0.1s var(--ease-out) forwards;
}

.chart-series--soft {
  stroke-width: 1.4;
  opacity: 0.78;
}

.chart-point {
  stroke: var(--surface);
  stroke-width: 1.4;
}

.chart-marker-line {
  stroke-width: 1;
  stroke-dasharray: 2 5;
  opacity: 0.45;
}

.chart-marker-text {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.02em;
}

.chart-marker-cap {
  stroke-width: 1;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 4px 14px 10px;
}

.chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.chart-legend__swatch {
  width: 14px;
  height: 2px;
  background: var(--legend-color, var(--cold));
}

.chart-legend__item b {
  color: var(--fg-2);
  font-weight: 400;
}

.chart-hover-line {
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  pointer-events: none;
}

.chart-hover-dot {
  stroke: var(--surface);
  stroke-width: 1.5;
  pointer-events: none;
}

.chart-tooltip {
  position: absolute;
  z-index: 3;
  min-width: 120px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  background: rgba(6, 15, 20, 0.96);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transform: translate(-50%, -100%);
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.6;
  white-space: nowrap;
}

.chart-tooltip b {
  display: block;
  margin-bottom: 2px;
  color: var(--fg-2);
  font-size: 8.5px;
  font-weight: 500;
}

.chart-tooltip__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chart-tooltip__key {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-tooltip__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dot-color, var(--cold));
}

.chart-tooltip__val {
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

/* ---------- 19. Diagnosis ---------- */
.diag {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  min-height: 0;
}

.diag-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.diag-head__main {
  min-width: 0;
}

.diag-title {
  margin-top: 6px;
  color: var(--fg);
  font-size: clamp(26px, 2.2vw, 32px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.diag-sub {
  max-width: 65ch;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.diag-noise-def {
  max-width: 65ch;
  margin-top: 3px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.55;
}

.diag-help {
  margin-top: 12px;
  padding: 10px 12px 11px;
  border: 1px solid var(--line);
  background: rgba(8, 18, 24, 0.38);
}

.diag-help__label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
}

.diag-help__label .icon {
  width: 12px;
  height: 12px;
}

.diag-help ol {
  margin: 7px 0 0 16px;
  padding: 0;
  color: var(--fg-3);
  font-size: 10.5px;
  line-height: 1.7;
}

.diag-help li + li {
  margin-top: 2px;
}

.diag-head__side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.diag-progress {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.diag-progress b {
  color: var(--cold);
  font-weight: 500;
}

.diag-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 22px;
  min-height: 0;
}

.hypo-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.hypo-grid {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 10px;
  min-height: 0;
}

.hypo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 112px;
  overflow: hidden;
  padding: 14px 15px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(13, 28, 36, 0.58), rgba(8, 18, 24, 0.52));
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s var(--ease-out), background 0.16s var(--ease-out), transform 0.12s var(--ease-out);
}

.hypo:hover {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(28, 32, 36, 0.8), rgba(10, 23, 30, 0.68));
}

.hypo:active {
  transform: translateY(1px);
}

.hypo.is-selected {
  border-color: rgba(62, 99, 221, 0.55);
  background: linear-gradient(180deg, rgba(62, 99, 221, 0.075), rgba(28, 32, 36, 0.7));
}

.hypo__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.hypo__key {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line-strong);
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1;
}

.hypo.is-selected .hypo__key {
  color: var(--cold);
  border-color: rgba(62, 99, 221, 0.5);
}

.hypo__radio {
  position: relative;
  width: 14px;
  height: 14px;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  flex: 0 0 auto;
}

.hypo.is-selected .hypo__radio {
  border-color: var(--cold);
}

.hypo.is-selected .hypo__radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--cold);
}

.hypo__label {
  margin-top: 11px;
  color: var(--fg);
  font-size: 14px;
  font-weight: 550;
  line-height: 1.55;
  letter-spacing: 0.005em;
}

.hypo__detail {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.hypo__picked {
  display: none;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 9px;
  color: var(--cold);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.05em;
}

.hypo.is-selected .hypo__picked {
  display: inline-flex;
}

.hypo__picked .icon {
  width: 10px;
  height: 10px;
}

.hypo__ghost {
  position: absolute;
  right: 12px;
  bottom: 5px;
  color: rgba(28, 32, 36, 0.045);
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.05em;
  pointer-events: none;
}

.hypo.is-selected .hypo__ghost {
  color: rgba(62, 99, 221, 0.09);
}

.evidence-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  background: rgba(8, 18, 24, 0.42);
}

.evidence-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line-soft);
}

.evidence-panel__slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.slot {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 46px;
  padding: 6px 8px;
  border: 1px dashed rgba(28, 32, 36, 0.17);
  background: rgba(255, 255, 255, 0.012);
}

.slot--noise {
  grid-column: 1 / -1;
  min-height: 42px;
}

.slot.is-filled {
  border-style: solid;
  border-color: var(--line-strong);
  background: rgba(28, 32, 36, 0.6);
}

.slot--support.is-filled {
  border-color: rgba(62, 99, 221, 0.3);
}

.slot--noise.is-filled {
  border-color: rgba(240, 179, 91, 0.34);
}

.slot__label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.slot__label b {
  color: var(--fg-3);
  font-weight: 400;
}

.slot.is-filled .slot__label {
  color: var(--cold-dim);
}

.slot--noise.is-filled .slot__label {
  color: var(--warn-dim);
}

.slot__value {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin-top: 2px;
  color: var(--fg-2);
  font-size: 10px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot__code {
  color: var(--cold);
  font-family: var(--font-mono);
  font-size: 8px;
  flex: 0 0 auto;
}

.slot--noise .slot__code {
  color: var(--warn);
}

.slot__empty {
  position: absolute;
  right: 7px;
  bottom: 5px;
  color: var(--ghost);
  font-family: var(--font-mono);
  font-size: 7px;
}

.slot__clear {
  position: absolute;
  top: 3px;
  right: 3px;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
}

.slot__clear:hover {
  color: var(--danger);
}

.slot__clear .icon {
  width: 10px;
  height: 10px;
}

.pick-list {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 7px 10px 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.diag-rubric {
  padding: 8px 12px 9px;
  border-top: 1px solid var(--line-soft);
}

.diag-rubric__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 5px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.02em;
}

.diag-rubric__grid span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.diag-rubric__grid b {
  color: var(--fg-3);
  font-weight: 500;
}

.diag-evidence-note {
  padding: 6px 12px 8px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 8.5px;
  line-height: 1.5;
}

.pick-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 7px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 0.15s var(--ease-out), background 0.15s var(--ease-out);
}

.pick-row:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.028);
}

.pick-row.is-support {
  border-color: rgba(62, 99, 221, 0.22);
  background: rgba(62, 99, 221, 0.035);
}

.pick-row.is-noise {
  border-color: rgba(240, 179, 91, 0.24);
  background: rgba(240, 179, 91, 0.035);
}

.pick-row__main {
  min-width: 0;
}

.pick-row__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.04em;
}

.pick-row__code {
  color: var(--cold-dim);
}

.pick-row__title {
  margin-top: 2px;
  color: var(--fg-2);
  font-size: 10.5px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pick-row__actions {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
}

.pick-btn {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 1px;
  background: rgba(9, 20, 26, 0.6);
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.15s var(--ease-out), border-color 0.15s var(--ease-out), background 0.15s var(--ease-out);
}

.pick-btn:hover:not(:disabled) {
  color: var(--fg);
  border-color: var(--line-strong);
}

.pick-btn[aria-pressed="true"][data-act="support"] {
  color: #ffffff;
  background: var(--cold);
  border-color: var(--cold);
}

.pick-btn[aria-pressed="true"][data-act="noise"] {
  color: #241703;
  background: var(--warn);
  border-color: var(--warn);
}

.pick-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.diag-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.diag-foot__status {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.diag-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.diag-status span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.diag-status b {
  color: var(--fg-3);
  font-weight: 500;
}

.diag-status .is-ready {
  color: var(--cold);
}

.submit-hint {
  color: var(--warn);
  font-size: 10px;
  line-height: 1.5;
}

.submit-hint.is-ready {
  color: var(--muted);
}

.diag-foot__action {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.kbd-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 7px;
  line-height: 1;
}

/* ---------- 20. Verdict ---------- */
#verdict-mount,
#consequence-mount,
#ending-mount {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.verdict {
  width: min(1340px, 100%);
  margin: 0 auto;
  padding: 2px 0 26px;
}

.verdict-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 28px;
  align-items: center;
  padding: 20px 24px 21px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(62, 99, 221, 0.06), transparent 46%),
    linear-gradient(180deg, rgba(28, 32, 36, 0.8), rgba(8, 18, 24, 0.7));
  overflow: hidden;
  animation: riseIn 0.45s var(--ease-out) both;
}

.verdict-hero::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -42px;
  width: 220px;
  height: 160px;
  border: 1px solid rgba(28, 32, 36, 0.06);
  transform: rotate(-12deg);
  pointer-events: none;
}

.verdict-hero[data-outcome="wrong"] {
  background:
    linear-gradient(90deg, rgba(240, 179, 91, 0.07), transparent 46%),
    linear-gradient(180deg, rgba(29, 26, 18, 0.55), rgba(28, 32, 36, 0.7));
}

.verdict-hero[data-outcome="unknown"] {
  background:
    linear-gradient(90deg, rgba(143, 166, 178, 0.05), transparent 46%),
    linear-gradient(180deg, rgba(28, 32, 36, 0.8), rgba(8, 18, 24, 0.7));
}

.verdict-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
}

.verdict-hero__title {
  margin-top: 6px;
  color: var(--cold);
  font-size: clamp(36px, 3.6vw, 48px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.verdict-hero[data-outcome="wrong"] .verdict-hero__title {
  color: var(--warn);
}

.verdict-hero[data-outcome="unknown"] .verdict-hero__title {
  color: var(--fg-2);
}

.verdict-hero__sub {
  max-width: 66ch;
  margin-top: 7px;
  color: var(--fg-3);
  font-size: 12px;
  line-height: 1.6;
}

.verdict-hero__chain {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 6px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.03em;
}

.verdict-hero__chain b {
  color: var(--fg-2);
  font-weight: 500;
}

.verdict-hero[data-outcome="wrong"] .verdict-hero__chain b {
  color: var(--warn);
}

.verdict-hero__score {
  position: relative;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.verdict-hero__score-label {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.verdict-hero__score-value {
  margin-top: 2px;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 46px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.verdict-hero__score-value.is-plus {
  color: var(--cold);
}

.verdict-hero__score-note {
  margin-top: 5px;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.5;
}

.verdict-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.verdict-breakdown__term {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.verdict-breakdown__term b {
  color: var(--fg-3);
  font-weight: 500;
}

.verdict-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 20px;
  align-items: start;
  margin-top: 16px;
  animation: riseIn 0.45s 0.08s var(--ease-out) both;
}

.judge-panel,
.review-panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(8, 18, 24, 0.42);
}

.judge-panel__head,
.review-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line-soft);
}

.judge-list {
  display: flex;
  flex-direction: column;
}

.judge-line {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line-soft);
  opacity: 0;
  animation: chipIn 0.3s var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 90ms + 140ms);
}

.judge-line:last-child {
  border-bottom: 0;
}

.judge-line__code {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  line-height: 1.45;
  padding-top: 2px;
}

.judge-line__body {
  min-width: 0;
}

.judge-line__title {
  color: var(--fg-2);
  font-size: 12px;
  font-weight: 550;
  line-height: 1.4;
}

.judge-line__why {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.judge-line__slot {
  margin-top: 3px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.judge-line__slot b {
  font-weight: 500;
}

.judge-line__slot b.is-support {
  color: var(--cold);
}

.judge-line__slot b.is-contradict {
  color: var(--danger);
}

.judge-line__slot b.is-noise {
  color: var(--warn);
}

.judge-line__slot b.is-neutral {
  color: var(--fg-3);
}

.judge-line__slot-points {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.judge-line__slot-points.is-plus {
  color: var(--supply);
}

.judge-line__slot-points.is-minus {
  color: var(--danger);
}

.judge-line--skipped {
  grid-template-columns: minmax(0, 1fr);
  opacity: 0.55;
  background: rgba(255, 255, 255, 0.012);
}

.judge-line--skipped .judge-line__title {
  color: var(--faint);
  font-weight: 400;
}

.judge-line__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.judge-line__points {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
}

.judge-line__points.is-plus {
  color: var(--supply);
}

.judge-line__points.is-minus {
  color: var(--danger);
}

.role {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  padding: 0 6px;
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

.role--support {
  color: var(--cold);
  border-color: rgba(62, 99, 221, 0.36);
  background: rgba(62, 99, 221, 0.05);
}

.role--contradict {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.38);
  background: rgba(255, 107, 107, 0.05);
}

.role--noise {
  color: var(--warn);
  border-color: rgba(240, 179, 91, 0.38);
  background: rgba(240, 179, 91, 0.05);
}

.role--neutral {
  color: var(--fg-3);
  border-color: var(--line-strong);
}

.review-list {
  display: flex;
  flex-direction: column;
}

.review-row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 7px 13px;
  border-bottom: 1px solid var(--line-soft);
}

.review-row__mark {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: transparent;
}

.review-row__mark .icon {
  width: 9px;
  height: 9px;
}

.review-row__label {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.review-row.is-correct {
  background: rgba(62, 99, 221, 0.045);
}

.review-row.is-correct .review-row__mark {
  border-color: var(--cold);
  color: var(--cold);
  background: rgba(62, 99, 221, 0.08);
}

.review-row.is-correct .review-row__label {
  color: var(--fg-2);
}

.review-row.is-picked-wrong .review-row__mark {
  border-color: rgba(255, 107, 107, 0.5);
  color: var(--danger);
}

.review-row.is-picked-wrong .review-row__label {
  color: #dda7a7;
}

.review-row__tag {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  padding-top: 2px;
}

.review-row.is-correct .review-row__tag {
  color: var(--cold-dim);
}

.review-row.is-picked-wrong .review-row__tag {
  color: var(--danger-dim);
}

.explain {
  margin: 10px 12px 13px;
  padding: 11px 12px 12px;
  border-top: 1px solid rgba(62, 99, 221, 0.2);
  background: rgba(62, 99, 221, 0.025);
}

.explain__label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--cold-dim);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.09em;
}

.explain__label .icon {
  width: 11px;
  height: 11px;
}

.explain p {
  margin-top: 6px;
  color: var(--fg-3);
  font-size: 10.5px;
  line-height: 1.72;
}

.actions-block {
  margin-top: 16px;
  animation: riseIn 0.45s 0.16s var(--ease-out) both;
}

.actions-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.actions-head__title {
  margin-top: 4px;
  color: var(--fg);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.actions-head__note {
  max-width: 36ch;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.5;
  text-align: right;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 11px;
}

.action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 166px;
  padding: 12px 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(13, 28, 36, 0.6), rgba(8, 18, 24, 0.54));
  transition: border-color 0.16s var(--ease-out), background 0.16s var(--ease-out);
}

.action-card:hover {
  border-color: var(--line-strong);
}

.action-card.is-selected {
  border-color: rgba(240, 179, 91, 0.52);
  background: linear-gradient(180deg, rgba(240, 179, 91, 0.055), rgba(9, 19, 25, 0.62));
}

.action-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.action-card__index {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.risk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--fg-3);
}

.risk--low {
  color: var(--supply);
  border-color: rgba(62, 99, 221, 0.3);
}

.risk--medium {
  color: var(--warn);
  border-color: rgba(240, 179, 91, 0.3);
}

.risk--high {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.32);
}

.action-card__label {
  margin-top: 9px;
  color: var(--fg);
  font-size: 13.5px;
  font-weight: 550;
  line-height: 1.5;
}

.action-card__detail {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.action-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
}

.action-card__minutes {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.action-card__pick {
  height: 27px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  background: transparent;
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.15s var(--ease-out), border-color 0.15s var(--ease-out), background 0.15s var(--ease-out);
}

.action-card__pick:hover {
  color: var(--fg);
  border-color: var(--line-bright);
}

.action-card.is-selected .action-card__pick {
  color: #241703;
  background: var(--warn);
  border-color: var(--warn);
}

.action-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 11px;
  padding: 11px 14px;
  border: 1px solid rgba(240, 179, 91, 0.28);
  background: rgba(240, 179, 91, 0.04);
}

.action-confirm__text {
  min-width: 0;
  color: var(--fg-3);
  font-size: 10.5px;
  line-height: 1.55;
}

.action-confirm__text b {
  color: var(--fg);
  font-weight: 550;
}

.action-confirm__actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

/* ---------- 21. Consequence ---------- */
.consequence {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 405px;
  gap: clamp(30px, 4vw, 62px);
  width: min(1180px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(18px, 3.6vh, 40px) 0 28px;
  align-content: start;
}

.consequence-main {
  min-width: 0;
  animation: riseIn 0.5s var(--ease-out) both;
}

.consequence-title {
  margin-top: 8px;
  color: var(--fg);
  font-size: clamp(32px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.13;
  letter-spacing: -0.025em;
}

.consequence-action {
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.consequence-action__label {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.consequence-action__title {
  margin-top: 4px;
  color: var(--fg-2);
  font-size: 14.5px;
  font-weight: 550;
  line-height: 1.5;
}

.consequence-action__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.03em;
}

.consequence-action__meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.consequence-action__meta .icon {
  width: 11px;
  height: 11px;
  color: var(--cold-dim);
}

.type-lines {
  min-height: 154px;
  margin-top: 22px;
  outline: none;
}

.type-line {
  min-height: 1.8em;
  margin-bottom: 10px;
  color: var(--fg-2);
  font-size: 14.5px;
  line-height: 1.8;
  white-space: pre-line;
}

.type-line:last-child {
  margin-bottom: 0;
}

.type-caret {
  display: inline-block;
  width: 6px;
  height: 15px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--cold);
  animation: cursorBlink 1s steps(1) infinite;
  opacity: 0.8;
}

.type-lines__skip {
  margin-top: 14px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.consequence-side {
  min-width: 0;
  animation: riseIn 0.5s 0.1s var(--ease-out) both;
}

.consequence-review {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  background: rgba(8, 18, 24, 0.45);
}

.consequence-review__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.consequence-review__aligned {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.consequence-review__aligned-note {
  margin-left: 6px;
  color: var(--faint);
  font-size: 9.5px;
  font-style: normal;
  letter-spacing: 0.02em;
}

.consequence-review__aligned.is-ok {
  color: var(--supply);
}

.consequence-review__aligned.is-miss {
  color: var(--warn);
}

.consequence-review__reason {
  padding: 9px 14px 0;
  color: var(--fg-2);
  font-size: 10.5px;
  line-height: 1.6;
}

.consequence-review__score {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 8px 14px 10px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.02em;
}

.consequence-review__score b {
  color: var(--fg-3);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.delta-panel {
  border: 1px solid var(--line);
  background: rgba(8, 18, 24, 0.45);
}

.delta-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.delta-list {
  padding: 4px 14px 7px;
}

.delta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  padding: 8px 0 9px;
  border-bottom: 1px solid var(--line-soft);
}

.delta-row:last-child {
  border-bottom: 0;
}

.delta-row__label {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.delta-row__name {
  color: var(--fg-3);
  font-size: 10.5px;
}

.delta-row__code {
  color: var(--stat-color, var(--faint));
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

.delta-row__values {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.delta-row__before {
  color: var(--faint);
}

.delta-row__arrow {
  color: var(--ghost);
  font-size: 10px;
}

.delta-row__after {
  color: var(--fg);
}

.delta-row__delta {
  grid-column: 2;
  justify-self: end;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.delta-row__delta.is-up {
  color: var(--supply);
}

.delta-row__delta.is-down {
  color: var(--danger);
}

.delta-row__track {
  grid-column: 1 / -1;
  position: relative;
  height: 3px;
  margin-top: 2px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.delta-row__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--stat-color, var(--cold));
  opacity: 0.8;
  transition: width 0.9s var(--ease-out);
}

.consequence-note {
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.consequence-note b {
  color: var(--fg-3);
  font-weight: 500;
}

.consequence-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}

.consequence-cta__hint {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.03em;
}

/* ---------- 22. Ending ---------- */
.ending {
  --ending-accent: var(--cold);
  --ending-tone: rgba(62, 99, 221, 0.06);
  width: min(1340px, 100%);
  margin: 0 auto;
  padding: 4px 0 30px;
}

.ending[data-tone="danger"] {
  --ending-accent: var(--danger);
  --ending-tone: rgba(255, 107, 107, 0.055);
}

.ending[data-tone="warn"] {
  --ending-accent: var(--warn);
  --ending-tone: rgba(240, 179, 91, 0.055);
}

.ending[data-tone="supply"] {
  --ending-accent: var(--supply);
  --ending-tone: rgba(62, 99, 221, 0.05);
}

.ending-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: clamp(30px, 5vw, 76px);
  align-items: start;
  padding-top: clamp(8px, 2.4vh, 28px);
}

.ending-main {
  min-width: 0;
  animation: endingIn 1.1s var(--ease-out) both;
}

.ending-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.ending-code {
  color: var(--ending-accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.tier {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 21px;
  padding: 0 7px;
  border: 1px solid var(--ending-accent);
  color: var(--ending-accent);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  line-height: 1;
}

.tier b {
  font-size: 11px;
  font-weight: 600;
}

.tier--muted {
  border-color: var(--line-strong);
  color: var(--fg-3);
  letter-spacing: 0.04em;
}

.ending-title {
  position: relative;
  margin-top: 10px;
  color: var(--fg);
  font-size: clamp(48px, 5.2vw, 76px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.ending-title::after {
  content: "";
  display: block;
  width: 76px;
  height: 2px;
  margin-top: 16px;
  background: var(--ending-accent);
  opacity: 0.72;
}

.ending-reason {
  max-width: 52ch;
  margin-top: 13px;
  color: var(--fg-3);
  font-size: 13px;
  line-height: 1.7;
}

.ending-text {
  display: grid;
  gap: 11px;
  max-width: 62ch;
  margin-top: 23px;
  color: var(--fg-2);
  font-size: 14px;
  line-height: 1.85;
}

.ending-epilogue {
  max-width: 52ch;
  margin-top: 24px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--ending-accent);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.ending-epilogue::before {
  content: "「";
  color: var(--faint);
  font-family: var(--font-mono);
}

.ending-epilogue::after {
  content: "」";
  color: var(--faint);
  font-family: var(--font-mono);
}

.ending-ai {
  max-width: 60ch;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(240, 179, 91, 0.22);
  background: rgba(240, 179, 91, 0.03);
}

.ending-ai__head {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--warn);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
}

.ending-ai p {
  margin-top: 6px;
  color: var(--fg-3);
  font-size: 11.5px;
  line-height: 1.75;
}

.ending-aside {
  min-width: 0;
  animation: riseIn 0.6s 0.18s var(--ease-out) both;
}

.run-file {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, var(--ending-tone), transparent 34%),
    rgba(8, 18, 24, 0.5);
}

.run-file__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.run-file__score {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 14px 14px;
}

.score-total {
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 54px;
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.score-total small {
  color: var(--faint);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
}

.score-total__label {
  margin-top: 5px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.rank {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 68px;
  border: 1px solid var(--ending-accent);
  background: rgba(255, 255, 255, 0.015);
}

.rank span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.1em;
}

.rank b {
  color: var(--ending-accent);
  font-family: var(--font-mono);
  font-size: 27px;
  font-weight: 500;
  line-height: 1.05;
}

.score-breakdown {
  padding: 0 14px 10px;
}

.score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  padding: 7px 0 8px;
  border-top: 1px solid var(--line-soft);
}

.score-row__label {
  color: var(--fg-3);
  font-size: 10px;
}

.score-row__value {
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.score-row__track {
  grid-column: 1 / -1;
  height: 2px;
  background: rgba(255, 255, 255, 0.055);
  overflow: hidden;
}

.score-row__fill {
  height: 100%;
  width: 0;
  background: var(--ending-accent);
  opacity: 0.62;
  transition: width 1s var(--ease-out);
}

.run-meta {
  padding: 2px 14px 12px;
}

.run-meta__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid var(--line-soft);
}

.run-meta__row span {
  color: var(--faint);
  font-size: 9.5px;
}

.run-meta__row b {
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-align: right;
}

.run-meta__row b.is-accent {
  color: var(--ending-accent);
}

.run-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 14px 14px;
}

.run-actions .btn {
  height: 40px;
  font-size: 12.5px;
}

.acts-block {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: rgba(8, 18, 24, 0.38);
  animation: riseIn 0.6s 0.28s var(--ease-out) both;
}

.acts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line-soft);
}

.acts-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.act-row {
  min-width: 0;
  padding: 10px 13px 11px;
}

.act-row + .act-row {
  border-left: 1px solid var(--line-soft);
}

.act-row__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.act-row__code {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
}

.act-row__scene {
  margin-top: 3px;
  color: var(--fg-2);
  font-size: 11px;
  font-weight: 550;
}

.act-row__hypo {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.act-row__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
}

.act-row__foot b {
  color: var(--fg-3);
  font-weight: 400;
}

.ending-disclaimer {
  margin-top: 16px;
  color: var(--ghost);
  font-size: 9.5px;
  line-height: 1.6;
}

.ending-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.ending-share__line {
  min-width: 0;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.55;
  letter-spacing: 0.02em;
}

.ending-share__next {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.ending-share .btn--quiet {
  flex: 0 0 auto;
}

/* ---------- 23. Archive ---------- */
.archive-head {
  flex: 0 0 auto;
  position: relative;
  padding: 20px 56px 15px 24px;
  border-bottom: 1px solid var(--line);
}

.archive-head__title {
  margin-top: 7px;
  color: var(--fg);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.archive-head__sub {
  margin-top: 4px;
  color: var(--faint);
  font-size: 10.5px;
}

.archive-head__close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.archive-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 24px 22px;
}

.archive-scene {
  border: 1px solid var(--line);
  background: rgba(8, 18, 24, 0.38);
}

.archive-scene + .archive-scene {
  margin-top: 12px;
}

.archive-scene__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line-soft);
}

.archive-scene__title {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

.archive-scene__code {
  color: var(--cold-dim);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.archive-scene__title b {
  color: var(--fg-2);
  font-size: 12px;
  font-weight: 550;
}

.archive-scene__points {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  white-space: nowrap;
}

.archive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.archive-cell {
  padding: 10px 13px 11px;
}

.archive-cell:nth-child(even) {
  border-left: 1px solid var(--line-soft);
}

.archive-cell:nth-child(n + 3) {
  border-top: 1px solid var(--line-soft);
}

.archive-cell__label {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.archive-cell__value {
  margin-top: 3px;
  color: var(--fg-3);
  font-size: 10.5px;
  line-height: 1.55;
}

.archive-cell__value b {
  color: var(--fg-2);
  font-weight: 500;
}

.archive-judge {
  border-top: 1px solid var(--line-soft);
  padding: 6px 13px 9px;
}

.archive-judge__row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
}

.archive-judge__row:last-child {
  border-bottom: 0;
}

.archive-judge__why {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}

.archive-empty {
  padding: 30px 20px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

/* ---------- 24. Toast ---------- */
.toast {
  position: fixed;
  right: 26px;
  bottom: 42px;
  z-index: 140;
  max-width: min(420px, 86vw);
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
  background: rgba(8, 18, 24, 0.97);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast b {
  color: var(--fg);
  font-weight: 500;
}

.toast.is-error {
  border-color: rgba(255, 107, 107, 0.38);
  color: #f1c6c6;
}

.toast.is-ok {
  border-color: rgba(62, 99, 221, 0.32);
}

body.has-overlay {
  overflow: hidden;
}

/* ---------- 25. Generic states ---------- */
.notice {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: rgba(240, 179, 91, 0.03);
  color: var(--fg-3);
  font-size: 11.5px;
  line-height: 1.65;
}

.notice--error {
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.04);
}

.notice b {
  color: var(--fg);
  font-weight: 550;
}

/* ---------- 26. Animations ---------- */
@keyframes bootSweep {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes titleCopyIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes artIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes chipIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes logRowIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes chartDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes sceneWipe {
  0% { opacity: 0; transform: translateX(-110%); }
  12% { opacity: 0.9; }
  70% { opacity: 0.5; }
  100% { opacity: 0; transform: translateX(110%); }
}

@keyframes endingIn {
  from { opacity: 0; transform: translateY(16px) scale(0.996); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes alertPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
  60% { box-shadow: 0 0 0 7px rgba(255, 107, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

@keyframes sensorPulse {
  0% { opacity: 0.7; transform: scale(0.7); }
  70% { opacity: 0; transform: scale(2.2); }
  100% { opacity: 0; transform: scale(2.2); }
}

@keyframes airflow {
  to { stroke-dashoffset: -44; }
}

@keyframes fanSpin {
  to { transform: rotate(360deg); }
}

@keyframes softPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@keyframes cursorBlink {
  0%, 48% { opacity: 0.8; }
  49%, 100% { opacity: 0; }
}

@keyframes statFlash {
  0% { color: var(--fg); }
  30% { color: var(--cold-bright); }
  100% { color: var(--fg); }
}

/* ---------- 27. Responsive ---------- */
@media (max-width: 1460px) {
  .investigate {
    grid-template-columns: 272px minmax(0, 1fr) 356px;
  }

  .brief {
    grid-template-columns: minmax(0, 1fr) 348px;
    gap: 40px;
  }

  .verdict-body {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}

@media (max-width: 1320px) {
  .investigate {
    grid-template-columns: 258px minmax(0, 1fr) 340px;
  }

  .council-item {
    padding-left: 8px;
    padding-right: 8px;
  }

  .flow li {
    padding-left: 9px;
    padding-right: 9px;
  }

  .flow li.is-current::after {
    left: 9px;
    right: 9px;
  }

  .ending-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 40px;
  }
}

@media (max-width: 1180px) {
  .console {
    grid-template-rows: 60px auto;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .main {
    padding-top: 14px;
    padding-bottom: 12px;
  }

  .topbar {
    height: auto;
  }

  .brief {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    padding-top: 10px;
    padding-bottom: 18px;
  }

  .brief-title {
    margin-top: 12px;
  }

  .brief-lead {
    margin-top: 10px;
  }

  .brief-intro {
    margin-top: 14px;
    padding-top: 14px;
    gap: 6px;
  }

  .brief-stats {
    margin-top: 18px;
  }

  .brief-stat {
    padding: 10px 12px 9px;
  }

  .brief-rules {
    margin-top: 20px;
  }

  .brief-rules li {
    padding: 7px 0;
  }

  .brief-cta {
    margin-top: 20px;
  }

  .brief-side {
    gap: 12px;
  }

  .investigate {
    grid-template-columns: 206px minmax(0, 1fr) 288px;
    gap: 10px;
    height: 100%;
  }

  .rail {
    gap: 10px;
  }

  .stage {
    gap: 10px;
  }

  .clue-col {
    gap: 8px;
  }

  .clue-list {
    gap: 7px;
  }

  .clue-card {
    min-height: 88px;
  }

  .diag {
    height: 100%;
  }

  .diag-body {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 14px;
  }

  .hypo {
    min-height: 136px;
  }

  .consequence {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    padding-top: 20px;
  }

  .consequence-side {
    position: static;
  }

  .ending-grid {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
  }

  .scene-wipe {
    top: 60px;
    bottom: 27px;
  }
}

@media (max-width: 1080px) {
  .topbar {
    gap: 12px;
  }

  .topbar__name {
    font-size: 9.5px;
  }

  .topbar__name em {
    display: none;
  }

  .topbar__div {
    display: none;
  }

  .topbar__mark {
    height: 24px;
  }

  .flow li {
    padding: 0 7px;
    font-size: 9.5px;
  }

  .flow li.is-current::after {
    left: 7px;
    right: 7px;
  }

  .mission-clock {
    min-width: 130px;
  }

  .topbar__right {
    gap: 9px;
  }

  .title-feed {
    width: 250px;
  }

  .title-copy {
    width: min(620px, 50vw);
  }

  .display {
    font-size: clamp(56px, 6.4vw, 78px);
  }

  .brief {
    grid-template-columns: minmax(0, 1fr) 292px;
    gap: 22px;
  }

  .investigate {
    grid-template-columns: 200px minmax(0, 1fr) 280px;
  }

  .diag-body {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 12px;
  }

  .verdict-body {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .ending-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
  }
}

@media (max-width: 1000px) {
  .title-feed {
    display: none;
  }

  .title-copy {
    width: min(600px, 54vw);
  }

  .console {
    grid-template-rows: 60px auto 27px;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .main {
    overflow: visible;
    padding-bottom: 20px;
  }

  .screen {
    height: auto;
  }

  #brief-mount,
  #investigate-mount,
  #diagnose-mount,
  #verdict-mount,
  #consequence-mount,
  #ending-mount {
    height: auto;
    overflow: visible;
  }

  .brief {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .brief-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .roster {
    grid-column: 1 / -1;
  }

  .investigate {
    grid-template-columns: 220px minmax(0, 1fr);
    height: auto;
  }

  .rail {
    grid-template-rows: auto auto auto;
    align-content: start;
  }

  .stage {
    grid-template-rows: auto auto minmax(220px, 1fr) auto;
  }

  .clue-col {
    grid-column: 1 / -1;
  }

  .clue-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .clue-card {
    min-height: 84px;
  }

  .clue-board__foot {
    margin-top: 4px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    align-items: center;
    gap: 12px;
  }

  .clue-board__hint {
    grid-column: 1 / -1;
  }

  .diag {
    height: auto;
  }

  .diag-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .evidence-panel {
    min-height: 400px;
  }

  .diag-foot {
    align-items: flex-start;
  }

  .verdict-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .review-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .review-panel__head {
    grid-column: 1 / -1;
  }

  .review-list {
    border-right: 1px solid var(--line-soft);
  }

  .explain {
    margin: 0 12px;
    align-self: start;
  }

  .consequence {
    grid-template-columns: 1fr;
  }

  .consequence-side {
    position: static;
    max-width: 540px;
  }

  .ending-grid {
    grid-template-columns: 1fr;
  }

  .ending-aside {
    max-width: 520px;
  }
}

@media (max-height: 780px) and (min-width: 1181px) {
  .title-copy {
    margin-top: clamp(30px, 7vh, 60px);
  }

  .display {
    font-size: clamp(56px, 6.1vw, 88px);
  }

  .starters {
    margin-top: 24px;
  }

  .starters li {
    padding-top: 7px;
    padding-bottom: 8px;
  }

  .title-art {
    height: min(50vh, 440px);
  }

  .facility-canvas {
    height: 154px;
  }

  .stat-row {
    padding-top: 3px;
    padding-bottom: 4px;
  }

  .clue-card {
    min-height: 72px;
  }

  .council-item__line {
    -webkit-line-clamp: 2;
  }

  .scene-brief {
    font-size: 12px;
  }

  .investigate {
    gap: 13px;
  }
}

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

  .scene-wipe {
    display: none;
  }

  .ambient__scan {
    display: none;
  }

  .boot__bar span {
    animation: none;
    width: 100%;
    opacity: 0.45;
  }

  .chart-series {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
  }

  .title-copy,
  .title-art,
  .title-feed,
  .brief-main,
  .brief-side,
  .ending-main,
  .ending-aside,
  .verdict-hero,
  .verdict-body,
  .actions-block,
  .consequence-main,
  .consequence-side,
  .clue-card,
  .judge-line,
  .log-row {
    opacity: 1;
    transform: none;
  }

  .f-air,
  .f-fan,
  .f-sensor-ring,
  .title-feed__live i,
  .log-panel__live i,
  .signal__dot,
  .type-caret,
  .log-cursor {
    animation: none !important;
  }

  .f-air {
    opacity: 0.25;
  }
}

@media (max-width: 520px) {
  .topbar__name {
    display: none;
  }
}

/* ---------- 29. 窄屏：保留可读性，不做移动端专门适配 ---------- */
@media (max-width: 700px) {
  .console {
    grid-template-rows: auto auto auto;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    width: 100%;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 8px 16px;
    min-height: 60px;
  }

  .topbar__name em {
    display: none;
  }

  .topbar__mark {
    white-space: nowrap;
  }

  .flow {
    display: none;
  }

  .acts-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .main {
    padding: 12px 16px 16px;
    overflow: visible;
  }

  .screen {
    height: auto;
  }

  .investigate {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    height: auto;
  }

  .rail,
  .stage,
  .clue-col {
    min-width: 0;
  }

  .rail {
    order: 2;
    grid-template-rows: none;
    align-content: start;
  }

  .stage {
    order: 0;
    grid-template-rows: none;
  }

  .clue-col {
    order: 1;
    grid-column: auto;
  }

  .clue-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .clue-board__foot {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .readings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .statusbar {
    flex-wrap: wrap;
    height: auto;
    padding: 6px 16px;
    gap: 4px 8px;
    line-height: 1.5;
    white-space: normal;
  }

  .statusbar__sep {
    display: none;
  }

  .title-shell {
    min-height: 100vh;
    padding: 22px 20px 26px;
    overflow: visible;
    display: flex;
    flex-direction: column;
  }

  .title-shell::after,
  .title-art,
  .title-feed {
    display: none;
  }

  .title-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .title-top__right {
    padding-top: 0;
    gap: 12px;
    flex-wrap: wrap;
  }

  .title-copy {
    width: 100%;
    max-width: none;
    margin-top: 34px;
  }

  .display {
    font-size: clamp(42px, 12.5vw, 64px);
  }

  .display__main,
  .display__sub {
    white-space: normal;
  }

  .title-actions {
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
  }

  .title-actions__note {
    width: 100%;
  }

  .title-foot {
    position: static;
    margin-top: 32px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .title-foot__meta {
    text-align: left;
    white-space: normal;
  }

  .verdict-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .verdict-hero__score {
    width: 100%;
    text-align: left;
  }

  .action-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .action-card {
    min-height: 0;
  }

  .action-card__pick {
    height: 44px;
    padding: 0 14px;
    font-size: 12px;
  }

  .clue-card__summary {
    font-size: 12px;
    line-height: 1.55;
  }

  .toast {
    font-size: 12px;
  }
}