/* SOEST 3D 0.5.6.1 · MOBILE VIEW
   Mobile-first Spielfläche: nur Logo + Hamburger dauerhaft, dynamische Browserhöhe + Safe Areas. */

html,body{height:var(--so3d-vh,100dvh);min-height:0}
#game-shell{top:0;left:0;right:0;bottom:auto;height:calc(var(--so3d-vh,100dvh) - 20px - var(--so3d-safe-bottom))}
.credits-bar{height:calc(20px + var(--so3d-safe-bottom));padding:0 6px var(--so3d-safe-bottom);bottom:0;font-size:6px;gap:7px;justify-content:center;overflow:hidden;white-space:nowrap}
.credits-bar span{display:none}.credits-bar a{font-size:7px}.cesium-viewer-bottom{bottom:2px!important}

.topbar{left:max(5px,env(safe-area-inset-left,0px));right:max(5px,env(safe-area-inset-right,0px));top:calc(5px + var(--so3d-safe-top));min-height:44px;height:44px;padding:4px 6px;z-index:81}
.brand{min-width:0;gap:7px}.brand strong{font-size:13px}.brand small{display:none}.brand-dot{width:8px;height:8px}
.mobile-menu-btn{display:grid;place-items:center;margin-left:auto;width:40px;height:34px;border:1px solid rgba(85,255,155,.34);background:rgba(5,20,13,.94);color:#55ff9b;border-radius:4px;font-size:20px;line-height:1}
body.mobile-menu-open .mobile-menu-btn{border-color:#ffe39b;color:#ffe39b;background:rgba(55,42,8,.94)}
.top-actions{display:none!important}

.telemetry.hud-hub{display:none;position:fixed;z-index:80;left:max(5px,env(safe-area-inset-left,0px));right:max(5px,env(safe-area-inset-right,0px));top:calc(54px + var(--so3d-safe-top));bottom:calc(24px + var(--so3d-safe-bottom));width:auto;max-height:none;padding:6px;gap:5px;overflow:auto;border-color:rgba(85,255,155,.30);background:rgba(3,12,8,.97);backdrop-filter:blur(12px);box-shadow:0 12px 36px rgba(0,0,0,.48)}
body.mobile-menu-open .telemetry.hud-hub{display:flex}
.telemetry.collapsed{width:auto!important;padding:6px!important}.telemetry.collapsed .telemetry-head>div{display:block}.telemetry.collapsed .telemetry-core{display:grid}.telemetry.collapsed .hud-section{display:block}.telemetry.collapsed .telemetry-head{border-bottom:1px solid rgba(85,255,155,.14);padding-bottom:5px}
.telemetry-collapse{display:none!important}.telemetry-head{padding-bottom:5px}.telemetry-head .eyebrow{font-size:8px}.telemetry-head strong{font-size:9px}
.mobile-quick-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
.mobile-quick-actions button{min-height:36px;border:1px solid rgba(85,255,155,.22);background:rgba(5,24,14,.9);color:#dfffea;font-size:7px;font-weight:850;padding:4px 2px}
.mobile-quick-actions button:active{border-color:#55ff9b;color:#55ff9b}
.telemetry-core{display:grid!important;grid-template-columns:1fr 1fr;gap:0 8px;padding:0 5px}.telemetry-core .telemetry-row{min-width:0;padding:4px 0;font-size:8px}.telemetry-core .telemetry-row strong{font-size:8px;max-width:88px}
.hud-section>summary{min-height:36px;padding:6px 7px;font-size:8px}.hud-section-body{padding:4px 5px 5px}.hud-actions{gap:4px}.hud-actions .wide-btn{min-height:36px;font-size:7px;padding:6px 5px}
.multiplayer-panel,.mission-card,.controls-hint{display:none!important}

.touch-look{display:block;position:absolute;z-index:11;right:0;top:50px;bottom:calc(84px + var(--so3d-safe-bottom));width:55%;touch-action:none;pointer-events:auto}
.touch-controls{display:flex;position:absolute;z-index:12;left:max(7px,env(safe-area-inset-left,0px));right:max(7px,env(safe-area-inset-right,0px));bottom:calc(6px + var(--so3d-safe-bottom));justify-content:space-between;align-items:flex-end;pointer-events:none;gap:8px}
.touch-controls button{pointer-events:auto;touch-action:none;border:1px solid rgba(85,255,155,.25);background:rgba(4,16,10,.82);color:#dfffea;min-width:46px;min-height:42px;border-radius:4px;backdrop-filter:blur(4px)}
.touch-pad>button{display:block;margin:0 auto 4px}.touch-pad div{display:flex;gap:4px}
.touch-actions{display:grid;grid-template-columns:1fr 1fr;gap:4px;width:min(184px,49vw)}.touch-actions button{font-size:7px;padding:4px 2px;min-width:0}
body.mobile-menu-open .touch-look,body.mobile-menu-open .touch-controls{pointer-events:none;opacity:.14}
body.ground-pick-armed .touch-look{pointer-events:none!important;opacity:.10}

.toast{top:calc(54px + var(--so3d-safe-top));max-width:calc(100vw - 18px);padding:7px 9px;font-size:8px}

.artifact-editor-panel,.artifact-manager-panel,.world-repair-panel,.ground-wand-panel{position:fixed!important;z-index:90!important;left:max(5px,env(safe-area-inset-left,0px))!important;right:max(5px,env(safe-area-inset-right,0px))!important;top:auto!important;bottom:calc(24px + var(--so3d-safe-bottom))!important;width:auto!important;max-width:none!important;max-height:min(74dvh,calc(var(--so3d-vh,100dvh) - 76px - var(--so3d-safe-bottom)))!important;overflow:auto!important;border-radius:7px 7px 0 0;padding:7px}
.artifact-panel-head{position:sticky;top:-7px;z-index:6;background:rgba(3,13,9,.98);padding:7px 0 6px;margin-bottom:6px;gap:7px}.artifact-panel-head strong{font-size:11px}.artifact-panel-head .eyebrow{font-size:7px}.artifact-icon-btn{width:34px;height:32px}
.ground-wand-panel.collapsed{left:auto!important;right:max(5px,env(safe-area-inset-right,0px))!important;top:calc(54px + var(--so3d-safe-top))!important;bottom:auto!important;width:min(250px,calc(100vw - 10px))!important;max-height:none!important}
.artifact-risk{padding:5px 7px;margin-bottom:5px;font-size:8px}
.artifact-preview-grid{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto;gap:0 5px;font-size:7px}.artifact-preview-grid span,.artifact-preview-grid strong{padding:4px 0}.artifact-preview-grid strong{max-width:55px}
.ground-wand-panel #ground-wand-note{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:5px 0;font-size:8px;line-height:1.3}
.ground-wand-panel .artifact-key-help{display:none}
.ground-wand-modes{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:5px 0}.ground-wand-modes button{min-height:32px;padding:4px 2px;font-size:6px}
.ground-wand-falloff{grid-template-columns:70px 1fr;gap:5px;margin:5px 0;padding:5px}.ground-wand-falloff>span{font-size:7px}.ground-wand-falloff>div{grid-template-columns:repeat(3,1fr);gap:3px}.ground-wand-falloff button{min-height:30px;font-size:6px;padding:4px 2px}
.ground-apply-primary{gap:3px;margin:5px 0;padding:5px;top:-1px}.ground-apply-primary span{font-size:6px}.ground-apply-primary button{min-height:36px;font-size:8px}
.ground-wand-quickbar{grid-template-columns:1fr 1fr;gap:4px;margin:5px 0}.ground-wand-quickbar button,.ground-wand-presets button{min-height:32px;padding:4px 3px;font-size:7px}
.ground-wand-presets{grid-template-columns:repeat(3,1fr);gap:4px;margin:5px 0}
.ground-wand-slider{grid-template-columns:78px 1fr;gap:5px;padding:4px 0;font-size:7px}
.artifact-size-row,.artifact-action-row,.artifact-manager-actions{gap:4px}.artifact-size-row button,.artifact-action-row button,.artifact-manager-actions button{min-height:34px;padding:5px 4px;font-size:7px}
.ground-grid-legend{min-height:32px;font-size:6px;gap:3px;padding:3px}.ground-grid-legend .g{width:6px;height:6px}
.world-tool-tabs,.world-tool-safety,.world-tool-actions{gap:4px;margin-bottom:5px}.world-tool-tabs button,.world-tool-safety button,.world-tool-actions button{min-height:34px;padding:5px 3px;font-size:7px}.world-tool-actions{grid-template-columns:1fr 1fr 1fr}
.artifact-cut-list{max-height:28dvh}

.start-panel,.pause-panel{width:calc(100vw - 16px);padding:13px;max-height:calc(var(--so3d-vh,100dvh) - 28px);overflow:auto}
.start-panel h1{font-size:30px}.start-panel .lead{margin:7px 0 11px;font-size:10px;line-height:1.35}.mode-grid{grid-template-columns:1fr 1fr;gap:6px}.mode-card{min-height:104px;padding:10px}.mode-card strong{font-size:13px;margin:5px 0 2px}.mode-card small{font-size:8px}.mode-icon{font-size:24px}.start-facts{gap:4px;margin-top:8px}.start-facts span{font-size:7px;padding:4px 5px}.legal-mini{font-size:7px!important;margin-top:8px!important}.pause-panel h2{font-size:26px}
.loading-brand{font-size:20px}.loader-ring{width:92px;height:92px}.loading-status{margin-top:130px;font-size:8px}.loading-detail{margin-top:156px;font-size:7px}.loading-progress-track{margin-top:186px;width:min(300px,72vw)}

@media (max-height:700px) and (orientation:portrait){
  .start-panel{padding:10px}.start-panel h1{font-size:27px}.start-panel .lead{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;margin:5px 0 8px}
  .mode-card{min-height:90px;padding:8px}.start-facts,.legal-mini{display:none}
}

@media (max-width:350px){
  .mobile-quick-actions{grid-template-columns:1fr 1fr}
  .telemetry-core{grid-template-columns:1fr}
  .touch-actions{width:min(154px,47vw)}
  .artifact-preview-grid{grid-template-columns:minmax(0,1fr) auto}.artifact-preview-grid strong{max-width:90px}
  .ground-wand-modes{grid-template-columns:1fr 1fr}
  .mode-grid{grid-template-columns:1fr}.mode-card{min-height:82px}
}

@media (max-height:600px) and (orientation:landscape){
  #game-shell{height:calc(var(--so3d-vh,100dvh) - 18px - var(--so3d-safe-bottom))}.credits-bar{height:calc(18px + var(--so3d-safe-bottom))}
  .topbar{top:3px;height:40px;min-height:40px}.mobile-menu-btn{height:32px}.touch-look{top:44px;bottom:calc(66px + var(--so3d-safe-bottom))}
  .touch-controls{bottom:calc(4px + var(--so3d-safe-bottom))}.touch-controls button{min-height:38px}.touch-actions{width:min(210px,42vw)}
  .telemetry.hud-hub{top:46px;bottom:calc(22px + var(--so3d-safe-bottom))}
  .artifact-editor-panel,.artifact-manager-panel,.world-repair-panel,.ground-wand-panel{bottom:calc(22px + var(--so3d-safe-bottom))!important;max-height:calc(var(--so3d-vh,100dvh) - 56px - var(--so3d-safe-bottom))!important}
  .start-panel{padding:9px;max-height:94dvh}.start-panel h1{font-size:25px}.start-panel .lead{margin:4px 0 7px;line-height:1.25}.mode-card{min-height:72px;padding:7px}.mode-icon{font-size:19px}.start-facts,.legal-mini{display:none}
  .loading-status{margin-top:102px}.loading-detail{margin-top:126px}.loading-progress-track{margin-top:150px}
}

/* Start/Laden: Touch-Bedienung nicht unter Dialogen durchscheinen lassen. */
#game-shell:has(.loading-screen:not(.hidden)) .touch-controls,
#game-shell:has(.start-screen:not([hidden])) .touch-controls{opacity:0;pointer-events:none}

.ground-tool-switch{gap:4px;margin:5px 0}.ground-tool-switch button{min-height:32px;font-size:7px;padding:4px 3px}.ground-tool-meta{grid-template-columns:1fr 1fr 1fr 1fr}

/* 0.5.6.8 · Mobile readability + touch-target pass */
.mobile-quick-actions button{min-height:42px;font-size:9px;padding:6px 3px}
.telemetry-head .eyebrow{font-size:9px}.telemetry-head strong{font-size:10px}
.telemetry-core .telemetry-row{padding:5px 0;font-size:9px}.telemetry-core .telemetry-row strong{font-size:9px;max-width:104px}
.hud-section>summary{min-height:42px;padding:8px 8px;font-size:9px}.hud-section>summary b{font-size:8px;max-width:92px}
.hud-actions .wide-btn{min-height:42px;font-size:9px;padding:7px 6px}
.touch-controls button{min-width:50px;min-height:48px}.touch-actions button{font-size:9px;padding:5px 3px}
.artifact-panel-head strong{font-size:12px}.artifact-panel-head .eyebrow{font-size:8px}.artifact-icon-btn{width:40px;height:38px}
.artifact-risk{padding:7px 8px;font-size:9px}.artifact-preview-grid{gap:0 6px;font-size:8px}.artifact-preview-grid span,.artifact-preview-grid strong{padding:5px 0}.artifact-preview-grid strong{max-width:68px}
.ground-wand-panel #ground-wand-note{font-size:9px;line-height:1.35}
.ground-wand-modes button,.ground-wand-falloff button,.ground-wand-quickbar button,.ground-wand-presets button,.ground-tool-switch button{min-height:40px;font-size:8px;padding:6px 4px}
.ground-wand-falloff>span,.ground-wand-slider{font-size:8px}.ground-wand-slider{grid-template-columns:92px 1fr;padding:6px 0}
.ground-apply-primary span{font-size:8px}.ground-apply-primary button{min-height:44px;font-size:10px}
.artifact-size-row button,.artifact-action-row button,.artifact-manager-actions button,.world-tool-tabs button,.world-tool-safety button,.world-tool-actions button{min-height:40px;font-size:8px;padding:6px 5px}
.ground-grid-legend{min-height:36px;font-size:8px}.ground-grid-legend .g{width:7px;height:7px}
.start-panel .lead{font-size:11px;line-height:1.4}.mode-card small{font-size:9px}.start-facts span{font-size:9px;line-height:1.25}.legal-mini{font-size:8px!important;line-height:1.35}.start-tech-details>summary{font-size:9px;min-height:38px;display:flex;align-items:center}
.telemetry.hud-hub,.artifact-editor-panel,.artifact-manager-panel,.world-repair-panel,.ground-wand-panel{scrollbar-width:auto}
.telemetry.hud-hub::-webkit-scrollbar,.artifact-editor-panel::-webkit-scrollbar,.artifact-manager-panel::-webkit-scrollbar,.world-repair-panel::-webkit-scrollbar,.ground-wand-panel::-webkit-scrollbar{width:9px}
@media (max-height:600px) and (orientation:landscape){.touch-controls button{min-height:42px}.mobile-quick-actions button{min-height:38px}.hud-section>summary{min-height:38px}.hud-actions .wide-btn{min-height:38px}}

/* 0.5.6.8 · finaler Lesbarkeits-Pass: kompakt, aber nicht mikroskopisch. */
.credits-bar,.credits-bar a{font-size:8px}
.mobile-quick-actions button{font-size:10px}
.telemetry-core .telemetry-row,.telemetry-core .telemetry-row strong{font-size:10px}
.hud-section>summary{font-size:10px}.hud-section>summary b{font-size:9px}
.hud-actions .wide-btn,.touch-actions button{font-size:10px}
.ground-wand-modes button,.ground-wand-falloff button,.ground-wand-quickbar button,.ground-wand-presets button,.ground-tool-switch button{font-size:9px}
.artifact-size-row button,.artifact-action-row button,.artifact-manager-actions button,.world-tool-tabs button,.world-tool-safety button,.world-tool-actions button{font-size:9px}
.start-tech-details>summary,.start-facts span{font-size:10px}.legal-mini{font-size:9px!important}

/* 0.5.6.8 · Admin-Leitstand mobil */
.admin-control-overlay{padding:4px!important;place-items:stretch!important}.admin-control-shell{width:100%!important;height:calc(var(--so3d-vh,100dvh) - 8px)!important;min-height:0!important}.admin-control-head{padding:7px 8px}.admin-control-head strong{font-size:12px}.admin-control-tabs{padding:5px;gap:4px}.admin-control-tabs button{min-height:44px;font-size:9px;padding:7px 9px}.admin-control-foot{font-size:8px;padding:5px 7px}.admin-control-head-actions .artifact-icon-btn{width:42px;height:40px}.admin-action{font-size:9px!important}

/* 0.5.7.1 · kontextabhängiger Bus-Button */
.bus-interaction-prompt{display:none!important}
.touch-actions .touch-bus-interact{grid-column:1/-1;min-height:52px!important;font-size:10px!important;font-weight:900;border-color:rgba(85,255,155,.72)!important;background:rgba(5,45,25,.94)!important}
body.bus-passenger .touch-pad{opacity:.18;pointer-events:none}
body.bus-passenger #touch-jump,body.bus-passenger #touch-mode,body.bus-passenger #touch-road{opacity:.26;pointer-events:none}

.touch-actions .touch-bus-interact:disabled{opacity:.72!important;border-color:rgba(255,220,90,.48)!important;color:#ffe99a!important;background:rgba(35,30,7,.92)!important}

/* 0.5.7.3 · Lichttaste */
.touch-actions #touch-light{font-weight:850;border-color:rgba(255,239,170,.46);}
