.novel-game.pc-mode .desk-scene{padding-bottom:16px}.novel-game.pc-mode .campaign-desktop{bottom:0}.novel-game.pc-mode .novel-dialogue{z-index:20}.novel-game.pc-mode.document-reading .novel-dialogue{visibility:hidden;pointer-events:none}@media(orientation:landscape) and (max-height:500px){.novel-game.pc-mode .desk-scene{padding:0}.novel-game.pc-mode:has(.dialogue-active) .appwindow,.novel-game.pc-mode:has(.thought-open) .appwindow,.novel-game.pc-mode:has(.dialogue-active) .campaign-window,.novel-game.pc-mode:has(.thought-open) .campaign-window{bottom:38px}.novel-game.pc-mode:has(.dialogue-active) .taskbar,.novel-game.pc-mode:has(.thought-open) .taskbar{bottom:0;padding-right:160px}}
.mobile-progress-action{display:none}
.novel-controls .progress-ready{background:#b89958!important;color:#15191c!important;border-color:#e3ce9e!important;font-weight:700}
@media(orientation:landscape) and (max-height:500px){
 .novel-game .novel-dialogue{bottom:0!important;padding-bottom:max(6px,env(safe-area-inset-bottom))}
 .novel-game .menu-open .novel-controls,.novel-game.pc-mode .dialogue-idle.menu-open .novel-controls{position:fixed;bottom:var(--menu-bottom,140px);right:max(8px,env(safe-area-inset-right));max-height:calc(100dvh - var(--menu-bottom,140px) - 8px)}
 .novel-game .mobile-progress-action{display:block;max-width:45vw;min-height:32px;padding:5px 10px;border:1px solid #c4b28b;background:#36342d;color:#fff8e8;font:11px/1.4 'Noto Sans JP',sans-serif}
 .novel-game .novel-controls .progress-ready{display:none!important}
 .novel-game .dialogue-heading{max-width:calc(100vw - 32px)}
 .novel-game.pc-mode .dialogue-idle.thought-open .dialogue-heading{bottom:calc(var(--mobile-dialogue) + 3px)}
}

.elapsed-card{position:fixed!important;inset:0!important;z-index:10000!important;background:#080b0e!important;color:#fff}.elapsed-card button{width:100%;height:100%;background:transparent;color:inherit;border:0}.elapsed-card .scene-date{font-size:clamp(20px,4vw,34px)}

.ai-upload-screen{color:#263340;background:#f5f7f9;text-align:left}.ai-upload-screen header{padding:14px 22px;border-bottom:1px solid #c6ced5;display:flex;gap:20px}.ai-upload-body{padding:16px 22px}.ai-upload-screen h2,.ai-upload-screen h3,.modal .ai-upload-screen h2,.modal .ai-upload-screen h3{color:#263340;font-family:'Noto Sans JP',sans-serif}.ai-upload-columns{display:grid;grid-template-columns:1fr 1fr;gap:24px}.ai-upload-screen footer{padding:12px 22px;display:flex;gap:12px;background:#e6ebef}.ai-upload-screen footer button{flex:1;background:#263340;color:#fff;padding:10px}.ai-upload-screen footer button+button{background:#fff;color:#263340}.ai-upload-screen b{overflow-wrap:anywhere}.modal:has(.ai-upload-screen){padding:0;overflow:hidden}.modal:has(.ai-upload-screen)>.close{position:absolute;right:8px;top:6px;min-height:30px;padding:4px 10px}.fullscreen-setting button{width:100%}
@media(orientation:landscape) and (max-height:500px){
 .novel-game .ai-ending-desktop,.novel-game .incident-live-screen{inset:0;padding:0;border-radius:0}
 .novel-game.office-mode .office-scene,.novel-game.campaign .campaign-office{bottom:0!important}
 .novel-game .character-frame,.novel-game .campaign-cast{top:5%;bottom:-22%;height:auto;align-items:flex-end}
 .novel-game .campaign-cast .portrait-art,.novel-game .character-frame .portrait-art{height:100%;max-height:none;align-self:flex-end}
 .novel-game .incident-live-screen{gap:8px}.incident-web-screen,.incident-phone{border-radius:0}.incident-web-body{padding:10px}.incident-phone{flex-basis:230px}
 .modal:has(.recovery-browser),.modal:has(.ai-upload-screen){position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:100dvh!important;border-radius:0;margin:0;padding:0;overflow:hidden}
 .ai-upload-screen{height:100%;display:flex;flex-direction:column}.ai-upload-screen header{padding:8px 12px;min-height:36px}.ai-upload-body{flex:1;min-height:0;overflow:auto;padding:8px 12px}.ai-upload-screen h2{margin:0 0 8px}.ai-upload-columns{gap:16px}.ai-upload-columns h3{margin:4px 0}.ai-upload-columns p{margin:6px 0}.ai-upload-screen footer{flex:none;padding:6px max(12px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom));gap:10px}.ai-upload-screen footer button{font-size:11px;min-height:38px;padding:6px}
 .recovery-browser{height:100%;display:flex;flex-direction:column}.recovery-tab{padding:5px 12px;font-size:10px}.recovery-address{padding:5px 12px;margin:4px 10px;font-size:11px}.recovery-page{flex:1;min-height:0;display:flex;flex-direction:column}.recovery-page header{padding:5px 12px;font-size:12px}.modal .recovery-page main{max-width:none;width:100%;margin:0;padding:8px 14px;border:0;border-radius:0;box-shadow:none;flex:1;min-height:0;overflow:auto;align-content:start;gap:4px 18px}.recovery-page h2{font-size:15px!important;margin:0}.recovery-page p{margin:0}.recovery-page p br{display:none}.modal .recovery-page label{margin:2px 0;font-size:11px}.modal .recovery-field{padding:6px 9px;margin-top:3px;font-size:11px;overflow-wrap:anywhere}.recovery-actions{position:sticky;bottom:-8px;background:#fff;padding:6px 0;margin:2px 0 0}.modal .recovery-actions button{min-height:36px;font-size:11px;padding:5px 12px}.recovery-page footer{display:none}
 .document-overview{display:flex!important;flex-direction:column!important;overflow:hidden!important;position:relative;padding:6px 10px!important;min-height:0}.mobile-list>.document-overview{display:none!important}.document-preview-stage{position:relative;flex:1;min-height:0;overflow:hidden;background:#d8dde1;display:flex;justify-content:center;align-items:flex-start}.document-sheet{width:700px;flex-shrink:0;transform-origin:top center;background:#fff;pointer-events:none;user-select:none;padding:16px}.document-sheet .paper{margin:0;padding:0;max-width:none}.document-sheet [data-reader-open]{display:none}.document-preview-open{flex:none;align-self:center;margin:5px 0 0;padding:5px 20px!important;min-height:32px!important;font-size:11px!important}.document-overview>.mobile-list-back{position:static;flex:none;align-self:flex-start;margin-bottom:5px}.reader-overlay header{flex-shrink:0}.reader-overlay .reader-scroll{padding-bottom:24px}
 .assist-layout{grid-template-columns:minmax(0,1fr) 210px}.assist-details{padding-bottom:110px}.assist-messages{padding-bottom:110px}.assist-notification{top:34px;bottom:auto;max-width:280px}
}

.modal .ai-upload-body b{color:#263340}.ai-upload-screen header{padding-right:100px}.modal:has(.ai-upload-screen)>.close{background:#263340;color:#fff;border-color:#66717c}

.reader-scroll .document-sheet{transform:none!important;width:auto;pointer-events:auto;user-select:text}
@media(min-height:501px),(orientation:portrait){.document-preview-stage{display:contents}.document-sheet{transform:none!important;width:auto}.document-preview-open{display:none}}

.completion-checklist{padding:16px 0;border-top:1px solid #64717d;margin:20px 0}.completion-checklist li{margin:8px 0}.completion-checklist li button{margin-left:12px;font-size:12px;padding:6px 10px}.completion-checklist details p{font-size:13px;line-height:1.8}.truth-summary{line-height:1.9}.final-source-document{background:#fff;color:#253338;padding:18px}.final-source-document h2{color:#253338}
@media(orientation:landscape) and (max-height:500px){.final-source-document.document-overview{height:calc(100dvh - 170px);min-height:150px}.completion-checklist{padding:10px 0;margin:12px 0}.completion-checklist li button{font-size:11px}.truth-content:has(.final-source-document){padding-bottom:110px}}

body #game-updates,body:has(#new-mail-notice) #game-updates{top:max(4px,env(safe-area-inset-top));right:max(6px,env(safe-area-inset-right));gap:4px;max-width:min(340px,80vw);z-index:1400}
#game-updates .game-update,#game-updates #glossary-notice{pointer-events:auto;touch-action:none;user-select:none;cursor:grab;padding:8px 12px}
#game-updates .game-update span{display:none}
#game-updates #glossary-notice{position:static;max-width:none;margin:0;font-size:12px;border-radius:6px}
@media(orientation:landscape) and (max-height:500px){body #game-updates{max-width:280px}#game-updates .game-update strong,#game-updates #glossary-notice{font-size:11px}#new-mail-notice{left:max(6px,env(safe-area-inset-left));right:auto;max-width:40vw}}

body #game-updates,body:has(#new-mail-notice) #game-updates{position:fixed;top:max(6px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));left:auto;bottom:auto;transform:none;justify-items:end}
@media(orientation:landscape) and (max-height:500px){.truth-content .timeline{margin-right:24px}.truth-content .timeline-row{touch-action:pan-x;user-select:none;transition:background .12s}.truth-content .timeline-row button{touch-action:pan-y}.truth-content .timeline-row.swipe-active{background:#ffffff18;outline:1px solid #a5b5c0}}

/* Keep document choices clear of the bottom edge. */
.final-flow .truth-content{padding-bottom:56px;scroll-padding-bottom:48px}
.final-flow .truth-content>.truth-sources,.final-flow .truth-content>details{margin-bottom:24px}
.final-flow .truth-content>details>summary{padding:12px 0;min-height:44px;box-sizing:border-box;cursor:pointer}
.final-flow .truth-sources{padding-bottom:20px;gap:12px}

/* Desktop uses separate upper workspace and lower dialogue regions. */
@media(min-height:501px){
 .novel-game.pc-mode{--pc-dialogue-height:220px;--pc-work-bottom:256px;isolation:isolate}
 .novel-game.pc-mode .novel-dialogue{height:var(--pc-dialogue-height)!important;min-height:0!important;max-height:var(--pc-dialogue-height)!important;bottom:12px!important;box-sizing:border-box;z-index:2}
 .novel-game.pc-mode .desk-scene{height:calc(100% - var(--pc-work-bottom));padding:12px 3vw 8px;box-sizing:border-box}
 .novel-game.pc-mode .campaign-desktop{bottom:var(--pc-work-bottom)}
 .novel-game.pc-mode.document-reading .novel-dialogue{visibility:visible;pointer-events:auto}
 #app:has(.novel-game.pc-mode)>.veil:has(#case-report,#deduction,#final-report){bottom:256px;z-index:30;padding:12px}
 #app:has(.novel-game.pc-mode)>.veil:has(#case-report,#deduction,#final-report)>.modal{max-height:100%;box-sizing:border-box;overflow:auto}
}

/* Full-screen notices must clear the landscape camera cutout too. */
.modal.notice-screen{padding-left:max(24px,env(safe-area-inset-left));padding-right:max(24px,env(safe-area-inset-right));}
@media(orientation:landscape) and (max-height:500px){
 .novel-game.pc-mode .desktop-icons{left:max(11px,env(safe-area-inset-left))}
 .novel-game.pc-mode .taskbar{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
 .novel-game.pc-mode .appwindow,.novel-game.pc-mode .campaign-window{left:env(safe-area-inset-left);right:env(safe-area-inset-right);width:auto}
}
