/* Desktop-only composition; mobile rules and paint remain unchanged. */
body:not(.mobile-app){padding:16px 20px!important}
body:not(.mobile-app) #shell#shell#shell{width:var(--desktop-width,calc(100vw - 40px))!important;max-width:1600px!important;min-width:1040px!important;height:var(--desktop-height,min(880px,calc(100dvh - 32px)))!important;min-height:620px!important;grid-template-columns:48% 52%;grid-template-rows:140px minmax(0,1fr)!important;}
body:not(.mobile-app) #shell#shell#shell>header{grid-column:1/3;grid-row:1}
body:not(.mobile-app) #shell#shell#shell>.dashboard{grid-column:1/3;grid-row:2;display:grid!important;grid-template-columns:minmax(0,48fr) minmax(0,52fr);grid-template-rows:24px 58px 300px 76px;column-gap:40px!important;row-gap:8px!important;padding:0 32px 16px!important;align-content:start;align-items:start;overflow:auto!important;}
body:not(.mobile-app) #shell#shell#shell .telemetry-label{grid-column:1/3;grid-row:1;}
body:not(.mobile-app) #shell#shell#shell .hud-console{grid-column:1;grid-row:2/5;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:32px 30px!important;padding:0!important;overflow:visible;background:none;align-items:start;}
body:not(.mobile-app) #shell#shell#shell .hud-unit{display:flex;flex-direction:column;align-items:center;}
body:not(.mobile-app) #shell#shell#shell .mobile-tabs{grid-column:2;grid-row:2;align-self:start;}
body:not(.mobile-app) #shell#shell#shell .dashboard-grid{grid-column:2;grid-row:3;min-height:300px!important;height:300px!important;}
body:not(.mobile-app) #shell#shell#shell .dashboard-grid>.main-card{height:300px!important;min-height:300px!important;}
body:not(.mobile-app) #shell#shell#shell .dashboard>footer{grid-column:2;grid-row:4;min-height:0!important;padding:16px 0 16px!important;align-items:flex-start;}
body:not(.mobile-app) #shell#shell#shell .main-card .portfolio-legend{flex-wrap:wrap!important;}
/* Keep crisp vector cores; avoid a second broad glow around the whole SVG. */
body:not(.mobile-app) #shell#shell#shell .hud-face{filter:none!important;transform:none!important;}
body:not(.mobile-app) #shell#shell#shell .hud-face svg{shape-rendering:geometricPrecision;text-rendering:geometricPrecision;}
body:not(.mobile-app) #shell#shell#shell .hud-face .lit{filter:drop-shadow(0 0 .7px #00eaff88);}
body:not(.mobile-app) #shell#shell#shell .attention-hud .phase-segment.complete{filter:drop-shadow(0 0 .6px currentColor);}
#desktop-window-tools{position:fixed;z-index:1000;display:flex;gap:6px;align-items:center;background:none;border:0;}
#desktop-window-tools #view-control,#desktop-window-tools #window-collapse,#desktop-window-tools #window-close{position:static;inset:auto;margin:0;height:32px;min-height:32px;display:flex;align-items:center;gap:4px;padding:0 7px;font:11px system-ui;border:1px solid #9bdae52b;background:#0b1c2444;border-radius:4px;color:#c9e9ed;}
#desktop-window-tools #view-control{padding:0;border:0;background:none;}
#desktop-window-tools #view-choice{height:32px;min-height:32px;font-size:10px;max-width:86px;}
#desktop-window-tools button{width:32px;justify-content:center;}
body.mobile-app #desktop-window-tools,body.window-collapsed #desktop-window-tools,body.workspace-closed #desktop-window-tools{display:none!important;}
#shell#shell#shell #window-resize{position:absolute;display:block;right:22px;bottom:24px;z-index:30;width:30px;height:30px;min-height:30px;padding:0;background:transparent;border:0;color:#b8e4e9;cursor:nwse-resize;touch-action:none;font-size:22px;}
body.mobile-app #shell#shell#shell #window-resize{display:none!important;}
#workspace-close-dialog{max-width:430px;padding:28px;background:#0b1a23;color:#dbedf0;border:1px solid #8ad4dd77;}
#workspace-close-dialog::backdrop{background:#02080bc9;}
#workspace-close-dialog button{margin:8px 8px 0 0;min-height:40px;}
body.workspace-closed #shell,body.workspace-closed #layers{visibility:hidden!important;pointer-events:none;}
#workspace-closed{display:none;}
body.workspace-closed #workspace-closed{display:block;position:fixed;inset:0;place-content:center;text-align:center;color:#c9e9ed;background:#071017;z-index:1100;padding:24px;font:15px/1.7 system-ui;}
@media(prefers-reduced-motion:reduce){#desktop-window-tools,#shell#shell#shell{transition:none!important;animation:none!important;}}

body:not(.mobile-app){overflow:auto!important;}
body:not(.mobile-app) #shell#shell#shell .dashboard>footer .footer-actions{top:0!important;}
body:not(.mobile-app) #shell#shell#shell .main-card .summary-title{font-size:28px!important;}
body:not(.mobile-app) #shell#shell#shell .main-card .website-count strong{font-size:40px!important;}
body:not(.mobile-app) #shell#shell#shell .main-card .website-count>span{font-size:16px!important;}
body:not(.mobile-app) #shell#shell#shell .main-card .website-description,body:not(.mobile-app) #shell#shell#shell .main-card .portfolio-legend>span{font-size:13px!important;}

body:not(.mobile-app) #shell#shell#shell .dashboard>footer{display:flex;justify-content:center;align-items:flex-start;position:static;}
body:not(.mobile-app) #shell#shell#shell .dashboard>footer>span{display:none!important;}
body:not(.mobile-app) #shell#shell#shell .dashboard>footer .footer-actions{position:relative!important;left:auto!important;bottom:auto!important;transform:none!important;gap:8px!important;flex:none;width:auto;}
body:not(.mobile-app) #shell#shell#shell .dashboard>footer button{height:44px!important;min-height:44px!important;font-size:13px!important;padding:6px 12px!important;}
body:not(.mobile-app) #shell#shell#shell .dashboard>footer button[data-open=editor]{width:140px!important;}

/* Active desktop card: same center, 88% width and 112% height. */
body:not(.mobile-app) #shell#shell#shell .dashboard-grid{width:88%!important;justify-self:center;position:relative;top:-18px;height:336px!important;min-height:336px!important;}
body:not(.mobile-app) #shell#shell#shell .dashboard-grid>.main-card{height:336px!important;min-height:336px!important;}
body:not(.mobile-app) #shell#shell#shell .dashboard>footer{position:relative;top:18px;padding-top:16px!important;}

/* Desktop placement: move the card and its actions down by 12 CSS mm. */
body:not(.mobile-app) #shell#shell#shell .dashboard-grid{top:calc(-18px + 12mm);}
body:not(.mobile-app) #shell#shell#shell .dashboard>footer{top:calc(18px + 12mm);}
body:not(.mobile-app) #shell#shell#shell .mobile-tabs{width:88%!important;justify-self:center;box-sizing:border-box;}

/* Align the whole right-hand group to the bottom instrument captions. */
body:not(.mobile-app) #shell#shell#shell .mobile-tabs{position:relative;top:var(--work-align,0px);}
body:not(.mobile-app) #shell#shell#shell .dashboard-grid{top:calc(-18px + 12mm + var(--work-align,0px));}
body:not(.mobile-app) #shell#shell#shell .dashboard>footer{top:calc(18px + 12mm + var(--work-align,0px));}

/* Height-constrained desktop: reserve the footer inside the lower bevel.
   Keep instrument/card dimensions; scroll their own content areas instead of
   translating the actions beyond the shell. Normal desktop/mobile are untouched. */
body:not(.mobile-app) #shell#shell#shell.short-desktop>.dashboard{
 height:calc(100% - 24px)!important;
 grid-template-rows:24px 58px minmax(0,1fr) 76px;
 overflow:hidden!important;
}
body:not(.mobile-app) #shell#shell#shell.short-desktop .hud-console{
 height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;
 grid-template-rows:max-content max-content;
}
body:not(.mobile-app) #shell#shell#shell.short-desktop .mobile-tabs{top:0;}
body:not(.mobile-app) #shell#shell#shell.short-desktop .dashboard-grid{
 top:0;height:100%!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;
}
body:not(.mobile-app) #shell#shell#shell.short-desktop .dashboard>footer{top:0;}

/* Desktop information zone only: reserve glow clearance, fit circular faces by height.
   190px is the minimum legible face; below that budget only this zone may scroll. */
body:not(.mobile-app) #shell#shell#shell>.dashboard{overflow:hidden!important}
body:not(.mobile-app) #shell#shell#shell .hud-console{height:var(--info-height,auto)!important;box-sizing:border-box;grid-template-rows:max-content max-content;row-gap:var(--info-gap,32px)!important;padding:6px 0!important;overflow-x:hidden;overflow-y:auto;align-content:start}
body:not(.mobile-app) #shell#shell#shell .hud-console.info-fits{overflow-y:hidden}
body:not(.mobile-app) #shell#shell#shell .hud-face{--fit-face:var(--info-face,190px)}
