.rotate-phone{box-sizing:border-box;width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:26px;border:1px solid #8da9c1;background:#0b182a;color:#f5f7fa;font:16px/1.5 "Segoe UI",Arial,sans-serif;overflow:auto}
.rotate-phone::backdrop{background:#07111ff5}
.rotate-phone h2{font-size:26px;line-height:1.2;margin:0 0 18px}
.rotate-phone p{margin:12px 0}
.rotate-phone .rotate-browser{font-size:14px;color:#bdd0e0}
.rotate-phone input{box-sizing:border-box;width:100%;padding:10px;border:1px solid #7892aa;background:#162a40;color:#eaf3fa;font-size:16px}
.rotate-phone button{width:100%;min-height:44px;margin-top:12px;padding:10px;background:#0033ff;border:1px solid #7290ff;color:white;font:600 15px "Segoe UI",Arial,sans-serif}
.rotate-phone [role=status]{font-size:13px;color:#bdd0e0}
.rotate-phone [role=status]:empty{display:none}
.owl-message{display:contents}
.inspect-narration .owl-toggle,.usb-dialog .owl-toggle{display:none}

/* A short landscape viewport needs height for evidence, not a large portrait. */
@media (max-width:1100px) and (max-height:500px) and (orientation:landscape){
  :root{--alex-panel-width:calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right));--alex-panel-bottom:max(8px,env(safe-area-inset-bottom));--alex-portrait-width:130px;--alex-portrait-height:178px;--alex-portrait-left:0px;--alex-panel-inset:0px}
  body>.topbar,.floor-view .topbar{padding:6px max(10px,env(safe-area-inset-right)) 0 max(10px,env(safe-area-inset-left));gap:8px}
  .game-location{padding:4px 8px 4px 4px;gap:8px;max-width:60vw}
  .game-location small{display:none}
  .topbar #view-title,.floor-view .topbar #view-title{font-size:13px}
  .topbar .back,.game-actions button{min-height:44px;font-size:12px}
  body>.game-status{display:none}
  body:not(.floor-view) #scene{width:min(100%,calc(100dvh * var(--aspect)));max-height:100dvh}
  .inspect-narration,.inspect-narration.resting,.usb-dialog .usb-dialog-footer,.usb-dialog.evidence-found .usb-dialog-footer{height:0;min-height:0;padding:0;display:block;background:none;border:0;box-shadow:none;pointer-events:none}
  .usb-dialog-footer:before{display:none}
  .inspect-narration .owl-message,.usb-dialog .inspector-voice{display:block;position:absolute;left:132px;bottom:6px;box-sizing:border-box;width:min(420px,calc(100% - 282px));max-height:min(170px,48dvh);padding:12px 44px 12px 14px;border:1px solid #7297b4aa;border-radius:16px 16px 16px 3px;background:#071525c4;backdrop-filter:blur(3px);box-shadow:0 6px 20px #0003;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;pointer-events:auto}
  .inspect-narration .owl-toggle,.usb-dialog .owl-toggle{display:block;position:absolute;right:3px;top:3px;min-width:36px;min-height:36px;padding:4px;margin:0;border:0;border-radius:50%;background:#102338c4;color:#fff;font:600 20px "Segoe UI",Arial,sans-serif;cursor:pointer;pointer-events:auto}
  .inspect-narration.owl-folded .owl-message,.usb-dialog .owl-folded .inspector-voice,.inspect-narration.resting .owl-message{width:auto;padding:0;border:0;background:none;box-shadow:none;backdrop-filter:none;overflow:visible}
  .owl-folded .inspector-voice>:not(.owl-toggle),.inspect-narration.owl-folded .owl-message>:not(.owl-toggle),.inspect-narration.resting .owl-message>:not(.owl-toggle){display:none}
  .inspect-narration.owl-folded .owl-toggle,.usb-dialog .owl-folded .owl-toggle{position:static;min-width:72px;min-height:44px;padding:8px 12px;border:1px solid #7297b4aa;border-radius:12px;background:#071525c4;font-size:13px}
  .inspect-narration.resting:not(.owl-folded) .owl-toggle{display:none}
  .inspect-narration[hidden]{display:none}
  .inspect-narration .inspect-speaker{display:none}
  .inspect-narration p,.inspect-narration.resting p{margin:0;font-size:13px;line-height:1.45}
  .inspect-narration .dialogue-continue{min-width:0;width:auto;max-width:150px;margin:0;min-height:44px;font-size:11px}
  .usb-dialog .usb-dialog-footer p{font-size:13px;line-height:1.45;margin:4px 0}
  .usb-dialog .inspect-label{font-size:9px;margin:0}
  .usb-dialog .selection-caption{font-size:11px;line-height:1.3;margin-top:4px}
  .usb-dialog .usb-reset{position:absolute;right:0;bottom:0;min-width:134px;width:134px;max-width:134px;min-height:44px;padding:8px;font-size:11px;pointer-events:auto}
  .usb-dialog-footer.is-typing .dialogue-reveal{min-height:32px;font-size:11px}
  .usb-dialog,.usb-dialog.phone-dialog{width:calc(100vw - 16px - env(safe-area-inset-left) - env(safe-area-inset-right));margin:4px auto auto;padding:0;max-height:calc(100dvh - 12px)}
  .usb-dialog[open]:not(.phone-dialog){height:calc(100dvh - 12px)}
  .usb-dialog.phone-dialog .usb-dialog-footer{bottom:var(--alex-panel-bottom)}
  .usb-dialog .usb-dialog-header{padding:2px 10px;margin:0 0 4px;gap:10px}
  .usb-dialog-header h2{font-size:15px;margin:0}
  .usb-dialog-header small,.usb-close kbd{display:none}
  .usb-dialog .usb-close{min-height:40px;padding-right:10px;font-size:12px}
  .usb-dialog .usb-display-surround{padding:1px}
  .app-dialog .usb-dialog-frame{min-width:0}
  .app-dialog .case-app-nav{width:110px;padding:10px 6px;gap:6px}
  .case-app-nav strong{padding-bottom:4px;font-size:13px}
  .case-app-nav>span{padding:8px;font-size:12px}
  .app-dialog .case-content{padding:10px 12px}
  .app-dialog .case-content{padding-bottom:70px}
  .usb-dialog:not(.app-dialog):not(.phone-dialog) .usb-dialog-frame{margin-bottom:64px}
  .phone-dialog .fn-messenger{padding-bottom:64px}
  .case-content h2{font-size:18px;margin-bottom:12px}
  .case-window-title{height:30px;font-size:12px}
  .case-status{height:22px;font-size:10px}
  .case-screen .case-pick{min-height:40px}
  .case-screen .case-row{font-size:13px}
  .case-phishing .mail-message{grid-template-columns:1fr 1fr;gap:10px}
  .case-miner .miner-overview{grid-template-columns:minmax(0,1.6fr) minmax(210px,1fr);gap:10px}
  .case-screen.case-miner .case-row{grid-template-columns:minmax(145px,2fr) repeat(3,minmax(40px,1fr));gap:4px;padding:6px;font-size:12px}
  .app-dialog .employee-taskbar{padding:0 5px}
  .app-dialog .employee-desktop{grid-template-rows:minmax(0,1fr) 44px;gap:4px;padding:4px 6px 0}
  .app-dialog .employee-app-title{height:24px;font-size:12px}
  .app-dialog .employee-explorer-tools{height:28px;padding:0 8px;font-size:12px}
  .employee-path{padding:3px 8px}
  .app-dialog .employee-search,.app-dialog .employee-app-status{display:none}
  .employee-explorer-body aside{width:110px}
  .app-dialog .employee-file-head{height:24px;padding:4px 6px;font-size:11px}
  .app-dialog .employee-files{padding:0 6px}
  .app-dialog .employee-file{padding:8px 6px;font-size:13px}
  .app-dialog .employee-terminal-body{font-size:13px;padding:8px 10px}
  .app-dialog .employee-command{font-size:13px;padding:10px;overflow-wrap:anywhere}
  .app-dialog .employee-command-hint{display:none}
  .app-dialog .employee-taskbar button{min-width:0;flex:1;padding:5px 8px;font-size:12px;min-height:44px}
  .app-dialog .employee-start,.app-dialog .employee-clock,.employee-taskbar button small{display:none}
  .phone-dialog .fn-phone{width:min(480px,100%);min-height:0;border-radius:16px}
  .usb-room-link,.inspect-object{min-width:44px;min-height:44px}
  .game-intro{width:calc(100vw - 24px);max-height:calc(100dvh - 16px);padding:14px 20px}
  .game-intro[open]{grid-template-columns:72px 1fr;gap:18px}
  .intro-owl{margin:0;align-self:center}
  .intro-copy h2{font-size:23px;margin:6px 0 10px}
  .intro-copy p{font-size:14px;line-height:1.4;margin:8px 0}
  .intro-actions{flex-direction:row;gap:10px;margin-top:12px}
  .intro-actions button{min-height:44px;padding:8px 12px}
  .title-composition{width:min(330px,42vw);top:40%}
  .title-play{min-height:44px}
  .game-map,.case-journal,.investigation-result{width:calc(100vw - 24px);max-height:calc(100dvh - 16px)}
  .game-map>header,.case-journal>header{padding:12px 18px}
  .game-map h2,.case-journal h2{font-size:22px}
  .case-journal>footer{padding:8px 18px;gap:12px}
  .investigation-result header{margin:0 16px;padding:10px 0;gap:12px}
  .investigation-result h2{font-size:20px;margin-top:4px}
  .investigation-result .result-body{padding:12px 16px}
  .investigation-result footer{padding:0 16px 12px;gap:12px}
  .result-stats{padding:10px 0}
  .result-stats strong{font-size:28px}
  .result-intro{margin-bottom:10px}
  .result-confirm,.result-form{margin-top:12px}
}
