/* =========================================================
   雾岭档案 · CASE 01 林间小屋杀人案
   复古像素桌面 / 视觉小说 / 推理 UI
   ========================================================= */

:root {
  --font-ui: "MS Gothic", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --font-serif: "SimSun", "Songti SC", "Noto Serif CJK SC", "Yu Mincho", serif;
  --ink: #25241d;
  --ink-soft: #504c3d;
  --ink-mute: #77715c;
  --paper: #d9d5bb;
  --paper-hi: #e9e5cf;
  --paper-mid: #cfcaae;
  --paper-lo: #bcb79b;
  --line: #343227;
  --line-soft: #8b866d;
  --red: #8b332b;
  --red-bright: #b44a3b;
  --red-dark: #5c211d;
  --green: #566149;
  --green-light: #7f8c6b;
  --blue: #3f565f;
  --black: #0d0e0b;
  --shadow: rgba(9, 9, 6, .55);
  --shadow-hard: rgba(9, 9, 6, .72);
  --bar: #20211b;
  --gold: #b99858;
  --white: #f2edda;
  --dur: 180ms;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
html { background: #14140f; }
body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: #14140f;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.65;
  -webkit-font-smoothing: none;
  text-rendering: geometricPrecision;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { border-radius: 0; }
a { color: inherit; }
img, svg { display: block; }
::selection { color: var(--paper-hi); background: var(--red); }

:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 2px;
}

.app {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #171711;
}

/* 扫描线 / 颗粒 */
.app::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .045) 0, rgba(0, 0, 0, .045) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: multiply;
  opacity: .8;
}
.app.no-scanlines::after { display: none; }

/* 通用像素窗口 */
.window {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--shadow);
}
.window::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(58, 55, 42, .22);
  pointer-events: none;
  z-index: 1;
}
.window-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  flex: 0 0 26px;
  padding: 0 7px;
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg, rgba(52, 50, 39, .10) 0, rgba(52, 50, 39, .10) 1px, transparent 1px, transparent 4px),
    linear-gradient(180deg, #e6e1c8 0%, #d5d0b3 100%);
  font-size: 11px;
  letter-spacing: .09em;
  color: var(--ink);
  user-select: none;
}
.window-bar::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 3px;
  width: 18px;
  height: 5px;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 3px);
  opacity: .45;
}
.window-title { display: flex; align-items: center; gap: 5px; white-space: nowrap; font-weight: 700; }
.window-title .sq { width: 7px; height: 7px; background: var(--ink); box-shadow: 1px 1px 0 var(--paper-hi); }
.window-sub { margin-left: auto; font-size: 9px; color: var(--ink-mute); letter-spacing: .06em; }
.window-x {
  position: relative;
  z-index: 3;
  width: 18px;
  height: 15px;
  border: 1px solid var(--line);
  background: var(--paper-hi);
  line-height: 12px;
  text-align: center;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}
.window-x:hover { color: var(--paper-hi); background: var(--red); }
.window-body { position: relative; z-index: 2; flex: 1; min-height: 0; overflow: auto; }
.window-body::-webkit-scrollbar { width: 8px; height: 8px; }
.window-body::-webkit-scrollbar-track { background: var(--paper-mid); border-left: 1px solid var(--line-soft); }
.window-body::-webkit-scrollbar-thumb { background: var(--line); border: 2px solid var(--paper-mid); }

.pixel-portrait {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  background: var(--paper-hi);
  box-shadow: 2px 2px 0 var(--shadow);
  font-size: 11px;
  letter-spacing: .08em;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--dur), background var(--dur), color var(--dur);
}
.btn:hover { background: var(--paper); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--shadow); }
.btn:active { transform: translate(1px, 1px); box-shadow: 0 0 0 var(--shadow); }
.btn--red { color: var(--paper-hi); background: var(--red); border-color: var(--red-dark); }
.btn--red:hover { background: var(--red-bright); }
.btn--dark { color: var(--paper-hi); background: var(--ink); border-color: #0d0d09; }
.btn--ghost { background: transparent; box-shadow: none; }
.btn--small { min-height: 24px; padding: 2px 8px; font-size: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* =========================================================
   标题画面
   ========================================================= */
.title-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  color: var(--white);
  background: #0c0f0e;
}
.title-art { position: absolute; inset: 0; }
.title-art .scene-svg { width: 100%; height: 100%; filter: brightness(1.16) contrast(1.03) saturate(.9); }
.title-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 8, .84) 0%, rgba(7, 9, 8, .56) 34%, rgba(7, 9, 8, .03) 66%, rgba(7, 9, 8, .34) 100%),
    linear-gradient(0deg, rgba(5, 6, 5, .92) 0%, transparent 34%, transparent 72%, rgba(5, 6, 5, .56) 100%);
}
.title-snow {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  opacity: .55;
  background-image:
    radial-gradient(circle, rgba(244, 239, 218, .8) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(244, 239, 218, .5) 0 1px, transparent 1.4px);
  background-size: 183px 183px, 271px 271px;
  background-position: 0 0, 70px 90px;
  animation: snow-drift 22s linear infinite;
}
@keyframes snow-drift {
  to { transform: translate3d(-110px, 220px, 0); }
}
.title-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .55;
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .10) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .016) 0 1px, transparent 1px 5px);
}

