.overhaul {
  --paper:#e8d7ad;
  --ink:#35271b;
  --brass:#9b7237;
  position:relative;
  min-height:100%;
  color:var(--ink);
  font-synthesis:none;
  padding:12px;
}
.puzzle-content:has(.overhaul) { place-items:stretch; overflow:auto; scrollbar-color:#8a6436 #c1ae82; }
.puzzle-content:has(.overhaul) .overhaul { width:100%; }
.overhaul::before { content:""; position:absolute; inset:0; opacity:.10; pointer-events:none; background-image:var(--puzzle-scene); background-size:cover; background-position:center; mix-blend-mode:multiply; }
.overhaul > * { position:relative; z-index:1; }
.overhaul-goal { max-width:80%; margin:0 0 5px; padding:8px 16px; color:#39291d; background:url("../../assets/ui-v2/objective-note.png") center/100% 100% no-repeat; font-size:clamp(15px,1.2vw,19px); font-weight:500; }
.overhaul-status { min-height:1.5em; margin:6px 0 12px; padding-left:12px; border-left:3px solid #9a392d; }
.puzzle-hint-panel { position:sticky!important; top:4px; z-index:30!important; width:min(520px,72%); margin:0 0 8px; padding:9px 14px; color:#2f2117; border:2px solid #a63c2d; background:#f0dfb8; box-shadow:0 5px 18px #27150b66,inset 0 0 0 2px #fff2c4; pointer-events:none; }
.puzzle-hint-panel strong { display:block; margin-bottom:3px; color:#8b2d23; font-size:15px; }
.puzzle-hint-panel p { margin:0; font-size:15px; line-height:1.4; }
.puzzle-hint-focus { position:relative!important; z-index:22!important; overflow:visible!important; outline:4px solid #ffe49a!important; outline-offset:3px!important; box-shadow:0 0 0 7px #8d2f22,0 0 28px #ffd56f!important; animation:puzzle-hint-pulse 780ms ease-in-out infinite alternate; }
.puzzle-hint-action { position:absolute!important; z-index:24; left:50%; top:-42px; width:max-content; max-width:210px; padding:6px 10px; color:#2a1a0f; border:1px solid #fff1b6; border-radius:3px; background:#f1c663; box-shadow:0 4px 12px #0008; font-size:14px; line-height:1.2; transform:translateX(-50%); pointer-events:none; }
.puzzle-hint-action::after { content:""; position:absolute; left:50%; bottom:-10px; border:5px solid transparent; border-top-color:#f1c663; transform:translateX(-50%); }
@keyframes puzzle-hint-pulse { from { filter:brightness(1); } to { filter:brightness(1.22); } }
.overhaul-button,.ledger-control { min-height:44px; min-width:44px; border:1px solid #6f512f; color:#322218; background:#d8c59a; padding:8px 12px; cursor:pointer; font:inherit; transition:transform 200ms ease-out,filter 200ms ease-out,box-shadow 200ms ease-out; }
.overhaul-button:hover,.ledger-control:hover { filter:brightness(1.08); transform:translateY(-2px); }
.overhaul-button:focus-visible,.ledger-control:focus-visible,.overhaul-button.is-active,.overhaul-button.is-selected { outline:3px solid #7d281f; outline-offset:2px; box-shadow:0 0 0 5px #f0d99d; }
.overhaul-button:active,.ledger-control:active { transform:translateY(1px) scale(.985); }
.overhaul-button:disabled,.ledger-control:disabled { opacity:.46; filter:grayscale(.8); cursor:not-allowed; }
.overhaul-button.primary { background:#8b2b22; color:#f4e4bd; font-weight:500; }
.puzzle-completion-media { position:fixed; z-index:240; display:grid; place-items:center; overflow:hidden; background:#090704f2; }
.puzzle-completion-media video,.puzzle-completion-media > img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#090704; }
.puzzle-completion-media > img { z-index:1; }
.puzzle-completion-media video { z-index:2; }
.puzzle-completion-media.is-video-error video,.puzzle-completion-media.is-video-ended video { display:none; }
.skip-puzzle-completion-video { position:absolute; z-index:4; right:18px; bottom:16px; min-width:210px; min-height:48px; color:#f6e4b7; border:1px solid #d1a74e; background:#17110ddd; }
.keyboard-guide,.incomplete-reason { padding:8px 10px; border-left:3px solid var(--brass); background:#d4c092; font-size:14px; }

/* 真实画框仓储：比例、铆钉、湿画反光与裂框都落在物件上。 */
.storage-board { display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)); gap:10px; min-height:290px; padding:10px; background:url("assets/images/frame-storage-workroom.png") center/cover; border:1px solid #6f4d2b; }
.storage-zone { display:flex; flex-direction:column; min-width:0; border-left:9px solid #4d321f; border-right:9px solid #4d321f; background:#1d1914d9; padding:8px; box-shadow:inset 0 0 0 2px #9c7138; }
.storage-zone h3 { margin:0 0 6px; color:#e5c983; font-weight:500; }
.storage-zone-rule { display:block; margin-top:3px; color:#d8c59a; font-size:12px; line-height:1.25; font-weight:400; }
.storage-stack { flex:1; display:flex; flex-direction:column-reverse; justify-content:flex-start; align-items:center; gap:0; }
.storage-piece { position:relative; width:min(100%,calc(58% + var(--piece-aspect)*12%)); aspect-ratio:var(--piece-aspect); min-height:44px; margin-top:-12px; color:transparent; touch-action:none; user-select:none; background-color:#5b3c24; background-position:center; background-size:cover; border:7px ridge #7e5b32; box-shadow:0 8px 12px #0008; }
.storage-piece::before,.frame-rivet::before { content:""; position:absolute; left:4px; top:4px; width:7px; height:7px; border-radius:50%; background:#bc9149; box-shadow:calc(100% + 8px) 0 #bc9149; }
.storage-piece::after { content:""; display:block; width:calc(18px + attr(data-size type(<number>)) * 8px); height:5px; margin-top:5px; background:#d5b975; box-shadow:0 3px #3c2818; }
.storage-piece.is-wet { overflow:hidden; }
.storage-piece.is-wet::after,.wet-reflection { background:linear-gradient(105deg,transparent 20%,#fff7cc66 45%,transparent 68%); }
.storage-piece.is-fragile,.cracked-frame { border-style:double; clip-path:polygon(0 0,46% 0,49% 7%,53% 0,100% 0,100% 100%,0 100%); }
.storage-piece.is-heavy { border-width:11px; }
.storage-piece-spec { position:absolute; left:4px; right:4px; bottom:3px; padding:2px 4px; color:#fff0c5; background:#21170dcc; font-size:11px; line-height:1.2; text-align:center; text-shadow:0 1px 2px #000; }
.storage-dropzone { width:100%; margin-top:8px; border:2px dashed #b8995c; color:#f0dca2; background:#2d251bd9; }
.storage-dropzone:hover,.storage-dropzone:focus-visible,.storage-zone.is-drag-over .storage-dropzone { border-color:#ffe19a; background:#4b3d29; box-shadow:inset 0 0 0 2px #ffe19a45; }
.storage-zone.is-rejecting { outline:4px solid #a52a22; animation:storage-zone-reject 480ms ease-out; }
.storage-piece.is-returning { animation:storage-piece-return 480ms ease-out; }
.storage-drag-ghost { position:fixed; z-index:9999; width:150px; height:96px; transform:translate(-50%,-50%) rotate(-2deg); pointer-events:none; opacity:.78; color:transparent; background-position:center; background-size:cover; border:8px ridge #9a713c; box-shadow:0 18px 28px #000a; }
.storage-guide-row { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:4px 0 8px; }
.storage-drag-guide { flex:1; min-height:48px; display:flex; align-items:center; gap:12px; padding:6px 12px; color:#3a291c; background:#e6d5aa; border-left:4px solid #8b3026; }
.storage-drag-guide p { margin:0; }
.storage-guide-frame { position:relative; width:56px; height:34px; flex:0 0 56px; border:5px ridge #78522d; background:#5f4b34; animation:storage-guide-drag 1.6s ease-in-out infinite; }
.storage-guide-frame::after { content:""; position:absolute; right:-12px; bottom:-9px; width:18px; height:18px; border:2px solid #f4d78d; border-radius:50%; background:#6b4c2f; box-shadow:0 2px 5px #0008; }
@keyframes storage-guide-drag { 0%,25% { transform:translateX(0); } 70%,100% { transform:translateX(32px); } }
@keyframes storage-zone-reject { 35% { transform:translateX(5px); } 65% { transform:translateX(-4px); } }
@keyframes storage-piece-return { 35% { transform:translateX(8px) rotate(1deg); } 100% { transform:translateX(0); } }

.evidence-board { display:none; }

/* 旧靴：玻璃镜片、纸签与证据线。 */
.boots-inspection { position:relative; width:min(320px,100%,40vh); min-height:0; aspect-ratio:1; margin:auto; overflow:hidden; border:12px ridge #6f4b29; background:#221a13; }
.boots-subject-image { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:fill; pointer-events:none; }
.trace-point { position:absolute; width:100px; max-width:24%; transform:translate(-50%,-50%); background:transparent; border-color:transparent; color:transparent; }
.trace-point:focus-visible { color:var(--paper); border-color:var(--brass); background:#3b2a1de8; }
.trace-point.is-observed { color:#3a281a; background:#e4c36d; border-color:#fff1b5; }
.magnifier,.lens-glass { position:absolute; left:50%; top:50%; width:96px; height:96px; transform:translate(-50%,-50%); border:7px double #b58a43; border-radius:50%; pointer-events:none; display:grid; place-items:center; color:#6b4b28; font-size:28px; background:#fff7d733; box-shadow:inset 0 0 16px #f8edc76b,12px 18px 0 -8px #5b3a23; backdrop-filter:contrast(1.25) brightness(1.15); }
.evidence-cards { display:grid; gap:8px; margin:10px 0; }
.evidence-checklist { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; margin:0 0 8px; padding:0; list-style:none; }
.evidence-checklist li { position:relative; padding:12px; background:url("../../assets/ui-v2/hint-note.png") center/100% 100% no-repeat; }
.evidence-checklist .is-found { color:#6b2119; }
.evidence-row { position:relative; display:grid; grid-template-columns:130px repeat(4,1fr); gap:6px; align-items:center; }
.evidence-row::after,.evidence-thread { content:""; position:absolute; left:95px; right:0; top:50%; z-index:-1; border-top:2px solid #9c382b; }
.evidence-row .overhaul-button { color:#362519; border:0; background:url("../../assets/ui-v2/hint-note.png") center/100% 100% no-repeat; filter:drop-shadow(0 4px 4px #3b281845); }
.evidence-links { position:absolute; left:6%; right:6%; bottom:70px; width:88%; height:38%; pointer-events:none; }.evidence-links line { stroke:#9d3228; stroke-width:.6; fill:none; }

/* 画廊推理：画卡、侧检查抽屉、馆藏章。 */
.commission { position:relative; padding:10px 18px; background:#e8d7ad; color:#332519; border-left:4px solid #8d3025; font-weight:500; }
.commission-workflow { display:flex; flex-wrap:wrap; gap:6px 20px; margin:6px 0 0; padding:7px 12px 7px 34px; color:#4b3321; background:#f0dfb5; border-left:4px solid #9a392d; font-size:15px; }
.commission-workflow li { padding-right:8px; }
.steady-board { position:relative; display:grid; grid-template-columns:minmax(160px,250px) minmax(280px,1fr); grid-template-rows:auto auto 54px 16px 58px 26px; align-items:center; gap:6px 20px; width:min(900px,96%); height:100%; min-height:0; margin:auto; padding:10px 16px; color:#f3e3bd; border:10px ridge #6f4b29; background:linear-gradient(#15100bb8,#15100bd9),url("assets/images/backgrounds/chapter-3.png") center/cover no-repeat; box-shadow:inset 0 0 0 2px #c3954e,0 16px 34px #0008; }
.steady-instructions { grid-column:1/-1; grid-row:1; margin:0; padding:6px 12px; color:#3b291b; background:#ead8ac; border-left:4px solid #9a392d; font-size:15px; line-height:1.35; }
.carving-stage { grid-column:1; grid-row:2/7; display:grid; place-items:center; align-self:stretch; min-height:0; border:1px solid #9f743b; background:radial-gradient(circle at 50% 35%,#c5904744,transparent 42%),#17100bcc; }
.carving-figure { position:relative; display:grid; place-items:end center; width:132px; height:210px; padding-bottom:16px; color:#f1d496; filter:drop-shadow(0 12px 9px #000c); transform-origin:50% 100%; }
.carving-figure img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.carving-figure::before { display:none; }
.carving-figure span { position:relative; z-index:2; padding:4px 8px; background:#261207c9; font-size:15px; }
.steady-track { position:relative; grid-column:2; grid-row:3; height:54px; border:3px solid #4c3119; border-radius:8px; background:linear-gradient(90deg,#7d2d25 0 30%,#d5ad45 30% 70%,#7d2d25 70%); box-shadow:inset 0 0 0 3px #e7cf92,0 7px 16px #0007; }
.steady-safe { position:absolute; left:30%; top:0; width:40%; height:100%; display:grid; place-items:center; color:#2b1b0e; background:#e2bd5caa; }
.steady-safe b { font-size:15px; }
.track-danger { position:absolute; top:17px; color:#ffe9bd; font-size:13px; }.track-left { left:8%; }.track-right { right:8%; }
.steady-marker { position:absolute; z-index:4; top:-34px; width:34px; height:86px; display:grid; place-items:start center; padding-top:3px; color:#fff8cf; border:3px solid #fff0ae; border-radius:17px 17px 5px 5px; background:#a43127; transform:translateX(-50%); box-shadow:0 0 16px #000b; font-size:20px; }
.steady-marker[data-safe="true"] { background:#2f7a4d; box-shadow:0 0 0 4px #ffe89a,0 0 20px #f3c759; }
.steady-button { grid-column:2; grid-row:5; min-height:58px; font-size:18px; }
.steady-feedback { grid-column:2; grid-row:6; min-height:26px; margin:0; text-align:center; font-size:15px; }
.steady-hold-progress { grid-column:2; grid-row:4; height:16px; overflow:hidden; border:2px solid #65451f; background:#160d08; }.steady-hold-progress i { display:block; width:0; height:100%; background:linear-gradient(90deg,#ae392b,#f0c65d); transition:width 60ms linear; }
.steady-safe.is-hinted,.steady-button.is-hinted-strong { outline:4px solid #fff0a0; outline-offset:4px; box-shadow:0 0 24px #ffd45f; }
.legacy-puzzle-hint { grid-column:2; grid-row:2; margin:0; padding:6px 10px; color:#3a281a; border:2px solid #9a392d; background:#f0dfb5; font-size:14px; }
@media(max-width:900px){.steady-board{grid-template-columns:150px 1fr;padding:6px 10px;gap:4px 10px}.carving-figure{width:100px;height:150px}.steady-instructions{font-size:14px}.legacy-puzzle-hint{font-size:13px}}
.deduction-grid { display:grid; grid-template-columns:repeat(3,minmax(250px,1fr)); gap:10px; margin-top:10px; }
.deduction-card { position:relative; padding:10px; background:#d5c192; border:10px ridge #72502c; box-shadow:0 10px 16px #36271b55; }
.deduction-card::after,.collection-stamp { content:"藏"; position:absolute; right:8px; bottom:8px; display:grid; place-items:center; width:44px; height:44px; border:3px double #7b2119; border-radius:50%; color:#7b2119; opacity:0; transform:rotate(-8deg); }
.deduction-card.mark-excluded { opacity:.68; }.deduction-card.mark-excluded::after,.deduction-card.mark-candidate::after { opacity:1; }
.deduction-card.mark-candidate { border-color:#ae7e36; }
.gallery-thumb { min-height:150px; padding:8px; display:grid; place-items:end stretch; background-size:cover; background-position:center; text-align:center; }
.gallery-facts { padding:9px; color:#2e2218; background:#eee0ba; }
.inspection-drawer { margin-top:7px; padding:9px; color:#2e2218; background:#eee0ba; border-left:5px solid #8a3026; box-shadow:inset 10px 0 16px #6f4c2730; }
.inspect-actions,.mark-actions { display:flex; flex-wrap:wrap; gap:4px; margin-top:6px; }.inspect-actions .overhaul-button,.mark-actions .overhaul-button { min-height:44px; padding:5px 7px; font-size:14px; }
.mark-actions .stamp-action { width:54px; height:54px; flex:0 0 54px; overflow:hidden; color:#6e2019; border:3px double #7b2119; border-radius:50%; background:#e9d5a6; transform:rotate(-5deg); }
.mark-actions .reason-slip { flex:1 1 74px; border:0; background:url("../../assets/ui-v2/hint-note.png") center/100% 100% no-repeat; }
.deduction-status,.mark-locked { min-height:44px; padding:7px; margin:6px 0 0; background:#b9a47655; }
.gallery-submit { position:relative; width:100%; margin:14px 0 18px; }.conflict { border-left:4px solid #a0362b; padding:8px; }

/* 双面拼画：真实纤维边、厚度和拾起阴影。 */
.jigsaw-controls { position:sticky; top:0; z-index:35; display:flex; align-items:center; gap:10px; margin-bottom:8px; padding:6px 8px; border:2px solid #80603a; background:#ead8acfa; box-shadow:0 5px 14px #2b190d66; }
.jigsaw-controls .rotate-piece { margin-left:auto; color:#f7e6bd; background:#8d3025; font-weight:700; }
.jigsaw-layout { display:grid; grid-template-columns:minmax(180px,.65fr) minmax(360px,1.35fr); gap:12px; }
.jigsaw-tray { display:grid; grid-template-columns:repeat(4,1fr); gap:7px; align-content:start; padding:8px; background:#8b7956; }
.jigsaw-piece { position:relative; aspect-ratio:1; min-height:52px; padding:2px; transform:rotate(var(--rotation)); background-size:400% 300%; color:#f7e7b8; text-shadow:0 1px 3px #000; border:0; clip-path:polygon(2% 4%,24% 1%,48% 5%,72% 1%,98% 5%,95% 28%,99% 51%,95% 76%,98% 96%,76% 99%,50% 96%,25% 100%,2% 96%,5% 73%,1% 51%,5% 26%); box-shadow:0 9px 0 #5f4c34,0 14px 18px #2e2117a3; }
.jigsaw-piece::after,.fiber-edge { content:""; position:absolute; inset:0; pointer-events:none; border:3px dotted #dac69a80; clip-path:inherit; }
.jigsaw-piece:hover,.jigsaw-piece:focus-visible { transform:rotate(var(--rotation)) translateY(-7px); filter:brightness(1.12); }
.jigsaw-piece.is-selected { z-index:20; outline:5px solid #ffe08a; outline-offset:3px; box-shadow:0 0 0 8px #8d2f25,0 0 30px #ffc94f; filter:brightness(1.28) saturate(1.2); transform:rotate(var(--rotation)) translateY(-5px) scale(1.08); }
.jigsaw-piece.is-selected::before { content:"已选中"; position:absolute; z-index:4; right:-7px; top:-24px; padding:3px 7px; color:#2b190e; border:1px solid #fff1b6; background:#f1c663; font-size:13px; white-space:nowrap; }
.jigsaw-piece.is-decoy { background:#79674e url("assets/images/canvas-back.png") center/cover; filter:sepia(.65) contrast(.8); }
.jigsaw-piece.is-placed { opacity:.18; }
.piece-thickness { box-shadow:0 9px 0 #5f4c34; }
.jigsaw-grid { display:grid; grid-template-columns:repeat(4,1fr); aspect-ratio:4/3; border:9px solid #76522d; background:#66563f; }
.jigsaw-slot { position:relative; min-height:70px; border:1px dashed #ead7a376; background:#4b4031; }
.jigsaw-slot.is-filled { background-image:var(--jigsaw-front); background-size:400% 300%; background-position:var(--piece-x) var(--piece-y); }
.jigsaw-preview { position:absolute; inset:0; z-index:4; pointer-events:none; opacity:.68; background-size:cover; background-position:center; animation:preview-pulse 800ms ease-in-out infinite alternate; }
.jigsaw-preview.face-front { background-image:var(--jigsaw-front); }.jigsaw-preview.face-back { background-image:var(--jigsaw-back); }
@keyframes preview-pulse { from { opacity:.58; } to { opacity:.78; } }
.label-reasoning { display:grid; gap:6px; padding:12px; border:7px solid #76522d; background:linear-gradient(#ead9b0d9,#bba779d9),var(--jigsaw-back) center/cover; }
.label-zones { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; }.label-zone { min-height:52px; padding:8px; border:2px dashed #7e592f; background:#e5d2a6; }
.label-card { display:grid; grid-template-columns:minmax(150px,1.2fr) repeat(4,1fr); gap:5px; align-items:center; padding:5px; background:#c6b081; }.label-card strong { padding:7px; color:#52291d; }.label-card .overhaul-button { margin:0; padding:5px; font-size:14px; }
.submit-labels { width:100%; margin-top:8px; }

/* 路线：异质纸材、旧地图、图钉、红铅笔实虚线。 */
.route-board { max-width:860px; margin:auto; padding:24px; color:#35271b; border:7px solid #76522d; background:#d9c79d; }
.route-stage-brief { margin:6px 0 10px; padding:8px 12px; border-left:4px solid #8e3026; background:#efe0b8; line-height:1.4; }
.route-evidence-chain { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:10px 0; padding:0; list-style:none; counter-reset:route-step; }
.route-evidence-chain li { padding:8px; text-align:center; border:1px solid #7a5830; background:#e8d6aa; }.route-evidence-chain li::before { counter-increment:route-step; content:counter(route-step) "  "; color:#8e3026; font-weight:700; }.route-evidence-chain li.is-linked { color:#f7e8bf; background:#6d4726; }
.route-casefile { display:grid; grid-template-columns:210px 1fr; gap:12px; margin-top:10px; padding:10px; border:2px solid #8e3026; background:#f0dfb8; box-shadow:0 7px 15px #3f28184a; }
.route-casefile img { display:block; width:210px; height:132px; object-fit:cover; border:7px ridge #72502c; }
.route-casefile-copy h4 { margin:0 0 5px; color:#7d2d24; font-size:19px; }.route-casefile-copy p { margin:3px 0; line-height:1.35; }
.route-card-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; }
.route-card,.route-paper { min-height:150px; display:flex; flex-direction:column; justify-content:space-between; padding:8px; border:1px solid #6f572d; background:#e9dbb7; }
.route-card:nth-child(2n) { background:#d7c39a; transform:rotate(.5deg); }.route-card:nth-child(3n) { background:#efe0bd; transform:rotate(-.4deg); }
.route-card.is-timeline { box-shadow:inset 0 0 0 4px #a77d32; }.route-card.is-excluded { opacity:.62; text-decoration:line-through; }
.route-map { position:relative; min-height:270px; overflow:hidden; border:2px solid #80612d; background:#d7c18f url("assets/gameplay/route-memory/images/desk.png") center/cover no-repeat; box-shadow:inset 0 0 35px #61451e52; }
.route-lines { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }.route-lines line { stroke:#8d2f26; stroke-width:2.4; }
.route-lines line,.pencil-line-inferred { stroke-dasharray:5 3; }.pencil-line-confirmed { stroke-dasharray:none; }
.route-node,.map-pin { position:absolute; width:48px; height:48px; min-width:48px; min-height:48px; padding:0; color:transparent; background:#8e3026; border:4px solid #f0dca8; border-radius:50%; transform:translate(-50%,-50%); box-shadow:0 5px 8px #0008; }
.route-node::before { content:""; position:absolute; left:50%; top:-7px; width:13px; height:13px; border-radius:50%; background:#a42e26; box-shadow:0 3px 4px #0007; transform:translateX(-50%); }
.route-node::after { content:attr(data-label); position:absolute; left:50%; top:42px; width:max-content; max-width:130px; padding:5px 8px; color:#2d2016; background:#ecd9aa; border:1px solid #79572f; font-size:15px; transform:translateX(-50%); }
.route-node.is-selected { background:#a77d32; color:#21170f; }.route-conflict { color:#641d18; font-weight:500; background:#f0d5b5; }
.certainty-confirmed { font-weight:500; }.certainty-inferred { border-bottom:1px dashed #5e4c2d; }.certainty-unknown { opacity:.7; }
.is-error { outline:4px solid #a61913; outline-offset:-5px; box-shadow:inset 0 0 0 7px #ffe0c0; animation:overhaul-error 220ms ease-out; --error-shift:4px; }.is-completed { filter:saturate(1.08); box-shadow:inset 0 0 0 3px #8b2b22; }
@keyframes overhaul-error { 40% { transform:translateX(4px); } 75% { transform:translateX(-4px); } }
@media (max-width:900px) {
  .overhaul { min-height:300px; padding:6px; }
  .overhaul-goal { max-width:100%; }
  .storage-board { grid-template-columns:repeat(2,minmax(140px,1fr)); }
  .deduction-grid { grid-template-columns:repeat(2,minmax(220px,1fr)); }
  .evidence-row { grid-template-columns:repeat(2,1fr); }.evidence-row strong { grid-column:1/-1; }
  .jigsaw-layout { grid-template-columns:minmax(130px,1fr) minmax(230px,1.4fr); }
  .route-card-grid { grid-template-columns:repeat(3,1fr); }
  .route-casefile { grid-template-columns:140px 1fr; }.route-casefile img { width:140px; height:100px; }
  .overhaul-goal,.overhaul-status { font-size:14px; }
  body:has(#puzzle-screen.is-active) #level-return-global { top:auto; bottom:max(10px,env(safe-area-inset-bottom)); }
}
@media (max-height:500px) and (orientation:landscape) {
  .overhaul { min-height:0; height:100%; padding:3px; }
  .overhaul-goal { display:none; }.overhaul-status { margin:0 0 3px; min-height:20px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .storage-board { grid-template-columns:repeat(4,minmax(0,1fr)); min-height:0; height:calc(100% - 24px); padding:3px; gap:4px; }
  .storage-guide-row { margin:0 0 2px; }.storage-drag-guide { min-height:38px; padding:2px 7px; font-size:12px; }.storage-guide-frame { width:44px; height:26px; flex-basis:44px; }
  .storage-zone { border-width:4px; padding:3px; overflow:hidden; }.storage-zone h3 { font-size:15px; margin:0; }.storage-zone-rule { display:none; }.storage-stack { min-height:0; overflow:hidden; }.storage-piece { height:44px; aspect-ratio:auto; margin-top:-22px; border-width:4px; }.storage-dropzone { position:relative; z-index:4; flex:0 0 44px; min-height:44px; margin-top:2px; padding:3px; }
  .keyboard-guide { display:none; }
}
@media (max-width:520px) {
  .storage-board,.deduction-grid,.jigsaw-layout { grid-template-columns:1fr; }
  .boots-inspection { min-height:220px; }
  .label-card { grid-template-columns:1fr 1fr; }.label-card strong { grid-column:1/-1; }
}
@media (prefers-reduced-motion:reduce) { .overhaul * { animation-duration:1ms!important; transition-duration:1ms!important; }.storage-guide-frame { transform:translateX(18px); } }
.reduce-motion .overhaul * { animation-duration:1ms!important; transition-duration:1ms!important; }.reduce-motion .storage-guide-frame { transform:translateX(18px); }
.ledger-bar .ledger-control { color:#d9bd7b; background:transparent; border-width:0 1px 0 0; border-color:#80613a; box-shadow:none; outline-offset:-3px; }
.ledger-bar .ledger-control:hover,.ledger-bar .ledger-control:focus-visible { color:#ffe4a0; background:#ffffff0a; transform:none; filter:none; }
