:root {
  color-scheme: dark;
  --ink: #191714;
  --night: #100d09;
  --walnut: #24170f;
  --paper: #d7bd85;
  --paper-light: #ead9ad;
  --gold: #f0d79b;
  --red: #a63b2b;
  --green: #6e8b72;
  --muted: rgba(240, 215, 155, 0.62);
  --mx: 0;
  --my: 0;
  --scene-scale: 1.035;
  font-family: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--night);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background: var(--night);
  color: #f6e9c8;
}

button,
select,
textarea {
  font: inherit;
}

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

button {
  color: inherit;
}

button:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid #f0d79b;
  outline-offset: 3px;
}

.grain,
.vignette {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}

.grain {
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.vignette {
  background: radial-gradient(circle at 48% 45%, transparent 35%, rgba(0, 0, 0, 0.38) 78%, rgba(0, 0, 0, 0.82) 120%);
}

.boot-curtain {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  background: #100d09;
  transition: opacity 0.8s ease, visibility 0.8s;
}

.loaded .boot-curtain {
  opacity: 0;
  visibility: hidden;
}

.boot-curtain p {
  margin: 0;
  font: 11px/1.2 "Courier New", monospace;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(240, 215, 155, 0.66);
}

.boot-seal {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 32%, #cc4b38, #76251d 62%, #3b110d);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.62), inset 0 0 0 4px rgba(74, 18, 13, 0.35), inset 0 0 0 8px rgba(255, 190, 135, 0.08);
  transform: rotate(-7deg);
  animation: seal-arrive 0.7s cubic-bezier(.2, .8, .2, 1) both;
}

.boot-seal span {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 215, 166, 0.42);
  border-radius: 50%;
  font-size: 27px;
  color: #edbd8d;
}

@keyframes seal-arrive {
  from { opacity: 0; transform: translateY(14px) rotate(-28deg) scale(1.25); }
}

.app-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid rgba(240, 215, 155, 0.12);
  background: linear-gradient(to bottom, rgba(10, 8, 6, 0.92), rgba(10, 8, 6, 0.18));
  backdrop-filter: blur(3px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(240, 215, 155, 0.55);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px rgba(240, 215, 155, 0.06);
  color: var(--gold);
  font-size: 21px;
}

.brand strong {
  display: block;
  color: #f2dfb3;
  font-size: 23px;
  font-weight: 500;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.brand small {
  display: block;
  margin-top: 6px;
  font: 9px/1 "Courier New", monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(240, 215, 155, 0.48);
}

.algorithm-note,
.archive-corpus-meta {
  display: block;
  margin-top: 10px;
  color: rgba(35, 25, 17, .48);
  font: 9px/1.4 "Courier New", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.archive-corpus-meta {
  color: rgba(240, 215, 155, .46);
}

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

.focus-control {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 8px 0 16px;
  border: 1px solid rgba(240, 215, 155, 0.16);
  border-radius: 99px;
  background: rgba(18, 13, 9, 0.62);
}

.focus-control span {
  font: 9px/1 "Courier New", monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(240, 215, 155, 0.5);
}

.focus-control select {
  padding: 7px 26px 7px 8px;
  border: 0;
  background: transparent;
  color: #ead6a8;
  font: 11px/1 "Courier New", monospace;
  cursor: pointer;
  min-height: 44px;
}

.focus-control select option {
  background: #1b140f;
}

.round-button,
.archive-button {
  min-height: 42px;
  border: 1px solid rgba(240, 215, 155, 0.18);
  background: rgba(18, 13, 9, 0.62);
  cursor: pointer;
  transition: border-color .25s, background .25s, transform .25s;
}

.round-button:hover,
.archive-button:hover {
  border-color: rgba(240, 215, 155, 0.5);
  background: rgba(71, 51, 33, 0.68);
}

.round-button {
  width: 42px;
  border-radius: 50%;
  font-size: 22px;
}

.round-button[aria-pressed="true"] span {
  display: inline-block;
  color: #98be92;
  animation: sound-pulse 1.4s infinite;
}

@keyframes sound-pulse {
  50% { transform: scale(1.25); opacity: .6; }
}

.archive-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 7px 0 17px;
  border-radius: 99px;
  font: 10px/1 "Courier New", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.archive-button b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #873124;
  color: #f0d8a8;
  font-weight: 400;
}

.investigation-switch {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid rgba(179, 44, 32, .48);
  border-radius: 99px;
  background: rgba(68, 19, 15, .58);
  color: #f1d6a0;
  font: 9px/1 "Courier New", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: .25s ease;
}

.investigation-switch span {
  font: 22px/1 Georgia, serif;
}

.investigation-switch:hover,
.investigation-switch[aria-pressed="true"] {
  border-color: #c8523f;
  background: rgba(123, 37, 27, .8);
  box-shadow: 0 0 26px rgba(148, 39, 27, .2);
}

.investigation-shell {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: none;
  overflow: auto;
  padding: 108px clamp(18px, 3vw, 48px) 30px;
  background:
    radial-gradient(circle at 18% 10%, rgba(128, 75, 38, .22), transparent 28%),
    radial-gradient(circle at 85% 75%, rgba(103, 22, 17, .18), transparent 34%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.012) 0 1px, transparent 1px 7px),
    #0b0907;
  color: #eadbb8;
}

.investigation-active .investigation-shell {
  display: block;
}

.investigation-active .office {
  display: none;
}

.investigation-active .topbar {
  z-index: 40;
  background: rgba(8, 7, 6, .94);
}

.investigation-modal-open .topbar {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.investigation-modal-open .investigation-shell {
  overflow: hidden;
}

.investigation-ambient {
  position: fixed;
  inset: 88px 0 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.7), transparent 22%, transparent 78%, rgba(0,0,0,.7)),
    radial-gradient(circle at 50% 0, rgba(246, 199, 120, .1), transparent 42%);
}