.title-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 48px;
  padding: 0 clamp(18px, 4vw, 58px);
  border-bottom: 1px solid rgba(230, 224, 201, .20);
  background: linear-gradient(180deg, rgba(8, 10, 9, .78), rgba(8, 10, 9, .16));
  font-size: 10px;
  letter-spacing: .18em;
  color: #b8b39e;
}
.title-brand { display: flex; align-items: center; gap: 9px; color: #e4dfc8; font-weight: 700; }
.title-brand .brand-sq {
  width: 13px;
  height: 13px;
  background: var(--red);
  box-shadow: inset 0 0 0 2px #1a1b16, 2px 2px 0 #000;
}
.title-brand small { font-size: 8px; letter-spacing: .22em; color: #8f8a77; }
.title-top-center { margin: 0 auto; color: #8d8978; }
.title-top-center b { color: #d4cfb9; font-weight: 400; }
.title-top-actions { display: flex; gap: 12px; align-items: center; }
.title-top-btn {
  border: 0;
  background: transparent;
  color: #b7b19d;
  font-size: 9px;
  letter-spacing: .18em;
  cursor: pointer;
  padding: 6px 0;
  text-decoration: none;
}
.title-top-btn:hover { color: var(--white); }
.title-top-btn.is-on { color: #d9bb7a; }

.title-main {
  position: absolute;
  z-index: 4;
  left: clamp(26px, 8vw, 126px);
  top: 50%;
  width: min(720px, 63vw);
  transform: translateY(-47%);
  animation: title-rise .9s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes title-rise {
  from { opacity: 0; transform: translateY(-42%); }
  to { opacity: 1; transform: translateY(-47%); }
}
.title-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: #b7ae91;
  font-size: 10px;
  letter-spacing: .28em;
}
.title-kicker::before { content: ""; width: 42px; height: 1px; background: var(--red-bright); }
.title-kicker b { color: #d6b06a; font-weight: 400; }
.title-logo {
  margin: 0;
  color: #f3eedb;
  font-family: var(--font-serif);
  font-size: clamp(54px, 7.6vw, 104px);
  line-height: .96;
  font-weight: 900;
  letter-spacing: .035em;
  text-shadow: 4px 4px 0 rgba(0, 0, 0, .72), 0 0 34px rgba(5, 7, 6, .55);
  -webkit-text-stroke: .35px currentColor;
}
.title-logo span { display: block; white-space: nowrap; }
.title-logo .accent {
  color: #d9d2b7;
  position: relative;
  display: inline-block;
}
.title-logo .accent::after {
  content: "";
  position: absolute;
  left: .06em;
  right: .12em;
  bottom: -.04em;
  height: 6px;
  background: var(--red);
  opacity: .8;
}
.title-logo .red { color: #c55243; -webkit-text-stroke-color: #c55243; }
.title-en {
  margin: 18px 0 0;
  color: #9e9984;
  font-size: 11px;
  letter-spacing: .42em;
}
.title-en span { color: #c5b58b; }
.title-lead {
  max-width: 500px;
  margin: 24px 0 0;
  color: #ddd6c0;
  font-family: var(--font-serif);
  font-size: clamp(13px, 1.2vw, 16px);
  line-height: 2;
  letter-spacing: .04em;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .5);
}
.title-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}
.title-meta-row span {
  padding: 3px 8px;
  border: 1px solid rgba(202, 195, 171, .3);
  background: rgba(17, 18, 14, .52);
  color: #c6bfa8;
  font-size: 9px;
  letter-spacing: .14em;
}
.title-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
}
.title-actions .btn {
  min-height: 48px;
  min-width: 198px;
  padding: 7px 18px;
  flex-direction: column;
  gap: 1px;
  border-color: #b6ac8d;
  color: var(--ink);
  background: #ddd7bf;
  box-shadow: 4px 4px 0 #050604;
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: .12em;
}
.title-actions .btn small { font-size: 8px; letter-spacing: .18em; color: #716b57; }
.title-actions .btn--start { background: var(--red); color: #f1e7d0; border-color: #3f1613; }
.title-actions .btn--start small { color: #d7a69a; }
.title-actions .btn:hover { background: #eee8d1; }
.title-actions .btn--start:hover { background: #a63f33; }
.title-actions .btn[hidden] { display: none; }
.title-note {
  margin-top: 26px;
  color: #a49e88;
  font-size: 9px;
  letter-spacing: .12em;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .55);
}
.title-side {
  position: absolute;
  z-index: 4;
  right: clamp(26px, 4.5vw, 76px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 22px;
  color: #8f8a76;
}
.title-side-text {
  writing-mode: vertical-rl;
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: .5em;
  line-height: 2;
  color: #b8b19a;
}
.title-seal {
  width: 44px;
  height: 158px;
  border: 1px solid rgba(207, 199, 171, .3);
  background: rgba(12, 14, 11, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  font-family: var(--font-serif);
  color: #c3b58f;
  font-size: 10px;
  letter-spacing: .32em;
  position: relative;
}
.title-seal::before, .title-seal::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  height: 1px;
  background: var(--red-bright);
  opacity: .7;
}
.title-seal::before { top: 10px; }
.title-seal::after { bottom: 10px; }
.title-number { display: none; }
.title-bottom {
  position: absolute;
  z-index: 4;
  left: clamp(26px, 8vw, 126px);
  right: clamp(26px, 8vw, 126px);
  bottom: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-top: 12px;
  border-top: 1px solid rgba(208, 201, 177, .18);
  color: #726e5e;
  font-size: 8px;
  letter-spacing: .16em;
}
.title-bottom b { color: #a49e87; font-weight: 400; }

/* =========================================================
   序章 / 真相重构（视觉小说）
   ========================================================= */
.story-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  color: var(--white);
  background: #0a0b09;
  cursor: pointer;
}
.story-screen[hidden], .desktop-screen[hidden], .trial-screen[hidden], .ending-screen[hidden] { display: none; }
.story-art { position: absolute; inset: 0; }
.story-art .scene-svg { width: 100%; height: 100%; filter: brightness(1.12) contrast(1.02); transition: opacity .5s ease; }
.scene-black { position: absolute; inset: 0; background: #080907; }
.story-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(5, 6, 5, .94) 0%, rgba(5, 6, 5, .42) 38%, rgba(5, 6, 5, .02) 70%, rgba(5, 6, 5, .38) 100%),
    linear-gradient(90deg, rgba(5, 6, 5, .44), transparent 45%);
}
.story-screen.is-reveal .story-art .scene-svg { filter: grayscale(.5) sepia(.25) brightness(.52) contrast(1.12); }
.story-screen.is-reveal .story-art::after {
  background:
    linear-gradient(0deg, rgba(10, 5, 4, .97) 0%, rgba(13, 7, 6, .62) 40%, rgba(11, 6, 5, .16) 72%, rgba(9, 5, 4, .7) 100%),
    linear-gradient(90deg, rgba(20, 8, 6, .66), transparent 48%);
}
.story-top {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  right: 0;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 clamp(14px, 4vw, 42px);
  border-bottom: 1px solid rgba(232, 225, 203, .16);
  background: linear-gradient(180deg, rgba(7, 8, 6, .78), rgba(7, 8, 6, .08));
  font-size: 9px;
  letter-spacing: .2em;
  color: #9f9a87;
}
.story-top .story-case { color: #cfc7ae; }
.story-top .story-case b { color: var(--red-bright); font-weight: 400; }
.story-top-center { margin-left: auto; color: #6f6b5c; }
.story-controls { display: flex; align-items: center; gap: 12px; margin-left: 10px; }
.story-control {
  border: 0;
  background: transparent;
  color: #a7a18c;
  font-size: 9px;
  letter-spacing: .16em;
  cursor: pointer;
  padding: 4px 0;
}
.story-control:hover { color: var(--white); }
.story-tag {
  position: absolute;
  z-index: 3;
  top: 72px;
  left: clamp(18px, 8vw, 110px);
  color: #d6cfb8;
  font-size: 10px;
  letter-spacing: .2em;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 1px 1px 0 #000;
}
.story-tag::before { content: ""; width: 28px; height: 2px; background: var(--red-bright); }
.story-stage {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: clamp(22px, 5vh, 60px);
  width: min(1060px, calc(100vw - 48px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(140px, 235px) minmax(0, 1fr);
  align-items: end;
  gap: clamp(12px, 2.4vw, 30px);
}
.story-screen.is-narration .story-stage { grid-template-columns: minmax(0, 1fr); width: min(920px, calc(100vw - 48px)); }
.story-portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  align-self: end;
  filter: drop-shadow(6px 6px 0 rgba(0, 0, 0, .55));
  animation: portrait-in .28s steps(3) both;
}
.story-portrait[hidden] { display: none; }
.story-portrait .pixel-portrait {
  border: 1px solid rgba(231, 223, 201, .35);
  background: #c9c5ae;
}
.story-portrait::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -7px;
  height: 12px;
  background: rgba(0, 0, 0, .5);
  filter: blur(4px);
}
@keyframes portrait-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.story-screen.is-narration .story-portrait { display: none; }
.story-dialogue {
  position: relative;
  min-height: clamp(150px, 22vh, 200px);
  padding: clamp(20px, 2.6vw, 32px) clamp(18px, 3vw, 36px) clamp(24px, 3vw, 34px);
  border: 1px solid rgba(224, 217, 195, .46);
  background:
    linear-gradient(180deg, rgba(27, 27, 22, .93), rgba(15, 16, 13, .96)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 4px);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .45), inset 0 0 0 3px rgba(5, 6, 4, .55);
  backdrop-filter: blur(2px);
}
.story-dialogue::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-top: 1px solid rgba(213, 206, 183, .4);
  border-left: 1px solid rgba(213, 206, 183, .4);
}
.story-dialogue::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 14px;
  height: 14px;
  border-right: 1px solid rgba(213, 206, 183, .3);
  border-bottom: 1px solid rgba(213, 206, 183, .3);
}
.story-speaker {
  position: absolute;
  left: 18px;
  top: -15px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 2px 12px 3px;
  border: 1px solid var(--line);
  background: var(--paper-hi);
  color: var(--ink);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .5);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
}
.story-speaker small { font-size: 8px; font-weight: 400; letter-spacing: .16em; color: var(--ink-mute); }
.story-speaker[hidden] { display: none; }
.story-text {
  margin: 0;
  color: #e0dbc6;
  font-family: var(--font-serif);
  font-size: clamp(14px, 1.35vw, 17px);
  line-height: 2;
  letter-spacing: .04em;
  min-height: 3.9em;
  text-shadow: 1px 1px 0 #000;
  word-break: break-word;
}
.story-screen.is-reveal .story-dialogue { border-color: rgba(174, 93, 75, .55); }
.story-screen.is-reveal .story-text { color: #e9ddc7; }
.story-screen.is-reveal .story-speaker { background: #d7cbb0; }
.story-next {
  position: absolute;
  right: 15px;
  bottom: 9px;
  color: #bdb69e;
  font-size: 11px;
  animation: next-blink 1.1s steps(2) infinite;
}
@keyframes next-blink { 50% { opacity: .15; } }
.story-screen.is-typing .story-next { opacity: 0; }
.story-hint {
  position: absolute;
  right: clamp(14px, 4vw, 42px);
  bottom: 14px;
  color: #6e6a5b;
  font-size: 8px;
  letter-spacing: .15em;
}
.story-log {
  position: absolute;
  z-index: 8;
  right: clamp(10px, 4vw, 46px);
  top: 52px;
  bottom: 48px;
  width: min(430px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  border: 1px solid #6d6652;
  background: rgba(16, 17, 13, .97);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .6);
}
.story-log[hidden] { display: none; }
.story-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-bottom: 1px solid #4c4738;
  color: #c9c2aa;
  font-size: 10px;
  letter-spacing: .14em;
}
.story-log-body { overflow: auto; padding: 4px 10px 14px; }
.story-log-line { padding: 8px 0; border-bottom: 1px dashed rgba(196, 188, 164, .18); color: #b9b29b; font-family: var(--font-serif); font-size: 12px; line-height: 1.8; }
.story-log-line b { color: #e0d8bf; display: block; font-family: var(--font-ui); font-size: 9px; letter-spacing: .1em; margin-bottom: 2px; }
.story-log-close { border: 0; background: none; color: #b9b29b; font-size: 14px; cursor: pointer; }

/* =========================================================
   调查桌面
   ========================================================= */
.desktop-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% 42%, #474537 0%, #2d2c24 44%, #1d1d17 100%);
  color: var(--ink);
}
.desktop-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .34;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .028) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .08) 0 1px, transparent 1px 5px);
}
.desktop-screen::after {
  content: "MISTRIDGE ARCHIVE";
  position: absolute;
  right: 70px;
  bottom: 40px;
  color: rgba(219, 212, 190, .045);
  font-family: var(--font-serif);
  font-size: 62px;
  letter-spacing: .1em;
  pointer-events: none;
  white-space: nowrap;
}

.sysbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 28px;
  flex: 0 0 28px;
  padding: 0 10px;
  border-bottom: 1px solid #090a07;
  background: linear-gradient(180deg, #2a2b23, #1d1e18);
  color: #bdb7a1;
  font-size: 9px;
  letter-spacing: .12em;
  user-select: none;
}
.sys-brand { display: flex; align-items: center; gap: 7px; color: #d4cdb6; font-weight: 700; }
.sys-brand .sys-mark { width: 10px; height: 10px; background: #c9c1a8; box-shadow: inset 0 0 0 2px #1d1e18, 2px 2px 0 #000; }
.sys-brand .sys-jp { color: #807b68; font-family: var(--font-serif); font-size: 9px; letter-spacing: .2em; }
.sys-save {
  margin-left: auto;
  margin-right: auto;
  color: #7f7b6a;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 8px;
  letter-spacing: .19em;
}
.sys-save::before { content: ""; width: 4px; height: 4px; background: #72805d; box-shadow: 0 0 4px #8a9b6e; }
.sys-save.is-saving::before { animation: save-blink .55s steps(2) infinite; }
@keyframes save-blink { 50% { opacity: .1; } }
.sys-actions { display: flex; gap: 2px; }
.sys-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #a19b87;
  padding: 2px 7px;
  font-size: 8px;
  letter-spacing: .16em;
  cursor: pointer;
}
.sys-btn:hover { color: var(--white); border-color: #4f4b3c; }
.sys-time { color: #6f6a59; font-size: 8px; margin-left: 4px; }

.workspace {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 9px 9px 6px;
  display: grid;
  grid-template-columns: 264px minmax(390px, 1fr) 286px 56px;
  gap: 8px;
}

/* 案件报告 */
.case-panel { min-height: 0; overflow: hidden; }
.case-body { padding: 8px; overflow: auto; }
.case-head {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding-bottom: 7px;
  border-bottom: 1px dashed var(--line-soft);
}
.case-portrait {
  position: relative;
  width: 70px;
  height: 70px;
  flex: 0 0 70px;
  border: 1px solid var(--line);
  background: #beb99e;
  filter: grayscale(1) contrast(1.05);
  overflow: hidden;
}
.case-portrait::after {
  content: "DECEASED";
  position: absolute;
  left: -11px;
  top: 27px;
  width: 94px;
  padding: 2px 0;
  transform: rotate(-18deg);
  border: 1px solid var(--red);
  color: var(--red);
  background: rgba(233, 228, 209, .55);
  text-align: center;
  font-size: 7px;
  letter-spacing: .1em;
}
.case-person { min-width: 0; }
.case-person .case-no { color: var(--red); font-size: 9px; letter-spacing: .12em; }
.case-person h2 { margin: 0; font-family: var(--font-serif); font-size: 23px; line-height: 1.1; letter-spacing: .08em; }
.case-person h2 span { font-family: var(--font-ui); font-size: 8px; color: var(--ink-mute); letter-spacing: .12em; }
.case-person h2 .case-name { font-family: var(--font-serif); font-size: inherit; color: var(--ink); letter-spacing: inherit; }
.case-person p { margin: 2px 0 0; color: var(--ink-soft); font-size: 9px; line-height: 1.5; }
.case-fields { margin-top: 6px; display: grid; gap: 3px; }
.case-field { display: grid; grid-template-columns: 48px 1fr; gap: 5px; align-items: baseline; font-size: 9px; }
.case-field dt { color: var(--ink-mute); letter-spacing: .05em; }
.case-field dd { margin: 0; color: var(--ink); font-weight: 700; }
.case-field dd.is-danger { color: var(--red); }

.case-minirow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 7px;
}
.case-mini {
  border: 1px solid var(--line-soft);
  background: rgba(235, 231, 213, .5);
  padding: 4px 3px;
  min-width: 0;
}
.case-mini span { display: block; color: var(--ink-mute); font-size: 7px; letter-spacing: .08em; }
.case-mini b { display: block; margin-top: 1px; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-mini i { display: block; width: 100%; height: 2px; background: var(--line-soft); margin-top: 3px; }
.case-mini i::before { content: ""; display: block; width: 55%; height: 100%; background: var(--red); }

.case-progress { margin-top: 8px; }
.case-progress-head { display: flex; justify-content: space-between; font-size: 8px; letter-spacing: .08em; color: var(--ink-soft); }
.case-progress-head b { color: var(--red); font-size: 10px; }
.progress-track {
  position: relative;
  height: 8px;
  margin-top: 3px;
  border: 1px solid var(--line);
  background: var(--paper-lo);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(90deg, var(--red) 0 4px, #a44336 4px 8px);
  transition: width .4s steps(8);
}
.progress-fill.is-full { background: repeating-linear-gradient(90deg, var(--green) 0 4px, #6c795a 4px 8px); }

.objectives { margin-top: 8px; display: grid; gap: 4px; }
.objective {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding: 5px 6px;
  border: 1px solid var(--line-soft);
  background: rgba(235, 231, 213, .38);
  text-align: left;
  font-size: 9px;
  cursor: pointer;
  color: var(--ink-soft);
}
.objective:hover { border-color: var(--line); background: var(--paper-hi); }
.objective .obj-box {
  width: 11px;
  height: 11px;
  border: 1px solid var(--line);
  background: var(--paper-hi);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  line-height: 1;
}
.objective.is-done .obj-box { background: var(--green); color: var(--paper-hi); border-color: #3e4735; }
.objective.is-locked { opacity: .55; cursor: not-allowed; }
.objective b { font-weight: 700; color: var(--ink); }
.objective em { font-style: normal; font-size: 8px; color: var(--ink-mute); }
.objective .obj-status { color: var(--red); font-size: 8px; letter-spacing: .05em; }
.objective.is-done .obj-status { color: var(--green); }

.case-quote {
  margin-top: 8px;
  padding: 6px 7px;
  border-left: 2px solid var(--red);
  background: rgba(139, 51, 43, .055);
  font-family: var(--font-serif);
  font-size: 10px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.case-open { width: 100%; margin-top: 7px; }

/* 中央：地图 + 现场速记 */
.center-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  min-width: 0;
}
.map-panel { flex: 0 0 62%; min-height: 0; overflow: hidden; }
.notes-panel { flex: 1; min-height: 0; overflow: hidden; }
.notes-body { display: flex; flex-direction: column; gap: 6px; padding: 7px 8px; overflow: hidden; }
.note-conditions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.note-conditions > div { padding: 4px 6px; border: 1px solid var(--line-soft); background: rgba(235, 231, 213, .46); }
.note-conditions span { display: block; color: var(--ink-mute); font-size: 7px; letter-spacing: .08em; }
.note-conditions b { display: block; margin-top: 1px; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-conditions b.is-red { color: var(--red); }
.next-objective {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  align-items: center;
  padding: 6px 8px;
  border-left: 2px solid var(--red);
  background: rgba(139, 51, 43, .055);
}
.next-objective .next-label { grid-column: 1 / -1; color: var(--red); font-size: 7px; letter-spacing: .16em; }
.next-objective p { margin: 0; color: var(--ink-soft); font-family: var(--font-serif); font-size: 10px; line-height: 1.6; }
.next-objective .btn { min-height: 22px; font-size: 8px; padding: 2px 7px; white-space: nowrap; }
.field-log-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-mute);
  font-size: 7px;
  letter-spacing: .1em;
}
.field-log { display: flex; flex-direction: column; gap: 3px; min-height: 0; overflow: hidden; flex: 1; }
.field-log-item { display: grid; grid-template-columns: 38px 1fr; gap: 6px; align-items: baseline; }
.field-log-item time { color: var(--red); font-size: 7px; letter-spacing: .04em; }
.field-log-item p { margin: 0; color: var(--ink-soft); font-family: var(--font-serif); font-size: 9px; line-height: 1.55; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field-log-empty { color: var(--ink-mute); font-family: var(--font-serif); font-size: 10px; padding: 5px 0; }
.field-foot {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-top: 4px;
  border-top: 1px dashed var(--line-soft);
  color: var(--ink-mute);
  font-size: 7px;
  letter-spacing: .04em;
}
.field-foot b { color: var(--red); font-size: 8px; }
.field-foot .field-stamp {
  margin-left: auto;
  padding: 1px 5px;
  border: 1px solid var(--red);
  color: var(--red);
  font-family: var(--font-serif);
  font-size: 7px;
  letter-spacing: .14em;
  transform: rotate(-2deg);
  opacity: .8;
}

/* 地图 */
.map-panel .map-wrap { min-height: 0; }
.map-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 24px;
  padding: 0 7px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-mid);
  font-size: 8px;
  letter-spacing: .08em;
  color: var(--ink-soft);
}
.map-toolbar .tag {
  padding: 1px 5px;
  border: 1px solid var(--line);
  background: var(--paper-hi);
  color: var(--ink);
  font-size: 7px;
}
.map-toolbar .tag--red { color: var(--paper-hi); background: var(--red); border-color: var(--red-dark); }
.map-toolbar .map-sync { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.map-toolbar .map-sync::before { content: ""; width: 4px; height: 4px; background: var(--green); }
.map-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  padding: 5px;
  overflow: hidden;
  background: var(--paper);
}
.map-wrap::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--line-soft);
  pointer-events: none;
  z-index: 2;
}
.map-svg { width: 100%; height: 100%; image-rendering: pixelated; }
.map-footer {
  flex: 0 0 23px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 7px;
  border-top: 1px solid var(--line-soft);
  background: var(--paper-mid);
  color: var(--ink-soft);
  font-size: 8px;
  letter-spacing: .04em;
}
.map-footer .map-legend { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.map-footer .map-legend span { display: flex; align-items: center; gap: 3px; }
.map-footer .legend-dot { width: 5px; height: 5px; background: var(--red); }
.map-footer .legend-dot--done { background: var(--green); }

.map-title { font-family: var(--font-serif); font-size: 12px; font-weight: 700; fill: var(--ink); letter-spacing: .08em; }
.map-sub { font-size: 5.5px; fill: #77715c; letter-spacing: .08em; }
.map-floor-tag { font-size: 7px; font-weight: 700; fill: #8b332b; letter-spacing: .12em; }
.map-small { font-size: 7px; fill: #6b6653; letter-spacing: .08em; }
.map-entry { font-size: 5px; fill: var(--red); letter-spacing: .14em; }
.map-note { font-size: 5px; fill: #8b3a30; letter-spacing: .04em; }
.map-scale { font-size: 6px; fill: #5b5746; }
.map-compass { font-size: 7px; fill: var(--red); font-weight: 700; }
.map-tag { font-size: 7px; fill: var(--paper-hi); letter-spacing: .1em; }
.map-room { cursor: pointer; outline: none; }
.map-room-bg {
  fill: rgba(229, 225, 206, .42);
  stroke: #77715d;
  stroke-width: 1;
  transition: fill .16s;
}
.map-room-hatch { fill: url(#map-hatch); pointer-events: none; }
.map-room-name { font-family: var(--font-serif); font-size: 13px; font-weight: 700; fill: #343126; pointer-events: none; letter-spacing: .08em; }
.map-room-en { font-size: 5.5px; fill: #77715d; letter-spacing: .1em; pointer-events: none; }
.map-room-count { font-size: 7px; fill: #5b5746; letter-spacing: .06em; pointer-events: none; }
.map-room:hover .map-room-bg, .map-room:focus .map-room-bg { fill: rgba(204, 190, 154, .75); stroke: var(--red); stroke-width: 2; }
.map-room.has-new .map-room-bg { stroke: var(--red); stroke-width: 1.5; }
.map-room.has-new .map-room-count { fill: var(--red); font-weight: 700; }
.map-room.is-complete .map-room-bg { fill: rgba(190, 198, 171, .55); }
.map-room.is-complete .map-room-count { fill: var(--green); }
.map-room.is-complete .map-room-name::after { content: " ✓"; fill: var(--green); }
.map-annotation { pointer-events: none; }

/* 学生名册 */
.roster-panel { min-height: 0; overflow: hidden; }
.roster-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 24px;
  padding: 0 7px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-mid);
  font-size: 8px;
  color: var(--ink-soft);
}
.roster-toolbar b { color: var(--ink); }
.roster-toolbar .roster-sort { margin-left: auto; font-size: 7px; border: 1px solid var(--line-soft); padding: 0 4px; background: var(--paper-hi); }
.roster-grid {
  flex: 1;
  overflow: auto;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  align-content: start;
}
.roster-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  height: 72px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  background: rgba(235, 231, 213, .48);
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  overflow: hidden;
}
.roster-card:hover { border-color: var(--ink); background: var(--paper-hi); }
.roster-card.is-you { background: rgba(209, 213, 194, .56); border-color: #707a61; }
.roster-card.is-alert { border-color: var(--red); }
.roster-card.is-alert::after {
  content: "!";
  position: absolute;
  right: 2px;
  top: 1px;
  width: 13px;
  height: 13px;
  background: var(--red);
  color: var(--paper-hi);
  font-size: 9px;
  line-height: 13px;
  text-align: center;
  font-weight: 700;
}
.roster-avatar {
  width: 45px;
  height: 55px;
  flex: 0 0 45px;
  border: 1px solid var(--line);
  background: #c3bea6;
  overflow: hidden;
  position: relative;
}
.roster-avatar .pixel-portrait { width: 100%; height: 100%; }
.roster-card.is-alert .roster-avatar { filter: contrast(1.08); }
.roster-info { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.roster-no { color: var(--red); font-size: 7px; line-height: 1; letter-spacing: .1em; }
.roster-name { font-family: var(--font-serif); font-size: 12px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.roster-talent { font-size: 7px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster-status { margin-top: 2px; font-size: 7px; color: var(--green); letter-spacing: .05em; }
.roster-status.is-red { color: var(--red); }
.roster-status.is-mute { color: var(--ink-mute); }
.roster-footer {
  flex: 0 0 23px;
  border-top: 1px solid var(--line-soft);
  background: var(--paper-mid);
  padding: 0 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 7px;
  color: var(--ink-mute);
}
.roster-footer b { color: var(--red); font-weight: 700; }

/* 右侧工具栏 */
.dock {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  align-self: start;
  width: 56px;
}
.dock-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 56px;
  min-height: 57px;
  padding: 3px 2px 2px;
  border: 1px solid #11120d;
  background: linear-gradient(180deg, var(--paper-hi), var(--paper-mid));
  box-shadow: 2px 2px 0 var(--shadow);
  color: var(--ink);
  font-size: 9px;
  letter-spacing: .05em;
  cursor: pointer;
  transition: transform .12s, background .12s;
}
.dock-btn:hover { transform: translate(-1px, -1px); background: var(--paper-hi); }
.dock-btn:active { transform: translate(1px, 1px); box-shadow: 0 0 0 var(--shadow); }
.dock-icon-svg { width: 25px; height: 25px; }
.dock-btn span { font-size: 8px; color: var(--ink-soft); }
.dock-btn.is-locked { opacity: .48; cursor: not-allowed; filter: grayscale(.5); }
.dock-btn.is-locked:hover { transform: none; }
.dock-btn.is-ready {
  color: var(--paper-hi);
  background: var(--red);
  border-color: #3b1411;
  animation: dock-ready 1.4s steps(2) infinite;
}
.dock-btn.is-ready span { color: #efd8cd; }
.dock-btn.is-ready .dock-icon-svg { filter: drop-shadow(0 0 3px rgba(255, 208, 190, .55)); }
@keyframes dock-ready { 50% { box-shadow: 0 0 0 2px rgba(205, 104, 85, .5), 2px 2px 0 var(--shadow); } }
.dock-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 5px;
  height: 5px;
  background: var(--red);
  box-shadow: 0 0 0 1px var(--paper-hi);
}
.dock-btn.is-ready .dock-dot { background: #f3ddc7; }

.statusbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 26px;
  flex: 0 0 26px;
  padding: 0 11px;
  border-top: 1px solid #090a07;
  background: linear-gradient(180deg, #1f2019, #171812);
  color: #8f8a76;
  font-size: 8px;
  letter-spacing: .06em;
}
.statusbar .status-led { width: 4px; height: 4px; background: var(--red-bright); animation: status-blink 1.5s steps(2) infinite; }
@keyframes status-blink { 50% { opacity: .2; } }
.statusbar .status-msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statusbar .status-msg b { color: #d1c9b1; font-weight: 400; }
.statusbar .status-hint {
  margin-left: auto;
  border: 1px solid #4a4638;
  background: #2b2c23;
  color: #b5ae97;
  padding: 1px 7px;
  font-size: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.statusbar .status-hint:hover { border-color: #8a836c; color: var(--white); }
.statusbar .status-clock { color: #6d6858; white-space: nowrap; }

/* =========================================================
   通用弹窗
   ========================================================= */
.modal-root { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.modal-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 7, 5, .68);
  backdrop-filter: blur(2px);
  pointer-events: auto;
  animation: modal-fade .14s ease both;
}
@keyframes modal-fade { from { opacity: 0; } }
.modal-window {
  width: min(760px, 94vw);
  max-height: min(84vh, 820px);
  display: flex;
  flex-direction: column;
  border: 2px solid var(--line);
  background: var(--paper);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .58);
  animation: modal-pop .18s cubic-bezier(.2, .9, .3, 1.2) both;
}
@keyframes modal-pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.modal-head {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  flex: 0 0 28px;
  padding: 0 6px 0 8px;
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg, rgba(51, 49, 38, .08) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, #e7e2c9, #d4cfb1);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}
.modal-head .modal-sq { width: 7px; height: 7px; background: var(--ink); }
.modal-head .modal-sub { margin-left: auto; margin-right: 6px; color: var(--ink-mute); font-size: 8px; font-weight: 400; letter-spacing: .08em; }
.modal-close {
  width: 19px;
  height: 17px;
  border: 1px solid var(--line);
  background: var(--paper-hi);
  line-height: 14px;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}
.modal-close:hover { background: var(--red); color: var(--paper-hi); }
.modal-body { overflow: auto; padding: 14px; background: var(--paper); }
.modal-body::-webkit-scrollbar { width: 9px; }
.modal-body::-webkit-scrollbar-track { background: var(--paper-mid); }
.modal-body::-webkit-scrollbar-thumb { background: var(--line); border: 2px solid var(--paper-mid); }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 10px;
  margin-top: 12px;
  border-top: 1px dashed var(--line-soft);
}

/* 线索卡 */
.clue-modal { width: min(730px, 94vw); }
.clue-layout { display: grid; grid-template-columns: 146px 1fr; gap: 18px; align-items: start; }
.clue-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(45deg, rgba(59, 56, 44, .05) 0 2px, transparent 2px 6px),
    var(--paper-hi);
}
.clue-visual::before {
  content: "EVIDENCE";
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--ink-mute);
  font-size: 7px;
  letter-spacing: .2em;
}
.clue-visual .clue-icon { width: 72px; height: 72px; color: var(--ink); margin-top: 12px; }
.clue-visual .clue-num {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1;
  color: var(--red);
  border-top: 1px solid var(--line-soft);
  padding-top: 4px;
  min-width: 42px;
  text-align: center;
}
.clue-visual .clue-type { margin-top: 3px; font-size: 8px; color: var(--ink-mute); letter-spacing: .12em; }
.clue-content { min-width: 0; }
.clue-eyebrow { display: flex; align-items: center; gap: 6px; color: var(--red); font-size: 8px; letter-spacing: .15em; }
.clue-eyebrow span { padding: 1px 5px; border: 1px solid var(--red); background: rgba(139, 51, 43, .06); }
.clue-title { margin: 4px 0 3px; font-family: var(--font-serif); font-size: 29px; line-height: 1.2; letter-spacing: .05em; }
.clue-summary { margin: 0 0 9px; color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1.65; }
.clue-detail { margin: 0; color: var(--ink-soft); font-family: var(--font-serif); font-size: 13px; line-height: 1.95; }
.clue-note {
  margin-top: 11px;
  padding: 8px 10px;
  border-left: 2px solid var(--red);
  background: rgba(139, 51, 43, .055);
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 12px;
  line-height: 1.85;
}
.clue-note::before { content: "笔记 / "; color: var(--red); font-family: var(--font-ui); font-size: 8px; letter-spacing: .1em; }
.key-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border: 1px solid var(--green); color: var(--green); font-size: 8px; letter-spacing: .08em; }
.key-tag--red { border-color: var(--red); color: var(--red); }
.clue-added { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* 普通记录 */
.note-title { margin: 0 0 4px; font-family: var(--font-serif); font-size: 24px; }
.note-text { margin: 0; color: var(--ink-soft); font-family: var(--font-serif); font-size: 13px; line-height: 2; }
.note-mark { margin-top: 10px; color: var(--ink-mute); font-size: 9px; }

/* 案件报告 */
.report-modal { width: min(800px, 94vw); }
.report-top {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
}
.report-portrait { border: 1px solid var(--line); background: #c3bea6; filter: grayscale(1); }
.report-portrait canvas { width: 100%; }
.report-stamp {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border: 2px solid var(--red);
  color: var(--red);
  font-family: var(--font-serif);
  font-size: 17px;
  letter-spacing: .22em;
  transform: rotate(-3deg);
}
.report-name { display: flex; align-items: baseline; gap: 8px; margin: 0; font-family: var(--font-serif); font-size: 32px; line-height: 1.1; }
.report-name small { font-family: var(--font-ui); font-size: 8px; color: var(--ink-mute); letter-spacing: .16em; }
.report-role { margin: 3px 0 8px; color: var(--red); font-size: 10px; letter-spacing: .08em; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.report-field { display: grid; grid-template-columns: 66px 1fr; align-items: baseline; padding: 5px 0; border-bottom: 1px dotted var(--line-soft); font-size: 11px; }
.report-field dt { color: var(--ink-mute); }
.report-field dd { margin: 0; font-weight: 700; }
.report-field dd.is-red { color: var(--red); }
.report-section { margin-top: 13px; }
.report-section h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 5px; font-size: 10px; letter-spacing: .1em; color: var(--ink); }
.report-section h3::before { content: ""; width: 4px; height: 10px; background: var(--red); }
.report-section p { margin: 0; color: var(--ink-soft); font-family: var(--font-serif); font-size: 12px; line-height: 1.95; }
.report-timeline { display: grid; gap: 2px; }
.report-timeline div { display: grid; grid-template-columns: 44px 1fr; gap: 7px; padding: 3px 0; border-bottom: 1px dotted var(--line-soft); font-family: var(--font-serif); font-size: 10px; line-height: 1.7; }
.report-timeline time { color: var(--ink); font-family: var(--font-ui); font-size: 8px; letter-spacing: .04em; }
.report-timeline span { color: var(--ink-soft); }
.report-evidence { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.report-ev { border: 1px solid var(--line-soft); background: var(--paper-hi); padding: 5px; display: flex; align-items: center; gap: 5px; font-size: 8px; }
.report-ev .clue-icon { width: 22px; height: 22px; flex: 0 0 22px; }
.report-ev.is-unknown { opacity: .45; }
.report-note { margin-top: 12px; padding: 7px 9px; border: 1px solid var(--line-soft); background: rgba(235, 231, 213, .55); font-family: var(--font-serif); font-size: 10px; line-height: 1.8; color: var(--ink-soft); }

/* 调查记录 */
.log-modal { width: min(680px, 94vw); }
.log-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 6px; }
.log-head h2 { margin: 0; font-family: var(--font-serif); font-size: 24px; }
.log-head span { color: var(--red); font-size: 9px; letter-spacing: .12em; }
.log-list { display: flex; flex-direction: column; }
.log-item { display: grid; grid-template-columns: 62px 1fr; gap: 9px; padding: 7px 0; border-bottom: 1px dashed var(--line-soft); }
.log-item time { color: var(--red); font-size: 8px; letter-spacing: .06em; padding-top: 2px; }
.log-item p { margin: 0; color: var(--ink-soft); font-family: var(--font-serif); font-size: 11px; line-height: 1.8; }
.log-empty { padding: 30px 0; text-align: center; color: var(--ink-mute); font-family: var(--font-serif); font-size: 12px; }

/* 人物档案 */
.profile-modal { width: min(820px, 94vw); }
.profile-grid { display: grid; grid-template-columns: 224px 1fr; gap: 16px; align-items: start; }
.profile-left { min-width: 0; }
.profile-portrait {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: var(--paper-hi);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .16);
  overflow: hidden;
}
.profile-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 70%, rgba(22, 22, 17, .2));
  pointer-events: none;
}
.profile-talent {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 2;
  padding: 2px 7px;
  border: 1px solid var(--red);
  background: rgba(234, 229, 211, .86);
  color: var(--red);
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: .12em;
}
.profile-fields { margin-top: 7px; display: grid; gap: 3px; }
.profile-fields div { display: grid; grid-template-columns: 48px 1fr; gap: 5px; font-size: 9px; }
.profile-fields span { color: var(--ink-mute); }
.profile-fields b { font-weight: 700; }
.profile-quote { margin-top: 8px; padding: 5px 7px; border-left: 2px solid var(--line-soft); color: var(--ink-soft); font-family: var(--font-serif); font-size: 10px; line-height: 1.7; }
.profile-right { min-width: 0; }
.profile-name { display: flex; align-items: baseline; gap: 8px; margin: 0; font-family: var(--font-serif); font-size: 30px; line-height: 1.1; }
.profile-name small { font-family: var(--font-ui); font-size: 8px; letter-spacing: .16em; color: var(--ink-mute); }
.profile-meta { margin: 2px 0 8px; color: var(--red); font-size: 9px; letter-spacing: .08em; }
.profile-relation { margin: 0 0 6px; color: var(--ink-soft); font-family: var(--font-serif); font-size: 12px; line-height: 1.85; }
.profile-dossier { margin: 0 0 8px; padding: 6px 8px; border-left: 2px solid var(--line-soft); background: rgba(43, 40, 31, .045); color: var(--ink-soft); font-family: var(--font-serif); font-size: 10px; line-height: 1.8; }
.profile-alibi { display: grid; grid-template-columns: 66px 1fr; gap: 6px; padding: 7px; border: 1px solid var(--line-soft); background: rgba(235, 231, 213, .48); font-family: var(--font-serif); font-size: 11px; line-height: 1.75; }
.profile-alibi b { font-family: var(--font-ui); font-size: 8px; color: var(--ink-mute); letter-spacing: .08em; }
.testimony-head { display: flex; align-items: center; gap: 7px; margin: 12px 0 5px; padding-bottom: 3px; border-bottom: 1px solid var(--line); font-size: 9px; letter-spacing: .1em; }
.testimony-head span { color: var(--red); font-size: 8px; }
.statement {
  position: relative;
  margin-bottom: 6px;
  padding: 8px 9px;
  border: 1px solid var(--line-soft);
  background: var(--paper-hi);
}
.statement::before {
  content: "“";
  position: absolute;
  left: 2px;
  top: -2px;
  color: rgba(139, 51, 43, .2);
  font-family: var(--font-serif);
  font-size: 30px;
}
.statement p { position: relative; margin: 0 0 6px; padding-left: 8px; color: var(--ink); font-family: var(--font-serif); font-size: 13px; line-height: 1.85; }
.statement.is-broken { border-color: #a0947b; background: rgba(211, 208, 191, .55); }
.statement.is-broken p { color: var(--ink-mute); text-decoration: line-through; text-decoration-color: rgba(139, 51, 43, .5); }
.statement.is-current { border-color: var(--red); box-shadow: 2px 2px 0 rgba(139, 51, 43, .13); }
.statement-actions { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.statement-actions small { color: var(--ink-mute); font-size: 8px; }
.statement-actions .btn { min-height: 22px; font-size: 9px; }
.contradiction {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 5px;
  border: 1px solid var(--red);
  color: var(--red);
  font-size: 7px;
  letter-spacing: .1em;
}
.profile-tip { margin-top: 7px; color: var(--ink-mute); font-size: 8px; line-height: 1.7; }
.witness-box { margin-top: 10px; padding: 9px; border: 1px solid var(--green); background: rgba(86, 97, 73, .08); }
.witness-box h4 { margin: 0 0 4px; font-size: 9px; color: var(--green); letter-spacing: .1em; }
.witness-box p { margin: 0 0 7px; font-family: var(--font-serif); font-size: 11px; line-height: 1.8; }
.witness-box.is-recorded { border-color: var(--line-soft); background: rgba(235, 231, 213, .4); }
.witness-box.is-recorded h4 { color: var(--ink-mute); }

/* 证据选择 */
.picker-modal { width: min(720px, 94vw); }
.picker-intro { margin: 0 0 8px; padding: 7px 9px; border-left: 2px solid var(--red); background: rgba(139, 51, 43, .05); color: var(--ink-soft); font-family: var(--font-serif); font-size: 11px; line-height: 1.7; }
.evidence-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.evidence-choice {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--line-soft);
  background: var(--paper-hi);
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}
.evidence-choice:hover { border-color: var(--red); background: #f0ebd5; }
.evidence-choice .clue-icon { width: 30px; height: 30px; flex: 0 0 30px; }
.evidence-choice b { display: block; font-size: 10px; }
.evidence-choice small { display: block; color: var(--ink-mute); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evidence-choice.is-empty { opacity: .4; cursor: not-allowed; }

/* 名册总览 / 证据簿 */
.roster-modal { width: min(880px, 95vw); }
.roster-modal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.roster-modal-card { display: flex; gap: 8px; padding: 7px; border: 1px solid var(--line-soft); background: var(--paper-hi); text-align: left; cursor: pointer; color: var(--ink); }
.roster-modal-card:hover { border-color: var(--red); background: #efe9d4; }
.roster-modal-card .roster-avatar { width: 54px; height: 66px; flex: 0 0 54px; }
.roster-modal-card h3 { margin: 0; font-family: var(--font-serif); font-size: 15px; line-height: 1.2; }
.roster-modal-card p { margin: 1px 0; font-size: 8px; color: var(--ink-mute); }
.roster-modal-card small { font-size: 7px; color: var(--green); }
.evidence-tabs { display: flex; gap: 4px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.evidence-tab { border: 1px solid var(--line-soft); border-bottom: 0; background: var(--paper-mid); padding: 3px 9px; font-size: 9px; cursor: pointer; }
.evidence-tab.is-active { background: var(--paper-hi); color: var(--red); font-weight: 700; }
.evidence-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.evidence-slot {
  position: relative;
  min-height: 96px;
  padding: 5px;
  border: 1px solid var(--line-soft);
  background: var(--paper-hi);
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  overflow: hidden;
}
.evidence-slot:hover { border-color: var(--red); }
.evidence-slot .clue-icon { width: 30px; height: 30px; margin-bottom: 3px; }
.evidence-slot b { display: block; font-size: 9px; line-height: 1.3; }
.evidence-slot small { display: block; color: var(--ink-mute); font-size: 7px; margin-top: 2px; }
.evidence-slot .slot-no { position: absolute; right: 4px; top: 2px; color: var(--red); font-size: 8px; }
.evidence-slot.is-unknown { background: repeating-linear-gradient(45deg, #cbc6ab 0 3px, #d5d0b5 3px 6px); color: var(--ink-mute); cursor: default; }
.evidence-slot.is-unknown .clue-icon { opacity: .2; }
.evidence-slot.is-optional .slot-no { color: var(--blue); }
.evidence-progress { display: flex; gap: 12px; color: var(--ink-mute); font-size: 8px; margin-bottom: 7px; }
.evidence-progress b { color: var(--red); }

/* 菜单 / 设置 */
.menu-modal { width: min(460px, 92vw); }
.menu-list { display: grid; gap: 6px; }
.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--line-soft);
  background: var(--paper-hi);
  text-align: left;
  cursor: pointer;
  font-size: 11px;
}
.menu-item:hover { border-color: var(--red); background: #efe9d4; }
.menu-item small { display: block; font-size: 8px; color: var(--ink-mute); }
.menu-item .menu-arrow { color: var(--red); font-size: 13px; }
.menu-note { margin-top: 10px; color: var(--ink-mute); font-size: 8px; line-height: 1.8; }
.config-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dotted var(--line-soft); }
.config-row label { font-size: 10px; }
.config-row small { display: block; color: var(--ink-mute); font-size: 8px; }
.switch {
  position: relative;
  width: 42px;
  height: 19px;
  border: 1px solid var(--line);
  background: var(--paper-lo);
  cursor: pointer;
  flex: 0 0 42px;
}
.switch::before { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; background: var(--ink); transition: left .14s steps(3); }
.switch.is-on { background: var(--green); }
.switch.is-on::before { left: 25px; background: var(--paper-hi); }
.speed-group { display: flex; gap: 3px; }
.speed-btn { border: 1px solid var(--line-soft); background: var(--paper-hi); padding: 2px 6px; font-size: 8px; cursor: pointer; }
.speed-btn.is-on { color: var(--paper-hi); background: var(--ink); }
.help-modal { width: min(700px, 94vw); }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.help-box { padding: 8px; border: 1px solid var(--line-soft); background: var(--paper-hi); }
.help-box h4 { margin: 0 0 4px; color: var(--red); font-size: 9px; letter-spacing: .1em; }
.help-box p { margin: 0; color: var(--ink-soft); font-family: var(--font-serif); font-size: 10px; line-height: 1.8; }
.key-row { display: flex; align-items: center; gap: 7px; margin-top: 5px; font-size: 8px; color: var(--ink-soft); }
kbd { display: inline-block; min-width: 16px; padding: 1px 4px; border: 1px solid var(--line-soft); border-bottom-width: 2px; background: var(--paper); font-family: var(--font-ui); font-size: 8px; text-align: center; }

/* 教学 */
.tutorial-modal { width: min(620px, 94vw); }
.tutorial-lead { margin: 0 0 11px; color: var(--ink-soft); font-family: var(--font-serif); font-size: 14px; line-height: 1.9; }
.tutorial-steps { display: grid; gap: 6px; }
.tutorial-step { display: grid; grid-template-columns: 28px 1fr; gap: 9px; align-items: start; padding: 8px; border: 1px solid var(--line-soft); background: var(--paper-hi); }
.tutorial-step .step-no { width: 24px; height: 24px; border: 1px solid var(--line); background: var(--ink); color: var(--paper-hi); display: flex; align-items: center; justify-content: center; font-family: var(--font-serif); font-size: 13px; }
.tutorial-step h4 { margin: 0; font-size: 12px; }
.tutorial-step p { margin: 2px 0 0; color: var(--ink-mute); font-size: 10.5px; line-height: 1.7; }
.tutorial-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.tutorial-foot small { color: var(--ink-mute); font-size: 8px; }

/* 场景弹窗 */
.scene-modal { width: min(900px, 95vw); max-height: 92vh; }
.scene-modal .modal-body { padding: 0; overflow: auto; }
.scene-art-wrap { position: relative; aspect-ratio: 16 / 9; min-height: 210px; background: #0f100d; overflow: hidden; border-bottom: 1px solid var(--line); }
.scene-art-wrap .scene-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-art-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(10, 10, 8, .45), transparent 30%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .08) 0 1px, transparent 1px 3px);
}
.scene-hotspots { position: absolute; inset: 0; z-index: 3; }
.spot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border: 2px solid #eee7cf;
  background: rgba(139, 51, 43, .9);
  box-shadow: 0 0 0 1px #261615, 2px 2px 0 rgba(0, 0, 0, .55);
  color: #f2e8ce;
  font-size: 11px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  animation: spot-pulse 1.8s steps(2) infinite;
}
.spot::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(242, 232, 206, .45);
}
.spot::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: 132%;
  transform: translateX(-50%);
  min-width: max-content;
  max-width: 180px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  background: var(--paper-hi);
  color: var(--ink);
  font-size: 9px;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity .12s;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .35);
  z-index: 5;
}
.spot:hover::after, .spot:focus-visible::after { opacity: 1; visibility: visible; }
.spot:hover, .spot:focus-visible { background: var(--red-bright); }
.spot.is-found { background: rgba(67, 82, 59, .92); animation: none; }
.spot.is-found::before { border-color: rgba(230, 226, 208, .25); }
.spot.is-optional { background: rgba(79, 81, 65, .92); }
.spot.is-optional.is-found { background: rgba(69, 75, 62, .82); }
.spot .spot-mark { pointer-events: none; }
@keyframes spot-pulse { 50% { box-shadow: 0 0 0 1px #261615, 0 0 0 5px rgba(139, 51, 43, .18), 2px 2px 0 rgba(0, 0, 0, .55); } }
.scene-meta { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 9px 12px; background: var(--paper); border-bottom: 1px solid var(--line-soft); }
.scene-meta h2 { margin: 0; font-family: var(--font-serif); font-size: 26px; line-height: 1.1; }
.scene-meta h2 small { margin-left: 7px; font-family: var(--font-ui); font-size: 9px; color: var(--ink-mute); letter-spacing: .1em; }
.scene-meta p { margin: 4px 0 0; color: var(--ink-soft); font-family: var(--font-serif); font-size: 12px; line-height: 1.75; }
.scene-meta-right { text-align: right; }
.scene-progress { color: var(--ink-mute); font-size: 8px; }
.scene-progress b { color: var(--red); font-size: 12px; }
.scene-legend { margin-top: 4px; display: flex; justify-content: flex-end; gap: 7px; font-size: 7px; color: var(--ink-mute); }
.scene-legend span { display: flex; align-items: center; gap: 3px; }
.scene-legend i { width: 5px; height: 5px; background: var(--red); }
.scene-legend i.done { background: var(--green); }
.scene-legend i.extra { background: #5c614f; }
.scene-nav { display: flex; align-items: center; gap: 6px; padding: 7px 10px; background: var(--paper-mid); }
.scene-nav .scene-nav-title { font-size: 8px; color: var(--ink-mute); letter-spacing: .06em; margin-right: auto; }
.scene-nav .btn { min-height: 24px; font-size: 9px; }
.scene-complete {
  margin: 0;
  padding: 6px 12px;
  border-top: 1px solid var(--line-soft);
  background: rgba(86, 97, 73, .12);
  color: var(--green);
  font-size: 9px;
  letter-spacing: .08em;
  display: none;
}
.scene-complete.is-show { display: block; }

/* =========================================================
   推理裁定
   ========================================================= */
.trial-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  color: var(--white);
  background: #0c0c0a;
}
.trial-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 48%, rgba(121, 38, 30, .20), transparent 30%),
    radial-gradient(circle at 28% 80%, rgba(75, 68, 51, .18), transparent 38%),
    #0c0c0a;
}
.trial-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(218, 209, 186, .035) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(125deg, transparent 0 39px, rgba(177, 72, 57, .055) 40px 41px, transparent 42px 80px);
}
.trial-bg::after {
  content: "裁";
  position: absolute;
  right: 4vw;
  top: 47%;
  transform: translateY(-50%);
  font-family: var(--font-serif);
  font-size: min(50vw, 560px);
  line-height: .8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(190, 80, 62, .11);
  opacity: .8;
}
.trial-top {
  position: relative;
  z-index: 2;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 clamp(14px, 4vw, 46px);
  border-bottom: 1px solid #3d241f;
  background: rgba(9, 9, 7, .7);
  font-size: 9px;
  letter-spacing: .18em;
  color: #8f8975;
}
.trial-top .trial-title { color: #d1c7ad; }
.trial-top .trial-title b { color: var(--red-bright); font-weight: 400; }
.trial-top-center { margin: 0 auto; color: #6e6959; }
.trial-top .trial-abort { border: 1px solid #3f3a2d; background: transparent; color: #9a927c; font-size: 8px; padding: 2px 8px; cursor: pointer; letter-spacing: .12em; }
.trial-top .trial-abort:hover { color: var(--white); border-color: #756b56; }
.trial-layout {
  position: relative;
  z-index: 2;
  width: min(1280px, 100%);
  height: calc(100% - 38px);
  margin: 0 auto;
  padding: clamp(20px, 4vh, 46px) clamp(16px, 5vw, 70px);
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 54px);
  align-items: center;
}
.trial-side {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding-right: 22px;
  border-right: 1px solid rgba(150, 74, 59, .28);
}
.trial-case-no { font-family: var(--font-serif); font-size: 78px; line-height: .8; color: transparent; -webkit-text-stroke: 1px rgba(194, 96, 77, .45); }
.trial-case-label { margin-top: -3px; color: var(--red-bright); font-size: 9px; letter-spacing: .22em; }
.trial-case-name { margin-top: 2px; color: #d7ceb5; font-family: var(--font-serif); font-size: 17px; letter-spacing: .08em; }
.trial-side-section h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; color: #8f8773; font-size: 8px; letter-spacing: .18em; font-weight: 400; }
.trial-side-section h3::after { content: ""; flex: 1; height: 1px; background: #3a3328; }
.trial-deductions { display: grid; gap: 4px; }
.trial-deduction { display: flex; align-items: center; gap: 6px; color: #5f5a4c; font-size: 9px; letter-spacing: .04em; }
.trial-deduction .ded-mark { width: 8px; height: 8px; border: 1px solid #4d4739; display: flex; align-items: center; justify-content: center; font-size: 7px; line-height: 1; }
.trial-deduction.is-done { color: #d3c9ae; }
.trial-deduction.is-done .ded-mark { border-color: #7e8c65; background: #3b4632; color: #d8e2c4; }
.trial-hearts { display: flex; gap: 5px; margin-top: 2px; }
.heart { width: 12px; height: 12px; background: var(--red-bright); clip-path: polygon(50% 100%, 0 36%, 0 12%, 22% 0, 50% 20%, 78% 0, 100% 12%, 100% 36%); }
.heart.is-lost { background: #3d372d; }
.trial-heart-label { margin-top: 6px; color: #615b4c; font-size: 7px; letter-spacing: .1em; }
.trial-main { min-width: 0; max-width: 880px; }
.trial-progress { display: flex; align-items: center; gap: 10px; color: #817b68; font-size: 8px; letter-spacing: .14em; }
.trial-progress b { color: var(--red-bright); font-weight: 400; }
.trial-progress .trial-bar { flex: 1; height: 3px; background: #2b281f; position: relative; }
.trial-progress .trial-bar::before { content: ""; position: absolute; inset: 0; width: var(--trial-progress, 0%); background: linear-gradient(90deg, var(--red-dark), var(--red-bright)); transition: width .3s steps(6); }
.trial-kicker { margin-top: clamp(12px, 3vh, 28px); color: #8d8470; font-size: 9px; letter-spacing: .2em; }
.trial-kicker span { display: inline-block; padding: 2px 7px; border: 1px solid #6e4036; color: #d6b09e; margin-right: 7px; letter-spacing: .12em; }
.trial-question {
  margin: 8px 0 4px;
  font-family: var(--font-serif);
  font-size: clamp(23px, 3.2vw, 36px);
  line-height: 1.42;
  letter-spacing: .04em;
  color: #eee6cf;
  text-shadow: 2px 2px 0 #000, 0 0 22px rgba(203, 126, 93, .07);
}
.trial-sub { margin: 0; color: #817a66; font-family: var(--font-serif); font-size: 12px; letter-spacing: .04em; }
.trial-options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: clamp(16px, 3vh, 28px); }
.trial-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 8px 11px;
  border: 1px solid #484335;
  background: rgba(29, 28, 22, .82);
  text-align: left;
  color: #d8d0b8;
  cursor: pointer;
  transition: border-color .14s, background .14s, transform .14s;
}
.trial-option:hover { border-color: #9d4a3c; background: rgba(53, 37, 31, .88); transform: translateX(2px); }
.trial-option .option-no {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border: 1px solid #6b6250;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a69b82;
  font-family: var(--font-serif);
  font-size: 12px;
}
.trial-option .option-copy { min-width: 0; }
.trial-option .option-copy b { display: block; font-family: var(--font-serif); font-size: 14px; font-weight: 400; line-height: 1.4; }
.trial-option .option-copy small { display: block; margin-top: 1px; color: #756f5e; font-size: 8px; letter-spacing: .06em; }
.trial-option.is-correct { border-color: #8a9b6b; background: rgba(48, 58, 39, .75); }
.trial-option.is-correct .option-no { border-color: #8a9b6b; color: #d5dfc2; background: #3c4932; }
.trial-option.is-wrong { border-color: #a54337; background: rgba(63, 27, 22, .8); animation: option-shake .3s steps(3); }
@keyframes option-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.trial-option[disabled] { cursor: default; }
.trial-options.is-culprits { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.trial-options.is-culprits-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.trial-option.is-culprit { flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 7px 5px; min-height: 124px; }
.trial-option.is-culprit .culprit-portrait { width: 58px; height: 58px; border: 1px solid #655d49; background: #c8c4ad; overflow: hidden; filter: grayscale(.25) contrast(1.08); }
.trial-option.is-culprit:hover .culprit-portrait { border-color: var(--red-bright); }
.trial-option.is-culprit .option-copy b { font-size: 13px; }
.trial-option.is-culprit .option-copy small { font-size: 7px; }
.trial-option.is-culprit .option-no { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; font-size: 9px; }
.trial-feedback {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--red-bright);
  background: rgba(37, 23, 18, .78);
}
.trial-feedback.is-show { display: block; animation: feedback-in .2s steps(3); }
@keyframes feedback-in { from { opacity: 0; transform: translateY(4px); } }
.trial-feedback h4 { margin: 0 0 3px; color: #e6d7bc; font-size: 12px; letter-spacing: .1em; }
.trial-feedback h4 span { color: var(--red-bright); margin-right: 6px; }
.trial-feedback p { margin: 0; color: #b8af97; font-family: var(--font-serif); font-size: 11px; line-height: 1.8; }
.trial-feedback .feedback-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.trial-feedback .btn { min-height: 26px; font-size: 9px; color: var(--ink); background: var(--paper-hi); }
.trial-feedback .feedback-hint { color: #8f806d; font-size: 8px; }
.trial-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 5, .9);
  backdrop-filter: blur(4px);
}
.trial-overlay[hidden] { display: none; }
.trial-overlay-card {
  width: min(520px, 90vw);
  padding: 24px;
  border: 1px solid #5a3b31;
  background: #12110e;
  text-align: center;
  box-shadow: 0 0 0 6px rgba(139, 51, 43, .12);
}
.trial-overlay-card .over-code { color: var(--red-bright); font-size: 9px; letter-spacing: .3em; }
.trial-overlay-card h2 { margin: 8px 0; font-family: var(--font-serif); font-size: 30px; color: #e4d7bf; }
.trial-overlay-card p { margin: 0 0 14px; color: #968d78; font-family: var(--font-serif); font-size: 12px; line-height: 1.8; }
.trial-overlay-card .btn { margin: 3px; }
.trial-flash {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  background: #d8cbaa;
  opacity: 0;
}
.trial-flash.is-active { animation: flash .35s steps(3) both; }
@keyframes flash { 0% { opacity: .85; } 100% { opacity: 0; } }
.judgment-stamp {
  position: fixed;
  z-index: 90;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%) rotate(-9deg) scale(1.4);
  padding: 10px 28px;
  border: 5px double var(--red-bright);
  color: var(--red-bright);
  font-family: var(--font-serif);
  font-size: clamp(48px, 10vw, 110px);
  font-weight: 900;
  letter-spacing: .18em;
  opacity: 0;
  pointer-events: none;
  text-shadow: 4px 4px 0 rgba(0, 0, 0, .4);
}
.judgment-stamp.is-active { animation: stamp-in .7s cubic-bezier(.2, .9, .2, 1) both; }
@keyframes stamp-in {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-9deg) scale(1.8); }
  18% { opacity: 1; transform: translate(-50%, -50%) rotate(-9deg) scale(.96); }
  28% { transform: translate(-50%, -50%) rotate(-9deg) scale(1.02); }
  72% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(-9deg) scale(1); }
}

/* =========================================================
   结案
   ========================================================= */
.ending-screen {
  position: fixed;
  inset: 0;
  z-index: 70;
  overflow: auto;
  color: var(--white);
  background: #0b0d0b;
}
.ending-bg { position: fixed; inset: 0; }
.ending-bg .scene-svg { width: 100%; height: 100%; filter: saturate(.65) brightness(.58); }
.ending-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 8, 7, .82), rgba(7, 8, 6, .35) 38%, rgba(7, 8, 6, .92)),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .1) 0 1px, transparent 1px 3px);
}
.ending-card {
  position: relative;
  z-index: 2;
  width: min(860px, calc(100vw - 40px));
  margin: 0 auto;
  padding: clamp(58px, 10vh, 110px) 0 60px;
}
.ending-kicker { display: flex; align-items: center; gap: 10px; color: #b5ad96; font-size: 9px; letter-spacing: .26em; }
.ending-kicker::before { content: ""; width: 30px; height: 1px; background: var(--red-bright); }
.ending-kicker b { color: var(--red-bright); font-weight: 400; }
.ending-title { margin: 12px 0 0; font-family: var(--font-serif); font-size: clamp(42px, 7vw, 78px); line-height: 1.05; letter-spacing: .06em; text-shadow: 4px 4px 0 rgba(0, 0, 0, .45); }
.ending-title span { color: #d3b274; }
.ending-sub { margin: 8px 0 0; color: #9f9783; font-family: var(--font-serif); font-size: 13px; letter-spacing: .08em; }
.ending-rule { height: 1px; margin: 26px 0; background: linear-gradient(90deg, rgba(196, 187, 163, .5), rgba(196, 187, 163, .06)); }
.ending-content { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start; }
.rank-box {
  position: relative;
  padding: 13px;
  border: 1px solid rgba(207, 196, 169, .36);
  background: rgba(12, 13, 10, .52);
  text-align: center;
}
.rank-box::before { content: "DETECTIVE RANK"; display: block; color: #8d8671; font-size: 7px; letter-spacing: .22em; }
.rank-letter { font-family: var(--font-serif); font-size: 110px; line-height: 1; color: #d7c8a8; text-shadow: 3px 3px 0 rgba(0, 0, 0, .55); }
.rank-letter.rank-s { color: #d7b66e; }
.rank-grade { color: var(--red-bright); font-size: 9px; letter-spacing: .18em; }
.rank-note { margin-top: 6px; color: #7f7968; font-size: 7px; line-height: 1.7; }
.ending-stats { display: grid; gap: 6px; }
.ending-stat { display: grid; grid-template-columns: 110px 1fr; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px dashed rgba(196, 187, 163, .18); }
.ending-stat span { color: #817b69; font-size: 8px; letter-spacing: .1em; }
.ending-stat b { color: #d7cfb9; font-family: var(--font-serif); font-size: 14px; font-weight: 400; }
.ending-quote { margin-top: 18px; padding: 14px 16px; border-left: 2px solid var(--red); background: rgba(13, 14, 11, .45); color: #b9b19b; font-family: var(--font-serif); font-size: 12px; line-height: 2; }
.ending-quote b { color: #ded4bc; font-weight: 400; }
.ending-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.ending-actions .btn { min-height: 36px; padding: 6px 14px; font-size: 10px; color: var(--ink); }
.ending-actions .btn--red { color: var(--paper-hi); background: var(--ink); border-color: rgba(226, 219, 198, .62); }
.ending-actions .btn--ghost { color: #e2dbc6; border-color: rgba(206, 197, 173, .45); }
.ending-actions .btn--ghost:hover { color: var(--ink); background: var(--paper-hi); }
.ending-foot { display: flex; justify-content: space-between; gap: 20px; margin-top: 38px; padding-top: 12px; border-top: 1px solid rgba(196, 187, 163, .16); color: #6b6758; font-size: 7px; letter-spacing: .16em; }

/* 归档 */
.archive-modal { width: min(820px, 95vw); }
.archive-hero { padding: 12px; border: 1px solid var(--line); background: var(--ink); color: var(--paper-hi); margin-bottom: 12px; }
.archive-hero span { color: var(--red-bright); font-size: 8px; letter-spacing: .2em; }
.archive-hero h2 { margin: 3px 0; font-family: var(--font-serif); font-size: 28px; }
.archive-hero p { margin: 0; color: #b9b29b; font-family: var(--font-serif); font-size: 11px; line-height: 1.8; }
.archive-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.archive-box { padding: 9px; border: 1px solid var(--line-soft); background: var(--paper-hi); }
.archive-box h3 { margin: 0 0 5px; font-size: 9px; letter-spacing: .1em; color: var(--red); }
.archive-box p { margin: 0; color: var(--ink-soft); font-family: var(--font-serif); font-size: 10px; line-height: 1.9; }
.archive-chain { display: grid; gap: 4px; margin-top: 10px; }
.archive-chain div { display: grid; grid-template-columns: 20px 1fr; gap: 6px; padding: 4px 0; border-bottom: 1px dotted var(--line-soft); font-family: var(--font-serif); font-size: 10px; line-height: 1.7; }
.archive-chain span { color: var(--red); font-family: var(--font-ui); font-size: 8px; }

/* 提示 / 确认 */
.confirm-modal { width: min(440px, 92vw); }
.confirm-text { margin: 0; color: var(--ink-soft); font-family: var(--font-serif); font-size: 13px; line-height: 1.9; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 14px; }

/* Toast */
.toast-stack {
  position: fixed;
  z-index: 450;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  width: min(520px, calc(100vw - 24px));
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--paper-hi);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .4);
  color: var(--ink);
  font-size: 10px;
  letter-spacing: .02em;
  animation: toast-in .24s steps(4), toast-out .3s steps(4) 2.5s both;
}
.toast .toast-mark { width: 7px; height: 7px; background: var(--red); flex: 0 0 7px; }
.toast.is-green .toast-mark { background: var(--green); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-4px); } }

/* 转场 */
.transition {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #0b0c09;
  color: var(--white);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .35s;
}
.transition.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.transition .trans-case { color: var(--red-bright); font-size: 9px; letter-spacing: .35em; }
.transition .trans-title { font-family: var(--font-serif); font-size: clamp(34px, 6vw, 64px); letter-spacing: .1em; text-align: center; }
.transition .trans-line { width: 46px; height: 1px; background: #7f7865; }
.transition .trans-sub { color: #8e8875; font-size: 9px; letter-spacing: .2em; }

/* 降低动态 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1280px) {
  .workspace { grid-template-columns: 238px minmax(360px, 1fr) 262px 54px; }
  .roster-card { height: 69px; }
  .roster-avatar { width: 42px; height: 52px; flex-basis: 42px; }
  .case-portrait { width: 62px; height: 62px; flex-basis: 62px; }
  .case-person h2 { font-size: 21px; }
}

@media (max-width: 1080px) {
  .workspace { grid-template-columns: 218px minmax(340px, 1fr) 238px 52px; gap: 6px; padding: 7px; }
  .dock-btn { width: 52px; min-height: 54px; }
  .roster-grid { grid-template-columns: 1fr; }
  .roster-card { height: 60px; }
  .roster-avatar { width: 38px; height: 46px; flex-basis: 38px; }
  .case-mini b { font-size: 8px; }
}

@media (max-width: 900px) {
  body { overflow: hidden; }
  .title-main { width: calc(100vw - 52px); left: 26px; top: 48%; }
  .title-side { right: 20px; opacity: .55; }
  .title-number { font-size: 180px; opacity: .55; }
  .title-logo { font-size: clamp(48px, 10vw, 76px); }
  .title-bottom { left: 26px; right: 26px; }

  .workspace {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 7px 7px 94px;
    gap: 7px;
  }
  .center-stack { flex: 0 0 auto; gap: 7px; }
  .notes-panel { display: flex; flex: 0 0 auto; min-height: 174px; }
  .notes-body { overflow: visible; }
  .case-panel { flex: 0 0 auto; max-height: 238px; }
  .case-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .case-head { grid-column: 1 / -1; }
  .case-minirow { grid-column: 1 / -1; }
  .case-quote { display: none; }
  .case-open { margin-top: 4px; }
  .map-panel { flex: 0 0 auto; height: auto; min-height: 0; width: 100%; }
  .map-wrap { flex: 0 0 auto; aspect-ratio: 640 / 330; }
  .roster-panel { display: none; }
  .dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 26px;
    z-index: 45;
    width: 100%;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 5px 7px;
    background: rgba(24, 24, 18, .96);
    border-top: 1px solid #080906;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, .35);
    align-self: auto;
  }
  .dock-btn { width: 58px; min-height: 54px; flex: 0 1 58px; }
  .statusbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; }
  .statusbar .status-clock { display: none; }
  .desktop-screen { padding-bottom: 0; }
  .sysbar { position: sticky; top: 0; z-index: 44; }

  .modal-layer { padding: 8px; }
  .modal-window { max-height: 94vh; }
  .story-stage { width: calc(100vw - 24px); bottom: 26px; grid-template-columns: minmax(100px, 160px) minmax(0, 1fr); gap: 10px; }
  .story-screen.is-narration .story-stage { width: calc(100vw - 24px); }
  .story-dialogue { min-height: 160px; padding: 19px 16px 26px; }
  .story-text { font-size: 14px; }
  .story-speaker { font-size: 12px; left: 12px; }
  .story-tag { left: 18px; top: 58px; }
  .trial-layout { grid-template-columns: 1fr; padding: 16px 18px 22px; gap: 10px; overflow-y: auto; align-items: start; align-content: start; }
  .trial-side { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; padding: 0 0 10px; border-right: 0; border-bottom: 1px solid rgba(150, 74, 59, .24); align-self: auto; }
  .trial-case-no { font-size: 42px; }
  .trial-case-label, .trial-case-name { display: none; }
  .trial-side-section { display: none; }
  .trial-hearts-wrap { align-self: center; justify-self: end; }
  .trial-main { max-width: none; }
  .trial-options.is-culprits { grid-template-columns: repeat(3, 1fr); }
  .trial-options.is-culprits-4 { grid-template-columns: repeat(2, 1fr); }
  .trial-question { font-size: clamp(21px, 4.5vw, 30px); }
  .trial-top { height: 34px; }
  .trial-layout { height: calc(100% - 34px); }
  .ending-content { grid-template-columns: 150px 1fr; gap: 18px; }
  .rank-letter { font-size: 82px; }
}

@media (max-width: 640px) {
  .title-top { height: 38px; padding: 0 14px; font-size: 8px; gap: 8px; }
  .title-brand small, .title-top-center { display: none; }
  .title-top-actions { margin-left: auto; gap: 6px; }
  #btnFullscreen { display: none; }
  .title-main { left: 18px; width: calc(100vw - 36px); top: 48%; }
  .title-kicker { margin-bottom: 12px; font-size: 8px; }
  .title-logo { font-size: clamp(41px, 13vw, 58px); text-shadow: 3px 3px 0 rgba(0, 0, 0, .7); }
  .title-en { font-size: 8px; letter-spacing: .26em; margin-top: 12px; }
  .title-lead { font-size: 12px; line-height: 1.9; margin-top: 16px; max-width: 330px; }
  .title-meta-row { margin-top: 14px; gap: 4px; }
  .title-meta-row span { font-size: 7px; }
  .title-actions { margin-top: 20px; gap: 6px; }
  .title-actions .btn { min-height: 40px; min-width: 0; flex: 1 1 120px; padding: 4px 8px; font-size: 11px; }
  .title-note { margin-top: 16px; font-size: 7px; }
  .title-side, .title-number { display: none; }
  .title-bottom { left: 18px; right: 18px; bottom: 12px; font-size: 6px; }
  .title-bottom span:nth-child(2) { display: none; }

  .story-top { padding: 0 12px; height: 36px; font-size: 7px; }
  .story-top-center { display: none; }
  .story-controls { gap: 7px; margin-left: auto; }
  .story-tag { top: 48px; left: 12px; font-size: 8px; }
  .story-stage { display: block; width: calc(100vw - 20px); bottom: 12px; }
  .story-dialogue { min-height: 148px; padding: 18px 12px 22px; }
  .story-speaker { top: -13px; padding: 2px 8px; font-size: 11px; gap: 4px; }
  .story-speaker small { font-size: 6px; }
  .story-text { font-size: 12.5px; line-height: 1.95; min-height: 3.4em; }
  .story-hint { display: none; }
  .story-portrait {
    position: absolute;
    left: 0;
    bottom: calc(100% + 4px);
    width: clamp(150px, 48vw, 186px);
    height: clamp(150px, 48vw, 186px);
    margin: 0;
  }
  .story-art .scene-svg { filter: brightness(.78) contrast(1.04) saturate(.8); }
  .story-art::after {
    background:
      linear-gradient(0deg, rgba(5, 6, 5, .97) 0%, rgba(5, 6, 5, .62) 40%, rgba(5, 6, 5, .25) 100%),
      linear-gradient(90deg, rgba(5, 6, 5, .28), transparent 70%);
  }
  .story-screen.is-reveal .story-art::after {
    background:
      linear-gradient(0deg, rgba(10, 5, 4, .99) 0%, rgba(13, 7, 6, .76) 40%, rgba(11, 6, 5, .44) 100%),
      linear-gradient(90deg, rgba(20, 8, 6, .5), transparent 70%);
  }

  .sysbar { height: 25px; flex-basis: 25px; padding: 0 6px; font-size: 7px; }
  .sys-brand .sys-jp, .sys-time { display: none; }
  .sys-save { margin-right: 4px; font-size: 6px; }
  .sys-btn { padding: 2px 4px; font-size: 7px; }
  .workspace { padding: 5px 5px 90px; gap: 5px; }
  .case-panel { max-height: 196px; }
  .case-body { display: block; }
  .case-head { padding-bottom: 4px; }
  .case-portrait { width: 52px; height: 52px; flex-basis: 52px; }
  .case-person h2 { font-size: 18px; }
  .case-minirow { margin-top: 4px; }
  .case-fields { display: none; }
  .case-progress { margin-top: 5px; }
  .objectives { display: none; }
  .case-open { display: none; }
  .case-panel { max-height: 178px; }
  .map-panel { height: auto; min-height: 0; }
  .map-wrap { aspect-ratio: 640 / 330; }
  .map-toolbar { font-size: 7px; }
  .map-wrap { padding: 2px; }
  .map-wrap::before { inset: 2px; }
  .map-footer { font-size: 7px; }
  .map-footer .map-legend { display: none; }
  .dock-btn { width: 48px; min-height: 48px; flex-basis: 48px; }
  .dock-btn span { font-size: 7px; }
  .dock-icon-svg { width: 21px; height: 21px; }
  .statusbar { height: 24px; font-size: 7px; padding: 0 7px; }
  .statusbar .status-hint { font-size: 7px; }

  .modal-layer { padding: 0; align-items: flex-start; }
  .modal-window { width: 100vw; max-width: none; height: auto; max-height: 100dvh; border-left: 0; border-right: 0; border-top: 0; box-shadow: none; }
  .modal-head { height: 29px; flex-basis: 29px; }
  .modal-body { padding: 10px; }
  .clue-layout { grid-template-columns: 74px 1fr; gap: 9px; }
  .clue-visual { min-height: 116px; }
  .clue-visual .clue-icon { width: 45px; height: 45px; margin-top: 8px; }
  .clue-visual .clue-num { font-size: 20px; }
  .clue-title { font-size: 21px; }
  .clue-summary { font-size: 10px; }
  .clue-detail { font-size: 11px; }
  .report-top { grid-template-columns: 90px 1fr; gap: 9px; }
  .report-name { font-size: 25px; }
  .report-grid { grid-template-columns: 1fr; }
  .report-evidence { grid-template-columns: 1fr 1fr; }
  .profile-grid { grid-template-columns: 1fr; gap: 10px; }
  .profile-left { display: grid; grid-template-columns: 118px 1fr; gap: 8px; align-items: start; }
  .profile-portrait { width: 118px; }
  .profile-fields { margin-top: 0; }
  .profile-quote { display: none; }
  .profile-name { font-size: 25px; }
  .evidence-choices { grid-template-columns: 1fr; }
  .roster-modal-grid { grid-template-columns: 1fr 1fr; }
  .evidence-grid { grid-template-columns: repeat(2, 1fr); }
  .evidence-slot { min-height: 84px; }
  .help-grid { grid-template-columns: 1fr; }
  .scene-modal { height: auto; }
  .scene-art-wrap { aspect-ratio: 16 / 10; min-height: 190px; }
  .scene-meta { grid-template-columns: 1fr; gap: 4px; padding: 7px 9px; }
  .scene-meta h2 { font-size: 19px; }
  .scene-meta p { font-size: 10px; }
  .scene-meta-right { display: flex; align-items: center; justify-content: space-between; text-align: left; }
  .scene-legend { justify-content: flex-start; margin-top: 0; }
  .scene-nav { flex-wrap: wrap; }
  .scene-nav .scene-nav-title { width: 100%; margin-bottom: 3px; }
  .scene-nav .btn { flex: 1 1 auto; }
  .spot { width: 26px; height: 26px; line-height: 22px; }
  .spot::after { display: none; }

  .trial-top { padding: 0 9px; font-size: 7px; gap: 7px; }
  .trial-top-center { display: none; }
  .trial-layout { padding: 10px 11px 18px; gap: 7px; }
  .trial-side { padding-bottom: 7px; gap: 5px; }
  .trial-case-no { font-size: 33px; }
  .trial-hearts-wrap { display: flex; align-items: center; gap: 6px; }
  .trial-heart-label { margin: 0; }
  .trial-kicker { margin-top: 7px; font-size: 8px; }
  .trial-question { font-size: 20px; margin-top: 5px; }
  .trial-sub { font-size: 10px; }
  .trial-options { grid-template-columns: 1fr; margin-top: 10px; gap: 5px; }
  .trial-option { min-height: 46px; padding: 6px 8px; }
  .trial-option .option-copy b { font-size: 13px; }
  .trial-options.is-culprits { grid-template-columns: repeat(2, 1fr); }
  .trial-options.is-culprits-4 { grid-template-columns: repeat(2, 1fr); }
  .trial-option.is-culprit { min-height: 110px; }
  .trial-feedback { margin-top: 8px; padding: 8px; }
  .trial-feedback p { font-size: 10px; }
  .trial-side-section { display: none; }

  .ending-card { width: calc(100vw - 28px); padding-top: 54px; }
  .ending-title { font-size: 42px; }
  .ending-content { grid-template-columns: 1fr; gap: 12px; }
  .rank-box { display: grid; grid-template-columns: 90px 1fr; align-items: center; text-align: left; gap: 10px; }
  .rank-box::before { grid-column: 2; }
  .rank-letter { grid-row: 1 / 4; font-size: 78px; text-align: center; }
  .ending-stat { grid-template-columns: 90px 1fr; }
  .ending-foot { flex-direction: column; gap: 4px; }
  .archive-grid { grid-template-columns: 1fr; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .title-main { top: 50%; transform: translateY(-45%); }
  .title-logo { font-size: 54px; }
  .title-lead, .title-meta-row, .title-note { display: none; }
  .title-actions { margin-top: 15px; }
  .story-stage { bottom: 10px; grid-template-columns: 110px 1fr; }
  .story-dialogue { min-height: 116px; padding: 16px 16px 20px; }
  .story-text { font-size: 12px; line-height: 1.8; }
  .story-portrait { width: 110px; }
  .modal-window { max-height: 96vh; }
  .scene-art-wrap { aspect-ratio: 16 / 8; min-height: 160px; }
}

/* =========================================================
   V2 · 单色调查报告风格
   参考：纸张、双线、照片堆叠、打字机、半调网点
   ========================================================= */
:root {
  --ink: #201e18;
  --ink-soft: #4a4437;
  --ink-mute: #7a715d;
  --paper: #d6cdb5;
  --paper-hi: #e6dec7;
  --paper-mid: #ccc2a9;
  --paper-lo: #b8ad92;
  --line: #2b281f;
  --line-soft: #8c826c;
  --red: #2b281f;
  --red-bright: #15140f;
  --red-dark: #070705;
  --green: #34382e;
  --green-light: #5a5d4c;
  --blue: #343a3a;
  --gold: #6a5e43;
  --bar: #1b1a15;
  --white: #f1ead6;
}

#app {
  filter: grayscale(1) sepia(.27) contrast(1.055) brightness(.94);
}

#app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 940;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(23, 20, 15, .10) 0 .42px, transparent .7px),
    url("paper-grain.png");
  background-size: 3px 3px, 420px 420px;
  mix-blend-mode: multiply;
  opacity: .34;
}

.pixel-portrait {
  filter: grayscale(1) contrast(1.12) brightness(1.02);
}

.scene-svg {
  filter: grayscale(1) contrast(1.08) brightness(.98);
}

.window-bar {
  border-bottom: 3px double var(--line);
  background:
    repeating-linear-gradient(90deg, rgba(43, 40, 31, .08) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, #e5ddc6, #d2c8af);
}

.window::before { border-color: rgba(43, 40, 31, .28); }

.btn,
.cover-menu-btn,
.dock-btn {
  box-shadow: 3px 3px 0 rgba(22, 20, 15, .34);
}

.btn--red,
.dock-btn.is-ready {
  color: var(--paper-hi);
  background: var(--ink);
}

.btn--red:hover,
.dock-btn.is-ready:hover {
  background: #3a3529;
}

.window-x:hover,
.modal-close:hover {
  color: var(--paper-hi);
  background: var(--ink);
}

/* =========================================================
   V2 标题：死亡调查簿
   ========================================================= */
.title-screen.report-cover {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: #d5cbb2;
}
.cover-paper {
  position: absolute;
  inset: 0;
  background-color: #d2c7ad;
  background-image:
    radial-gradient(ellipse at 50% 42%, rgba(244, 238, 220, .20), transparent 58%),
    linear-gradient(90deg, rgba(40, 36, 27, .10), transparent 14%, transparent 86%, rgba(40, 36, 27, .10)),
    url("paper-grain.png");
  background-size: auto, auto, 420px 420px;
}
.cover-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 120px rgba(42, 36, 25, .28), inset 0 0 18px rgba(42, 36, 25, .22);
}
.cover-frame {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(36, 32, 24, .55);
  pointer-events: none;
  z-index: 3;
}
.cover-frame::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(36, 32, 24, .16);
}
.cover-watermark {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  font-family: var(--font-serif);
  font-size: min(19vw, 240px);
  line-height: .8;
  letter-spacing: .08em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(40, 36, 27, .08);
  pointer-events: none;
  white-space: nowrap;
}
.cover-head {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 38px 0;
  color: var(--ink-soft);
  font-size: 8px;
  letter-spacing: .19em;
  text-transform: uppercase;
}
.cover-head b { color: var(--ink); font-weight: 400; }
.cover-rule {
  position: relative;
  z-index: 4;
  height: 4px;
  margin: 14px 38px 0;
  border-top: 1px solid rgba(43, 40, 31, .75);
  border-bottom: 1px solid rgba(43, 40, 31, .45);
}
.cover-rule--bottom { margin-top: 0; }
.cover-main {
  position: relative;
  z-index: 4;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 22px 4px;
  text-align: center;
}
.cover-kicker {
  margin: 0 0 10px;
  color: var(--ink-mute);
  font-size: 8px;
  letter-spacing: .34em;
}
.cover-title {
  margin: 0;
  color: #26231c;
  font-family: var(--font-serif);
  font-size: clamp(54px, 7vw, 92px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: .08em;
  text-shadow: 1px 1px 0 rgba(255, 250, 235, .45);
  -webkit-text-stroke: .45px currentColor;
}
.cover-en {
  margin: 7px 0 0;
  color: #5c5342;
  font-size: 9px;
  letter-spacing: .32em;
}
.cover-case {
  margin: 11px 0 0;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: .12em;
}
.cover-case i { margin: 0 7px; color: var(--ink-mute); font-style: normal; }
.cover-case span { margin-left: 9px; font-family: var(--font-ui); font-size: 7px; letter-spacing: .16em; color: var(--ink-mute); }

.cover-cast {
  position: relative;
  width: min(560px, 78vw);
  height: 177px;
  margin: 13px 0 0;
  flex: 0 0 auto;
}
.cover-photo {
  position: absolute;
  width: 104px;
  height: 132px;
  padding: 4px 4px 15px;
  border: 1px solid #2b281f;
  background: #e9e1cc;
  box-shadow: 4px 5px 0 rgba(30, 26, 18, .20);
  transform: rotate(var(--rot));
  cursor: pointer;
  transition: transform .16s steps(3), box-shadow .16s steps(3);
  overflow: hidden;
}
.cover-photo canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  background: #c7bda4;
  image-rendering: pixelated;
}
.cover-photo::after {
  content: "";
  position: absolute;
  inset: 4px 4px 15px;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(26, 23, 17, .78) 0 .55px, transparent .8px);
  background-size: 3px 3px;
  opacity: .17;
  mix-blend-mode: multiply;
}
.cover-photo-name {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 3px;
  color: #4c4435;
  font-size: 6px;
  letter-spacing: .07em;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cover-photo-tape {
  position: absolute;
  z-index: 2;
  left: 37%;
  top: -5px;
  width: 25px;
  height: 9px;
  background: rgba(214, 201, 168, .65);
  border-left: 1px dashed rgba(70, 60, 43, .20);
  border-right: 1px dashed rgba(70, 60, 43, .20);
  transform: rotate(-2deg);
}
.cover-photo:hover,
.cover-photo:focus-visible {
  z-index: 20 !important;
  transform: translateY(-7px) rotate(0deg) scale(1.035);
  box-shadow: 7px 9px 0 rgba(30, 26, 18, .22);
}
.cover-cast-note {
  margin: 3px 0 0;
  color: var(--ink-mute);
  font-size: 7px;
  letter-spacing: .10em;
}
.cover-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: min(470px, 88vw);
  margin-top: 9px;
}
.cover-menu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: calc(50% - 3px);
  min-height: 36px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  background: rgba(229, 221, 202, .42);
  box-shadow: inset 0 0 0 2px rgba(245, 238, 220, .34), inset 0 0 0 3px rgba(43, 40, 31, .25), 2px 2px 0 rgba(30, 26, 18, .12);
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: .10em;
  cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
}
.cover-menu-btn small {
  color: var(--ink-mute);
  font-size: 6px;
  letter-spacing: .18em;
  line-height: 1.2;
}
.cover-menu-btn:hover,
.cover-menu-btn:focus-visible {
  background: var(--ink);
  color: var(--paper-hi);
  transform: translateY(-1px);
}
.cover-menu-btn:hover small,
.cover-menu-btn:focus-visible small { color: #b8ad92; }
.cover-brief {
  width: min(560px, 82vw);
  margin: 9px 0 0;
  padding-top: 7px;
  border-top: 1px solid rgba(43, 40, 31, .28);
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 10px;
  line-height: 1.8;
  letter-spacing: .06em;
}
.cover-warning {
  margin: 6px 0 0;
  color: var(--ink-mute);
  font-size: 7px;
  letter-spacing: .06em;
}
.cover-foot {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 38px 18px;
  color: var(--ink-mute);
  font-size: 8px;
  letter-spacing: .08em;
}
.cover-foot b { color: var(--ink-soft); font-weight: 400; }
.cover-foot-center { color: var(--ink-mute); }
.cover-foot-right { display: flex; align-items: center; gap: 7px; }
.cover-icon-btn {
  width: 22px;
  height: 20px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.cover-icon-btn:hover { background: var(--ink); color: var(--paper-hi); }
.cover-icon-btn.is-off { opacity: .42; }

@media (max-width: 900px) {
  .cover-head { padding: 19px 22px 0; }
  .cover-rule { margin-left: 22px; margin-right: 22px; }
  .cover-title { font-size: clamp(46px, 10vw, 76px); }
  .cover-cast { width: min(460px, 82vw); height: 154px; }
  .cover-photo { width: 88px; height: 113px; }
  .cover-menu { width: min(440px, 90vw); }
  .cover-foot { padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 640px) {
  .cover-frame { inset: 8px; }
  .cover-head { padding: 13px 15px 0; font-size: 6px; letter-spacing: .13em; gap: 8px; }
  .cover-head span:last-child { text-align: right; max-width: 45%; }
  .cover-rule { margin: 8px 15px 0; }
  .cover-main { justify-content: center; padding: 2vh 12px 0; }
  .cover-kicker { margin-bottom: 6px; font-size: 6px; letter-spacing: .22em; }
  .cover-title { font-size: clamp(40px, 11.5vw, 56px); letter-spacing: .04em; white-space: nowrap; }
  .cover-en { font-size: 7px; letter-spacing: .24em; }
  .cover-case { margin-top: 7px; font-size: 10px; }
  .cover-case span { display: block; margin: 2px 0 0; font-size: 6px; }
  .cover-cast { width: 302px; height: 126px; margin-top: 9px; }
  .cover-photo { width: 72px; height: 94px; padding: 3px 3px 12px; }
  .cover-photo-name { font-size: 5px; left: 4px; bottom: 2px; }
  .cover-photo::after { inset: 3px 3px 12px; }
  .cover-photo-tape { width: 18px; height: 7px; left: 36%; }
  .cover-cast-note { margin-top: 2px; font-size: 6px; }
  .cover-menu { width: 100%; max-width: 330px; gap: 4px; margin-top: 7px; }
  .cover-menu-btn { width: calc(50% - 2px); min-height: 31px; padding: 2px 5px; font-size: 10px; }
  .cover-menu-btn small { font-size: 5px; }
  .cover-brief { width: 100%; margin-top: 7px; padding-top: 5px; font-size: 8px; line-height: 1.7; }
  .cover-warning { margin-top: 4px; font-size: 6px; }
  .cover-foot { padding: 7px 15px 11px; font-size: 6px; gap: 5px; }
  .cover-foot-center { display: none; }
  .cover-foot-right { gap: 4px; }
  .cover-icon-btn { width: 19px; height: 17px; font-size: 10px; }
}
@media (max-height: 610px) and (orientation: landscape) {
  .cover-head { padding-top: 10px; }
  .cover-rule { margin-top: 7px; }
  .cover-kicker, .cover-cast-note, .cover-warning { display: none; }
  .cover-title { font-size: 40px; }
  .cover-en { margin-top: 2px; font-size: 7px; }
  .cover-case { margin-top: 3px; font-size: 9px; }
  .cover-cast { height: 104px; margin-top: 3px; }
  .cover-photo { width: 66px; height: 86px; }
  .cover-menu { margin-top: 3px; gap: 3px; }
  .cover-menu-btn { min-height: 25px; padding: 1px 5px; font-size: 9px; }
  .cover-menu-btn small { display: none; }
  .cover-foot { padding-top: 4px; padding-bottom: 6px; }
  .cover-main { padding-top: 0; }
}

/* =========================================================
   V2 视觉小说：照片 + 纸质笔录
   ========================================================= */
.story-top {
  height: 38px;
  border-bottom: 3px double rgba(43, 40, 31, .75);
  background: rgba(220, 211, 191, .93);
  color: var(--ink-soft);
}
.story-top .story-case { color: var(--ink-soft); }
.story-top .story-case b { color: var(--ink); }
.story-top-center { color: var(--ink-mute); }
.story-control { color: var(--ink-soft); }
.story-control:hover { color: var(--ink); }
.story-tag {
  color: var(--ink);
  text-shadow: none;
  background: rgba(225, 217, 198, .88);
  border: 1px solid rgba(43, 40, 31, .35);
  padding: 3px 7px;
}
.story-tag::before { background: var(--ink); }
.story-screen.is-reveal .story-art .scene-svg { filter: grayscale(1) sepia(.16) brightness(.60) contrast(1.12); }
.story-screen.is-reveal .story-art::after {
  background:
    linear-gradient(0deg, rgba(12, 11, 8, .97) 0%, rgba(20, 18, 13, .53) 40%, rgba(20, 18, 13, .16) 72%, rgba(12, 11, 8, .64) 100%),
    linear-gradient(90deg, rgba(20, 17, 12, .54), transparent 48%);
}
.story-portrait {
  padding: 5px 5px 18px;
  border: 1px solid var(--line);
  background: #e7dfca;
  filter: drop-shadow(6px 7px 0 rgba(0, 0, 0, .30));
}
.story-portrait::before {
  content: "";
  position: absolute;
  inset: 5px 5px 18px;
  z-index: 2;
  background-image: radial-gradient(circle, rgba(28, 25, 18, .72) 0 .55px, transparent .8px);
  background-size: 3px 3px;
  opacity: .16;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.story-portrait::after { display: none; }
.story-portrait .pixel-portrait { border: 0; background: #c6bca4; }
.story-dialogue {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(233, 225, 207, .98), rgba(215, 206, 185, .98)),
    url("paper-grain.png");
  background-size: auto, 420px 420px;
  box-shadow: 7px 8px 0 rgba(0, 0, 0, .28), inset 0 0 0 3px rgba(58, 51, 38, .16);
}
.story-dialogue::before, .story-dialogue::after { border-color: rgba(43, 40, 31, .30); }
.story-speaker {
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper-hi);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .28);
}
.story-speaker small { color: #b7ac94; }
.story-text { color: var(--ink); text-shadow: none; font-family: var(--font-serif); }
.story-screen.is-reveal .story-dialogue { border-color: var(--line); }
.story-screen.is-reveal .story-text { color: var(--ink); }
.story-screen.is-reveal .story-speaker { background: var(--ink); color: var(--paper-hi); }
.story-next { color: var(--ink-soft); }
.story-hint { color: var(--ink-soft); background: rgba(221, 212, 192, .7); padding: 2px 6px; }
.story-log {
  border: 1px solid var(--line);
  background: rgba(227, 219, 200, .98);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .35);
}
.story-log-head { border-bottom: 3px double var(--line); color: var(--ink); }
.story-log-line { border-bottom: 1px dashed rgba(43, 40, 31, .24); color: var(--ink-soft); }
.story-log-line b { color: var(--ink); }
.story-log-close { color: var(--ink-soft); }

@media (max-width: 640px) {
  .story-top { height: 34px; background: rgba(220, 211, 191, .96); }
  .story-portrait { padding: 4px 4px 13px; }
  .story-portrait::before { inset: 4px 4px 13px; }
  .story-dialogue { border-color: var(--line); }
  .story-text { color: var(--ink); }
  .story-speaker { background: var(--ink); color: var(--paper-hi); }
}

/* =========================================================
   V2 推理裁定：一张被反复翻动的调查纸
   ========================================================= */
.trial-screen {
  color: var(--ink);
  background: var(--paper);
}
.trial-bg {
  background:
    radial-gradient(circle at 74% 36%, rgba(46, 40, 29, .09), transparent 34%),
    radial-gradient(circle at 18% 82%, rgba(46, 40, 29, .06), transparent 40%),
    var(--paper);
}
.trial-bg::before {
  background:
    repeating-linear-gradient(0deg, rgba(43, 40, 31, .035) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(125deg, transparent 0 39px, rgba(43, 40, 31, .045) 40px 41px, transparent 42px 80px);
}
.trial-bg::after {
  color: transparent;
  -webkit-text-stroke: 1px rgba(43, 40, 31, .09);
}
.trial-top {
  border-bottom: 3px double rgba(43, 40, 31, .72);
  background: rgba(226, 218, 199, .76);
  color: var(--ink-soft);
}
.trial-top .trial-title { color: var(--ink-soft); }
.trial-top .trial-title b { color: var(--ink); }
.trial-top-center { color: var(--ink-mute); }
.trial-top .trial-abort { border-color: var(--line-soft); color: var(--ink-soft); }
.trial-top .trial-abort:hover { color: var(--ink); background: var(--paper-hi); }
.trial-layout { position: relative; }
.trial-side { border-right: 1px dashed var(--line-soft); }
.trial-case-no { -webkit-text-stroke: 1px rgba(43, 40, 31, .42); }
.trial-case-label { color: var(--ink-soft); }
.trial-case-name { color: var(--ink); }
.trial-side-section h3 { color: var(--ink-mute); }
.trial-side-section h3::after { background: var(--line-soft); }
.trial-deduction { color: var(--ink-mute); }
.trial-deduction .ded-mark { border-color: var(--line-soft); }
.trial-deduction.is-done { color: var(--ink); }
.trial-deduction.is-done .ded-mark { border-color: var(--line); background: var(--ink); color: var(--paper-hi); }
.trial-hearts .heart { background: var(--ink); }
.trial-hearts .heart.is-lost { background: #b3a88e; }
.trial-heart-label { color: var(--ink-mute); }
.trial-progress { color: var(--ink-mute); }
.trial-progress b { color: var(--ink); }
.trial-progress .trial-bar { background: #bdb298; }
.trial-progress .trial-bar::before { background: var(--ink); }
.trial-kicker { color: var(--ink-soft); }
.trial-kicker span { border-color: var(--line); color: var(--ink); background: rgba(234, 226, 207, .35); }
.trial-question { color: var(--ink); text-shadow: 1px 1px 0 rgba(255, 250, 235, .34); }
.trial-sub { color: var(--ink-mute); }
.trial-option {
  border-color: var(--line-soft);
  background: rgba(231, 223, 204, .62);
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(43, 40, 31, .10);
}
.trial-option:hover {
  border-color: var(--line);
  background: var(--paper-hi);
  transform: translateX(2px);
}
.trial-option .option-no { border-color: var(--line-soft); color: var(--ink-soft); }
.trial-option .option-copy b { color: var(--ink); }
.trial-option .option-copy small { color: var(--ink-mute); }
.trial-option.is-correct { border-color: var(--line); background: #d9d1ba; }
.trial-option.is-correct .option-no { border-color: var(--line); color: var(--paper-hi); background: var(--ink); }
.trial-option.is-wrong { border-color: var(--line); background: #c5baa1; animation: option-shake .3s steps(3); }
.trial-feedback {
  border-left: 3px solid var(--ink);
  background: rgba(43, 40, 31, .055);
}
.trial-feedback h4 { color: var(--ink); }
.trial-feedback h4 span { color: var(--ink); }
.trial-feedback p { color: var(--ink-soft); }
.trial-feedback .feedback-hint { color: var(--ink-mute); }
.trial-feedback .btn { color: var(--ink); background: var(--paper-hi); }
.trial-overlay { background: rgba(24, 22, 17, .72); }
.trial-overlay-card {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 7px 7px 0 rgba(0, 0, 0, .24);
}
.trial-overlay-card .over-code { color: var(--ink-soft); }
.trial-overlay-card h2 { color: var(--ink); }
.trial-overlay-card p { color: var(--ink-soft); }
.trial-overlay-card .btn--ghost { color: var(--ink); border-color: var(--line-soft); }
.trial-flash { background: #efe8d4; }
.judgment-stamp { border-color: var(--ink); color: var(--ink); text-shadow: none; }

@media (max-width: 640px) {
  .trial-top { border-bottom-width: 2px; }
  .trial-side { border-bottom: 1px dashed var(--line-soft); }
  .trial-option { box-shadow: 1px 1px 0 rgba(43, 40, 31, .12); }
}

/* =========================================================
   V2 搜查记事本
   ========================================================= */
.clue-actions { display: inline-flex; gap: 5px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.notebook-modal { width: min(990px, 95vw); max-height: 90vh; }
.notebook-modal .modal-body { padding: 10px 12px 12px; }
.notebook-shell {
  display: grid;
  grid-template-columns: 222px minmax(0, 1fr);
  gap: 13px;
  min-height: 480px;
}
.note-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-right: 11px;
  border-right: 1px dashed var(--line-soft);
}
.note-sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.note-sidebar-head span { color: var(--ink-mute); font-size: 8px; letter-spacing: .12em; }
.note-new-btn {
  border: 1px solid var(--line);
  background: var(--paper-hi);
  padding: 2px 6px;
  font-size: 8px;
  cursor: pointer;
}
.note-new-btn:hover { color: var(--paper-hi); background: var(--ink); }
.note-list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 4px; padding: 6px 2px 6px 0; }
.note-list::-webkit-scrollbar { width: 6px; }
.note-list::-webkit-scrollbar-thumb { background: var(--line); }
.note-list-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 6px 7px 5px 8px;
  border: 1px solid var(--line-soft);
  background: rgba(233, 225, 207, .38);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.note-list-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.note-list-item:hover { background: var(--paper-hi); border-color: var(--line); }
.note-list-item.is-active { background: var(--paper-hi); border-color: var(--line); box-shadow: 2px 2px 0 rgba(43, 40, 31, .12); }
.note-list-item.is-active::before { background: var(--ink); }
.note-list-title { width: 100%; padding-left: 2px; font-family: var(--font-serif); font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-list-excerpt { width: 100%; padding-left: 2px; color: var(--ink-mute); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-list-item small { padding-left: 2px; color: var(--ink-mute); font-size: 7px; }
.note-sidebar-foot { margin: 3px 0 0; color: var(--ink-mute); font-size: 7px; line-height: 1.5; }
.note-editor { display: flex; flex-direction: column; min-width: 0; }
.note-editor-head { display: flex; align-items: flex-end; gap: 7px; padding-bottom: 4px; border-bottom: 3px double var(--line); }
.note-title-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: .04em;
  padding: 2px 0;
  outline: none;
}
.note-title-input::placeholder { color: var(--ink-mute); }
.note-pin-btn {
  width: 30px;
  height: 28px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-size: 16px;
  cursor: pointer;
}
.note-pin-btn.is-on { background: var(--ink); color: var(--paper-hi); }
.note-meta { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; color: var(--ink-mute); font-size: 7px; letter-spacing: .03em; }
.note-body-input {
  width: 100%;
  min-height: 330px;
  flex: 1;
  resize: vertical;
  border: 1px solid var(--line-soft);
  background:
    repeating-linear-gradient(transparent 0 27px, rgba(43, 40, 31, .14) 27px 28px),
    rgba(235, 228, 211, .54);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 28px;
  padding: 4px 12px;
  outline: none;
  letter-spacing: .02em;
}
.note-body-input:focus { border-color: var(--line); box-shadow: inset 0 0 0 1px rgba(43, 40, 31, .16); }
.note-body-input::placeholder { color: var(--ink-mute); }
.note-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.note-clue-select {
  max-width: 210px;
  border: 1px solid var(--line-soft);
  background: var(--paper-hi);
  color: var(--ink);
  font-size: 8px;
  padding: 3px 4px;
}
.note-save-state { margin-left: auto; color: var(--green); font-size: 8px; }
.note-delete-btn { border: 0; border-bottom: 1px dotted var(--line-soft); background: transparent; color: var(--ink-mute); font-size: 8px; cursor: pointer; padding: 1px 0; }
.note-delete-btn:hover { color: var(--ink); border-color: var(--ink); }
.note-hint { margin: 5px 0 0; color: var(--ink-mute); font-size: 7px; }
@media (max-width: 700px) {
  .notebook-modal { height: auto; max-height: 100dvh; }
  .notebook-shell { grid-template-columns: 1fr; gap: 8px; min-height: 0; }
  .note-sidebar { border-right: 0; border-bottom: 1px dashed var(--line-soft); padding-right: 0; padding-bottom: 6px; }
  .note-list { flex-direction: row; overflow-x: auto; max-height: none; padding-bottom: 3px; }
  .note-list-item { flex: 0 0 148px; min-height: 55px; }
  .note-sidebar-foot { display: none; }
  .note-body-input { min-height: 250px; }
  .note-title-input { font-size: 20px; }
  .note-save-state { margin-left: 0; }
  .note-delete-btn { margin-left: auto; }
}

@media (max-width: 900px) {
  .dock-btn { flex: 1 1 0; width: auto; min-width: 0; }
  .dock { gap: 4px; }
}
@media (max-width: 900px) and (min-height: 700px) {
  .trial-layout { align-content: center; }
}
@media (max-width: 640px) {
  .dock { padding-left: 5px; padding-right: 5px; }
  .dock-btn { min-height: 48px; }
  .dock-btn span { font-size: 7px; }
  .dock-icon-svg { width: 20px; height: 20px; }
}

.tag--red { background: var(--ink); color: var(--paper-hi); border-color: var(--ink); }
.statusbar .status-led { background: var(--ink-mute); }
.progress-fill { background: repeating-linear-gradient(90deg, var(--ink) 0 4px, #5f5747 4px 8px); }
.progress-fill.is-full { background: repeating-linear-gradient(90deg, var(--ink) 0 4px, #4f4b3d 4px 8px); }
.case-mini i::before { background: var(--ink); }
.map-toolbar .map-sync::before { background: var(--ink); }
.field-stamp { transform: rotate(-2deg); }
.toast { border-color: var(--line); box-shadow: 3px 3px 0 rgba(0, 0, 0, .28); }
.case-quote { border-left-color: var(--ink); }
.window-sub { color: var(--ink-mute); }

/* =========================================================
   V3 主页面：章节选择 / 最近三份记录
   ========================================================= */
.home-screen {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  overflow: auto;
  color: var(--ink);
  background: #d5cbb2;
}
.home-paper {
  position: absolute;
  inset: 0;
  background-color: #d7cdb5;
  background-image:
    radial-gradient(ellipse at 50% 40%, rgba(244, 238, 220, .18), transparent 62%),
    linear-gradient(90deg, rgba(40, 36, 27, .10), transparent 12%, transparent 88%, rgba(40, 36, 27, .10)),
    url("paper-grain.png");
  background-size: auto, auto, 420px 420px;
  pointer-events: none;
}
.home-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 110px rgba(42, 36, 25, .24);
}
.home-frame {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(36, 32, 24, .52);
  pointer-events: none;
  z-index: 1;
}
.home-frame::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(36, 32, 24, .14);
}
.home-head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 38px 0;
  color: var(--ink-mute);
  font-size: 8px;
  letter-spacing: .13em;
}
.home-head-brand { color: var(--ink-soft); }
.home-head-brand b { color: var(--ink); font-weight: 400; }
.home-back {
  border: 0;
  border-bottom: 1px dotted transparent;
  background: transparent;
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: .06em;
  cursor: pointer;
  padding: 2px 0;
}
.home-back:hover { color: var(--ink); border-bottom-color: var(--ink); }
.home-rule {
  position: relative;
  z-index: 3;
  height: 4px;
  margin: 13px 38px 0;
  border-top: 1px solid rgba(43, 40, 31, .72);
  border-bottom: 1px solid rgba(43, 40, 31, .40);
}
.home-rule--bottom { margin-top: 0; }
.home-main {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100vw - 76px));
  margin: 0 auto;
  padding: 22px 0 26px;
  flex: 1;
}
.home-title-block { padding-bottom: 14px; border-bottom: 1px solid rgba(43, 40, 31, .22); }
.home-kicker {
  color: var(--ink-mute);
  font-size: 8px;
  letter-spacing: .28em;
}
.home-title-block h1 {
  margin: 4px 0 2px;
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: 1.08;
  letter-spacing: .10em;
  font-weight: 900;
  color: #28241c;
}
.home-title-block p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: .04em;
}
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr);
  gap: 26px;
  margin-top: 16px;
  align-items: start;
}
.home-section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 3px double var(--line);
  color: var(--ink);
  font-size: 10px;
  letter-spacing: .13em;
}
.home-section-label span:last-child { color: var(--ink-mute); font-size: 8px; font-weight: 400; }
.chapter-list { display: flex; flex-direction: column; gap: 9px; margin-top: 8px; }
.chapter-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 164px;
  border: 1px solid var(--line);
  background: rgba(232, 224, 205, .60);
  box-shadow: 4px 4px 0 rgba(43, 40, 31, .13);
  overflow: hidden;
}
.chapter-art {
  position: relative;
  min-height: 164px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #23211b;
}
.chapter-art .scene-svg { width: 100%; height: 100%; }
.chapter-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(28, 25, 19, .20), transparent 50%),
    linear-gradient(0deg, rgba(28, 25, 19, .54), transparent 54%);
  pointer-events: none;
}
.chapter-art-mark {
  position: absolute;
  z-index: 2;
  left: 9px;
  bottom: 8px;
  padding: 2px 5px;
  border: 1px solid rgba(232, 224, 205, .52);
  color: #eee7d3;
  font-size: 7px;
  letter-spacing: .14em;
  background: rgba(23, 21, 16, .38);
}
.chapter-art--locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(135deg, rgba(43, 40, 31, .09) 0 2px, transparent 2px 8px),
    #c7bda4;
  color: var(--ink-mute);
}
.chapter-art--locked span { font-family: var(--font-serif); font-size: 52px; line-height: 1; }
.chapter-art--locked small { margin-top: 4px; font-size: 7px; letter-spacing: .22em; }
.chapter-body { min-width: 0; padding: 10px 13px 9px; display: flex; flex-direction: column; }
.chapter-eyebrow { color: var(--ink-mute); font-size: 9px; letter-spacing: .12em; }
.chapter-live { float: right; padding: 1px 5px; border: 1px solid var(--line-soft); color: var(--ink-soft); font-size: 7px; }
.chapter-body h2 {
  margin: 5px 0 2px;
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: .05em;
}
.chapter-body h2 small { display: block; margin-top: 2px; font-family: var(--font-ui); font-size: 8px; color: var(--ink-mute); letter-spacing: .12em; }
.chapter-body p { margin: 2px 0 5px; color: var(--ink-soft); font-family: var(--font-serif); font-size: 11.5px; line-height: 1.7; }
.chapter-meta { color: var(--ink-mute); font-size: 8px; letter-spacing: .04em; }
.chapter-foot { display: flex; align-items: center; gap: 9px; margin-top: auto; padding-top: 7px; }
.chapter-start {
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper-hi);
  padding: 5px 13px;
  font-size: 11px;
  letter-spacing: .08em;
  cursor: pointer;
}
.chapter-start:hover { background: #3a3529; }
.chapter-state { color: var(--ink-mute); font-size: 8px; }
.chapter-lock { color: var(--ink-mute); font-size: 8px; }
.chapter-seal { margin-left: auto; padding: 2px 6px; border: 1px solid var(--line-soft); color: var(--ink-mute); font-size: 6px; letter-spacing: .14em; transform: rotate(-2deg); }
.chapter-card.is-locked { opacity: .76; background: rgba(210, 201, 181, .50); }
.home-note { margin: 8px 0 0; color: var(--ink-mute); font-size: 7px; line-height: 1.7; }

.save-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.save-record {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-soft);
  background: rgba(233, 225, 207, .52);
  box-shadow: 2px 2px 0 rgba(43, 40, 31, .08);
}
.save-record-main {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) auto 13px;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 8px 5px 7px 7px;
  cursor: pointer;
}
.save-record-main:hover { background: var(--paper-hi); }
.save-record-index { font-family: var(--font-serif); font-size: 24px; line-height: 1; color: var(--ink-mute); }
.save-record-copy { min-width: 0; }
.save-record-copy b { display: block; font-family: var(--font-serif); font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.save-record-copy small { display: block; margin-top: 2px; color: var(--ink-mute); font-size: 8.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.save-record-time { color: var(--ink-mute); font-size: 8px; white-space: nowrap; }
.save-record-arrow { color: var(--ink); font-size: 12px; }
.save-record-delete {
  width: 27px;
  border: 0;
  border-left: 1px solid var(--line-soft);
  background: transparent;
  color: var(--ink-mute);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}
.save-record-delete:hover { color: var(--paper-hi); background: var(--ink); }
.save-empty {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border: 1px dashed var(--line-soft);
  color: var(--ink-mute);
  background: rgba(225, 217, 198, .24);
  text-align: center;
}
.save-empty span { font-size: 8px; letter-spacing: .22em; }
.save-empty p { margin: 6px 0 0; font-family: var(--font-serif); font-size: 11px; line-height: 1.8; }
.home-section-label.is-focused { background: rgba(43, 40, 31, .06); }
.chapter-section.is-focused, .save-section.is-focused { outline: 1px dashed rgba(43, 40, 31, .45); outline-offset: 5px; }
.home-foot {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 38px 16px;
  color: var(--ink-mute);
  font-size: 7px;
  letter-spacing: .1em;
}

@media (max-width: 900px) {
  .home-head { padding: 15px 18px 0; }
  .home-rule { margin-left: 18px; margin-right: 18px; }
  .home-main { width: calc(100vw - 36px); padding: 15px 0 20px; }
  .home-layout { grid-template-columns: 1fr; gap: 18px; }
  .home-title-block h1 { font-size: 42px; }
  .home-foot { padding-left: 18px; padding-right: 18px; }
  .home-foot span:nth-child(2) { display: none; }
}
@media (max-width: 640px) {
  .home-head { gap: 6px; font-size: 6px; }
  .home-head-brand b { font-size: 6px; }
  .home-back { font-size: 8px; }
  .home-main { width: calc(100vw - 44px); padding-top: 10px; }
  .home-title-block { padding-bottom: 8px; }
  .home-title-block h1 { font-size: 33px; }
  .home-title-block p { font-size: 9px; line-height: 1.6; }
  .home-layout { margin-top: 10px; gap: 14px; }
  .chapter-card { grid-template-columns: 92px minmax(0, 1fr); }
  .chapter-art { min-height: 154px; border-right: 1px solid var(--line); border-bottom: 0; }
  .chapter-body { padding: 7px 9px 7px; }
  .chapter-eyebrow { font-size: 7px; }
  .chapter-live { font-size: 6px; padding: 0 3px; }
  .chapter-body h2 { font-size: 18px; margin-top: 3px; }
  .chapter-body h2 small { font-size: 6px; }
  .chapter-body p { font-size: 8.5px; line-height: 1.55; margin-bottom: 3px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .chapter-meta { font-size: 6.5px; }
  .chapter-foot { flex-wrap: wrap; gap: 5px; padding-top: 4px; }
  .chapter-start { font-size: 9px; padding: 4px 8px; }
  .chapter-state { font-size: 6.5px; }
  .chapter-lock { font-size: 7px; }
  .chapter-seal { font-size: 5.5px; }
  .chapter-art-mark { font-size: 6px; }
  .save-record-main { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .save-record-time { display: none; }
  .save-record-arrow { display: none; }
  .save-record-copy small { white-space: normal; line-height: 1.5; }
  .home-foot { font-size: 6px; padding-bottom: 11px; }
}

/* =========================================================
   V3 彩蛋：档案背面 / 隐藏日记
   ========================================================= */
.bonus-modal { width: min(700px, 94vw); }
.bonus-sheet { position: relative; padding: 4px 4px 2px; }
.bonus-eyebrow { color: var(--ink-mute); font-size: 8px; letter-spacing: .18em; }
.bonus-lead { margin: 9px 0 2px; color: var(--ink-soft); font-family: var(--font-serif); font-size: 11px; line-height: 1.8; }
.bonus-sheet h2 { margin: 4px 0 5px; font-family: var(--font-serif); font-size: 25px; line-height: 1.45; letter-spacing: .03em; }
.bonus-sub { margin: 0 0 12px; color: var(--ink-mute); font-family: var(--font-serif); font-size: 11px; line-height: 1.8; }
.bonus-options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.bonus-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--line-soft);
  background: rgba(233, 225, 207, .52);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.bonus-option span { width: 23px; height: 23px; flex: 0 0 23px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-soft); font-family: var(--font-serif); font-size: 12px; }
.bonus-option b { font-family: var(--font-serif); font-size: 14px; font-weight: 400; }
.bonus-option:hover { border-color: var(--line); background: var(--paper-hi); }
.bonus-option.is-correct { border-color: var(--line); background: #d9d1ba; }
.bonus-option.is-correct span { background: var(--ink); color: var(--paper-hi); }
.bonus-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; padding-top: 8px; border-top: 1px dashed var(--line-soft); }
.bonus-foot span { color: var(--ink-mute); font-size: 8px; }
.bonus-skip { border: 0; border-bottom: 1px dotted var(--line-soft); background: transparent; color: var(--ink-mute); font-size: 8px; cursor: pointer; padding: 2px 0; }
.bonus-skip:hover { color: var(--ink); border-color: var(--ink); }
.bonus-note { margin: 11px 0; padding: 8px 10px; border-left: 2px solid var(--ink-soft); background: rgba(43, 40, 31, .05); color: var(--ink-soft); font-family: var(--font-serif); font-size: 11px; line-height: 1.8; }
.bonus-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.bonus-seal {
  position: absolute;
  right: 10px;
  top: 2px;
  padding: 3px 9px;
  border: 3px double var(--ink);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 23px;
  letter-spacing: .1em;
  transform: rotate(-8deg);
}
.bonus-sheet.is-unlocked blockquote { margin: 12px 0; padding: 10px 12px; border-left: 2px solid var(--ink); background: rgba(43, 40, 31, .05); color: var(--ink); font-family: var(--font-serif); font-size: 12px; line-height: 1.9; }
.diary-modal { width: min(720px, 94vw); }
.diary-sheet {
  padding: 12px 14px 10px;
  border: 1px solid var(--line-soft);
  background:
    url("paper-grain.png"),
    rgba(236, 228, 210, .72);
  background-size: 420px 420px, auto;
}
.diary-head { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 5px; border-bottom: 1px solid var(--line-soft); color: var(--ink-mute); font-size: 7px; letter-spacing: .14em; }
.diary-sheet h2 { margin: 10px 0 5px; font-family: var(--font-serif); font-size: 28px; letter-spacing: .08em; }
.diary-intro { margin: 0 0 9px; color: var(--ink-soft); font-family: var(--font-serif); font-size: 11px; line-height: 1.85; }
.diary-entries { border-top: 3px double var(--line); }
.diary-entry { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line-soft); }
.diary-entry time { color: var(--ink-mute); font-size: 8px; letter-spacing: .04em; padding-top: 2px; }
.diary-entry p { margin: 0; color: var(--ink); font-family: var(--font-serif); font-size: 12px; line-height: 1.95; }
.diary-footer { margin: 12px 0 0; color: var(--ink-mute); font-family: var(--font-serif); font-size: 10px; text-align: right; }
@media (max-width: 640px) {
  .bonus-options { grid-template-columns: 1fr; }
  .bonus-sheet h2 { font-size: 21px; }
  .diary-entry { grid-template-columns: 1fr; gap: 2px; }
  .diary-sheet h2 { font-size: 24px; }
}

/* =========================================================
   V4 主封面：展开的调查簿
   ========================================================= */
.cover-book {
  position: relative;
  width: min(560px, 82vw);
  height: 176px;
  margin: 15px 0 1px;
  flex: 0 0 auto;
  perspective: 900px;
}
.book-shadow {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: -8px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(35, 31, 23, .34), transparent 68%);
  filter: blur(2px);
}
.book-spread {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  height: 100%;
  transform: rotateX(4deg);
  transform-origin: 50% 100%;
  filter: drop-shadow(0 7px 8px rgba(35, 31, 23, .18));
}
.book-page {
  position: relative;
  width: calc(50% - 8px);
  height: 100%;
  overflow: hidden;
  padding: 12px 15px 13px;
  border: 1px solid rgba(48, 43, 33, .62);
  background-color: #e4dbc3;
  background-image:
    linear-gradient(90deg, rgba(255, 250, 231, .22), transparent 18%, transparent 82%, rgba(43, 37, 27, .06)),
    url("paper-grain.png");
  background-size: auto, 420px 420px;
  box-shadow: inset 0 0 22px rgba(52, 44, 30, .10);
}
.book-page--left {
  border-radius: 2px 0 0 5px;
  transform: rotateY(2.4deg);
  transform-origin: right center;
  box-shadow: inset -10px 0 17px rgba(49, 41, 29, .12), 0 3px 0 #cfc5ab, 0 5px 0 #bdb39a;
}
.book-page--right {
  border-radius: 0 3px 5px 0;
  transform: rotateY(-2.4deg);
  transform-origin: left center;
  background-color: #e7dec7;
  background-image:
    radial-gradient(circle at 72% 18%, rgba(255, 249, 230, .28), transparent 34%),
    url("paper-grain.png");
  background-size: auto, 420px 420px;
  box-shadow: inset 10px 0 17px rgba(49, 41, 29, .10), 0 3px 0 #cfc5ab, 0 5px 0 #bdb39a;
}
.book-gutter {
  position: relative;
  z-index: 2;
  width: 16px;
  height: 100%;
  border-top: 1px solid rgba(48, 43, 33, .55);
  border-bottom: 1px solid rgba(48, 43, 33, .55);
  background:
    linear-gradient(90deg, rgba(35, 30, 22, .04), rgba(50, 42, 30, .28) 44%, rgba(80, 68, 48, .22) 55%, rgba(35, 30, 22, .04));
  box-shadow: inset 0 0 8px rgba(35, 29, 21, .22);
}
.book-gutter::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 9px;
  bottom: 9px;
  width: 1px;
  background: repeating-linear-gradient(0deg, rgba(48, 40, 28, .58) 0 1px, transparent 1px 10px);
  opacity: .55;
}
.book-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(48, 43, 33, .48);
  color: var(--ink-mute);
  font-family: var(--font-ui);
  font-size: 6px;
  letter-spacing: .11em;
}
.book-title {
  margin: 8px 0 2px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: .12em;
}
.book-rule {
  height: 3px;
  margin: 5px 0 6px;
  border-top: 1px solid rgba(48, 43, 33, .62);
  border-bottom: 1px solid rgba(48, 43, 33, .30);
}
.book-entry {
  display: grid;
  grid-template-columns: 31px 1fr auto;
  align-items: baseline;
  gap: 5px;
  padding: 4px 0;
  border-bottom: 1px dotted rgba(48, 43, 33, .28);
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 9px;
  line-height: 1.45;
}
.book-entry b {
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 6px;
  font-weight: 400;
  letter-spacing: .04em;
}
.book-entry i {
  color: var(--ink-mute);
  font-family: var(--font-ui);
  font-size: 5px;
  font-style: normal;
  letter-spacing: .10em;
}
.book-page-foot {
  position: absolute;
  left: 15px;
  bottom: 8px;
  color: var(--ink-mute);
  font-size: 6px;
  letter-spacing: .08em;
}
.book-page--right .book-title { margin-top: 8px; }
.book-note {
  margin: 3px 0 0;
  max-width: 88%;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 8px;
  line-height: 1.7;
  letter-spacing: .02em;
}
.book-torn {
  position: absolute;
  right: 12px;
  bottom: 15px;
  width: 50px;
  height: 64px;
  padding: 9px 7px;
  background: #d7cdb3;
  border: 1px solid rgba(48, 43, 33, .44);
  box-shadow: 2px 2px 0 rgba(43, 37, 27, .12);
  transform: rotate(3deg);
  clip-path: polygon(0 0, 82% 0, 100% 16%, 94% 25%, 100% 34%, 100% 100%, 0 100%);
}
.book-torn b {
  display: block;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1;
}
.book-torn span {
  display: block;
  height: 1px;
  margin-top: 5px;
  background: rgba(48, 43, 33, .36);
}
.book-torn span:nth-of-type(2) { width: 74%; }
.book-torn span:nth-of-type(3) { width: 86%; }
.book-stamp {
  position: absolute;
  left: 15px;
  bottom: 13px;
  padding: 3px 7px;
  border: 3px double rgba(48, 43, 33, .68);
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: .13em;
  transform: rotate(-7deg);
  opacity: .78;
}
.book-edge {
  position: absolute;
  z-index: 0;
  left: 4%;
  right: 4%;
  bottom: -4px;
  height: 7px;
  border-radius: 0 0 4px 4px;
  background: repeating-linear-gradient(0deg, #d9cfb6 0 1px, #c5baa0 1px 2px);
  opacity: .8;
}

@media (max-width: 900px) {
  .cover-book { width: min(460px, 84vw); height: 154px; margin-top: 11px; }
  .book-title { font-size: 21px; }
  .book-entry { font-size: 8px; padding: 3px 0; }
  .book-note { font-size: 7.5px; }
  .book-torn { width: 43px; height: 55px; }
  .book-torn b { font-size: 18px; }
  .book-stamp { font-size: 12px; }
}
@media (max-width: 640px) {
  .cover-book { width: 330px; max-width: 88vw; height: 128px; margin-top: 8px; }
  .book-page { padding: 9px 10px 10px; }
  .book-gutter { width: 12px; }
  .book-gutter::after { left: 5px; }
  .book-head { font-size: 5px; padding-bottom: 3px; }
  .book-title { font-size: 18px; margin-top: 6px; }
  .book-entry { grid-template-columns: 25px 1fr auto; gap: 3px; padding: 3px 0; font-size: 7.5px; }
  .book-page-foot { left: 10px; bottom: 6px; font-size: 5px; }
  .book-note { font-size: 7px; max-width: 86%; }
  .book-torn { right: 7px; bottom: 10px; width: 38px; height: 48px; padding: 6px 5px; }
  .book-torn b { font-size: 16px; }
  .book-torn span { margin-top: 4px; }
  .book-stamp { left: 10px; bottom: 9px; font-size: 11px; padding: 2px 5px; }
  .book-edge { bottom: -3px; height: 5px; }
}
@media (max-width: 390px) {
  .cover-book { height: 118px; }
  .book-title { font-size: 16px; }
  .book-entry { font-size: 7px; }
  .book-note { font-size: 6.5px; }
  .book-torn { width: 34px; height: 43px; }
}

/* Mobile book: keep the spread readable, drop the long quote. */
@media (max-width: 640px) {
  .book-note { display: none; }
  .book-page--right .book-title { margin-bottom: 2px; }
  .book-torn { bottom: 11px; }
}
