/* Layout follows available room: desktop workbench, compact touch reading. */
.evidence-reading-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:22px;}
.evidence-reading-grid>*,.legal-summary{min-width:0;}
.is-envelope .evidence-paper{margin-bottom:0;}
.evidence-annotations>p:last-child{font-size:12px!important;color:#7c886e!important;line-height:1.85;}
.legal-summary>small{color:#adc299;font-size:10px;letter-spacing:.12em;}
.story-progress{appearance:none;width:100%;max-width:360px;height:3px;border:0;border-radius:3px;overflow:hidden;background:#d8e3d51c;opacity:.65;}
.story-progress::-webkit-progress-bar{background:#d8e3d51c;border-radius:3px;}.story-progress::-webkit-progress-value{background:#b2c7b5;border-radius:3px;}.story-progress::-moz-progress-bar{background:#b2c7b5;border-radius:3px;}
.story-option{display:block;}.story-option b{font-weight:400;}
.story-mode .task-points,.story-mode .rcard--score #score-ring{display:none;}
.story-mode .rcard--score #score-stats{grid-column:1/-1;}
.docket .docket-fold,.docket>small{display:none;}
.docket:not(:has(details[open])),.story-mode .docket:not(:has(details[open])){width:auto;padding:0;border:0;background:none;}
.docket:not(:has(details[open])) .docket-tools{display:none;}
.docket summary,.story-mode .docket summary{padding:10px 14px;min-height:44px;border:1px solid #a5b69c45;border-radius:5px;background:#233027db;}
.docket:has(details[open]){max-height:50dvh;overflow:auto;}
.after-story p:first-child{margin-top:0;}
@media(min-width:1100px){
 .story-board{padding:28px;}
 .story-board-inner{width:min(1160px,calc(100vw - 72px));max-height:calc(100dvh - 56px);}
 .board-head{padding:20px 30px 16px;}.board-head h3{font-size:27px;margin:5px 0;}
 .board-content{padding:20px 30px;}
 #story-board-tabs{display:none;}
 .story-board-grid{grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);gap:34px;margin:0;}
 #story-board-rows{display:grid;gap:12px;}
 .clue-slot{padding:12px 16px;transition:border-color .18s,box-shadow .18s;}
 .clue-slot.is-active{border-color:#678963;box-shadow:0 0 0 2px #71946424;}
 .clue-slot label{font-size:18px;line-height:1.5;margin:4px 0 8px;}
 .clue-slot select{padding:9px 10px;min-height:42px;font-size:14px;}
 .clue-result{min-height:0;margin-top:7px;font-size:12px;line-height:1.7;}
 .story-board-grid>aside{position:sticky;top:0;}
 .materials-label{font-size:15px;margin-bottom:20px;}.materials-label span{font-size:12px;line-height:1.8;margin-top:5px;}
 #story-board-materials{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px 16px;}
 .clue-envelope{padding:10px 5px;border:1px solid #d4dccb;background:#fafbf440;border-radius:9px;}
 .clue-envelope:hover{background:#e5ecdc;border-color:#a2b396;}
 .envelope-symbol{width:88px;height:61px;margin-bottom:13px;font-size:24px;}
 .clue-envelope b{font-size:13px;line-height:1.8;}.clue-envelope small{font-size:10px;}
 .board-actions{padding:14px 30px;}.board-actions .btn{font-size:14px;min-height:46px;}
 .is-envelope .modal-card{width:min(1000px,calc(100vw - 120px));}
 .is-envelope .modal-head{padding:20px 28px;}.is-envelope .modal-head h3{font-size:22px;}
 .is-envelope .modal-body{padding:26px 28px;}
 .evidence-reading-grid{grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);gap:30px;align-items:start;}
 .is-envelope .evidence-paper{padding:30px 26px;min-height:310px;}
 .is-envelope .evidence-paper h4{font-size:23px;}.is-envelope .evidence-paper p{font-size:16px;line-height:2.1;}
 .is-envelope .ev-detail-block p{font-size:15px;line-height:2;}
 .story-choice{width:min(1080px,calc(100vw - 120px));padding:22px 28px;}
 #story-choice-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;}
 .story-option{min-height:100px;align-items:start;padding:17px 16px;}
 .story-option b{font-size:15px;line-height:1.8;}.story-option small{font-size:12px;line-height:1.7;margin-top:6px;}
 .story-mode .dialogue,.dialogue{width:min(900px,calc(100vw - 420px));padding:20px 28px 14px;}
 .story-mode .dl-text,.dl-text{font-size:17px;line-height:1.95;}
 .legal-verdict:has(.after-story){display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:34px;padding:28px;}
 .legal-verdict .after-story{border-top:0;border-left:1px solid #91a47b40;padding:0 0 0 30px;margin:0;}
 .legal-verdict .after-story h4:first-child{margin-top:0;}
}
@media(max-width:1099px){
 .hud-icon{width:44px;height:44px;min-width:44px;}
 .hud-btn{min-height:44px;}
 .dl-next kbd{display:none;}
 .story-mode .dl-text,.dl-text{font-size:15px;line-height:1.85;}
 .story-option b{font-size:15px;line-height:1.75;}.story-option small{font-size:11px;line-height:1.65;}
 .story-option{min-height:64px;}
 .story-mode .dialogue,.dialogue{display:flex;flex-direction:column;max-height:46dvh;padding:14px 16px 10px;}
 .dl-head,.voice-strip,.dl-foot{flex-shrink:0;}
 .story-mode .dl-text,.dl-text{flex:1 1 auto;min-height:0;max-height:22dvh;overflow:auto;overscroll-behavior:contain;}
 .voice-strip{gap:7px 12px;min-height:44px;}
 .voice-strip .link-btn{min-height:44px;padding:8px 4px;font-size:12px!important;}
 .voice-strip #voice-status{font-size:11px!important;}
 .story-mode .dl-next,.dl-next{min-height:44px;padding:10px 20px;color:#fffdf5;background:#476753;border-radius:6px;font-size:14px;letter-spacing:.03em;}
 .task-foot .btn,.board-actions .btn,.modal-foot .btn,.clue-slot select{min-height:44px;}
 .is-envelope .evidence-paper p,.is-envelope .ev-detail-block p{font-size:15px;line-height:1.95;}
 .is-envelope .modal-head #modal-close{width:44px;height:44px;}
 .story-phone-toggle{min-height:44px;}.phone-close{min-width:44px;min-height:44px;}
 .camera-dock .camera-switch button,.camera-dock.is-open>button{min-height:44px;}
}
@media(max-width:767px){
 .hud{height:60px;padding:0 10px;gap:8px;}
 .hud-side{gap:6px;flex:0 0 auto;}.hud-case,.prof{display:none!important;}
 .hud-icon{width:44px;height:44px;padding:9px;flex:0 0 44px;}
 .hud-btn{min-height:44px;padding:7px 6px;gap:5px;}
 .hud-btn>span{display:none;}.hud-btn svg{width:16px;height:16px;}
 .stepper{min-width:0;margin:0;max-width:none;}
 .step-node{padding:6px 0;gap:0;}.step-node>span:not(.num),.step-node.is-active>span:not(.num){display:none;}
 .step-node .num{width:clamp(16px,4.5vw,22px);height:clamp(16px,4.5vw,22px);font-size:10px;}
 .stepper .step-line{width:clamp(2px,1vw,4px);}
 .story-mode .dialogue,.dialogue{bottom:max(10px,env(safe-area-inset-bottom));width:calc(100vw - 20px);}
 .story-mode .story-choice,.story-choice{width:calc(100vw - 20px);bottom:max(10px,env(safe-area-inset-bottom));max-height:calc(100dvh - 145px);}
 .clue-slot select{font-size:15px;}.clue-result{font-size:13px;}
 .board-actions .btn{font-size:13px;}
 .modal-foot .btn{font-size:13px;}
}
@media(max-width:360px){.hud-btn svg{display:none;}.hud-btn{padding:7px 6px;}}
@media(min-width:1100px) and (max-height:820px){
 .story-board{padding:16px;}.story-board-inner{max-height:calc(100dvh - 32px);width:min(1160px,calc(100vw - 48px));}
 .board-head{padding:12px 24px;}.board-head .story-kicker{font-size:9px;line-height:1.4;}
 .board-head h3{font-size:22px;line-height:1.4;margin:4px 0;}.board-head p{font-size:11px;line-height:1.5;}
 .board-content{padding:12px 24px;}#story-board-rows{gap:10px;}
 .clue-slot{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;padding:10px 12px;}
 .clue-slot label{grid-column:1;margin:0;font-size:17px;line-height:1.5;}
 .clue-slot select{grid-column:1/-1;min-height:44px;padding:7px 9px;}
 .clue-slot .clue-result{grid-column:1/-1;margin:0;font-size:12px;line-height:1.5;}
 .clue-slot:not(.is-active) .clue-result{display:none;}
 .board-actions{padding:10px 24px;}.board-actions .btn{font-size:13px;}
}
@media(max-height:520px) and (max-width:1099px){
 .story-mode .dialogue,.dialogue{max-height:calc(100dvh - 104px);padding:10px 16px 8px;}
 .story-mode .dl-text,.dl-text{max-height:25dvh;margin:5px 0;}
 .voice-strip,.voice-strip .link-btn{min-height:36px;}
 .story-mode .story-choice,.story-choice{max-height:calc(100dvh - 95px);}
}
@media(prefers-reduced-motion:reduce){.clue-slot{transition:none;}}
