/* Preserve the original DECK theme. Only layout and touch improvements. */
.drawer:not(.open){visibility:hidden;box-shadow:none}
.cockpit-runtime-note{font-size:11px;color:var(--dim);line-height:1.7;border-bottom:1px solid var(--line);padding-bottom:8px}
.deck-site-links{display:flex;gap:12px;font-size:11px;align-items:center;margin-left:auto}
.deck-site-links a,.deck-site-links button{color:var(--cyan);white-space:nowrap}
.deck-site-links button{background:none;border:1px solid var(--line2);padding:4px 8px}
.wb-mobile-project-toggle{display:none}
@media(max-width:900px){
 .railL{position:sticky;top:50px;z-index:40;background:var(--surface)}
 .navcol{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%}
 .navcol a{min-height:44px;justify-content:center;align-items:center;white-space:nowrap;padding:6px 2px;font-size:12px;gap:4px}
 .navcol .k{display:none}.navcol .foot{display:none}
 .topbar{gap:8px}.topbar .chip{display:none}.topbar .right{margin-left:0}
 .topbar .clock{display:none}.brand{font-size:12px;letter-spacing:.12em}
 body.workbench-mode .railL{position:static}
 body.workbench-mode .wb-side{flex:0 0 44px;height:44px;overflow:hidden}
 body.workbench-mode.wb-projects-open .wb-side{flex:0 0 280px;height:280px;overflow:auto}
 body.workbench-mode:not(.wb-projects-open) .wb-side>.wb-card{display:none}
 .wb-mobile-project-toggle{display:block;min-height:44px;flex-shrink:0;width:100%;text-align:left;background:var(--panel);color:var(--cyan);border:1px solid var(--line2);padding:8px 12px}
 body.workbench-mode .wb-kv{flex-wrap:wrap}
}
@media(max-width:760px){
 .main>*{min-width:0;max-width:100%}.main{overflow-x:hidden}
 .cols,.cols2,.cols3{grid-template-columns:minmax(0,1fr)!important}
 .tblwrap,.table-wrap,.table-scroll{overflow-x:auto;max-width:100%}
 button,a.btn,input,select{min-height:44px}input,textarea,select{font-size:16px;max-width:100%}
 .seg{display:flex;flex-wrap:wrap}.seg button{flex:1;padding:8px}
 .drawer{width:min(100%,460px)!important}
 .mc-root{padding:4px 0 20px}.mc-root .mc-sec-hd strong{font-size:16px}
 .mc-root .mc-sec{padding:12px 8px}.mc-root .mc-govtop{font-size:11px}
 .mc-cand-grid,.mc-diag-grid,.mc-card-meta{grid-template-columns:minmax(0,1fr)}
 .mc-root [class^="mc-"],.mon-root [class^="mon-"]{min-width:0;overflow-wrap:anywhere}
 .deckfoot .keys{display:none}.deckfoot .tape-wrap{height:40px}
 .wb-form{flex-direction:column;align-items:stretch}.wb-form label{width:100%;min-width:0!important}
 .wb-table{font-size:11px}.wb-body{padding:10px}.wb-kv span{max-width:100%;overflow-wrap:anywhere}
 .wb-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}
 .wb-tab{white-space:normal;min-height:44px;padding:8px 4px}
 #wb-head{padding:8px}#wb-head h3{font-size:14px}.wb-mono{overflow-wrap:anywhere}
}
@media(max-width:360px){.deck-site-links{gap:6px;font-size:10px}.topbar .right{display:none}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* Mobile content is visible immediately; the radar keeps its own animation. */
@media(max-width:900px){
 #boot,#sweepline{display:none}
 #app,#app.on,.enter .plate,.on .plate{opacity:1;transform:none;transition:none}
}

/* Mobile keeps the original palette with one-row navigation and readable data. */
.mobile-panel-toggle{display:none}
@media(max-width:900px){
 #stars,.nebula,.grain,.vig{display:none}
 .topbar{background:var(--surface);backdrop-filter:none;padding-top:env(safe-area-inset-top);height:calc(50px + env(safe-area-inset-top))}
 .railL,body.workbench-mode .railL{padding:0 8px;height:49px;min-height:49px;flex:0 0 49px;overflow:hidden;top:calc(50px + env(safe-area-inset-top))}
 .navcol,body.workbench-mode .navcol{display:flex;flex-direction:row;flex-wrap:nowrap;gap:2px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;touch-action:pan-x;overscroll-behavior-x:contain;width:100%}
 .navcol::-webkit-scrollbar{display:none}
 .navcol a,body.workbench-mode .navcol a{flex:0 0 auto;min-height:48px;padding:8px 12px;font-size:13px;gap:0}
 .navcol .k,.navcol .sep,.navcol .foot{display:none}
 .frame,.main{min-width:0}
 .main{padding-bottom:calc(56px + env(safe-area-inset-bottom))}
 .plate{clip-path:none;contain:layout style}
 #view > .plate.mobile-panel-closed > :not(.ph){display:none}
 #view > .plate:not(#user-radar-plate) > .ph{padding:12px 10px;gap:6px}
 .mobile-panel-toggle{display:inline-flex;align-items:center;justify-content:center;margin-left:auto;min-width:48px;min-height:44px;border:1px solid var(--line2);background:var(--surface);color:var(--cyan);font-size:12px;padding:6px 10px}
 #view > .plate .ph .src{font-size:11px;letter-spacing:0;overflow-wrap:anywhere;flex:1 0 100%;order:4;margin-left:0}
 .radarbox{min-height:280px;padding:32px 10px 24px}
 .radar{width:218px;height:218px}
 .clabel{font-size:8px;letter-spacing:.12em;bottom:-10px}
 .corner-meta.br{font-size:7px;bottom:2px}
 .ihead,.irow{grid-template-columns:66px minmax(0,1fr) 48px 50px 54px;gap:4px;padding:9px 8px}
 .irow{font-size:12px;min-height:44px}
 .deckfoot{padding-bottom:env(safe-area-inset-bottom)}
 .main table{font-size:12px}
 .main .seg button{white-space:nowrap;flex:0 0 auto;min-width:52px}
 .ph .t{font-size:14px}
 input,select,textarea,.wb-form input,.wb-form select,.wb-form textarea{font-size:16px}
 button,a.btn{touch-action:manipulation}
 .wb-drawer{z-index:100;max-width:100vw;height:100dvh;padding-bottom:calc(16px + env(safe-area-inset-bottom))}
 .wb-drawer-mask{z-index:95}
 body.workbench-mode .frame{display:flex;flex-direction:column}
 body.workbench-mode #view{flex:1;height:0;padding:8px;min-height:0}
 body.workbench-mode #workbench-root{flex-direction:column;gap:8px}
 body.workbench-mode .wb-main{height:0;flex:1;min-height:0}
 body.workbench-mode .wb-side{width:100%;flex:0 0 44px;height:44px}
 body.workbench-mode.wb-projects-open .wb-side{flex:0 0 min(280px,42dvh);height:min(280px,42dvh);overflow:hidden}
 body.workbench-mode.wb-projects-open .wb-project-card{min-height:0;flex:1}
 body.workbench-mode.wb-projects-open .wb-side > .wb-card:nth-child(3){flex-shrink:0;padding:6px 8px}
 body.workbench-mode.wb-projects-open .wb-side > .wb-card:nth-child(3) h3{display:none}
 body.workbench-mode.wb-projects-open .wb-side .wb-cap-card{display:none}
 body.workbench-mode .wb-tabs{display:flex;flex-wrap:nowrap;overflow:auto;gap:3px}
 body.workbench-mode .wb-tab{flex:1 0 auto;min-height:44px;white-space:nowrap;font-size:12px;padding:8px 7px}
 body.workbench-mode #wb-head{max-height:120px;overflow:auto;flex-shrink:0}
 body.workbench-mode #wb-head h3{margin:0;font-size:14px;line-height:1.5}
 body.workbench-mode .wb-body{padding:10px;overflow:auto;font-size:13px;line-height:1.65;-webkit-overflow-scrolling:touch}
 .wb-body .wb-note{font-size:12px}
 .wb-body .wb-form label{font-size:12px}
 .wb-body .wb-scroll{max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch}
 .wb-body .wb-table{font-size:12px;min-width:520px}
 .wb-body .wb-btn{font-size:13px;min-height:44px}
 body.workbench-mode{padding-bottom:env(safe-area-inset-bottom)}
}
@media(max-width:380px){
 .ihead,.irow{grid-template-columns:58px minmax(0,1fr) 42px 44px 48px;font-size:11px}
 .wb-tab{padding-inline:5px!important;font-size:11px!important}
}

.wb-project-details summary{display:flex;align-items:center;gap:8px;cursor:pointer}
.wb-project-details summary h3{flex:1;min-width:0;font-size:14px;overflow-wrap:anywhere}
.wb-project-details summary span{display:none}
@media(max-width:900px){
 .wb-project-details summary{min-height:36px}
 .wb-project-details summary span{display:block;color:var(--cyan);font-size:11px;white-space:nowrap}
 .wb-project-details[open] summary span{color:var(--dim)}
 body.workbench-mode #wb-head{padding:6px 10px}
 .wb-scroll,.tblwrap,.table-wrap,.table-scroll{touch-action:pan-x pan-y;overscroll-behavior-x:contain}
}
