:root {
  color-scheme: dark;
  --ink: #080908;
  --ink-soft: #111311;
  --paper: #ddd1b5;
  --paper-dim: #9f967f;
  --vermilion: #9e332a;
  --vermilion-bright: #d15a49;
  --bronze: #a88143;
  --jade: #52796b;
  --storm: #65767a;
  --line: rgba(210, 189, 143, 0.23);
  --panel: rgba(10, 11, 10, 0.96);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, serif;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}

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

button { border: 0; }

:is(button, input, select, summary, [tabindex]):focus-visible {
  outline: 2px solid #e0ba6d;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px rgba(5, 7, 6, .9);
}

.hidden { display: none !important; }
.modal-open .scene-hotspots { pointer-events: none; }

.scene-view {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #060706;
}

.scene-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.72) saturate(0.88) contrast(1.07);
  transform: scale(1.015);
  transition: opacity 0.45s ease, filter 0.7s ease, transform 6s ease;
}

.scene-image.changing { opacity: 0.2; transform: scale(1.035); }
.scene-image.changing + .scene-hotspots { opacity: 0; pointer-events: none; }
body.scene-changing #location-card,
body.scene-changing #objective,
body.scene-changing #location-nav { opacity: 0; visibility: hidden; pointer-events: none; }

.scene-view::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 48%, transparent 38%, rgba(2, 3, 3, 0.28) 76%, rgba(1, 2, 2, 0.72) 100%),
    linear-gradient(180deg, rgba(2, 3, 3, 0.38), transparent 25%, transparent 68%, rgba(2, 3, 3, 0.64));
  z-index: 2;
}

.scene-hotspots { position: absolute; inset: 0; z-index: 5; transition: opacity 0.24s ease; }
body[data-modal="dialogue"] .scene-hotspots { opacity: 0; }

.scene-view.inspection-mode { cursor: grab; }
.scene-view.inspection-mode.camera-dragging { cursor: grabbing; }
.scene-view.inspection-mode .scene-image,
.scene-view.inspection-mode .scene-hotspots {
  transform-origin: center;
  transform: translate3d(var(--scene-inspect-pan-x, 0), var(--scene-inspect-pan-y, 0), 0) scale(var(--scene-inspect-zoom, 1));
  transition: transform 0.18s ease-out, opacity 0.24s ease;
}
.scene-view.inspection-mode.camera-dragging .scene-image,
.scene-view.inspection-mode.camera-dragging .scene-hotspots { transition-duration: 0s; }
.scene-view.inspection-mode::after {
  background:
    linear-gradient(90deg, rgba(3,5,4,0.54), transparent 13%, transparent 87%, rgba(3,5,4,0.54)),
    radial-gradient(circle at 50% 48%, transparent 45%, rgba(2,3,3,0.2) 78%, rgba(1,2,2,0.64));
}

.scene-inspection-controls {
  position: absolute;
  z-index: 16;
  top: 88px;
  right: 22px;
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(191,157,94,0.34);
  border-radius: 4px;
  background: rgba(6,8,7,0.88);
  box-shadow: 0 12px 34px rgba(0,0,0,0.46);
}
.scene-inspection-controls .icon-button { width: 32px; min-width: 32px; height: 32px; }
.scene-inspection-controls .icon-button:disabled { opacity: 0.32; cursor: default; }
.scene-inspection-status {
  position: absolute;
  z-index: 15;
  left: 50%;
  top: 92px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  transform: translateX(-50%);
  border: 1px solid rgba(191,157,94,0.3);
  border-radius: 3px;
  background: rgba(6,8,7,0.84);
  color: #cdbb91;
  font-size: 9px;
  pointer-events: none;
}
.scene-inspection-status svg { width: 14px; height: 14px; }
.scene-inspection-status b { color: #7fa58f; font-size: 9px; }

.rain-canvas {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}

.film-grain {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image: repeating-radial-gradient(circle at 30% 50%, transparent 0 1px, rgba(255,255,255,0.24) 1px 2px, transparent 2px 5px);
  background-size: 7px 7px;
  mix-blend-mode: soft-light;
}

.scene-fear {
  position: absolute;
  z-index: 6;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 55%, transparent 18%, rgba(34, 0, 0, 0.75) 92%);
}

.scene-fear.active { animation: fear-pulse 1.4s steps(4, end); }
.scene-fear--2 { background: radial-gradient(circle at 45% 48%, transparent 8%, rgba(28, 0, 0, 0.86) 85%); }
.scene-fear--3 { background: linear-gradient(90deg, rgba(0,0,0,0.96), rgba(84,0,0,0.35), rgba(0,0,0,0.96)); }

@keyframes fear-pulse {
  0% { opacity: 0; }
  18% { opacity: 0.9; }
  33% { opacity: 0.16; }
  51% { opacity: 0.76; }
  100% { opacity: 0; }
}

.story-stage {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
}

.story-stage__background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.7) saturate(0.86) contrast(1.08);
  transform: scale(1.01);
}

.story-stage__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.opening {
  display: grid;
  place-items: center;
}

.opening .story-stage__background { filter: brightness(0.62) saturate(0.82) contrast(1.12); }
.opening .story-stage__shade {
  background:
    linear-gradient(90deg, rgba(4,5,5,0.88), rgba(4,5,5,0.18) 52%, rgba(4,5,5,0.84)),
    linear-gradient(180deg, rgba(2,3,3,0.3), transparent 46%, rgba(2,3,3,0.7));
}

.opening__storm {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.opening__storm::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(205, 226, 232, 0.78);
  opacity: 0;
  mix-blend-mode: screen;
}

.opening__lightning {
  position: absolute;
  top: -5%;
  left: 61%;
  width: 96px;
  height: 72%;
  background: rgba(238, 249, 250, 0.96);
  clip-path: polygon(43% 0, 68% 0, 54% 34%, 78% 34%, 29% 100%, 43% 56%, 19% 56%);
  filter: drop-shadow(0 0 10px rgba(224, 245, 248, 0.96)) drop-shadow(0 0 32px rgba(185, 221, 230, 0.86));
  opacity: 0;
  transform: rotate(7deg);
  transform-origin: top center;
}

.opening.storm-active .story-stage__background { animation: opening-image-flash 1.7s ease-out both; }
.opening.storm-active .opening__storm::before { animation: opening-sky-flash 1.7s ease-out both; }
.opening.storm-active .opening__lightning { animation: opening-lightning 1.2s ease-out both; }

@keyframes opening-image-flash {
  0%, 100% { filter: brightness(0.62) saturate(0.82) contrast(1.12); }
  7% { filter: brightness(1.18) saturate(0.66) contrast(1.08); }
  12% { filter: brightness(0.7) saturate(0.76) contrast(1.12); }
  19% { filter: brightness(0.94) saturate(0.7) contrast(1.1); }
  29% { filter: brightness(0.64) saturate(0.8) contrast(1.12); }
}

@keyframes opening-sky-flash {
  0%, 4%, 11%, 17%, 30%, 100% { opacity: 0; }
  7% { opacity: 0.58; }
  14% { opacity: 0.12; }
  21% { opacity: 0.3; }
}

@keyframes opening-lightning {
  0%, 4%, 13%, 20%, 100% { opacity: 0; }
  6% { opacity: 1; }
  10% { opacity: 0.18; }
  16% { opacity: 0.82; }
}

.opening::before,
.opening::after {
  content: "";
  position: absolute;
  top: 7%;
  bottom: 7%;
  width: 1px;
  background: linear-gradient(transparent, rgba(175, 139, 74, 0.5), transparent);
}

.opening::before { left: 13%; }
.opening::after { right: 13%; }

.opening__content { position: relative; z-index: 2; text-align: center; }

.eyebrow,
.opening__case span,
.case-mark span,
.location-card span,
.objective span,
.panel__header span,
.dialogue__meta span,
.puzzle-sheet > span,
.accusation-sheet > span,
.ending__content > span,
.prologue__panel > span,
.briefing__identity > span {
  color: var(--paper-dim);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.opening h1 {
  margin: 22px 0 18px;
  font-size: 72px;
  line-height: 0.94;
  letter-spacing: 0;
  font-weight: 900;
  text-shadow: 0 8px 34px #000;
}

.opening h1 span,
.opening h1 small { display: block; }

.opening h1 small {
  margin-top: 18px;
  color: #c6af7c;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.2em;
}

.seal,
.ending__seal {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 24px auto;
  border: 2px solid var(--vermilion-bright);
  color: var(--vermilion-bright);
  font-size: 20px;
  font-weight: 700;
  transform: rotate(-5deg);
  box-shadow: inset 0 0 0 3px rgba(209, 90, 73, 0.14);
}

.opening__lede {
  margin: 20px 0 30px;
  color: #c5baa1;
  font-size: 14px;
  line-height: 2;
}

.opening__case {
  position: absolute;
  z-index: 2;
  left: 5%;
  bottom: 6%;
  padding-left: 15px;
  border-left: 2px solid var(--vermilion);
}

.opening__case strong,
.opening__case p { display: block; }
.opening__case strong { margin: 6px 0; font-size: 15px; }
.opening__case p { margin: 0; color: #858272; font-size: 11px; }

.opening__ledger {
  position: absolute;
  z-index: 2;
  top: 8%;
  right: 5%;
  width: 188px;
  display: grid;
  gap: 7px;
  padding: 12px 14px 12px 12px;
  border-right: 1px solid rgba(190, 151, 82, 0.62);
  text-align: right;
  text-shadow: 0 2px 14px #000;
  background: linear-gradient(270deg, rgba(7, 9, 8, 0.48), transparent);
}

.opening__ledger::before {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 6px;
  height: 6px;
  border: 1px solid rgba(209, 90, 73, 0.82);
  transform: translate(50%, -50%) rotate(45deg);
}

.opening__ledger span {
  color: #a79b82;
  font-size: 10px;
  letter-spacing: 0.15em;
}

.opening__ledger b {
  color: #d7c18f;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.opening__ledger i {
  justify-self: end;
  padding: 3px 7px;
  border: 1px solid rgba(209, 90, 73, 0.65);
  color: #d15a49;
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.16em;
}

.story-stage__folio {
  position: absolute;
  z-index: 3;
  right: 4.5%;
  bottom: 4.5%;
  padding-right: 13px;
  border-right: 2px solid var(--vermilion);
  color: #9f967f;
  font-size: 10px;
  letter-spacing: 0.16em;
}

.prologue {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 7vh 8vw;
}

.prologue .story-stage__background { object-position: center 42%; filter: brightness(0.6) saturate(0.74) contrast(1.12); }
.prologue .story-stage__shade {
  background:
    linear-gradient(90deg, rgba(2,3,3,0.12), rgba(3,4,4,0.48) 48%, rgba(3,4,4,0.93) 82%),
    linear-gradient(180deg, rgba(2,3,3,0.28), transparent 55%, rgba(2,3,3,0.7));
}

.prologue__panel {
  position: relative;
  z-index: 2;
  width: min(540px, 47vw);
  padding: 22px 0 22px 34px;
  border-left: 1px solid rgba(190, 151, 82, 0.64);
  text-shadow: 0 3px 18px #000;
}

.prologue__panel h2 {
  margin: 13px 0 24px;
  max-width: 500px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.35;
}

.prologue__panel p {
  margin: 0 0 14px;
  color: #c8bda4;
  font-size: 13px;
  line-height: 1.95;
}

.prologue__panel .primary-button { margin-top: 14px; }

.dossier {
  display: grid;
  place-items: center;
  padding: 54px 6vw 38px;
}

.dossier .story-stage__background { object-position: center 44%; filter: brightness(0.42) saturate(0.64) contrast(1.14); }
.dossier .story-stage__shade {
  background:
    linear-gradient(90deg, rgba(3,4,4,0.9), rgba(3,4,4,0.58) 52%, rgba(3,4,4,0.9)),
    linear-gradient(180deg, rgba(2,3,3,0.36), rgba(2,3,3,0.82));
}

.dossier__shell {
  position: relative;
  z-index: 2;
  width: min(1060px, 100%);
  height: min(820px, calc(100vh - 92px));
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding: 0 24px;
  border-top: 1px solid rgba(190,151,82,0.58);
  border-bottom: 1px solid rgba(190,151,82,0.38);
  background: linear-gradient(90deg, rgba(7,9,8,0.92), rgba(11,13,11,0.78), rgba(7,9,8,0.92));
  box-shadow: 0 24px 80px rgba(0,0,0,0.46);
}

.dossier__header {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: end;
  padding: 18px 0 14px;
}

.dossier__header span,
.dossier__intro > span { color: #b9a376; font-size: 10px; }
.dossier__header h2 { margin: 4px 0 0; color: #ead9b2; font-size: 30px; letter-spacing: 0; }
.dossier__header > p { margin: 0; color: #aaa18e; font-size: 11px; line-height: 1.75; }

.dossier__tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(201,181,136,0.18);
  border-bottom: 1px solid rgba(201,181,136,0.18);
}

.dossier__tabs button {
  min-height: 42px;
  border-left: 1px solid rgba(201,181,136,0.12);
  background: transparent;
  color: #9f967f;
  cursor: pointer;
  font-size: 11px;
}
.dossier__tabs button:last-child { border-right: 1px solid rgba(201,181,136,0.12); }
.dossier__tabs button[aria-selected="true"] { color: #ead7a8; background: rgba(131,47,39,0.28); box-shadow: inset 0 -2px var(--vermilion-bright); }

.dossier__content {
  min-height: 0;
  overflow-y: auto;
  padding: 22px 4px 28px 0;
  scrollbar-color: rgba(168,129,67,0.55) transparent;
}

.dossier__panel { max-width: 980px; margin: 0 auto; }
.dossier__panel > h3 { margin: 28px 0 13px; color: #d6c49d; font-size: 16px; letter-spacing: 0; }
.dossier__intro { padding-left: 16px; border-left: 2px solid var(--vermilion); }
.dossier__intro h3 { margin: 7px 0 9px; color: #e3d1aa; font-size: 22px; letter-spacing: 0; }
.dossier__intro p { max-width: 900px; margin: 0; color: #b9af99; font-size: 12px; line-height: 1.9; }

.dossier__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 21px 0 0; background: rgba(201,181,136,0.12); }
.dossier__facts div { padding: 14px 15px; background: rgba(8,10,9,0.94); }
.dossier__facts dt { color: #c6a96f; font-size: 11px; }
.dossier__facts dd { margin: 7px 0 0; color: #b8ae98; font-size: 11px; line-height: 1.75; }

.dossier__numbered { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 22px; margin: 0; padding: 0; list-style: none; counter-reset: dossier-conflict; }
.dossier__numbered li { position: relative; min-height: 48px; padding: 0 0 10px 34px; border-bottom: 1px solid rgba(201,181,136,0.12); color: #b8ae98; font-size: 11px; line-height: 1.7; counter-increment: dossier-conflict; }
.dossier__numbered li::before { content: counter(dossier-conflict, decimal-leading-zero); position: absolute; left: 0; top: 1px; color: #a84d40; font-size: 12px; }

.dossier__people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin-top: 20px; }
.dossier-person { min-height: 142px; display: grid; grid-template-columns: 92px minmax(0, 1fr); overflow: hidden; border: 1px solid rgba(201,181,136,0.15); background: rgba(8,10,9,0.72); }
.dossier-person img { width: 92px; height: 142px; object-fit: contain; object-position: center bottom; align-self: end; filter: brightness(0.76) saturate(0.72) contrast(1.08) drop-shadow(0 10px 12px rgba(0,0,0,0.7)); }
.dossier-person div { padding: 12px 13px 11px 4px; }
.dossier-person div > span { float: right; color: rgba(209,90,73,0.7); font-size: 10px; }
.dossier-person h4 { margin: 0; color: #ddcca7; font-size: 16px; letter-spacing: 0; }
.dossier-person small { display: block; margin-top: 4px; color: #a99063; font-size: 10px; }
.dossier-person p { margin: 8px 0 0; color: #aaa18e; font-size: 10.5px; line-height: 1.7; }

.dossier__entries { display: grid; gap: 1px; margin: 16px 0 0; background: rgba(201,181,136,0.11); }
.dossier__entries article { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 11px; padding: 12px 14px; background: rgba(8,10,9,0.93); }
.dossier__entries article > span { color: #a84d40; font-size: 10px; }
.dossier__entries h4 { margin: 0; color: #d1bd92; font-size: 12px; letter-spacing: 0; }
.dossier__entries p { margin: 5px 0 0; color: #aaa18e; font-size: 10.5px; line-height: 1.75; }
.dossier__entries--rules,
.dossier__entries--scenes,
.dossier__entries--questions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; }

.dossier__footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 0 15px; border-top: 1px solid rgba(201,181,136,0.16); }
.dossier__footer > span { color: #8f8878; font-size: 10px; }
.dossier__footer .primary-button { flex: 0 0 auto; }

.briefing {
  display: grid;
  grid-template-columns: minmax(280px, 42%) 1fr;
  align-items: end;
}

.briefing .story-stage__background { object-position: center; filter: brightness(0.56) saturate(0.76) contrast(1.1); }
.briefing .story-stage__shade {
  background:
    linear-gradient(90deg, rgba(2,3,3,0.88), rgba(2,3,3,0.17) 42%, rgba(2,3,3,0.66)),
    linear-gradient(180deg, rgba(2,3,3,0.2), transparent 45%, rgba(2,3,3,0.9));
}

.briefing__portrait {
  position: relative;
  z-index: 2;
  height: 92vh;
  display: grid;
  align-items: end;
  justify-items: center;
  overflow: hidden;
}

.briefing__portrait::after,
.dialogue__portrait::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 18%;
  right: 18%;
  bottom: 1.5%;
  height: 4.5%;
  border-radius: 50%;
  background: rgba(0,0,0,0.72);
  filter: blur(13px);
}

.briefing__portrait img {
  width: min(100%, 560px);
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: brightness(0.76) saturate(0.78) contrast(1.07) sepia(0.08) drop-shadow(0 22px 34px rgba(0,0,0,0.86));
  transform-origin: 50% 100%;
  animation: character-breath 6.4s ease-in-out infinite;
  will-change: transform, filter;
}

.briefing.is-speaking .briefing__portrait img {
  animation: character-performance 760ms cubic-bezier(0.2, 0.72, 0.25, 1) both;
}

.briefing.is-speaking[data-performance="pei-command"] .briefing__portrait img {
  animation: performance-pei-command 760ms cubic-bezier(0.16, 0.78, 0.24, 1) both;
}

.briefing.is-speaking[data-performance="pei-restraint"] .briefing__portrait img {
  animation: performance-pei-restraint 1180ms cubic-bezier(0.2, 0.64, 0.28, 1) both;
}

.briefing.is-speaking[data-performance="pei-deadline"] .briefing__portrait img {
  animation: performance-pei-deadline 640ms cubic-bezier(0.12, 0.82, 0.2, 1) both;
}

.briefing.is-speaking[data-speech-tone="authoritative"] .briefing__portrait img {
  filter: brightness(0.82) saturate(0.84) contrast(1.1) sepia(0.06) drop-shadow(0 22px 34px rgba(0,0,0,0.86));
}

.briefing__dialogue {
  position: relative;
  z-index: 3;
  align-self: end;
  margin: 0 5vw 7vh 0;
  padding: 22px 0 0 26px;
  border-left: 1px solid rgba(190, 151, 82, 0.58);
  text-shadow: 0 3px 18px #000;
}

.briefing__identity h2 { margin: 5px 0 0; color: #dfcda6; font-size: 29px; }
.briefing__dialogue > p { min-height: 78px; margin: 18px 0 21px; color: #d0c4aa; font-size: 14px; line-height: 2; }
.briefing__questions { display: flex; flex-wrap: wrap; gap: 8px; }
.briefing__questions .secondary-button { min-width: 130px; }

.primary-button,
.secondary-button {
  min-width: 142px;
  min-height: 42px;
  padding: 9px 20px;
  border: 1px solid rgba(206, 181, 127, 0.4);
  border-radius: 3px;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, background 0.18s ease;
}

.primary-button {
  background: linear-gradient(#a13b31, #6f241f);
  box-shadow: 0 10px 32px rgba(62, 10, 10, 0.38), inset 0 1px rgba(255,255,255,0.14);
}

.secondary-button { background: rgba(255,255,255,0.035); }
.primary-button:hover:not(:disabled),
.secondary-button:hover { filter: brightness(1.16); transform: translateY(-1px); }
.primary-button:disabled { opacity: 0.3; cursor: not-allowed; }

.hud {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 13px 22px;
  pointer-events: none;
  background: linear-gradient(rgba(4,5,5,0.91), rgba(4,5,5,0.14));
}

.story-sound-button {
  position: fixed;
  z-index: 75;
  top: 24px;
  left: 24px;
  border-color: rgba(198, 175, 124, 0.54);
  background: rgba(7, 8, 8, 0.58);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

body:has(#dossier:not(.hidden)) .story-sound-button {
  left: auto;
  right: 24px;
}

#dossier .story-stage__folio {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

body.game-started .story-sound-button { display: none; }

.case-mark { padding-left: 12px; border-left: 2px solid var(--vermilion); }
.case-mark span,
.case-mark strong { display: block; }
.case-mark strong { margin-top: 4px; font-size: 14px; font-weight: 500; }
.case-mark strong.case-confirmed::after {
  content: attr(data-confirmed);
  display: block;
  margin-top: 5px;
  color: #8fb3a4;
  font-size: 9px;
  font-weight: 500;
  animation: case-confirmed 3.6s ease both;
}

@keyframes case-confirmed {
  0% { opacity: 0; transform: translateY(-4px); }
  12%, 78% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(2px); }
}

.time-meter { width: 210px; text-align: center; }
.time-meter span { color: #b7aa8c; font-size: 11px; }
.time-meter i,
.objective__bar,
.composure i,
.patience-meter i {
  display: block;
  height: 3px;
  margin-top: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.12);
}
.time-meter b,
.objective__bar b,
.composure b,
.patience-meter b {
  display: block;
  width: 0;
  height: 100%;
  background: var(--vermilion-bright);
  transition: width 0.4s ease;
}

.toolstrip {
  justify-self: end;
  display: flex;
  gap: 6px;
  pointer-events: auto;
}

.icon-button {
  width: auto;
  min-width: 38px;
  height: 38px;
  padding: 0 9px;
  display: inline-grid;
  grid-auto-flow: column;
  place-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(8,10,9,0.78);
  cursor: pointer;
}

.icon-button:hover { border-color: rgba(209,90,73,0.62); background: rgba(116,35,30,0.44); }
.icon-button svg { width: 17px; height: 17px; }
.icon-button span { color: var(--paper-dim); font-size: 10px; }
.icon-button.icon-only { width: 38px; padding: 0; }

.location-card {
  position: fixed;
  z-index: 12;
  top: 94px;
  left: 22px;
  width: 270px;
  padding: 14px 16px;
  border-left: 1px solid var(--bronze);
  background: linear-gradient(90deg, rgba(6,8,7,0.86), rgba(6,8,7,0.18));
  pointer-events: none;
}
.objective.case-progressed { animation: objective-case-progress 0.9s ease-out; }

@keyframes objective-case-progress {
  0% { box-shadow: inset 4px 0 rgba(123,171,148,0.8), 0 0 0 1px rgba(123,171,148,0.3); }
  100% { box-shadow: inset 0 0 rgba(123,171,148,0), 0 0 0 1px rgba(123,171,148,0); }
}

.location-card h2 { margin: 5px 0 7px; font-size: 20px; letter-spacing: 0; }
.location-card p { margin: 0; color: #aaa18b; font-size: 11px; line-height: 1.7; }

.objective {
  position: fixed;
  z-index: 12;
  top: 230px;
  left: 22px;
  width: 260px;
  padding: 9px 13px;
  border-left: 1px solid var(--jade);
  text-align: left;
  background: linear-gradient(90deg, rgba(6,8,7,0.88), rgba(6,8,7,0.2));
  pointer-events: none;
}

.objective__header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; padding-bottom: 5px; border-bottom: 1px solid rgba(201,181,136,0.14); }
.objective__header > span { color: #8fb3a4; font-size: 9px; }
.objective__header button { min-height: 26px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid rgba(201,181,136,0.22); border-radius: 2px; color: #cbb990; background: rgba(8,10,9,0.78); cursor: pointer; pointer-events: auto; }
.objective__header button:hover { border-color: rgba(209,90,73,0.58); }
.objective__header button svg { width: 13px; height: 13px; }
.objective__header button b { font-size: 9px; font-weight: 500; }
.objective__header button em { color: #968b73; font-size: 8px; font-style: normal; }
.objective__stage { display: grid; grid-template-columns: .9fr 1.25fr 1fr; gap: 3px; margin-bottom: 7px; }
.objective__stage > span { min-width: 0; display: grid; gap: 2px; padding: 5px 6px; border-left: 2px solid rgba(168,129,67,.62); background: rgba(168,129,67,.055); }
.objective__stage > span[data-scope="main"] { border-left-color: rgba(176,76,62,.78); background: rgba(126,45,37,.09); }
.objective__stage > span[data-scope="responsibility"] { border-left-color: rgba(184,148,83,.78); background: rgba(168,129,67,.075); }
.objective__stage > span[data-scope="completion"] { border-left-color: rgba(82,121,107,.72); background: rgba(82,121,107,.075); }
.objective__stage small { color: #9c8965; font-size: 7px; }
.objective__stage b { color: #c9b990; font-size: 8px; font-weight: 500; line-height: 1.35; }
.objective__stage.ready > span:not([data-scope="completion"]) { border-left-color: rgba(82,121,107,.86); background: rgba(82,121,107,.1); }
.objective__main, .objective__side { display: grid; gap: 4px; }
.objective p { display: block; margin: 0; overflow: visible; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.objective .objective__label { display: block; margin: 0; color: #8fb3a4; font-size: 8px; line-height: 1.3; letter-spacing: 0; white-space: nowrap; }
.objective .objective__copy { display: grid; gap: 2px; margin: 0; color: inherit; font-size: 9px; line-height: 1.4; letter-spacing: 0; white-space: normal; }
.objective__fact { min-width: 0; display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 5px; align-items: start; }
.objective__fact b { color: #a88c5e; font-size: 7.5px; font-weight: 500; }
.objective__fact em { min-width: 0; color: #b7ad98; font-size: 8.5px; font-style: normal; line-height: 1.42; overflow-wrap: anywhere; }
.objective__fact--lead, .objective__fact--detail { grid-template-columns: 1fr; }
.objective__fact--lead em { color: #d0bd95; font-weight: 500; }
.objective__side { margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(201,181,136,0.16); }
.objective__side .objective__label { color: #c79f64; }
.objective__side .objective__fact b { color: #b18456; }
.objective__bar { display: none; }
.objective__bar b { background: var(--jade); }

.objective.routes-open { z-index: 29; width: min(540px, calc(100% - 44px)); max-height: calc(100vh - 330px); padding: 10px 12px; overflow: hidden; background: rgba(6,8,7,0.96); box-shadow: 0 18px 56px rgba(0,0,0,0.56); pointer-events: auto; }
body:has(.objective.routes-open) .scene-view .hotspot,
body:has(.objective.routes-open) .scene-view .hotspot span { visibility: hidden; pointer-events: none; }
.route-guide-list { max-height: calc(100vh - 510px); margin-top: 8px; overflow-y: auto; border-top: 1px solid rgba(201,181,136,0.14); scrollbar-color: rgba(168,129,67,0.55) transparent; }
.route-guide-section { margin: 0; }
.route-guide-section > summary { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 28px 8px 9px; border-left: 3px solid rgba(176,76,62,.72); background: rgba(9,11,10,.97); box-shadow: 0 5px 12px rgba(0,0,0,.32); cursor: pointer; list-style: none; }
.route-guide-section > summary::-webkit-details-marker { display: none; }
.route-guide-section > summary::after { content: '+'; position: absolute; right: 9px; color: #9b8a6b; font-size: 13px; }
.route-guide-section[open] > summary::after { content: '−'; }
.route-guide-section > summary span { min-width: 0; display: grid; gap: 2px; }
.route-guide-section > summary b { color: #d3bd90; font-size: 9px; font-weight: 600; }
.route-guide-section > summary small { color: #8f8776; font-size: 7.5px; line-height: 1.45; }
.route-guide-section > summary em { flex: 0 0 auto; color: #b8a57e; font-size: 8px; font-style: normal; }
.route-guide-section--responsibility > summary { border-left-color: rgba(184,148,83,.86); }
.route-guide-section--completion > summary { border-left-color: rgba(82,121,107,.86); }
.route-guide-item { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding: 9px 2px; border-bottom: 1px solid rgba(201,181,136,0.11); }
.route-guide-item > span { color: #8d473d; font-size: 9px; letter-spacing: 0; }
.route-guide-item small { display: block; color: #8d8573; font-size: 8px; }
.route-guide-item strong { display: block; margin-top: 2px; color: #d0bd95; font-size: 10px; font-weight: 500; }
.route-guide-item p { margin: 4px 0 0; color: #aaa18e; font-size: 9.5px; line-height: 1.6; }
.route-guide-item--complete { opacity: 0.72; }
.route-guide-item--complete > span, .route-guide-item--complete small { color: #6f9c89; }
.route-guide-item--locked { opacity: 0.62; }
.route-guide-item--locked strong { color: #928a78; }
.route-guide-item--main { border-left: 2px solid rgba(176,76,62,.38); padding-left: 7px; background: rgba(126,45,37,.025); }
.route-guide-item--responsibility { border-left: 2px solid rgba(184,148,83,.48); padding-left: 7px; background: rgba(168,129,67,.035); }
.route-guide-item--completion { border-left: 2px solid rgba(82,121,107,.48); padding-left: 7px; background: rgba(82,121,107,.035); }
.route-guide-item--responsibility small { color: #ac925f; }
.route-guide-item--completion small { color: #789487; }

.location-nav {
  position: fixed;
  z-index: 18;
  left: 50%;
  bottom: 18px;
  width: min(1120px, calc(100% - 32px));
  height: 64px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  background: rgba(7,9,8,0.9);
  box-shadow: 0 18px 50px rgba(0,0,0,0.52);
}

.nav-arrow {
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.025);
  cursor: pointer;
}
.nav-arrow:hover { background: rgba(158,51,42,0.25); }
.nav-arrow svg { width: 18px; }

.location-tabs { display: grid; grid-template-columns: repeat(9, minmax(92px, 1fr)); overflow-x: auto; scrollbar-width: none; }
.location-tabs::-webkit-scrollbar { display: none; }
.location-tabs button {
  min-width: 92px;
  padding: 9px 7px;
  border-left: 1px solid rgba(255,255,255,0.07);
  background: transparent;
  cursor: pointer;
  opacity: 0.55;
}
.location-tabs button.visited { opacity: 0.82; }
.location-tabs button.active { opacity: 1; background: rgba(112, 37, 31, 0.35); box-shadow: inset 0 -2px var(--vermilion-bright); }
.location-tabs span { display: block; color: #847b68; font-size: 9px; }
.location-tabs b { display: block; margin-top: 5px; white-space: nowrap; font-size: 11px; font-weight: 500; }

.hotspot {
  position: absolute;
  width: 26px;
  height: 26px;
  padding: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(7,10,9,0.58);
  cursor: pointer;
  color: var(--paper);
}

.hotspot > i {
  position: absolute;
  inset: 7px;
  border: 1px solid #d9bd81;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(171,130,69,0.14), 0 0 18px rgba(211,174,105,0.45);
}

.hotspot::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(220,190,126,0.28);
  border-radius: 50%;
  animation: hotspot-pulse 2.3s ease-out infinite;
}

@keyframes hotspot-pulse {
  0% { transform: scale(0.65); opacity: 0; }
  40% { opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

.hotspot span {
  position: absolute;
  left: 50%;
  bottom: 35px;
  width: max-content;
  max-width: 140px;
  padding: 6px 9px;
  transform: translateX(-50%) translateY(5px);
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(5,7,6,0.88);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.hotspot:hover span,
.hotspot:focus-visible span { opacity: 1; transform: translateX(-50%) translateY(0); }
.hotspot--person > i { border-color: #7ca393; box-shadow: 0 0 0 5px rgba(82,121,107,0.14), 0 0 18px rgba(82,121,107,0.6); }
.hotspot--puzzle > i { border-color: var(--vermilion-bright); }
.hotspot.locked { filter: grayscale(1); opacity: 0.48; }
.hotspot--deep-inspect.examined:not(.hotspot--evidence) { opacity: 0.72; }
.hotspot--deep-inspect.examined:not(.hotspot--evidence) > i { border-color: #6f9b87; box-shadow: 0 0 0 5px rgba(82,121,107,0.12); }
.scene-view.clue-pulse .hotspot--deep-inspect:not(.examined)::before { animation: inspection-clue-pulse 1.1s ease-out 2; }
.scene-view.clue-pulse .hotspot--deep-inspect:not(.examined) span { opacity: 1; transform: translateX(-50%) translateY(0); }

@keyframes inspection-clue-pulse {
  0% { transform: scale(0.62); opacity: 0; border-color: rgba(227,199,132,0.28); }
  45% { opacity: 1; border-color: rgba(227,199,132,0.9); box-shadow: 0 0 24px rgba(214,174,91,0.52); }
  100% { transform: scale(1.85); opacity: 0; }
}

.hotspot--person {
  width: var(--person-width, 104px);
  height: var(--person-height, 176px);
  /* Person coordinates are foot contact points on the scene floor. */
  transform: translate(-50%, -100%);
  border-radius: 0;
  background: transparent;
  isolation: isolate;
}

.hotspot--person::before {
  display: block;
  z-index: 1;
  inset: auto 7% 0 7%;
  height: 9%;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,0.78), rgba(0,0,0,0.08) 72%, transparent 76%);
  filter: blur(4px);
  animation: none;
}

.hotspot--person > i { display: none; }

.hotspot--person .person-image {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  opacity: 0.94;
  filter: drop-shadow(0 11px 9px rgba(0,0,0,0.72)) brightness(0.66) saturate(0.72) contrast(1.09) sepia(0.05);
  transform: translateY(var(--person-foot-offset, 0%));
  transition: filter 0.2s ease, transform 0.2s ease;
}

.hotspot--person .person-reflection {
  position: absolute;
  z-index: 0;
  left: 14%;
  bottom: -38%;
  width: 72%;
  height: 54%;
  object-fit: contain;
  object-position: center bottom;
  opacity: 0.14;
  pointer-events: none;
  transform: scaleY(-1) perspective(80px) rotateX(24deg);
  transform-origin: center top;
  filter: blur(1.2px) brightness(0.48) saturate(0.45);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.78), transparent 75%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.78), transparent 75%);
}

.scene-view[data-location="hall"] .person-image,
.scene-view[data-location="sleeping"] .person-image,
.scene-view[data-location="ledger"] .person-image,
.scene-view[data-location="pharmacy"] .person-image { filter: drop-shadow(0 11px 9px rgba(0,0,0,0.78)) brightness(0.69) saturate(0.7) contrast(1.08) sepia(0.13); }
.scene-view[data-location="shrine"] .person-image,
.scene-view[data-location="cellar"] .person-image { filter: drop-shadow(0 12px 10px rgba(0,0,0,0.82)) brightness(0.58) saturate(0.63) contrast(1.13) sepia(0.08); }

.scene-view[data-location="ledger"] .hotspot--person { pointer-events: none; }
.scene-view[data-location="ledger"] .hotspot--person::after {
  content: "";
  position: absolute;
  z-index: 5;
  inset: 12% 30% 0;
  pointer-events: auto;
  cursor: pointer;
}
.scene-view[data-location="ledger"] .hotspot--person span { pointer-events: auto; }

.scene-view[data-location="hall"] .person-reflection,
.scene-view[data-location="sleeping"] .person-reflection,
.scene-view[data-location="shrine"] .person-reflection,
.scene-view[data-location="ledger"] .person-reflection,
.scene-view[data-location="pharmacy"] .person-reflection,
.scene-view[data-location="cellar"] .person-reflection { display: none; }

.hotspot--person:hover .person-image,
.hotspot--person:focus-visible .person-image { opacity: 1; filter: drop-shadow(0 16px 15px #000) brightness(0.9) saturate(0.86) contrast(1.05); transform: translateY(var(--person-foot-offset, 0%)); }
.hotspot--person.reacting .person-image { animation: person-reaction-confirm 1.25s cubic-bezier(.2,.72,.25,1) 2; }
.hotspot--person.reacting[data-reaction-tone="alarm"] .person-image,
.hotspot--person.reacting[data-reaction-tone="exposed"] .person-image { animation-name: person-reaction-alarm; }
.hotspot--person.reacting[data-reaction-tone="defensive"] .person-image,
.hotspot--person.reacting[data-reaction-tone="guarded"] .person-image { animation-name: person-reaction-guarded; }

@keyframes person-reaction-confirm {
  0%, 100% { transform: translateY(var(--person-foot-offset, 0%)) rotate(0); }
  35% { transform: translateY(calc(var(--person-foot-offset, 0%) + 1.5%)) rotate(-0.8deg); }
  68% { transform: translateY(var(--person-foot-offset, 0%)) rotate(0.45deg); }
}
@keyframes person-reaction-alarm {
  0%, 100% { transform: translateY(var(--person-foot-offset, 0%)) translateX(0) rotate(0); }
  26% { transform: translateY(calc(var(--person-foot-offset, 0%) - 1%)) translateX(-3.5%) rotate(-1.4deg); }
  62% { transform: translateY(var(--person-foot-offset, 0%)) translateX(1.2%) rotate(0.5deg); }
}
@keyframes person-reaction-guarded {
  0%, 100% { transform: translateY(var(--person-foot-offset, 0%)) rotate(0); }
  35% { transform: translateY(calc(var(--person-foot-offset, 0%) + 0.8%)) rotate(1.2deg); }
  70% { transform: translateY(var(--person-foot-offset, 0%)) rotate(0.2deg); }
}

.hotspot--person span,
.hotspot--person:hover span,
.hotspot--person:focus-visible span {
  z-index: 4;
  top: calc(var(--person-head-top, 0%) + var(--person-foot-offset, 0%));
  bottom: auto;
  padding: 4px 7px;
  border-color: rgba(198, 175, 124, 0.46);
  background: rgba(5,7,6,0.92);
  box-shadow: 0 5px 14px rgba(0,0,0,0.44);
  white-space: nowrap;
  opacity: 1;
  transform: translateX(-50%) translateY(calc(-100% - var(--person-label-gap, 4px)));
}

.hotspot--evidence {
  width: 76px;
  height: 76px;
  border: 1px solid rgba(212, 178, 106, 0.48);
  border-radius: 4px;
  background: #11130f;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

.hotspot--evidence::before { inset: -5px; border-radius: 5px; }

.hotspot--evidence > i.evidence-thumb {
  inset: 3px;
  border: 0;
  border-radius: 2px;
  background-repeat: no-repeat;
  background-size: contain !important;
  box-shadow: none;
  filter: brightness(0.76) saturate(0.82) sepia(0.06);
}

.hotspot--evidence:hover > i.evidence-thumb,
.hotspot--evidence:focus-visible > i.evidence-thumb { filter: brightness(1) saturate(0.95); }

.hotspot--evidence span { bottom: 84px; }

.toast {
  position: fixed;
  z-index: 52;
  left: 50%;
  top: 17%;
  min-width: 260px;
  max-width: min(560px, calc(100% - 30px));
  padding: 12px 18px;
  transform: translate(-50%, -14px);
  border-top: 1px solid var(--bronze);
  border-bottom: 1px solid var(--bronze);
  text-align: center;
  background: rgba(6,8,7,0.94);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast strong { color: #d4ad62; }

.case-transition { position: fixed; z-index: 82; left: 50%; top: 92px; width: min(590px, calc(100% - 40px)); opacity: 0; transform: translate(-50%, -12px); transition: opacity .2s ease, transform .24s ease; pointer-events: none; }
.case-transition.show { opacity: 1; transform: translate(-50%, 0); }
.case-transition__inner { display: grid; grid-template-columns: 28px minmax(0,1fr) 30px; gap: 10px; align-items: start; padding: 12px 13px; border: 1px solid rgba(201,181,136,.26); border-left: 4px solid #638b79; background: rgba(7,10,8,.96); box-shadow: 0 16px 44px rgba(0,0,0,.58); pointer-events: auto; }
.case-transition__inner > svg { width: 23px; height: 23px; color: #81a38f; }
.case-transition__inner > div { min-width: 0; display: grid; gap: 3px; }
.case-transition__inner small { color: #819d8f; font-size: 8px; }
.case-transition__inner strong { color: #ddc89f; font-size: 13px; font-weight: 600; }
.case-transition__inner p { margin: 2px 0; color: #b3aa97; font-size: 9px; line-height: 1.55; }
.case-transition__inner span { color: #a88e60; font-size: 8px; line-height: 1.45; }
.case-transition__inner .icon-button { width: 28px; min-width: 28px; height: 28px; }

@media (min-width: 761px) {
  .toast {
    left: auto;
    right: 22px;
    top: 86px;
    max-width: min(560px, calc(100% - 320px));
    transform: translateY(-14px);
  }
  .toast.show { transform: translateY(0); }
}

.whisper {
  position: fixed;
  z-index: 22;
  right: 7%;
  top: 42%;
  max-width: 330px;
  color: rgba(213,219,208,0.78);
  font-size: 16px;
  font-style: italic;
  line-height: 1.9;
  text-shadow: 0 2px 12px #000;
  opacity: 0;
  transform: translateX(18px);
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.whisper.show { opacity: 1; transform: none; }

.inspect-card {
  position: fixed;
  z-index: 38;
  left: 50%;
  bottom: 78px;
  width: min(650px, calc(100% - 32px));
  max-height: calc(100vh - 110px);
  padding: 22px 24px;
  overflow-y: auto;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-top: 2px solid var(--bronze);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: 0 22px 70px rgba(0,0,0,0.7);
}
.inspect-viewer { position: relative; width: calc(100% + 48px); height: 252px; margin: -22px -24px 18px; overflow: hidden; border-bottom: 1px solid var(--line); background: #090a09; touch-action: none; }
.inspect-image { width: 100%; height: 100%; object-fit: contain; background: #090a09; filter: brightness(0.86) contrast(1.08) saturate(0.82); }
.inspect-image--scene { object-fit: cover; transform: scale(1.48); filter: brightness(0.72) contrast(1.12) saturate(0.78); }
.inspect-scan-layer { position: absolute; z-index: 2; inset: 0 0 30px; cursor: none; touch-action: none; }
.inspect-lens {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 102px;
  height: 102px;
  transform: translate(-50%, -50%) scale(0.86);
  border: 2px solid rgba(224,197,133,0.92);
  border-radius: 50%;
  background-repeat: no-repeat;
  background-size: 245%;
  box-shadow: 0 0 0 999px rgba(2,3,3,0.08), inset 0 0 0 1px rgba(255,255,255,0.28), 0 9px 28px rgba(0,0,0,0.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.inspect-lens.active { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.inspect-markers { position: absolute; inset: 0; pointer-events: none; }
.inspect-markers i {
  position: absolute;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%) scale(0.3);
  border: 1px solid #9cc2ae;
  border-radius: 50%;
  background: rgba(82,121,107,0.72);
  box-shadow: 0 0 15px rgba(111,163,138,0.72);
  opacity: 0;
}
.inspect-markers i.found { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: inspect-found 0.5s ease-out both; }
.inspect-markers i.hinted:not(.found) {
  width: 58px;
  height: 58px;
  border: 1px dashed rgba(224,197,133,0.72);
  background: rgba(197,158,86,0.08);
  box-shadow: 0 0 24px rgba(197,158,86,0.28);
  opacity: 1;
  filter: blur(0.4px);
  animation: inspect-hint 1.2s ease-in-out infinite;
}
@keyframes inspect-found { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2.4); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes inspect-hint { 50% { transform: translate(-50%, -50%) scale(1.18); opacity: 0.52; } }
.inspect-hint { position: absolute; z-index: 4; top: 10px; left: 10px; width: 32px !important; min-width: 32px !important; height: 32px !important; background: rgba(6,8,7,0.82); }
.inspect-progress { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 30px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; padding: 0 12px; background: rgba(4,6,5,0.9); color: #aa9d80; font-size: 9px; }
.inspect-progress > i { height: 3px; overflow: hidden; background: rgba(255,255,255,0.12); }
.inspect-progress > i b { display: block; width: 0; height: 100%; background: #6f9b87; transition: width 0.3s ease; }
.inspect-progress em { color: #cdbb91; font-style: normal; }
.inspect-card > .icon-button { position: absolute; z-index: 6; top: 12px; right: 12px; }
.inspect-card > span { color: var(--paper-dim); font-size: 10px; letter-spacing: 0.15em; }
.inspect-card h2 { margin: 7px 0 10px; font-size: 22px; }
.inspect-card > p { margin: 0 0 12px; color: #bcb29b; font-size: 12px; line-height: 1.72; }
.inspect-findings { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.inspect-findings li { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 6px; padding: 8px 7px; border-top: 1px solid rgba(111,155,135,0.36); background: rgba(82,121,107,0.07); }
.inspect-findings li > span { color: #7fa58f; font-size: 9px; }
.inspect-findings li p { margin: 0; color: #bdb49f; font-size: 9.5px; line-height: 1.55; }
.inspect-conclusion { margin: 0 0 11px; padding: 9px 11px; border-left: 2px solid #7fa58f; background: rgba(82,121,107,0.1); }
.inspect-conclusion small { color: #7fa58f; font-size: 8px; }
.inspect-conclusion p { margin: 4px 0 0; color: #d3c7ad; font-size: 10.5px; line-height: 1.6; }
.inspect-reaction { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 10px; align-items: center; margin: 0 0 11px; padding: 7px 10px 7px 5px; border-top: 1px solid rgba(199,161,91,0.24); border-bottom: 1px solid rgba(199,161,91,0.18); background: rgba(6,8,7,0.52); }
.inspect-reaction img { width: 54px; height: 64px; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 5px 5px rgba(0,0,0,0.72)); }
.inspect-reaction small { display: block; color: #91866e; font-size: 8px; }
.inspect-reaction strong { display: block; margin-top: 2px; color: #d4c4a2; font-size: 11px; }
.inspect-reaction p { margin: 3px 0 0; color: #bdb39c; font-size: 9.5px; line-height: 1.55; }
.inspect-reaction--alarm, .inspect-reaction--exposed { border-left: 2px solid #a75046; }
.inspect-reaction--confirm { border-left: 2px solid #6f9b87; }
.inspect-actions { display: grid; grid-template-columns: minmax(90px,1fr) auto auto; align-items: center; gap: 7px; }
.inspect-actions > span { color: #8f846d; font-size: 9px; }
.inspect-actions button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.inspect-actions button svg { width: 14px; height: 14px; }

.story-mixer-button { position: fixed; z-index: 71; top: 18px; left: 64px; }
.story-reading-button { position: fixed; z-index: 71; top: 18px; left: 106px; }
body.game-started .story-mixer-button,
body.game-started .story-reading-button { display: none; }
.audio-mixer {
  position: fixed;
  z-index: 72;
  top: 74px;
  right: 22px;
  width: min(330px, calc(100% - 24px));
  padding: 14px;
  border: 1px solid rgba(191,157,94,0.36);
  border-top: 2px solid var(--bronze);
  border-radius: 4px;
  background: rgba(8,10,9,0.97);
  box-shadow: 0 24px 68px rgba(0,0,0,0.68);
}
body:not(.game-started) .audio-mixer { top: 64px; right: auto; left: 18px; }
.audio-mixer header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.audio-mixer header span small, .audio-mixer header span strong { display: block; }
.audio-mixer header small { color: #8f8269; font-size: 8px; }
.audio-mixer header strong { margin-top: 3px; color: #d7c7a3; font-size: 14px; font-weight: 500; }
.audio-mixer header .icon-button { width: 30px; min-width: 30px; height: 30px; }
.audio-mixer label { display: grid; grid-template-columns: 72px minmax(0,1fr) 38px; align-items: center; gap: 8px; min-height: 34px; border-top: 1px solid rgba(255,255,255,0.06); }
.audio-mixer label > span { display: flex; align-items: center; gap: 6px; color: #b6aa91; }
.audio-mixer label svg { width: 13px; height: 13px; color: #9d8757; }
.audio-mixer label b { font-size: 10px; font-weight: 500; }
.audio-mixer input[type="range"] { width: 100%; accent-color: #a94b40; cursor: pointer; }
.audio-mixer output { color: #9d927c; font-size: 9px; text-align: right; }
.audio-mixer footer { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 11px; }
.audio-mixer footer button { min-width: 0; min-height: 34px; padding: 7px; font-size: 9px; }
.audio-mixer footer svg { width: 13px; height: 13px; }

.reading-settings {
  position: fixed;
  z-index: 73;
  top: 74px;
  right: 22px;
  width: min(330px, calc(100% - 24px));
  padding: 14px;
  border: 1px solid rgba(111,155,135,0.42);
  border-top: 2px solid #6f9b87;
  border-radius: 4px;
  background: rgba(8,10,9,0.98);
  box-shadow: 0 24px 68px rgba(0,0,0,0.68);
}
body:not(.game-started) .reading-settings { top: 64px; right: auto; left: 18px; }
.reading-settings header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.reading-settings header span small, .reading-settings header span strong { display: block; }
.reading-settings header small { color: #789283; font-size: 8px; }
.reading-settings header strong { margin-top: 3px; color: #d7c7a3; font-size: 14px; font-weight: 500; }
.reading-settings header .icon-button { width: 30px; min-width: 30px; height: 30px; }
.reading-settings fieldset { margin: 0 0 8px; padding: 8px; border: 1px solid rgba(255,255,255,0.07); }
.reading-settings legend { padding: 0 5px; color: #948970; font-size: 8px; }
.reading-segments { display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; }
.reading-segments button { min-height: 32px; padding: 5px; border: 1px solid rgba(201,181,136,0.16); background: rgba(255,255,255,0.025); color: #a69b84; font-size: 9px; cursor: pointer; }
.reading-segments button.active { border-color: rgba(111,155,135,0.72); background: rgba(82,121,107,0.2); color: #e0d5bc; }
.reading-toggle { width: 100%; min-height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 7px 9px; border-top: 1px solid rgba(255,255,255,0.06); background: transparent; color: #b8ad96; cursor: pointer; }
.reading-toggle > span { display: flex; align-items: center; gap: 7px; }
.reading-toggle svg { width: 14px; height: 14px; color: #879d91; }
.reading-toggle b { font-size: 9px; font-weight: 500; }
.reading-toggle em { min-width: 34px; padding: 3px 5px; border: 1px solid rgba(201,181,136,.16); color: #8f8570; font-size: 8px; font-style: normal; text-align: center; }
.reading-toggle.active em { border-color: rgba(111,155,135,.62); background: rgba(82,121,107,.18); color: #bcd2c5; }
.reading-settings > p { margin: 8px 0 0; color: #817965; font-size: 8px; line-height: 1.55; }

.dialogue {
  position: fixed;
  z-index: 36;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(280px, 38%) 1fr;
  align-items: end;
  background: linear-gradient(90deg, rgba(2,3,3,0.9), rgba(2,3,3,0.12) 48%, rgba(2,3,3,0.68));
}

.dialogue__portrait {
  position: relative;
  height: 88vh;
  display: grid;
  align-items: end;
  justify-items: center;
  overflow: hidden;
}

.dialogue__portrait img {
  width: min(100%, 520px);
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 22px 34px rgba(0,0,0,0.86)) brightness(0.78) saturate(0.8) contrast(1.06) sepia(0.06);
  transform-origin: 50% 100%;
  animation: character-breath 5.6s ease-in-out infinite;
  will-change: transform, filter;
}

.dialogue.is-speaking .dialogue__portrait img {
  animation: character-performance 720ms cubic-bezier(0.2, 0.72, 0.25, 1) both;
}
.dialogue.is-speaking[data-performance="noble-restraint"] .dialogue__portrait img { animation: performance-noble-restraint 1080ms cubic-bezier(0.2, 0.68, 0.28, 1) both; }
.dialogue.is-speaking[data-performance="matriarch-command"] .dialogue__portrait img { animation: performance-matriarch-command 760ms cubic-bezier(0.14, 0.82, 0.2, 1) both; }
.dialogue.is-speaking[data-performance="steward-calculation"] .dialogue__portrait img { animation: performance-steward-calculation 1240ms cubic-bezier(0.22, 0.58, 0.32, 1) both; }
.dialogue.is-speaking[data-performance="scholar-rebuttal"] .dialogue__portrait img { animation: performance-scholar-rebuttal 880ms cubic-bezier(0.14, 0.78, 0.22, 1) both; }
.dialogue.is-speaking[data-performance="monk-grounding"] .dialogue__portrait img { animation: performance-monk-grounding 1460ms cubic-bezier(0.26, 0.56, 0.32, 1) both; }
.dialogue.is-speaking[data-performance="guard-readiness"] .dialogue__portrait img { animation: performance-guard-readiness 660ms cubic-bezier(0.1, 0.86, 0.16, 1) both; }
.dialogue.is-speaking[data-performance="maid-alarm"] .dialogue__portrait img { animation: performance-maid-alarm 820ms cubic-bezier(0.12, 0.76, 0.2, 1) both; }
.dialogue.is-speaking[data-performance="eunuch-restraint"] .dialogue__portrait img { animation: performance-eunuch-restraint 1160ms cubic-bezier(0.24, 0.62, 0.3, 1) both; }
.dialogue.is-speaking[data-performance="coroner-demonstration"] .dialogue__portrait img { animation: performance-coroner-demonstration 1040ms cubic-bezier(0.18, 0.7, 0.26, 1) both; }
.dialogue.is-speaking[data-performance="labourer-recollection"] .dialogue__portrait img { animation: performance-labourer-recollection 940ms cubic-bezier(0.16, 0.72, 0.24, 1) both; }
.dialogue.is-speaking[data-speech-tone="angry"] .dialogue__portrait img,
.dialogue.is-speaking[data-speech-tone="defensive"] .dialogue__portrait img { filter: drop-shadow(0 22px 34px rgba(0,0,0,0.86)) brightness(0.86) saturate(0.9) contrast(1.1) sepia(0.04); }
.dialogue.is-speaking[data-speech-tone="frightened"] .dialogue__portrait img,
.dialogue.is-speaking[data-speech-tone="exposed"] .dialogue__portrait img { filter: drop-shadow(0 22px 38px rgba(0,0,0,0.9)) brightness(0.72) saturate(0.7) contrast(1.08); }

@keyframes character-breath { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-2px) scale(1.003); } }
@keyframes character-performance {
  from { transform: translate(0,0) rotate(0) scale(1); }
  to { transform: translate(var(--performance-x, 0), var(--performance-y, 0)) rotate(var(--performance-rotate, 0)) scale(var(--performance-scale, 1)); }
}

@keyframes performance-noble-restraint {
  0% { transform: translate(0,0) rotate(0) scale(1); }
  38% { transform: translateY(-5px) rotate(-0.12deg) scale(1.004); }
  100% { transform: translate(var(--performance-x, 0), var(--performance-y, 0)) rotate(var(--performance-rotate, 0)) scale(var(--performance-scale, 1)); }
}

@keyframes performance-matriarch-command {
  0% { transform: translate(0,0) rotate(0) scale(1); }
  24% { transform: translateX(3px) scale(1.008); }
  58% { transform: translate(-8px,-6px) rotate(-0.32deg) scale(1.018); }
  100% { transform: translate(var(--performance-x, 0), var(--performance-y, 0)) rotate(var(--performance-rotate, 0)) scale(var(--performance-scale, 1)); }
}

@keyframes performance-steward-calculation {
  0% { transform: translate(0,0) rotate(0) scale(1); }
  34% { transform: translate(-6px,1px) rotate(-0.3deg) scale(0.998); }
  68% { transform: translate(-2px,-2px) rotate(0.12deg) scale(1.002); }
  100% { transform: translate(var(--performance-x, 0), var(--performance-y, 0)) rotate(var(--performance-rotate, 0)) scale(var(--performance-scale, 1)); }
}

@keyframes performance-scholar-rebuttal {
  0% { transform: translate(0,0) rotate(0) scale(1); }
  30% { transform: translate(8px,-2px) rotate(0.34deg) scale(1.01); }
  62% { transform: translate(3px,1px) rotate(-0.12deg) scale(1.003); }
  100% { transform: translate(var(--performance-x, 0), var(--performance-y, 0)) rotate(var(--performance-rotate, 0)) scale(var(--performance-scale, 1)); }
}

@keyframes performance-monk-grounding {
  0% { transform: translate(0,0) rotate(0) scale(1); }
  45% { transform: translateY(4px) scale(0.997); }
  76% { transform: translateY(1px) scale(1.001); }
  100% { transform: translate(var(--performance-x, 0), var(--performance-y, 0)) rotate(var(--performance-rotate, 0)) scale(var(--performance-scale, 1)); }
}

@keyframes performance-guard-readiness {
  0% { transform: translate(0,0) rotate(0) scale(1); }
  22% { transform: translate(7px,-7px) rotate(0.42deg) scale(1.016); }
  52% { transform: translate(4px,-3px) rotate(0.12deg) scale(1.009); }
  100% { transform: translate(var(--performance-x, 0), var(--performance-y, 0)) rotate(var(--performance-rotate, 0)) scale(var(--performance-scale, 1)); }
}

@keyframes performance-maid-alarm {
  0% { transform: translate(0,0) rotate(0) scale(1); }
  24% { transform: translate(-9px,4px) rotate(-0.5deg) scale(0.988); }
  52% { transform: translate(-5px,1px) rotate(0.18deg) scale(0.994); }
  74% { transform: translate(-7px,2px) rotate(-0.16deg) scale(0.992); }
  100% { transform: translate(var(--performance-x, 0), var(--performance-y, 0)) rotate(var(--performance-rotate, 0)) scale(var(--performance-scale, 1)); }
}

@keyframes performance-eunuch-restraint {
  0% { transform: translate(0,0) rotate(0) scale(1); }
  38% { transform: translate(-5px,2px) rotate(-0.22deg) scale(0.997); }
  72% { transform: translate(-2px,-1px) rotate(0.1deg) scale(1.001); }
  100% { transform: translate(var(--performance-x, 0), var(--performance-y, 0)) rotate(var(--performance-rotate, 0)) scale(var(--performance-scale, 1)); }
}

@keyframes performance-coroner-demonstration {
  0% { transform: translate(0,0) rotate(0) scale(1); }
  36% { transform: translate(5px,-3px) rotate(0.16deg) scale(1.006); }
  68% { transform: translate(7px,-1px) rotate(0.08deg) scale(1.004); }
  100% { transform: translate(var(--performance-x, 0), var(--performance-y, 0)) rotate(var(--performance-rotate, 0)) scale(var(--performance-scale, 1)); }
}

@keyframes performance-labourer-recollection {
  0% { transform: translate(0,0) rotate(0) scale(1); }
  32% { transform: translate(-8px,3px) rotate(-0.34deg) scale(0.996); }
  64% { transform: translate(-3px,-2px) rotate(0.2deg) scale(1.006); }
  100% { transform: translate(var(--performance-x, 0), var(--performance-y, 0)) rotate(var(--performance-rotate, 0)) scale(var(--performance-scale, 1)); }
}

@keyframes performance-pei-command {
  0% { transform: translate(0,0) rotate(0) scale(1); }
  30% { transform: translate(8px,-6px) rotate(0.28deg) scale(1.014); }
  100% { transform: translate(var(--performance-x, 0), var(--performance-y, 0)) rotate(var(--performance-rotate, 0)) scale(var(--performance-scale, 1)); }
}

@keyframes performance-pei-restraint {
  0% { transform: translate(0,0) rotate(0) scale(1); }
  42% { transform: translateY(-3px) rotate(-0.1deg) scale(1.003); }
  100% { transform: translate(var(--performance-x, 0), var(--performance-y, 0)) rotate(var(--performance-rotate, 0)) scale(var(--performance-scale, 1)); }
}

@keyframes performance-pei-deadline {
  0% { transform: translate(0,0) rotate(0) scale(1); }
  20% { transform: translate(10px,-8px) rotate(0.4deg) scale(1.02); }
  48% { transform: translate(5px,-4px) rotate(0.12deg) scale(1.012); }
  100% { transform: translate(var(--performance-x, 0), var(--performance-y, 0)) rotate(var(--performance-rotate, 0)) scale(var(--performance-scale, 1)); }
}

.dialogue__body {
  min-height: 278px;
  margin: 0 4% 5% 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-top: 2px solid rgba(168,129,67,0.65);
  border-radius: 4px;
  background: rgba(8,10,9,0.96);
  box-shadow: 0 24px 80px #000;
}

.dialogue__meta { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.dialogue__meta strong { display: block; margin-top: 4px; color: #dccaa4; font-size: 21px; }
.composure { min-width: 130px; text-align: right; }
.composure i { width: 124px; }
.composure b { width: 100%; background: var(--jade); }
.composure b.broken { background: var(--vermilion-bright); }
.interview-meters { display: flex; gap: 12px; }
.patience-meter { min-width: 130px; text-align: right; }
.patience-meter em { color: #c9b17d; font-size: 9px; font-style: normal; letter-spacing: 0; }
.patience-meter i { width: 124px; }
.patience-meter b { width: 100%; background: #b89456; }
.patience-meter b.impatient { background: var(--vermilion-bright); }
.dialogue__body > p { min-height: 52px; margin: 19px 0; color: #d0c4aa; font-size: 14px; line-height: 1.9; }
.speech-progress { height: 2px; margin: -12px 0 14px; overflow: hidden; background: rgba(201,181,136,0.09); }
.speech-progress i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #6f9c89, #c7a45f); transition: width 0.16s linear; }
.dialogue.is-speaking .speech-progress { box-shadow: 0 0 12px rgba(111,156,137,0.18); }
.dialogue__body > .testimony-note { min-height: 0; margin: -10px 0 12px; padding: 7px 9px; border-left: 2px solid #b89456; color: #c9b17d; background: rgba(184,148,83,0.08); font-size: 10px; line-height: 1.6; }
.interview-approach { display: flex; align-items: center; gap: 4px; margin: 0 0 8px; }
.interview-approach > span { margin-right: 4px; color: #8f8775; font-size: 9px; }
.interview-approach button { min-height: 27px; padding: 4px 10px; border: 1px solid rgba(201,181,136,0.18); border-radius: 2px; color: #9b917d; background: rgba(255,255,255,0.018); font-size: 9px; cursor: pointer; }
.interview-approach button.active { border-color: rgba(111,156,137,0.7); color: #d6c6a5; background: rgba(82,121,107,0.16); box-shadow: inset 0 -2px #52796b; }
.dialogue__options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.dialogue__options button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(201,181,136,0.18);
  border-radius: 2px;
  background: rgba(255,255,255,0.025);
  text-align: left;
  font-size: 11px;
  cursor: pointer;
}
.dialogue__options button:hover { border-color: rgba(209,90,73,0.58); background: rgba(158,51,42,0.15); }
.dialogue__options button.used { opacity: 0.48; }
.dialogue__options button.variant-focus { opacity: 0.82; border-color: rgba(184,148,83,0.62); box-shadow: inset 3px 0 #b89456; }
.dialogue__options button.confront { color: #d4af6d; border-color: rgba(168,129,67,0.44); }
.dialogue__options button.attitude-withheld { color: #c58a7c; border-color: rgba(158,51,42,0.52); box-shadow: inset 3px 0 rgba(158,51,42,0.7); }
.dialogue__options button.leave { color: var(--paper-dim); }
.dialogue__options button.patience-locked { opacity: 0.48; cursor: not-allowed; }
.dialogue__options button.approach-incompatible { opacity: 0.34; cursor: not-allowed; }
.dialogue__options .person-quest { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; border-color: rgba(184,148,83,0.44); color: #d3b474; }
.dialogue__options .person-quest svg { flex: 0 0 18px; width: 18px; }
.dialogue__options .person-quest span { display: grid; gap: 3px; }
.dialogue__options .person-quest small { color: var(--paper-dim); font-size: 9px; line-height: 1.5; }
.dialogue__options .person-quest.quest-scope-card--responsibility { border-left: 3px solid rgba(184,148,83,.82); background: rgba(168,129,67,.055); }
.dialogue__options .person-quest.quest-scope-card--completion { border-left: 3px solid rgba(82,121,107,.78); border-color: rgba(82,121,107,.38); color: #9eb9ad; background: rgba(82,121,107,.045); }
.dialogue__options .person-quest .quest-scope { color: #b99a63; font-size: 8px; font-weight: 600; }
.dialogue__options .person-quest .quest-scope--completion { color: #7fa493; }
.dialogue__options .person-quest.complete { border-color: rgba(82,121,107,0.62); color: #91b7a8; }
.patience-notice { grid-column: 1 / -1; margin: 0; padding: 8px 10px; border-left: 2px solid var(--vermilion); color: #c49c81; background: rgba(158,51,42,0.08); font-size: 10px; line-height: 1.6; }
.dialogue__close { position: absolute; z-index: 4; top: 18px; right: 18px; }

.panel,
.modal-stage {
  position: fixed;
  z-index: 45;
  inset: 0;
  background: rgba(4,5,5,0.94);
  backdrop-filter: blur(6px);
}

.panel { padding: 42px 5%; overflow: auto; }
.panel::before { content: ""; position: fixed; inset: 14px; border: 1px solid rgba(175,143,86,0.18); pointer-events: none; }
.panel__header { position: relative; display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.panel__header h2 { margin: 5px 0 0; font-size: 32px; letter-spacing: 0; }

.evidence-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.evidence-card {
  min-height: 242px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255,255,255,0.018);
}
.evidence-card.locked { opacity: 0.32; filter: grayscale(1); }
.evidence-card__image {
  position: relative;
  height: 112px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background-color: #121512;
}
.evidence-card__image img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 180ms ease; }
.evidence-card__image.is-ready img { opacity: 1; }
.evidence-card__image.is-loading::after,
.evidence-card__image.is-error::after {
  grid-area: 1 / 1;
  z-index: 1;
  padding: 5px 8px;
  border: 1px solid rgba(201,177,125,0.18);
  color: #8f846d;
  background: rgba(6,8,7,0.8);
  font-size: 9px;
  letter-spacing: 0;
}
.evidence-card__image.is-loading::after { content: "调取证物影像"; }
.evidence-card__image.is-error::after { content: "证物影像载入失败"; color: #c98576; }
.evidence-card.locked .evidence-card__image { background: linear-gradient(135deg, #171917, #080908); }
.evidence-card__copy { position: relative; padding: 14px; }
.evidence-card .number { color: var(--vermilion-bright); font-size: 10px; }
.evidence-card .tag { position: absolute; top: 14px; right: 14px; color: #8e8065; font-size: 10px; }
.evidence-card h3 { margin: 8px 0 7px; font-size: 15px; }
.evidence-card p { margin: 0; color: var(--paper-dim); font-size: 10px; line-height: 1.7; }
.evidence-card__reading { display: grid; gap: 4px; }
.evidence-card__reading small { color: #9e8b62; font-size: 7.5px; letter-spacing: .03em; }
.evidence-card__reading span { color: var(--paper-dim); }
.evidence-card--reasoning-contested .evidence-card__reading { padding-left: 8px; border-left: 2px solid rgba(178,139,71,.7); }
.evidence-card--reasoning-resolved .evidence-card__reading { padding-left: 8px; border-left: 2px solid rgba(99,138,120,.75); }
.evidence-card--reasoning-resolved .evidence-card__reading small { color: #8db09f; }
.evidence-card--reasoning-resolved .evidence-card__reading span { color: #c0d0c5; }
.evidence-authenticity { display: grid; gap: 3px; margin-top: 10px; padding: 8px 9px; border-left: 2px solid #8e7952; background: rgba(168,129,67,.07); }
.evidence-authenticity small { color: #b3955d; font-size: 7.5px; }
.evidence-authenticity b { color: #cfbd99; font-size: 9px; font-weight: 500; line-height: 1.5; }
.evidence-authenticity span { color: #8f8674; font-size: 7.5px; line-height: 1.45; }
.evidence-authenticity p { margin-top: 2px; color: #a99f8b; font-size: 8px; line-height: 1.55; }
.evidence-authenticity--contested { border-left-color: #b28b47; background: rgba(168,129,67,.11); }
.evidence-authenticity--false { border-left-color: #638a78; background: rgba(82,121,107,.1); }
.evidence-authenticity--false small { color: #8db09f; }
.evidence-authenticity--false b { color: #b8ccbf; text-decoration: line-through; text-decoration-color: rgba(177,88,72,.72); }
.panel__footer { position: relative; height: 50px; display: flex; align-items: center; justify-content: space-between; color: var(--paper-dim); font-size: 11px; }
.panel__footer strong { color: #c9b17d; }

.task-filters { position: relative; display: inline-flex; flex-wrap: wrap; align-items: center; margin: 0 0 14px; padding: 2px; border: 1px solid rgba(201,181,136,0.2); border-radius: 3px; background: rgba(6,8,7,0.7); }
.task-filters button { min-height: 30px; padding: 5px 13px; border: 0; border-right: 1px solid rgba(201,181,136,0.14); color: #918977; background: transparent; font-size: 10px; cursor: pointer; }
.task-filters button:last-child { border-right: 0; }
.task-filters button:hover { color: #d2c09a; }
.task-filters button.active { color: #ead8b3; background: rgba(168,129,67,0.18); box-shadow: inset 0 -2px #a88143; }
.case-recap { position: relative; display: grid; grid-template-columns: minmax(210px, 1.1fr) 1fr 1fr; gap: 12px; margin: 0 0 10px; padding: 11px 13px; border-left: 2px solid #52796b; background: rgba(82,121,107,0.075); }
.case-recap div, .case-recap p { margin: 0; }
.case-recap small { display: block; color: #80a393; font-size: 8px; }
.case-recap strong { display: block; margin-top: 4px; color: #d2c19f; font-size: 11px; font-weight: 500; line-height: 1.5; }
.case-recap p { color: #a9a18f; font-size: 9px; line-height: 1.55; }
.case-recap p b { display: block; margin-bottom: 2px; color: #b79559; font-size: 8px; font-weight: 500; }
.case-recap .case-recap__echo { grid-column: 1 / -1; padding-top: 7px; border-top: 1px solid rgba(201,181,136,.13); color: #9fb3a8; }
.case-recap .case-recap__echo b { display: inline; margin-right: 7px; color: #82a594; }
.case-recap .case-recap__latest { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.8fr); gap: 8px; align-items: baseline; padding-top: 7px; border-top: 1px solid rgba(201,181,136,.13); color: #b9ad91; }
.case-recap .case-recap__latest b { display: inline; margin: 0; color: #d0ae6b; }
.case-recap .case-recap__latest span { color: #d4c39d; }
.case-recap .case-recap__latest em { color: #9fb3a8; font-style: normal; }
.task-list { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.task-list__focus { grid-column: 1 / -1; display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 8px 11px; border-left: 2px solid #a88143; background: rgba(168,129,67,0.075); }
.task-list__focus svg { width: 17px; color: #c5a15f; }
.task-list__focus span { display: grid; gap: 2px; }
.task-list__focus b { color: #d6c297; font-size: 10px; font-weight: 500; }
.task-list__focus small { color: #918977; font-size: 8px; }
.task-list__focus--optional { border-left-color: #52796b; background: rgba(82,121,107,.075); }
.task-list__focus--optional svg { color: #7fa493; }
.task-list__section { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 3px; padding: 7px 10px; border-top: 1px solid rgba(82,121,107,.32); color: #8da798; background: rgba(82,121,107,.045); }
.task-list__section[data-scope="main"] { border-top-color: rgba(176,76,62,.48); color: #c17a6d; background: rgba(126,45,37,.045); }
.task-list__section[data-scope="responsibility"] { border-top-color: rgba(184,148,83,.56); color: #b99a63; background: rgba(168,129,67,.05); }
.task-list__section b { font-size: 9px; font-weight: 500; }
.task-list__section small { color: #827d70; font-size: 7.5px; text-align: right; }
.task-list__empty { grid-column: 1 / -1; min-height: 180px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 24px; border: 1px dashed rgba(201,181,136,0.22); color: #978e7c; text-align: center; }
.task-list__empty svg { width: 24px; color: var(--jade); }
.task-list__empty strong { color: #cdbb96; font-size: 15px; }
.task-list__empty p { max-width: 440px; margin: 0; font-size: 10px; line-height: 1.7; }
.task-item {
  min-height: 118px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255,255,255,0.018);
}
.task-item.complete { border-color: rgba(82,121,107,0.66); background: rgba(82,121,107,0.08); }
.task-item.focus { border-color: rgba(168,129,67,0.56); background: rgba(168,129,67,0.065); box-shadow: inset 2px 0 rgba(168,129,67,0.8); }
.task-item--main:not(.complete) { border-left: 3px solid rgba(176,76,62,.72); }
.task-item--responsibility:not(.complete) { border-left: 3px solid rgba(184,148,83,.78); background: rgba(168,129,67,.035); }
.task-item.completion-only { border-color: rgba(82,121,107,.32); background: rgba(82,121,107,.035); }
.task-item.completion-only small { color: #789487; }
.task-item.focus > svg { color: #c7a45f; }
.task-item.undiscovered { opacity: 0.5; filter: grayscale(0.72); }
.task-item__index { color: var(--vermilion-bright); font-size: 11px; }
.task-item small { color: #9c8965; font-size: 9px; letter-spacing: 0.14em; }
.task-item h3 { margin: 5px 0; font-size: 15px; }
.task-item p { margin: 0; color: var(--paper-dim); font-size: 10px; line-height: 1.6; }
.task-item svg { width: 19px; color: var(--jade); }
.task-item__enter { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(168,129,67,0.58); border-radius: 3px; color: #d7c399; background: rgba(168,129,67,0.1); cursor: pointer; transition: border-color 160ms ease, color 160ms ease, background 160ms ease; }
.task-item__enter:hover, .task-item__enter:focus-visible { border-color: rgba(209,174,105,0.9); color: #f0d9aa; background: rgba(168,129,67,0.22); outline: none; }
.task-item__enter:disabled { opacity: 0.46; cursor: wait; }
.task-item__enter svg { width: 17px; height: 17px; color: currentColor; }

.residue-board { display: grid; gap: 5px; width: min(760px, 100%); margin: 0 auto; }
.residue-board__head, .residue-row { display: grid; grid-template-columns: minmax(110px, 1.05fr) repeat(3, minmax(100px, 1fr)); align-items: stretch; gap: 5px; }
.residue-board__head { padding: 0 5px 5px; color: #968b75; font-size: 9px; text-align: center; }
.residue-board__head span { text-align: left; }
.residue-row { padding: 5px; border: 1px solid rgba(201,181,136,0.16); background: rgba(255,255,255,0.018); }
.residue-row > strong { display: flex; align-items: center; padding: 7px 9px; color: #d3c19b; font-size: 12px; font-weight: 500; }
.residue-row button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 5px 7px; border: 1px solid rgba(201,181,136,0.17); border-radius: 2px; color: #958c7a; background: rgba(8,10,9,0.62); font-size: 9px; cursor: pointer; }
.residue-row button:hover { border-color: rgba(168,129,67,0.58); color: #d5c29a; }
.residue-row button.selected { border-color: rgba(82,121,107,0.82); color: #d8c9a9; background: rgba(82,121,107,0.18); }
.residue-row button svg { width: 14px; height: 14px; color: #6f9c89; }

.route-reenactment { position: relative; width: min(760px, 100%); aspect-ratio: 16 / 7.8; margin: 0 auto; overflow: hidden; border: 1px solid rgba(201,181,136,0.28); border-radius: 3px; background: #0a0d0c; }
.route-reenactment svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.route-reenactment svg path { fill: none; stroke: rgba(201,181,136,0.12); stroke-width: 0.45; vector-effect: non-scaling-stroke; }
.route-reenactment svg polyline { fill: none; stroke: #a94f43; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgba(209,90,73,0.45)); }
.route-reenactment > button { position: absolute; z-index: 2; left: var(--route-x); top: var(--route-y); min-width: 88px; min-height: 42px; display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 4px; padding: 5px 7px; transform: translate(-50%,-50%); border: 1px solid rgba(201,181,136,0.3); border-radius: 2px; color: #aaa18d; background: rgba(7,9,8,0.94); font-size: 9px; cursor: pointer; }
.route-reenactment > button b { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid rgba(201,181,136,0.25); border-radius: 50%; color: #d8c49a; font-size: 9px; }
.route-reenactment > button.selected { border-color: rgba(209,90,73,0.78); color: #e0cca3; background: rgba(105,34,29,0.78); }
.route-reenactment > button.selected b { border-color: #cf6254; background: #8d3e35; }
.route-reenactment > button:disabled:not(.selected) { opacity: 0.4; }
.route-reenactment__trail { position: absolute; z-index: 3; left: 10px; right: 10px; bottom: 7px; padding: 5px 8px; color: #c4b28e; background: rgba(5,7,6,0.88); font-size: 9px; text-align: center; pointer-events: none; }
.route-reenactment-reset { margin-top: 7px; }

.deduction__status { position: relative; display: flex; justify-content: space-between; color: var(--paper-dim); font-size: 11px; }
.court-gate-status { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; margin: 9px 0 0; }
.court-gate-status > div { min-width: 0; display: grid; gap: 3px; padding: 8px 10px; border-left: 3px solid rgba(176,76,62,.75); background: rgba(126,45,37,.055); }
.court-gate-status > div[data-scope="responsibility"] { border-left-color: rgba(184,148,83,.86); background: rgba(168,129,67,.055); }
.court-gate-status > div[data-scope="completion"] { border-left-color: rgba(82,121,107,.82); background: rgba(82,121,107,.06); }
.court-gate-status small { color: #a98e61; font-size: 7.5px; }
.court-gate-status strong { color: #d3c09a; font-size: 9px; font-weight: 600; }
.court-gate-status span { color: #918978; font-size: 7.5px; line-height: 1.45; }
.court-gate-status.ready > div:not([data-scope="completion"]) { border-left-color: rgba(82,121,107,.92); background: rgba(82,121,107,.085); }
.deduction-workbench {
  position: relative;
  height: clamp(280px, 32vw, 440px);
  margin: 12px 0 9px;
  overflow: hidden;
  border: 1px solid rgba(201,181,136,0.28);
  border-radius: 4px;
  background: #090b0a url('/assets/deduction-desk-4k.webp') center 58% / cover no-repeat;
  box-shadow: inset 0 0 0 999px rgba(2,4,4,0.14), inset 0 0 58px rgba(0,0,0,0.64);
}
.deduction-workbench > button {
  position: absolute;
  z-index: 2;
  left: var(--note-x);
  top: var(--note-y);
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(201,181,136,0.42);
  border-radius: 2px;
  color: #c8b995;
  background: rgba(7,9,8,0.9);
  box-shadow: 0 5px 18px rgba(0,0,0,0.54);
  font-size: 9px;
  white-space: nowrap;
  cursor: pointer;
}
.deduction-workbench > button:hover,
.deduction-workbench > button[aria-pressed="true"] { border-color: rgba(186,79,65,0.82); color: #ead2a4; background: rgba(87,31,27,0.9); }
.deduction-workbench > button svg { width: 14px; height: 14px; color: #b85b4e; }
.deduction-workbench__copy {
  position: absolute;
  z-index: 3;
  left: 21%;
  right: 21%;
  bottom: 13px;
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px 14px;
  border-top: 1px solid rgba(201,181,136,0.36);
  border-bottom: 1px solid rgba(201,181,136,0.18);
  color: #aaa18d;
  background: rgba(5,7,6,0.91);
  text-align: center;
  box-shadow: 0 10px 35px rgba(0,0,0,0.48);
}
.deduction-workbench__copy small { color: #a68a5d; font-size: 8px; }
.deduction-workbench__copy strong { color: #dfcaa0; font-size: 13px; font-weight: 500; }
.deduction-workbench__copy p { margin: 0; color: #aaa18d; font-size: 9px; line-height: 1.55; }
.variant-hypothesis { position: relative; display: grid; grid-template-columns: minmax(190px, 0.9fr) minmax(360px, 1.7fr) auto; align-items: end; gap: 14px; margin: 12px 0 4px; padding: 12px 14px; border: 1px solid rgba(184,148,83,0.34); border-radius: 4px; background: rgba(184,148,83,0.045); }
.variant-hypothesis.resolved { border-color: rgba(82,121,107,0.6); background: rgba(82,121,107,0.07); }
.variant-hypothesis__copy { display: grid; gap: 4px; }
.variant-hypothesis__copy small { color: #a58d62; font-size: 8px; }
.variant-hypothesis__copy strong { color: #d8c49b; font-size: 13px; }
.variant-hypothesis__copy p { margin: 0; color: var(--paper-dim); font-size: 9px; line-height: 1.55; }
.archive-echo { display: grid; gap: 3px; margin-top: 5px; padding: 6px 7px; border-left: 2px solid rgba(82,121,107,.7); background: rgba(82,121,107,.075); }
.variant-hypothesis__copy .archive-echo small { color: #83a696; font-size: 7px; }
.variant-hypothesis__copy .archive-echo strong { color: #d0bd91; font-size: 9px; }
.variant-hypothesis__copy .archive-echo p { color: #aca390; font-size: 7.5px; line-height: 1.45; }
.variant-hypothesis__copy .archive-echo p b { display: block; margin-bottom: 2px; color: #a98c5b; font-size: 7px; font-weight: 500; }
.archive-echo > span { color: #778d82; font-size: 6.5px; line-height: 1.4; }
.testimony-classifiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.testimony-classifier { display: grid; gap: 4px; color: #c9b98f; font-size: 8px; }
.testimony-classifier.locked { opacity: 0.48; }
.testimony-classifier select { width: 100%; height: 29px; padding: 0 6px; border: 1px solid var(--line); border-radius: 2px; background: #101210; font-size: 8px; }
.testimony-classifier b { height: 29px; display: grid; place-items: center; border: 1px solid rgba(82,121,107,0.5); color: #91b7a8; background: rgba(82,121,107,0.08); font-size: 9px; }
.testimony-classifier em { height: 29px; display: grid; place-items: center; border: 1px dashed var(--line); color: var(--paper-dim); font-style: normal; }
.variant-hypothesis > button { min-width: 112px; }
.variant-hypothesis__seal { align-self: center; color: #91b7a8; font-size: 11px; }
.hidden-truth { position: relative; display: grid; grid-template-columns: minmax(210px, 0.82fr) minmax(460px, 1.8fr) auto; align-items: center; gap: 12px; margin: 7px 0; padding: 10px 13px; border: 1px solid rgba(126,83,132,0.5); border-radius: 4px; background: rgba(75,45,78,0.08); }
.hidden-truth.locked { opacity: 0.62; }
.hidden-truth.resolved { grid-template-columns: minmax(260px, 1.2fr) minmax(250px, .9fr) auto; border-color: rgba(82,121,107,0.64); background: rgba(82,121,107,0.075); }
.hidden-truth__copy { display: grid; gap: 3px; }
.hidden-truth__copy small { color: #a58b69; font-size: 8px; }
.hidden-truth__copy strong { color: #dcc69d; font-size: 12px; }
.hidden-truth__copy p { margin: 0; color: #a9a08e; font-size: 8px; line-height: 1.5; }
.hidden-truth__bench { min-width: 0; display: grid; gap: 5px; }
.hidden-truth__slots { display: grid; grid-template-columns: 1fr 18px 1fr; align-items: center; gap: 4px; }
.hidden-truth__slots > span { min-width: 0; min-height: 29px; display: grid; place-items: center; padding: 4px 7px; overflow: hidden; border: 1px dashed rgba(201,181,136,0.25); color: #8f8675; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.hidden-truth__slots > span.filled { border-style: solid; border-color: rgba(82,121,107,0.68); color: #cdbd9b; background: rgba(82,121,107,0.1); }
.hidden-truth__slots svg { width: 14px; color: #8f7660; }
.hidden-truth__evidence { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.hidden-truth__evidence button { flex: 0 0 auto; min-width: 74px; min-height: 30px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px; padding: 4px 6px; border: 1px solid rgba(201,181,136,0.17); border-radius: 2px; color: #9f9684; background: rgba(255,255,255,0.018); font-size: 7px; cursor: pointer; }
.hidden-truth__evidence button b { color: #a44c42; font-size: 7px; }
.hidden-truth__evidence button.selected { border-color: rgba(82,121,107,0.78); color: #ddcba6; background: rgba(82,121,107,0.17); }
.hidden-truth > button { min-width: 94px; }
.hidden-truth__seal { color: #91b7a8; font-size: 11px; }
.hidden-truth__archive { display: grid; gap: 4px; margin-top: 5px; min-width: 0; }
.hidden-truth__archive small { color: #8ca99b; font-size: 7px; }
.hidden-truth__archive > div { display: flex; gap: 4px; min-width: 0; }
.hidden-truth__archive span { min-width: 0; padding: 3px 5px; overflow: hidden; border: 1px solid rgba(201,181,136,.14); color: #777165; font-size: 6.5px; text-overflow: ellipsis; white-space: nowrap; }
.hidden-truth__archive span.found { border-color: rgba(82,121,107,.54); color: #a7beaf; background: rgba(82,121,107,.09); }
.hidden-truth__archive.complete > small { color: #c8ad70; }
.archive-completion { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 9px; margin-top: 7px; padding: 8px 9px; border: 1px solid rgba(184,148,83,.52); border-left: 3px solid rgba(184,148,83,.86); background: rgba(91,67,31,.14); }
.archive-completion__seal { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #a54a3f; border-radius: 50%; color: #d36d5d; font-size: 10px; font-weight: 600; box-shadow: inset 0 0 0 2px rgba(158,51,42,.16); }
.archive-completion__copy { min-width: 0; display: grid; gap: 3px; }
.archive-completion__copy small { color: #b99b65; font-size: 7px; }
.archive-completion__copy strong { color: #e0c994; font-size: 10px; }
.archive-completion__copy > p { margin: 1px 0 0; color: #aaa08c; font-size: 7px; line-height: 1.45; }
.archive-completion__layers { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 3px; }
.archive-completion__layers span { display: grid; gap: 1px; min-width: 0; padding: 3px 4px; overflow: visible; border: 1px solid rgba(201,181,136,.16); color: #c8b995; background: rgba(255,255,255,.018); white-space: normal; }
.archive-completion__layers em { color: #879d91; font-size: 6px; font-style: normal; }
.archive-completion__layers b { overflow-wrap: anywhere; font-size: 6.5px; font-weight: 500; }
.archive-comparison { margin-top: 5px; border-top: 1px solid rgba(201,181,136,.12); }
.archive-comparison > summary { display: flex; align-items: center; justify-content: space-between; gap: 7px; min-height: 34px; padding: 4px 0; color: #a99266; cursor: pointer; list-style: none; }
.archive-comparison > summary::-webkit-details-marker { display: none; }
.archive-comparison > summary > span { min-width: 0; display: grid; grid-template-columns: 14px minmax(0,auto) minmax(0,1fr); gap: 4px; align-items: center; }
.archive-comparison > summary svg { width: 13px; height: 13px; color: #a98b57; }
.archive-comparison > summary > svg { transition: transform .18s ease; }
.archive-comparison[open] > summary { color: #d0b579; }
.archive-comparison[open] > summary > svg { transform: rotate(180deg); }
.archive-comparison > summary b { font-size: 8px; }
.archive-comparison > summary small { min-width: 0; overflow: hidden; color: #807967; font-size: 6.5px; text-overflow: ellipsis; white-space: nowrap; }
.archive-comparison__grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; padding: 2px 0 4px; }
.archive-comparison__row { min-width: 0; display: grid; gap: 3px; padding: 5px; border: 1px solid rgba(201,181,136,.12); background: rgba(5,7,6,.38); }
.archive-comparison__row.is-found { border-color: rgba(126,163,143,.42); }
.archive-comparison__row header { display: flex; justify-content: space-between; gap: 4px; }
.archive-comparison__row header b { color: #d0bd91; font-size: 8px; }
.archive-comparison__row header em { color: #8b806d; font-size: 6px; font-style: normal; }
.archive-comparison__row.is-found header em { color: #8eb09d; }
.archive-comparison__row p { min-width: 0; margin: 0; color: #99907e; font-size: 6.5px; line-height: 1.4; overflow-wrap: anywhere; }
.archive-comparison__row p span { display: inline-block; min-width: 30px; margin-right: 3px; color: #a78b5c; }
.archive-comparison__note { margin: 2px 0 5px; color: #7e786b; font-size: 6.5px; line-height: 1.4; }

.deduction-secondary { margin: 6px 0 4px; border: 1px solid rgba(201,181,136,.13); background: rgba(5,7,6,.26); }
.deduction-secondary > summary { min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 4px 8px; color: #9d8a66; cursor: pointer; list-style: none; }
.deduction-secondary > summary::-webkit-details-marker { display: none; }
.deduction-secondary > summary > span { min-width: 0; display: grid; grid-template-columns: 15px auto minmax(0,1fr); gap: 4px; align-items: center; }
.deduction-secondary > summary svg { width: 13px; height: 13px; color: #9c8152; }
.deduction-secondary > summary > svg { transition: transform .18s ease; }
.deduction-secondary[open] > summary { border-bottom: 1px solid rgba(201,181,136,.12); color: #c2a873; }
.deduction-secondary[open] > summary > svg { transform: rotate(180deg); }
.deduction-secondary > summary b { font-size: 8px; }
.deduction-secondary > summary small { min-width: 0; overflow: hidden; color: #7f786a; font-size: 6.5px; text-overflow: ellipsis; white-space: nowrap; }
.deduction-secondary > .deduction-workbench { margin: 0; border: 0; }
.witness-support { display: grid; grid-template-columns: minmax(210px, .72fr) minmax(520px, 2fr); align-items: center; gap: 12px; margin: 8px 0; padding: 10px 13px; border: 1px solid rgba(184,148,83,.3); border-radius: 4px; background: rgba(184,148,83,.035); }
.witness-support.ready { border-color: rgba(82,121,107,.58); background: rgba(82,121,107,.06); }
.witness-support__copy { display: grid; gap: 3px; }
.witness-support__copy small { color: #a58d62; font-size: 8px; }
.witness-support__copy strong { color: #ddc6a0; font-size: 12px; }
.witness-support__copy p { margin: 0; color: var(--paper-dim); font-size: 8px; line-height: 1.45; }
.witness-support__list { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 4px; }
.witness-support__item { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 5px 6px; border-left: 2px solid rgba(158,51,42,.55); background: rgba(255,255,255,.025); }
.witness-support__item--verified, .witness-support__item--committed { border-left-color: rgba(82,121,107,.8); }
.witness-support__item b { overflow: hidden; color: #cdbd9b; font-size: 7.5px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.witness-support__item em { flex: 0 0 auto; color: #9c8965; font-size: 6.5px; font-style: normal; }
.witness-support__item--committed em { color: #91b7a8; }
.witness-support__item--withheld em { color: #c98576; }
.culpability-analysis { position: relative; display: grid; grid-template-columns: minmax(170px, .68fr) minmax(520px, 2.25fr) minmax(170px, .68fr) auto; align-items: center; gap: 10px; margin: 8px 0; padding: 11px 13px; border: 1px solid rgba(158,51,42,.42); border-radius: 4px; background: rgba(158,51,42,.055); }
.culpability-analysis.locked { opacity: .68; }
.culpability-analysis.resolved { grid-template-columns: 1.2fr 1fr auto; border-color: rgba(82,121,107,.62); background: rgba(82,121,107,.07); }
.culpability-analysis__copy, .culpability-analysis.resolved > div { display: grid; gap: 4px; }
.culpability-analysis small { color: #bd806f; font-size: 8px; }
.culpability-analysis strong { color: #ddc6a0; font-size: 12px; }
.culpability-analysis p { margin: 0; color: var(--paper-dim); font-size: 8.5px; line-height: 1.55; }
.culpability-board { min-width: 0; display: grid; gap: 5px; }
.culpability-roles { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 4px; }
.culpability-roles button { min-width: 0; min-height: 42px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; gap: 1px 5px; padding: 5px 7px; border: 1px solid rgba(201,181,136,.2); border-radius: 2px; color: #b8aa8d; background: rgba(7,9,8,.68); text-align: left; cursor: grab; }
.culpability-roles button small { grid-row: 1 / 3; width: 19px; height: 19px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(158,51,42,.56); border-radius: 50%; color: transparent; }
.culpability-roles button small::after { content: '责'; color: #c26b5d; font-size: 7px; }
.culpability-roles button b { min-width: 0; overflow: hidden; color: #d4c097; font-size: 8px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.culpability-roles button span { min-width: 0; overflow: hidden; color: #766f61; font-size: 6.5px; text-overflow: ellipsis; white-space: nowrap; }
.culpability-roles button.selected { border-color: rgba(184,148,83,.86); color: #ead4a6; background: rgba(117,84,34,.24); box-shadow: 0 0 0 1px rgba(184,148,83,.2); }
.culpability-roles button.assigned { border-color: rgba(82,121,107,.62); background: rgba(82,121,107,.08); }
.culpability-roles button:disabled { cursor: not-allowed; }
.culpability-candidates { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 4px; }
.culpability-candidates button { min-width: 0; min-height: 104px; display: grid; grid-template-rows: 64px auto auto minmax(17px,auto); justify-items: center; align-content: start; gap: 1px; padding: 4px; overflow: hidden; border: 1px solid rgba(201,181,136,.18); border-radius: 2px; color: #a8a08e; background: rgba(255,255,255,.018); cursor: pointer; }
.culpability-candidates button img { width: 100%; height: 64px; object-fit: contain; object-position: center top; filter: drop-shadow(0 4px 5px rgba(0,0,0,.66)) saturate(.84); pointer-events: none; }
.culpability-candidates button strong { color: #d2bd92; font-size: 8px; }
.culpability-candidates button small { color: #7e7768; font-size: 6px; }
.culpability-candidates button > span { width: 100%; padding-top: 2px; border-top: 1px solid rgba(201,181,136,.1); color: #777063; font-size: 5.8px; line-height: 1.25; overflow-wrap: anywhere; }
.culpability-candidates button.assigned { border-color: rgba(82,121,107,.72); background: rgba(82,121,107,.1); }
.culpability-analysis.placing-role .culpability-candidates button:not(:disabled),
.culpability-candidates button.drop-ready { border-color: rgba(123,171,148,.72); box-shadow: inset 0 0 0 1px rgba(123,171,148,.18); }
.culpability-candidates button.drop-ready { background: rgba(82,121,107,.18); box-shadow: inset 0 0 0 1px rgba(123,171,148,.38), 0 0 18px rgba(82,121,107,.2); }
.culpability-candidates button.assigned > span { color: #9eb9ab; }
.culpability-board__footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #8e8574; font-size: 7px; }
.culpability-board__footer button { min-height: 23px; padding: 2px 6px; font-size: 7px; }
.culpability-analysis > button { min-width: 105px; }
.culpability-analysis__seal { align-self: center; color: #91b7a8; font-size: 11px; }
.permission-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.permission-list li { display: grid; gap: 2px; padding-left: 6px; border-left: 2px solid rgba(184,148,83,.42); }
.permission-list strong { font-size: 8px; }
.permission-list span { color: var(--paper-dim); font-size: 7px; line-height: 1.35; }
.chain-grid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 18px 0; }
.chain {
  position: relative;
  min-height: 320px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255,255,255,0.018);
}
.chain.solved { border-color: rgba(82,121,107,0.68); box-shadow: inset 0 0 35px rgba(82,121,107,0.1); }
.chain.compared:not(.solved) { border-color: rgba(184,148,83,.52); }
.chain__index { color: var(--vermilion-bright); font-size: 10px; }
.chain h3 { margin: 9px 0 15px; font-size: 16px; }
.chain__result { min-height: 72px; color: var(--paper-dim); font-size: 10px; line-height: 1.7; }
.chain__comparison-result { min-height: 58px; margin: 0 0 8px; color: #b6a783; font-size: 8.5px; line-height: 1.55; }
.chain__comparison-result strong { display: block; margin-bottom: 3px; color: #91b7a8; }
.chain__guardrail { margin-top: 10px; padding: 8px 9px; border-left: 2px solid rgba(184,148,83,0.68); background: rgba(184,148,83,0.065); }
.chain__guardrail small { display: block; color: #b79a68; font-size: 7.5px; }
.chain__guardrail p { margin: 4px 0 0; color: #b6aa90; font-size: 8.5px; line-height: 1.55; }
.chain__comparison { display: grid; gap: 2px; }
.chain select { width: 100%; height: 38px; margin: 4px 0; padding: 0 8px; border: 1px solid var(--line); border-radius: 2px; background: #101210; font-size: 10px; }
.chain button { width: 100%; margin-top: 8px; }
.chain > svg { position: absolute; right: 17px; bottom: 17px; width: 25px; color: var(--jade); }
.deduction > .primary-button { position: relative; display: block; margin: 0 auto; }
.evidence-relation-overview { margin: 4px 0 14px; border: 1px solid rgba(201,181,136,.2); background: rgba(7,9,8,.5); }
.evidence-relation-overview > summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; cursor: pointer; list-style: none; }
.evidence-relation-overview > summary::-webkit-details-marker { display: none; }
.evidence-relation-overview > summary > span { min-width: 0; display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; gap: 1px 7px; }
.evidence-relation-overview > summary svg { grid-row: 1 / 3; width: 16px; height: 16px; color: #9c8153; }
.evidence-relation-overview > summary b { color: #d1bd94; font-size: 10px; font-weight: 600; }
.evidence-relation-overview > summary small { color: #8e8677; font-size: 8px; }
.evidence-relation-overview > summary em { flex: 0 0 auto; color: #9bb5a8; font-size: 9px; font-style: normal; }
.evidence-relation-overview[open] > summary { border-bottom: 1px solid rgba(201,181,136,.16); background: rgba(82,121,107,.055); }
.suspicion-notebook { margin: 8px 0 4px; border: 1px solid rgba(184,148,83,.24); background: rgba(9,11,10,.54); }
.suspicion-notebook > summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 11px; cursor: pointer; list-style: none; }
.suspicion-notebook > summary::-webkit-details-marker { display: none; }
.suspicion-notebook > summary > span { min-width: 0; display: grid; grid-template-columns: 17px minmax(0,1fr); gap: 1px 6px; align-items: center; }
.suspicion-notebook > summary svg { grid-row: 1 / 3; width: 14px; height: 14px; color: #b49359; }
.suspicion-notebook > summary b { color: #d1bd94; font-size: 10px; font-weight: 600; }
.suspicion-notebook > summary small { color: #8e8677; font-size: 7.5px; }
.suspicion-notebook > summary em { color: #a8b7ab; font-size: 8px; font-style: normal; }
.suspicion-notebook[open] > summary { border-bottom: 1px solid rgba(201,181,136,.14); background: rgba(168,129,67,.045); }
#suspicion-notebook-body { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,.8fr); gap: 8px; padding: 8px 10px 10px; }
#suspicion-notebook-body > section { min-width: 0; }
#suspicion-notebook-body > section > small { display: block; margin-bottom: 5px; color: #9d8a66; font-size: 7px; }
.suspicion-people { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; }
.suspicion-person { min-width: 0; min-height: 34px; display: grid; grid-template-columns: minmax(0,1fr) 13px; gap: 0 3px; align-content: center; padding: 4px 5px; border: 1px solid rgba(201,181,136,.16); color: #aaa18e; background: rgba(255,255,255,.012); text-align: left; cursor: pointer; }
.suspicion-person span { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.suspicion-person em { color: #817967; font-size: 6.5px; font-style: normal; }
.suspicion-person svg { grid-column: 2; grid-row: 1 / 3; width: 12px; height: 12px; align-self: center; color: #756a58; }
.suspicion-person.is-marked { border-color: rgba(184,148,83,.62); background: rgba(168,129,67,.1); }
.suspicion-person.is-marked svg { color: #d1aa63; }
.suspicion-person--strengthened em { color: #c09f61; }
.suspicion-person--weakened em, .suspicion-person--changing em { color: #be8579; }
.suspicion-person--split em { color: #99b6a6; }
.suspicion-hypotheses { display: grid; gap: 4px; }
.suspicion-hypothesis { min-width: 0; min-height: 32px; display: grid; grid-template-columns: minmax(0,1fr) auto 14px; gap: 5px; align-items: center; padding: 4px 6px; border: 1px solid rgba(184,148,83,.24); color: #bbaa88; background: rgba(168,129,67,.055); cursor: pointer; text-align: left; }
.suspicion-hypothesis span { overflow: hidden; font-size: 7.5px; text-overflow: ellipsis; white-space: nowrap; }
.suspicion-hypothesis em { color: #a4834d; font-size: 6.5px; font-style: normal; }
.suspicion-hypothesis svg { width: 11px; height: 11px; }
.suspicion-hypothesis--weakened, .suspicion-hypothesis--excluded { border-color: rgba(176,76,62,.32); }
.suspicion-notebook__empty { margin: 0; color: #8f8777; font-size: 7.5px; line-height: 1.55; }
.suspicion-history { grid-column: 1 / -1; }
.suspicion-history ol { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.suspicion-history li { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 5px; padding: 5px 6px; border-left: 2px solid rgba(82,121,107,.56); background: rgba(82,121,107,.045); }
.suspicion-history li > span { color: #88a594; font-size: 6.5px; }
.suspicion-history li b { display: block; overflow: hidden; color: #bcae91; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.suspicion-history li p { margin: 2px 0 0; color: #827b6d; font-size: 6.5px; line-height: 1.4; }
#evidence-relation-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; padding: 9px; }
.evidence-relation { min-width: 0; padding: 9px 10px; border-left: 3px solid #6f6250; background: rgba(255,255,255,.014); }
.evidence-relation--compared { border-left-color: #a78349; }
.evidence-relation--closed { border-left-color: #628b79; }
.evidence-relation header { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 6px; align-items: baseline; }
.evidence-relation header span { color: #8b7860; font-size: 7px; }
.evidence-relation header strong { min-width: 0; color: #ccb78f; font-size: 9px; }
.evidence-relation header em { color: #9b9281; font-size: 7px; font-style: normal; }
.evidence-relation > p { margin: 5px 0; color: #948b7a; font-size: 8px; line-height: 1.5; }
.evidence-relation ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 3px; margin: 5px 0 0; padding: 0; list-style: none; }
.evidence-relation li { min-width: 0; display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 4px; padding: 4px 5px; border: 1px solid rgba(82,121,107,.22); }
.evidence-relation li b { color: #83a593; font-size: 7px; }
.evidence-relation li span { min-width: 0; overflow: hidden; color: #aaa18d; font-size: 7.5px; text-overflow: ellipsis; white-space: nowrap; }
.evidence-relation .evidence-relation__concealed { padding-left: 7px; border-left: 2px solid rgba(184,148,83,.36); color: #a6977d; }
.evidence-relation__hypotheses { margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(201,181,136,.13); }
.evidence-relation__hypotheses > small { display: block; color: #a58a58; font-size: 7.5px; line-height: 1.45; }
.evidence-relation__hypotheses ol { display: grid; gap: 4px; margin: 6px 0 0; padding: 0; list-style: none; }
.evidence-relation__hypotheses ol > li { grid-template-columns: 36px minmax(0,1fr) 28px; align-items: start; border-color: rgba(168,129,67,.24); }
.evidence-relation__hypotheses li > span { display: block; overflow: visible; padding: 2px 3px; border: 1px solid rgba(184,148,83,.36); color: #b49b69; font-size: 6.5px; line-height: 1.3; text-align: center; text-overflow: clip; white-space: normal; }
.evidence-relation__hypotheses li div { min-width: 0; }
.evidence-relation__hypotheses li strong { display: block; color: #c2af8b; font-size: 8px; line-height: 1.45; }
.evidence-relation__hypotheses li p { margin: 3px 0 0; color: #928978; font-size: 7.5px; line-height: 1.5; }
.evidence-relation__hypotheses li em { display: block; margin-top: 4px; padding-left: 6px; border-left: 1px solid rgba(176,76,62,.45); color: #a78972; font-size: 7px; font-style: normal; line-height: 1.45; }
.evidence-relation__hypotheses li > button { width: 27px; height: 27px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(184,148,83,.25); color: #92794c; background: transparent; cursor: pointer; }
.evidence-relation__hypotheses li > button svg { width: 12px; height: 12px; }
.evidence-relation__hypotheses li.is-marked > button { border-color: rgba(184,148,83,.7); color: #d3af69; background: rgba(168,129,67,.12); }
.evidence-relation__hypotheses li.is-weakened { border-color: rgba(176,76,62,.28); background: rgba(126,45,37,.035); }
.evidence-relation__hypotheses li.is-weakened > span { border-color: rgba(176,76,62,.48); color: #c08e83; }
.evidence-relation__hypotheses li.is-excluded { border-color: rgba(82,121,107,.26); background: rgba(82,121,107,.045); }
.evidence-relation__hypotheses li.is-excluded > span { border-color: rgba(82,121,107,.48); color: #88aa99; }
.evidence-relation__hypotheses li.is-excluded strong { color: #9aa99d; text-decoration: line-through; text-decoration-color: rgba(176,76,62,.58); }
.evidence-relation__reframe { margin-top: 7px; padding: 7px 8px; border-left: 2px solid #668c7b; background: rgba(82,121,107,.08); }
.evidence-relation__reframe > b { color: #95b6a5; font-size: 8px; }
.evidence-relation__reframe > p { margin: 4px 0 0; color: #aeb9ae; font-size: 7.8px; line-height: 1.55; }
.evidence-relation__variant-flow { display: grid; grid-template-columns: minmax(0,1fr) 18px minmax(0,1fr); gap: 6px; align-items: center; margin-top: 7px; }
.evidence-relation__variant-flow > span { min-width: 0; min-height: 42px; display: grid; align-content: center; gap: 2px; padding: 6px 7px; border: 1px solid rgba(201,181,136,.16); background: rgba(255,255,255,.015); }
.evidence-relation__variant-flow small { color: #847a68; font-size: 6.5px; }
.evidence-relation__variant-flow b { color: #baaa8b; font-size: 7.5px; line-height: 1.4; }
.evidence-relation__variant-flow svg { width: 15px; color: #8ba997; }
.evidence-relation--variant { grid-column: 1 / -1; border-left-color: #876c9b; }
.evidence-relation--variant.is-revealed { border-left-color: #628b79; }

.modal-stage { display: grid; place-items: center; padding: 24px; }
.puzzle-sheet,
.accusation-sheet {
  width: min(780px, 100%);
  max-height: 94vh;
  overflow: auto;
  padding: 42px;
  border: 1px solid rgba(178,143,80,0.42);
  border-radius: 4px;
  text-align: center;
  background: radial-gradient(circle at 50% 28%, #20241f, #0b0d0c 72%);
  box-shadow: 0 24px 100px #000;
}
.puzzle-sheet h2,
.accusation-sheet h2 { margin: 7px 0 12px; font-size: 28px; }
.puzzle-sheet > p,
.accusation-sheet > p { color: var(--paper-dim); font-size: 11px; line-height: 1.8; }
.puzzle-scope-banner { width: fit-content; max-width: 100%; display: inline-flex; align-items: center; gap: 7px; margin: 7px auto 0; padding: 5px 8px; border-left: 3px solid rgba(176,76,62,.78); color: #a9a08e; background: rgba(126,45,37,.065); font-size: 8px; text-align: left; }
.puzzle-scope-banner b { flex: 0 0 auto; color: #d0b88b; font-size: 8px; }
.puzzle-scope-banner--responsibility { border-left-color: rgba(184,148,83,.88); background: rgba(168,129,67,.075); }
.puzzle-scope-banner--completion { border-left-color: rgba(82,121,107,.88); background: rgba(82,121,107,.075); }
.puzzle-scope-banner--completion b { color: #8fb3a4; }
.puzzle-operation-rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0 12px; padding: 0; list-style: none; text-align: left; }
.puzzle-operation-rail li { display: grid; grid-template-columns: 23px minmax(0, 1fr); gap: 6px; align-items: center; min-width: 0; padding: 6px 7px; border: 1px solid rgba(201,181,136,.14); background: rgba(7,9,8,.48); color: #827966; transition: border-color 180ms ease, background 180ms ease, color 180ms ease; }
.puzzle-operation-rail li > span { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid rgba(201,181,136,.22); border-radius: 50%; color: #9b8b6c; font-size: 9px; }
.puzzle-operation-rail li div { min-width: 0; }
.puzzle-operation-rail b, .puzzle-operation-rail small { display: block; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.puzzle-operation-rail b { color: #a99b7f; font-size: 9px; font-weight: 500; }
.puzzle-operation-rail small { margin-top: 2px; color: #716b5e; font-size: 7.5px; }
.puzzle-operation-rail li.is-active { border-color: rgba(194,154,83,.68); background: rgba(168,129,67,.12); color: #d0b579; }
.puzzle-operation-rail li.is-active > span { border-color: #c29a53; color: #e1c486; box-shadow: 0 0 0 2px rgba(194,154,83,.1); }
.puzzle-operation-rail li.is-active b { color: #e0c58c; }
.puzzle-operation-rail li.is-done { border-color: rgba(90,137,117,.42); background: rgba(82,121,107,.08); }
.puzzle-operation-rail li.is-done > span { border-color: #6f9b87; color: #9bc0ad; }
.puzzle-operation-rail li.is-done b { color: #a8c0ae; }

.ring-sheet { width: min(980px, 100%); overflow: hidden; }
.ring-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 24px; align-items: center; min-height: 470px; margin-top: 14px; text-align: left; }
.ring-clues { align-self: stretch; min-height: 0; overflow-y: auto; padding-right: 6px; scrollbar-gutter: stable; }
.ring-clues .puzzle-case-link { margin-top: 0; }
.ring-controls { min-width: 0; text-align: center; }
.ring-puzzle { position: relative; width: 360px; max-width: 100%; aspect-ratio: 1; margin: 0 auto 16px; }
.ring {
  --ring-rotation: 0deg;
  --mark-top: 7%;
  --mark-size: 11px;
  --tick-step: 45deg;
  --tick-inner: 58%;
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  border: 1px solid #8a6a36;
  border-radius: 50%;
  background: radial-gradient(circle, #20231f 57%, #69522e 58%, #1b1c19 64%);
  box-shadow: inset 0 0 18px rgba(0,0,0,.76), inset 0 0 0 2px rgba(215,181,111,.07), 0 0 12px rgba(0,0,0,.36);
  cursor: pointer;
  overflow: hidden;
  touch-action: manipulation;
  transform: translate(-50%, -50%) rotate(var(--ring-rotation));
  transition: transform 0.48s ease;
}
.ring-sheet > #ring-hint { pointer-events: none; }
.ring-face { position: absolute; inset: 0; width: auto !important; color: #c7ac73; pointer-events: none; }
.ring-face::before {
  content: '';
  position: absolute;
  inset: 2.5%;
  border-radius: 50%;
  background: repeating-conic-gradient(from -.5deg, rgba(218,184,111,.74) 0 1deg, transparent 1deg var(--tick-step));
  -webkit-mask: radial-gradient(circle, transparent 0 var(--tick-inner), #000 calc(var(--tick-inner) + 1%) 100%);
  mask: radial-gradient(circle, transparent 0 var(--tick-inner), #000 calc(var(--tick-inner) + 1%) 100%);
  opacity: .28;
}
.ring-face > i { position: absolute; inset: 0; transform: rotate(var(--mark-angle)); }
.ring-face > i::after { content: ''; position: absolute; left: 50%; top: 2.5%; width: 1px; height: 4%; transform: translateX(-50%); background: #a3844c; opacity: .28; transition: opacity .2s ease, height .2s ease, background-color .2s ease; }
.ring-face b {
  position: absolute;
  left: 50%;
  top: var(--mark-top);
  min-width: 1.5em;
  transform: translateX(-50%) rotate(calc(0deg - var(--mark-angle) - var(--ring-rotation)));
  color: #b79a60;
  font-family: var(--serif);
  font-size: var(--mark-size);
  font-weight: 600;
  line-height: 1;
  opacity: .2;
  text-align: center;
  text-shadow: 0 1px 1px #000;
  transition: color .2s ease, opacity .2s ease, text-shadow .2s ease;
}
.ring-face > i.is-adjacent b { color: #c5a86d; opacity: .5; }
.ring-face > i.is-adjacent::after { opacity: .55; }
.ring-face > i.is-current b { color: #f0d593; opacity: 1; text-shadow: 0 1px 1px #000, 0 0 8px rgba(214,176,94,.58); }
.ring-face > i.is-current::after { height: 7%; background: #d8ac5f; opacity: 1; box-shadow: 0 0 5px rgba(210,166,87,.5); }
.ring--outer { z-index: 1; width: 100%; height: 100%; --mark-size: 12px; --tick-inner: 69%; }
.ring--middle { z-index: 2; width: 69%; height: 69%; --mark-size: 11px; --tick-inner: 57%; }
.ring--inner { z-index: 3; width: 39%; height: 39%; --mark-top: 8%; --mark-size: 10px; --tick-step: 72deg; --tick-inner: 43%; }
.ring-puzzle > i { position: absolute; left: 50%; top: -3px; width: 2px; height: 34px; transform: translateX(-50%); background: var(--vermilion-bright); box-shadow: 0 0 12px var(--vermilion); }
.ring-readout { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 0 0 10px; }
.ring-readout span { padding: 8px; border: 1px solid rgba(201,181,136,0.18); color: #8f8774; font-size: 10px; }
.ring-readout strong { display: block; margin-top: 4px; color: #e0c98f; font-size: 16px; }
.ring-reference { margin: 0 auto 12px !important; color: #b5a98f !important; font-size: 10px !important; line-height: 1.7 !important; }

@media (min-width: 761px) and (max-height: 820px) {
  #ring-puzzle { padding: 12px; }
  .ring-sheet {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    width: min(1040px, 100%);
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 20px 24px;
  }
  .ring-sheet > span { font-size: 9px; }
  .ring-sheet > h2 { margin: 3px 0 5px; font-size: 24px; }
  .ring-sheet > #ring-hint { margin: 0; font-size: 10px; line-height: 1.5; }
  .ring-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 38%);
    gap: 18px;
    min-height: 0;
    height: auto;
    margin-top: 8px;
    overflow: hidden;
  }
  .ring-clues { padding-bottom: 12px; overscroll-behavior: contain; }
  .ring-controls { align-self: center; max-height: 100%; overflow: hidden; }
  .ring-puzzle { width: clamp(230px, calc(100dvh - 400px), 340px); margin-bottom: 8px; }
  .ring-readout { margin-bottom: 6px; }
  .ring-readout span { padding: 5px; font-size: 8.5px; }
  .ring-readout strong { margin-top: 2px; font-size: 14px; }
  .ring-reference { margin-bottom: 0 !important; font-size: 8.5px !important; line-height: 1.45 !important; }
  .ring-sheet > .modal-actions { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(201,181,136,.14); background: #0c100e; }
  .ring-sheet > .modal-actions button { min-height: 36px; }
}

.puzzle-case-link {
  margin: 18px 0 12px;
  padding: 12px 14px;
  border-left: 2px solid var(--jade);
  text-align: left;
  background: rgba(19,31,27,0.38);
}
.puzzle-case-link > span { display: block; margin-bottom: 8px; color: #83aa99; font-size: 10px; }
.puzzle-case-link p { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 9px; margin: 5px 0; font-size: 10.5px; line-height: 1.7; }
.puzzle-case-link strong { color: #cdb887; font-weight: 500; }
.puzzle-case-link i { color: #b7ad98; font-style: normal; }

.case-facts-board {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid rgba(184,148,83,0.3);
  border-left: 2px solid var(--vermilion-bright);
  text-align: left;
  background: rgba(21,17,13,0.72);
}
.case-facts-board header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.case-facts-board header span { color: #d7bd82; font-size: 10px; }
.case-facts-board header small { color: #887d68; font-size: 9px; }
.case-facts-board ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 18px; margin: 0; padding-left: 22px; }
.case-facts-board li { color: #bbb09a; font-size: 9.5px; line-height: 1.55; }
.case-facts-board li::marker { color: var(--vermilion-bright); }
.case-facts-board > p { margin: 7px 0 0; color: #8f846e; font-size: 9px; line-height: 1.5; }
#task-puzzle-body > .case-facts-board + .cipher-board,
#task-puzzle-body > .case-facts-board + .ledger-reconstruction,
#task-puzzle-body > .case-facts-board + .sequence-board,
#task-puzzle-body > .case-facts-board + .rubbing-board,
#task-puzzle-body > .case-facts-board + .medicine-board { margin-top: 12px; }

.progressive-hints { margin: 12px 0 0; text-align: left; }
.progressive-hints__purpose { display: grid; gap: 7px; margin-bottom: 7px; padding: 9px 10px; border: 1px solid rgba(201,181,136,.15); border-left: 2px solid rgba(184,148,83,.72); background: rgba(8,10,9,.62); }
.progressive-hints__purpose-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.progressive-hints__purpose-head span { color: #8f8675; font-size: 8px; }
.progressive-hints__purpose-head strong { color: #d1b879; font-size: 10px; font-weight: 600; }
.progressive-hints__purpose ol { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.progressive-hints__purpose li { min-width: 0; display: flex; align-items: center; gap: 5px; padding: 5px 6px; border: 1px solid rgba(201,181,136,.12); color: #777064; background: rgba(255,255,255,.012); }
.progressive-hints__purpose li b { width: 17px; height: 17px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 7px; }
.progressive-hints__purpose li span { min-width: 0; overflow: hidden; font-size: 7.5px; text-overflow: ellipsis; white-space: nowrap; }
.progressive-hints__purpose li.is-active { border-color: rgba(194,154,83,.58); color: #d9bd80; background: rgba(168,129,67,.1); }
.progressive-hints__purpose li.is-done { border-color: rgba(82,121,107,.42); color: #91b2a2; background: rgba(82,121,107,.07); }
.progressive-hints__purpose li.is-done b::after { content: '✓'; }
.progressive-hints__purpose li.is-done b { color: transparent; position: relative; }
.progressive-hints__purpose li.is-done b::after { position: absolute; color: #91b2a2; }
.progressive-hints__purpose > p { margin: 0; color: #aaa18e; font-size: 9px; line-height: 1.55; }
.progressive-hints__button { width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(209,90,73,0.48); border-radius: 3px; color: #ead4a4; background: rgba(111,36,31,0.34); cursor: pointer; }
.progressive-hints__button:hover:not(:disabled) { background: rgba(142,48,39,0.48); }
.progressive-hints__button:disabled { cursor: default; opacity: 0.72; }
.progressive-hints__button svg { width: 15px; height: 15px; }
.progressive-hints__list {
  display: grid;
  gap: 7px;
  max-height: min(180px, 22vh);
  margin: 8px 0 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  list-style: none;
}
.progressive-hints__list li { padding: 10px 12px; border: 1px solid rgba(201,181,136,0.15); background: rgba(7,9,8,0.7); }
.progressive-hints__list strong { color: #c7a969; font-size: 10px; }
.progressive-hints__list p { margin: 5px 0 0; color: #b5ab96; font-size: 10.5px; line-height: 1.75; }
.puzzle-rescue { margin-top: 9px; padding: 11px 12px; border: 1px solid rgba(91,139,119,0.4); border-left: 2px solid #6f9b87; background: rgba(18,35,29,0.48); }
.puzzle-rescue__status { display: flex; align-items: center; gap: 9px; }
.puzzle-rescue__status > svg { width: 20px; height: 20px; color: #83aa99; }
.puzzle-rescue__status small, .puzzle-rescue__status strong { display: block; }
.puzzle-rescue__status small { color: #789a8b; font-size: 8px; }
.puzzle-rescue__status strong { margin-top: 2px; color: #d2c49f; font-size: 12px; }
.puzzle-rescue > p { margin: 7px 0 9px; color: #9e9582; font-size: 9px; line-height: 1.55; }
.puzzle-rescue__solution { margin: 8px 0; padding: 9px 10px; border-top: 1px solid rgba(111,155,135,0.32); border-bottom: 1px solid rgba(111,155,135,0.22); background: rgba(5,8,7,0.46); }
.puzzle-rescue__solution small { color: #83aa99; font-size: 8px; }
.puzzle-rescue__solution p { margin: 5px 0; color: #b8ad96; font-size: 9.5px; line-height: 1.6; }
.puzzle-rescue__solution strong { display: block; color: #dbc998; font-size: 10px; line-height: 1.65; }
.puzzle-rescue__button { width: 100%; min-height: 34px; justify-content: center; }
.puzzle-rescue__button svg { width: 14px; height: 14px; }
.modal-actions { display: flex; justify-content: center; gap: 9px; margin-top: 22px; }
.continuation-ready .puzzle-case-link,
.continuation-ready .progressive-hints { display: none; }
.continuation-summary {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  margin: 18px auto 4px;
  padding: 17px 18px;
  border: 1px solid rgba(90, 137, 117, 0.58);
  background: rgba(15, 31, 25, 0.7);
  text-align: left;
}
.continuation-summary > svg { width: 25px; color: #83aa99; }
.continuation-summary small { display: block; color: #83aa99; font-size: 9px; }
.continuation-summary strong { display: block; margin-top: 4px; color: #d7c292; font-size: 17px; }
.continuation-summary p { margin: 7px 0 0; color: #b9af9b; font-size: 10.5px; line-height: 1.7; }
.continuation-summary__route { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: #9eb8a8 !important; font-size: 9px !important; }
.continuation-summary__route svg { width: 13px; height: 13px; color: #c4a566; }
.continuation-summary__route span:last-child { color: #b9af9b; }
.continuation-summary--deduction { border-color: rgba(184,148,83,.62); border-left: 3px solid rgba(184,148,83,.88); background: rgba(55,41,20,.54); }
.continuation-summary--deduction > svg,
.continuation-summary--deduction small { color: #c0a467; }
.deduction-handoff-ready #task-puzzle-next { border-color: rgba(126,163,143,.76); background: linear-gradient(180deg, rgba(82,121,107,.72), rgba(37,70,57,.78)); }

.dialogue.is-speaking .dialogue__portrait,
.briefing.is-speaking .briefing__portrait {
  transform-origin: 50% 88%;
  translate: var(--speech-gaze-x, 0) var(--speech-beat-y, 0);
  scale: var(--speech-beat-scale, 1);
  animation: speaking-presence-steady 3.8s ease-in-out infinite;
  transition: translate 240ms ease, scale 280ms ease;
  will-change: transform;
}
.dialogue.is-speaking[data-speech-beat="opening"] .dialogue__portrait,
.briefing.is-speaking[data-speech-beat="opening"] .briefing__portrait { --speech-beat-y: -0.4px; --speech-beat-scale: 1.0008; }
.dialogue.is-speaking[data-speech-beat="statement"] .dialogue__portrait,
.briefing.is-speaking[data-speech-beat="statement"] .briefing__portrait { --speech-beat-y: -1px; --speech-beat-scale: 1.0016; }
.dialogue.is-speaking[data-speech-beat="emphasis"] .dialogue__portrait,
.briefing.is-speaking[data-speech-beat="emphasis"] .briefing__portrait { --speech-beat-y: -2.1px; --speech-beat-scale: 1.0032; }
.dialogue.is-speaking[data-speech-beat="resolve"] .dialogue__portrait,
.briefing.is-speaking[data-speech-beat="resolve"] .briefing__portrait { --speech-beat-y: -0.2px; --speech-beat-scale: 1.0004; }
.dialogue.is-speaking[data-speech-beat="settle"] .dialogue__portrait,
.briefing.is-speaking[data-speech-beat="settle"] .briefing__portrait { --speech-beat-y: 0; --speech-beat-scale: 1; --speech-gaze-x: 0px; }
.dialogue.is-speaking[data-speech-tone="angry"] .dialogue__portrait,
.dialogue.is-speaking[data-speech-tone="defensive"] .dialogue__portrait,
.briefing.is-speaking[data-speech-tone="authoritative"] .briefing__portrait {
  animation-name: speaking-presence-firm;
  animation-duration: 2.15s;
}
.dialogue.is-speaking[data-speech-tone="wary"] .dialogue__portrait,
.dialogue.is-speaking[data-speech-tone="exposed"] .dialogue__portrait,
.dialogue.is-speaking[data-speech-tone="frightened"] .dialogue__portrait {
  animation-name: speaking-presence-wary;
  animation-duration: 3.15s;
}
.dialogue.is-speaking[data-speech-tone="relieved"] .dialogue__portrait,
.dialogue.is-speaking[data-speech-tone="controlled"] .dialogue__portrait,
.dialogue.is-speaking[data-speech-tone="certain"] .dialogue__portrait,
.briefing.is-speaking[data-speech-tone="controlled"] .briefing__portrait {
  animation-name: speaking-presence-calm;
  animation-duration: 4.4s;
}
@keyframes speaking-presence-steady {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  44% { transform: translate3d(-0.7px, -1.8px, 0) scale(1.002); }
  72% { transform: translate3d(0.5px, -0.7px, 0) scale(1.0008); }
}
@keyframes speaking-presence-firm {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  32% { transform: translate3d(1.2px, -2.5px, 0) scale(1.0035); }
  63% { transform: translate3d(-0.4px, -0.8px, 0) scale(1.001); }
}
@keyframes speaking-presence-wary {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  24% { transform: translate3d(-1.1px, -0.8px, 0) scale(0.999); }
  58% { transform: translate3d(0.4px, -2px, 0) scale(1.0015); }
  78% { transform: translate3d(-0.2px, -1.2px, 0) scale(1.0004); }
}
@keyframes speaking-presence-calm {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -1.7px, 0) scale(1.0018); }
}
.dialogue.is-speaking.is-preparing .dialogue__portrait img,
.briefing.is-speaking.is-preparing .briefing__portrait img { animation: character-prepare 260ms ease-out both !important; }
.dialogue.is-speaking.is-settling .dialogue__portrait,
.briefing.is-speaking.is-settling .briefing__portrait { animation: speaking-settle 410ms ease-out both; }
.dialogue.is-speaking.is-settling .dialogue__portrait img,
.briefing.is-speaking.is-settling .briefing__portrait img { animation: character-settle 410ms cubic-bezier(.22,.7,.25,1) both !important; }
@keyframes character-prepare {
  from { transform: translateY(1.5px) scale(.999); }
  to { transform: translate(0,0) scale(1); }
}
@keyframes character-settle {
  0% { transform: translate(var(--performance-x, 0), var(--performance-y, 0)) rotate(var(--performance-rotate, 0)) scale(var(--performance-scale, 1)); }
  58% { transform: translate(.8px, 1px) rotate(0deg) scale(1.0005); }
  100% { transform: translate(0,0) rotate(0) scale(1); }
}
@keyframes speaking-settle {
  from { opacity: 1; }
  to { opacity: .985; }
}

.cipher-board { margin: 25px 0; text-align: left; }
.cipher-fragments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.cipher-fragments span { padding: 14px 10px; border: 1px solid var(--line); color: #b7a47d; text-align: center; font-size: 11px; }
.cipher-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 10px; }
.cipher-slots label { color: var(--paper-dim); font-size: 10px; }
.cipher-slots select { width: 100%; height: 40px; margin-top: 6px; padding: 0 9px; border: 1px solid var(--line); background: #111411; }

.ledger-reconstruction { display: grid; gap: 8px; margin: 18px 0 6px; text-align: left; }
.ledger-reconstruction__sheet { position: relative; min-height: 136px; display: grid; align-items: center; padding: 16px 18px; overflow: hidden; border: 1px solid rgba(201,181,136,.3); background: #17140f; box-shadow: inset 0 0 38px rgba(0,0,0,.72); }
.ledger-reconstruction__sheet::before, .ledger-reconstruction__sheet::after { content: ''; position: absolute; pointer-events: none; }
.ledger-reconstruction__sheet::before { inset: 7px; border: 1px solid rgba(119,84,45,.28); }
.ledger-reconstruction__sheet::after { left: 0; top: 0; width: 17%; height: 38%; background: rgba(3,3,2,.82); clip-path: polygon(0 0,100% 0,78% 25%,91% 43%,65% 61%,73% 100%,33% 82%,0 100%); }
.ledger-reconstruction__thread { position: absolute; z-index: 0; left: 12%; right: 8%; top: 50%; height: 1px; background: rgba(154,57,44,.32); box-shadow: 0 -24px rgba(154,57,44,.1), 0 24px rgba(154,57,44,.1); }
.ledger-reconstruction__slots { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.ledger-reconstruction__slots button { min-height: 86px; display: grid; place-items: center; align-content: center; gap: 3px; padding: 9px; border: 1px dashed rgba(201,181,136,.32); border-radius: 2px; color: #817968; background: rgba(7,7,5,.5); cursor: pointer; }
.ledger-reconstruction__slots button small { color: #a25a4c; font-size: 7px; }
.ledger-reconstruction__slots button b { color: #9c927d; font-size: 13px; font-weight: 500; }
.ledger-reconstruction__slots button span { font-size: 8px; }
.ledger-reconstruction__slots button.filled { border-style: solid; border-color: rgba(82,121,107,.74); color: #bfb08e; background: rgba(36,46,36,.62); box-shadow: 0 7px 18px rgba(0,0,0,.34); cursor: grab; }
.ledger-reconstruction.placing-fragment .ledger-reconstruction__slots button,
.ledger-reconstruction__slots button.drop-ready { border-color: rgba(123,171,148,.72); box-shadow: inset 0 0 0 1px rgba(123,171,148,.16); }
.ledger-reconstruction__slots button.drop-ready { background: rgba(36,60,48,.72); box-shadow: inset 0 0 0 1px rgba(123,171,148,.4), 0 0 18px rgba(82,121,107,.22); }
.ledger-reconstruction__slots button.filled b { color: #dac49a; }
.ledger-reconstruction__fragments { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; }
.ledger-reconstruction__fragments button { min-width: 0; min-height: 58px; display: grid; gap: 2px; padding: 7px 8px; border: 1px solid rgba(201,181,136,.2); border-radius: 2px; color: #958c79; background: #11110d; text-align: left; cursor: grab; }
.ledger-reconstruction__fragments button small { color: #786d5b; font-size: 6px; }
.ledger-reconstruction__fragments button b { color: #c3ae81; font-size: 10px; font-weight: 500; }
.ledger-reconstruction__fragments button span { overflow-wrap: anywhere; font-size: 7px; }
.ledger-reconstruction__fragments button.selected { border-color: rgba(184,148,83,.86); color: #d8c49b; background: rgba(105,77,35,.24); }
.ledger-reconstruction__fragments button.used { opacity: .3; filter: grayscale(.7); cursor: default; }
.ledger-reconstruction__status { min-height: 18px; color: #8f8571; font-size: 8px; text-align: center; }
.ledger-reconstruction__reset { margin-top: 2px; }

.lantern-board { height: 190px; display: flex; align-items: flex-start; justify-content: space-around; gap: 8px; padding: 28px 10px 0; }
.lantern-board button { position: relative; width: 62px; height: 86px; display: grid; place-items: center; padding: 12px 4px 20px; border: 1px solid #695b41; border-radius: 3px; background: #111310; cursor: pointer; }
.lantern-board button:nth-child(even) { margin-top: 42px; }
.lantern-board svg { width: 22px; color: #5b5445; }
.lantern-board button.lit { border-color: #c6964c; box-shadow: 0 0 28px rgba(202,145,57,0.3), inset 0 0 22px rgba(202,145,57,0.17); }
.lantern-board button.lit svg { color: #e6ad54; filter: drop-shadow(0 0 7px #d27c2b); }
.lantern-identity { position: absolute; left: 6px; bottom: 5px; display: flex; align-items: baseline; gap: 2px; color: #8d826c; }
.lantern-identity small { font-size: 7px; }
.lantern-identity b { color: #c9b079; font-size: 10px; font-weight: 500; }
.lantern-step { position: absolute; right: 4px; top: 4px; width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 50%; color: transparent; font-size: 9px; }
.lantern-board button.lit .lantern-step { border-color: rgba(210,105,84,.78); color: #f0c0aa; background: rgba(127,37,29,.7); box-shadow: 0 0 10px rgba(182,64,45,.3); }
.lantern-legend, .token-legend { display: flex; align-items: center; justify-content: center; gap: 18px; margin: -4px 0 4px; color: #7e7667; font-size: 8px; }
.lantern-legend span, .token-legend span { display: inline-flex; align-items: center; gap: 5px; }
.lantern-legend b { color: #c9b079; font-weight: 500; }
.lantern-legend i { width: 14px; height: 14px; display: grid; place-items: center; border: 1px solid rgba(210,105,84,.72); border-radius: 50%; color: #efb79f; background: rgba(127,37,29,.45); font-size: 7px; font-style: normal; }
.text-button { padding: 6px 12px; color: var(--paper-dim); background: transparent; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

.sequence-board { margin: 24px 0 10px; }
.sequence-pool { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sequence-pool button { min-height: 48px; padding: 8px; border: 1px solid var(--line); border-radius: 3px; color: #cbb98f; background: #121512; cursor: pointer; }
.sequence-pool button:disabled { opacity: 0.35; cursor: default; }
.sequence-tray { min-height: 74px; display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 12px; padding: 10px; border: 1px dashed rgba(184,148,83,0.36); }
.sequence-tray button { min-width: 74px; display: grid; gap: 4px; padding: 8px; border: 1px solid rgba(184,148,83,0.32); border-radius: 2px; color: #d0bd92; background: rgba(18,21,18,0.92); font-size: 10px; cursor: grab; }
.sequence-tray button:active { cursor: grabbing; }
.sequence-tray button:hover { border-color: rgba(184,148,83,0.68); background: rgba(42,34,23,0.92); }
.sequence-tray button b { color: var(--vermilion-bright); font-size: 9px; }
.sequence-tray button span { pointer-events: none; }
.sequence-tray p { margin: 0; color: #7e7869; font-size: 10px; }

.rubbing-board { display: grid; gap: 8px; margin: 24px 0 8px; text-align: left; }
.rubbing-row { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 10px; padding: 8px; border-bottom: 1px solid var(--line); }
.rubbing-row > span { color: #9f916f; font-size: 10px; }
.rubbing-row > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rubbing-row button { min-height: 38px; border: 1px solid rgba(201,181,136,0.18); color: #bcb098; background: #111411; cursor: pointer; }
.rubbing-row button.selected { border-color: var(--vermilion); color: #dfc38a; background: rgba(158,51,42,0.14); }

.medicine-board, .tumbler-board { display: grid; gap: 14px; margin: 26px 0 10px; text-align: left; }
.medicine-board label, .tumbler-board label { display: grid; grid-template-columns: 145px 1fr 40px; align-items: center; gap: 12px; color: #ac9f83; font-size: 10px; }
.medicine-board label { grid-template-columns: 180px 1fr; }
.medicine-board label > span { display: flex; justify-content: space-between; gap: 8px; }
.medicine-board output, .tumbler-board output { color: #d5bd84; font-size: 11px; }
.medicine-board input, .tumbler-board input { width: 100%; height: 18px; margin: 0; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; }
.medicine-board input::-webkit-slider-runnable-track, .tumbler-board input::-webkit-slider-runnable-track { height: 4px; border: 1px solid rgba(160,131,78,.42); border-radius: 0; background: repeating-linear-gradient(90deg, rgba(190,156,93,.36) 0 1px, transparent 1px 10%), linear-gradient(90deg, #28251d, #59482c 50%, #28251d); }
.medicine-board input::-webkit-slider-thumb, .tumbler-board input::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -6px; appearance: none; -webkit-appearance: none; border: 1px solid #d08a66; border-radius: 50%; background: #9d3e32; box-shadow: 0 0 0 2px rgba(12,13,11,.9), 0 0 7px rgba(157,62,50,.34); }
.medicine-board input::-moz-range-track, .tumbler-board input::-moz-range-track { height: 4px; border: 1px solid rgba(160,131,78,.42); border-radius: 0; background: linear-gradient(90deg, #28251d, #59482c 50%, #28251d); }
.medicine-board input::-moz-range-thumb, .tumbler-board input::-moz-range-thumb { width: 14px; height: 14px; border: 1px solid #d08a66; border-radius: 50%; background: #9d3e32; box-shadow: 0 0 0 2px rgba(12,13,11,.9); }
.reaction-meter { position: relative; height: 34px; display: flex; align-items: end; justify-content: space-between; margin-top: 6px; border-bottom: 2px solid #5f5138; color: #80755f; font-size: 9px; }
.reaction-meter::before { content: ''; position: absolute; left: 42%; right: 42%; bottom: 0; height: 15px; border-left: 1px solid rgba(111,155,135,.54); border-right: 1px solid rgba(111,155,135,.54); background: rgba(80,126,106,.12); }
.reaction-meter em { position: absolute; left: 50%; top: 0; transform: translateX(-50%); color: #789989; font-size: 7px; font-style: normal; white-space: nowrap; }
.reaction-meter i { position: absolute; z-index: 2; left: 50%; bottom: -7px; width: 2px; height: 28px; background: var(--vermilion-bright); transition: left 0.25s ease; }
.reaction-meter.near i { box-shadow: 0 0 12px #d8b665; }

.orientation-reference { width: 116px; height: 24px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 6px; margin: 18px auto -12px; color: #8e836d; font-size: 8px; }
.orientation-reference > span { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid rgba(185,150,87,.42); border-radius: 50%; color: #cdb57d; }
.orientation-reference > i { height: 1px; background: linear-gradient(90deg, #a68448, transparent); }
.orientation-reference > small { white-space: nowrap; }
.orientation-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 26px 0 10px; }
.orientation-board button { min-height: 150px; display: grid; place-items: center; gap: 5px; padding: 11px 8px 9px; border: 1px solid #6c5735; color: #c9b17d; background: #121412; cursor: pointer; }
.fragment-face { position: relative; width: 62px; height: 62px; display: grid; place-items: center; overflow: hidden; border: 1px solid #897246; background: linear-gradient(135deg, rgba(209,185,131,.12), transparent 54%), #171813; box-shadow: inset 0 0 0 4px rgba(6,8,6,.46); transition: transform 0.25s ease; }
.fragment-face > svg { position: relative; z-index: 2; width: 23px; height: 23px; color: #b9a475; stroke-width: 1.35; }
.fragment-edge { position: absolute; z-index: 1; left: 4px; top: 4px; width: 44px; height: 44px; border-top: 3px solid #bd6651; border-left: 2px solid #9b8551; }
.fragment-face--phoenix .fragment-edge { border-top-style: double; border-left-style: dashed; }
.fragment-face--phoenix > svg { color: #c79063; transform: rotate(-26deg); }
.fragment-face--cloud .fragment-edge { border-top-style: dashed; border-left-style: dotted; }
.fragment-face--cloud > svg { color: #9cae9e; }
.fragment-face--notch { clip-path: polygon(0 0, 100% 0, 100% 38%, 86% 50%, 100% 62%, 100% 100%, 0 100%); }
.fragment-face--notch .fragment-edge { border-top-style: dotted; border-left-style: solid; }
.fragment-face--notch > svg { color: #d0c29f; }
.fragment-face--seal::after { content: ''; position: absolute; right: 8px; bottom: 8px; width: 19px; height: 19px; border: 2px double rgba(189,62,49,.82); border-radius: 50%; background: rgba(128,31,26,.2); }
.fragment-face--seal .fragment-edge { border-top-color: #9f6b55; border-left-style: double; }
.fragment-face--seal > svg { color: #c85e4e; }
.orientation-board button > strong { font-size: 12px; font-weight: 500; }
.fragment-direction { display: flex; align-items: baseline; gap: 5px; color: #8d826c; font-size: 9px; }
.fragment-direction small { color: #756d5f; font-size: 7px; }
.fragment-direction b { color: #c9b17d; font-size: 10px; font-weight: 500; }

.memory-board { display: grid; grid-template-columns: repeat(3, 92px); justify-content: center; gap: 8px; margin: 24px 0 10px; }
.memory-board button { aspect-ratio: 1; border: 1px solid #5f5138; background: linear-gradient(#181b17, #0e100e); cursor: pointer; }
.memory-board button span { color: #d5bd84; font-size: 11px; opacity: 0; transition: opacity 0.18s ease; }
.memory-board button.preview { border-color: #c09651; box-shadow: inset 0 0 25px rgba(192,150,81,0.18); }
.memory-board button.preview span { opacity: 1; }
.memory-board button.selected { border-color: var(--vermilion-bright); background: rgba(158,51,42,0.15); }

.token-legend { margin: 18px 0 8px; }
.token-legend i { width: 14px; height: 14px; display: inline-block; border-radius: 50%; }
.token-legend__hole { border: 3px solid #77633f; background: #0b0d0b; }
.token-legend__edge { border: 2px dashed #a68a52; }
.token-legend__patina { background: radial-gradient(circle at 70% 30%, #315e51 0 24%, #79572d 28% 62%, #263a31 66%); }
.token-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 8px 0 10px; }
.token-board button { min-height: 112px; display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; padding: 10px; border: 1px solid #5f5138; color: #ab9d80; background: #111310; text-align: left; cursor: pointer; }
.token-visual { position: relative; width: 60px; height: 60px; display: grid; place-items: center; border: 2px solid #765f35; border-radius: 50%; color: #d0b879; background: #654c2d; box-shadow: inset 0 0 12px rgba(0,0,0,.58), 0 4px 10px rgba(0,0,0,.34); }
.token-visual > b { position: relative; z-index: 3; font-family: Georgia, serif; font-size: 17px; font-weight: 500; text-shadow: 0 1px 2px #000; }
.token-hole { position: absolute; z-index: 4; width: 9px; height: 9px; border: 1px solid rgba(199,167,105,.55); border-radius: 50%; background: #090b09; box-shadow: inset 0 0 3px #000; }
.token-visual[data-hole="top"] .token-hole { left: 50%; top: 5px; transform: translateX(-50%); }
.token-visual[data-hole="left"] .token-hole { left: 5px; top: 50%; transform: translateY(-50%); }
.token-visual[data-hole="right"] .token-hole { right: 5px; top: 50%; transform: translateY(-50%); }
.token-edge { position: absolute; z-index: 2; inset: 7px; border-radius: 50%; }
.token-visual[data-edge="chain"] .token-edge { border: 2px dotted rgba(221,188,116,.72); }
.token-visual[data-edge="broken-cloud"] .token-edge { border: 2px dashed rgba(181,165,121,.72); border-right-color: transparent; }
.token-visual[data-edge="thunder"] .token-edge { border: 4px double rgba(190,158,91,.7); }
.token-visual[data-edge="plain"] .token-edge { border: 1px solid rgba(223,194,126,.72); }
.token-visual--ink { background: radial-gradient(circle at 32% 68%, rgba(18,29,26,.9) 0 16%, transparent 18%), radial-gradient(circle at 70% 24%, #263f35 0 20%, #65472b 25% 68%, #30251a 72%); }
.token-visual--scratch { background: repeating-linear-gradient(145deg, transparent 0 8px, rgba(226,191,128,.28) 9px, transparent 10px), radial-gradient(circle at 62% 36%, #55715a 0 18%, #765331 22% 70%, #33251a 73%); }
.token-visual--chip { clip-path: polygon(0 0, 100% 0, 100% 38%, 90% 44%, 100% 53%, 100% 100%, 0 100%); background: radial-gradient(circle at 28% 66%, #314a3d 0 15%, #62462a 22% 68%, #292119 72%); }
.token-visual--bright { border-color: #bd9650; background: radial-gradient(circle at 36% 30%, #e1c787 0 8%, #ad8442 26% 67%, #644522 73%); box-shadow: inset 0 0 10px rgba(255,230,166,.28), 0 4px 10px rgba(0,0,0,.28); }
.token-visual--deep { background: radial-gradient(circle at 66% 34%, #244d43 0 18%, #416859 22% 36%, #49351f 43% 72%, #201a14 76%); }
.token-traits { display: grid; gap: 5px; min-width: 0; }
.token-traits small { color: #776e5e; font-size: 7px; }
.token-traits b { color: #b8aa8e; font-size: 9px; font-weight: 400; line-height: 1.55; }
.token-board button.selected { border-color: var(--vermilion); background: rgba(158,51,42,0.14); }
.token-board button.selected .token-visual { box-shadow: inset 0 0 12px rgba(0,0,0,.58), 0 0 0 2px rgba(170,58,44,.46), 0 5px 14px rgba(0,0,0,.4); }

.cross-exam-heads { height: 170px; display: grid; grid-template-columns: 1fr 42px 1fr; align-items: center; gap: 8px; margin: 18px 0 10px; overflow: hidden; }
.cross-exam-heads figure { height: 100%; display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 10px; margin: 0; text-align: left; }
.cross-exam-heads figure:last-child { grid-template-columns: 1fr 100px; text-align: right; }
.cross-exam-heads figure:last-child img { order: 2; }
.cross-exam-heads img { width: 100px; height: 170px; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 12px 14px #000) brightness(0.74) saturate(0.76); }
.cross-exam-heads figcaption { color: #d3bb84; font-size: 15px; }
.cross-exam-heads figcaption small { display: block; margin-top: 5px; color: var(--paper-dim); font-size: 9px; }
.cross-exam-heads > svg { width: 24px; color: var(--vermilion-bright); }
.cross-exam-progress { display: grid; grid-template-columns: 74px minmax(0, 1fr) 42px; align-items: center; gap: 8px; margin: 0 0 9px; color: #9f947d; font-size: 9px; text-align: left; }
.cross-exam-progress > i { height: 3px; overflow: hidden; background: rgba(255,255,255,0.08); }
.cross-exam-progress > i b { display: block; width: 0; height: 100%; background: #7fa28f; transition: width 180ms ease; }
.cross-exam-progress strong { color: #baa77f; font-size: 9px; text-align: right; }
.cross-exam-board { display: grid; gap: 7px; text-align: left; }
.cross-exam-row { display: grid; grid-template-columns: 145px 1fr; align-items: center; gap: 8px; }
.cross-exam-row > span { color: #a89876; font-size: 10px; }
.cross-exam-row > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.cross-exam-row button { min-height: 40px; padding: 6px 8px; border: 1px solid var(--line); color: #b9ad95; background: #111411; font-size: 10px; cursor: pointer; }
.cross-exam-row button.selected { border-color: var(--vermilion); color: #dfc38a; background: rgba(158,51,42,0.14); }

.accusation-sheet { width: min(980px, 100%); }
.accusation__columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 22px 0; text-align: left; }
.accusation fieldset { min-width: 0; margin: 0; padding: 13px; border: 1px solid var(--line); }
.accusation legend { padding: 0 7px; color: #b99d69; font-size: 11px; }
.accusation fieldset div { display: grid; gap: 6px; }
.accusation label { display: flex; gap: 8px; padding: 9px; border: 1px solid transparent; background: rgba(255,255,255,0.025); cursor: pointer; font-size: 10px; line-height: 1.55; }
.accusation label:has(input:checked) { border-color: var(--vermilion); background: rgba(158,51,42,0.13); }
.accusation input { accent-color: var(--vermilion-bright); }
.accusation-support-preview { margin-top: 12px; padding: 11px 12px; border: 1px solid rgba(201,181,136,.2); border-left: 3px solid rgba(82,121,107,.76); background: rgba(8,12,10,.68); text-align: left; }
.accusation-support-preview > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.accusation-support-preview > header > span { display: flex; align-items: center; gap: 7px; }
.accusation-support-preview > header svg { width: 15px; height: 15px; color: #82a18f; }
.accusation-support-preview > header b { color: #d2bf98; font-size: 10px; }
.accusation-support-preview > header small { color: #918977; font-size: 8px; line-height: 1.45; text-align: right; }
.accusation-support-preview__focus { display: flex; gap: 3px; margin: 0 0 8px; padding: 2px; overflow-x: auto; border: 1px solid rgba(201,181,136,.14); background: rgba(6,8,7,.62); scrollbar-width: thin; }
.accusation-support-preview__focus button { flex: 1 0 auto; min-height: 29px; padding: 5px 8px; border: 0; border-right: 1px solid rgba(201,181,136,.1); color: #8f887a; background: transparent; font-size: 8px; white-space: nowrap; cursor: pointer; }
.accusation-support-preview__focus button:last-child { border-right: 0; }
.accusation-support-preview__focus button:hover { color: #d2c09a; }
.accusation-support-preview__focus button[aria-pressed="true"] { color: #ead8b3; background: rgba(82,121,107,.2); box-shadow: inset 0 -2px #7fa493; }
.accusation-support-preview__grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.accusation-support-preview__grid--focused { grid-template-columns: minmax(0,1fr); }
.accusation-support-preview__grid--focused article { padding: 10px 11px; }
.accusation-support-preview__grid--focused article > header { grid-template-columns: auto minmax(0,1fr); align-items: baseline; gap: 8px; }
.accusation-support-preview__grid--focused article > header b { font-size: 8px; }
.accusation-support-preview__grid--focused article > header em { font-size: 10px; }
.accusation-support-preview__grid article { min-width: 0; padding: 7px 8px; border: 1px solid rgba(201,181,136,.13); background: rgba(255,255,255,.012); }
.accusation-support-preview__grid article > header { display: grid; gap: 2px; padding-bottom: 5px; border-bottom: 1px solid rgba(201,181,136,.1); }
.accusation-support-preview__grid article > header b { color: #a99062; font-size: 7px; font-weight: 500; }
.accusation-support-preview__grid article > header em { min-width: 0; overflow-wrap: anywhere; color: #d1c09e; font-size: 8.5px; font-style: normal; line-height: 1.4; }
.accusation-support-preview__grid ul { display: grid; gap: 4px; margin: 6px 0 0; padding: 0; list-style: none; }
.accusation-support-preview__grid li { min-width: 0; display: grid; grid-template-columns: 37px minmax(0,1fr); gap: 5px; align-items: start; }
.accusation-support-preview__grid li > span { padding: 2px 3px; border: 1px solid rgba(82,121,107,.35); color: #8eb09f; font-size: 6.5px; text-align: center; }
.accusation-support-preview__grid li.is-pending > span { border-color: rgba(184,148,83,.38); color: #b49b69; }
.accusation-support-preview__grid li div { min-width: 0; }
.accusation-support-preview__grid li strong, .accusation-support-preview__grid li small { display: block; }
.accusation-support-preview__grid li strong { color: #a99d86; font-size: 7.5px; }
.accusation-support-preview__grid li small { margin-top: 2px; overflow: hidden; color: #777164; font-size: 6.5px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.accusation-support-preview__details { margin-top: 7px; border-top: 1px solid rgba(201,181,136,.11); }
.accusation-support-preview__details > summary { min-height: 31px; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 5px; align-items: center; padding: 5px 0; color: #a99266; cursor: pointer; list-style: none; }
.accusation-support-preview__details > summary::-webkit-details-marker { display: none; }
.accusation-support-preview__details > summary span { font-size: 7px; }
.accusation-support-preview__details > summary em { min-width: 0; color: #7f7869; font-size: 6.5px; font-style: normal; line-height: 1.4; text-align: right; overflow-wrap: anywhere; }
.accusation-support-preview__details[open] > summary { border-bottom: 1px solid rgba(201,181,136,.09); color: #c2a978; }
.accusation-support-preview__details > p { margin: 6px 0 0; color: #958b78; font-size: 7px; line-height: 1.5; }
.accusation-support-preview__details > ul li small { overflow: visible; text-overflow: clip; white-space: normal; }
.accusation-support-preview__notice { display: flex; align-items: flex-start; gap: 6px; margin: 8px 0 0; color: #9e9583; font-size: 8px; line-height: 1.5; }
.accusation-support-preview__notice svg { width: 13px; height: 13px; flex: 0 0 auto; color: #b2955e; }

.court-cinematic {
  position: fixed;
  z-index: 69;
  inset: 0;
  overflow: hidden;
  background: #060706;
}
.court-cinematic__background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.6) saturate(.74) contrast(1.1); transform: scale(1.025); transition: transform .65s cubic-bezier(.2,.7,.25,1), filter .55s ease; }
.court-cinematic__shade { position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, rgba(2,3,3,.84), rgba(2,3,3,.1) 50%, rgba(2,3,3,.66)), linear-gradient(180deg, rgba(2,3,3,.24), transparent 42%, rgba(2,3,3,.78)); }
.court-cinematic[data-side="left"] .court-cinematic__shade { transform: scaleX(-1); }
.court-cinematic__figure { position: absolute; z-index: 2; bottom: 0; height: 91vh; margin: 0; pointer-events: none; }
.court-cinematic__figure img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 24px 38px rgba(0,0,0,.82)) brightness(.9) saturate(.88) contrast(1.05); transform-origin: 50% 100%; }
.court-cinematic__figure--actor { width: min(43vw, 700px); right: 3%; opacity: 0; transform: translateX(24px); transition: opacity .38s ease, transform .48s cubic-bezier(.2,.7,.25,1); }
.court-cinematic__figure--actor.shot-enter { opacity: 1; transform: translateX(0); }
.court-cinematic[data-side="left"] .court-cinematic__figure--actor { right: auto; left: 3%; transform: translateX(-24px); }
.court-cinematic[data-side="left"] .court-cinematic__figure--actor.shot-enter { transform: translateX(0); }
.court-cinematic__figure--officer { width: min(30vw, 470px); left: 5%; opacity: .36; filter: saturate(.68); }
.court-cinematic[data-side="left"] .court-cinematic__figure--officer { left: auto; right: 5%; }
.court-cinematic[data-actor="pei"] .court-cinematic__figure--officer { opacity: 0; }
.court-cinematic[data-camera="wide"] .court-cinematic__background { transform: scale(1.015); filter: brightness(.64) saturate(.76) contrast(1.08); }
.court-cinematic[data-camera="evidence"] .court-cinematic__background { transform: scale(1.075); filter: brightness(.55) saturate(.72) contrast(1.12); }
.court-cinematic[data-camera="close"] .court-cinematic__background { transform: scale(1.11); filter: brightness(.52) saturate(.68) contrast(1.14); }
.court-cinematic[data-camera="review"] .court-cinematic__background { transform: scale(1.035); filter: brightness(.5) saturate(.64) contrast(1.12); }
.court-cinematic[data-camera="verdict"] .court-cinematic__background { transform: scale(1.045); filter: brightness(.64) saturate(.8) contrast(1.08); }
.court-cinematic[data-shot-transition="interrupt"] .court-cinematic__background { transition-duration: .34s; }
.court-cinematic[data-shot-transition="recoil"] .court-cinematic__background { transition-duration: .44s; }
.court-cinematic[data-shot-transition="verdict"] .court-cinematic__background { transition-duration: .9s; }
.court-cinematic[data-shot-transition="verdict"] .court-cinematic__figure--actor { transition-duration: .62s; }
.court-reactions { position: absolute; z-index: 3; top: 150px; left: 50%; width: min(35vw, 520px); height: min(37vh, 360px); display: flex; align-items: flex-end; justify-content: center; gap: 7px; pointer-events: none; opacity: 0; transform: translate(-50%, 10px); }
.court-reactions.shot-enter { animation: court-reactions-enter .48s .12s cubic-bezier(.2,.72,.25,1) both; }
.court-reactions figure { position: relative; width: min(10vw, 135px); height: 100%; margin: 0; overflow: hidden; }
.court-reactions img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 14px 18px rgba(0,0,0,.78)) brightness(.62) saturate(.68) contrast(1.06); }
.court-reactions figcaption { position: absolute; right: 2px; bottom: 6px; left: 2px; padding: 4px 5px; border-left: 2px solid rgba(184,148,83,.55); background: rgba(5,7,6,.78); text-align: left; }
.court-reactions figcaption b, .court-reactions figcaption span { display: block; overflow-wrap: anywhere; }
.court-reactions figcaption b { color: #bbaa88; font-size: 8px; }
.court-reactions figcaption span { margin-top: 1px; color: #817a6c; font-size: 6.5px; }
.court-evidence { position: absolute; z-index: 4; top: 146px; left: 5%; width: min(240px, 19vw); margin: 0; border: 1px solid rgba(201,181,136,.3); border-left: 3px solid #9b7c49; background: rgba(6,8,7,.9); box-shadow: 0 16px 44px rgba(0,0,0,.58); pointer-events: none; opacity: 0; transform: translateY(10px) scale(.97); }
.court-cinematic[data-side="left"] .court-evidence { right: 5%; left: auto; }
.court-evidence.shot-enter { animation: court-evidence-enter .42s .08s cubic-bezier(.2,.72,.25,1) both; }
.court-evidence > img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #101310; }
.court-evidence figcaption { display: grid; gap: 2px; padding: 7px 8px 8px; text-align: left; }
.court-evidence small { color: #a38550; font-size: 7px; }
.court-evidence b { color: #d0bd95; font-size: 9px; line-height: 1.4; }
.court-evidence span { color: #8f8777; font-size: 7px; line-height: 1.45; overflow-wrap: anywhere; }
.court-evidence-shift { display: grid; gap: 3px; margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(201,181,136,.16); }
.court-evidence-shift p { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 4px; margin: 0; }
.court-evidence-shift p small { color: #9a8052; font-size: 6px; }
.court-evidence-shift p span { color: #a99e89; font-size: 6.5px; line-height: 1.35; }
.court-evidence-shift p:last-child small { color: #79a08b; }
.court-evidence-shift > svg { width: 10px; height: 10px; margin-left: 7px; color: #73927f; }
.court-cinematic__figure--actor.is-speaking img { animation: court-character-performance 900ms cubic-bezier(.16,.76,.24,1) both, character-breath 5.8s ease-in-out 950ms infinite; }
.court-cinematic[data-tone="exposed"] .court-cinematic__figure--actor img { filter: drop-shadow(0 24px 42px rgba(0,0,0,.94)) brightness(.72) saturate(.72) contrast(1.1); }
.court-cinematic[data-shot-role="verdict"] .court-cinematic__caption { border-top-color: rgba(215,189,121,.82); }
.court-cinematic[data-shot-role="verdict"] .court-cinematic__caption h2 { color: #f0dfb5; }
.court-cinematic[data-shot-role="confrontation"] .court-cinematic__caption { border-top-color: rgba(176,76,62,.66); }
.court-cinematic[data-sequence-result="wrong"] .court-cinematic__caption { border-top-color: rgba(176,76,62,.5); }
.court-cinematic[data-sequence-result="wrong"] .court-proof-strip span { border-color: rgba(176,76,62,.38); }
@keyframes court-character-performance {
  0% { transform: translate(0,0) rotate(0) scale(1); }
  42% { transform: translate(var(--performance-x-mid, 0), var(--performance-y-mid, 0)) rotate(var(--performance-rotate, 0)) scale(var(--performance-scale, 1)); }
  100% { transform: translate(var(--performance-x, 0), var(--performance-y, 0)) rotate(var(--performance-rotate, 0)) scale(var(--performance-scale, 1)); }
}
@keyframes court-caption-enter {
  from { opacity: 0; transform: translateY(13px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes court-finding-enter {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes court-proof-enter {
  from { opacity: 0; transform: translateY(-6px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes court-reactions-enter {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes court-evidence-enter {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.court-cinematic__caption.shot-enter { animation: court-caption-enter .42s cubic-bezier(.2,.72,.25,1) both; }
.court-cinematic__caption.shot-enter h2 { animation: court-caption-enter .42s .06s cubic-bezier(.2,.72,.25,1) both; }
.court-cinematic__caption.shot-enter > p:not(.court-cinematic__finding) { animation: court-caption-enter .42s .12s cubic-bezier(.2,.72,.25,1) both; }
.court-cinematic__finding.shot-enter { animation: court-finding-enter .36s .18s ease-out both; }
.court-proof-strip.shot-enter span { animation: court-proof-enter .3s calc(var(--proof-index, 0) * 55ms) ease-out both; }
.court-proof-strip.shot-enter span:nth-child(1) { --proof-index: 0; }
.court-proof-strip.shot-enter span:nth-child(2) { --proof-index: 1; }
.court-proof-strip.shot-enter span:nth-child(3) { --proof-index: 2; }
.court-proof-strip.shot-enter span:nth-child(4) { --proof-index: 3; }
.court-proof-strip.shot-enter span:nth-child(5) { --proof-index: 4; }
.court-proof-strip.shot-enter span:nth-child(6) { --proof-index: 5; }
.court-proof-strip { position: absolute; z-index: 4; top: 82px; left: 50%; width: min(760px, calc(100% - 40px)); display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; transform: translateX(-50%); }
.court-proof-strip span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border: 1px solid rgba(190,151,82,.28); border-radius: 2px; background: rgba(7,9,8,.74); color: #b9aa8b; font-size: 9px; box-shadow: 0 8px 24px rgba(0,0,0,.32); }
.court-proof-strip svg { width: 12px; height: 12px; color: #799987; }
.court-proof-strip[data-status="contested"] span { border-color: rgba(190,151,82,.34); color: #c2ad86; }
.court-proof-strip[data-status="contested"] svg { color: #b7985e; }
.court-proof-strip[data-status="conflict"] span { border-color: rgba(176,76,62,.38); color: #c6a09a; }
.court-proof-strip[data-status="conflict"] svg { color: #b06458; }
.court-cinematic__caption { position: absolute; z-index: 5; left: 6%; bottom: 7%; width: min(610px, 48vw); padding: 16px 18px 12px 0; border-top: 1px solid rgba(199,161,91,.58); background: linear-gradient(90deg, rgba(4,6,5,.56), rgba(4,6,5,.14) 78%, transparent); text-shadow: 0 2px 12px #000, 0 1px 3px #000; }
.court-cinematic[data-side="left"] .court-cinematic__caption { left: auto; right: 6%; }
.court-cinematic__caption > span { color: #b7985e; font-size: 10px; }
.court-cinematic__caption h2 { margin: 7px 0 10px; color: #f0e2c4; font-size: 32px; line-height: 1.25; letter-spacing: 0; }
.court-cinematic__caption > p { min-height: 54px; margin: 0; color: #d9ceb7; font-size: 13px; line-height: 1.9; }
.court-cinematic__caption .court-cinematic__finding { min-height: 0; margin-top: 8px; padding-left: 10px; border-left: 2px solid rgba(111,155,135,.72); color: #aabcae; font-size: 10px; line-height: 1.65; }
.court-cinematic__progress { display: flex; gap: 4px; margin: 15px 0 12px; }
.court-cinematic__progress i { width: 28px; height: 2px; background: rgba(201,181,136,.18); }
.court-cinematic__progress i.done { background: #657e71; }
.court-cinematic__progress i.active { background: #c29a53; box-shadow: 0 0 8px rgba(194,154,83,.4); }
.court-cinematic__actions { display: flex; align-items: center; gap: 7px; }
.court-cinematic__actions button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.court-cinematic__actions svg { width: 15px; height: 15px; }

.ending {
  position: fixed;
  z-index: 70;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 30px;
  text-align: center;
  background: #040505;
}
.ending__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.66) saturate(0.84) contrast(1.06); }
.ending__shade { position: absolute; inset: 0; background: radial-gradient(circle at 50% 43%, rgba(7,9,8,0.16), rgba(4,5,5,0.78) 88%), linear-gradient(180deg, rgba(4,5,5,0.13), rgba(4,5,5,0.64)); }
.ending[data-result="perfect"] .ending__image { filter: brightness(0.72) saturate(0.92) contrast(1.04); }
.ending[data-result="win"] .ending__image { filter: brightness(0.64) saturate(0.84) contrast(1.06); }
.ending[data-result="dawn"] .ending__image { filter: brightness(0.62) grayscale(0.05) saturate(0.78) contrast(1.06); }
.ending[data-result="wrong"] .ending__image { filter: brightness(0.6) grayscale(0.12) saturate(0.74) contrast(1.08); }
.ending[data-result="wrong"] .ending__shade { background: radial-gradient(circle at 50% 45%, rgba(2,8,8,0.2), rgba(2,4,4,0.78) 90%), linear-gradient(180deg, rgba(3,8,8,0.12), rgba(2,4,4,0.62)); }
.ending__content { position: relative; z-index: 2; display: grid; justify-items: center; width: min(820px, 100%); text-shadow: 0 3px 22px #000, 0 1px 4px #000; }
.ending__seal { width: 74px; height: 74px; margin-bottom: 25px; font-size: 29px; animation: stamp 0.62s ease-out; }
.ending[data-result="perfect"] .ending__seal { border-color: #d6bd79; color: #e7d296; box-shadow: inset 0 0 0 3px rgba(214,189,121,0.14), 0 0 30px rgba(199,168,89,0.12); }
.ending[data-result="dawn"] .ending__seal { border-color: #a8875d; color: #c4a371; }
.ending[data-result="wrong"] .ending__seal { border-color: #c34f48; color: #df6960; box-shadow: inset 0 0 0 3px rgba(195,79,72,0.16), 0 0 32px rgba(73,148,145,0.24); }
@keyframes stamp { from { transform: scale(2.8) rotate(-14deg); opacity: 0; } }
.ending h2 { margin: 9px 0 18px; font-size: 44px; }
.ending__content > p { max-width: 720px; margin: 0; color: #c7bca5; font-size: 13px; line-height: 2; }
.ending__secret { max-width: 720px; margin-top: 14px; padding: 9px 12px; border: 1px solid rgba(158,51,42,0.38); background: rgba(26,13,12,0.55); text-align: left; }
.ending__secret.resolved { border-color: rgba(82,121,107,0.62); background: rgba(18,31,26,0.52); }
.ending__secret.archive-complete { max-width: 820px; border-color: rgba(184,148,83,.68); background: rgba(25,25,17,.62); }
.ending__secret small { color: #b9955c; font-size: 9px; }
.ending__secret p { margin: 4px 0 0; color: #bdb19a; font-size: 10px; line-height: 1.65; }
.ending-reasoning-trace { width: min(760px,100%); max-height: 190px; margin-top: 8px; overflow: auto; border-top: 1px solid rgba(201,181,136,.25); border-bottom: 1px solid rgba(201,181,136,.16); background: rgba(4,6,5,.42); text-align: left; }
.ending-reasoning-trace > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; }
.ending-reasoning-trace > header > span { display: inline-flex; align-items: center; gap: 5px; }
.ending-reasoning-trace > header svg { width: 12px; height: 12px; color: #9eb7a8; }
.ending-reasoning-trace > header b { color: #d1bd94; font-size: 8px; }
.ending-reasoning-trace > header small { color: #8e8677; font-size: 7px; }
.ending-reasoning-trace ol { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; margin: 0; padding: 0 8px 7px; list-style: none; }
.ending-reasoning-trace li { min-width: 0; padding: 5px 6px; border-left: 2px solid rgba(82,121,107,.55); background: rgba(82,121,107,.05); }
.ending-reasoning-trace li > span { color: #88a594; font-size: 6px; }
.ending-reasoning-trace li b { display: block; margin-top: 2px; color: #b9ad93; font-size: 7px; }
.ending-reasoning-trace li p { margin: 2px 0 0; color: #817a6d; font-size: 6.2px; line-height: 1.35; }
.ending-reasoning-trace footer { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 7px; padding: 6px 8px; border-top: 1px solid rgba(201,181,136,.12); }
.ending-reasoning-trace footer b { color: #a48652; font-size: 7px; }
.ending-reasoning-trace footer span { color: #a69c88; font-size: 7px; line-height: 1.4; }
.ending__secret .archive-completion { grid-template-columns: 52px minmax(0,1fr); margin-top: 9px; padding: 9px 11px; background: rgba(7,9,8,.54); }
.ending__secret .archive-completion__seal { width: 46px; height: 46px; font-size: 12px; }
.ending__secret .archive-completion__copy small { font-size: 8px; }
.ending__secret .archive-completion__copy strong { font-size: 12px; }
.ending__secret .archive-completion__copy > p { font-size: 8px; line-height: 1.5; }
.ending__secret .archive-completion__layers em { font-size: 7px; }
.ending__secret .archive-completion__layers b { font-size: 8px; }
.ending__stats { display: flex; margin: 24px 0; }
.ending__stats span { min-width: 105px; padding: 11px 15px; border: 1px solid var(--line); color: var(--paper-dim); font-size: 10px; }
.ending__stats strong { display: block; margin-top: 5px; color: #d1bd91; font-size: 15px; }
.ending__series { margin: -8px 0 22px; color: #a89570; font-size: 10px; letter-spacing: 0.16em; }
.ending__actions { display: flex; align-items: center; justify-content: center; gap: 8px; }
.ending__actions button { min-height: 42px; }
.ending__actions .icon-button { width: 42px; height: 42px; min-width: 42px; }
.ending__actions .secondary-button { display: inline-flex; align-items: center; gap: 8px; }
.ending__actions svg { width: 16px; height: 16px; }

.offline-prep {
  position: fixed;
  z-index: 66;
  top: 82px;
  right: 20px;
  width: min(330px, calc(100% - 40px));
  display: grid;
  gap: 9px;
  padding: 12px 13px;
  border: 1px solid rgba(168,129,67,.48);
  border-left: 3px solid #a88143;
  border-radius: 4px;
  background: rgba(7,9,8,.96);
  box-shadow: 0 18px 54px rgba(0,0,0,.62);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}
.offline-prep__status { display: flex; align-items: center; gap: 9px; min-width: 0; }
.offline-prep__status > svg { width: 21px; height: 21px; flex: 0 0 auto; color: #c39f5d; }
.offline-prep__status span { min-width: 0; display: grid; gap: 2px; }
.offline-prep__status small { color: #9f8960; font-size: 8px; }
.offline-prep__status strong { color: #dec99f; font-size: 12px; font-weight: 500; }
.offline-prep > p { margin: 0; color: #aaa18e; font-size: 9px; line-height: 1.55; }
.offline-prep__network { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #8d856f; font-size: 8px; }
.offline-prep__network span { min-width: 0; overflow-wrap: anywhere; }
.offline-prep__network b { flex: 0 0 auto; color: #b9a47c; font-weight: 500; }
.offline-prep__meter { height: 3px; overflow: hidden; background: rgba(201,181,136,.12); }
.offline-prep__meter b { width: 0; height: 100%; display: block; background: #a88143; transition: width 180ms ease; }
.offline-prep__actions { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.offline-prep__actions > span { min-width: 0; color: #8e8676; font-size: 8px; overflow-wrap: anywhere; }
.offline-prep__actions button { min-width: 126px; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 9px; pointer-events: auto; }
.offline-prep__actions button svg { width: 14px; height: 14px; }
.offline-prep.ready { width: min(294px, calc(100% - 40px)); border-left-color: #52796b; }
.offline-prep.ready .offline-prep__status > svg { color: #79a28f; }
.offline-prep.ready > p { display: none; }
.offline-prep.ready .offline-prep__network { display: none; }
.offline-prep.ready .offline-prep__meter { display: none; }
.offline-prep.failed { border-left-color: #a64a3f; }
.offline-prep.failed .offline-prep__meter b { background: #a64a3f; }
body[data-story-stage]:not([data-story-stage="opening"]) .offline-prep:not(.preparing) {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
}

@media (max-width: 1050px) {
  .evidence-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .location-card { width: 230px; }
  .objective { width: min(260px, calc(100% - 44px)); }
  .dialogue { grid-template-columns: 34% 1fr; }
  .accusation__columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .scene-image { object-position: center; }
  .opening::before { left: 6%; }
  .opening::after { right: 6%; }
  .opening h1 { font-size: 48px; }
  .opening h1 small { font-size: 22px; }
  .opening__case { left: 20px; bottom: 22px; }
  .opening__ledger {
    top: 18px;
    right: 20px;
    width: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px 0 0;
    border-right-width: 1px;
    background: none;
  }
  .opening__ledger b { font-size: 10px; }
  .opening__ledger i { padding: 2px 5px; }
  .opening__lightning { left: 64%; width: 72px; height: 62%; }
  .prologue { align-items: flex-end; padding: 88px 20px 76px; }
  .prologue .story-stage__background { object-position: 42% center; }
  .prologue .story-stage__shade { background: linear-gradient(180deg, rgba(2,3,3,0.15), rgba(2,3,3,0.72) 45%, rgba(2,3,3,0.96)); }
  .prologue__panel { width: 100%; max-height: 72vh; padding: 15px 0 0 17px; overflow: auto; }
  .prologue__panel h2 { margin: 8px 0 14px; font-size: 24px; }
  .prologue__panel p { margin-bottom: 10px; font-size: 11px; line-height: 1.75; }
  .dossier { padding: 58px 10px 10px; place-items: stretch; }
  .dossier__shell { width: 100%; height: calc(100vh - 68px); padding: 0 10px; }
  .dossier__header { grid-template-columns: 1fr; gap: 5px; padding: 10px 0 8px; }
  .dossier__header h2 { font-size: 24px; }
  .dossier__header > p { font-size: 9px; line-height: 1.55; }
  .dossier__tabs { overflow-x: auto; grid-template-columns: repeat(4, minmax(82px, 1fr)); }
  .dossier__tabs button { min-height: 38px; font-size: 10px; white-space: nowrap; }
  .dossier__content { padding: 14px 1px 18px 0; }
  .dossier__intro { padding-left: 11px; }
  .dossier__intro h3 { font-size: 18px; }
  .dossier__intro p { font-size: 10.5px; line-height: 1.75; }
  .dossier__facts, .dossier__numbered, .dossier__people, .dossier__entries--rules, .dossier__entries--scenes, .dossier__entries--questions { grid-template-columns: 1fr; }
  .dossier__facts div { padding: 11px 12px; }
  .dossier__numbered { gap: 8px; }
  .dossier__panel > h3 { margin-top: 22px; }
  .dossier-person { min-height: 132px; grid-template-columns: 82px minmax(0, 1fr); }
  .dossier-person img { width: 82px; height: 132px; }
  .dossier-person div { padding: 10px 10px 9px 3px; }
  .dossier-person p { font-size: 10px; line-height: 1.6; }
  .dossier__entries article { grid-template-columns: 28px minmax(0, 1fr); padding: 10px; }
  .dossier__entries p { font-size: 10px; line-height: 1.65; }
  .dossier__footer { gap: 8px; padding: 8px 0; }
  .dossier__footer > span { display: none; }
  .dossier__footer .primary-button { width: 100%; min-height: 38px; }
  .briefing { display: block; }
  .briefing__portrait { position: absolute; inset: 3vh 0 35vh; height: auto; opacity: 0.86; }
  .briefing__portrait img { width: 76%; }
  .briefing__dialogue { position: absolute; left: 16px; right: 16px; bottom: 18px; max-height: 47vh; margin: 0; padding: 14px 0 0 14px; overflow: auto; }
  .briefing__identity h2 { font-size: 22px; }
  .briefing__dialogue > p { min-height: 62px; margin: 10px 0 13px; font-size: 12px; line-height: 1.75; }
  .briefing__questions { display: grid; grid-template-columns: 1fr 1fr; }
  .briefing__questions .primary-button { grid-column: 1 / -1; }
  .briefing__questions .secondary-button { min-width: 0; padding: 7px 9px; font-size: 11px; }
  .story-stage__folio { right: 18px; bottom: 18px; }
  .hud { height: 66px; grid-template-columns: 1fr auto; padding: 9px 10px; }
  .story-sound-button { top: 14px; left: 14px; }
  .time-meter { position: fixed; left: 0; top: 66px; width: 100%; }
  .time-meter span { display: none; }
  .time-meter i { height: 2px; margin: 0; }
  .case-mark span { display: none; }
  .case-mark strong { font-size: 11px; }
  .toolstrip { gap: 3px; }
  .icon-button { min-width: 34px; height: 34px; padding: 0 6px; }
  .icon-button.icon-only { width: 34px; }
  .toolstrip .icon-button span { display: none; }
  .scene-inspection-controls { top: 76px; right: 10px; }
  .scene-inspection-status { top: 78px; }
  .audio-mixer { top: 58px; right: 10px; width: min(320px, calc(100% - 20px)); }
  body:not(.game-started) .audio-mixer { top: 58px; left: 10px; }
  .location-card { top: 79px; left: 10px; width: calc(100% - 20px); padding: 6px 10px; display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: 'index title' 'index description'; column-gap: 8px; background: rgba(6,8,7,0.67); }
  .location-card span { grid-area: index; align-self: center; }
  .location-card h2 { grid-area: title; margin: 0; font-size: 15px; }
  .location-card p { grid-area: description; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .objective { top: 134px; left: 10px; right: auto; width: calc(100% - 20px); max-height: none; padding: 2px 10px; overflow: visible; text-align: left; border-right: 0; border-left: 1px solid var(--jade); background: rgba(6,8,7,0.68); }
  .objective__header { position: fixed; z-index: 20; top: 83px; right: 16px; margin: 0; padding: 0; border: 0; }
  .objective__header > span { display: none; }
  .objective__header button { min-height: 22px; padding: 2px 6px; background: rgba(6,8,7,0.9); }
  .objective.routes-open { top: 134px; width: calc(100% - 20px); max-height: calc(100vh - 218px); padding: 7px 9px; overflow: hidden; background: rgba(6,8,7,0.97); }
  .route-guide-list { max-height: calc(100vh - 410px); margin-top: 5px; }
  .route-guide-item { grid-template-columns: 24px minmax(0, 1fr); padding: 7px 1px; }
  .route-guide-item p { font-size: 9px; line-height: 1.5; }
  .toast { top: auto; bottom: 74px; width: calc(100% - 20px); min-width: 0; }
  .objective__main, .objective__side { display: block; }
  .objective__side { margin-top: 2px; padding-top: 2px; }
  .objective .objective__label { margin-right: 5px; font-size: 8px; line-height: inherit; letter-spacing: 0; white-space: nowrap; }
  .objective__bar { display: none; }
  .objective p { display: block; margin: 0; overflow: visible; font-size: 9.5px; line-height: 1.38; overflow-wrap: anywhere; }
  .location-nav { bottom: 8px; width: calc(100% - 16px); height: 56px; grid-template-columns: 34px minmax(0, 1fr) 34px; }
  .location-tabs { grid-template-columns: repeat(9, 88px); }
  .location-tabs button { min-width: 88px; }
  .hotspot { width: 30px; height: 30px; }
  .hotspot span { opacity: 1; bottom: 38px; max-width: 104px; padding: 4px 6px; font-size: 9px; }
  .hotspot--person { --person-label-gap: 3px; left: var(--person-mobile-left) !important; top: var(--person-mobile-top) !important; width: var(--person-mobile-width, 72px); height: var(--person-mobile-height, 126px); transform: translate(-50%, -100%); }
  .hotspot:not(.hotspot--person) { left: var(--hotspot-mobile-left) !important; top: var(--hotspot-mobile-top) !important; }
  .hotspot--person span { top: calc(var(--person-head-top, 0%) + var(--person-foot-offset, 0%)); bottom: auto; padding: 4px 6px; }
  .hotspot--evidence { width: 58px; height: 58px; }
  .hotspot--evidence span { bottom: 65px; }
  .inspect-card { bottom: 74px; padding: 18px; }
  .dialogue { display: block; }
  .dialogue__portrait { position: absolute; inset: 4vh 0 36vh; height: auto; opacity: 0.9; }
  .dialogue__portrait img { width: 70%; filter: drop-shadow(0 18px 25px rgba(0,0,0,0.88)) brightness(0.82) saturate(0.82) contrast(1.06) sepia(0.06); }
  .dialogue__body { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; min-height: 42vh; max-height: 58vh; margin: 0; padding: 17px 13px calc(14px + env(safe-area-inset-bottom)); overflow: auto; border-radius: 0; }
  .dialogue__body > p { min-height: 42px; margin: 12px 0; font-size: 12px; }
  .speech-progress { margin: -7px 0 8px; }
  .interview-approach { margin-bottom: 6px; }
  .interview-approach button { min-height: 25px; padding: 3px 8px; font-size: 8px; }
  .dialogue__options { grid-template-columns: 1fr; max-height: 27vh; overflow: auto; }
  .dialogue__meta strong { font-size: 17px; }
  .interview-meters { gap: 6px; }
  .composure, .patience-meter { min-width: 72px; }
  .composure i, .patience-meter i { width: 68px; }
  .panel { padding: 24px 12px 18px; }
  .panel::before { inset: 6px; }
  .panel__header h2 { font-size: 24px; }
  .evidence-grid { grid-template-columns: 1fr; }
  .evidence-card { min-height: 158px; display: grid; grid-template-columns: 132px 1fr; }
  .evidence-card__image { height: 100%; min-height: 158px; }
  .task-list, .chain-grid { grid-template-columns: 1fr; }
  .task-list__section { align-items: flex-start; flex-direction: column; gap: 3px; }
  .task-list__section small { text-align: left; }
  .task-filters { margin-bottom: 8px; }
  .task-filters button { min-height: 27px; padding: 4px 10px; font-size: 9px; }
  .case-recap { grid-template-columns: 1fr; gap: 5px; padding: 8px 10px; }
  .case-recap .case-recap__latest { grid-template-columns: auto minmax(0, 1fr); gap: 4px 7px; }
  .case-recap .case-recap__latest em { grid-column: 1 / -1; }
  .hidden-truth { grid-template-columns: 1fr; gap: 7px; }
  .hidden-truth.resolved { grid-template-columns: 1fr; }
  .hidden-truth__archive > div { flex-wrap: wrap; }
  .archive-completion { grid-template-columns: 38px minmax(0,1fr); }
  .archive-completion__layers { grid-template-columns: 1fr; }
  .culpability-analysis { grid-template-columns: 1fr; align-items: stretch; }
  .culpability-analysis.resolved { grid-template-columns: 1fr; }
  .culpability-candidates { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .culpability-analysis > button { width: 100%; min-height: 36px; }
  .hidden-truth > button { min-height: 32px; }
  .residue-board__head, .residue-row { grid-template-columns: minmax(88px, 0.9fr) repeat(3, minmax(82px, 1fr)); gap: 3px; }
  .residue-row { padding: 3px; }
  .residue-row > strong { padding: 5px 6px; font-size: 10px; }
  .residue-row button { min-height: 32px; padding: 3px; font-size: 8px; }
  .route-reenactment { width: min(620px, 100%); aspect-ratio: 16 / 7; }
  .route-reenactment > button { min-width: 70px; min-height: 34px; grid-template-columns: 16px 1fr; padding: 3px 4px; font-size: 7px; }
  .route-reenactment > button b { width: 14px; height: 14px; font-size: 7px; }
  .route-reenactment__trail { bottom: 4px; padding: 3px 5px; font-size: 7px; }
  .deduction__status { display: block; }
  .deduction-workbench { height: 240px; background-position: center 58%; }
  .deduction-workbench > button { min-height: 29px; gap: 4px; padding: 4px 6px; font-size: 7.5px; }
  .deduction-workbench > button[data-deduction-note="timeline"],
  .deduction-workbench > button[data-deduction-note="culpability"] { --note-y: 57% !important; }
  .deduction-workbench > button svg { width: 12px; height: 12px; }
  .deduction-workbench__copy { left: 8%; right: 8%; bottom: 7px; min-height: 68px; padding: 7px 9px; }
  .deduction-workbench__copy small { font-size: 7px; }
  .deduction-workbench__copy strong { font-size: 10px; }
  .deduction-workbench__copy p { font-size: 7.5px; line-height: 1.4; }
  .chain { min-height: 292px; }
  .modal-stage { padding: 9px; }
  .puzzle-sheet, .accusation-sheet { padding: 24px 14px; max-height: 96vh; }
  .ring-sheet { overflow-y: auto; }
  .ring-workspace { grid-template-columns: 1fr; gap: 12px; min-height: 0; }
  .ring-clues { max-height: none; overflow: visible; padding-right: 0; }
  .ring-controls { order: 2; }
  .puzzle-sheet h2, .accusation-sheet h2 { font-size: 22px; }
  .ring-readout { gap: 4px; }
  .ring-readout span { padding: 6px 3px; font-size: 9px; }
  .ring-readout strong { font-size: 14px; }
  .puzzle-case-link { padding: 10px; }
  .puzzle-case-link p { grid-template-columns: 1fr; gap: 2px; font-size: 10px; }
  .puzzle-operation-rail { gap: 4px; margin: 7px 0 8px; }
  .puzzle-operation-rail li { grid-template-columns: 19px minmax(0, 1fr); gap: 4px; padding: 5px; }
  .puzzle-operation-rail li > span { width: 18px; height: 18px; }
  .puzzle-operation-rail b { font-size: 8px; }
  .puzzle-operation-rail small { font-size: 7px; }
  .progressive-hints__button { min-height: 42px; font-size: 11px; }
  .progressive-hints__list p { font-size: 10px; }
  .cipher-fragments, .cipher-slots { grid-template-columns: 1fr; }
  .cipher-fragments span { padding: 8px; }
  .ledger-reconstruction__sheet { min-height: 118px; padding: 12px 10px; }
  .ledger-reconstruction__slots { gap: 5px; }
  .ledger-reconstruction__slots button { min-height: 76px; padding: 6px; }
  .ledger-reconstruction__fragments { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .lantern-board { height: 170px; padding-left: 0; padding-right: 0; }
  .lantern-board button { width: 48px; height: 72px; }
  .lantern-legend { margin-top: 1px; }
  .sequence-pool, .token-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sequence-tray { flex-wrap: wrap; }
  .sequence-tray button { min-width: 60px; }
  .rubbing-row { grid-template-columns: 1fr; }
  .rubbing-row > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .medicine-board label, .tumbler-board label { grid-template-columns: 1fr; gap: 5px; }
  .orientation-board { grid-template-columns: repeat(2, 1fr); }
  .orientation-board button { min-height: 128px; }
  .fragment-face { width: 56px; height: 56px; }
  .fragment-edge { width: 40px; height: 40px; }
  .token-board button { grid-template-columns: 54px minmax(0,1fr); gap: 7px; min-height: 100px; padding: 8px; }
  .token-visual { width: 50px; height: 50px; }
  .token-traits b { font-size: 8px; }
  .memory-board { grid-template-columns: repeat(3, 72px); }
  .cross-exam-heads { height: 126px; grid-template-columns: 1fr 28px 1fr; }
  .cross-exam-heads figure, .cross-exam-heads figure:last-child { grid-template-columns: 62px 1fr; }
  .cross-exam-heads figure:last-child { grid-template-columns: 1fr 62px; }
  .cross-exam-heads img { width: 62px; height: 126px; }
  .cross-exam-heads figcaption { font-size: 12px; }
  .cross-exam-row { grid-template-columns: 1fr; }
  .cross-exam-row > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .accusation__columns { grid-template-columns: 1fr; }
  .ending { padding: 22px; }
  .ending h2 { font-size: 30px; }
  .ending__stats { display: grid; grid-template-columns: 1fr 1fr; }
  .ending__stats span { min-width: 110px; }
  .ending__content > p { max-height: 28vh; overflow: auto; font-size: 11px; line-height: 1.8; }
  .ending__actions { width: min(100%, 360px); display: grid; grid-template-columns: 42px minmax(0, 1fr) minmax(0, 1fr); }
  .ending__actions button { min-width: 0; padding-inline: 10px; }
  .whisper { right: 18px; max-width: 70%; font-size: 13px; }
}

/* One visual contract for every puzzle: the mechanic changes, the player's
   hand does not. Keep the three verbs large and the mechanic copy in one slot. */
.puzzle-operation-rail {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 9px 0 8px;
}
.puzzle-operation-rail li {
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 7px;
  min-height: 46px;
  padding: 7px 8px;
  border-color: rgba(201,181,136,.16);
  background: rgba(7,9,8,.42);
}
.puzzle-operation-rail li > .puzzle-operation-rail__mark {
  width: 25px;
  height: 25px;
  border: 1px solid rgba(201,181,136,.28);
  border-radius: 50%;
  color: #b5a477;
  font-size: 13px;
  font-weight: 600;
}
.puzzle-operation-rail b {
  color: #c3b58f;
  font-size: 10px;
  font-weight: 600;
}
.puzzle-operation-rail small {
  margin-top: 3px;
  color: #898273;
  font-size: 8px;
  line-height: 1.25;
}
.puzzle-operation-rail li.is-active {
  border-color: rgba(194,154,83,.72);
  background: rgba(168,129,67,.14);
}
.puzzle-operation-rail li.is-active > .puzzle-operation-rail__mark {
  color: #f0d18b;
  border-color: #c29a53;
  box-shadow: 0 0 0 3px rgba(194,154,83,.1);
}
.puzzle-operation-rail li.is-done > .puzzle-operation-rail__mark {
  color: #a8cbb8;
  border-color: #6f9b87;
}
.puzzle-operation-brief {
  grid-template-columns: 54px 16px minmax(0, 1fr);
  min-height: 58px;
  padding: 7px 8px;
}
.puzzle-operation-brief > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.puzzle-operation-brief b { font-size: 11px; }
.puzzle-operation-brief em {
  color: #c1c3b5;
  font-size: 8.5px;
  line-height: 1.4;
}
.puzzle-operation-brief__detail {
  display: block;
  color: #96aa9d;
  font-size: 8px;
  line-height: 1.35;
}
.puzzle-operation-brief[data-operation-family="sequence"] { border-left-color: rgba(153,170,133,.72); }
.puzzle-operation-brief[data-operation-family="confront"] { border-left-color: rgba(181,132,124,.72); }
.puzzle-operation-brief[data-operation-family="assemble"] { border-left-color: rgba(177,157,104,.72); }
.puzzle-operation-brief[data-operation-family="retrace"] { border-left-color: rgba(117,158,145,.72); }
.puzzle-operation-brief[data-operation-family="classify"] { border-left-color: rgba(142,165,132,.72); }
.puzzle-operation-brief[data-operation-family="reconstruct"] { border-left-color: rgba(160,143,173,.72); }

.puzzle-value-control {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.puzzle-value-control > button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(201,181,136,.3);
  border-radius: 2px;
  color: #d2bd86;
  background: rgba(168,129,67,.1);
  cursor: pointer;
}
.puzzle-value-control > button:hover,
.puzzle-value-control > button:focus-visible {
  border-color: rgba(221,194,126,.74);
  background: rgba(168,129,67,.2);
}
.puzzle-value-control > button svg { width: 12px; height: 12px; }

@media (max-width: 760px) {
  .puzzle-operation-rail li {
    grid-template-columns: 23px minmax(0, 1fr);
    min-height: 41px;
    padding: 6px;
  }
  .puzzle-operation-rail li > .puzzle-operation-rail__mark { width: 22px; height: 22px; font-size: 11px; }
  .puzzle-operation-rail b { font-size: 9px; }
  .puzzle-operation-rail small { font-size: 7.5px; }
  .puzzle-operation-brief { min-height: 56px; }
  .puzzle-operation-brief b { font-size: 10px; }
  .puzzle-operation-brief__detail { font-size: 8px; }
  .puzzle-value-control { grid-template-columns: 26px minmax(0, 1fr) 26px; }
  .puzzle-value-control > button { width: 26px; height: 26px; }
}

.landscape-gate { display: none; }

@media (max-width: 760px) and (orientation: portrait) {
  .landscape-gate {
    position: fixed;
    z-index: 120;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 10px;
    padding: 28px;
    text-align: center;
    background: radial-gradient(circle at 50% 42%, rgba(26,30,26,0.98), rgba(4,5,5,0.995) 72%);
  }
  .landscape-gate::before { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(190,151,82,0.32); pointer-events: none; }
  .landscape-gate > svg { width: 42px; height: 42px; color: #c6aa70; transform: rotate(90deg); }
  .landscape-gate h2 { margin: 4px 0 0; color: #e0cfa9; font-size: 24px; letter-spacing: 0; }
  .landscape-gate p { max-width: 300px; margin: 0 0 6px; color: #aaa18e; font-size: 11px; line-height: 1.8; }
  .landscape-gate .primary-button { min-height: 38px; }
}

@media (orientation: landscape) and (max-height: 540px) {
  body { --mobile-rail: clamp(190px, 25vw, 220px); }

  .opening h1 { margin: 7px 0 6px; font-size: 38px; line-height: 1; }
  .opening h1 small { margin-top: 7px; font-size: 17px; }
  .opening .eyebrow { font-size: 9px; }
  .opening .seal { width: 32px; height: 32px; margin: 8px auto; font-size: 15px; }
  .opening__lede { margin: 6px 0 11px; font-size: 10.5px; line-height: 1.65; }
  .opening__content .primary-button { min-height: 34px; }
  .opening__case { left: 18px; bottom: 13px; padding-left: 10px; }
  .opening__case span { font-size: 8px; }
  .opening__case strong { margin: 3px 0; font-size: 11px; }
  .opening__case p { font-size: 8px; }
  .opening__ledger { top: 12px; right: 16px; width: auto; gap: 5px; padding: 7px 9px; }
  .opening__ledger span, .opening__ledger b { font-size: 8px; }
  .opening__ledger i { padding: 2px 5px; font-size: 7px; }
  .story-sound-button { top: 10px; left: 10px; }

  .dossier { padding: 8px 12px; place-items: stretch; }
  .dossier__shell { width: 100%; height: calc(100vh - 16px); padding: 0 14px; }
  .dossier__header { grid-template-columns: minmax(180px, .72fr) minmax(260px, 1fr); gap: 14px; padding: 7px 0 6px; }
  .dossier__header h2 { margin-top: 1px; font-size: 20px; }
  .dossier__header > p { padding-right: 42px; font-size: 8.5px; line-height: 1.4; }
  body:has(#dossier:not(.hidden)) .story-sound-button { right: 10px; }
  .dossier__tabs { grid-template-columns: repeat(4, minmax(92px, 1fr)); overflow: visible; }
  .dossier__tabs button { min-height: 29px; font-size: 9px; }
  .dossier__content { padding: 8px 2px 11px 0; }
  .dossier__intro { padding-left: 10px; }
  .dossier__intro h3 { margin: 3px 0 5px; font-size: 16px; }
  .dossier__intro p { font-size: 9px; line-height: 1.55; }
  .dossier__panel > h3 { margin: 15px 0 8px; font-size: 13px; }
  .dossier__facts, .dossier__numbered, .dossier__people, .dossier__entries--rules, .dossier__entries--scenes, .dossier__entries--questions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dossier__facts { margin-top: 10px; }
  .dossier__facts div { padding: 8px 10px; }
  .dossier__facts dt, .dossier__facts dd, .dossier__numbered li { font-size: 9px; }
  .dossier__facts dd { margin-top: 4px; line-height: 1.55; }
  .dossier__numbered { gap: 5px 14px; }
  .dossier__numbered li { min-height: 38px; padding: 0 0 6px 27px; line-height: 1.5; }
  .dossier__people { gap: 6px 10px; margin-top: 10px; }
  .dossier-person { min-height: 106px; grid-template-columns: 68px minmax(0, 1fr); }
  .dossier-person img { width: 68px; height: 106px; }
  .dossier-person div { padding: 7px 8px 6px 3px; }
  .dossier-person h4 { font-size: 13px; }
  .dossier-person p { margin-top: 4px; font-size: 8.5px; line-height: 1.5; }
  .dossier__entries { margin-top: 8px; }
  .dossier__entries article { grid-template-columns: 26px minmax(0, 1fr); gap: 7px; padding: 7px 9px; }
  .dossier__entries h4 { font-size: 10px; }
  .dossier__entries p { margin-top: 3px; font-size: 8.5px; line-height: 1.5; }
  .dossier__footer { gap: 10px; padding: 5px 0 6px; }
  .dossier__footer > span { display: block; font-size: 8px; }
  .dossier__footer .primary-button { width: auto; min-height: 31px; padding: 5px 14px; font-size: 10px; }

  .prologue { align-items: center; justify-content: flex-end; padding: 18px 34px; }
  .prologue .story-stage__shade { background: linear-gradient(90deg, rgba(2,3,3,0.12), rgba(3,4,4,0.46) 48%, rgba(3,4,4,0.94) 82%); }
  .prologue__panel { width: min(470px, 53vw); max-height: calc(100vh - 30px); padding: 10px 0 10px 18px; overflow-y: auto; }
  .prologue__panel h2 { margin: 6px 0 9px; font-size: 23px; line-height: 1.25; }
  .prologue__panel p { margin-bottom: 6px; font-size: 9.5px; line-height: 1.55; }
  .prologue__panel .primary-button { min-height: 32px; margin-top: 4px; }
  .story-stage__folio { right: 15px; bottom: 10px; font-size: 8px; }

  .briefing { display: grid; grid-template-columns: minmax(210px, 38%) 1fr; align-items: end; }
  .briefing__portrait { position: relative; inset: auto; height: 96vh; opacity: 1; }
  .briefing__portrait img { width: min(100%, 360px); }
  .briefing__dialogue { position: relative; left: auto; right: auto; bottom: auto; max-height: calc(100vh - 26px); margin: 0 24px 13px 0; padding: 10px 0 0 16px; overflow-y: auto; }
  .briefing__identity h2 { font-size: 20px; }
  .briefing__dialogue > p { min-height: 0; margin: 7px 0 9px; font-size: 10px; line-height: 1.55; }
  .briefing__questions { display: flex; flex-wrap: wrap; gap: 5px; }
  .briefing__questions .primary-button { grid-column: auto; }
  .briefing__questions .secondary-button, .briefing__questions .primary-button { min-width: 112px; min-height: 32px; padding: 5px 9px; font-size: 9px; }

  .hud { height: 52px; grid-template-columns: minmax(125px, 1fr) 130px auto; padding: 6px 9px; }
  .case-mark { padding-left: 8px; }
  .case-mark span { display: block; font-size: 7.5px; }
  .case-mark strong { margin-top: 2px; font-size: 10px; }
  .time-meter { position: static; width: 130px; }
  .time-meter span { display: block; font-size: 8px; }
  .time-meter i { height: 2px; margin-top: 5px; }
  .toolstrip { gap: 3px; }
  .icon-button { min-width: 29px; height: 29px; padding: 0 5px; gap: 4px; }
  .icon-button.icon-only { width: 29px; min-width: 29px; }
  .icon-button svg { width: 14px; height: 14px; }
  .toolstrip .icon-button span { display: block; font-size: 7px; }

  body.game-started > .scene-view {
    inset: auto !important;
    top: 50% !important;
    right: 0 !important;
    left: auto !important;
    width: calc(100vw - var(--mobile-rail));
    height: auto;
    aspect-ratio: 16 / 9;
    transform: translateY(-50%) !important;
  }
  body.game-started .scene-image { object-fit: cover; object-position: center; transform: none; }
  body.game-started .scene-hotspots { inset: 0; transform: none; }

  .location-card { top: 58px; left: 8px; width: calc(var(--mobile-rail) - 16px); padding: 7px 9px; display: block; background: rgba(6,8,7,0.9); }
  .location-card span { font-size: 7.5px; }
  .location-card h2 { margin: 3px 0 4px; font-size: 14px; }
  .location-card p { display: -webkit-box; margin: 0; overflow: hidden; font-size: 8px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }
  .objective { top: 150px; left: 8px; right: auto; width: calc(var(--mobile-rail) - 16px); max-height: calc(100vh - 162px); padding: 6px 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; touch-action: pan-y; pointer-events: auto; background: rgba(6,8,7,0.92); }
  .objective__header { position: static; margin: 0 0 5px; padding: 0 0 4px; }
  .objective__header > span { display: block; font-size: 7px; }
  .objective__header button { min-height: 22px; padding: 2px 4px; }
  .objective__header button b { font-size: 7.5px; }
  .objective__header button em { font-size: 7px; }
  .objective__main, .objective__side { display: block; }
  .objective__side { margin-top: 3px; padding-top: 3px; }
  .objective p { display: block; margin: 0; overflow: visible; font-size: 8px; line-height: 1.38; }
  .objective .objective__label { margin-right: 4px; font-size: 7px; }
  .objective.routes-open { top: 58px; width: calc(var(--mobile-rail) - 16px); max-height: calc(100vh - 66px); padding: 7px 8px; }
  .route-guide-list { max-height: calc(100vh - 178px); margin-top: 5px; }
  .route-guide-item { grid-template-columns: 20px minmax(0,1fr); gap: 5px; padding: 5px 0; }
  .route-guide-item strong { font-size: 8px; }
  .route-guide-item p { font-size: 7.5px; line-height: 1.4; }

  .location-nav { left: calc(var(--mobile-rail) + 6px); right: 6px; bottom: 5px; width: auto; height: 46px; grid-template-columns: 30px minmax(0,1fr) 30px; transform: none; }
  .location-tabs { grid-template-columns: repeat(9, 72px); }
  .location-tabs button { min-width: 72px; padding: 4px; }
  .location-tabs span { font-size: 7px; }
  .location-tabs b { margin-top: 2px; font-size: 8px; }

  .hotspot { left: var(--hotspot-landscape-left) !important; top: var(--hotspot-landscape-top) !important; width: 27px; height: 27px; }
  .hotspot span { bottom: 34px; max-width: 90px; padding: 3px 5px; font-size: 7.5px; }
  .hotspot--person { --person-label-gap: 3px; left: var(--person-landscape-left) !important; top: var(--person-landscape-top) !important; width: auto; height: min(var(--person-landscape-height), 68%); aspect-ratio: 104 / 176; transform: translate(-50%, -100%); }
  .hotspot--person span { top: calc(var(--person-head-top, 0%) + var(--person-foot-offset, 0%)); bottom: auto; padding: 3px 5px; }
  .hotspot--evidence { width: 46px; height: 46px; }
  .hotspot--evidence span { bottom: 52px; }

  .toast, .toast.show { top: 58px; left: 8px; right: auto; bottom: auto; width: calc(var(--mobile-rail) - 16px); min-width: 0; max-width: none; padding: 8px; transform: none; font-size: 8.5px; line-height: 1.45; }
  body.toast-active .location-card,
  body:has(.toast.show) .location-card { display: none; }
  body:has(.objective.routes-open) .location-card,
  body:has(.objective.routes-open) .toast { opacity: 0; visibility: hidden; }
  body.modal-open .location-card, body.modal-open .objective, body.modal-open .location-nav, body.modal-open .toast { opacity: 0; visibility: hidden; }
  .whisper { right: 12px; bottom: 60px; max-width: 45%; font-size: 10px; }
  .inspect-card { left: calc(var(--mobile-rail) + 8px); right: 8px; bottom: 57px; width: auto; max-height: calc(100vh - 68px); padding: 12px 14px; overflow-y: auto; transform: none; }
  .inspect-viewer { width: calc(100% + 28px); height: 122px; margin: -12px -14px 9px; }
  .inspect-image { width: 100%; height: 100%; margin: 0; }
  .inspect-lens { width: 66px; height: 66px; }
  .inspect-progress { height: 24px; padding: 0 8px; font-size: 7px; }
  .inspect-scan-layer { bottom: 24px; }
  .inspect-hint { top: 5px; left: 5px; width: 26px !important; min-width: 26px !important; height: 26px !important; }
  .inspect-card h2 { margin: 4px 0 6px; font-size: 17px; }
  .inspect-card > p { margin-bottom: 7px; font-size: 9px; line-height: 1.45; }
  .inspect-findings { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 4px; margin-bottom: 7px; }
  .inspect-findings li { grid-template-columns: 14px minmax(0,1fr); gap: 3px; padding: 4px; }
  .inspect-findings li > span { font-size: 6.5px; }
  .inspect-findings li p { font-size: 6.8px; line-height: 1.35; }
  .inspect-conclusion { margin-bottom: 6px; padding: 5px 7px; }
  .inspect-conclusion p { font-size: 7.5px; line-height: 1.4; }
  .inspect-reaction { grid-template-columns: 34px minmax(0,1fr); gap: 6px; margin-bottom: 6px; padding: 4px 6px 4px 3px; }
  .inspect-reaction img { width: 34px; height: 42px; }
  .inspect-reaction small { font-size: 6px; }
  .inspect-reaction strong { font-size: 8px; }
  .inspect-reaction p { font-size: 7px; line-height: 1.35; }
  .inspect-card .primary-button { min-height: 32px; }

  .dialogue { display: grid; grid-template-columns: minmax(205px, 34%) 1fr; align-items: end; }
  .dialogue__portrait { position: relative; inset: auto; height: 96vh; opacity: 1; }
  .dialogue__portrait img { width: min(100%, 350px); height: 100%; }
  .dialogue__body { position: relative; z-index: auto; left: auto; right: auto; bottom: auto; min-height: 0; max-height: calc(100vh - 20px); margin: 10px 15px 10px 0; padding: 11px 42px 11px 13px; overflow-y: auto; }
  .dialogue__meta { gap: 8px; }
  .dialogue__meta strong { font-size: 16px; }
  .interview-meters { gap: 6px; }
  .composure, .patience-meter { min-width: 70px; }
  .composure i, .patience-meter i { width: 66px; margin-top: 4px; }
  .dialogue__body > p { min-height: 0; margin: 7px 0; font-size: 10px; line-height: 1.55; }
  .speech-progress { margin: -4px 0 5px; }
  .interview-approach { margin-bottom: 5px; }
  .interview-approach > span { font-size: 7px; }
  .interview-approach button { min-height: 22px; padding: 2px 7px; font-size: 7px; }
  .dialogue__body > .testimony-note { margin: -3px 0 5px; padding: 4px 6px; font-size: 7.5px; }
  .dialogue__options { grid-template-columns: 1fr 1fr; gap: 4px; max-height: none; overflow: visible; }
  .dialogue__options button { min-height: 31px; padding: 5px 7px; font-size: 8.5px; }
  .dialogue__close { top: 8px; right: 8px; }

  .panel { padding: 12px 18px; }
  .panel::before { inset: 6px; }
  .panel__header { margin-bottom: 9px; }
  .panel__header h2 { margin-top: 2px; font-size: 22px; }
  .deduction-workbench { height: 218px; margin: 7px 0 5px; background-position: center 61%; }
  .deduction-workbench > button { min-height: 27px; gap: 4px; padding: 3px 6px; font-size: 7px; }
  .deduction-workbench > button[data-deduction-note="timeline"],
  .deduction-workbench > button[data-deduction-note="culpability"] { --note-y: 57% !important; }
  .deduction-workbench > button svg { width: 11px; height: 11px; }
  .deduction-workbench__copy { left: 15%; right: 15%; bottom: 6px; min-height: 58px; padding: 5px 8px; }
  .deduction-workbench__copy small { font-size: 6px; }
  .deduction-workbench__copy strong { font-size: 8.5px; }
  .deduction-workbench__copy p { font-size: 6.5px; line-height: 1.35; }
  .evidence-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; }
  .evidence-card { min-height: 180px; display: block; }
  .evidence-card__image { height: 82px; min-height: 0; }
  .evidence-card__copy { padding: 8px; }
  .evidence-card .tag { top: 8px; right: 8px; }
  .evidence-card h3 { margin: 5px 0 4px; font-size: 12px; }
  .evidence-card p { font-size: 8px; line-height: 1.45; }
  .task-list { grid-template-columns: 1fr 1fr; gap: 6px; }
  .task-filters { margin-bottom: 6px; }
  .task-filters button { min-height: 24px; padding: 3px 8px; font-size: 8px; }
  .case-recap { grid-template-columns: minmax(180px, 1fr) 1fr 1fr; gap: 7px; margin-bottom: 6px; padding: 6px 8px; }
  .case-recap strong { font-size: 8px; }
  .case-recap p { font-size: 7px; }
  .case-recap .case-recap__latest { grid-template-columns: auto minmax(110px, .7fr) minmax(210px, 1.6fr); gap: 5px; padding-top: 4px; }
  .hidden-truth { grid-template-columns: minmax(150px, 0.65fr) minmax(330px, 1.45fr) auto; gap: 7px; margin: 4px 0; padding: 7px 8px; }
  .hidden-truth.resolved { grid-template-columns: minmax(230px, 1.15fr) minmax(220px, .85fr) auto; }
  .hidden-truth__archive { margin-top: 3px; }
  .hidden-truth__archive > div { flex-wrap: nowrap; }
  .hidden-truth__archive span { padding: 2px 4px; font-size: 6px; }
  .archive-completion { grid-template-columns: 34px minmax(0,1fr); gap: 6px; margin-top: 4px; padding: 5px 6px; }
  .archive-completion__seal { width: 31px; height: 31px; font-size: 8px; }
  .archive-completion__copy > p { font-size: 5.8px; line-height: 1.3; }
  .archive-completion__layers b { font-size: 5.5px; }
  .hidden-truth__copy strong { font-size: 9px; }
  .hidden-truth__copy p { font-size: 7px; }
  .hidden-truth__slots > span { min-height: 24px; font-size: 7px; }
  .hidden-truth__evidence button { min-width: 64px; min-height: 25px; font-size: 6.5px; }
  .hidden-truth > button { min-width: 72px; min-height: 28px; padding: 4px 6px; font-size: 7px; }
  .task-item { min-height: 88px; grid-template-columns: 30px minmax(0,1fr) 32px; gap: 7px; padding: 8px; }
  .task-item__enter { width: 32px; height: 32px; }
  .task-list__section { padding: 5px 7px; }
  .task-list__section b { font-size: 7px; }
  .task-list__section small { font-size: 6px; }
  .task-item h3 { margin: 3px 0; font-size: 12px; }
  .task-item p { font-size: 8px; line-height: 1.45; }
  .chain-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; margin: 8px 0; }
  .variant-hypothesis { grid-template-columns: minmax(150px, 0.8fr) minmax(330px, 1.7fr) auto; gap: 8px; margin: 6px 0 2px; padding: 7px 8px; }
  .variant-hypothesis__copy strong { font-size: 10px; }
  .variant-hypothesis__copy p { font-size: 7px; line-height: 1.4; }
  .testimony-classifiers { gap: 4px; }
  .testimony-classifier { font-size: 6.8px; }
  .testimony-classifier select, .testimony-classifier em, .testimony-classifier b { height: 25px; font-size: 7px; }
  .variant-hypothesis > button { min-width: 88px; min-height: 28px; padding: 5px; font-size: 7px; }
  .witness-support { grid-template-columns: minmax(145px,.58fr) minmax(440px,2fr); gap: 6px; margin: 4px 0; padding: 6px 7px; }
  .witness-support__copy strong { font-size: 9px; }
  .witness-support__copy p { font-size: 6.5px; line-height: 1.3; }
  .witness-support__list { gap: 2px; }
  .witness-support__item { padding: 3px 4px; }
  .witness-support__item b { font-size: 6px; }
  .witness-support__item em { font-size: 5.5px; }
  .culpability-analysis { grid-template-columns: minmax(112px,.58fr) minmax(390px,2.25fr) minmax(125px,.65fr) auto; gap: 5px; margin: 4px 0; padding: 6px 7px; }
  .culpability-analysis.resolved { grid-template-columns: 1.2fr 1fr auto; }
  .culpability-analysis p { font-size: 6.8px; line-height: 1.35; }
  .culpability-board { gap: 3px; }
  .culpability-roles { gap: 2px; }
  .culpability-roles button { min-height: 30px; grid-template-columns: 14px 1fr; gap: 0 3px; padding: 3px; }
  .culpability-roles button small { width: 13px; height: 13px; }
  .culpability-roles button small::after { font-size: 5px; }
  .culpability-roles button b { font-size: 6px; }
  .culpability-roles button span { font-size: 5px; }
  .culpability-candidates { gap: 2px; }
  .culpability-candidates button { min-height: 69px; grid-template-rows: 38px auto auto minmax(12px,auto); gap: 0; padding: 2px; }
  .culpability-candidates button img { height: 38px; }
  .culpability-candidates button strong { font-size: 6px; }
  .culpability-candidates button small, .culpability-candidates button > span { font-size: 4.8px; }
  .culpability-board__footer { font-size: 5.5px; }
  .culpability-board__footer button { min-height: 19px; padding: 1px 4px; font-size: 5.5px; }
  .culpability-analysis > button { min-width: 76px; min-height: 27px; padding: 4px; font-size: 7px; }
  .permission-list { gap: 2px; }
  .permission-list span { font-size: 6px; }
  .chain { min-height: 226px; padding: 10px; }
  .chain.solved { min-height: 128px; }
  .chain h3 { margin: 5px 0 8px; font-size: 13px; }
  .chain__result { min-height: 42px; font-size: 8px; line-height: 1.45; }
  .chain select { height: 31px; font-size: 8px; }
  .panel__footer { height: 32px; }

  .modal-stage { padding: 6px; }
  .puzzle-sheet, .accusation-sheet { width: min(820px, calc(100% - 8px)); max-height: calc(100vh - 12px); padding: 14px 18px; }
  .ring-sheet { width: min(920px, calc(100% - 8px)); }
  .ring-sheet > span { display: inline; margin-right: 7px; }
  .ring-sheet > h2 { display: inline; font-size: 18px; }
  .ring-sheet > #ring-hint { margin: 4px 0 0; }
  .puzzle-sheet h2, .accusation-sheet h2 { margin: 3px 0 5px; font-size: 20px; }
  .puzzle-sheet > p, .accusation-sheet > p { margin: 4px 0; font-size: 8.5px; line-height: 1.45; }
  .puzzle-case-link { margin: 7px 0; padding: 7px 9px; }
  .puzzle-case-link p { grid-template-columns: 92px 1fr; gap: 6px; font-size: 8px; }
  .puzzle-operation-rail { margin: 5px 0 6px; }
  .puzzle-operation-rail li { min-height: 27px; padding: 3px 5px; }
  .puzzle-operation-rail li > span { width: 17px; height: 17px; font-size: 7px; }
  .puzzle-operation-rail b { font-size: 7.5px; }
  .puzzle-operation-rail small { font-size: 6.5px; }
  .progressive-hints { margin: 7px 0; }
  .progressive-hints__button { min-height: 31px; font-size: 9px; }
  .progressive-hints__list p { font-size: 8.5px; }
  .ledger-reconstruction { gap: 4px; margin: 7px 0 2px; }
  .ledger-reconstruction__sheet { min-height: 78px; padding: 7px 9px; }
  .ledger-reconstruction__slots { gap: 5px; }
  .ledger-reconstruction__slots button { min-height: 58px; gap: 1px; padding: 4px; }
  .ledger-reconstruction__slots button b { font-size: 9px; }
  .ledger-reconstruction__slots button span { font-size: 6px; }
  .ledger-reconstruction__fragments { gap: 3px; }
  .ledger-reconstruction__fragments button { min-height: 38px; gap: 0; padding: 3px 4px; }
  .ledger-reconstruction__fragments button b { font-size: 7px; }
  .ledger-reconstruction__fragments button span { font-size: 5.5px; }
  .ledger-reconstruction__status { min-height: 12px; font-size: 6px; }
  .ring-workspace { grid-template-columns: minmax(0, 1fr) minmax(176px, 31vw); gap: 10px; height: min(264px, calc(100vh - 143px)); min-height: 0; margin-top: 4px; }
  .ring-clues { padding: 0 4px 44px 0; scroll-padding-bottom: 44px; }
  .ring-clues .puzzle-rescue.solution-open > p { display: none; }
  .ring-puzzle { width: 160px; margin: 0 auto 4px; }
  .ring--outer { --mark-size: 7px; }
  .ring--middle { --mark-size: 6.5px; }
  .ring--inner { --mark-size: 6px; }
  .ring-face > i::after { width: 1px; }
  .ring-readout { margin: 4px auto; }
  .ring-readout span { padding: 4px 3px; font-size: 7px; }
  .ring-readout strong { font-size: 11px; }
  .ring-reference { margin-bottom: 0 !important; font-size: 7.5px !important; line-height: 1.4 !important; }
  .modal-actions { margin-top: 8px; }
  .modal-actions button { min-height: 31px; }
  .lantern-board { height: 128px; margin: 7px 0; }
  .lantern-board button { width: 42px; height: 62px; }
  .lantern-identity { left: 4px; bottom: 3px; }
  .lantern-step { right: 3px; top: 3px; width: 15px; height: 15px; font-size: 7px; }
  .lantern-legend { gap: 10px; margin: -8px 0 2px; font-size: 6.5px; }
  .sequence-pool, .token-board { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .sequence-tray { min-height: 34px; flex-wrap: wrap; }
  .sequence-tray button { min-width: 52px; padding: 5px; }
  .rubbing-row { grid-template-columns: 92px 1fr; }
  .rubbing-row > div { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .medicine-board label, .tumbler-board label { grid-template-columns: 118px 1fr; gap: 7px; }
  .orientation-board { grid-template-columns: repeat(4,1fr); }
  .orientation-reference { margin: 5px auto -7px; }
  .orientation-board { gap: 5px; margin: 10px 0 5px; }
  .orientation-board button { min-height: 82px; gap: 2px; padding: 5px 4px; }
  .fragment-face { width: 42px; height: 42px; }
  .fragment-face > svg { width: 16px; height: 16px; }
  .fragment-edge { left: 3px; top: 3px; width: 30px; height: 30px; }
  .fragment-face--seal::after { right: 5px; bottom: 5px; width: 12px; height: 12px; }
  .orientation-board button > strong { font-size: 9px; }
  .fragment-direction small { font-size: 5.5px; }
  .fragment-direction b { font-size: 8px; }
  .token-legend { gap: 10px; margin: 5px 0 3px; font-size: 6px; }
  .token-legend i { width: 10px; height: 10px; }
  .token-board { gap: 4px; margin: 3px 0; }
  .token-board button { grid-template-columns: 40px minmax(0,1fr); gap: 4px; min-height: 68px; padding: 4px 5px; }
  .token-visual { width: 37px; height: 37px; }
  .token-visual > b { font-size: 11px; }
  .token-hole { width: 6px; height: 6px; }
  .token-visual[data-hole="top"] .token-hole { top: 3px; }
  .token-visual[data-hole="left"] .token-hole { left: 3px; }
  .token-visual[data-hole="right"] .token-hole { right: 3px; }
  .token-edge { inset: 5px; }
  .token-traits { gap: 1px; }
  .token-traits small { font-size: 5px; }
  .token-traits b { font-size: 6.2px; line-height: 1.3; }
  .memory-board { grid-template-columns: repeat(6, 54px); gap: 5px; margin: 8px 0; }
  .cross-exam-heads { height: 104px; margin: 7px 0; }
  .cross-exam-heads figure, .cross-exam-heads figure:last-child { grid-template-columns: 60px 1fr; }
  .cross-exam-heads figure:last-child { grid-template-columns: 1fr 60px; }
  .cross-exam-heads img { width: 60px; height: 104px; }
  .cross-exam-heads figcaption { font-size: 11px; }
  .cross-exam-row { grid-template-columns: 112px 1fr; }
  .cross-exam-row button { min-height: 31px; padding: 4px 6px; font-size: 8px; }
  .accusation__columns { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 5px; margin: 8px 0; }
  .accusation fieldset { padding: 7px; }
  .accusation label { gap: 5px; padding: 5px; font-size: 8px; line-height: 1.35; }

  .ending { padding: 10px; overflow-y: auto; }
  .ending__content { max-height: calc(100vh - 14px); overflow-y: auto; }
  .ending__seal { width: 42px; height: 42px; margin: 3px auto 6px; font-size: 18px; }
  .ending h2 { margin: 3px 0 7px; font-size: 25px; }
  .ending__content > p { max-height: none; font-size: 9px; line-height: 1.55; }
  .ending__secret { margin-top: 6px; padding: 5px 8px; }
  .ending__secret small { font-size: 7px; }
  .ending__secret p { margin-top: 2px; font-size: 7px; line-height: 1.4; }
  .ending__stats { display: flex; margin: 8px 0; }
  .ending__stats span { min-width: 86px; padding: 5px 8px; font-size: 8px; }
  .ending__stats strong { margin-top: 2px; font-size: 11px; }
  .ending__series { margin: 0 0 7px; font-size: 8px; }
  .ending__actions { width: auto; display: flex; }
  .ending__actions button { min-height: 31px; }
  .ending__actions .icon-button { width: 31px; height: 31px; min-width: 31px; }
}

/* Deduction rhythm: keep the complete case file intact while presenting one reasoning beat at a time. */
.deduction-rhythm {
  position: relative;
  display: grid;
  gap: 8px;
  margin: 12px 0 10px;
  padding: 9px 10px 8px;
  border: 1px solid rgba(126,163,143,.28);
  background: rgba(45,72,58,.075);
}
.deduction-rhythm__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.deduction-rhythm__head > span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.deduction-rhythm__head > span > svg { width: 15px; height: 15px; color: #86aa97; }
.deduction-rhythm__head > span > span { min-width: 0; display: grid; gap: 1px; }
.deduction-rhythm__head small { color: #8e9d8c; font-size: 7px; }
.deduction-rhythm__head b { color: #d1c19b; font-size: 10px; font-weight: 600; }
.deduction-rhythm__actions { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.deduction-stage-action { color: #9ec0ad; border-color: rgba(126,163,143,.42); background: rgba(82,121,107,.1); }
.deduction-stage-action:hover, .deduction-stage-action:focus-visible { color: #d6e2d6; border-color: rgba(126,163,143,.78); background: rgba(82,121,107,.22); }
.deduction-rhythm__head button { display: inline-flex; align-items: center; gap: 4px; min-height: 25px; padding: 3px 7px; }
.deduction-rhythm__head button svg { width: 12px; height: 12px; }
.deduction-rhythm__steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}
.deduction-rhythm__steps button {
  min-width: 0;
  min-height: 43px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 5px;
  padding: 5px 6px;
  border: 1px solid rgba(201,181,136,.17);
  border-top: 2px solid rgba(201,181,136,.24);
  color: #958b78;
  background: rgba(7,9,8,.62);
  text-align: left;
  cursor: pointer;
}
.deduction-rhythm__steps button > span {
  grid-row: 1 / span 2;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201,181,136,.28);
  color: #a89670;
  font-size: 8px;
}
.deduction-rhythm__steps button b { min-width: 0; overflow: hidden; color: #b8aa89; font-size: 8px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.deduction-rhythm__steps button em { min-width: 0; overflow: hidden; color: #797466; font-size: 6.5px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.deduction-rhythm__steps button:hover,
.deduction-rhythm__steps button:focus-visible,
.deduction-rhythm__steps button.is-selected { border-color: rgba(184,148,83,.7); background: rgba(168,129,67,.1); }
.deduction-rhythm__steps button.is-selected { box-shadow: inset 0 -2px 0 rgba(184,148,83,.9); }
.deduction-rhythm__steps button.is-recommended { border-top-color: rgba(126,163,143,.86); }
.deduction-rhythm__steps button.is-recommended b { color: #d5c79f; }
.deduction-rhythm__steps button.is-complete { border-top-color: rgba(126,163,143,.86); }
.deduction-rhythm__steps button.is-complete > span { border-color: rgba(126,163,143,.72); color: #9ec0ad; background: rgba(82,121,107,.18); }
.deduction-rhythm__steps button.is-complete em { color: #8eb09d; }
.deduction-rhythm__cue {
  margin: 0;
  padding: 5px 7px 2px 9px;
  border-left: 2px solid rgba(184,148,83,.65);
  color: #b5aa92;
  background: rgba(168,129,67,.055);
  font-size: 8px;
  line-height: 1.5;
}
.deduction-pulse {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 0 0 9px;
  padding: 6px 8px;
  border: 1px solid rgba(126,163,143,.2);
  background: rgba(82,121,107,.045);
}
.deduction-pulse > div { min-width: 0; display: grid; gap: 2px; padding: 3px 5px; border-left: 2px solid rgba(126,163,143,.45); }
.deduction-pulse > div:nth-child(2) { border-left-color: rgba(184,148,83,.62); }
.deduction-pulse > div:nth-child(3) { border-left-color: rgba(176,76,62,.52); }
.deduction-pulse small { color: #8b9789; font-size: 6.5px; }
.deduction-pulse b { color: #c5c0a6; font-size: 7.5px; line-height: 1.42; font-weight: 500; overflow-wrap: anywhere; }
.deduction-pulse[data-stage="verdict"] > div:nth-child(3) { border-left-color: rgba(215,189,121,.82); }

.player-deduction-lab { display: grid; gap: 6px; margin-top: 7px; padding: 8px; border: 1px solid rgba(184,148,83,.28); background: rgba(168,129,67,.05); }
.player-deduction-lab > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.player-deduction-lab > header > span { display: inline-flex; align-items: center; gap: 5px; color: #d2bf92; }
.player-deduction-lab > header svg { width: 13px; height: 13px; color: #c49b5c; }
.player-deduction-lab > header b { font-size: 9px; }
.player-deduction-lab > header small { color: #96896f; font-size: 7.5px; }
.player-deduction-lab__intro, .player-deduction-lab__locked { margin: 0; color: #9e9683; font-size: 8px; line-height: 1.5; }
.player-deduction-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.player-deduction-form label { min-width: 0; display: grid; gap: 3px; }
.player-deduction-form label > span { color: #8e8674; font-size: 7px; }
.player-deduction-form select, .player-deduction-form textarea { width: 100%; min-width: 0; padding: 5px 6px; border: 1px solid rgba(201,181,136,.23); color: #c9bea4; background: rgba(5,7,6,.72); font: inherit; font-size: 8px; }
.player-deduction-form textarea { resize: vertical; line-height: 1.4; }
.player-deduction-form__text { grid-column: 1 / -1; }
.player-deduction-form > button { grid-column: 1 / -1; justify-self: start; min-height: 27px; }
.player-deduction-cards { display: grid; gap: 4px; }
.player-deduction-card { position: relative; display: grid; gap: 3px; padding: 6px 26px 6px 7px; border-left: 2px solid rgba(184,148,83,.6); background: rgba(7,9,8,.62); }
.player-deduction-card--supported { border-left-color: rgba(126,163,143,.82); }
.player-deduction-card--reframed { border-left-color: rgba(176,76,62,.72); }
.player-deduction-card header { display: flex; justify-content: space-between; gap: 5px; color: #b6a881; font-size: 7.5px; }
.player-deduction-card header span { min-width: 0; overflow-wrap: anywhere; }
.player-deduction-card header em { flex: 0 0 auto; color: #a88f5f; font-style: normal; }
.player-deduction-card--supported header em { color: #91b09d; }
.player-deduction-card--reframed header em { color: #c39184; }
.player-deduction-card p { margin: 0; color: #d0c6ae; font-size: 8px; line-height: 1.45; overflow-wrap: anywhere; }
.player-deduction-card__relation { color: #b7a474; font-size: 8px; }
.player-deduction-card p.player-deduction-card__note-empty { color: #918974; font-style: italic; }
.player-deduction-card small { color: #847d6e; font-size: 7px; line-height: 1.4; }
.player-deduction-card > button { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; display: grid; place-items: center; border: 0; color: #8d7768; background: transparent; cursor: pointer; }
.player-deduction-card > button:hover, .player-deduction-card > button:focus-visible { color: #d6ae7a; }
.player-deduction-card > button svg { width: 11px; height: 11px; }
.player-deduction-empty { margin: 0; padding: 5px; color: #837c6b; font-size: 7.5px; line-height: 1.45; border: 1px dashed rgba(201,181,136,.18); }

@media (max-width: 760px) {
  .deduction-pulse { grid-template-columns: 1fr; gap: 3px; padding: 5px 6px; }
  .deduction-pulse > div { padding: 3px 5px; }
  .deduction-pulse b { font-size: max(var(--read-dense), 7px); }
  .player-deduction-form select, .player-deduction-form textarea { font-size: max(var(--read-dense), 8px); }
}
.deduction-stage {
  margin: 8px 0;
  border: 1px solid rgba(201,181,136,.2);
  background: rgba(7,9,8,.4);
}
.deduction-stage > summary {
  min-height: 58px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 15px;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  cursor: pointer;
  list-style: none;
}
.deduction-stage > summary::-webkit-details-marker { display: none; }
.deduction-stage > summary:focus-visible { outline: 2px solid #e0ba6d; outline-offset: -2px; }
.deduction-stage__index {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201,181,136,.32);
  color: #ad9664;
  font-size: 10px;
}
.deduction-stage__label { min-width: 0; display: grid; gap: 2px; }
.deduction-stage__label small { color: #8e8677; font-size: 7px; }
.deduction-stage__label b { color: #d0bd91; font-size: 12px; font-weight: 600; }
.deduction-stage__label > span { color: #958d7c; font-size: 8px; line-height: 1.4; }
.deduction-stage > summary > em { max-width: 230px; color: #8d8270; font-size: 7.5px; font-style: normal; text-align: right; }
.deduction-stage > summary > svg { width: 14px; height: 14px; color: #8d7b5b; transition: transform .18s ease; }
.deduction-stage[open] > summary { border-bottom: 1px solid rgba(201,181,136,.16); background: rgba(82,121,107,.045); }
.deduction-stage[open] > summary > svg { transform: rotate(180deg); }
.deduction-stage.is-current { border-color: rgba(184,148,83,.58); box-shadow: inset 2px 0 0 rgba(184,148,83,.68); }
.deduction-stage.is-current > summary .deduction-stage__index { border-color: rgba(184,148,83,.8); color: #dec384; background: rgba(168,129,67,.12); }
.deduction-stage.is-recommended:not(.is-current) > summary .deduction-stage__index { border-color: rgba(126,163,143,.62); color: #9fc0ae; }
.deduction-stage[data-stage-state="complete"] > summary > em { color: #8eb09d; }
.deduction-stage[data-stage-state="current"] > summary > em { color: #d0ad67; }
.deduction-stage__body { min-width: 0; padding: 2px 10px 10px; }
.deduction-stage__body--verdict { display: grid; gap: 8px; }
.deduction-stage__body--verdict #accuse-button { margin: 0; }
.deduction-stage > .deduction-stage__body > .deduction-workbench { margin-top: 6px; }

@media (max-width: 760px) {
  .deduction-rhythm { gap: 6px; margin: 7px 0 6px; padding: 6px 7px; }
  .deduction-rhythm__steps { grid-template-columns: repeat(5, minmax(104px, 1fr)); overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
  .deduction-rhythm__steps button { min-height: 37px; padding: 4px 5px; }
  .deduction-rhythm__steps button > span { width: 17px; height: 17px; font-size: 7px; }
  .deduction-rhythm__steps button b { font-size: max(var(--read-dense), 7.5px); }
  .deduction-rhythm__steps button em { font-size: max(var(--read-dense), 6.5px); }
  .deduction-rhythm__cue { font-size: max(var(--read-dense), 7px); line-height: 1.45; }
  .deduction-stage { margin: 5px 0; }
  .deduction-stage > summary { min-height: 47px; grid-template-columns: 23px minmax(0,1fr) auto 12px; gap: 5px; padding: 6px 7px; }
  .deduction-stage__index { width: 21px; height: 21px; font-size: 8px; }
  .deduction-stage__label small { font-size: max(var(--read-dense), 6.5px); }
  .deduction-stage__label b { font-size: max(var(--read-secondary), 9px); }
  .deduction-stage__label > span { font-size: max(var(--read-dense), 7px); line-height: 1.35; }
  .deduction-stage > summary > em { max-width: 120px; font-size: max(var(--read-dense), 6.5px); }
  .deduction-stage__body { padding: 1px 7px 7px; }
}

@media (orientation: landscape) and (max-height: 540px) {
  .deduction-rhythm { margin: 5px 0 4px; padding: 5px 6px; gap: 4px; }
  .deduction-rhythm__head b { font-size: 8px; }
  .deduction-rhythm__head small { font-size: max(var(--read-dense), 7px); }
  .deduction-rhythm__head button { min-height: 23px; font-size: max(var(--read-dense), 7px); }
  .deduction-rhythm__steps { gap: 3px; }
  .deduction-rhythm__steps button { min-height: 32px; grid-template-columns: 17px minmax(0,1fr); padding: 3px 4px; }
  .deduction-rhythm__steps button > span { width: 15px; height: 15px; font-size: 7px; }
  .deduction-rhythm__steps button b { font-size: max(var(--read-dense), 7.5px); }
  .deduction-rhythm__steps button em { font-size: max(var(--read-dense), 7px); }
  .deduction-rhythm__cue { padding: 3px 5px 1px 7px; font-size: max(var(--read-dense), 7px); line-height: 1.35; }
  .deduction-stage { margin: 4px 0; }
  .deduction-stage > summary { min-height: 35px; grid-template-columns: 19px minmax(0,1fr) auto 11px; gap: 4px; padding: 4px 6px; }
  .deduction-stage__index { width: 18px; height: 18px; font-size: 8px; }
  .deduction-stage__label { gap: 1px; }
  .deduction-stage__label small { font-size: max(var(--read-dense), 7px); }
  .deduction-stage__label b { font-size: max(var(--read-secondary), 8px); }
  .deduction-stage__label > span { display: none; }
  .deduction-stage > summary > em { max-width: 170px; font-size: max(var(--read-dense), 7px); }
  .deduction-stage__body { padding: 1px 6px 6px; }
}

@media (max-width: 760px) {
  .objective__stage { gap: 2px; margin-bottom: 3px; }
  .objective__stage > span { gap: 1px; padding: 2px 4px; }
  .objective__stage small { font-size: 6px; }
  .objective__stage b { font-size: 6.5px; }
  .objective .objective__copy { gap: 1px; font-size: 7.5px; }
  .objective__fact { grid-template-columns: 48px minmax(0,1fr); gap: 3px; }
  .objective__fact--lead, .objective__fact--detail { grid-template-columns: 1fr; }
  .objective__fact b { font-size: 6.5px; }
  .objective__fact em { font-size: 7.5px; line-height: 1.32; }
  .offline-prep { top: 72px; right: 10px; width: min(286px, calc(100% - 20px)); gap: 6px; padding: 9px 10px; }
  .offline-prep__status strong { font-size: 10px; }
  .offline-prep > p { font-size: 8px; }
  .offline-prep__actions button { min-width: 108px; min-height: 30px; font-size: 8px; }
}

@media (orientation: landscape) and (max-height: 540px) {
  .objective__stage { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .objective .objective__copy { font-size: max(var(--read-dense), 7.5px); }
  .objective__fact { grid-template-columns: 43px minmax(0,1fr); }
  .objective__fact--lead, .objective__fact--detail { grid-template-columns: 1fr; }
  .objective__fact b, .objective__fact em { font-size: max(var(--read-dense), 7px); line-height: 1.34; }
  .archive-echo { margin-top: 3px; padding: 4px 5px; }
  .variant-hypothesis__copy .archive-echo strong { font-size: max(var(--read-dense), 7.5px); }
  .variant-hypothesis__copy .archive-echo p { font-size: max(var(--read-dense), 7px); line-height: 1.35; }
  .archive-echo > span { font-size: max(var(--read-dense), 7px); }
  .offline-prep { top: 58px; right: 8px; width: min(268px, calc(100% - 16px)); }
  .offline-prep.ready { width: 244px; padding: 7px 8px; }
  .offline-prep.ready .offline-prep__actions > span { display: none; }
}

:root {
  --read-primary: 12px;
  --read-secondary: 9.5px;
  --read-dense: 8px;
  --read-line: 1.65;
}
body[data-reading-size="comfortable"] { --read-primary: 13px; --read-secondary: 10.5px; --read-dense: 9px; --read-line: 1.72; }
body[data-reading-size="large"] { --read-primary: 14.5px; --read-secondary: 12px; --read-dense: 10px; --read-line: 1.78; }
.prologue__panel p,
.dossier__intro p,
.dossier-person p,
.dossier__entries p,
.briefing__dialogue > p,
.dialogue__body > p,
.inspect-card > p,
.puzzle-sheet > p,
.accusation-sheet > p,
.ending__content > p,
.case-transition__inner p { font-size: var(--read-primary); line-height: var(--read-line); }
.objective .objective__copy,
.route-guide-item p,
.task-item p,
.evidence-card p,
.inspect-findings li p,
.inspect-conclusion p,
.inspect-reaction p,
.puzzle-case-link p,
.progressive-hints__list p,
.chain__result,
.case-recap p,
.progressive-hints__purpose > p,
.evidence-relation > p,
.accusation-support-preview__notice { font-size: var(--read-secondary); line-height: var(--read-line); }
.objective__label,
.task-list__section small,
.deduction-workbench__copy p,
.culpability-analysis p,
.culpability-board__footer,
.hidden-truth__copy p,
.offline-prep__network { font-size: var(--read-dense); line-height: 1.5; }
body[data-reading-size="large"] .objective,
body[data-reading-size="large"] .dialogue__body,
body[data-reading-size="large"] .puzzle-sheet,
body[data-reading-size="large"] .accusation-sheet,
body[data-reading-size="large"] #evidence-relation-overview,
body[data-reading-size="large"] .accusation-support-preview,
body[data-reading-size="large"] .route-guide-list,
body[data-reading-size="large"] .case-transition__inner { overflow-y: auto; }
body[data-reading-contrast="high"] {
  --paper: #f2e7ce;
  --paper-dim: #c7baa0;
  --line: rgba(229,211,171,.42);
  --panel: rgba(4,5,4,.985);
}
body[data-reading-contrast="high"] .objective,
body[data-reading-contrast="high"] .location-card,
body[data-reading-contrast="high"] .dialogue__body,
body[data-reading-contrast="high"] .inspect-card,
body[data-reading-contrast="high"] .panel,
body[data-reading-contrast="high"] .puzzle-sheet,
body[data-reading-contrast="high"] .accusation-sheet { background-color: rgba(4,5,4,.985); }
body[data-reading-contrast="high"] :is(.objective__copy, .route-guide-item p, .task-item p, .evidence-card p, .inspect-findings li p, .inspect-conclusion p, .inspect-reaction p, .puzzle-case-link p, .progressive-hints__list p, .progressive-hints__purpose > p, .evidence-relation > p, .accusation-support-preview__notice, .case-transition__inner p, .chain__result) { color: #e4d8bf; }
body[data-reading-contrast="high"] button:focus-visible,
body[data-reading-contrast="high"] input:focus-visible,
body[data-reading-contrast="high"] select:focus-visible { outline: 2px solid #e0ba6d; outline-offset: 2px; }
/* The contrast setting also protects the evidence cut and character read in
   the court sequence; it changes luminance only and never changes state. */
body[data-reading-contrast="high"] .court-cinematic__background { filter: brightness(.68) saturate(.78) contrast(1.08) !important; }
body[data-reading-contrast="high"] .court-cinematic__shade { background: linear-gradient(90deg, rgba(2,3,3,.78), rgba(2,3,3,.08) 50%, rgba(2,3,3,.58)), linear-gradient(180deg, rgba(2,3,3,.18), transparent 42%, rgba(2,3,3,.72)); }
body[data-reading-contrast="high"] .court-cinematic__figure img { filter: drop-shadow(0 20px 32px rgba(0,0,0,.72)) brightness(.98) saturate(.94) contrast(1.04); }
body[data-reading-contrast="high"] .court-reactions img { filter: drop-shadow(0 12px 16px rgba(0,0,0,.72)) brightness(.72) saturate(.76) contrast(1.04); }
body[data-reading-contrast="high"] .court-evidence { background: rgba(4,6,5,.96); border-color: rgba(229,211,171,.52); }
body[data-reading-contrast="high"] .court-evidence b,
body[data-reading-contrast="high"] .court-cinematic__caption h2 { color: #f5e5c0; }
body[data-reading-contrast="high"] .court-evidence span,
body[data-reading-contrast="high"] .court-cinematic__caption > p,
body[data-reading-contrast="high"] .court-reaction-cue { color: #e2d7c1; }
body[data-reading-contrast="high"] .archive-comparison__row p,
body[data-reading-contrast="high"] .player-deduction-card small { color: #bdb39f; }

@media (max-width: 760px) {
  .archive-comparison__grid { grid-template-columns: 1fr; }
  .archive-comparison__row p { font-size: max(var(--read-dense), 7px); }
  .deduction-secondary > summary b { font-size: max(var(--read-dense), 8px); }
  .deduction-secondary > summary small { font-size: max(var(--read-dense), 6.5px); }
  body[data-reading-contrast="high"] .court-evidence b { font-size: max(var(--read-secondary), 8px); }
  body[data-reading-contrast="high"] .court-evidence span { font-size: max(var(--read-dense), 7px); }
  :root { --read-primary: 10px; --read-secondary: 8px; --read-dense: 7px; --read-line: 1.56; }
  body[data-reading-size="comfortable"] { --read-primary: 11px; --read-secondary: 9px; --read-dense: 8px; --read-line: 1.62; }
  body[data-reading-size="large"] { --read-primary: 12px; --read-secondary: 10px; --read-dense: 9px; --read-line: 1.68; }
  .story-reading-button { top: 14px; left: 96px; }
  .reading-settings { top: 58px; right: 10px; width: min(320px, calc(100% - 20px)); }
  body:not(.game-started) .reading-settings { top: 58px; left: 10px; }
  .inspect-actions { grid-template-columns: minmax(64px,.7fr) 1fr 1.12fr; gap: 4px; }
  .inspect-actions > span { font-size: 7px; }
  .inspect-actions button { min-width: 0; min-height: 31px; padding: 5px 6px; font-size: 7.5px; }
  #suspicion-notebook-body { grid-template-columns: 1fr; }
  .suspicion-people { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .suspicion-history { grid-column: auto; }
  .suspicion-history ol { grid-template-columns: 1fr; }
  .court-cinematic__figure { height: 88vh; }
  .court-cinematic__figure--actor { width: 44vw; right: 1%; }
  .court-cinematic[data-side="left"] .court-cinematic__figure--actor { left: 1%; }
  .court-cinematic__figure--officer { width: 27vw; opacity: .26; }
  .court-reactions { top: 108px; width: 32vw; height: 31vh; gap: 3px; }
  .court-reactions figure { width: 9.5vw; }
  .court-reactions figcaption { padding: 3px; }
  .court-reactions figcaption b { font-size: 6.5px; }
  .court-reactions figcaption span { font-size: 5.5px; }
  .court-evidence { top: 104px; width: min(150px, 24vw); }
  .court-evidence figcaption { padding: 4px 5px 5px; }
  .court-evidence small { font-size: 6px; }
  .court-evidence b { font-size: 8px; }
  .court-evidence span { font-size: 6.5px; line-height: 1.4; }
  .court-evidence-shift p span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .court-proof-strip { top: 58px; width: calc(100% - 18px); gap: 3px; }
  .court-proof-strip span { padding: 4px 6px; font-size: 7px; }
  .court-cinematic__caption { left: 4%; bottom: 5%; width: 52vw; padding-top: 8px; }
  .court-cinematic[data-side="left"] .court-cinematic__caption { right: 4%; }
  .court-cinematic__caption > span { font-size: 8px; }
  .court-cinematic__caption h2 { margin: 4px 0 6px; font-size: 22px; }
  .court-cinematic__caption > p { min-height: 44px; font-size: 10px; line-height: 1.62; }
  .court-cinematic__progress { margin: 8px 0 7px; }
  .court-cinematic__progress i { width: 20px; }
  .court-cinematic__actions button { min-height: 32px; padding: 6px 9px; font-size: 8px; }
  .ending__content { max-height: 96vh; overflow: auto; }
  .ending-reasoning-trace { max-height: 112px; }
  .ending-reasoning-trace ol { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (orientation: landscape) and (max-height: 540px) {
  :root { --read-primary: 10px; --read-secondary: 8px; --read-dense: 7px; --read-line: 1.54; }
  body[data-reading-size="comfortable"] { --read-primary: 11px; --read-secondary: 9px; --read-dense: 8px; --read-line: 1.62; }
  #suspicion-notebook-body { grid-template-columns: minmax(0,1.2fr) minmax(0,.8fr); padding: 5px 7px 7px; }
  .suspicion-people { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .suspicion-person { min-height: 28px; padding: 3px 4px; }
  .suspicion-history { grid-column: 1 / -1; }
  .suspicion-history ol { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .court-evidence-shift { margin-top: 3px; padding-top: 3px; }
  .court-evidence-shift p span { -webkit-line-clamp: 1; }
  .ending-reasoning-trace { max-height: 82px; }
  .ending-reasoning-trace ol { grid-template-columns: repeat(5,minmax(0,1fr)); }
  body[data-reading-size="large"] { --read-primary: 12px; --read-secondary: 10px; --read-dense: 9px; --read-line: 1.68; }
  .story-reading-button { top: 10px; left: 88px; }
  .reading-settings { top: 48px; right: 8px; width: min(300px, calc(100% - 16px)); padding: 9px; }
  body:not(.game-started) .reading-settings { top: 48px; left: 8px; }
  .reading-settings header { margin-bottom: 5px; }
  .reading-settings fieldset { margin-bottom: 4px; padding: 5px; }
  .reading-segments button { min-height: 25px; font-size: 7px; }
  .reading-toggle { min-height: 28px; padding: 4px 6px; }
  .reading-settings > p { margin-top: 4px; font-size: 6.5px; }
  .court-cinematic__figure { height: 96vh; }
  .court-cinematic__figure--actor { width: 39vw; }
  .court-proof-strip { top: 41px; }
  .court-proof-strip span { padding: 3px 5px; font-size: 6.5px; }
  .court-proof-strip svg { width: 9px; height: 9px; }
  .court-cinematic__caption { bottom: 3%; width: 55vw; padding-top: 6px; }
  .court-cinematic__caption > span { font-size: 7px; }
  .court-cinematic__caption h2 { margin: 3px 0 4px; font-size: 19px; line-height: 1.18; }
  .court-cinematic__caption > p { min-height: 32px; font-size: 9px; line-height: 1.48; }
  .court-cinematic__progress { margin: 5px 0; }
  .court-cinematic__actions button { min-height: 28px; padding: 4px 8px; font-size: 7px; }
}

body[data-reading-motion="reduced"] *,
body[data-reading-motion="reduced"] *::before,
body[data-reading-motion="reduced"] *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }

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

/* Final readability pass for the evidence map, verdict preview, and court beats. */
.court-cinematic__beat {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-bottom: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(184,148,83,.52);
  border-left-width: 3px;
  color: #d7bc7c;
  background: rgba(23,19,11,.72);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.2;
}
.court-cinematic__beat.shot-enter { animation: court-beat-enter .34s cubic-bezier(.2,.72,.25,1) both; }
.court-cinematic[data-sequence-result="win"] .court-cinematic__beat { border-color: rgba(111,155,135,.78); color: #a8c6b5; background: rgba(21,38,31,.72); }
.court-cinematic[data-sequence-result="wrong"] .court-cinematic__beat { border-color: rgba(176,76,62,.72); color: #d49b91; background: rgba(39,17,15,.72); }
.court-cinematic[data-shot-role="verdict"] .court-cinematic__beat { border-color: rgba(215,189,121,.88); color: #f0dfb5; background: rgba(45,34,15,.76); }
@keyframes court-beat-enter {
  from { opacity: 0; transform: translateY(-6px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#evidence-relation-list,
.accusation-support-preview__grid { align-items: stretch; }
.evidence-relation > p,
.accusation-support-preview__notice,
.case-transition__inner p,
.progressive-hints__purpose > p { overflow-wrap: anywhere; }
.route-guide-section > summary:focus-visible,
.evidence-relation-overview > summary:focus-visible { outline: 2px solid #e0ba6d; outline-offset: -2px; }

@media (max-width: 760px) {
  #evidence-relation-list,
  .accusation-support-preview__grid { grid-template-columns: 1fr; }
  .evidence-relation ul { grid-template-columns: 1fr; }
  .evidence-relation-overview > summary,
  .accusation-support-preview > header { align-items: flex-start; flex-wrap: wrap; }
  .evidence-relation-overview > summary em { margin-left: 25px; }
  .accusation-support-preview > header small { flex: 1 1 100%; text-align: left; }
  .route-guide-section > summary b,
  .route-guide-item strong,
  .task-item h3,
  .evidence-relation-overview > summary b,
  .accusation-support-preview > header b { font-size: max(var(--read-secondary), 9px); line-height: 1.45; overflow-wrap: anywhere; }
  .route-guide-section > summary small,
  .route-guide-item small,
  .evidence-relation-overview > summary small,
  .evidence-relation header span,
  .evidence-relation header em,
  .accusation-support-preview > header small,
  .accusation-support-preview__grid article > header b,
  .accusation-support-preview__grid li > span { font-size: max(var(--read-dense), 7.5px); line-height: 1.45; }
  .evidence-relation header strong,
  .accusation-support-preview__grid article > header em,
  .accusation-support-preview__grid li strong { font-size: max(var(--read-dense), 8px); line-height: 1.45; overflow-wrap: anywhere; }
  .evidence-relation li span,
  .accusation-support-preview__grid li small { overflow: visible; font-size: max(var(--read-dense), 7.5px); line-height: 1.45; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
  .puzzle-operation-rail b { font-size: max(var(--read-dense), 8px); line-height: 1.4; }
  .puzzle-operation-rail small { font-size: var(--read-dense); line-height: 1.45; }
  .case-transition { top: 72px; width: min(590px, calc(100% - 20px)); }
  .case-transition__inner { grid-template-columns: 23px minmax(0,1fr) 28px; gap: 7px; max-height: min(42vh, 250px); padding: 9px 10px; overflow-y: auto; }
  .case-transition__inner strong { font-size: 12px; }
  .case-transition__inner p { font-size: 9px; line-height: 1.55; }
  .court-cinematic__beat { min-height: 19px; margin-bottom: 3px; padding: 3px 6px; font-size: 8px; }
  .court-cinematic__caption { bottom: max(8px, 6%); }
}

@media (orientation: landscape) and (max-height: 540px) {
  .objective .objective__copy { font-size: max(var(--read-dense), 7.5px); line-height: 1.4; }
  .objective__fact b { font-size: max(var(--read-dense), 7px); line-height: 1.35; }
  .objective__fact em { font-size: max(var(--read-dense), 7.5px); line-height: 1.4; }
  .route-guide-item strong { font-size: max(var(--read-secondary), 8.5px); }
  .route-guide-item p,
  .task-item p { font-size: max(var(--read-dense), 8px); line-height: 1.48; }
  .puzzle-case-link p { font-size: max(var(--read-dense), 8px); line-height: 1.45; }
  .court-reactions { top: 72px; width: 27vw; height: 96px; gap: 2px; }
  .court-reactions figure { width: 42px; }
  .court-reactions figcaption { bottom: 2px; padding: 2px 3px; }
  .court-reactions figcaption b { font-size: 5.5px; }
  .court-reactions figcaption span { display: none; }
  .court-evidence { top: 72px; width: 118px; }
  .court-evidence > img { aspect-ratio: 2 / 1; }
  .court-evidence figcaption { padding: 3px 4px; }
  .court-evidence small { font-size: 5px; }
  .court-evidence b { font-size: 6px; }
  .court-evidence span { display: none; }
  .court-cinematic__caption { max-height: calc(100vh - 56px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .court-cinematic__caption { bottom: max(6px, 4%); }
  .court-cinematic__beat { min-height: 17px; margin-bottom: 2px; padding: 2px 5px; font-size: 7px; letter-spacing: .04em; }
  .case-transition { top: 50px; }
  .case-transition__inner { max-height: 44vh; }
}

/* Investigation-depth pass: progressive cross-reading, short buffers, and explicit focus targets. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.objective { pointer-events: auto; }
.objective__details { margin-top: 4px; border-top: 1px solid rgba(201,181,136,.14); }
.objective__details summary { display: flex; align-items: center; gap: 4px; min-height: 22px; color: #ae976b; font-size: max(var(--read-dense), 8px); cursor: pointer; list-style: none; }
.objective__details summary::-webkit-details-marker { display: none; }
.objective__details summary svg { width: 11px; height: 11px; transition: transform .18s ease; }
.objective__details[open] summary svg { transform: rotate(180deg); }
.objective__details summary em { margin-left: auto; color: #7e7565; font-style: normal; }
.objective__details > div { display: grid; gap: 2px; padding: 3px 0 1px 15px; }
.objective__details > div .objective__fact em { color: #a69d89; }
.objective__details:focus-within summary { color: #e0c98f; }
.evidence-card__continue { width: 100%; min-height: 28px; display: inline-flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: 7px; padding: 4px 7px; border: 1px solid rgba(126,163,143,.42); color: #b8d0c0; background: rgba(64,99,83,.16); cursor: pointer; font-size: 8px; text-align: left; }
.evidence-card__continue:hover, .evidence-card__continue:focus-visible { border-color: rgba(126,163,143,.82); background: rgba(64,99,83,.3); }
.evidence-card__continue svg { width: 12px; height: 12px; flex: 0 0 auto; }
.evidence-cross-reading { margin-top: 7px; border-top: 1px solid rgba(201,181,136,.13); }
.evidence-cross-reading summary { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 27px; color: #b99d69; cursor: pointer; list-style: none; }
.evidence-cross-reading summary::-webkit-details-marker { display: none; }
.evidence-cross-reading summary > span { min-width: 0; display: inline-flex; align-items: center; gap: 4px; }
.evidence-cross-reading summary svg { width: 12px; height: 12px; color: #87a895; }
.evidence-cross-reading summary b { font-size: 8px; font-weight: 500; }
.evidence-cross-reading summary em { flex: 0 0 auto; color: #7f9d8c; font-size: 7px; font-style: normal; }
.evidence-cross-reading__body { display: grid; gap: 5px; padding: 2px 0 5px; color: #aaa18e; }
.evidence-cross-reading__body > p { margin: 0; font-size: 8px; line-height: 1.5; }
.evidence-cross-reading__body > p b, .evidence-cross-reading__turn b { display: block; margin-bottom: 1px; color: #b69359; font-size: 7px; font-weight: 500; }
.evidence-cross-reading__body ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.evidence-cross-reading__body li { display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 4px; padding: 3px 4px; background: rgba(255,255,255,.025); }
.evidence-cross-reading__body li span { color: #8bad9b; font-size: 7px; }
.evidence-cross-reading__body li p { margin: 0; font-size: 7.5px; line-height: 1.4; }
.evidence-cross-reading__links { display: grid; gap: 3px; }
.evidence-cross-reading__links small { color: #807866; font-size: 7px; }
.evidence-cross-reading__links > div { display: flex; flex-wrap: wrap; gap: 3px; }
.evidence-cross-reading__links span, .evidence-cross-reading__links em { padding: 2px 4px; border: 1px solid rgba(126,163,143,.23); color: #9cb7a7; background: rgba(64,99,83,.1); font-size: 7px; font-style: normal; }
.evidence-cross-reading__links span b { margin-right: 3px; color: #d1b778; font-weight: 500; }
.evidence-cross-reading__turn { margin: 0; padding: 4px 5px; border-left: 2px solid #a88143; background: rgba(168,129,67,.08); }
.evidence-cross-reading--contested summary { color: #d2b676; }
.evidence-cross-reading--resolved summary { color: #a7c8b5; }
.evidence-cross-matrix { margin: 0 0 8px; border: 1px solid rgba(126,163,143,.24); background: rgba(45,72,58,.08); }
.evidence-cross-matrix > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; cursor: pointer; list-style: none; }
.evidence-cross-matrix > summary::-webkit-details-marker { display: none; }
.evidence-cross-matrix > summary > span { min-width: 0; display: grid; grid-template-columns: 16px auto; gap: 0 5px; }
.evidence-cross-matrix > summary svg { grid-row: 1 / span 2; width: 14px; color: #86aa97; }
.evidence-cross-matrix > summary b { color: #c3d2bf; font-size: 10px; font-weight: 500; }
.evidence-cross-matrix > summary small { color: #8e9d8c; font-size: 7.5px; }
.evidence-cross-matrix > summary em { color: #a79062; font-size: 8px; font-style: normal; }
.evidence-cross-matrix__focus { display: grid; gap: 5px; padding: 7px 8px 0; }
.evidence-cross-matrix__filters { display: flex; flex-wrap: wrap; gap: 3px; }
.evidence-cross-matrix__filters button { min-height: 25px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid rgba(126,163,143,.22); color: #8e9d8c; background: rgba(8,10,9,.6); font: inherit; cursor: pointer; }
.evidence-cross-matrix__filters button:hover,
.evidence-cross-matrix__filters button:focus-visible { border-color: rgba(184,148,83,.72); color: #d7c49a; }
.evidence-cross-matrix__filters button[aria-pressed="true"] { border-color: rgba(126,163,143,.76); color: #d2e0d2; background: rgba(82,121,107,.18); box-shadow: inset 0 -2px rgba(126,163,143,.72); }
.evidence-cross-matrix__filters button span { font-size: 7.5px; }
.evidence-cross-matrix__filters button em { color: #a79062; font-size: 6.5px; font-style: normal; }
.evidence-cross-matrix__focus > p { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0; color: #8e9d8c; font-size: 7px; line-height: 1.45; }
.evidence-cross-matrix__focus > p span { min-width: 0; }
.evidence-cross-matrix__focus > p b { flex: 0 0 auto; color: #b7a16e; font-size: 6.5px; font-weight: 500; }
.evidence-cross-matrix__grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 5px; padding: 0 8px 8px; }
.evidence-cross-matrix__row { min-width: 0; display: grid; gap: 4px; padding: 6px 7px; border-left: 2px solid rgba(168,129,67,.44); background: rgba(8,10,9,.7); }
.evidence-cross-matrix__row[hidden] { display: none; }
.evidence-cross-matrix__row--contested { border-left-color: rgba(210,182,118,.7); }
.evidence-cross-matrix__row--resolved { border-left-color: rgba(126,163,143,.76); }
.evidence-cross-matrix__row header { display: flex; justify-content: space-between; gap: 5px; }
.evidence-cross-matrix__row header b { color: #d2c09b; font-size: 8px; }
.evidence-cross-matrix__row header em { color: #a88e60; font-size: 7px; font-style: normal; }
.evidence-cross-matrix__row > p { display: flex; flex-wrap: wrap; gap: 3px; margin: 0; }
.evidence-cross-matrix__row > p span { padding: 2px 4px; color: #93ab9b; background: rgba(82,121,107,.14); font-size: 6.5px; }
.evidence-cross-matrix__row > div { display: grid; gap: 2px; }
.evidence-cross-matrix__row > div small { color: #7f7868; font-size: 6.5px; }
.evidence-cross-matrix__row > div section { display: flex; flex-wrap: wrap; gap: 2px; }
.evidence-cross-matrix__row > div section span, .evidence-cross-matrix__row > div section i { padding: 2px 3px; color: #9eb5a5; border: 1px solid rgba(126,163,143,.2); font-size: 6.5px; font-style: normal; }
.evidence-cross-matrix__row > div section span { display: inline-grid; grid-template-columns: 25px minmax(0, auto); align-items: center; gap: 3px; }
.evidence-cross-matrix__row > div section span img { width: 25px; height: 18px; object-fit: cover; opacity: .78; filter: saturate(.72) contrast(1.04); }
.evidence-cross-matrix__row > div section b { margin-right: 2px; color: #d0b273; }
.evidence-cross-matrix__row footer { color: #aaa18e; font-size: 7px; line-height: 1.4; }
.evidence-relation__evidence-strip { display: flex; gap: 5px; padding: 2px 0 3px; overflow-x: auto; scrollbar-width: thin; }
.evidence-relation__evidence-strip figure { position: relative; flex: 0 0 74px; height: 48px; margin: 0; overflow: hidden; border: 1px solid rgba(126,163,143,.28); background: #090b0a; }
.evidence-relation__evidence-strip figure::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 32%, rgba(4,6,5,.82)); pointer-events: none; }
.evidence-relation__evidence-strip img { width: 100%; height: 100%; object-fit: cover; opacity: .82; filter: saturate(.7) contrast(1.08); }
.evidence-relation__evidence-strip figcaption { position: absolute; z-index: 1; right: 3px; bottom: 2px; left: 3px; display: flex; align-items: baseline; gap: 3px; min-width: 0; color: #d0c19e; font-size: 6px; }
.evidence-relation__evidence-strip figcaption b { color: #c5a66a; font-size: 6px; }
.evidence-relation__evidence-strip figcaption span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evidence-relation--pending .evidence-relation__evidence-strip figure { border-color: rgba(184,148,83,.28); }
.evidence-relation--closed .evidence-relation__evidence-strip figure { border-color: rgba(126,163,143,.58); }
.accusation-support-preview__cross { margin: 5px 0; padding: 5px 6px; border-left: 2px solid rgba(126,163,143,.64); color: #aabda9; background: rgba(64,99,83,.1); font-size: 8px; line-height: 1.45; }
.accusation-support-preview__cross b { display: block; margin-bottom: 2px; color: #c2d4c2; font-size: 7px; }
.chain--linked { outline: 2px solid rgba(126,163,143,.85); outline-offset: 3px; animation: chain-linked-pulse 1.5s ease-out both; }
@keyframes chain-linked-pulse { 0% { box-shadow: 0 0 0 0 rgba(126,163,143,.45); } 100% { box-shadow: 0 0 0 14px rgba(126,163,143,0); } }
.case-transition__inner em { color: #8eb09a; font-size: 8px; line-height: 1.45; font-style: italic; }
body[data-phase-buffer] #scene-view .scene-image { filter: saturate(.82) brightness(.94); transition: filter .45s ease; }
body[data-phase-buffer] #scene-view .rain-canvas { opacity: .72; transition: opacity .45s ease; }

.court-reaction-cue { position: absolute; z-index: 6; top: 262px; left: 50%; width: min(34vw, 470px); transform: translateX(-50%); padding: 4px 8px; border-left: 2px solid rgba(185,157,105,.56); color: #c4b89c; background: rgba(5,7,6,.56); font-size: 8px; line-height: 1.45; text-align: center; opacity: .9; transition: opacity .2s ease; }
.court-reaction-cue.hidden { opacity: 0; pointer-events: none; }
.court-reactions figure { opacity: .62; transform: translateY(4px) scale(.98); filter: saturate(.78); transition: opacity .24s ease, transform .32s cubic-bezier(.2,.72,.25,1), filter .24s ease; }
.court-reactions figure.is-active { opacity: 1; transform: translateY(0) scale(1); filter: saturate(1); }
.court-reactions figure.court-reaction--gaze.is-active { transform: translateX(-4px) rotate(-1deg); }
.court-reactions figure.court-reaction--recoil.is-active { transform: translateX(5px) scale(.98); }
.court-reactions figure.court-reaction--interrupt.is-active { animation: reaction-interrupt .42s cubic-bezier(.2,.72,.25,1) both; }
.court-reactions figure.court-reaction--silence.is-active { filter: saturate(.58) brightness(.86); }
.court-reactions figure.is-focus { z-index: 2; filter: saturate(1.08) brightness(1.08); }
.court-reactions figure.is-settling { opacity: .72; transform: translateY(6px) scale(.97); filter: saturate(.65) brightness(.92); }
.court-reactions figure.is-focus figcaption { border-left-color: rgba(215,189,121,.9); }
.court-cinematic__figure--actor.is-interrupted { animation: court-actor-interrupted .26s cubic-bezier(.2,.72,.25,1) both; }
@keyframes court-actor-interrupted { 0% { transform: translateX(0); } 45% { transform: translateX(-8px) rotate(-.5deg); } 100% { transform: translateX(0); } }
@keyframes reaction-interrupt { 0% { opacity: .3; transform: translateY(8px) scale(.96); } 55% { transform: translateY(-3px) scale(1.02); } 100% { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 760px) {
  .evidence-cross-matrix__filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
  .evidence-cross-matrix__filters button { flex: 0 0 auto; }
  .evidence-cross-matrix__focus > p { align-items: flex-start; flex-direction: column; gap: 2px; }
  .evidence-cross-matrix__grid { grid-template-columns: 1fr; }
  .court-reaction-cue { top: 222px; width: 58vw; font-size: 7px; }
  .evidence-cross-reading__body > p { font-size: max(var(--read-dense), 7.5px); }
  .evidence-cross-reading__body li p { font-size: max(var(--read-dense), 7px); }
}
@media (orientation: landscape) and (max-height: 540px) {
  body { --mobile-rail: clamp(214px, 28vw, 244px); }
  .objective .objective__copy { font-size: max(var(--read-dense), 8.2px); line-height: 1.48; }
  .objective__fact b { font-size: max(var(--read-dense), 7.8px); }
  .objective__fact em { font-size: max(var(--read-dense), 8.2px); line-height: 1.45; }
  .objective__details summary { font-size: max(var(--read-dense), 7.8px); }
  .court-reactions { top: 72px; width: min(31vw, 280px); height: 104px; gap: 3px; }
  .court-reactions figure { width: 48px; }
  .court-reactions figcaption { bottom: 2px; padding: 2px 3px; }
  .court-reactions figcaption b { font-size: 7px; }
  .court-reactions figcaption span { display: none; }
  .court-evidence { top: 72px; width: min(148px, 22vw); }
  .court-evidence figcaption { padding: 4px 5px 5px; gap: 3px; }
  .court-evidence small { font-size: 7px; }
  .court-evidence b { font-size: 8px; line-height: 1.35; }
  .court-evidence span { display: -webkit-box; font-size: 7px; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .court-reaction-cue { top: 180px; width: min(34vw, 300px); max-height: 34px; overflow: hidden; font-size: 7.5px; }
  .court-proof-strip { top: 41px; width: calc(100% - 18px); gap: 3px; }
  .court-proof-strip span { padding: 3px 5px; font-size: 7.5px; }
  .court-proof-strip svg { width: 10px; height: 10px; }
  .court-cinematic__caption > span { font-size: 7.5px; }
  .court-cinematic__caption h2 { font-size: 20px; }
  .court-cinematic__caption > p { font-size: 9.5px; line-height: 1.52; }
  .evidence-cross-matrix__grid { grid-template-columns: 1fr; }
}

/* Case-file layout: make the deduction board feel readable, not like a control wall. */
.deduction.panel[data-deduction-board="case-file"] {
  background-color: #080d0b;
  background-image: linear-gradient(90deg, rgba(126,163,143,.035), transparent 22%, transparent 78%, rgba(184,148,83,.03));
}
.deduction.panel[data-deduction-board="case-file"]::before {
  border-color: rgba(184,148,83,.24);
  box-shadow: inset 0 0 42px rgba(82,121,107,.035);
}
.deduction.panel[data-deduction-board="case-file"] .panel__header {
  margin: -10px auto 15px;
  padding: 12px 15px 13px;
  border: 1px solid rgba(201,181,136,.18);
  border-top-color: rgba(184,148,83,.48);
  background: rgba(11,18,15,.84);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.deduction.panel[data-deduction-board="case-file"] .panel__header::after {
  content: "";
  position: absolute;
  right: 15px;
  bottom: -1px;
  left: 15px;
  height: 1px;
  background: rgba(126,163,143,.58);
  transform-origin: left;
  transition: transform .25s ease;
}
.deduction.panel[data-deduction-board="case-file"] .panel__header:hover::after { transform: scaleX(.42); }
.deduction.panel[data-deduction-board="case-file"] .panel__header span { color: #9bb4a5; font-size: 9px; letter-spacing: .2em; }
.deduction.panel[data-deduction-board="case-file"] .panel__header h2 { color: #e0cda3; font-size: clamp(23px, 2.2vw, 32px); }
.deduction__status {
  align-items: center;
  gap: 12px;
  margin: 0 auto 10px;
  padding: 8px 11px;
  border: 1px solid rgba(126,163,143,.16);
  border-left: 3px solid rgba(126,163,143,.62);
  background: rgba(22,39,31,.42);
}
.deduction__status p { margin: 0; min-width: 0; color: #bdb6a5; font-size: 10px; line-height: 1.55; }
.deduction__status > span { flex: 0 0 auto; padding: 4px 7px; border: 1px solid rgba(184,148,83,.44); color: #d2b878; background: rgba(91,67,31,.22); font-size: 8px; letter-spacing: .04em; }
.deduction-rhythm {
  margin: 0 auto 10px;
  padding: 11px 12px 10px;
  border: 1px solid rgba(126,163,143,.34);
  border-radius: 8px;
  background: rgba(15,29,23,.74);
  box-shadow: 0 10px 30px rgba(0,0,0,.16), inset 0 1px rgba(255,255,255,.025);
}
.deduction-rhythm__head { padding-bottom: 2px; }
.deduction-rhythm__head > span > svg { width: 18px; height: 18px; color: #9bc0aa; }
.deduction-rhythm__head small { color: #9db5a6; font-size: 8px; letter-spacing: .12em; }
.deduction-rhythm__head b { color: #ead7ad; font-size: 12px; }
.deduction-rhythm__steps { position: relative; gap: 6px; }
.deduction-rhythm__steps::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 22px;
  right: 8%;
  left: 8%;
  height: 1px;
  background: rgba(184,148,83,.25);
}
.deduction-rhythm__steps button {
  position: relative;
  z-index: 1;
  min-height: 49px;
  padding: 6px 7px;
  border: 1px solid rgba(201,181,136,.2);
  border-top: 2px solid rgba(201,181,136,.3);
  border-radius: 6px;
  background: rgba(7,12,10,.9);
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.deduction-rhythm__steps button:hover,
.deduction-rhythm__steps button:focus-visible { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(0,0,0,.2); }
.deduction-rhythm__steps button.is-selected { border-color: rgba(215,189,121,.82); background: rgba(87,67,31,.34); box-shadow: inset 0 -3px rgba(215,189,121,.72), 0 6px 16px rgba(0,0,0,.16); }
.deduction-rhythm__steps button.is-selected > span { color: #211b0f; border-color: #d7bd79; background: #d7bd79; }
.deduction-rhythm__steps button > span { width: 21px; height: 21px; border-radius: 50%; color: #c9b77e; border-color: rgba(201,181,136,.48); background: rgba(184,148,83,.08); font-size: 8px; }
.deduction-rhythm__steps button b { color: #d3c39e; font-size: 9px; }
.deduction-rhythm__steps button em { color: #8c9c91; font-size: 7px; }
.deduction-rhythm__steps button.is-complete > span { color: #183025; border-color: #91b7a8; background: #91b7a8; }
.deduction-rhythm__cue { margin-top: 3px; padding: 7px 9px 4px 11px; border-left-width: 3px; border-left-color: rgba(215,189,121,.72); color: #c8bea6; background: rgba(91,67,31,.16); font-size: 9px; line-height: 1.55; }
.deduction-pulse {
  grid-template-columns: minmax(150px,.78fr) minmax(260px,1.55fr) minmax(170px,.95fr);
  gap: 7px;
  margin: 0 auto 12px;
  padding: 0;
  border: 0;
  background: transparent;
}
.deduction-pulse > div {
  min-height: 72px;
  align-content: center;
  gap: 5px;
  padding: 9px 11px;
  border: 1px solid rgba(126,163,143,.2);
  border-left: 3px solid rgba(126,163,143,.58);
  border-radius: 7px;
  background: rgba(11,20,16,.78);
}
.deduction-pulse > div:nth-child(2) { border-color: rgba(184,148,83,.48); border-left: 4px solid rgba(215,189,121,.88); background: rgba(63,49,25,.34); box-shadow: inset 0 0 25px rgba(184,148,83,.05); }
.deduction-pulse > div:nth-child(3) { border-color: rgba(176,76,62,.36); border-left-color: rgba(176,76,62,.72); background: rgba(50,24,22,.3); }
.deduction-pulse small { color: #91aa9b; font-size: 7.5px; letter-spacing: .1em; }
.deduction-pulse > div:nth-child(2) small { color: #d2b878; }
.deduction-pulse > div:nth-child(3) small { color: #c69a8f; }
.deduction-pulse b { color: #d4ccb8; font-size: 9px; line-height: 1.5; }
.deduction-pulse > div:nth-child(2) b { color: #f0dcae; font-size: 10px; }
.deduction-pulse > div:nth-child(3) b { color: #d9c4b0; }
.deduction-stage { margin: 7px auto; border-color: rgba(201,181,136,.18); border-radius: 8px; background: rgba(8,14,11,.68); box-shadow: 0 5px 16px rgba(0,0,0,.1); }
.deduction-stage > summary { min-height: 62px; padding: 9px 12px; border-radius: 8px; }
.deduction-stage > summary:hover { background: rgba(82,121,107,.07); }
.deduction-stage[open] > summary { border-radius: 8px 8px 0 0; background: rgba(42,67,54,.16); }
.deduction-stage.is-current { border-color: rgba(215,189,121,.72); box-shadow: inset 4px 0 rgba(215,189,121,.76), 0 7px 20px rgba(0,0,0,.14); }
.deduction-stage.is-current > summary .deduction-stage__index { color: #211b0f; border-color: #d7bd79; background: #d7bd79; box-shadow: 0 0 0 3px rgba(215,189,121,.1); }
.deduction-stage__index { border-radius: 50%; }
.deduction-stage__label small { color: #9bac9f; font-size: 7.5px; letter-spacing: .08em; }
.deduction-stage__label b { color: #e0cfaa; font-size: 13px; }
.deduction-stage__label > span { color: #aaa493; font-size: 8.5px; }
.deduction-stage > summary > em { color: #9ca99d; font-size: 8px; }
.deduction-stage[data-stage-state="current"] > summary > em { color: #e1c47f; }
.deduction-stage[data-stage-state="complete"] > summary > em { color: #9dc0ad; }
.deduction-stage__body { padding: 4px 12px 13px; }
.deduction-stage__body > .chain-grid { margin-top: 8px; }
.deduction-workbench { border-color: rgba(215,189,121,.42); border-radius: 8px; box-shadow: inset 0 0 0 999px rgba(2,4,4,.06), inset 0 0 38px rgba(0,0,0,.38), 0 10px 26px rgba(0,0,0,.18); }
.deduction-workbench > button { border-radius: 6px; border-color: rgba(215,189,121,.56); background: rgba(7,11,9,.92); box-shadow: 0 4px 14px rgba(0,0,0,.42); }
.deduction-workbench > button:hover, .deduction-workbench > button[aria-pressed="true"] { border-color: #d7bd79; background: rgba(87,31,27,.92); box-shadow: 0 0 0 3px rgba(215,189,121,.12), 0 5px 18px rgba(0,0,0,.4); }
.deduction-workbench__copy { left: 18%; right: 18%; bottom: 12px; min-height: 78px; padding: 11px 15px; border: 1px solid rgba(215,189,121,.36); border-radius: 7px; background: rgba(5,8,7,.88); }
.deduction-workbench__copy small { color: #c3a869; font-size: 8px; }
.deduction-workbench__copy strong { color: #f0dcae; font-size: 14px; }
.deduction-workbench__copy p { color: #c3bbab; font-size: 9px; }
.archive-comparison__row { border-radius: 6px; border-color: rgba(201,181,136,.18); background: rgba(6,11,9,.58); }
.archive-comparison__row.is-found { border-color: rgba(126,163,143,.58); background: rgba(24,48,37,.28); }
.archive-comparison__row header > span { min-width: 0; display: grid; gap: 2px; }
.archive-comparison__row header small { color: #8fa499; font-size: 6.5px; }
.archive-comparison__row header b { font-size: 9px; }
.archive-comparison__sequence { display: grid; grid-template-columns: minmax(0,1fr) 12px minmax(0,1fr) 12px minmax(0,1fr) 12px minmax(0,1fr); align-items: stretch; gap: 3px; }
.archive-comparison__sequence > span { min-width: 0; display: grid; gap: 2px; padding: 5px 5px 4px; border: 1px solid rgba(201,181,136,.15); background: rgba(5,8,7,.52); }
.archive-comparison__sequence > span:nth-of-type(2) { border-color: rgba(184,148,83,.26); }
.archive-comparison__sequence > span:nth-of-type(3) { border-color: rgba(176,76,62,.26); }
.archive-comparison__sequence > span:nth-of-type(4) { border-color: rgba(126,163,143,.32); }
.archive-comparison__sequence > span b { color: #a98d57; font-size: 6px; }
.archive-comparison__sequence > span small { color: #9b927e; font-size: 6px; }
.archive-comparison__sequence > span em { min-width: 0; overflow-wrap: anywhere; color: #c9bea5; font-size: 6.5px; line-height: 1.35; font-style: normal; }
.archive-comparison__sequence > i { align-self: center; width: 11px; color: #9b8a61; }
.archive-comparison__row > p { padding-top: 2px; border-top: 1px solid rgba(201,181,136,.1); color: #aaa493; }
.archive-comparison__row > p span { color: #9eb5a5; }

@media (max-width: 760px) {
  .deduction.panel[data-deduction-board="case-file"] .panel__header { margin-top: -4px; padding: 9px 9px 10px; }
  .deduction.panel[data-deduction-board="case-file"] .panel__header h2 { font-size: 21px; }
  .deduction__status { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; padding: 7px 8px; }
  .deduction__status p { grid-column: 1 / -1; font-size: max(var(--read-dense), 8px); }
  .deduction__status > span { justify-self: start; font-size: max(var(--read-dense), 7px); }
  .deduction-rhythm { padding: 8px 8px 7px; border-radius: 7px; }
  .deduction-rhythm__steps { grid-template-columns: repeat(5, minmax(122px,1fr)); overflow-x: auto; padding: 1px 1px 4px; }
  .deduction-rhythm__steps::before { display: none; }
  .deduction-rhythm__steps button { min-height: 43px; }
  .deduction-rhythm__cue { font-size: max(var(--read-dense), 8px); }
  .deduction-pulse { grid-template-columns: 1fr; gap: 5px; }
  .deduction-pulse > div { min-height: 0; padding: 8px 9px; }
  .deduction-pulse > div:nth-child(2) { order: -1; }
  .deduction-pulse b, .deduction-pulse > div:nth-child(2) b { font-size: max(var(--read-secondary), 9px); }
  .deduction-stage > summary { min-height: 50px; padding: 7px 8px; }
  .deduction-stage__body { padding: 3px 8px 9px; }
  .deduction-workbench { height: 240px; }
  .deduction-workbench__copy { left: 8%; right: 8%; min-height: 70px; padding: 8px 10px; }
  .deduction-workbench__copy strong { font-size: 11px; }
  .archive-comparison__sequence { grid-template-columns: 1fr; gap: 3px; }
  .archive-comparison__sequence > i { justify-self: center; transform: rotate(90deg); }
}

@media (orientation: landscape) and (max-height: 540px) {
  .deduction.panel[data-deduction-board="case-file"] .panel__header { margin-top: -2px; padding: 6px 8px 7px; }
  .deduction.panel[data-deduction-board="case-file"] .panel__header h2 { font-size: 18px; }
  .deduction__status { padding: 5px 7px; }
  .deduction__status p { font-size: 8px; }
  .deduction-rhythm { padding: 6px 7px; }
  .deduction-pulse { grid-template-columns: 1fr 1.4fr 1fr; gap: 4px; }
  .deduction-pulse > div { min-height: 52px; padding: 5px 7px; }
  .deduction-pulse small { font-size: 6px; }
  .deduction-pulse b, .deduction-pulse > div:nth-child(2) b { font-size: 7px; }
  .deduction-stage > summary { min-height: 38px; padding: 5px 7px; }
  .deduction-stage__body { padding: 2px 7px 7px; }
  .archive-comparison__sequence > span em { font-size: 5.8px; }
}

/* Page mode keeps the five reasoning beats readable while preserving every node in the DOM. */
.deduction[data-view-mode="pages"] .deduction-stage.is-page-hidden { display: none; }
.deduction-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  width: min(760px, 100%);
  margin: 0 auto 10px;
  padding: 6px 8px;
  border-top: 1px solid rgba(201,181,136,.15);
  border-bottom: 1px solid rgba(201,181,136,.15);
  background: rgba(8,14,11,.52);
}
.deduction-pagination button { min-height: 27px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-color: rgba(126,163,143,.3); color: #a4b7a4; background: rgba(82,121,107,.08); }
.deduction-pagination button:last-child { justify-self: end; }
.deduction-pagination button:hover:not(:disabled), .deduction-pagination button:focus-visible:not(:disabled) { border-color: rgba(215,189,121,.72); color: #e5d19f; background: rgba(91,67,31,.2); }
.deduction-pagination button:disabled { opacity: .3; cursor: not-allowed; }
.deduction-pagination button svg { width: 13px; height: 13px; }
.deduction-pagination > span { min-width: 130px; display: grid; gap: 2px; text-align: center; }
.deduction-pagination > span small { color: #8ea596; font-size: 6.5px; letter-spacing: .12em; }
.deduction-pagination > span b { color: #d5c39b; font-size: 8.5px; font-weight: 600; }
.deduction[data-view-mode="all"] .deduction-pagination { opacity: .55; }
.deduction[data-view-mode="all"] .deduction-pagination button { visibility: hidden; }
.deduction[data-view-mode="all"] .deduction-pagination > span b::after { content: " · 全卷"; color: #8ea596; font-weight: 400; }
.court-gate-status.draft-ready > div[data-scope="main"], .court-gate-status.draft-ready > div[data-scope="responsibility"] { border-left-color: rgba(215,189,121,.82); background: rgba(91,67,31,.11); }
.court-gate-status.ready.draft-ready > div[data-scope="main"], .court-gate-status.ready.draft-ready > div[data-scope="responsibility"] { border-left-color: rgba(82,121,107,.92); background: rgba(82,121,107,.085); }
.accusation-gate-note { margin: 7px auto 0; max-width: 720px; padding: 6px 9px; border-left: 3px solid rgba(184,148,83,.72); color: #c6b58f; background: rgba(91,67,31,.14); font-size: 8px; line-height: 1.5; }
.accusation-gate-note.ready { border-left-color: rgba(126,163,143,.78); color: #a9c0b1; background: rgba(82,121,107,.12); }
#submit-accusation:disabled { opacity: .42; border-color: rgba(201,181,136,.2); color: #938875; background: rgba(255,255,255,.03); cursor: not-allowed; }

@media (max-width: 760px) {
  .deduction-pagination { gap: 5px; padding: 5px 6px; }
  .deduction-pagination button { min-height: 29px; padding: 4px 6px; font-size: max(var(--read-dense), 7px); }
  .deduction-pagination > span { min-width: 104px; }
  .deduction-pagination > span b { font-size: max(var(--read-dense), 7px); }
  .accusation-gate-note { font-size: max(var(--read-dense), 7.5px); }
}

/* Each case-file page mirrors the exact objective order inside that phase. */
.deduction-stage-flow {
  display: flex;
  align-items: stretch;
  gap: 3px;
  margin: 7px 0 10px;
  padding: 5px;
  overflow-x: auto;
  border-top: 1px solid rgba(126,163,143,.16);
  border-bottom: 1px solid rgba(126,163,143,.16);
  background: rgba(12,22,18,.54);
  list-style: none;
  scrollbar-width: thin;
}
.deduction-stage-flow li {
  position: relative;
  flex: 1 0 118px;
  min-width: 0;
  min-height: 38px;
  display: grid;
  grid-template-columns: 20px minmax(0,1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid rgba(201,181,136,.12);
  background: rgba(5,9,7,.56);
}
.deduction-stage-flow li > span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201,181,136,.32);
  border-radius: 50%;
  color: #9d9279;
  font-size: 8px;
}
.deduction-stage-flow li > b { min-width: 0; color: #bdb39d; font-size: 9px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.deduction-stage-flow li > em { color: #79776d; font-size: 7px; font-style: normal; white-space: nowrap; }
.deduction-stage-flow li[data-flow-state="complete"] { border-color: rgba(126,163,143,.28); background: rgba(32,57,45,.2); }
.deduction-stage-flow li[data-flow-state="complete"] > span { border-color: rgba(126,163,143,.68); color: #183025; background: #91b7a8; }
.deduction-stage-flow li[data-flow-state="complete"] > em { color: #8fb19f; }
.deduction-stage-flow li[data-flow-state="current"] { border-color: rgba(215,189,121,.72); background: rgba(91,67,31,.28); box-shadow: inset 0 -2px rgba(215,189,121,.62); }
.deduction-stage-flow li[data-flow-state="current"] > span { border-color: #d7bd79; color: #211b0f; background: #d7bd79; }
.deduction-stage-flow li[data-flow-state="current"] > b { color: #f0dcae; }
.deduction-stage-flow li[data-flow-state="current"] > em { color: #e1c47f; }
.deduction-stage__body > .deduction-stage-flow + .chain-grid { margin-top: 0; }

@media (max-width: 760px) {
  .deduction-stage-flow { margin: 5px 0 8px; padding: 4px; }
  .deduction-stage-flow li { flex-basis: 124px; min-height: 36px; grid-template-columns: 18px minmax(0,1fr) auto; gap: 5px; padding: 4px 6px; }
  .deduction-stage-flow li > span { width: 18px; height: 18px; font-size: 7px; }
  .deduction-stage-flow li > b { font-size: max(var(--read-dense), 8px); }
  .deduction-stage-flow li > em { font-size: max(var(--read-dense), 6.5px); }
}

@media (orientation: landscape) and (max-height: 540px) {
  .deduction-stage-flow { margin: 3px 0 5px; padding: 3px; }
  .deduction-stage-flow li { flex-basis: 108px; min-height: 29px; grid-template-columns: 16px minmax(0,1fr) auto; gap: 4px; padding: 3px 5px; }
  .deduction-stage-flow li > span { width: 16px; height: 16px; font-size: 6px; }
  .deduction-stage-flow li > b { font-size: 7px; }
  .deduction-stage-flow li > em { font-size: 6px; }
}

/* Court readability: the three key beats remain dramatic without burying faces or proof in shadow. */
body:not([data-reading-contrast="high"]) .court-cinematic__background { filter: brightness(.7) saturate(.78) contrast(1.08); }
body:not([data-reading-contrast="high"]) .court-cinematic[data-camera="wide"] .court-cinematic__background { filter: brightness(.74) saturate(.8) contrast(1.06); }
body:not([data-reading-contrast="high"]) .court-cinematic[data-camera="evidence"] .court-cinematic__background { filter: brightness(.64) saturate(.76) contrast(1.08); }
body:not([data-reading-contrast="high"]) .court-cinematic[data-camera="close"] .court-cinematic__background { filter: brightness(.62) saturate(.74) contrast(1.1); }
body:not([data-reading-contrast="high"]) .court-cinematic[data-camera="review"] .court-cinematic__background { filter: brightness(.6) saturate(.7) contrast(1.1); }
body:not([data-reading-contrast="high"]) .court-cinematic__figure img { filter: drop-shadow(0 24px 38px rgba(0,0,0,.76)) brightness(1) saturate(.92) contrast(1.04); }
body:not([data-reading-contrast="high"]) .court-reactions img { filter: drop-shadow(0 14px 18px rgba(0,0,0,.72)) brightness(.76) saturate(.76) contrast(1.04); }
.court-cinematic[data-shot-role="opening"] .court-cinematic__caption { border-top-color: rgba(126,163,143,.7); }
.court-cinematic[data-shot-role="opening"] .court-cinematic__caption h2 { color: #d9d8bf; }
.court-cinematic[data-shot-role="confrontation"] .court-reaction-cue { border-left-color: rgba(176,76,62,.76); background: rgba(50,24,22,.48); }
.court-cinematic[data-shot-role="verdict"] .court-reaction-cue { border-left-color: rgba(215,189,121,.88); background: rgba(63,49,25,.5); }

/* Final visual pass: one legible language across every playable surface. */
:root {
  --case-evidence: #8db8a2;
  --case-verdict: #ddc27e;
  --case-risk: #d36a59;
  --case-ink: #090c0a;
  --case-surface: rgba(13,17,14,.94);
  --case-line: rgba(202,190,158,.24);
  --case-text: #ded5c1;
  --case-muted: #aaa491;
}
* { letter-spacing: 0 !important; }

/* Scene and story images stay inspectable instead of disappearing under mood filters. */
body:not([data-reading-contrast="high"]) .scene-image { filter: brightness(.8) saturate(.93) contrast(1.04); }
.scene-view::after {
  background:
    radial-gradient(circle at 50% 48%, transparent 46%, rgba(2,3,3,.18) 79%, rgba(1,2,2,.56) 100%),
    linear-gradient(180deg, rgba(2,3,3,.2), transparent 28%, transparent 72%, rgba(2,3,3,.52));
}
.location-card,
.objective {
  border-left-width: 3px;
  background: rgba(8,12,10,.86);
  box-shadow: 0 12px 34px rgba(0,0,0,.28);
  backdrop-filter: blur(5px);
}
.location-card { border-left-color: var(--case-verdict); }
.objective { border-left-color: var(--case-evidence); }
.location-card p,
.objective .objective__copy { color: #c3bcaa; }
.objective__stage { gap: 0; border-top: 1px solid var(--case-line); border-bottom: 1px solid var(--case-line); }
.objective__stage > span { background: transparent; border-left-width: 2px; }
.location-tabs button { border-top: 2px solid transparent; }
.location-tabs button.active { background: rgba(119,53,44,.28); box-shadow: inset 0 -2px var(--case-risk); border-top-color: rgba(211,106,89,.48); }
.hotspot { background: rgba(8,11,9,.72); box-shadow: 0 5px 18px rgba(0,0,0,.28); }
.hotspot > i { border-color: var(--case-verdict); }
.hotspot--person,
.hotspot--person:hover,
.hotspot--person:focus-visible { background: transparent; box-shadow: none; }
.hotspot--person > i { border-color: var(--case-evidence); }

.prologue .story-stage__background { filter: brightness(.68) saturate(.82) contrast(1.07); }
.dossier .story-stage__background { filter: brightness(.54) saturate(.72) contrast(1.08); }
.briefing .story-stage__background { filter: brightness(.67) saturate(.82) contrast(1.06); }
.dossier-person img,
.briefing__portrait img { filter: brightness(.96) saturate(.9) contrast(1.03) drop-shadow(0 18px 28px rgba(0,0,0,.68)); }
.dossier__shell { background: rgba(7,10,8,.72); box-shadow: 0 24px 80px rgba(0,0,0,.34); }
.dossier__tabs button[aria-selected="true"] { color: #f0dca9; background: rgba(116,50,42,.24); box-shadow: inset 0 -3px var(--case-risk); }
.dossier__entries,
.dossier__facts { background: rgba(202,190,158,.13); }
.dossier__entries article,
.dossier__facts div { background: rgba(10,14,11,.88); }

/* Dialogue is a stage, with the speaker and the usable text equally readable. */
.dialogue { background: linear-gradient(90deg, rgba(2,3,3,.76), rgba(2,3,3,.06) 48%, rgba(2,3,3,.58)); }
.dialogue__portrait img { filter: brightness(1) saturate(.93) contrast(1.03) drop-shadow(0 22px 34px rgba(0,0,0,.7)); }
.dialogue__body {
  border-top: 1px solid rgba(221,194,126,.62);
  border-left: 3px solid var(--case-verdict);
  background: rgba(8,12,10,.86);
  box-shadow: 0 20px 58px rgba(0,0,0,.34);
  backdrop-filter: blur(6px);
}
.dialogue__body > p { color: #ded5c1; }
.dialogue__options button,
.interview-approach button { border-color: rgba(141,184,162,.28); background: rgba(14,22,18,.72); }
.dialogue__options button:hover,
.dialogue__options button:focus-visible { border-color: var(--case-evidence); background: rgba(39,67,53,.42); }

/* Evidence, tasks, puzzles, accusation and ending now share the same state grammar. */
.panel { background: #090d0b; }
.panel::before { border-color: rgba(221,194,126,.25); }
.panel__header { padding-bottom: 12px; border-bottom: 1px solid var(--case-line); }
.evidence-card,
.task-item,
.chain,
.puzzle-sheet,
.accusation-sheet,
.ending-reasoning-trace,
.offline-prep {
  border-color: var(--case-line);
  background-color: var(--case-surface);
  box-shadow: 0 12px 32px rgba(0,0,0,.2);
}
.evidence-card { border-radius: 3px; }
.evidence-card__image { background: #121815; border-bottom: 1px solid rgba(141,184,162,.2); }
.evidence-card__image img { filter: brightness(1.04) saturate(.96) contrast(1.02); }
.evidence-card--reasoning-contested { border-color: rgba(221,194,126,.5); }
.evidence-card--reasoning-resolved { border-color: rgba(141,184,162,.56); }
.evidence-card .number { color: var(--case-risk); }
.evidence-card__continue { border-color: rgba(141,184,162,.54); color: #c7dfd0; background: rgba(49,83,66,.24); }
.task-item { border-left: 3px solid rgba(202,190,158,.22); }
.task-item--main { border-left-color: var(--case-risk); }
.task-item--responsibility { border-left-color: var(--case-verdict); }
.task-item--completion { border-left-color: var(--case-evidence); }
.puzzle-sheet,
.accusation-sheet { border-top: 3px solid var(--case-verdict); background: #0c100e; }
.puzzle-operation-rail { border-top: 1px solid var(--case-line); border-bottom: 1px solid var(--case-line); }
.puzzle-operation-rail li { border: 0; border-right: 1px solid var(--case-line); background: transparent; }
.puzzle-operation-rail li:last-child { border-right: 0; }
.puzzle-operation-rail li[aria-current="step"] { background: rgba(77,59,28,.28); box-shadow: inset 0 -3px var(--case-verdict); }
.puzzle-case-link { border-left-color: var(--case-evidence); background: rgba(43,73,58,.2); }
.progressive-hints { border-color: rgba(221,194,126,.3); background: rgba(65,50,26,.14); }
.continuation-summary { border-left: 4px solid var(--case-evidence); background: rgba(35,61,48,.24); }
.continuation-summary p b { color: var(--case-verdict); }
.accusation__columns { gap: 6px; }
.accusation fieldset { border-color: rgba(202,190,158,.24); background: rgba(255,255,255,.012); }
.accusation label:has(input:checked) { border-color: var(--case-risk); background: rgba(119,53,44,.22); box-shadow: inset 3px 0 var(--case-risk); }
.accusation-support-preview { border-left-color: var(--case-evidence); background: rgba(12,18,14,.76); }
.accusation-support-preview article[data-support-state="ready"] { border-left: 3px solid var(--case-evidence); }
.accusation-support-preview article[data-support-state="pending"] { border-left: 3px solid var(--case-verdict); }
.accusation-support-preview article > header > span { min-width: 0; display: grid; gap: 2px; }
.accusation-support-preview article > header > span small { color: var(--case-muted); font-size: 8px; }
.accusation-support-preview article[data-support-state="ready"] > header > em { color: var(--case-evidence); }
.accusation-support-preview article[data-support-state="pending"] > header > em { color: var(--case-verdict); }
.accusation-support-preview li.is-optional > span { color: #98a799; }
.ending__content { padding: 20px 24px; border-top: 1px solid rgba(221,194,126,.56); background: rgba(7,10,8,.54); backdrop-filter: blur(4px); }
.ending__content > p { color: #ded4be; }

/* Deduction opens as a case-file directory, then narrows to one vertical working note. */
.deduction.panel[data-deduction-board="case-file"] .panel__header { align-items: flex-start; border-radius: 0; }
.deduction.panel[data-deduction-board="case-file"] .panel__header > div { display: grid; gap: 3px; }
.deduction.panel[data-deduction-board="case-file"] .panel__header p { margin: 0; color: #9fa698; font-size: 9px; }
.deduction__status { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; border: 0; border-left: 4px solid var(--case-evidence); background: rgba(28,48,38,.28); }
.deduction__status > div { min-width: 0; display: grid; gap: 2px; }
.deduction__status small { color: var(--case-evidence); font-size: 8px; }
.deduction__status b { color: #ded4bc; font-size: 11px; font-weight: 600; }
.deduction__status p { color: #aaa998; font-size: 9px; }
.deduction__status > span { grid-column: 2; grid-row: 1; border-color: rgba(221,194,126,.45); color: var(--case-verdict); }
.deduction-rhythm { border-width: 1px 0; border-radius: 0; background: transparent; box-shadow: none; }
.deduction-rhythm__steps { gap: 0; border-top: 1px solid var(--case-line); border-bottom: 1px solid var(--case-line); }
.deduction-rhythm__steps::before { display: none; }
.deduction-rhythm__steps button { min-height: 54px; border: 0; border-right: 1px solid var(--case-line); border-radius: 0; background: transparent; box-shadow: none; }
.deduction-rhythm__steps button:last-child { border-right: 0; }
.deduction-rhythm__steps button:hover,
.deduction-rhythm__steps button:focus-visible { transform: none; background: rgba(141,184,162,.08); }
.deduction-rhythm__steps button.is-selected { border: 0; background: rgba(85,65,31,.24); box-shadow: inset 0 -3px var(--case-verdict); }
.deduction-rhythm__steps button > span { border-radius: 2px; }
.deduction-rhythm__cue { border-left-color: var(--case-verdict); background: rgba(76,58,29,.18); }
.deduction-pulse { display: grid; grid-template-columns: 118px minmax(0,1fr); gap: 0; border: 1px solid rgba(221,194,126,.34); background: rgba(12,16,13,.8); }
.deduction-pulse > header { grid-row: 1 / span 3; display: grid; align-content: start; gap: 4px; padding: 13px 12px; border-right: 1px solid var(--case-line); background: rgba(89,68,33,.2); }
.deduction-pulse > header span { color: var(--case-verdict); font-size: 8px; }
.deduction-pulse > header b { color: #e5d5ad; font-size: 12px; line-height: 1.45; }
.deduction-pulse > div { min-height: 0; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--case-line); border-radius: 0; background: transparent; box-shadow: none; }
.deduction-pulse > div:last-child { border-bottom: 0; }
.deduction-pulse > div[data-pulse-kind="fact"] { border-left: 3px solid var(--case-evidence); }
.deduction-pulse > div[data-pulse-kind="conflict"] { border-left: 3px solid var(--case-risk); background: rgba(90,35,30,.1); }
.deduction-pulse > div[data-pulse-kind="action"] { border-left: 3px solid var(--case-verdict); }
.deduction-pulse > div:nth-child(2),
.deduction-pulse > div:nth-child(3) { background-color: transparent; }
.deduction-pulse small { color: #9ba99d; }
.deduction-pulse > div[data-pulse-kind="conflict"] small { color: #cf8a7e; }
.deduction-pulse > div[data-pulse-kind="action"] small { color: var(--case-verdict); }
.deduction-pulse b,
.deduction-pulse > div:nth-child(2) b { color: var(--case-text); font-size: 10px; }
.deduction-stage { border-radius: 0; background: rgba(9,13,10,.62); }
.deduction-stage > summary,
.deduction-stage[open] > summary { border-radius: 0; }
.deduction-stage.is-current { border-color: rgba(221,194,126,.7); box-shadow: inset 4px 0 var(--case-verdict); }
.deduction-stage__index { border-radius: 2px; }
.deduction-pagination { border-color: var(--case-line); background: transparent; }
.archive-facts { display: grid; gap: 6px; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--case-line); }
.archive-facts > header { display: grid; gap: 2px; }
.archive-facts > header small { color: var(--case-evidence); font-size: 7px; }
.archive-facts > header b { color: var(--case-text); font-size: 10px; }
.archive-fact { border: 1px solid rgba(202,190,158,.16); background: rgba(7,10,8,.5); }
.archive-fact > header { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 8px; padding: 8px; border-bottom: 1px solid var(--case-line); }
.archive-fact > header > span { display: grid; place-items: center; color: var(--case-risk); border-right: 1px solid var(--case-line); font-size: 9px; }
.archive-fact > header b { color: #d8c69f; font-size: 9px; }
.archive-fact > header p { margin: 3px 0 0; color: var(--case-muted); font-size: 7.5px; line-height: 1.5; }
.archive-fact__lenses { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.archive-fact__lens { min-width: 0; padding: 7px 8px; border-right: 1px solid var(--case-line); }
.archive-fact__lens:last-child { border-right: 0; }
.archive-fact__lens small { color: var(--case-verdict); font-size: 7px; }
.archive-fact__lens p { margin: 3px 0 0; color: #bdb5a3; font-size: 7px; line-height: 1.5; }
.archive-fact__lens.is-locked { opacity: .58; background: rgba(255,255,255,.018); }

/* Split routes keep late-game reasoning visible as short lanes instead of one dense wall. */
.route-split-map {
  position: relative;
  display: grid;
  gap: 7px;
  margin: 8px 0 10px;
  padding: 9px 10px 10px;
  border: 1px solid rgba(141,184,162,.26);
  border-left: 3px solid var(--case-evidence);
  background: rgba(17,29,23,.56);
}
.route-split-map.is-complete { border-color: rgba(141,184,162,.52); background: rgba(31,58,45,.22); }
.route-split-map__header { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.route-split-map__header > span { min-width: 0; display: grid; grid-template-columns: 19px minmax(0,1fr); align-items: center; gap: 6px; }
.route-split-map__header > span > svg { width: 16px; height: 16px; color: var(--case-evidence); }
.route-split-map__header > span > span { min-width: 0; display: grid; gap: 1px; }
.route-split-map__header small { color: var(--case-evidence); font-size: 7px; }
.route-split-map__header strong { min-width: 0; color: var(--case-text); font-size: 10px; font-weight: 600; }
.route-split-map__header > em { flex: 0 0 auto; color: var(--case-verdict); font-size: 8px; font-style: normal; }
.route-split-map__cue { margin: 0; color: var(--case-muted); font-size: 7.5px; line-height: 1.45; }
.route-split-map__grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
.route-split-item { min-width: 0; display: grid; gap: 5px; padding: 6px 7px 7px; border: 1px solid rgba(202,190,158,.16); background: rgba(7,11,9,.62); }
.route-split-item[data-route-item-state="current"] { border-color: rgba(221,194,126,.68); background: rgba(74,57,27,.2); }
.route-split-item[data-route-item-state="complete"] { border-color: rgba(141,184,162,.38); background: rgba(33,59,46,.2); }
.route-split-item > header { min-width: 0; display: grid; grid-template-columns: 22px 38px minmax(0,1fr) auto; align-items: center; gap: 5px; }
.route-split-item > header > span { width: 19px; height: 19px; display: grid; place-items: center; border: 1px solid rgba(221,194,126,.46); color: var(--case-verdict); font-size: 7px; }
.route-split-item[data-route-item-state="complete"] > header > span { border-color: rgba(141,184,162,.58); color: var(--case-evidence); }
.route-split-item > header > div { min-width: 0; display: grid; gap: 1px; }
.route-split-item__evidence { position: relative; width: 38px; height: 28px; margin: 0; overflow: hidden; border: 1px solid rgba(141,184,162,.35); background: #111814; }
.route-split-item__evidence img { display: block; width: 100%; height: 100%; object-fit: cover; filter: brightness(.92) saturate(.8) contrast(1.03); }
.route-split-item__evidence figcaption { position: absolute; right: 2px; bottom: 1px; padding: 1px 2px; color: #d8c99f; background: rgba(4,7,5,.78); font-size: 5px; line-height: 1; }
.route-split-item__evidence--empty { display: grid; place-items: center; border-color: rgba(202,190,158,.2); color: #777163; }
.route-split-item__evidence--empty svg { width: 13px; height: 13px; }
.route-split-item > header small { color: var(--case-muted); font-size: 6px; }
.route-split-item > header strong { min-width: 0; overflow: hidden; color: #d9c89e; font-size: 8.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.route-split-item > header em { color: var(--case-verdict); font-size: 6.5px; font-style: normal; white-space: nowrap; }
.route-split-item[data-route-item-state="complete"] > header em { color: var(--case-evidence); }
.route-split-item > ol,
.route-split-map__side-route > ol,
.verdict-handoff-map__steps { min-width: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3px; margin: 0; padding: 0; list-style: none; }
.route-split-item > ol > li,
.route-split-map__side-route > ol > li,
.verdict-handoff-map__steps > li { position: relative; min-width: 0; display: grid; grid-template-columns: 12px minmax(0,1fr); align-items: center; gap: 3px; padding: 4px 4px 4px 3px; border-left: 2px solid rgba(202,190,158,.2); background: rgba(255,255,255,.018); }
.route-split-item > ol > li:not(:last-child)::after,
.route-split-map__side-route > ol > li:not(:last-child)::after,
.verdict-handoff-map__steps > li:not(:last-child)::after { content: ''; position: absolute; top: 50%; right: -4px; width: 5px; border-top: 1px solid rgba(202,190,158,.26); }
.route-split-item li > svg,
.route-split-map__side-route li > svg,
.verdict-handoff-map__steps li > svg { width: 11px; height: 11px; color: #7f786b; }
.route-split-item li > span,
.route-split-map__side-route li > span,
.verdict-handoff-map__steps li > span { min-width: 0; display: grid; gap: 1px; }
.route-split-item li small,
.route-split-map__side-route li small,
.verdict-handoff-map__steps li small { min-width: 0; overflow: hidden; color: #8f897a; font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }
.route-split-item li b,
.route-split-map__side-route li b,
.verdict-handoff-map__steps li b { min-width: 0; overflow: hidden; color: #c8c0ac; font-size: 6.5px; font-weight: 500; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.route-split-item li em,
.route-split-map__side-route li em,
.verdict-handoff-map__steps li em { display: none; }
.route-split-item li[data-route-step-state="complete"],
.route-split-map__side-route li[data-route-step-state="complete"],
.verdict-handoff-map__steps li[data-route-step-state="complete"] { border-left-color: var(--case-evidence); background: rgba(52,91,70,.24); }
.route-split-item li[data-route-step-state="complete"] > svg,
.route-split-map__side-route li[data-route-step-state="complete"] > svg,
.verdict-handoff-map__steps li[data-route-step-state="complete"] > svg { color: var(--case-evidence); }
.route-split-item li[data-route-step-state="current"],
.route-split-map__side-route li[data-route-step-state="current"],
.verdict-handoff-map__steps li[data-route-step-state="current"] { border-left-color: var(--case-verdict); background: rgba(91,67,31,.24); }
.route-split-item li[data-route-step-state="current"] > svg,
.route-split-map__side-route li[data-route-step-state="current"] > svg,
.verdict-handoff-map__steps li[data-route-step-state="current"] > svg { color: var(--case-verdict); }
.route-split-map__side-route { min-width: 0; display: grid; gap: 5px; padding: 6px 7px; border-top: 1px solid rgba(141,184,162,.22); background: rgba(12,21,17,.62); }
.route-split-map__side-route > header { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.route-split-map__side-route > header > span { min-width: 0; display: grid; grid-template-columns: 16px minmax(0,1fr); gap: 5px; align-items: center; }
.route-split-map__side-route > header svg { width: 14px; height: 14px; color: var(--case-evidence); }
.route-split-map__side-route > header > span > span { min-width: 0; display: grid; gap: 1px; }
.route-split-map__side-route > header small { color: var(--case-evidence); font-size: 6.5px; }
.route-split-map__side-route > header strong { color: #cfc7b3; font-size: 8px; font-weight: 600; }
.route-split-map__side-route > header em { color: var(--case-verdict); font-size: 7px; font-style: normal; white-space: nowrap; }
.verdict-handoff-map { border-left-color: var(--case-verdict); border-color: rgba(221,194,126,.3); background: rgba(40,31,17,.32); }
.verdict-handoff-map.is-complete { border-color: rgba(141,184,162,.52); background: rgba(31,58,45,.22); }
.verdict-handoff-map .route-split-map__header > span > svg { color: var(--case-verdict); }
.verdict-handoff-map .route-split-map__header small { color: var(--case-verdict); }
.verdict-handoff-map__steps { grid-template-columns: repeat(4,minmax(0,1fr)); }
.verdict-handoff-map__steps > li { min-height: 39px; }
.route-split-map__optional-route { min-width: 0; display: grid; grid-template-columns: 16px minmax(0,1fr); align-items: start; gap: 6px; padding: 6px 7px; border-top: 1px dashed rgba(202,190,158,.22); background: rgba(255,255,255,.018); }
.route-split-map__optional-route > svg { width: 14px; height: 14px; color: #9a907d; }
.route-split-map__optional-route > span { min-width: 0; display: grid; gap: 1px; }
.route-split-map__optional-route small { color: #9a907d; font-size: max(var(--read-dense), 7px); }
.route-split-map__optional-route strong { color: #c8b994; font-size: 8px; }
.route-split-map__optional-route p { margin: 1px 0 0; color: #8d887b; font-size: max(var(--read-dense), 7px); line-height: 1.45; }

/* Three named courtroom scenes remain dramatic while faces, evidence and captions stay clear. */
body:not([data-reading-contrast="high"]) .court-cinematic__background,
body:not([data-reading-contrast="high"]) .court-cinematic[data-camera="wide"] .court-cinematic__background { filter: brightness(.92) saturate(.9) contrast(1.03); }
body:not([data-reading-contrast="high"]) .court-cinematic[data-camera="evidence"] .court-cinematic__background,
body:not([data-reading-contrast="high"]) .court-cinematic[data-camera="close"] .court-cinematic__background,
body:not([data-reading-contrast="high"]) .court-cinematic[data-camera="review"] .court-cinematic__background { filter: brightness(.84) saturate(.87) contrast(1.04); }
.court-cinematic__shade { background: linear-gradient(90deg, rgba(2,3,3,.52), rgba(2,3,3,.025) 50%, rgba(2,3,3,.38)), linear-gradient(180deg, rgba(2,3,3,.07), transparent 46%, rgba(2,3,3,.5)); }
body:not([data-reading-contrast="high"]) .court-cinematic__figure img { filter: drop-shadow(0 22px 34px rgba(0,0,0,.64)) brightness(1.12) saturate(.98) contrast(1.02); }
body:not([data-reading-contrast="high"]) .court-cinematic[data-tone="exposed"] .court-cinematic__figure--actor img { filter: drop-shadow(0 22px 36px rgba(0,0,0,.72)) brightness(.96) saturate(.86) contrast(1.05); }
body:not([data-reading-contrast="high"]) .court-reactions img { filter: drop-shadow(0 12px 16px rgba(0,0,0,.6)) brightness(1.08) saturate(.95) contrast(1.02); }
.court-reactions figure { opacity: .84; }
.court-reactions figcaption { background: rgba(7,10,8,.86); }
.court-reactions figcaption b { color: #dfc999; }
.court-reactions figcaption span { color: #b6af9f; }
.court-evidence { border-color: rgba(221,194,126,.58); background: rgba(8,12,10,.94); }
.court-evidence > img { background: #17201b; filter: brightness(1.08) contrast(1.02); }
.court-cinematic__caption { background: rgba(6,9,7,.74); padding: 16px 18px; border-left: 3px solid var(--case-verdict); text-shadow: 0 2px 8px #000; }
.court-cinematic__caption > p { color: #e1d7c2; }
.court-cinematic__finding { color: #c3dacb !important; }
.court-cinematic[data-sequence-scene="assembly"] .court-cinematic__caption { border-left-color: var(--case-evidence); }
.court-cinematic[data-sequence-scene="firstResponsibility"] .court-cinematic__caption,
.court-cinematic[data-sequence-scene="responsibilityChain"] .court-cinematic__caption { border-left-color: var(--case-risk); }
.court-cinematic[data-sequence-scene="verdict"] .court-cinematic__caption { border-left-color: var(--case-verdict); }

@media (max-width: 760px) {
  .deduction__status { grid-template-columns: 1fr auto; }
  .deduction__status > div { grid-column: 1 / -1; }
  .deduction__status > span { grid-column: 2; grid-row: 2; }
  .deduction-pulse { grid-template-columns: 86px minmax(0,1fr); }
  .deduction-pulse > header { padding: 9px 8px; }
  .deduction-pulse > header b { font-size: max(var(--read-secondary), 9px); }
  .archive-fact__lenses { grid-template-columns: 1fr; }
  .archive-fact__lens { border-right: 0; border-bottom: 1px solid var(--case-line); }
  .archive-fact__lens:last-child { border-bottom: 0; }
  .accusation__columns { grid-template-columns: 1fr 1fr; }
  .court-cinematic__caption { background: rgba(6,9,7,.86); }
  .route-split-map { gap: 6px; margin: 6px 0 8px; padding: 7px 7px 8px; }
  .route-split-map__header > span { grid-template-columns: 16px minmax(0,1fr); gap: 5px; }
  .route-split-map__header > span > svg { width: 14px; height: 14px; }
  .route-split-map__header strong { font-size: max(var(--read-secondary), 8px); }
  .route-split-map__cue { font-size: max(var(--read-dense), 6.5px); }
  .route-split-map__grid { grid-template-columns: 1fr; gap: 4px; }
  .route-split-item { padding: 5px 6px 6px; }
  .route-split-item > header { grid-template-columns: 20px 32px minmax(0,1fr) auto; gap: 4px; }
  .route-split-item__evidence { width: 32px; height: 24px; }
  .route-split-item > ol > li,
  .route-split-map__side-route > ol > li,
  .verdict-handoff-map__steps > li { padding: 3px; }
  .route-split-item li b,
  .route-split-map__side-route li b,
  .verdict-handoff-map__steps li b { font-size: max(var(--read-dense), 6px); }
  .verdict-handoff-map__steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (orientation: landscape) and (max-height: 540px) {
  .deduction__status > div { display: grid; grid-template-columns: auto 1fr; column-gap: 7px; }
  .deduction__status > div p { grid-column: 1 / -1; }
  .deduction-pulse { grid-template-columns: 82px minmax(0,1fr); }
  .deduction-pulse > div { padding: 5px 7px; }
  .deduction-pulse > header { padding: 6px 7px; }
  .dialogue__portrait img { filter: brightness(1.04) saturate(.94) contrast(1.02) drop-shadow(0 14px 20px rgba(0,0,0,.62)); }
  .court-cinematic__caption { padding: 8px 10px; }
  .route-split-map { gap: 4px; margin: 4px 0 6px; padding: 5px 6px; }
  .route-split-map__cue { display: none; }
  .route-split-map__grid { gap: 3px; }
  .route-split-item { gap: 3px; padding: 4px 5px; }
  .route-split-item > header > span { width: 16px; height: 16px; }
  .route-split-item > header { grid-template-columns: 17px 27px minmax(0,1fr) auto; gap: 3px; }
  .route-split-item__evidence { width: 27px; height: 20px; }
  .route-split-item > header strong { font-size: max(var(--read-dense), 7.5px); }
  .route-split-item > ol > li,
  .route-split-map__side-route > ol > li,
  .verdict-handoff-map__steps > li { min-height: 25px; padding: 2px; }
  .route-split-map__side-route { gap: 3px; padding: 4px 5px; }
  .route-split-map__optional-route { padding: 4px 5px; }
}

/* Character art must sit directly in the scene, without rectangular backplates. */
.dialogue__portrait,
.court-cinematic__figure,
.court-reactions,
.court-reactions figure,
.cross-exam-heads figure {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dialogue {
  background:
    radial-gradient(ellipse at 19% 84%, rgba(2,3,3,.3), transparent 48%),
    linear-gradient(90deg, transparent 0 38%, rgba(2,3,3,.08) 48%, rgba(2,3,3,.56) 100%);
}

.court-reactions figure {
  overflow: visible;
}

.inspect-reaction,
.culpability-candidates button {
  background: transparent;
  box-shadow: none;
}

.hotspot--person span {
  padding: 4px 2px 3px;
  border: 0;
  border-bottom: 1px solid rgba(221,194,126,.62);
  background: transparent;
  color: #eadbb8;
  text-shadow: 0 1px 3px #000, 0 0 8px #000;
}

.hotspot--person:hover span,
.hotspot--person:focus-visible span {
  border: 0;
  border-bottom: 1px solid rgba(221,194,126,.62);
  background: transparent;
  box-shadow: none;
}

.court-reactions figcaption {
  right: auto;
  bottom: 4px;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 6px);
  padding: 2px 1px 3px;
  transform: translateX(-50%);
  border: 0;
  border-bottom: 1px solid rgba(221,194,126,.58);
  background: transparent;
  text-align: center;
  text-shadow: 0 1px 3px #000, 0 0 8px #000;
}

.court-reactions figcaption b,
.court-reactions figcaption span {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .court-reactions figcaption {
    bottom: 2px;
    max-width: calc(100% - 2px);
    padding: 1px 0 2px;
  }
}

/* Final readability pass: one clear next action, precise deduction feedback,
   and courtroom contrast that keeps evidence legible without flattening the mood. */
.player-deduction-form__match {
  grid-column: 1 / -1;
  min-height: 25px;
  margin: 0;
  padding: 5px 7px;
  border-left: 3px solid rgba(201,181,136,.42);
  color: #b9b09b;
  background: rgba(255,255,255,.025);
  font-size: 7.5px;
  line-height: 1.45;
}
.player-deduction-form__match[data-match-state="aligned"] {
  border-left-color: rgba(126,163,143,.9);
  color: #b8d3c2;
  background: rgba(82,121,107,.13);
}
.player-deduction-form__match[data-match-state="misaligned"] {
  border-left-color: rgba(176,76,62,.78);
  color: #d2aaa2;
  background: rgba(126,45,37,.12);
}
.player-deduction-card--misaligned {
  border-left-color: rgba(176,76,62,.72);
  background: rgba(58,25,22,.28);
}
.player-deduction-card--misaligned header em { color: #d0a39a; }
.player-deduction-card--misaligned small { color: #b39990; }

.court-gate-status {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.court-gate-status__next {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, auto) minmax(0, 1fr);
  align-items: baseline;
  gap: 7px;
  padding: 8px 10px;
  border-left: 4px solid var(--case-verdict);
  border-bottom: 1px solid rgba(221,194,126,.24);
  background: rgba(91,67,31,.2);
}
.court-gate-status__next small { color: var(--case-verdict); font-size: 7px; letter-spacing: .08em; }
.court-gate-status__next strong { color: #f0dcae; font-size: 10px; }
.court-gate-status__next span { min-width: 0; color: #c8c0ac; font-size: 8px; line-height: 1.45; overflow-wrap: anywhere; }
.court-gate-status[data-next-scope="ready"] .court-gate-status__next { border-left-color: var(--case-evidence); background: rgba(52,91,70,.2); }
.court-gate-status[data-next-scope="ready"] .court-gate-status__next small { color: var(--case-evidence); }

/* Keep the actionable gap in view; secondary proof stays one click away. */
.deduction__status-details { margin-top: 4px; }
.deduction__status-details > summary { display: inline-flex; align-items: center; gap: 4px; color: #9b8c6a; font-size: max(var(--read-dense), 7px); cursor: pointer; list-style: none; }
.deduction__status-details > summary::-webkit-details-marker { display: none; }
.deduction__status-details > summary svg { width: 12px; height: 12px; color: var(--case-verdict); }
.deduction__status-details > summary::after { content: ''; width: 5px; height: 5px; margin-left: 2px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .18s ease; }
.deduction__status-details[open] > summary::after { transform: rotate(225deg) translate(-1px, -1px); }
.deduction__status-details > p { margin: 4px 0 0; color: #aaa998; font-size: max(var(--read-dense), 8px); line-height: 1.5; }

.court-gate-status__details { grid-column: 1 / -1; min-width: 0; border: 1px solid rgba(201,181,136,.16); background: rgba(5,7,6,.28); }
.court-gate-status__details > summary { min-height: 32px; display: flex; align-items: center; gap: 7px; padding: 5px 9px; color: #a9976e; cursor: pointer; list-style: none; }
.court-gate-status__details > summary::-webkit-details-marker { display: none; }
.court-gate-status__details > summary > span { min-width: 0; display: grid; grid-template-columns: 14px auto minmax(0, 1fr); align-items: center; gap: 4px; }
.court-gate-status__details > summary span svg { width: 13px; height: 13px; color: var(--case-evidence); }
.court-gate-status__details > summary b { color: #d0bf98; font-size: max(var(--read-dense), 8px); }
.court-gate-status__details > summary small { min-width: 0; overflow: hidden; color: #807a6d; font-size: max(var(--read-dense), 7px); text-overflow: ellipsis; white-space: nowrap; }
.court-gate-status__details > summary > em { margin-left: auto; color: #9a8964; font-size: max(var(--read-dense), 7px); font-style: normal; white-space: nowrap; }
.court-gate-status__details > summary > svg { width: 13px; height: 13px; color: #9b8b69; transition: transform .18s ease; }
.court-gate-status__details[open] > summary { border-bottom: 1px solid rgba(201,181,136,.14); background: rgba(82,121,107,.045); }
.court-gate-status__details[open] > summary > svg { transform: rotate(180deg); }
.court-gate-status__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 6px; }
.court-gate-status__grid > div { min-width: 0; display: grid; gap: 3px; padding: 7px 8px; border-left: 3px solid rgba(176,76,62,.75); background: rgba(126,45,37,.055); }
.court-gate-status__grid > div[data-scope="responsibility"] { border-left-color: rgba(184,148,83,.86); background: rgba(168,129,67,.055); }
.court-gate-status__grid > div[data-scope="completion"] { border-left-color: rgba(82,121,107,.82); background: rgba(82,121,107,.06); }
.court-gate-status__grid small { color: #a98e61; font-size: max(var(--read-dense), 7.5px); }
.court-gate-status__grid strong { color: #d3c09a; font-size: max(var(--read-dense), 9px); font-weight: 600; }
.court-gate-status__grid span { color: #918978; font-size: max(var(--read-dense), 7.5px); line-height: 1.45; }
.court-gate-status.ready .court-gate-status__grid > div:not([data-scope="completion"]) { border-left-color: rgba(82,121,107,.92); background: rgba(82,121,107,.085); }

.deduction-pulse > div[data-pulse-kind="fact"] { opacity: .76; }
.deduction-pulse > div[data-pulse-kind="conflict"],
.deduction-pulse > div[data-pulse-kind="action"] { min-height: 43px; }
.deduction-pulse > div[data-pulse-kind="conflict"] b,
.deduction-pulse > div[data-pulse-kind="action"] b { font-size: max(var(--read-secondary), 10px); line-height: 1.45; }
.deduction-pulse > div[data-pulse-kind="conflict"] b,
.deduction-pulse > div[data-pulse-kind="action"] b { display: block; color: #f0dcae; font-weight: 600; }
.deduction-pulse > div[data-pulse-kind="conflict"] [data-pulse-conflict-detail],
.deduction-pulse > div[data-pulse-kind="action"] [data-pulse-action-detail] { display: block; margin-top: 2px; color: #aaa491; font-size: max(var(--read-dense), 8px); line-height: 1.45; }

/* Keep one actionable evidence chain in the main sightline; every other chain remains one click away. */
.chain-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
.chain-grid > .chain--focus { grid-column: 1 / -1; border-color: rgba(221,194,126,.72); box-shadow: inset 4px 0 var(--case-verdict), 0 10px 24px rgba(0,0,0,.18); }
.chain__focus-label { display: inline-flex; margin-left: 7px; padding: 2px 5px; border: 1px solid rgba(221,194,126,.5); color: var(--case-verdict); font-size: 7px; font-style: normal; vertical-align: middle; }
.chain-secondary-list { grid-column: 1 / -1; margin: 0 0 10px; border: 1px solid rgba(201,181,136,.18); background: rgba(7,10,8,.42); }
.chain-secondary-list > summary { min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 7px 10px; cursor: pointer; list-style: none; }
.chain-secondary-list > summary::-webkit-details-marker { display: none; }
.chain-secondary-list > summary > span { min-width: 0; display: grid; grid-template-columns: 15px auto minmax(0,1fr); align-items: center; gap: 5px; }
.chain-secondary-list > summary svg { width: 14px; height: 14px; color: #9db6a8; }
.chain-secondary-list > summary b { color: #c9c0aa; font-size: 9px; }
.chain-secondary-list > summary small { min-width: 0; overflow: hidden; color: #8e8879; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.chain-secondary-list > summary > em { margin-left: auto; color: #91b7a8; font-size: 7px; font-style: normal; white-space: nowrap; }
.chain-secondary-list > summary > svg:last-child { width: 13px; height: 13px; color: #8f846c; transition: transform .18s ease; }
.chain-secondary-list[open] > summary { border-bottom: 1px solid rgba(201,181,136,.14); background: rgba(82,121,107,.05); }
.chain-secondary-list[open] > summary > svg:last-child { transform: rotate(180deg); }
.chain-secondary-list__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px; }
.chain-secondary-list__grid .chain { min-height: 250px; }
.chain-secondary-list__grid .chain.solved { opacity: .86; }
.chain-secondary-list__grid .chain h3 { font-size: 13px; }

/* The default task view reads like a live lead, not a completion checklist. */
.task-list__focus { border-left-color: var(--case-risk); background: linear-gradient(90deg, rgba(119,53,44,.16), rgba(168,129,67,.045)); }
.task-list__focus b { color: #f0dcae; font-size: 11px; }
.task-list__focus small { color: #b8ad99; line-height: 1.6; }
.task-list__focus svg { color: var(--case-risk); }
.task-list__secondary { grid-column: 1 / -1; border: 1px solid rgba(201,181,136,.18); background: rgba(7,10,8,.42); }
.task-list__secondary > summary { min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 7px 10px; cursor: pointer; list-style: none; }
.task-list__secondary > summary::-webkit-details-marker { display: none; }
.task-list__secondary > summary > span { min-width: 0; display: grid; grid-template-columns: 15px auto minmax(0,1fr); align-items: center; gap: 5px; }
.task-list__secondary > summary svg { width: 14px; height: 14px; color: #9db6a8; }
.task-list__secondary > summary b { color: #c8c0aa; font-size: 9px; }
.task-list__secondary > summary small { min-width: 0; overflow: hidden; color: #8e8879; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.task-list__secondary > summary > em { margin-left: auto; color: #91b7a8; font-size: 8px; font-style: normal; }
.task-list__secondary > summary > svg:last-child { width: 13px; height: 13px; color: #8f846c; transition: transform .18s ease; }
.task-list__secondary[open] > summary { border-bottom: 1px solid rgba(201,181,136,.14); background: rgba(82,121,107,.05); }
.task-list__secondary[open] > summary > svg:last-child { transform: rotate(180deg); }
.task-list__secondary-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; padding: 8px; }
.task-list__secondary-grid .task-item { min-height: 92px; opacity: .9; }
.task-list__secondary-grid .task-item__index { color: #8e846f; }
.task-list__secondary-grid .task-item h3 { font-size: 13px; }
.task-list__secondary-grid .task-item p { font-size: 9px; line-height: 1.5; }

@media (max-width: 760px) {
  .task-list__secondary-grid { grid-template-columns: 1fr; }
  .task-list__secondary > summary { padding: 6px 8px; }
}

@media (max-width: 1050px) {
  .chain-secondary-list__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .chain-secondary-list__grid { grid-template-columns: 1fr; }
  .chain-secondary-list__grid .chain { min-height: 0; }
  .deduction-pulse > div[data-pulse-kind="conflict"] [data-pulse-conflict-detail],
  .deduction-pulse > div[data-pulse-kind="action"] [data-pulse-action-detail] { font-size: max(var(--read-dense), 8px); }
}

/* A small lift keeps the courtroom readable at default contrast on phones. */
body:not([data-reading-contrast="high"]) .court-cinematic__background { filter: brightness(1.02) saturate(.93) contrast(1.03); }
body:not([data-reading-contrast="high"]) .court-cinematic[data-camera="evidence"] .court-cinematic__background,
body:not([data-reading-contrast="high"]) .court-cinematic[data-camera="close"] .court-cinematic__background,
body:not([data-reading-contrast="high"]) .court-cinematic[data-camera="review"] .court-cinematic__background { filter: brightness(.98) saturate(.91) contrast(1.04); }
.court-cinematic__caption > p { font-size: max(var(--read-secondary), 11px); line-height: 1.55; }
.court-evidence span { font-size: max(var(--read-dense), 8px); line-height: 1.45; }

body:not([data-reading-contrast="high"]) .court-cinematic__background { filter: brightness(1.02) saturate(.93) contrast(1.03); }
body:not([data-reading-contrast="high"]) .court-cinematic[data-camera="evidence"] .court-cinematic__background,
body:not([data-reading-contrast="high"]) .court-cinematic[data-camera="close"] .court-cinematic__background,
body:not([data-reading-contrast="high"]) .court-cinematic[data-camera="review"] .court-cinematic__background { filter: brightness(.98) saturate(.91) contrast(1.04); }
.court-cinematic__shade { background: linear-gradient(90deg, rgba(2,3,3,.4), rgba(2,3,3,.015) 52%, rgba(2,3,3,.27)), linear-gradient(180deg, rgba(2,3,3,.035), transparent 46%, rgba(2,3,3,.36)); }
body:not([data-reading-contrast="high"]) .court-cinematic__figure img { filter: drop-shadow(0 20px 30px rgba(0,0,0,.56)) brightness(1.18) saturate(1) contrast(1.02); }
body:not([data-reading-contrast="high"]) .court-reactions img { filter: drop-shadow(0 11px 15px rgba(0,0,0,.54)) brightness(1.14) saturate(.98) contrast(1.02); }
.court-cinematic__caption { background: rgba(6,9,7,.82); }
.court-evidence { background: rgba(8,12,10,.96); }
.court-evidence > img { filter: brightness(1.14) contrast(1.03); }

@media (max-width: 760px) {
  .court-gate-status { grid-template-columns: 1fr; }
  .court-gate-status__next { grid-template-columns: 1fr; gap: 2px; }
  .court-gate-status__grid { grid-template-columns: 1fr; }
  .court-gate-status__details > summary > span { grid-template-columns: 14px auto minmax(0, 1fr); }
}

@media (orientation: landscape) and (max-height: 540px) {
  .court-gate-status__next { grid-template-columns: auto minmax(0, auto) minmax(0, 1fr); padding: 5px 7px; }
  .court-gate-status__next strong { font-size: 8px; }
  .court-gate-status__next span { font-size: 7px; }
}

/* 20260807-3 focus pass: reduce simultaneous visual layers without removing any case data. */
.deduction.panel[data-deduction-board="case-file"] {
  --focus-rule: rgba(202,190,158,.18);
  --focus-paper: rgba(11,17,14,.82);
  background-color: #080d0b;
  background-image:
    linear-gradient(180deg, rgba(8,13,11,.98) 0%, rgba(8,13,11,.9) 26%, rgba(8,13,11,.94) 100%),
    url('/assets/deduction-desk-4k.webp');
  background-size: auto, 1180px auto;
  background-position: center, right 6% top 10%;
  background-repeat: no-repeat;
  background-attachment: fixed;
  isolation: isolate;
}
.deduction.panel[data-deduction-board="case-file"]::after {
  content: '';
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(141,184,162,.035), transparent 28%, transparent 72%, rgba(221,194,126,.028)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 1px, transparent 1px 4px);
  opacity: .72;
}
.deduction.panel[data-deduction-board="case-file"] .panel__header {
  margin-bottom: 10px;
  padding: 9px 13px 10px;
  border: 0;
  border-bottom: 1px solid var(--focus-rule);
  border-top: 1px solid rgba(221,194,126,.28);
  border-radius: 0;
  background: rgba(11,18,15,.7);
  box-shadow: none;
}
.deduction.panel[data-deduction-board="case-file"] .panel__header::after {
  right: 13px;
  left: 13px;
  background: rgba(141,184,162,.42);
}
.deduction.panel[data-deduction-board="case-file"] .panel__header h2 { font-size: clamp(21px, 2vw, 29px); }
.deduction.panel[data-deduction-board="case-file"] .panel__header p { color: #a7ad9f; font-size: 8px; }

/* The status strip is a wayfinding label, not a second dashboard. */
.deduction.panel[data-deduction-board="case-file"] .deduction__status {
  margin-bottom: 7px;
  padding: 6px 9px;
  border: 0;
  border-left: 2px solid rgba(141,184,162,.58);
  background: rgba(22,39,31,.24);
}
.deduction.panel[data-deduction-board="case-file"] .deduction__status b { font-size: 10px; }
.deduction.panel[data-deduction-board="case-file"] .deduction__status > span { padding: 3px 6px; font-size: 7px; }
.deduction.panel[data-deduction-board="case-file"] .deduction__status-details > summary { min-height: 25px; }

/* The five-step rail carries order; repeated pending labels stay quiet until useful. */
.deduction.panel[data-deduction-board="case-file"] .deduction-rhythm {
  margin-bottom: 7px;
  padding: 7px 9px 6px;
  border: 1px solid var(--focus-rule);
  border-radius: 4px;
  background: rgba(15,29,23,.52);
  box-shadow: none;
}
.deduction.panel[data-deduction-board="case-file"] .deduction-rhythm__head { padding-bottom: 0; }
.deduction.panel[data-deduction-board="case-file"] .deduction-rhythm__head b { font-size: 10px; }
.deduction.panel[data-deduction-board="case-file"] .deduction-rhythm__steps { gap: 2px; }
.deduction.panel[data-deduction-board="case-file"] .deduction-rhythm__steps button {
  min-height: 39px;
  padding: 4px 5px;
  border: 0;
  border-top: 1px solid rgba(201,181,136,.2);
  border-radius: 2px;
  background: rgba(7,12,10,.5);
  box-shadow: none;
}
.deduction.panel[data-deduction-board="case-file"] .deduction-rhythm__steps button em { display: none; }
.deduction.panel[data-deduction-board="case-file"] .deduction-rhythm__steps button.is-current em,
.deduction.panel[data-deduction-board="case-file"] .deduction-rhythm__steps button.is-complete em,
.deduction.panel[data-deduction-board="case-file"] .deduction-rhythm__steps button.is-recommended em { display: block; }
.deduction.panel[data-deduction-board="case-file"] .deduction-rhythm__steps button.is-selected { box-shadow: inset 0 -2px rgba(215,189,121,.72); }
.deduction.panel[data-deduction-board="case-file"] .deduction-rhythm__cue {
  max-height: 28px;
  overflow: hidden;
  margin-top: 2px;
  padding: 4px 7px 2px 9px;
  font-size: 8px;
  line-height: 1.4;
}

/* One strong conflict; facts and action become quiet annotations around it. */
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse {
  grid-template-columns: minmax(110px,.62fr) minmax(280px,1.8fr) minmax(145px,.8fr);
  gap: 0;
  margin-bottom: 8px;
  border-top: 1px solid rgba(221,194,126,.3);
  border-bottom: 1px solid rgba(202,190,158,.15);
  background: rgba(8,13,11,.5);
}
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse > div {
  min-height: 54px;
  padding: 7px 9px;
  border: 0;
  border-right: 1px solid rgba(202,190,158,.13);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse > div:last-child { border-right: 0; }
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse > div[data-pulse-kind="fact"] { opacity: .62; }
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse > div[data-pulse-kind="conflict"] {
  border-left: 3px solid rgba(215,189,121,.88);
  background: rgba(63,49,25,.22);
}
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse > div[data-pulse-kind="action"] {
  border-left: 2px solid rgba(141,184,162,.58);
}
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse > div[data-pulse-kind="conflict"] b { font-size: 10px; }
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse > div[data-pulse-kind="action"] b { font-size: 8px; }
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse [data-pulse-conflict-detail],
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse [data-pulse-action-detail] { font-size: 7px; line-height: 1.35; }

/* Open page content reads as one sheet instead of a stack of cards. */
.deduction.panel[data-deduction-board="case-file"] .deduction-stage {
  margin: 5px 0;
  border-color: rgba(201,181,136,.14);
  border-radius: 3px;
  background: rgba(8,14,11,.5);
  box-shadow: none;
}
.deduction.panel[data-deduction-board="case-file"] .deduction-stage > summary,
.deduction.panel[data-deduction-board="case-file"] .deduction-stage[open] > summary {
  min-height: 49px;
  padding: 7px 9px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}
.deduction.panel[data-deduction-board="case-file"] .deduction-stage[open] > summary { background: rgba(42,67,54,.1); }
.deduction.panel[data-deduction-board="case-file"] .deduction-stage__label > span { color: #9d9a8d; font-size: 7.5px; }
.deduction.panel[data-deduction-board="case-file"] .deduction-stage__body { padding: 2px 9px 9px; }
.deduction.panel[data-deduction-board="case-file"] .deduction-stage-flow {
  margin: 4px 0 7px;
  padding: 3px 0;
  border-top: 1px solid rgba(126,163,143,.14);
  border-bottom: 1px solid rgba(126,163,143,.14);
  background: transparent;
}
.deduction.panel[data-deduction-board="case-file"] .deduction-stage-flow li {
  min-height: 29px;
  padding: 3px 5px;
  border: 0;
  border-left: 1px solid rgba(201,181,136,.18);
  background: transparent;
}
.deduction.panel[data-deduction-board="case-file"] .deduction-stage-flow li[data-flow-state="current"] { box-shadow: inset 0 -2px rgba(215,189,121,.62); }
.deduction.panel[data-deduction-board="case-file"] .deduction-stage-flow li > em { display: none; }
.deduction.panel[data-deduction-board="case-file"] .deduction-stage-flow li[data-flow-state="current"] > em,
.deduction.panel[data-deduction-board="case-file"] .deduction-stage-flow li[data-flow-state="complete"] > em { display: block; }

/* The desk image is an environmental cue, while a soft veil keeps labels inspectable. */
.deduction.panel[data-deduction-board="case-file"] .deduction-workbench {
  border-color: rgba(215,189,121,.36);
  box-shadow: inset 0 0 0 999px rgba(2,4,4,.08), inset 0 0 38px rgba(0,0,0,.3), 0 8px 18px rgba(0,0,0,.16);
}
.deduction.panel[data-deduction-board="case-file"] .deduction-workbench::before {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7,11,9,.08), transparent 44%, rgba(7,11,9,.28));
}
.deduction.panel[data-deduction-board="case-file"] .deduction-workbench > button { z-index: 2; }
.deduction.panel[data-deduction-board="case-file"] .deduction-workbench__copy { z-index: 3; }

@media (max-width: 760px) {
  .deduction.panel[data-deduction-board="case-file"] { background-size: auto, 820px auto; background-position: center, 72% 8%; }
  .deduction.panel[data-deduction-board="case-file"] .deduction-pulse { grid-template-columns: 1fr; }
  .deduction.panel[data-deduction-board="case-file"] .deduction-pulse > div { min-height: 0; border-right: 0; border-bottom: 1px solid rgba(202,190,158,.12); }
  .deduction.panel[data-deduction-board="case-file"] .deduction-pulse > div:last-child { border-bottom: 0; }
  .deduction.panel[data-deduction-board="case-file"] .deduction-pulse > div[data-pulse-kind="conflict"] { order: -1; }
  .deduction.panel[data-deduction-board="case-file"] .deduction-stage-flow li > em { display: none; }
  .deduction.panel[data-deduction-board="case-file"] .deduction-stage-flow li[data-flow-state="current"] > em { display: block; }
}

/* Completed responsibility proof is still present, but it no longer competes with the live gap. */
.deduction.panel[data-deduction-board="case-file"] .route-split-map__archive {
  margin-top: 5px;
  border-top: 1px solid rgba(126,163,143,.16);
  background: rgba(7,12,10,.25);
}
.deduction.panel[data-deduction-board="case-file"] .route-split-map__archive > summary,
.deduction.panel[data-deduction-board="case-file"] .witness-support__details > summary {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  color: #9eb5a6;
  cursor: pointer;
  list-style: none;
}
.deduction.panel[data-deduction-board="case-file"] .route-split-map__archive > summary::-webkit-details-marker,
.deduction.panel[data-deduction-board="case-file"] .witness-support__details > summary::-webkit-details-marker { display: none; }
.deduction.panel[data-deduction-board="case-file"] .route-split-map__archive > summary > span,
.deduction.panel[data-deduction-board="case-file"] .witness-support__details > summary > span {
  min-width: 0;
  display: grid;
  grid-template-columns: 14px auto minmax(0,1fr);
  align-items: center;
  gap: 4px;
}
.deduction.panel[data-deduction-board="case-file"] .route-split-map__archive > summary svg,
.deduction.panel[data-deduction-board="case-file"] .witness-support__details > summary svg { width: 13px; height: 13px; color: var(--case-evidence); }
.deduction.panel[data-deduction-board="case-file"] .route-split-map__archive > summary b,
.deduction.panel[data-deduction-board="case-file"] .witness-support__details > summary b { color: #c4c2ad; font-size: 8px; font-weight: 500; }
.deduction.panel[data-deduction-board="case-file"] .route-split-map__archive > summary small,
.deduction.panel[data-deduction-board="case-file"] .witness-support__details > summary small { min-width: 0; overflow: hidden; color: #838e82; font-size: 6.5px; text-overflow: ellipsis; white-space: nowrap; }
.deduction.panel[data-deduction-board="case-file"] .route-split-map__archive > summary > em,
.deduction.panel[data-deduction-board="case-file"] .witness-support__details > summary > em { margin-left: auto; color: #91b7a8; font-size: 7px; font-style: normal; white-space: nowrap; }
.deduction.panel[data-deduction-board="case-file"] .route-split-map__archive > summary > svg:last-child,
.deduction.panel[data-deduction-board="case-file"] .witness-support__details > summary > svg:last-child { color: #8f846c; transition: transform .18s ease; }
.deduction.panel[data-deduction-board="case-file"] .route-split-map__archive[open] > summary,
.deduction.panel[data-deduction-board="case-file"] .witness-support__details[open] > summary { border-bottom: 1px solid rgba(201,181,136,.12); background: rgba(82,121,107,.045); }
.deduction.panel[data-deduction-board="case-file"] .route-split-map__archive[open] > summary > svg:last-child,
.deduction.panel[data-deduction-board="case-file"] .witness-support__details[open] > summary > svg:last-child { transform: rotate(180deg); }
.deduction.panel[data-deduction-board="case-file"] .route-split-map__archive-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; padding: 6px; }
.deduction.panel[data-deduction-board="case-file"] .route-split-map__archive-grid .route-split-item { opacity: .82; }
.deduction.panel[data-deduction-board="case-file"] .witness-support__details { min-width: 0; border-top: 1px solid rgba(126,163,143,.15); background: rgba(7,12,10,.24); }
.deduction.panel[data-deduction-board="case-file"] .witness-support__details .witness-support__list { padding: 6px; }
.deduction.panel[data-deduction-board="case-file"] .witness-support__copy p { max-width: 34em; }

@media (max-width: 760px) {
  .deduction.panel[data-deduction-board="case-file"] .route-split-map__archive-grid { grid-template-columns: 1fr; }
  .deduction.panel[data-deduction-board="case-file"] .route-split-map__archive > summary small,
  .deduction.panel[data-deduction-board="case-file"] .witness-support__details > summary small { display: none; }
}

/* A restrained paper-slide transition gives each reasoning beat a sense of place. */
@keyframes deduction-sheet-arrive {
  from { opacity: .72; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .deduction.panel[data-deduction-board="case-file"] .deduction-stage.is-current .deduction-stage__body,
  .deduction.panel[data-deduction-board="case-file"] .deduction-pulse { animation: deduction-sheet-arrive .28s ease-out both; }
}
.deduction.panel[data-deduction-board="case-file"] .deduction-stage.is-current > summary {
  background-image: linear-gradient(90deg, rgba(91,67,31,.17), transparent 55%);
}
.deduction.panel[data-deduction-board="case-file"] .deduction-stage[data-stage-state="complete"] > summary {
  background-image: linear-gradient(90deg, rgba(33,59,46,.12), transparent 58%);
}

/* Stage and case-variant accents make the current reasoning beat legible at a glance. */
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse { position: relative; overflow: hidden; }
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 34%;
  height: 2px;
  background: rgba(141,184,162,.72);
  transition: width .28s ease, background-color .28s ease;
}
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="compare"]::before { width: 52%; background: rgba(215,189,121,.78); }
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="testimony"]::before { width: 68%; background: rgba(176,76,62,.68); }
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="culpability"]::before { width: 83%; background: rgba(184,148,83,.82); }
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="verdict"]::before { width: 100%; background: rgba(215,189,121,.94); }
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse > div { position: relative; z-index: 1; }
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-variant="jia"] { --variant-wash: rgba(141,184,162,.035); }
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-variant="yi"] { --variant-wash: rgba(215,189,121,.035); }
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-variant="bing"] { --variant-wash: rgba(176,76,62,.03); }
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-variant] { background: var(--variant-wash); }

.deduction.panel[data-deduction-board="case-file"] .deduction-stage.is-current > summary { position: relative; overflow: hidden; }
.deduction.panel[data-deduction-board="case-file"] .deduction-stage.is-current > summary::after {
  content: '';
  position: absolute;
  right: 9px;
  bottom: 0;
  left: 9px;
  height: 1px;
  background: linear-gradient(90deg, rgba(215,189,121,.78), rgba(141,184,162,.28), transparent 82%);
  transform-origin: left;
}
.deduction.panel[data-deduction-board="case-file"] .deduction-stage__index { transition: color .2s ease, background-color .2s ease, box-shadow .2s ease; }
.deduction.panel[data-deduction-board="case-file"] .deduction-stage:not(.is-current) > summary:hover .deduction-stage__index { box-shadow: 0 0 0 2px rgba(141,184,162,.08); }

/* Keep the environmental desk visible as a quiet material cue, with an ink-like hover response. */
.deduction.panel[data-deduction-board="case-file"] .deduction-workbench > button::after {
  content: '';
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(215,189,121,0);
  border-radius: inherit;
  pointer-events: none;
  transition: border-color .18s ease, transform .18s ease;
}
.deduction.panel[data-deduction-board="case-file"] .deduction-workbench > button:hover::after,
.deduction.panel[data-deduction-board="case-file"] .deduction-workbench > button[aria-pressed="true"]::after { border-color: rgba(215,189,121,.22); transform: scale(1.04); }

@media (prefers-reduced-motion: reduce) {
  .deduction.panel[data-deduction-board="case-file"] .deduction-pulse::before,
  .deduction.panel[data-deduction-board="case-file"] .deduction-stage__index,
  .deduction.panel[data-deduction-board="case-file"] .deduction-workbench > button::after { transition: none; }
}

/* Later folds already carry the fact count in the status rail. Let the live
   contradiction and next action own the first read, while keeping the fact
   value in the DOM for screen readers and full review. */
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="compare"],
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="testimony"],
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="culpability"],
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="verdict"] {
  grid-template-columns: minmax(0, 1.8fr) minmax(150px, .8fr);
}
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="compare"] > div[data-pulse-kind="fact"],
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="testimony"] > div[data-pulse-kind="fact"],
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="culpability"] > div[data-pulse-kind="fact"],
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="verdict"] > div[data-pulse-kind="fact"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="compare"] > header,
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="testimony"] > header,
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="culpability"] > header,
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="verdict"] > header {
  grid-column: 1 / -1;
  grid-row: auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border-right: 0;
  border-bottom: 1px solid var(--case-line);
}
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="compare"] > div,
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="testimony"] > div,
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="culpability"] > div,
.deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="verdict"] > div {
  min-height: 46px;
  padding: 6px 9px;
}
.deduction.panel[data-deduction-board="case-file"] .deduction-stage-flow li[data-flow-state="complete"] {
  opacity: .42;
}
.deduction.panel[data-deduction-board="case-file"] .deduction-stage-flow li[data-flow-state="pending"] {
  opacity: .68;
}
.deduction.panel[data-deduction-board="case-file"][data-view-mode="all"] .deduction-stage:not(.is-current) .deduction-stage__label > span {
  display: none;
}
.deduction.panel[data-deduction-board="case-file"][data-view-mode="all"] .deduction-stage:not(.is-current) > summary {
  min-height: 40px;
  opacity: .72;
}
.deduction.panel[data-deduction-board="case-file"] .route-split-item[data-route-item-state="current"] {
  border-color: rgba(215, 189, 121, .58);
  box-shadow: inset 2px 0 rgba(215, 189, 121, .55);
}
.deduction.panel[data-deduction-board="case-file"] .route-split-item[data-route-item-state="pending"] {
  opacity: .72;
}
.deduction.panel[data-deduction-board="case-file"] .route-split-item li[data-route-step-state="complete"] {
  opacity: .42;
}

@media (max-width: 760px) {
  .deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="compare"],
  .deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="testimony"],
  .deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="culpability"],
  .deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="verdict"] {
    grid-template-columns: 1fr;
  }
  .deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="compare"] > header,
  .deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="testimony"] > header,
  .deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="culpability"] > header,
  .deduction.panel[data-deduction-board="case-file"] .deduction-pulse[data-stage="verdict"] > header {
    grid-row: auto;
    grid-column: 1 / -1;
  }
}

/* 20260807-4 trail rebuild: a living investigation table, not a case-file dashboard. */
.deduction--trail.panel[data-deduction-board="case-file"] {
  --trail-ink: #d8cfb9;
  --trail-muted: #9da493;
  --trail-rule: rgba(201, 181, 136, .2);
  background-color: #07100c;
  background-image:
    linear-gradient(180deg, rgba(5, 13, 10, .84), rgba(5, 13, 10, .94)),
    url('/assets/deduction-desk-4k.webp');
  background-size: auto, 1320px auto;
  background-position: center, 92% 12%;
  background-attachment: fixed;
}
.deduction--trail.panel[data-deduction-board="case-file"] .panel__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 8px 4px 11px;
  border-top: 1px solid rgba(221, 194, 126, .42);
  border-bottom: 1px solid var(--trail-rule);
  background: linear-gradient(90deg, rgba(8, 18, 13, .74), transparent 78%);
}
.deduction--trail.panel[data-deduction-board="case-file"] .panel__header span { color: #a9bea9; font-size: 8px; letter-spacing: .18em; }
.deduction--trail.panel[data-deduction-board="case-file"] .panel__header h2 { color: #ead8ae; font-size: clamp(22px, 2.2vw, 31px); letter-spacing: .04em; }
.deduction--trail.panel[data-deduction-board="case-file"] .panel__header p { max-width: 34em; color: #aeb4a4; font-size: 9px; line-height: 1.5; }
.deduction--trail.panel[data-deduction-board="case-file"] .deduction__status {
  margin: 6px 0 7px;
  padding: 4px 0 5px 9px;
  border: 0;
  border-left: 2px solid rgba(141, 184, 162, .7);
  background: transparent;
}
.deduction--trail.panel[data-deduction-board="case-file"] .deduction__status > div { min-width: 0; }
.deduction--trail.panel[data-deduction-board="case-file"] .deduction__status b { color: var(--trail-ink); font-size: 10px; }
.deduction--trail.panel[data-deduction-board="case-file"] .deduction__status > span { align-self: end; border: 0; padding: 0 3px; color: #b8aa80; background: transparent; font-size: 8px; }
.deduction--trail .deduction-rhythm {
  margin: 0 0 7px;
  padding: 6px 0 5px;
  border: 0;
  border-top: 1px solid var(--trail-rule);
  border-bottom: 1px solid var(--trail-rule);
  border-radius: 0;
  background: rgba(7, 15, 11, .36);
  box-shadow: none;
}
.deduction--trail .deduction-rhythm__head { padding: 0 3px 4px; }
.deduction--trail .deduction-rhythm__head > span > svg { color: #9fc1ae; }
.deduction--trail .deduction-rhythm__head small { color: var(--trail-muted); font-size: 7px; }
.deduction--trail .deduction-rhythm__head b { color: #e5d5ad; font-size: 11px; }
.deduction--trail .deduction-rhythm__steps { gap: 0; padding: 0 2px; }
.deduction--trail .deduction-rhythm__steps::before { top: 20px; right: 4%; left: 4%; height: 1px; background: rgba(201, 181, 136, .28); }
.deduction--trail .deduction-rhythm__steps button {
  min-height: 43px;
  padding: 4px 7px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.deduction--trail .deduction-rhythm__steps button:hover,
.deduction--trail .deduction-rhythm__steps button:focus-visible { transform: none; background: rgba(141, 184, 162, .06); }
.deduction--trail .deduction-rhythm__steps button.is-selected { box-shadow: inset 0 -2px rgba(221, 194, 126, .86); background: rgba(91, 67, 31, .13); }
.deduction--trail .deduction-rhythm__steps button > span { width: 19px; height: 19px; border-radius: 50%; color: #b7aa86; border-color: rgba(201, 181, 136, .48); background: #0a1710; font-size: 8px; }
.deduction--trail .deduction-rhythm__steps button.is-selected > span { color: #1a241c; background: #dfc787; border-color: #dfc787; }
.deduction--trail .deduction-rhythm__steps button b { color: #c9c1aa; font-size: 9px; }
.deduction--trail .deduction-rhythm__steps button em { color: #88968a; font-size: 7px; }
.deduction--trail .deduction-rhythm__cue { margin: 3px 3px 0; padding: 4px 7px; border-left: 2px solid rgba(221, 194, 126, .65); color: #b9b7a7; background: rgba(91, 67, 31, .1); font-size: 8px; line-height: 1.45; }
.deduction--trail .deduction-pulse {
  position: relative;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, .85fr);
  gap: 0;
  margin: 0 0 8px;
  border-top: 1px solid rgba(221, 194, 126, .34);
  border-bottom: 1px solid var(--trail-rule);
  background: rgba(5, 12, 8, .5);
}
.deduction--trail .deduction-pulse > header { grid-column: 1 / -1; display: flex; justify-content: space-between; padding: 5px 8px; border-bottom: 1px solid var(--trail-rule); }
.deduction--trail .deduction-pulse > header span { color: #a9b9a5; font-size: 8px; }
.deduction--trail .deduction-pulse > header b { color: #d7c796; font-size: 8px; font-weight: 500; }
.deduction--trail .deduction-pulse > div { min-height: 48px; padding: 7px 9px; border: 0; border-right: 1px solid var(--trail-rule); border-radius: 0; background: transparent; box-shadow: none; }
.deduction--trail .deduction-pulse > div[data-pulse-kind="fact"] { display: none; }
.deduction--trail .deduction-pulse > div[data-pulse-kind="conflict"] { border-left: 3px solid rgba(221, 194, 126, .88); background: rgba(91, 67, 31, .2); }
.deduction--trail .deduction-pulse > div[data-pulse-kind="action"] { border-right: 0; border-left: 2px solid rgba(141, 184, 162, .72); }
.deduction--trail .deduction-pulse > div small { color: #bda871; font-size: 7px; letter-spacing: .08em; }
.deduction--trail .deduction-pulse > div[data-pulse-kind="action"] small { color: #9ec1ad; }
.deduction--trail .deduction-pulse > div b { display: block; color: #f0dfb3; font-size: 11px; line-height: 1.4; }
.deduction--trail .deduction-pulse > div[data-pulse-kind="action"] b { color: #c4dccb; font-size: 10px; }
.deduction--trail .deduction-pulse > div span { display: block; margin-top: 2px; color: #aaa998; font-size: 8px; line-height: 1.45; }

.deduction-scene-ribbon {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, .72fr);
  height: 96px;
  min-height: 96px;
  margin: 0 0 9px;
  overflow: hidden;
  border-top: 1px solid rgba(141, 184, 162, .24);
  border-bottom: 1px solid rgba(221, 194, 126, .28);
  background: #09140e;
}
.deduction-scene-ribbon::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(5, 12, 8, .08), rgba(5, 12, 8, .82) 62%, rgba(5, 12, 8, .94)); }
.deduction-scene-ribbon img { width: 100%; height: 96px; min-height: 0; object-fit: cover; object-position: center 48%; opacity: .64; filter: saturate(.76) contrast(1.05) brightness(.84); }
.deduction-scene-ribbon figcaption { position: relative; z-index: 1; display: grid; align-content: center; gap: 3px; margin-left: -18%; padding: 10px 16px 10px 0; }
.deduction-scene-ribbon figcaption small { color: #b6c5b1; font-size: 7px; letter-spacing: .13em; }
.deduction-scene-ribbon figcaption b { color: #eddbad; font-size: 15px; font-weight: 600; }
.deduction-scene-ribbon figcaption span { color: #b4b5a7; font-size: 8px; line-height: 1.45; }
.deduction-scene-ribbon[data-has-evidence="true"] figcaption b { color: #f0c77f; }

.deduction--trail .deduction-stage { margin: 5px 0; border: 0; border-left: 1px solid rgba(201, 181, 136, .22); border-radius: 0; background: rgba(7, 14, 10, .34); box-shadow: none; }
.deduction--trail .deduction-stage.is-current { border-left: 3px solid rgba(221, 194, 126, .88); background: rgba(43, 54, 40, .2); box-shadow: none; }
.deduction--trail .deduction-stage > summary,
.deduction--trail .deduction-stage[open] > summary { min-height: 47px; padding: 7px 9px; border-radius: 0; background: transparent; }
.deduction--trail .deduction-stage[open] > summary { border-bottom: 1px solid rgba(201, 181, 136, .12); }
.deduction--trail .deduction-stage__label b { color: #dfd2b0; font-size: 13px; }
.deduction--trail .deduction-stage__label > span { color: #a7aa9c; font-size: 8px; }
.deduction--trail .deduction-stage__body { padding: 3px 9px 10px; }
.deduction--trail .deduction-stage-flow { margin: 4px 0 8px; border: 0; border-bottom: 1px solid rgba(141, 184, 162, .16); background: transparent; }
.deduction--trail .deduction-stage-flow li { border: 0; border-left: 1px solid rgba(201, 181, 136, .15); background: transparent; }
.deduction--trail .deduction-stage-flow li[data-flow-state="current"] { box-shadow: inset 0 -2px rgba(221, 194, 126, .7); }
.deduction--trail .deduction-stage-flow li[data-flow-state="complete"] { opacity: .38; }
.deduction--trail .deduction-stage-flow li[data-flow-state="pending"] { opacity: .58; }
.deduction--trail .route-split-item { border: 0; border-bottom: 1px solid rgba(201, 181, 136, .14); border-radius: 0; background: transparent; box-shadow: none; }
.deduction--trail .route-split-item[data-route-item-state="current"] { border-left: 3px solid rgba(221, 194, 126, .8); background: rgba(91, 67, 31, .12); }
.deduction--trail .route-split-item[data-route-item-state="pending"] { opacity: .52; }
.deduction--trail .route-split-map__header { border-bottom-color: rgba(201, 181, 136, .17); background: transparent; }
.deduction--trail .route-split-map__cue { color: #aeb3a4; font-size: 8px; }
.deduction--trail .court-gate-status__next { grid-template-columns: auto minmax(0, auto) minmax(0, 1fr) auto; align-items: center; padding: 8px 9px; background: rgba(91, 67, 31, .14); }
.deduction--trail .court-gate-status__next .court-gate-status__go { justify-self: end; min-height: 26px; padding: 4px 7px; border-color: rgba(221, 194, 126, .42); color: #e4ca91; }
.deduction--trail .court-gate-status__details { border: 0; border-top: 1px solid rgba(201, 181, 136, .14); background: transparent; }

.puzzle-operation-brief { display: grid; grid-template-columns: 54px 16px minmax(0, 1fr); align-items: center; gap: 8px; margin: 6px 0 8px; padding: 6px 8px; border-left: 2px solid rgba(141, 184, 162, .68); background: linear-gradient(90deg, rgba(82, 121, 107, .16), rgba(82, 121, 107, .05)); color: #b7c5b4; }
.puzzle-operation-brief > svg { width: 16px; color: #a6c7b3; }
.puzzle-evidence-anchor { position: relative; contain: layout paint; display: grid; grid-template-columns: 54px; grid-template-rows: 42px; width: 54px; height: 42px; margin: 0; overflow: hidden; border: 1px solid rgba(221, 194, 126, .34); background: #0b1710; }
.puzzle-evidence-anchor::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(4, 10, 7, .02), rgba(4, 10, 7, .7)); }
.puzzle-evidence-anchor img { width: 54px; height: 42px; object-fit: cover; object-position: center; opacity: .94; filter: saturate(.86) contrast(1.04) brightness(1.02); }
.puzzle-evidence-anchor figcaption { position: absolute; z-index: 1; inset: auto 4px 3px; display: grid; gap: 1px; width: calc(100% - 8px); min-width: 0; max-width: calc(100% - 8px); overflow: hidden; }
.puzzle-evidence-anchor figcaption small { color: #e0c887; font-size: 7px; line-height: 1; letter-spacing: .06em; }
.puzzle-evidence-anchor figcaption b { overflow: hidden; color: #f1e4c2; font-size: 8px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.puzzle-evidence-anchor figcaption span { overflow: hidden; color: #b8c4b5; font-size: 6.5px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.puzzle-evidence-anchor--scene { border-color: rgba(141, 184, 162, .34); }
.puzzle-evidence-anchor--scene figcaption small { color: #9ec1ad; }
.puzzle-operation-brief span { min-width: 0; display: grid; gap: 2px; }
.puzzle-operation-brief small { color: #91ad9b; font-size: 7px; letter-spacing: .08em; }
.puzzle-operation-brief b { color: #e1d09f; font-size: 10px; }
.puzzle-operation-brief em { color: #aeb4a7; font-size: 8px; line-height: 1.4; font-style: normal; }
.continuation-summary__route span { white-space: normal; }

.accusation-draft-button { border-color: rgba(221, 194, 126, .42); color: #e0c998; }
.accusation-draft-button.is-saved { border-color: rgba(141, 184, 162, .56); color: #b9d0bf; background: rgba(82, 121, 107, .12); }
.accusation-draft-button svg { width: 14px; height: 14px; }
.accusation-draft-status { display: flex; align-items: flex-start; gap: 7px; margin: 7px 0; padding: 6px 8px; border-left: 2px solid rgba(221, 194, 126, .68); background: rgba(91, 67, 31, .1); }
.accusation-draft-status > svg { flex: 0 0 auto; width: 14px; color: #e0c998; }
.accusation-draft-status span { display: grid; gap: 2px; }
.accusation-draft-status b { color: #e4cf99; font-size: 9px; }
.accusation-draft-status small { color: #a9aa9b; font-size: 8px; line-height: 1.4; }

@media (max-width: 760px) {
  .deduction--trail.panel[data-deduction-board="case-file"] { background-size: auto, 860px auto; background-position: center, 76% 8%; }
  .deduction--trail .deduction-scene-ribbon { grid-template-columns: 1fr; height: 88px; min-height: 88px; }
  .deduction--trail .deduction-scene-ribbon img { height: 88px; min-height: 0; opacity: .52; }
  .deduction--trail .deduction-scene-ribbon::after { background: linear-gradient(90deg, rgba(5, 12, 8, .2), rgba(5, 12, 8, .86) 70%); }
  .deduction--trail .deduction-scene-ribbon figcaption { grid-row: 1; margin-left: 0; padding: 9px 12px; }
  .deduction--trail .deduction-scene-ribbon figcaption b { font-size: 13px; }
  .deduction--trail .deduction-pulse { grid-template-columns: 1fr; }
  .deduction--trail .deduction-pulse > div { border-right: 0; border-bottom: 1px solid var(--trail-rule); }
  .deduction--trail .deduction-pulse > div:last-child { border-bottom: 0; }
  .deduction--trail .court-gate-status__next { grid-template-columns: 1fr auto; gap: 3px 7px; }
  .deduction--trail .court-gate-status__next small,
  .deduction--trail .court-gate-status__next strong,
  .deduction--trail .court-gate-status__next span { grid-column: 1; }
  .deduction--trail .court-gate-status__next .court-gate-status__go { grid-column: 2; grid-row: 1 / span 3; }
  .puzzle-operation-brief { grid-template-columns: 48px 15px minmax(0, 1fr); gap: 6px; align-items: flex-start; }
  .puzzle-evidence-anchor { width: 48px; height: 38px; grid-template-columns: 48px; grid-template-rows: 38px; }
  .puzzle-evidence-anchor img { width: 48px; height: 38px; }
  .puzzle-operation-brief em { font-size: max(var(--read-dense), 8px); }
}

/* Final contract overrides stay after the responsive legacy rules so every
   viewport uses the same readable gesture vocabulary. */
.puzzle-operation-rail li {
  grid-template-columns: 27px minmax(0, 1fr);
  min-height: 46px;
  padding: 7px 8px;
}
.puzzle-operation-rail li > .puzzle-operation-rail__mark { width: 25px; height: 25px; font-size: 13px; }
.puzzle-operation-rail b { font-size: 10px; }
.puzzle-operation-rail small { font-size: 8px; line-height: 1.25; }
.puzzle-operation-brief > span { display: grid; gap: 3px; }
.puzzle-operation-brief b { font-size: 11px; }
.puzzle-operation-brief em { font-size: 8.5px; line-height: 1.4; }
.puzzle-operation-brief > span > .puzzle-operation-brief__detail { display: block; font-size: 8px; line-height: 1.35; }
.puzzle-value-control { grid-template-columns: 24px minmax(0, 1fr) 24px; }
.puzzle-value-control > button { width: 24px; height: 24px; }

@media (max-width: 760px) {
  .puzzle-operation-rail li { grid-template-columns: 23px minmax(0, 1fr); min-height: 41px; padding: 6px; }
  .puzzle-operation-rail li > .puzzle-operation-rail__mark { width: 22px; height: 22px; font-size: 11px; }
  .puzzle-operation-rail b { font-size: 9px; }
  .puzzle-operation-rail small { font-size: 7.5px; }
  .puzzle-operation-brief b { font-size: 10px; }
  .puzzle-operation-brief em { font-size: 8px; }
  .puzzle-operation-brief > span > .puzzle-operation-brief__detail { font-size: 8px; }
  .puzzle-value-control { grid-template-columns: 26px minmax(0, 1fr) 26px; }
  .puzzle-value-control > button { width: 26px; height: 26px; }
}
