/* Layout and rendering states shared by the street and evidence inspection. */
[hidden] { display: none !important; }
* { letter-spacing: 0 !important; }
svg.lucide { width: 19px; height: 19px; flex-shrink: 0; }
button:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #ba824a; outline-offset: 5px; }
canvas:focus-visible { outline: 2px solid #c8ac6b; outline-offset: -4px; }
.cover-stage { min-height: 100svh; padding: 100px 20px 48px; display: flex; flex-direction: column; gap: 30px; background: #b7b2b3 url('assets/cover-linen.png') repeat; }
.cover-stage::before { display: none; }
.cover-stage::after { inset: 20px; border-color: #4d454421; }
.cover-top { top: 43px; color: #50494b; }
.closed-book { margin: auto 0 0; filter: drop-shadow(28px 36px 20px #40394160); }
.book-cover { width: min(350px, 76vw); max-height: 64svh; display: block; transform-origin: left center; transition: transform .65s ease-in, opacity .65s; }
.cover-title { font-size: 46px; line-height: 1.18; top: 24%; }
.cover-title em { font-size: 51px; }
.cover-emblem { bottom: 23%; }
.cover-stamp { right: 8%; top: 61%; width: 45px; height: 45px; }
.open-command { position: relative; bottom: auto; display: inline-flex; align-items: center; gap: 18px; font-size: 14px; padding: 12px 2px; color: #302f31; border-bottom: 1px solid #55505960; z-index: 1; }
.open-command::after { display: none; }
.cover-bottom { position: relative; bottom: auto; margin: 0 0 auto; color: #5c545a; opacity: 1; font-size: 12px; }
.is-opening .book-cover { transform: rotateY(-108deg); opacity: .2; }
.is-opening .closed-book { transform: translateX(40px) rotateY(0deg); }
.is-opening .open-command { opacity: 0; }
.reader.is-open { animation: none; }
.city-stage { height: 100svh; min-height: 580px; background: #839a9d; }
.city-stage canvas { touch-action: none; }
.city-vignette { display: none; }
.city-skyline-label { top: 35px; left: 4%; text-shadow: 0 1px 5px #102d2960; max-width: calc(100% - 185px); pointer-events: none; }
.city-skyline-label span { color: #f7ead0; font-size: 11px; }
.city-skyline-label h1 { font-size: 34px; line-height: 1.25; margin: 4px 0; font-weight: 500; color: #fff2d6; }
.city-skyline-label small { font-size: 12px; color: #eef0dc; }
.city-controls { top: 35px; left: auto; right: 4%; gap: 6px; }
.city-controls .icon-button { background: #29443ee6; color: #f0e4ca; width: 40px; height: 40px; border: 1px solid #a4b4a55e; border-radius: 3px; }
.city-controls .icon-button:hover { background: #49645b; }
.detective-dialogue { left: max(28px, calc((100% - 1080px) / 2)); right: max(28px, calc((100% - 1080px) / 2)); bottom: 28px; padding: 22px 26px; grid-template-columns: 76px minmax(0, 1fr) 170px; gap: 24px; background: #1b3531f5; border: 1px solid #bfa26a; border-radius: 4px; box-shadow: 0 7px 24px #182c2b40; }
.dialogue-portrait { height: 86px; width: 70px; border-radius: 40px 40px 4px 4px; background: #6c806e; }
.portrait-hat { width: 56px; height: 36px; top: 3px; left: 8px; clip-path: polygon(5% 72%, 28% 70%, 58% 0, 79% 72%, 100% 95%, 0 100%); border-radius: 0; background: #1a292b; z-index: 3; }
.portrait-hat::after { display: none; }
.portrait-face { top: 26px; left: 20px; background: #d9b9a1; width: 30px; z-index: 1; }
.portrait-coat { bottom: -4px; left: 8px; width: 61px; background: #6d4150; height: 36px; z-index: 2; }
.dialogue-kicker { font-size: 14px; }
.dialogue-kicker span { color: #a9b4a2; margin-left: 12px; font-size: 10px; }
.dialogue-copy p { font-size: 17px; line-height: 1.75; margin: 9px 0 8px; min-height: 60px; }
.dialogue-next { display: inline-flex; align-items: center; gap: 4px; padding: 0; color: #c7b48e; font-size: 12px; }
.dialogue-next svg { width: 14px; height: 14px; }
.enter-case { font-size: 13px; padding: 14px 0 14px 22px; }
.scene-load { position: absolute; top: 47%; width: 100%; text-align: center; font-size: 16px; color: #fff2d9; pointer-events: none; }
.scene-failure { position: absolute; top: 30%; left: 50%; transform: translateX(-50%); background: #263f39; padding: 22px; width: min(360px, 88%); z-index: 4; }
.scene-failure .text-button { color: #efcd96; margin-right: 25px; }
.header-start { display: flex; gap: 6px; }
.investigation-panel { position: relative; }
.reader-footer { position: static; padding: 30px 0 0; margin-top: 40px; }
.reader-inner { padding-bottom: 30px; }
.reader-header { height: 60px; background: #e5dfd4; }
.case-heading { padding: 24px 0 20px; align-items: center; gap: 20px; }
.case-heading h1 { font-size: 32px; line-height: 1.3; margin: 0; }
.case-progress { display: flex; align-items: center; gap: 12px; position: relative; border: 0; padding: 0 0 9px; min-width: 132px; }
.case-progress>span { font-size: 11px; }
.case-progress strong { font-size: 25px; margin: 0; }
.case-progress .progress-total { font-size: 13px; }
.progress-track { position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; }
.case-nav { margin-bottom: 18px; }
.case-tab { font-size: 13px; }
.archive-guidance { margin-bottom: 14px; }
.case-heading h1 .handwritten { position: static; font-size: 19px; margin-top: 14px; }
.records-main h2 { font-size: 43px; line-height: 1.25; }
.deduction-intro h2 { font-size: 48px; line-height: 1.18; }
.evidence-board { height: auto; margin-top: 0; background: #71837a; padding: 48px 32px 44px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 34px; overflow: visible; }
.evidence-board::before { background: repeating-linear-gradient(0deg,#263d2c12 0 1px,transparent 1px 4px); opacity: .3; }
.evidence-board::after { border-color: #e1d9b740; }
.case-letter, .evidence { position: relative; left: auto; top: auto; width: 100%; height: auto; min-height: 250px; padding: 27px 22px 40px; transform: rotate(var(--tilt, 0deg)); transform-origin: center; }
.case-letter { --tilt: -2deg; min-height: 300px; clip-path: none; }
.case-letter h2 { font-size: 23px; margin: 6px 0 17px; }
.case-letter p:not(.micro) { font-size: 13px; }
.letter-signature { font-size: 11px; }
.evidence { --tilt: 1.5deg; transition: transform .28s, box-shadow .28s; }
.evidence:hover,.evidence:focus-visible { transform: rotate(0deg) translateY(-6px); }
.evidence-newspaper { min-height: 300px; --tilt: 2deg; }
.news-headline { font-size: 20px; line-height: 1.4; }
.news-columns { font-size: 11px; max-width: none; margin-bottom: 15px; }
.news-circled { position: static; font-size: 15px; }
.evidence-photo { --tilt: -2.5deg; min-height: 300px; align-self: start; }
.theatre-photo { width: 100%; height: auto; aspect-ratio: 600/410; margin: 6px 0 12px; }
.photo-caption { font-size: 18px; }
.evidence-note { --tilt: -2deg; min-height: 285px; }
.note-salutation { margin-top: 0; }
.note-script { font-size: 22px; margin: 13px 0; }
.note-sign { font-size: 17px; }
.evidence-fragment { --tilt: 2deg; min-height: 285px; align-self: start; }
.fragment-title { margin-top: 20px; }
.fragment-text { font-size: 14px; margin-top: 20px; }
.fragment-annotation { position: static; display: block; margin-top: 18px; text-align: right; font-size: 17px; }
.evidence-key { --tilt: -1deg; min-height: 255px; align-self: center; }
.key-art { margin-top: 25px; width: 100%; height: 100px; }
.key-description { font-size: 11px; }
.key-note { position: static; display: block; text-align: center; margin-top: 20px; font-size: 17px; }
.evidence-seal { min-height: 205px; --tilt: -3deg; grid-column: 2; }
.seal-envelope { width: 130px; height: 83px; }
.envelope-flap { border-left-width: 65px; border-right-width: 65px; border-top-width: 45px; }
.wax-seal { left: 45px; top: 32px; width: 47px; height: 47px; }
.board-annotation { position: static; align-self: center; text-align: center; font-size: 23px; }
.examined-mark { display: none; }
.evidence.is-examined .examined-mark { display: block; }
.evidence.is-examined::after { display: none; }
.evidence-dialog { width: min(940px,calc(100vw - 32px)); max-height: calc(100svh - 32px); overflow: auto; grid-template-columns: minmax(280px, .95fr) minmax(0,1.15fr); }
.detail-art { min-height: 490px; background: #415750; position: relative; }
.detail-art::before,.detail-art::after { display: none !important; }
#evidenceCanvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#evidenceCanvas:active { cursor: grabbing; }
.detail-content { padding: 42px 30px 25px; }
.detail-content h2 { font-size: 31px; line-height: 1.2; }
.detail-body { font-size: 15px; line-height: 1.9; }
.dialog-close { color: #4a594e; background: #e6d7bb; border-radius: 50%; }
.ending h2 { font-size: 40px; line-height: 1.3; }
.clue-preview { font-size: 12px; line-height: 1.8; }
.clue-preview span { display: none; }
@media (max-width: 1000px) {
  .evidence-board { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 25px; }
  .evidence-seal { grid-column: auto; }
  .detective-dialogue { left: 22px; right: 22px; grid-template-columns: 60px 1fr 150px; gap: 18px; padding: 20px; }
  .dialogue-portrait { transform: scale(.85); transform-origin: center; }
  .dialogue-copy p { font-size: 16px; }
}
@media (max-width: 700px) {
  .city-stage { height: 100svh; min-height: 620px; }
  .city-skyline-label { left: 20px; top: 23px; max-width: calc(100% - 130px); }
  .city-skyline-label h1 { font-size: 24px; }
  .city-skyline-label span { font-size: 9px; }
  .city-skyline-label small { font-size: 10px; }
  .city-controls { top: 23px; right: 16px; gap: 3px; }
  .city-controls .icon-button { width: 31px; height: 34px; }
  .city-controls>button { display: grid; }
  .detective-dialogue { grid-template-columns: 45px 1fr; left: 14px; right: 14px; bottom: 14px; padding: 14px; gap: 10px 14px; }
  .dialogue-portrait { transform: scale(.67); transform-origin: center left; width: 70px; align-self: center; }
  .dialogue-kicker { font-size: 12px; }
  .dialogue-kicker span { font-size: 9px; margin-left: 6px; }
  .dialogue-copy p { font-size: 14px; line-height: 1.65; min-height: 72px; }
  .dialogue-next { font-size: 11px; }
  .enter-case { grid-column: 1/-1; padding: 11px 0 0; font-size: 13px; border-left: 0; border-top: 1px solid #bca66c50; justify-content: flex-end; }
  .reader-header { padding: 0 12px; }
  .brand { font-size: 14px; }
  .header-start { gap: 0; }
  .header-end { gap: 2px; }
  .case-status { font-size: 9px; }
  .case-heading { padding: 20px 0 18px; flex-direction: row; align-items: center; }
  .case-heading h1 { font-size: 25px; }
  .case-progress { margin-top: 0; min-width: 105px; gap: 8px; }
  .case-progress strong { font-size: 21px; }
  .case-nav { justify-content: space-between; gap: 12px; }
  .case-tab { font-size: 12px; padding-bottom: 12px; gap: 5px; }
  .case-tab span { display: none; }
  .case-tab svg { width: 16px; height: 16px; }
  .evidence-board { padding: 40px 24px; grid-template-columns: 1fr; gap: 32px; }
  .evidence,.case-letter { max-width: 390px; justify-self: center; transform: rotate(var(--tilt)); min-height: 240px; }
  .case-letter { min-height: 290px; }
  .evidence-note { min-height: 320px; }
  .evidence-newspaper { min-height: 315px; }
  .evidence-seal { grid-column: auto; }
  .board-annotation { display: none; }
  .evidence-dialog[open] { grid-template-columns: 1fr; }
  .detail-art { min-height: 240px; height: 240px; }
  .detail-content { padding: 28px 22px; }
  .detail-body { font-size: 14px; }
  .detail-content h2 { font-size: 28px; }
  .case-result { margin-left: 0; }
  .deduction-intro h2 { font-size: 38px; }
  .deduction-form { max-width: 100%; }
  .ending h2 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
