/* Phone 3D workspace. Desktop panels stay in their original DOM positions. */
#mobile-workspace-nav,#mobile-alarm-peek,.mobile-sheet{display:none}
@media(max-width:760px), (max-width:1000px) and (max-height:500px){
 :root{--mobile-safe:env(safe-area-inset-bottom,0px)}body{min-width:0!important}
 #topbar,body[data-level="campus"] #topbar{height:82px!important;min-height:0;padding:8px 14px 6px!important;display:flex;flex-wrap:wrap;gap:3px 8px;align-content:center;background:linear-gradient(180deg,#030f17f5,#04121ad1)!important;backdrop-filter:blur(14px)}
 #topbar .brand{width:100%;gap:8px}#topbar .system-logo{width:25px;height:25px}#topbar #brand-title{font-size:13px;letter-spacing:.4px;white-space:nowrap}#topbar #brand-sub{display:none}
 #topbar #level-tabs,body[data-level="campus"] #level-tabs{height:28px;min-height:0;flex:1;align-self:auto;justify-content:center;clip-path:none;border:0;padding:0!important;background:transparent;gap:5px}
 #topbar .lvl-tab,body[data-level="campus"] #topbar .lvl-tab{min-width:0;flex:1;font-size:11px;padding:5px 10px!important;border-radius:7px;height:28px;letter-spacing:1px}
 #panel-left,#panel-right{display:none!important}#stage,#campus-visual{left:0!important;width:100%!important;right:0!important}
 #mobile-workspace-nav{position:fixed;z-index:32;bottom:calc(10px + var(--mobile-safe));left:12px;right:12px;height:58px;display:grid;grid-template-columns:repeat(4,1fr);padding:4px;border:1px solid #74cbd52b;border-top-color:#b5e4ed3a;border-radius:19px;background:linear-gradient(140deg,#112c3be8,#071923ed);backdrop-filter:blur(20px) saturate(125%);box-shadow:inset 0 1px #e3faff0d,0 8px 32px #0007}
 #mobile-workspace-nav button{position:relative;display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;background:none;border:0;color:#a3bbc7;font:10px/1.2 'Microsoft YaHei',sans-serif;border-radius:13px;min-width:44px;min-height:44px;cursor:pointer}
 #mobile-workspace-nav button:active{background:#67d9d512;color:#b3fff3}#mobile-workspace-nav button[data-mobile-open="alarm"]{color:#f0bd75}#mobile-workspace-nav b{position:absolute;top:1px;left:calc(50% + 9px);padding:1px 4px;min-width:15px;border:1px solid #fb9b663b;border-radius:8px;background:#783426;color:#ffdfc3;font-size:9px}
 #mobile-alarm-peek{position:fixed;z-index:30;bottom:calc(124px + var(--mobile-safe));left:14px;right:14px;height:49px;display:flex;align-items:center;gap:10px;padding:8px 12px;border:1px solid #e6b17928;border-left:2px solid #ecaa56;border-radius:12px;background:linear-gradient(110deg,#17262ce8,#081d29dc);backdrop-filter:blur(14px);box-shadow:0 5px 22px #0005;text-align:left;color:#ebbd84}
 #mobile-alarm-peek>span:first-of-type{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}#mobile-alarm-peek b{font:500 11px/1.3 'Microsoft YaHei',sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#e9f2f6}#mobile-alarm-peek small{font:9px/1.2 'Microsoft YaHei',sans-serif;color:#86a4b3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#mobile-alarm-peek[data-severity="critical"]{border-left-color:#ff775d}#mobile-alarm-peek[data-severity="normal"]{border-left-color:#46ccc0;color:#69d6cb}
 #bottom-bar{bottom:calc(78px + var(--mobile-safe))!important;left:12px!important;right:12px!important;transform:none!important;max-width:none!important;justify-content:center;gap:5px;flex-wrap:wrap;padding:0!important;background:none!important;border:0!important;box-shadow:none!important}
 #bottom-bar button{padding:7px 9px!important;min-height:32px;font-size:10px!important}#breadcrumb{font-size:10px!important;padding:7px 9px!important;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 #agent-presence{position:fixed!important;top:92px!important;left:12px!important;right:12px!important;width:auto!important;min-width:0!important;max-width:none!important;transform:none!important;margin:0;border-radius:13px!important;background:linear-gradient(120deg,#092935e8,#061b28e8)!important;backdrop-filter:blur(16px)!important;z-index:29!important}
 #agent-presence header{height:30px;padding:3px 9px!important}#agent-presence header strong{font-size:11px!important}#agent-presence header small{font-size:8px!important}#agent-presence .agent-duty-orb{width:25px!important;height:25px!important}
 #agent-presence .agent-presence-body{max-height:160px!important;overflow:auto}
 #agent-presence .agent-flow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:30px 36px!important;gap:5px!important;padding:0 8px 8px!important}
 #agent-presence .flow-analysis{grid-column:1/4!important;grid-row:1!important;padding:3px 7px!important;gap:7px!important}#agent-presence .flow-icon-badge{width:21px!important;height:21px!important}#agent-presence .flow-icon-badge .flow-icon{width:15px!important;height:15px!important}#agent-presence .flow-analysis-copy{flex-direction:row!important;align-items:center;gap:8px!important}#agent-presence .flow-analysis-copy>small{display:none!important}#agent-presence .flow-analysis-metrics{flex-wrap:nowrap!important;gap:4px!important}#agent-presence .flow-analysis-metrics b{font-size:17px!important}#agent-presence .flow-analysis-metrics small{font-size:8px!important}
 #agent-presence .flow-automatic{grid-column:1!important;grid-row:2!important}#agent-presence .flow-human{grid-column:2!important;grid-row:2!important}#agent-presence .flow-verification{grid-column:3!important;grid-row:2!important}#agent-presence .flow-human-cta,#agent-presence .agent-flow-split,#agent-presence .agent-flow-next{display:none!important}
 #agent-presence .agent-flow button{padding:4px 5px!important;gap:4px!important}#agent-presence .flow-lane>.flow-icon,#agent-presence .flow-verification>.flow-icon{width:14px!important;height:14px!important}#agent-presence .agent-flow strong{font-size:9px!important;white-space:nowrap}#agent-presence .flow-lane b{font-size:17px!important}#agent-presence .flow-lane>span:not(.flow-icon)>small{display:none!important}#agent-presence .flow-verification small{font-size:7px!important;white-space:nowrap}#agent-presence .agent-activity,#agent-presence footer{display:none!important}
 .mobile-sheet.is-open{display:block;position:fixed;inset:0;z-index:1000}.mobile-sheet-backdrop{position:absolute;inset:0;background:#0009;backdrop-filter:blur(5px)}
 .mobile-sheet-container{position:absolute;bottom:0;left:0;right:0;max-height:83dvh;display:flex;flex-direction:column;border:1px solid #8fced33d;border-bottom:0;border-radius:24px 24px 0 0;background:linear-gradient(135deg,#153241f5,#071b29fa);box-shadow:inset 0 1px #e5ffff12,0 -16px 60px #0006;padding:8px 14px calc(14px + var(--mobile-safe));animation:mobile-sheet-enter .23s cubic-bezier(.2,.8,.2,1);outline:none}
 .mobile-sheet-handle{width:34px;height:4px;border-radius:5px;background:#a1c5d04a;align-self:center;margin-bottom:6px}.mobile-sheet-container>header{display:flex;align-items:center;justify-content:space-between;padding:1px 0 10px;border-bottom:1px solid #a6d9e318;gap:10px;flex-shrink:0}.mobile-sheet-container h2{font:600 16px/1.4 'Microsoft YaHei',sans-serif;margin:0;color:#e0f3f8}.mobile-sheet-container>header button{width:44px;height:38px;display:grid;place-items:center;border:1px solid #b5e3e31c;border-radius:12px;background:#c0e9ff09;color:#b4d1df;cursor:pointer}
 .mobile-sheet-content{min-height:0;overflow:auto;overscroll-behavior:contain;padding-top:12px;scrollbar-width:thin;scrollbar-color:#77c5c83d transparent}
 .mobile-sheet #panel-left,.mobile-sheet #panel-right,body[data-level] .mobile-sheet #panel-left,body[data-level] .mobile-sheet #panel-right{position:static!important;display:flex!important;flex-direction:column;gap:12px;inset:auto!important;width:100%!important;max-height:none!important;height:auto!important;overflow:visible!important;padding:0!important;transform:none!important;opacity:1!important;pointer-events:auto!important}
 .mobile-sheet .panel,body[data-level="campus"] .mobile-sheet #panel-right .panel{width:100%!important;background:linear-gradient(120deg,#0a2332b8,#071c2acc)!important;border-radius:13px!important;padding:13px!important;box-sizing:border-box}
 #mobile-data[data-mode="data"] .alarm-card{display:none!important}#mobile-data[data-mode="alarm"] #panel-right>.panel:not(.alarm-card){display:none!important}
 .mobile-sheet .topbar-right{display:flex!important;flex-direction:column;align-items:stretch;gap:10px}.mobile-sheet .topbar-right button{display:block!important;padding:14px!important;min-height:46px;font-size:13px}.mobile-sheet .clock-box{display:none!important}.mobile-sheet .tree-item{min-height:42px;display:flex;align-items:center}.mobile-sheet .alarm-item{width:100%;min-height:70px}.mobile-sheet .spatial-map-wrap{min-height:220px}
 #ops-dialog{width:calc(100vw - 16px)!important;max-height:calc(100dvh - 24px)!important;margin:auto!important}#ai-modal .ai-box{width:calc(100vw - 24px)!important;max-height:80dvh}
 @keyframes mobile-sheet-enter{from{transform:translateY(35px);opacity:.6}to{transform:translateY(0);opacity:1}}
}
@media(max-width:1000px) and (max-height:500px){#topbar,body[data-level="campus"] #topbar{height:48px!important;flex-wrap:nowrap}#topbar .brand{width:auto}#topbar #brand-title{max-width:140px;overflow:hidden;text-overflow:ellipsis}#agent-presence{top:56px!important;left:10px!important;right:auto!important;width:330px!important}#mobile-alarm-peek{left:auto;right:10px;width:230px;bottom:80px}#mobile-workspace-nav{left:auto;width:270px;height:52px;bottom:8px}#bottom-bar{right:auto!important;bottom:12px!important;max-width:calc(100vw - 310px)!important}.mobile-sheet-container{max-height:91dvh}}
.mobile-sheet-container>header button svg{pointer-events:none}
@media(prefers-reduced-motion:reduce){.mobile-sheet-container{animation:none!important}}
