/* Phone/tablet frames keep the console readable without clipping its content. */
html{-webkit-text-size-adjust:100%;scroll-padding-top:18px}
#log-back{display:none}
@media(max-width:850px){
 #logs-panel:not(.reader-open) .log-reader{display:none}
 #logs-panel.reader-open .log-index,#logs-panel.reader-open .logs-intro,#logs-panel.reader-open .log-filters{display:none}
 #logs-panel.reader-open .log-reader{display:block;width:100%;min-width:0;scroll-margin-top:18px}
 #log-back{display:block;position:sticky;top:12px;z-index:5;min-height:44px;margin:0 0 24px;padding:11px 16px;background:#142131;border-color:#b59a6180;box-shadow:0 4px 20px #0008;font-size:14px}
}
img,audio,canvas,svg{max-width:100%}
header>div,.tools label,.side,.ship-detail,.log-reader,.logs-intro>div{min-width:0}
.side p,.ship-detail p,.fleet-copy p,.log-reader p,dd,.tag{overflow-wrap:anywhere}
#map{user-select:none;-webkit-user-select:none}
.map-hint{position:relative;padding:12px 20px;margin:0;color:#8fa8bb;font:11px/1.6 ui-monospace,monospace;background:#080f1a;border-top:1px solid #829caf25}
@media(pointer:coarse){button,select{min-height:44px}.map-controls button{min-width:44px}.ship-hotspot{width:44px;height:44px}input[type=checkbox]{width:20px;height:20px}.chapter input{height:40px!important}}
@media(max-width:850px){
 header{gap:12px}header h1{font-size:clamp(24px,6.5vw,32px);letter-spacing:.1em}.header-right{flex-shrink:0}
 .module-nav{flex-wrap:nowrap;overflow-x:auto;padding:10px 16px;gap:8px;scrollbar-width:thin}.module-nav button{flex-shrink:0;min-height:44px;white-space:nowrap}
 .tools{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;padding:16px}.tools label:first-child{grid-column:1/-1}.tools label:first-child select{flex:1;width:100%;min-width:0}.tools .chapter{grid-column:1/-1;min-width:0}.tools>select{min-width:0;width:100%}.tools label:has(#author){line-height:1.4;font-size:11px;gap:8px}.tools input[type=checkbox]{flex-shrink:0}.tools select{font-size:16px}.chapter input{width:100%;min-width:0}
 .mapbox{display:flex;flex-direction:column;min-height:0}.map-heading{position:static;padding:16px 16px 12px;margin:0 16px;border-top:0;gap:6px}.map-heading>span+span{line-height:1.5;font-size:10px}.map-controls{position:static;max-width:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0 16px 12px;order:1}.map-controls button{font-size:11px;min-height:44px;padding:8px}#focus-route,#focus-sol,#replay{grid-column:auto;grid-row:auto}#replay{min-width:0}
 #map{order:2;width:100%;height:auto;aspect-ratio:1.3;min-height:240px;max-height:75svh}.mapbox .stamp{order:3;position:static;padding:12px 16px;margin:0;font-size:8px;line-height:1.5}.mapbox:after{display:none}.map-hint{padding:10px 16px}
 .side{padding:20px 16px;min-height:0}.location-art{float:none;width:100%;height:auto;aspect-ratio:16/9;max-height:240px;margin:0 0 20px;border:1px solid #829caf25}.contact-visual{object-fit:contain}.side .legend{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}.legend div{margin:0;line-height:1.5}#stoplist{padding:14px 16px;gap:8px}#stoplist button{min-height:44px;max-width:100%;text-align:left}.route-heading,.fleet-heading{padding-left:16px;padding-right:16px}.note{padding:14px 16px;overflow-wrap:anywhere}.note details{margin-top:10px}.note summary{min-height:44px;padding:12px 0}
 .ship-intro{padding:24px 16px}.ship-intro p{line-height:1.7}.ship-toolbar{padding:12px 16px;gap:8px}#ship-views{flex-wrap:nowrap;overflow-x:auto}#ship-views button{flex-shrink:0;white-space:nowrap;min-height:44px}.model-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.model-tools select{min-width:0;width:100%;max-width:none;font-size:16px;grid-column:1/-1}.model-tools button{font-size:10px;padding:8px 4px;min-height:44px}.model-viewport{height:clamp(260px,76vw,430px)}.model-label{font-size:8px;left:16px;top:12px;right:12px;line-height:1.6}.model-hint{line-height:1.6;padding:12px 16px}.ship-foot{padding:12px 16px;flex-wrap:wrap;line-height:1.6}.ship-stage img{filter:none;width:100%;height:auto;aspect-ratio:3/2;object-fit:contain}.ship-detail{padding:24px 16px}.ship-detail dl{grid-template-columns:minmax(0,.9fr) minmax(0,1.2fr);gap:12px}.ship-detail dt{line-height:1.6;align-self:start}.ship-detail dd{font-size:13px;line-height:1.5}.ship-systems-list{padding:16px;grid-template-columns:repeat(2,minmax(0,1fr))}.ship-systems-list button{min-width:0;overflow-wrap:anywhere}.ship-motto{padding:8px 16px 24px}
 .fleet-grid{padding:8px 16px 24px;gap:14px}.fleet-card img{aspect-ratio:3/2;object-fit:contain;height:auto}.fleet-copy{padding:18px}.fleet-copy button{min-height:44px}#weapons-catalogue .fleet-card img{height:auto;aspect-ratio:3/2;max-height:220px}
 .logs-intro{padding:24px 16px;gap:12px}.logs-intro img{width:52px;flex-shrink:0}.log-filters{padding:16px;gap:10px}.log-filters select,.audio-label select{font-size:16px;max-width:100%}.logs-grid{margin:0 16px 24px;min-height:0}.log-index{padding:20px 0}#log-list{grid-template-columns:1fr}.log-reader{padding:24px 0}.log-reader h2{font-size:27px;overflow-wrap:anywhere}.audio-label{gap:12px;flex-wrap:wrap}.audio-label label{display:flex;align-items:center;gap:8px}#log-audio{min-width:0;width:100%;height:54px}#log-transcript{font-size:17px;line-height:1.8}
 #startup.awaiting-spoiler .boot-content{max-width:100%;padding:24px 16px}.boot-content h2{font-size:clamp(26px,8vw,42px)}.boot-sub{font-size:9px;letter-spacing:.15em}.boot-footer{text-align:center;padding:0 16px}.boot-content{max-width:calc(100% - 32px)}#spoiler-notice{padding:18px}#spoiler-accept{min-height:48px}.boot-class{line-height:1.5}
}
@media(max-width:360px){.ship-systems-list{grid-template-columns:1fr}.side .legend{grid-template-columns:1fr}.tools{grid-template-columns:1fr}.tools>*{grid-column:1!important}.tools label:has(#author){font-size:12px}.logs-intro img{display:none}header .eyebrow{letter-spacing:.1em}}
@supports(padding:env(safe-area-inset-bottom)){.note,.ship-motto,.logs-grid{padding-bottom:max(24px,env(safe-area-inset-bottom))}#startup.awaiting-spoiler .boot-content{padding-bottom:max(24px,env(safe-area-inset-bottom))}}