.investigation-header {
  position: relative;
  z-index: 1;
  max-width: 1500px;
  margin: 0 auto 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.detective-kicker {
  margin: 0 0 8px;
  color: #b94b3b;
  font: 9px/1.3 "Courier New", monospace;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.investigation-header h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(30px, 4vw, 58px);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.025em;
}

.investigation-header > div > p:last-child {
  margin: 12px 0 0;
  color: rgba(234, 219, 184, .52);
  font: 10px/1.5 "Courier New", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.investigation-progress {
  min-width: 130px;
  padding: 14px 18px;
  border: 1px solid rgba(234, 219, 184, .13);
  background: rgba(17, 13, 10, .65);
  text-align: right;
}

.investigation-progress span {
  display: block;
  margin-bottom: 5px;
  color: rgba(234, 219, 184, .42);
  font: 8px/1 "Courier New", monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.investigation-progress b,
.investigation-progress i {
  color: #e9d09b;
  font: 22px/1 Georgia, serif;
  font-style: normal;
}

.investigation-toolbar {
  position: relative;
  z-index: 2;
  max-width: 1500px;
  margin: 0 auto 14px;
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.investigation-toolbar label {
  min-width: min(480px, 42vw);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 12px 0 16px;
  border: 1px solid rgba(234, 219, 184, .14);
  background: rgba(20, 15, 11, .86);
}

.investigation-toolbar label span {
  color: rgba(234, 219, 184, .42);
  font: 8px/1 "Courier New", monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.investigation-toolbar select {
  width: 100%;
  min-height: 48px;
  border: 0;
  background: #17110d;
  color: #ead7ad;
  font: 12px/1.2 "Courier New", monospace;
}

.investigation-toolbar > button {
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid rgba(234, 219, 184, .14);
  background: rgba(20, 15, 11, .86);
  color: #d8c397;
  font: 10px/1.2 "Courier New", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.investigation-toolbar > button:hover,
.investigation-toolbar > button[aria-pressed="true"] {
  border-color: rgba(194, 67, 50, .68);
  background: rgba(93, 30, 23, .72);
}

#caseFolderOpen {
  border-color: rgba(205, 117, 68, .62);
  background: linear-gradient(145deg, rgba(124, 54, 30, .96), rgba(74, 29, 21, .96));
  box-shadow: inset 0 0 0 1px rgba(242, 205, 139, .08), 0 8px 20px rgba(0, 0, 0, .24);
  color: #ffe4ad;
}

#caseFolderOpen:hover,
#caseFolderOpen[aria-expanded="true"] {
  border-color: #d37a53;
  background: linear-gradient(145deg, #9b4931, #67251d);
}

.investigation-layout {
  position: relative;
  z-index: 1;
  max-width: 1500px;
  min-height: 660px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  gap: 16px;
}

.clue-board-wrap {
  position: relative;
  min-width: 0;
}

.thread-guide {
  min-height: 82px;
  margin-bottom: 10px;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(280px, 1.4fr);
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(222, 195, 139, .17);
  border-left: 3px solid #9e3b30;
  background: linear-gradient(90deg, rgba(34, 24, 17, .96), rgba(18, 14, 11, .97));
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
}

.thread-guide div {
  display: grid;
  gap: 6px;
}

.thread-guide span,
.deduction-log header span {
  color: #ad5848;
  font: 8px/1 "Courier New", monospace;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.thread-guide b {
  color: #e2cca0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

.thread-guide p {
  margin: 0;
  color: rgba(226, 204, 160, .62);
  font-size: 13px;
  line-height: 1.5;
}

.thread-hint {
  grid-column: 2;
  justify-self: end;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(215, 185, 122, .2);
  background: rgba(255, 255, 255, .025);
  color: #bba06d;
  font: 700 8px/1.2 "Courier New", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.thread-hint:hover:not(:disabled) {
  border-color: rgba(215, 185, 122, .48);
  background: rgba(158, 59, 48, .12);
}

.thread-hint:disabled {
  opacity: .48;
  cursor: default;
}

.thread-help {
  grid-column: 1 / -1;
  margin-top: -5px;
  border-top: 1px solid rgba(215, 185, 122, .12);
  padding-top: 8px;
}

.thread-help summary {
  width: fit-content;
  color: #bba06d;
  cursor: pointer;
  font: 700 9px/1.3 "Courier New", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.thread-help p {
  max-width: 820px;
  margin: 8px 0 1px;
  color: rgba(227, 214, 183, .7);
  font-size: 12px;
  line-height: 1.55;
}

.thread-guide.success {
  border-left-color: #8b9b67;
}

.thread-guide.failure {
  animation: thread-reject .32s ease;
  border-left-color: #c05242;
}

@keyframes thread-reject {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.board-instruction {
  position: absolute;
  z-index: 8;
  top: 13px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  max-width: 72%;
  padding: 8px 14px;
  background: #d5bc83;
  box-shadow: 0 4px 12px rgba(0,0,0,.32);
  color: #3a291d;
  font: 9px/1.3 "Courier New", monospace;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

.clue-board {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border: 15px solid #2a180f;
  border-image: linear-gradient(135deg, #5b3520, #24140d 48%, #6c4229) 20;
  box-shadow: inset 0 0 80px rgba(33, 18, 9, .65), 0 22px 55px rgba(0,0,0,.48);
  background:
    radial-gradient(circle at 12% 20%, rgba(71, 35, 20, .18), transparent 28%),
    radial-gradient(circle at 76% 64%, rgba(75, 30, 18, .17), transparent 34%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='70'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.5' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E"),
    #725234;
}

.clue-card {
  position: absolute;
  z-index: 3;
  width: 22%;
  min-height: 194px;
  max-height: 260px;
  overflow: hidden;
  padding: 27px 19px 20px;
  border: 0;
  background: linear-gradient(145deg, #e6d19b, #bfa470);
  box-shadow: 0 9px 20px rgba(33, 18, 9, .46);
  color: #261b13;
  text-align: left;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease;
}

.clue-card::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 13px;
  height: 13px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #da5943, #70231b 70%);
  box-shadow: 0 2px 4px rgba(0,0,0,.55);
  z-index: 5;
}

.clue-card:hover,
.clue-card:focus-visible {
  z-index: 6;
  transform: rotate(0deg) translateY(-5px) !important;
  box-shadow: 0 18px 35px rgba(28, 14, 6, .58);
}

.clue-card.opened::after {
  content: "ИЗУЧЕНО";
  position: absolute;
  right: -19px;
  bottom: 15px;
  padding: 5px 23px;
  transform: rotate(-9deg);
  border: 2px solid rgba(113, 38, 28, .62);
  color: rgba(113, 38, 28, .7);
  font: 8px/1 "Courier New", monospace;
  letter-spacing: .14em;
  z-index: 4;
}

.clue-card.connect-start {
  outline: 4px solid rgba(163, 40, 31, .85);
  outline-offset: 3px;
}

.clue-card.connection-rejected {
  animation: thread-reject .32s ease;
  box-shadow: 0 0 0 3px rgba(168, 54, 42, .62), 0 9px 20px rgba(33, 18, 9, .46);
}

.clue-card.locked-clue {
  display: grid;
  place-items: center;
  min-height: 194px;
  padding: 24px;
  border: 1px dashed rgba(224, 201, 151, .2);
  background:
    repeating-linear-gradient(-45deg, rgba(255,255,255,.018) 0 10px, transparent 10px 20px),
    rgba(25, 18, 13, .92);
  box-shadow: inset 0 0 32px rgba(0,0,0,.52), 0 9px 20px rgba(0,0,0,.28);
  color: rgba(226, 204, 160, .46);
  text-align: center;
  cursor: default;
}

.clue-card.locked-clue::before {
  width: 11px;
  height: 11px;
  background: #4b3328;
  box-shadow: none;
}

.locked-clue span {
  display: grid;
  gap: 9px;
  font: 9px/1.5 "Courier New", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.locked-clue span::before {
  content: "▧";
  color: #9e4a3b;
  font-size: 24px;
}

.clue-card.has-image {
  padding-top: 118px;
}

.clue-card.document-clue {
  border-left: 5px solid rgba(113, 48, 33, .45);
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(69, 45, 25, .055) 27px 28px),
    linear-gradient(145deg, #e6d19b, #bfa470);
}

.clue-document-mark {
  position: absolute;
  top: 21px;
  right: 15px;
  width: 38px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(104, 46, 32, .28);
  color: rgba(104, 46, 32, .42);
  font: 10px/1 "Courier New", monospace;
  letter-spacing: .08em;
  transform: rotate(4deg);
}

.document-clue .clue-card-copy {
  padding-right: 28px;
}

.clue-card-photo {
  position: absolute;
  inset: 0 0 auto;
  height: 108px;
  overflow: hidden;
  display: block;
  border-bottom: 1px solid rgba(54, 37, 22, .28);
  background-color: #4b4032;
  background-repeat: no-repeat;
  filter: sepia(.14) contrast(1.03);
}

.clue-card-photo::before {
  content: "";
  position: absolute;
  inset: 57% 0 0;
  background: linear-gradient(transparent, rgba(215, 190, 137, .96));
}

.clue-card-photo[data-illustration]::after,
.clue-dialog-image[data-illustration]::after {
  content: "Реконструкция";
  position: absolute;
  right: 7px;
  bottom: 6px;
  padding: 3px 5px;
  background: rgba(20, 16, 13, .72);
  color: rgba(246, 228, 190, .88);
  font: 6px/1 "Courier New", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.clue-card-copy {
  position: relative;
  z-index: 1;
  display: block;
}

.clue-card .clue-kind {
  display: block;
  margin-bottom: 7px;
  color: #8b3328;
  font: 9px/1.15 "Courier New", monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.clue-card b {
  display: block;
  margin-bottom: 9px;
  font-size: clamp(18px, 1.45vw, 23px);
  font-weight: 500;
  line-height: 1.04;
}

.clue-card small {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(38, 27, 19, .72);
  font: 13px/1.5 Georgia, serif;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.thread-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.thread-layer line {
  stroke: #a72f25;
  stroke-width: 3;
  filter: drop-shadow(0 2px 1px rgba(0,0,0,.45));
}

.thread-layer circle {
  fill: #74251e;
  stroke: #d3755c;
  stroke-width: 1.5;
}

.thread-layer .thread-label rect {
  fill: rgba(29, 17, 13, .92);
  stroke: rgba(195, 95, 72, .55);
  stroke-width: 1;
}

.thread-layer .thread-label text {
  fill: #ddb98c;
  font: 700 8px "Courier New", monospace;
  letter-spacing: .04em;
  text-anchor: middle;
  text-transform: uppercase;
}

.deduction-panel {
  min-width: 0;
  padding: 28px 23px;
  border: 1px solid rgba(231, 208, 157, .13);
  background: linear-gradient(155deg, rgba(31, 24, 18, .97), rgba(14, 11, 9, .98));
  box-shadow: 0 18px 40px rgba(0,0,0,.36);
}

.deduction-panel h2 {
  margin: 0 0 12px;
  color: #ead6a8;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.08;
}

.case-objective {
  margin: 0 0 16px;
  color: rgba(234, 214, 168, .55);
  font-size: 15px;
  line-height: 1.55;
}

.case-readiness {
  margin-bottom: 17px;
  padding: 11px 12px;
  border-left: 2px solid #9f3a2d;
  background: rgba(147, 53, 40, .08);
  color: #bca982;
  font: 10px/1.55 "Courier New", monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.deduction-log {
  margin: 0 0 18px;
  border: 1px solid rgba(231, 208, 157, .13);
  background: rgba(255,255,255,.018);
}

.deduction-log header {
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(231, 208, 157, .1);
}

.deduction-log header b {
  color: #d5ba82;
  font: 10px/1 "Courier New", monospace;
}

.deduction-log ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.deduction-step {
  min-height: 58px;
  padding: 11px 12px 11px 40px;
  position: relative;
  border-bottom: 1px solid rgba(231, 208, 157, .08);
  color: rgba(218, 199, 159, .76);
  font-size: 12px;
  line-height: 1.5;
}

.deduction-step > span {
  display: block;
  margin: 0 0 4px;
  color: #b69a62;
  font: 700 8px/1.2 "Courier New", monospace;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.deduction-step.locked > span {
  color: rgba(218, 199, 159, .24);
}

.deduction-step:last-child {
  border-bottom: 0;
}

.deduction-step::before {
  content: attr(data-number);
  position: absolute;
  top: 12px;
  left: 12px;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(199, 169, 111, .28);
  border-radius: 50%;
  color: #947f5b;
  font: 8px/1 "Courier New", monospace;
}

.deduction-step.locked {
  color: rgba(218, 199, 159, .28);
  font-family: "Courier New", monospace;
  letter-spacing: .05em;
}

.deduction-step.found::before {
  content: "✓";
  border-color: rgba(148, 166, 100, .55);
  color: #b7c985;
}

.hypothesis-gate {
  padding: 18px 15px;
  border: 1px dashed rgba(211, 187, 135, .2);
  color: rgba(219, 198, 156, .48);
  font: 10px/1.6 "Courier New", monospace;
  letter-spacing: .07em;
  text-align: center;
  text-transform: uppercase;
}

.deduce-button:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.hypothesis-list {
  display: grid;
  gap: 8px;
}

.hypothesis-card {
  min-height: 67px;
  padding: 12px 13px;
  border: 1px solid rgba(231, 208, 157, .13);
  background: rgba(255,255,255,.025);
  color: #d8c69e;
  text-align: left;
  cursor: pointer;
}

.hypothesis-card b {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
  font-weight: 500;
}

.hypothesis-card small {
  display: block;
  color: rgba(216, 198, 158, .47);
  font-size: 12px;
  line-height: 1.48;
}

.hypothesis-card.selected {
  border-color: rgba(181, 61, 47, .8);
  background: rgba(143, 42, 32, .14);
  box-shadow: inset 3px 0 #a84435;
}

.deduce-button {
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  border: 1px solid #a94738;
  background: linear-gradient(135deg, #8f3025, #501b16);
  color: #f2ddb1;
  font: 10px/1 "Courier New", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}

.deduction-result {
  margin-top: 14px;
  color: #d6c39c;
  font-size: 14px;
  line-height: 1.55;
}

.deduction-result.success {
  padding: 14px;
  border: 1px solid rgba(108, 145, 102, .42);
  background: rgba(75, 112, 71, .12);
}

.deduction-result.failure {
  padding: 14px;
  border: 1px solid rgba(175, 65, 48, .42);
  background: rgba(151, 48, 35, .1);
}

.replay-verdict {
  width: 100%;
  min-height: 43px;
  margin-top: 14px;
  border: 1px solid rgba(129,166,119,.42);
  background: rgba(129,166,119,.08);
  color: #d9cda9;
  font: 9px/1 "Courier New", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}

.case-folder-panel {
  position: fixed;
  z-index: 130;
  inset: 88px 0 0 auto;
  width: min(680px, 100%);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 28px 28px 44px;
  transform: translateX(104%);
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
  border-left: 1px solid rgba(236, 214, 167, .16);
  background: #17110d;
  box-shadow: -22px 0 50px rgba(0,0,0,.5);
}

.case-folder-scrim,
.interview-scrim {
  position: fixed;
  z-index: 128;
  inset: 88px 0 0;
  display: none;
  border: 0;
  background: rgba(3, 2, 2, .68);
  backdrop-filter: blur(4px);
}

.case-folder-scrim.open,
.interview-scrim.open {
  display: block;
}

.case-folder-panel.open {
  transform: translateX(0);
}

.folder-panel-head,
.clue-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.folder-panel-head {
  position: sticky;
  z-index: 4;
  top: 0;
  margin: 0 0 12px;
  padding: 0 0 17px;
  background: linear-gradient(to bottom, #17110d 78%, transparent);
}

.folder-close-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid rgba(231, 208, 157, .24);
  background: rgba(255,255,255,.035);
  color: #e7d09d;
  font: 9px/1 "Courier New", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.folder-close-button span {
  font: 23px/1 Georgia, serif;
}

.folder-close-bottom {
  width: 100%;
  min-height: 50px;
  margin-top: 24px;
  border: 1px solid rgba(231, 208, 157, .22);
  background: rgba(231, 208, 157, .06);
  color: #e4cf9e;
  font: 10px/1 "Courier New", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}

.folder-panel-head h2 {
  margin: 0;
  color: #ead6a8;
  font-size: 30px;
  font-weight: 400;
}

.folder-cover {
  min-height: 230px;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 27px;
  border-radius: 3px 14px 14px 3px;
  background: linear-gradient(145deg, #94703e, #543b23);
  box-shadow: inset 18px 0 20px rgba(35, 20, 10, .32), 0 14px 30px rgba(0,0,0,.35);
  color: #2c1d12;
}

.folder-cover span,
.folder-cover small {
  font: 10px/1.4 "Courier New", monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.folder-cover b {
  max-width: 90%;
  font-size: 38px;
  font-weight: 400;
  line-height: .98;
}

.folder-brief {
  color: #d8c398;
  font-size: 19px;
  line-height: 1.5;
}

.folder-narrative h3 {
  margin: 26px 0 10px;
  color: #b65442;
  font-size: 16px;
  font-weight: 400;
}

.folder-narrative p {
  margin: 0 0 15px;
  color: rgba(231, 213, 174, .72);
  font-size: 16px;
  line-height: 1.72;
}

.folder-source,
.clue-dialog-card > a {
  display: inline-block;
  margin-top: 20px;
  color: #d1a764;
  font: 9px/1.3 "Courier New", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.clue-dialog {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 18px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s, visibility .25s;
}

.clue-dialog.open {
  visibility: visible;
  opacity: 1;
}

.clue-dialog-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(4,3,2,.8);
  backdrop-filter: blur(5px);
}

.clue-dialog-card {
  position: relative;
  width: min(650px, 100%);
  max-height: min(820px, 92dvh);
  overflow: auto;
  padding: clamp(24px, 5vw, 48px);
  background: linear-gradient(150deg, #ead9a9, #c4a873);
  box-shadow: 0 25px 80px rgba(0,0,0,.72);
  color: #2b1e14;
}

.clue-dialog-head > span {
  color: #8c3328;
  font: 9px/1 "Courier New", monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.clue-dialog-card .close-button {
  border-color: rgba(43,30,20,.25);
  color: #2b1e14;
}

.clue-close-button {
  min-width: 104px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  background: rgba(43, 30, 20, .08);
  font: 9px/1 "Courier New", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.clue-close-button span {
  font: 25px/1 Georgia, serif;
}

.clue-close-button b {
  font-weight: 400;
}

.clue-dialog-image {
  position: relative;
  width: 100%;
  height: 330px;
  margin: 22px 0 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-color: rgba(41, 28, 18, .15);
}

.clue-dialog-card h2 {
  margin: 25px 0 13px;
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 400;
  line-height: 1;
}

.clue-dialog-content {
  display: grid;
  gap: 14px;
}

.clue-dialog-content p {
  margin: 0;
  font-size: 18px;
  line-height: 1.7;
}

.clue-dialog-content p + p {
  padding-top: 14px;
  border-top: 1px solid rgba(43, 30, 20, .18);
}

.clue-dialog-content .clue-dialog-lead {
  color: #2b1e14;
  font-weight: 600;
}

.clue-close-bottom {
  width: 100%;
  min-height: 54px;
  margin-top: 24px;
  border: 1px solid rgba(43,30,20,.26);
  background: rgba(43,30,20,.08);
  color: #3e291c;
  font: 10px/1 "Courier New", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}

.relation-dialog {
  position: fixed;
  inset: 0;
  z-index: 155;
  display: grid;
  place-items: center;
  padding: 18px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .2s, visibility .2s;
}

.relation-dialog.open {
  visibility: visible;
  opacity: 1;
}

.relation-dialog-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(4, 3, 2, .84);
  backdrop-filter: blur(5px);
}

.relation-dialog-card {
  position: relative;
  width: min(610px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(25px, 5vw, 42px);
  border: 1px solid rgba(218, 185, 121, .24);
  background:
    linear-gradient(135deg, rgba(132, 47, 34, .13), transparent 42%),
    #17110d;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .76);
  color: #e5d0a3;
}

.relation-dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(220, 194, 144, .2);
  background: rgba(255, 255, 255, .025);
  color: #d6bc87;
  font-size: 24px;
  cursor: pointer;
}

.relation-dialog-card h2 {
  max-width: 470px;
  margin: 8px 0 10px;
  font-size: clamp(25px, 5vw, 39px);
  font-weight: 400;
  line-height: 1.03;
}

.relation-pair {
  margin: 0;
  color: #bb5c49;
  font: 700 10px/1.5 "Courier New", monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.relation-prompt {
  margin: 17px 0;
  color: rgba(229, 208, 163, .68);
  font-size: 14px;
  line-height: 1.55;
}

.relation-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.relation-option {
  min-height: 66px;
  padding: 11px 13px;
  border: 1px solid rgba(218, 185, 121, .18);
  background: rgba(255, 255, 255, .025);
  color: #d8c08f;
  text-align: left;
  cursor: pointer;
}

.relation-option b,
.relation-option small {
  display: block;
}

.relation-option b {
  font: 700 10px/1.3 "Courier New", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.relation-option small {
  margin-top: 5px;
  color: rgba(216, 192, 143, .5);
  font: 11px/1.35 Georgia, serif;
}

.relation-option:hover,
.relation-option:focus-visible {
  border-color: rgba(199, 78, 56, .68);
  background: rgba(134, 45, 31, .14);
}

.interview-panel {
  position: fixed;
  z-index: 130;
  inset: 88px auto 0 0;
  width: min(680px, 100%);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 28px 28px 44px;
  transform: translateX(-104%);
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
  border-right: 1px solid rgba(236, 214, 167, .16);
  background:
    repeating-linear-gradient(0deg, transparent 0 32px, rgba(220,190,130,.035) 32px 33px),
    #14100d;
  box-shadow: 22px 0 50px rgba(0,0,0,.5);
}

.interview-panel.open {
  transform: translateX(0);
}

.interview-panel-head {
  position: sticky;
  z-index: 4;
  top: 0;
  margin: 0 0 12px;
  padding: 0 0 17px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(to bottom, #14100d 78%, transparent);
}

.interview-panel-head h2 {
  margin: 0;
  color: #ead6a8;
  font-size: 32px;
  font-weight: 400;
}

.interview-disclaimer {
  margin: 22px 0;
  padding: 13px 15px;
  border-left: 2px solid #a64033;
  background: rgba(153,50,38,.08);
  color: rgba(234,214,168,.68);
  font-size: 13px;
  line-height: 1.55;
}

.interview-list {
  display: grid;
  gap: 16px;
}

.interview-person {
  padding: 18px;
  border: 1px solid rgba(231,208,157,.15);
  background: rgba(255,255,255,.025);
}

.interview-person.locked-interview {
  border-style: dashed;
  background: rgba(255,255,255,.012);
  opacity: .62;
}

.locked-interview .interview-question:disabled {
  cursor: not-allowed;
  color: rgba(225, 204, 163, .38);
}

.interview-person header {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
}

.interview-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(231,208,157,.28);
  border-radius: 50%;
  color: #d4b778;
  font: 20px/1 Georgia, serif;
}

.interview-person h3 {
  margin: 0 0 4px;
  color: #e5d0a3;
  font-size: 20px;
  font-weight: 400;
}

.interview-person header small {
  color: rgba(231,208,157,.48);
  font: 9px/1.3 "Courier New", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.interview-question {
  width: 100%;
  margin-top: 7px;
  padding: 12px 13px;
  border: 1px solid rgba(231,208,157,.14);
  background: rgba(255,255,255,.025);
  color: #d9c59a;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.interview-question.asked {
  border-color: rgba(154,58,45,.55);
  color: #b89f73;
}

.interview-answer {
  margin: 8px 0 13px;
  padding: 12px 14px;
  border-left: 2px solid #7f3027;
  background: rgba(117,45,34,.08);
  color: rgba(234,217,180,.78);
  font-size: 14px;
  line-height: 1.62;
}

.case-reveal {
  position: fixed;
  z-index: 220;
  inset: 0;
  display: none;
  overflow: hidden;
  background: #050505;
  color: #eee2c6;
}

.case-reveal.open {
  display: grid;
  place-items: center;
  animation: reveal-in .55s ease both;
}

.reveal-active .topbar {
  visibility: hidden;
}

@keyframes reveal-in {
  from { opacity: 0; }
}

.reveal-grain {
  position: absolute;
  inset: -30%;
  z-index: 5;
  pointer-events: none;
  opacity: .16;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='4' seed='8'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  animation: film-grain .22s steps(2) infinite;
}

@keyframes film-grain {
  0% { transform: translate(0,0); }
  25% { transform: translate(2%,-1%); }
  50% { transform: translate(-1%,2%); }
  75% { transform: translate(1%,1%); }
}

.reveal-close {
  position: fixed;
  z-index: 12;
  top: max(18px, env(safe-area-inset-top));
  right: 20px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid rgba(240,220,180,.35);
  background: rgba(0,0,0,.55);
  color: #ead5aa;
  font: 10px/1 "Courier New", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}

.reveal-frame {
  width: min(1180px, calc(100% - 70px));
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  align-items: center;
  gap: clamp(30px, 6vw, 90px);
}

.reveal-visual {
  position: relative;
  min-height: min(66vh, 680px);
  overflow: hidden;
  border: 9px solid #d2c09a;
  box-shadow: 0 25px 80px rgba(0,0,0,.7);
  background: #17130f;
  transform: rotate(-1.4deg);
}

.reveal-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, transparent 38%, rgba(0,0,0,.62) 100%);
}

#revealImage {
  width: 100%;
  height: 100%;
  min-height: min(66vh, 680px);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: grayscale(1) sepia(.16) contrast(1.14);
  animation: reveal-camera 7s ease-in-out both;
}

@keyframes reveal-camera {
  from { transform: scale(1.02) translate(-1%, 0); }
  to { transform: scale(1.12) translate(2%, -1%); }
}

.reveal-copy {
  position: relative;
  z-index: 6;
}

.reveal-copy > span {
  color: #af4638;
  font: 10px/1 "Courier New", monospace;
  letter-spacing: .2em;
}

.reveal-copy h2 {
  margin: 18px 0 20px;
  font-size: clamp(38px, 5.2vw, 75px);
  font-weight: 400;
  line-height: .94;
}

.reveal-copy p {
  margin: 0;
  color: rgba(238,226,198,.75);
  font-size: clamp(17px, 1.45vw, 22px);
  line-height: 1.62;
}

.reveal-progress {
  height: 2px;
  margin-top: 32px;
  overflow: hidden;
  background: rgba(238,226,198,.16);
}

.reveal-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: #ad4133;
}

.case-reveal.open .reveal-progress i {
  animation: reveal-timer 6.5s linear both;
}

@keyframes reveal-timer { to { width: 100%; } }

.reveal-controls {
  position: fixed;
  z-index: 12;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.reveal-controls button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(240,220,180,.24);
  background: rgba(0,0,0,.5);
  color: #d8c59d;
  font: 9px/1 "Courier New", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.detective-notes {
  display: grid;
  gap: 9px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(43,30,20,.2);
}

.detective-notes span {
  color: #783128;
  font: 9px/1 "Courier New", monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.detective-notes textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(43,30,20,.25);
  background: rgba(255,248,220,.28);
  color: #2b1e14;
  line-height: 1.5;
}

@media (max-width: 1050px) {
  .investigation-layout {
    grid-template-columns: 1fr;
  }

  .deduction-panel {
    max-width: none;
  }
}

@media (max-width: 720px) {
  button,
  select,
  textarea {
    touch-action: manipulation;
  }

  .dust {
    display: none;
  }

  .investigation-active .grain,
  .investigation-modal-open .vignette {
    display: none;
  }

  .investigation-switch {
    width: 42px;
    padding: 0;
    justify-content: center;
  }

  .investigation-switch b {
    display: none;
  }

  .investigation-active .focus-control,
  .investigation-active #soundToggle,
  .investigation-active #archiveOpen {
    display: none;
  }

  .investigation-shell {
    padding: 93px 10px calc(20px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .investigation-active .topbar {
    height: 64px;
    align-items: center;
    padding-block: 10px;
  }

  .investigation-active .investigation-shell {
    padding-top: 76px;
  }

  .investigation-header {
    min-height: 38px;
    margin-bottom: 8px;
    align-items: center;
    justify-content: flex-end;
  }

  .investigation-header > div:first-child {
    display: none;
  }

  .investigation-progress {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 8px 11px;
  }

  .investigation-progress span {
    margin: 0;
    font-size: 8px;
  }

  .investigation-progress b,
  .investigation-progress i {
    font-size: 18px;
  }

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

  .investigation-toolbar label {
    min-width: 0;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 5px 10px;
  }

  .investigation-toolbar label > span {
    display: none;
  }

  .investigation-toolbar select {
    min-height: 48px;
    font-size: 13px;
    line-height: 1.3;
  }

  .investigation-toolbar > button {
    min-width: 0;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 8px;
    font-size: 11px;
    line-height: 1.3;
    letter-spacing: .04em;
    white-space: normal;
  }

  .investigation-toolbar > button span {
    font-size: 13px;
  }

  #caseFolderOpen {
    position: relative;
    border-color: rgba(227, 137, 87, .88);
    background: linear-gradient(150deg, #9a4a30, #5b211a);
    box-shadow: inset 0 0 0 1px rgba(255, 225, 170, .12), 0 8px 18px rgba(54, 13, 8, .35);
  }

  #caseFolderOpen::after {
    content: "ОТКРЫТЬ";
    position: absolute;
    right: 5px;
    bottom: 4px;
    color: rgba(255, 225, 169, .58);
    font: 6px/1 "Courier New", monospace;
    letter-spacing: .08em;
  }

  #resetCaseBoard {
    display: none;
  }

  .thread-guide {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 14px 15px;
  }

  .thread-guide b {
    font-size: 16px;
    line-height: 1.4;
  }

  .thread-guide p {
    font-size: 14px;
    line-height: 1.55;
  }

  .thread-hint {
    grid-column: 1;
    justify-self: stretch;
    width: 100%;
    min-height: 44px;
  }

  .clue-board {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 60px 13px 18px;
    overflow: visible;
    border-width: 10px;
  }

  .clue-card {
    position: relative !important;
    inset: auto !important;
    width: 100%;
    min-height: 185px;
    max-height: none;
    transform: none !important;
  }

  .clue-card.document-clue {
    min-height: 205px;
    padding: 31px 22px 26px;
  }

  .clue-card.locked-clue {
    min-height: 124px;
    padding: 22px;
  }

  .document-clue .clue-card-copy {
    padding-right: 34px;
  }

  .clue-document-mark {
    top: 24px;
    right: 17px;
    width: 42px;
    height: 52px;
    font-size: 11px;
  }

  .clue-card.has-image {
    min-height: 335px;
    padding: 198px 19px 24px;
  }

  .clue-card-photo {
    height: 184px;
  }

  .clue-card .clue-kind {
    margin-bottom: 8px;
    font-size: 10px;
  }

  .clue-card b {
    margin-bottom: 10px;
    font-size: 23px;
    line-height: 1.08;
  }

  .clue-card small {
    font-size: 15px;
    line-height: 1.55;
    -webkit-line-clamp: 5;
  }

  .thread-layer {
    z-index: 2;
  }

  .thread-layer .thread-label {
    display: none;
  }

  .board-instruction {
    top: 17px;
    width: calc(100% - 42px);
    max-width: none;
    font-size: 10px;
    line-height: 1.4;
  }

  .deduction-panel {
    padding: 24px 17px;
  }

  .deduction-panel h2 {
    font-size: 27px;
    line-height: 1.12;
  }

  .case-objective {
    font-size: 16px;
    line-height: 1.62;
  }

  .case-readiness {
    font-size: 11px;
    line-height: 1.55;
  }

  .deduction-step {
    min-height: 66px;
    padding: 13px 13px 13px 43px;
    font-size: 14px;
    line-height: 1.55;
  }

  .deduction-step > span {
    margin-bottom: 5px;
    font-size: 9px;
  }

  .hypothesis-card {
    min-height: 88px;
    padding: 15px;
  }

  .hypothesis-card b {
    font-size: 17px;
    line-height: 1.25;
  }

  .hypothesis-card small {
    font-size: 14px;
    line-height: 1.55;
  }

  .deduce-button {
    min-height: 58px;
    font-size: 11px;
  }

  .case-folder-panel {
    inset: 0;
    width: 100%;
    height: 100dvh;
    padding: 0 17px calc(35px + env(safe-area-inset-bottom));
    touch-action: pan-y;
  }

  .interview-panel {
    inset: 0;
  }

  .case-folder-scrim,
  .interview-scrim {
    inset: 0;
    backdrop-filter: none;
  }

  .folder-panel-head,
  .interview-panel-head {
    top: 0;
    margin: 0 -17px 12px;
    padding: max(12px, env(safe-area-inset-top)) 17px 12px;
    align-items: center;
    border-bottom: 1px solid rgba(231, 208, 157, .12);
    background: #17110d;
  }

  .interview-panel-head {
    background: #14100d;
  }

  .folder-panel-head > div,
  .interview-panel-head > div {
    min-width: 0;
  }

  .folder-panel-head h2,
  .interview-panel-head h2 {
    overflow-wrap: anywhere;
    font-size: 24px;
    line-height: 1.05;
  }

  .folder-close-button {
    min-width: 48px;
    width: 48px;
    min-height: 48px;
    flex: 0 0 48px;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
  }

  .folder-close-button span {
    font-size: 25px;
  }

  .interview-panel {
    width: 100%;
    height: 100dvh;
    padding: 0 17px calc(35px + env(safe-area-inset-bottom));
    touch-action: pan-y;
  }

  .folder-cover {
    min-height: 190px;
    padding: 20px;
  }

  .folder-cover b {
    font-size: 30px;
  }

  .clue-dialog {
    padding: 0;
    place-items: stretch;
    background: #d4bb83;
    touch-action: pan-y;
  }

  .clue-dialog-card {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding: 0 18px calc(30px + env(safe-area-inset-bottom));
    box-shadow: none;
  }

  .clue-dialog-scrim {
    display: none;
  }

  .clue-dialog-head {
    position: sticky;
    z-index: 20;
    top: 0;
    min-height: 66px;
    margin: 0 -18px 18px;
    align-items: center;
    padding: max(10px, env(safe-area-inset-top)) 18px 10px;
    border-bottom: 1px solid rgba(54, 36, 20, .2);
    background: #dcc48c;
    box-shadow: 0 7px 18px rgba(63, 41, 21, .16);
  }

  .clue-dialog-head > span {
    max-width: calc(100% - 122px);
    font-size: 10px;
    line-height: 1.3;
  }

  .clue-close-button {
    min-width: 112px;
    min-height: 48px;
    flex: 0 0 auto;
    position: relative;
    z-index: 30;
    border-color: rgba(91, 31, 24, .82);
    background: #7b2f27;
    color: #fff2d4;
    box-shadow: 0 3px 10px rgba(56, 22, 16, .22);
    font-size: 9px;
  }

  .clue-dialog-card .clue-close-button {
    width: auto;
    height: 48px;
    display: inline-flex;
    border-color: rgba(91, 31, 24, .82);
    background: #7b2f27;
    color: #fff2d4;
    font: 9px/1 "Courier New", monospace;
  }

  .clue-dialog-card .clue-close-button b {
    font: 9px/1 "Courier New", monospace;
    font-weight: 400;
  }

  .clue-dialog-image {
    height: min(38dvh, 320px);
    margin-top: 0;
  }

  .clue-dialog-card h2 {
    margin-top: 18px;
    font-size: 32px;
    line-height: 1.08;
  }

  .clue-dialog-image[hidden] + h2 {
    margin-top: 12px;
  }

  .clue-dialog-content p,
  .folder-narrative p,
  .interview-answer {
    font-size: 17px;
    line-height: 1.72;
  }

  .clue-close-bottom {
    min-height: 58px;
    margin-top: 28px;
    font-size: 11px;
  }

  .relation-dialog {
    padding: 10px;
    align-items: end;
  }

  .relation-dialog-card {
    width: 100%;
    max-height: calc(100dvh - 20px);
    padding: 28px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 8px 8px 0 0;
    -webkit-overflow-scrolling: touch;
  }

  .relation-dialog-card h2 {
    padding-right: 38px;
    font-size: 29px;
  }

  .relation-options {
    grid-template-columns: 1fr;
  }

  .relation-option {
    min-height: 58px;
  }

  .reveal-frame {
    width: calc(100% - 28px);
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .reveal-visual,
  #revealImage {
    min-height: 42vh;
    max-height: 46vh;
  }

  .reveal-copy h2 {
    margin: 12px 0 13px;
    font-size: clamp(34px, 11vw, 48px);
  }

  .reveal-copy p {
    font-size: 15px;
    line-height: 1.5;
  }

  .reveal-controls {
    bottom: max(9px, env(safe-area-inset-bottom));
  }
}

.office {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  perspective: 1200px;
  background: #0a0806;
}

.office-background {
  position: absolute;
  inset: -4%;
  background-image: linear-gradient(rgba(7, 5, 3, 0.06), rgba(7, 5, 3, 0.12)), url("./assets/sheriff-office.jpg");
  background-position: center;
  background-size: cover;
  transform: translate3d(calc(var(--mx) * -10px), calc(var(--my) * -7px), 0) scale(var(--scene-scale));
  transition: transform 0.25s ease-out;
  filter: saturate(.88) contrast(1.06) brightness(.75);
}

.office::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(7, 5, 3, .08) 0, transparent 36%, rgba(7, 5, 3, .3) 100%);
  pointer-events: none;
}

.lamp-glow {
  position: absolute;
  left: -7vw;
  top: 2vh;
  width: 57vw;
  height: 78vh;
  border-radius: 50%;
  background: radial-gradient(ellipse at 42% 40%, rgba(255, 197, 98, .2), rgba(255, 181, 76, .06) 47%, transparent 72%);
  mix-blend-mode: screen;
  filter: blur(12px);
  animation: lamp-flicker 5s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes lamp-flicker {
  0%, 80% { opacity: .85; }
  81% { opacity: .68; }
  83% { opacity: .9; }
  100% { opacity: .82; }
}

.dust {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.dust i {
  position: absolute;
  left: calc(8% + var(--i, 1) * 9%);
  top: 22%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 226, 164, .52);
  box-shadow: 0 0 5px rgba(255, 218, 140, .45);
  animation: dust-float calc(7s + var(--i, 1) * 1s) infinite linear;
}

.dust i:nth-child(1) { --i: 1; animation-delay: -4s; }
.dust i:nth-child(2) { --i: 2; animation-delay: -1s; }
.dust i:nth-child(3) { --i: 3; animation-delay: -7s; }
.dust i:nth-child(4) { --i: 4; animation-delay: -2s; }
.dust i:nth-child(5) { --i: 5; animation-delay: -8s; }
.dust i:nth-child(6) { --i: 6; animation-delay: -5s; }
.dust i:nth-child(7) { --i: 7; animation-delay: -3s; }
.dust i:nth-child(8) { --i: 8; animation-delay: -9s; }

@keyframes dust-float {
  from { transform: translate3d(-20px, 55vh, 0); opacity: 0; }
  20% { opacity: .7; }
  to { transform: translate3d(45px, -12vh, 0); opacity: 0; }
}

.desk-stage {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100dvh;
  min-height: 680px;
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--my) * -.45deg)) rotateY(calc(var(--mx) * .5deg));
  transition: transform .3s ease-out;
}

.desk-intro {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 26%;
  width: min(520px, 44vw);
  text-align: center;
  transform: translate3d(-50%, calc(var(--my) * 4px), 50px);
  text-shadow: 0 3px 24px rgba(0, 0, 0, .85);
}

.kicker {
  margin: 0 0 13px;
  color: #c8ad78;
  font: 10px/1.4 "Courier New", monospace;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.desk-intro h1 {
  margin: 0;
  font-size: clamp(42px, 5.2vw, 76px);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .95;
  text-wrap: balance;
}

.desk-intro > p:not(.kicker) {
  width: min(490px, 100%);
  margin: 21px auto 27px;
  color: rgba(246, 233, 200, .7);
  font-size: 15px;
  line-height: 1.55;
  text-wrap: balance;
}

.primary-button,
.secondary-button,
.transform-button {
  min-height: 48px;
  border: 0;
  cursor: pointer;
  transition: transform .2s, filter .2s, box-shadow .2s;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 0 25px;
  border: 1px solid rgba(255, 228, 174, .3);
  border-radius: 2px;
  background: linear-gradient(135deg, #aa3d2c, #752419);
  box-shadow: 0 9px 27px rgba(55, 9, 4, .4), inset 0 1px rgba(255,255,255,.12);
  color: #f8e4ba;
  font: 11px/1 "Courier New", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.primary-button:hover,
.transform-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
  box-shadow: 0 12px 32px rgba(55, 9, 4, .52);
}

.button-spark {
  color: #f4cf84;
  font-size: 16px;
}

.desk-object {
  position: absolute;
  z-index: 6;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform-style: preserve-3d;
  filter: drop-shadow(0 18px 17px rgba(0, 0, 0, .55));
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), filter .35s;
}

.desk-object:hover {
  z-index: 9;
  filter: drop-shadow(0 27px 20px rgba(0, 0, 0, .65)) brightness(1.08);
}

.desk-object:hover .object-label,
.desk-object:focus-visible .object-label {
  opacity: 1;
  transform: translate(-50%, 0);
}

.object-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 14px);
  width: max-content;
  max-width: 210px;
  padding: 10px 14px;
  border: 1px solid rgba(240, 215, 155, .18);
  border-radius: 2px;
  background: rgba(14, 10, 7, .88);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: .25s;
  pointer-events: none;
  text-align: center;
}

.object-label b,
.object-label small {
  display: block;
}

.object-label b {
  color: #f1dab0;
  font: 10px/1 "Courier New", monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.object-label small {
  margin-top: 5px;
  color: rgba(240, 215, 155, .48);
  font: 9px/1.3 "Courier New", monospace;
}

.newspaper-object {
  right: 3.2vw;
  bottom: 13vh;
  width: clamp(180px, 18vw, 285px);
  height: clamp(128px, 13vw, 205px);
  transform: translate3d(calc(var(--mx) * 5px), calc(var(--my) * 7px), 25px) rotate(-7deg) rotateX(54deg);
}

.newspaper-object:hover {
  transform: translate3d(0, -12px, 70px) rotate(-3deg) rotateX(48deg) scale(1.04);
}

.newspaper-paper {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: block;
  padding: 14px;
  border-radius: 2px;
  background: linear-gradient(130deg, #c9ae77, #ead6a6 42%, #b99b65);
  color: rgba(37, 28, 19, .82);
  box-shadow: inset 0 0 28px rgba(83, 54, 23, .22), inset 0 0 0 1px rgba(76, 51, 21, .2);
}

.newspaper-paper::after {
  content: "";
  position: absolute;
  left: 10%;
  top: 42%;
  width: 32%;
  height: 39%;
  border: 1px solid rgba(47, 33, 21, .35);
  background: linear-gradient(140deg, rgba(40, 30, 20, .12), rgba(40, 30, 20, .4));
}

.paper-title {
  display: block;
  border-bottom: 2px solid rgba(38, 27, 17, .6);
  padding-bottom: 7px;
  font-size: clamp(14px, 1.4vw, 23px);
  font-weight: 700;
}

.paper-rule,
.paper-columns {
  display: block;
}

.paper-rule {
  height: 5px;
  margin-top: 7px;
  background: repeating-linear-gradient(to right, rgba(37,28,18,.55) 0 29%, transparent 29% 31%);
}

.paper-columns {
  position: absolute;
  inset: 40% 8% 8% 48%;
  background: repeating-linear-gradient(to bottom, rgba(37,28,18,.42) 0 2px, transparent 2px 6px);
}

.dossier-object {
  left: 3.5vw;
  bottom: 14vh;
  width: clamp(178px, 18vw, 270px);
  height: clamp(130px, 13.4vw, 205px);
  border-radius: 3px;
  background: linear-gradient(145deg, #7d5429, #ad7c3f 48%, #6e4822);
  box-shadow: inset 0 0 0 1px rgba(255, 222, 165, .13), inset 0 0 34px rgba(42, 22, 4, .28);
  transform: translate3d(calc(var(--mx) * -7px), calc(var(--my) * 5px), 30px) rotate(5deg) rotateX(52deg);
}

.dossier-object::after {
  content: "";
  position: absolute;
  inset: 15px;
  border: 1px solid rgba(64, 31, 10, .32);
}

.dossier-object:hover {
  transform: translate3d(0, -13px, 75px) rotate(2deg) rotateX(46deg) scale(1.04);
}

.folder-tab {
  position: absolute;
  left: 0;
  top: -17px;
  width: 47%;
  height: 26px;
  padding: 9px 0 0 15px;
  border-radius: 4px 5px 0 0;
  background: #8c612f;
  color: rgba(46, 24, 8, .75);
  font: 9px/1 "Courier New", monospace;
  text-align: left;
  letter-spacing: .13em;
}

.folder-stamp {
  position: absolute;
  left: 50%;
  top: 47%;
  padding: 7px 12px;
  border: 3px solid rgba(117, 27, 18, .62);
  color: rgba(117, 27, 18, .72);
  font: 13px/1 "Courier New", monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
  transform: translate(-50%, -50%) rotate(-9deg);
}

.photo-object {
  right: 20vw;
  bottom: 8vh;
  width: clamp(115px, 10vw, 155px);
  height: clamp(135px, 12vw, 185px);
  padding: 0;
  transform: translate3d(calc(var(--mx) * 4px), calc(var(--my) * 4px), 38px) rotate(8deg) rotateX(54deg);
}

.photo-object:hover {
  transform: translate3d(0, -15px, 85px) rotate(4deg) rotateX(46deg) scale(1.06);
}

.photo-frame {
  display: block;
  width: 100%;
  height: 100%;
  padding: 9px 9px 25px;
  background: #d3c098;
  box-shadow: inset 0 0 12px rgba(75, 47, 18, .2);
}

.photo-frame i {
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 55% 42%, rgba(238, 224, 186, .54) 0 5%, transparent 6%),
    radial-gradient(circle at 48% 45%, rgba(233, 220, 183, .72) 0 25%, transparent 26%),
    linear-gradient(145deg, #40362b, #8f7857 48%, #29231d);
  filter: grayscale(.75) sepia(.55) contrast(1.1);
}

.telegram-object {
  left: 22vw;
  bottom: 8vh;
  width: clamp(150px, 14vw, 220px);
  height: clamp(90px, 8.3vw, 126px);
  padding: 0;
  transform: translate3d(calc(var(--mx) * -5px), calc(var(--my) * 4px), 35px) rotate(-5deg) rotateX(52deg);
}

.telegram-object:hover {
  transform: translate3d(0, -13px, 80px) rotate(-2deg) rotateX(46deg) scale(1.05);
}

.telegram-paper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(69, 43, 17, .45);
  background: #cfb47b;
  color: rgba(42, 29, 16, .78);
  box-shadow: inset 0 0 20px rgba(82, 52, 18, .22);
  font-family: "Courier New", monospace;
}

.telegram-paper i {
  font-size: 10px;
  letter-spacing: .2em;
}

.telegram-paper b {
  font-size: 18px;
  letter-spacing: .12em;
}

.telegram-paper small {
  font-size: 7px;
  letter-spacing: .12em;
}

.investigation-object {
  left: 50%;
  bottom: 5.5vh;
  width: clamp(190px, 18vw, 290px);
  height: clamp(120px, 11vw, 176px);
  transform: translate3d(calc(-50% + var(--mx) * 3px), calc(var(--my) * 4px), 42px) rotate(-1deg) rotateX(50deg);
}

.investigation-object:hover {
  transform: translate3d(-50%, -16px, 95px) rotate(0deg) rotateX(42deg) scale(1.05);
}

.casebook-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 2px solid #28100d;
  border-radius: 4px 10px 10px 4px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.05), transparent 7% 92%, rgba(0,0,0,.28)),
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(255,255,255,.018) 4px 5px),
    #431b17;
  box-shadow: inset 13px 0 17px rgba(0,0,0,.3), inset 0 0 0 5px rgba(207,165,102,.08);
  color: #d7bd84;
}

.casebook-cover i,
.casebook-cover small,
.casebook-cover em {
  font-family: "Courier New", monospace;
  font-style: normal;
  text-transform: uppercase;
}

.casebook-cover i {
  font-size: 8px;
  letter-spacing: .18em;
}

.casebook-cover b {
  margin: 9px 0 8px;
  font: clamp(17px, 1.6vw, 25px)/1 Georgia, serif;
  letter-spacing: .04em;
}

.casebook-cover small {
  max-width: 190px;
  color: rgba(215,189,132,.62);
  font-size: 7px;
  line-height: 1.35;
  letter-spacing: .08em;
}

.casebook-cover em {
  position: absolute;
  right: 12px;
  bottom: 10px;
  padding: 5px 8px;
  border: 1px solid rgba(216,185,119,.38);
  font-size: 7px;
  letter-spacing: .14em;
}

.case-strip {
  position: absolute;
  z-index: 15;
  inset: auto 0 0;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 58px);
  border-top: 1px solid rgba(240, 215, 155, .11);
  background: rgba(10, 8, 6, .72);
  backdrop-filter: blur(9px);
  color: rgba(240, 215, 155, .48);
  font: 9px/1 "Courier New", monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: #8aa67f;
  box-shadow: 0 0 8px rgba(138, 166, 127, .8);
}

.case-stats {
  display: flex;
  align-items: center;
  gap: 7px;
}

.case-stats i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(240, 215, 155, .28);
}

.case-strip button {
  border: 0;
  border-bottom: 1px dashed rgba(240, 215, 155, .3);
  padding: 4px 0;
  background: transparent;
  color: rgba(240, 215, 155, .5);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.evidence-overlay,
.method-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  opacity: 0;
  transition: opacity .35s, visibility .35s;
}

.evidence-overlay.open,
.method-modal.open {
  visibility: visible;
  opacity: 1;
}

.overlay-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(7, 5, 3, .78);
  backdrop-filter: blur(11px);
}

.evidence-sheet {
  position: absolute;
  inset: clamp(14px, 3vh, 34px) clamp(14px, 4vw, 70px);
  max-width: 1360px;
  margin: auto;
  overflow: auto;
  border: 1px solid rgba(78, 57, 30, .42);
  border-radius: 3px;
  background:
    linear-gradient(rgba(255,255,255,.025), rgba(95,63,24,.04)),
    repeating-linear-gradient(0deg, rgba(80, 55, 28, .018) 0 1px, transparent 1px 4px),
    #dfca9a;
  box-shadow: 0 40px 90px rgba(0,0,0,.66), inset 0 0 110px rgba(102, 71, 36, .12);
  color: var(--ink);
  transform: translateY(45px) rotateX(3deg) scale(.97);
  transform-origin: 50% 100%;
  transition: transform .55s cubic-bezier(.16,.84,.32,1);
  scrollbar-color: rgba(67, 44, 19, .32) transparent;
}

.evidence-overlay.open .evidence-sheet {
  transform: translateY(0) rotateX(0) scale(1);
}

.evidence-sheet::after {
  content: "";
  position: fixed;
  inset: 8px;
  border: 1px solid rgba(70, 47, 20, .12);
  pointer-events: none;
}

.sheet-topline {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(60, 40, 20, .16);
  background: rgba(223, 202, 154, .92);
  backdrop-filter: blur(8px);
}

.sheet-index {
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(30, 25, 20, .58);
  font: 9px/1 "Courier New", monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.sheet-index b {
  padding-left: 16px;
  border-left: 1px solid rgba(30, 25, 20, .19);
  font-weight: 400;
}

.sheet-tools {
  display: flex;
  gap: 8px;
}

.icon-button,
.close-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(30, 25, 20, .2);
  border-radius: 50%;
  background: transparent;
  color: rgba(30, 25, 20, .72);
  cursor: pointer;
  transition: .2s;
}

.icon-button:hover,
.close-button:hover {
  border-color: rgba(30, 25, 20, .55);
  transform: rotate(4deg);
}

.close-button {
  font: 25px/1 Arial, sans-serif;
}

.sheet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, .72fr);
  gap: clamp(30px, 5vw, 78px);
  padding: clamp(28px, 5vw, 70px);
}

.eyebrow-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
  font: 9px/1.3 "Courier New", monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(35, 27, 18, .54);
}

.confidence {
  padding: 7px 9px;
  border: 1px solid rgba(53, 75, 52, .35);
  color: #496044;
}

.evidence-story h2 {
  max-width: 850px;
  margin: 0;
  color: #1e1913;
  font-size: clamp(38px, 5vw, 75px);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .98;
  text-wrap: balance;
}

.evidence-deck {
  max-width: 780px;
  margin: 24px 0 34px;
  padding-left: 18px;
  border-left: 2px solid rgba(107, 40, 27, .55);
  color: rgba(30, 25, 19, .69);
  font-size: 17px;
  line-height: 1.52;
}

.evidence-visual {
  position: relative;
  margin: 0 0 30px;
  overflow: hidden;
  min-height: 380px;
  border: 7px solid rgba(241, 224, 183, .75);
  box-shadow: 0 16px 30px rgba(73, 48, 22, .22), inset 0 0 0 1px rgba(35, 25, 14, .18);
  background: #59452e;
}

.evidence-visual img {
  width: 100%;
  height: min(58vh, 580px);
  display: block;
  object-fit: cover;
  filter: sepia(.16) saturate(.84) contrast(1.03);
}

.evidence-visual figcaption {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  background: linear-gradient(transparent, rgba(20, 14, 9, .86));
  color: rgba(255, 239, 204, .78);
  font: 9px/1.3 "Courier New", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.evidence-visual figcaption b {
  padding: 6px 8px;
  border: 1px solid rgba(255, 239, 204, .3);
  font-weight: 400;
}

.image-provenance {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  text-align: right;
}

.image-provenance a {
  color: #ffe9b8;
  text-decoration-color: rgba(255, 233, 184, .42);
  text-underline-offset: 3px;
}

.signal-block {
  position: relative;
  margin: 28px 0;
  padding: 25px 28px 23px;
  border: 1px solid rgba(84, 54, 27, .18);
  background: rgba(255, 244, 212, .27);
}

.signal-block::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 20px;
  right: 30px;
  top: 47%;
  height: 1.35em;
  background: rgba(220, 167, 54, .24);
  transform: rotate(-.5deg) scaleX(0);
  transform-origin: left;
}

.evidence-overlay.open .signal-block::before {
  animation: highlight-swipe .9s .45s cubic-bezier(.2,.8,.2,1) forwards;
}

@keyframes highlight-swipe { to { transform: rotate(-.5deg) scaleX(1); } }

.pencil-label {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 9px;
  color: #913322;
  font: 10px/1 "Courier New", monospace;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.signal-block p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(19px, 2vw, 27px);
  line-height: 1.35;
}

.story-copy {
  color: rgba(30, 25, 18, .78);
  font-size: 16px;
  line-height: 1.7;
}

.story-copy p {
  margin: 0 0 18px;
}

.story-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 32px 0 8px;
  padding: 17px 0;
  border-top: 1px solid rgba(35, 25, 15, .17);
  border-bottom: 1px solid rgba(35, 25, 15, .17);
}

.story-section {
  margin: 1.9rem 0 0.65rem;
  color: #6f261c;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  letter-spacing: 0.015em;
  line-height: 1.15;
}

.story-section::before {
  content: "§";
  margin-right: 0.45rem;
  color: rgba(111, 38, 28, 0.45);
}

.story-pagination[hidden] {
  display: none;
}

.story-pagination button {
  min-height: 42px;
  border: 1px solid rgba(35, 25, 15, .22);
  background: rgba(255, 246, 220, .18);
  color: #5f2b21;
  font: 9px/1 "Courier New", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.story-pagination button:last-child {
  justify-self: end;
}

.story-pagination button:disabled {
  opacity: .32;
  cursor: default;
}

.story-pagination span {
  color: rgba(35, 25, 17, .5);
  font: 9px/1.4 "Courier New", monospace;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

.source-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 30px;
  padding: 16px 0;
  border-top: 1px solid rgba(35, 25, 15, .17);
  border-bottom: 1px solid rgba(35, 25, 15, .17);
  color: #78291d;
  text-decoration: none;
  font: 10px/1.4 "Courier New", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.source-link small {
  color: rgba(35, 25, 15, .48);
  letter-spacing: .03em;
  text-align: right;
  text-transform: none;
}

.analysis-card {
  position: sticky;
  top: 90px;
  align-self: start;
  padding: 29px;
  border: 1px solid rgba(40, 28, 18, .24);
  background: rgba(183, 151, 96, .18);
  box-shadow: 10px 13px 0 rgba(87, 57, 26, .06);
}

.analysis-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(38, 28, 18, .55);
  font: 9px/1.3 "Courier New", monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.analysis-heading p {
  margin: 0;
}

.red-thread {
  width: 31px;
  height: 2px;
  display: block;
  background: #9d3525;
  transform: rotate(-4deg);
}

.analysis-card h3 {
  margin: 19px 0 13px;
  font-size: clamp(27px, 2.5vw, 38px);
  font-weight: 400;
  letter-spacing: -.03em;
  line-height: 1.04;
}

.analysis-card > p {
  margin: 0;
  color: rgba(35, 26, 17, .67);
  font-size: 14px;
  line-height: 1.6;
}

.modern-note {
  margin: 27px 0;
  padding: 20px;
  border-left: 3px solid #8f3426;
  background: rgba(157, 53, 37, .08);
}

.modern-note span {
  color: #812f23;
  font: 9px/1 "Courier New", monospace;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.modern-note p {
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.55;
}

.modern-note small {
  color: rgba(35, 25, 17, .45);
  font: 8px/1.4 "Courier New", monospace;
}

.metrics {
  display: grid;
  gap: 14px;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 12px;
  align-items: center;
  color: rgba(35, 25, 17, .58);
  font: 9px/1 "Courier New", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.metric-track {
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  background: rgba(45, 31, 18, .13);
}

.metric-track i {
  display: block;
  height: 100%;
  background: linear-gradient(to right, #7d3025, #b66a3a);
  transform: scaleX(0);
  transform-origin: left;
}

.evidence-overlay.open .metric-track i {
  animation: metric-grow .75s .55s forwards;
}

@keyframes metric-grow { to { transform: scaleX(1); } }

.sheet-actions {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 9px;
  margin-top: 29px;
}

.secondary-button,
.transform-button {
  padding: 0 16px;
  font: 10px/1 "Courier New", monospace;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.secondary-button {
  border: 1px solid rgba(37, 27, 18, .28);
  background: transparent;
  color: #3e3021;
}

.secondary-button.saved {
  border-color: rgba(63, 96, 64, .45);
  color: #3f6641;
}

.transform-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #892e23;
  color: #f4dfb5;
}

.transform-button span {
  font-size: 18px;
}

.transform-drawer,
.archive-drawer {
  position: fixed;
  z-index: 180;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(550px, 100%);
  overflow: auto;
  padding: clamp(24px, 4vw, 48px);
  box-shadow: -30px 0 80px rgba(0, 0, 0, .56);
  transform: translateX(105%);
  transition: transform .52s cubic-bezier(.16,.84,.32,1), visibility .52s;
  visibility: hidden;
}

.transform-drawer.open,
.archive-drawer.open {
  transform: translateX(0);
  visibility: visible;
}

.transform-drawer {
  background:
    repeating-linear-gradient(0deg, rgba(80,55,28,.018) 0 1px, transparent 1px 4px),
    #dfca9a;
  color: var(--ink);
}

.drawer-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.drawer-header h2 {
  margin: 0;
  font-size: clamp(31px, 4vw, 46px);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1;
}

.drawer-header .kicker {
  color: #873124;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.mode-card {
  position: relative;
  min-height: 122px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 5px;
  padding: 17px;
  border: 1px solid rgba(45, 31, 17, .18);
  background: rgba(255, 245, 217, .16);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: .25s;
}

.mode-card:hover,
.mode-card.active {
  border-color: rgba(132, 45, 33, .66);
  background: rgba(164, 64, 44, .1);
  transform: translateY(-2px);
}

.mode-card > span {
  position: absolute;
  top: 15px;
  left: 17px;
  color: #983b2d;
  font-size: 21px;
}

.mode-card b {
  font-size: 15px;
  font-weight: 500;
}

.mode-card small {
  color: rgba(35, 25, 17, .5);
  font: 9px/1.35 "Courier New", monospace;
}

.transform-context {
  margin: 23px 0 13px;
}

.transform-context label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  color: rgba(35,25,17,.68);
  font: 9px/1 "Courier New", monospace;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.transform-context label small {
  color: rgba(35,25,17,.38);
}

.transform-context textarea {
  width: 100%;
  resize: vertical;
  min-height: 68px;
  padding: 13px;
  border: 1px solid rgba(45, 31, 17, .22);
  border-radius: 0;
  background: rgba(255, 246, 220, .3);
  color: var(--ink);
  font: 13px/1.5 Georgia, serif;
}

.primary-button.wide {
  width: 100%;
}

.transform-output {
  margin-top: 18px;
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(45, 31, 17, .17);
  background: rgba(255, 246, 220, .28);
}

.output-placeholder {
  min-height: 104px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: rgba(35,25,17,.42);
  text-align: center;
  font: 10px/1.5 "Courier New", monospace;
}

.output-placeholder span {
  color: #9d3a2b;
  font-size: 18px;
}

.output-placeholder p {
  margin: 0;
}

.output-card {
  animation: output-arrive .45s ease both;
}

@keyframes output-arrive {
  from { opacity: 0; transform: translateY(10px); }
}

.output-card .kicker {
  color: #8c3327;
  margin-bottom: 10px;
}

.output-card h3 {
  margin: 0 0 13px;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -.03em;
}

.output-card p {
  color: rgba(35,25,17,.72);
  font-size: 14px;
  line-height: 1.58;
}

.output-card ol,
.output-card ul {
  margin: 15px 0 0;
  padding-left: 18px;
  color: rgba(35,25,17,.72);
  font-size: 13px;
  line-height: 1.55;
}

.output-card li + li {
  margin-top: 8px;
}

.output-context {
  margin-top: 17px;
  padding-top: 12px;
  border-top: 1px dashed rgba(35,25,17,.2);
  color: rgba(35,25,17,.48);
  font: 9px/1.45 "Courier New", monospace;
}

.archive-drawer {
  background: #17110c;
  color: #efddb8;
}

.archive-header .close-button,
.close-button.light {
  border-color: rgba(240, 215, 155, .24);
  color: #eed8aa;
}

.archive-filters {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.archive-filters button {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid rgba(240, 215, 155, .14);
  background: transparent;
  color: rgba(240, 215, 155, .54);
  font: 9px/1 "Courier New", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}

.archive-filters button.active {
  border-color: #9c3a2c;
  background: rgba(156, 58, 44, .14);
  color: #f0d4a3;
}

.archive-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.archive-empty {
  min-height: 360px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  border: 1px dashed rgba(240, 215, 155, .14);
  color: rgba(240, 215, 155, .44);
  text-align: center;
}

.archive-empty span {
  font-size: 36px;
}

.archive-empty p {
  max-width: 280px;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.archive-item {
  position: relative;
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 16px;
  min-height: 116px;
  padding: 10px;
  border: 1px solid rgba(240, 215, 155, .13);
  background: rgba(240, 215, 155, .03);
  cursor: pointer;
  transition: .22s;
}

.archive-item:hover {
  border-color: rgba(240, 215, 155, .34);
  transform: translateX(-3px);
}

.archive-item img {
  width: 94px;
  height: 94px;
  object-fit: cover;
  filter: sepia(.28) saturate(.74);
}

.archive-item-body {
  align-self: center;
}

.archive-item small {
  color: rgba(240, 215, 155, .42);
  font: 8px/1 "Courier New", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.archive-item h3 {
  margin: 8px 25px 0 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.15;
}

.archive-remove {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: rgba(240, 215, 155, .4);
  cursor: pointer;
}

.method-modal {
  display: grid;
  place-items: center;
  padding: 18px;
}

.method-modal article {
  position: relative;
  width: min(700px, 100%);
  padding: clamp(28px, 5vw, 60px);
  border: 1px solid rgba(78, 57, 30, .42);
  background: #dfca9a;
  box-shadow: 0 40px 90px rgba(0,0,0,.66);
  color: var(--ink);
  transform: translateY(25px) scale(.98);
  transition: .4s;
}

.method-modal.open article {
  transform: none;
}

.method-modal .close-button {
  position: absolute;
  right: 18px;
  top: 18px;
}

.method-modal h2 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 55px);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1;
}

.method-modal article > p:not(.kicker) {
  color: rgba(35,25,17,.7);
  line-height: 1.6;
}

.method-formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 28px 0;
}

.method-formula span {
  padding: 10px 12px;
  border: 1px solid rgba(35,25,17,.24);
  font: 9px/1 "Courier New", monospace;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.method-formula i {
  color: #913327;
  font-style: normal;
}

.method-modal article > small {
  color: rgba(35,25,17,.48);
  font: 9px/1.55 "Courier New", monospace;
}

.toast {
  position: fixed;
  z-index: 300;
  left: 50%;
  bottom: 68px;
  max-width: calc(100vw - 30px);
  padding: 13px 17px;
  border: 1px solid rgba(240, 215, 155, .2);
  border-radius: 2px;
  background: rgba(19, 14, 10, .94);
  box-shadow: 0 12px 35px rgba(0,0,0,.45);
  color: #efd8aa;
  font: 10px/1.4 "Courier New", monospace;
  letter-spacing: .05em;
  text-align: center;
  transform: translate(-50%, 20px);
  opacity: 0;
  visibility: hidden;
  transition: .3s;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .desk-intro {
    top: 20%;
    width: min(560px, 70vw);
  }

  .newspaper-object,
  .dossier-object {
    bottom: 13vh;
  }

  .photo-object,
  .telegram-object {
    bottom: 7vh;
  }

  .sheet-grid {
    grid-template-columns: 1fr;
  }

  .analysis-card {
    position: relative;
    top: auto;
  }
}

@media (max-width: 720px) {
  body {
    overflow: hidden;
  }

  .topbar {
    height: 124px;
    align-items: flex-start;
    padding: 12px 14px;
  }

  .brand-mark {
    width: 37px;
    height: 37px;
  }

  .brand strong {
    font-size: 17px;
  }

  .focus-control {
    position: absolute;
    top: 68px;
    right: 62px;
    left: 14px;
    display: flex;
    height: 44px;
    padding-left: 13px;
  }

  .focus-control select {
    width: 100%;
    padding-right: 18px;
  }

  .round-button {
    position: absolute;
    top: 67px;
    right: 14px;
    display: grid;
    width: 44px;
    min-height: 44px;
    place-items: center;
  }

  .brand small {
    max-width: 165px;
    overflow: hidden;
    font-size: 6.5px;
    letter-spacing: .1em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .archive-button {
    min-height: 44px;
    padding-left: 13px;
  }

  .office-background {
    inset: -2%;
    background-position: 48% center;
    filter: saturate(.82) contrast(1.08) brightness(.58);
  }

  .lamp-glow {
    left: -22vw;
    width: 105vw;
  }

  .desk-stage {
    min-height: 620px;
    transform: none !important;
  }

  .desk-intro {
    top: 21%;
    width: calc(100% - 36px);
  }

  .desk-intro h1 {
    max-width: 380px;
    margin: auto;
    font-size: clamp(39px, 12vw, 57px);
  }

  .desk-intro > p:not(.kicker) {
    max-width: 390px;
    margin: 16px auto 20px;
    font-size: 13px;
    line-height: 1.45;
  }

  .primary-button {
    min-height: 46px;
    padding: 0 19px;
    font-size: 9px;
  }

  .desk-object {
    position: absolute;
    bottom: auto;
  }

  .object-label {
    display: none;
  }

  .newspaper-object {
    top: clamp(630px, 79dvh, 880px);
    right: 12px;
    width: 104px;
    height: 78px;
  }

  .dossier-object {
    top: clamp(630px, 79dvh, 880px);
    left: 12px;
    width: 104px;
    height: 78px;
  }

  .folder-tab {
    top: -13px;
    height: 19px;
    padding: 6px 0 0 8px;
    font-size: 6px;
  }

  .folder-stamp {
    border-width: 2px;
    padding: 5px 7px;
    font-size: 8px;
  }

  .photo-object {
    top: clamp(455px, 57dvh, 650px);
    right: calc(50% + 21px);
    width: 72px;
    height: 90px;
  }

  .telegram-object {
    top: clamp(469px, 59dvh, 668px);
    left: calc(50% + 17px);
    width: 106px;
    height: 64px;
  }

  .investigation-object {
    left: 50%;
    top: clamp(540px, 67dvh, 760px);
    width: min(190px, calc(100vw - 54px));
    height: 98px;
    filter: drop-shadow(0 15px 16px rgba(0,0,0,.58));
    transform: translateX(-50%) rotate(-2deg);
  }

  .investigation-object:hover {
    transform: translateX(-50%) translateY(-4px) rotate(-1deg);
  }

  .casebook-cover {
    justify-content: center;
    padding: 13px 18px;
    border-color: #2b0d0a;
    border-radius: 4px 12px 12px 4px;
    background:
      linear-gradient(90deg, rgba(255,255,255,.07), transparent 8% 90%, rgba(0,0,0,.32)),
      repeating-linear-gradient(0deg, transparent 0 4px, rgba(255,255,255,.02) 4px 5px),
      #552019;
    box-shadow: inset 15px 0 18px rgba(0,0,0,.34), inset 0 0 0 4px rgba(226,180,107,.08);
  }

  .casebook-cover i {
    display: block;
    margin-bottom: 8px;
    font-size: 7px;
    letter-spacing: .16em;
  }

  .casebook-cover b {
    margin: 0;
    font-size: 18px;
    letter-spacing: .05em;
  }

  .casebook-cover small {
    display: block;
    max-width: 150px;
    margin-top: 8px;
    font-size: 6.5px;
    line-height: 1.25;
  }

  .casebook-cover em {
    right: 9px;
    bottom: 7px;
    padding: 3px 5px;
    font-size: 7px;
  }

  .telegram-paper {
    gap: 4px;
  }

  .telegram-paper i,
  .telegram-paper small {
    font-size: 5px;
  }

  .telegram-paper b {
    font-size: 10px;
  }

  .case-strip {
    height: 82px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 44px auto;
    gap: 3px 12px;
    padding: 5px 14px calc(6px + env(safe-area-inset-bottom));
  }

  .case-strip > div:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .case-stats {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    gap: 5px;
    font-size: 6.5px;
    letter-spacing: .08em;
    white-space: nowrap;
  }

  .case-strip button {
    grid-column: 2;
    grid-row: 1;
    display: block;
    min-height: 44px;
    font-size: 7px;
    white-space: nowrap;
  }

  .evidence-sheet {
    inset: 0;
    border: 0;
    border-radius: 0;
  }

  .sheet-topline {
    padding: max(13px, env(safe-area-inset-top)) 14px 13px;
  }

  .sheet-grid {
    gap: 28px;
    padding: 24px 16px calc(30px + env(safe-area-inset-bottom));
  }

  .evidence-story h2 {
    font-size: clamp(37px, 12vw, 58px);
  }

  .evidence-deck {
    margin: 18px 0 24px;
    font-size: 15px;
  }

  .evidence-visual {
    min-height: 300px;
    margin-bottom: 22px;
    border-width: 5px;
  }

  .evidence-visual img {
    height: min(59vh, 500px);
  }

  .evidence-visual figcaption {
    font-size: 7px;
    align-items: flex-end;
  }

  .image-provenance {
    max-width: 48%;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }

  .signal-block {
    padding: 21px 19px;
  }

  .signal-block p {
    font-size: 20px;
  }

  .story-copy {
    font-size: 15px;
  }

  .story-pagination {
    grid-template-columns: 1fr 1fr;
  }

  .story-pagination span {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .story-pagination button:last-child {
    justify-self: stretch;
  }

  .analysis-card {
    padding: 22px;
  }

  .source-link {
    align-items: flex-start;
    flex-direction: column;
  }

  .source-link small {
    text-align: left;
  }

  .transform-drawer,
  .archive-drawer {
    width: 100%;
    padding: max(22px, env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
  }

  .mode-card {
    min-height: 112px;
    padding: 14px;
  }

  .archive-item {
    grid-template-columns: 76px 1fr;
    min-height: 98px;
  }

  .archive-item img {
    width: 76px;
    height: 76px;
  }

  .method-formula {
    align-items: stretch;
    flex-direction: column;
  }

  .method-formula i {
    text-align: center;
  }
}

@media (max-width: 720px) and (max-height: 740px) {
  .desk-intro {
    top: 17%;
  }

  .desk-intro h1 {
    font-size: clamp(35px, 10.5vw, 46px);
  }

  .desk-intro > p:not(.kicker) {
    margin: 11px auto 13px;
    font-size: 12px;
  }

  .photo-object {
    top: 350px;
    width: 62px;
    height: 76px;
  }

  .telegram-object {
    top: 365px;
    width: 92px;
    height: 54px;
  }

  .investigation-object {
    top: 430px;
    width: 162px;
    height: 82px;
  }

  .casebook-cover {
    padding: 10px 14px;
  }

  .casebook-cover i,
  .casebook-cover small {
    display: none;
  }

  .casebook-cover b {
    font-size: 16px;
  }

  .dossier-object,
  .newspaper-object {
    top: 518px;
    width: 96px;
    height: 66px;
  }

  .case-strip {
    height: 72px;
  }
}

@media (max-height: 690px) and (min-width: 721px) {
  .desk-intro {
    top: 18%;
  }

  .desk-intro h1 {
    font-size: 48px;
  }

  .newspaper-object,
  .dossier-object {
    bottom: 12vh;
    transform: rotateX(58deg) scale(.82);
  }

  .photo-object,
  .telegram-object {
    bottom: 6vh;
    transform: rotateX(58deg) scale(.76);
  }
}

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

  .office-background,
  .desk-stage {
    transform: none !important;
  }
}
