/* Display-only layers. No effect layer captures clicks or changes OS layout. */
body.crt-enabled:not(.power-off):not(.expanded) #screen-anchor{
 box-shadow:0 0 12px 3px #d5baff65,0 0 36px 8px #b395fa35,0 0 72px 12px #9978ed16;
}
body.crt-enabled:not(.power-off) #screen-anchor::before,
body.crt-enabled:not(.power-off) #screen-anchor::after{
 content:"";position:absolute;inset:0;z-index:12;pointer-events:none;border-radius:inherit;
}
body.crt-enabled:not(.power-off) #screen-anchor::before{
 background:linear-gradient(122deg,#ffffff18 0%,#ffffff04 30%,transparent 47%),radial-gradient(ellipse at 50% 46%,transparent 45%,#0b051b16 74%,#07031088 100%);
 box-shadow:inset 0 0 13px #10062066,inset 0 1px 3px #ede3ff88;
}
body.crt-enabled:not(.power-off) #screen-anchor::after{
 background:repeating-linear-gradient(to bottom,transparent 0px,transparent 2px,#08041824 2px,#08041824 3px),repeating-linear-gradient(to right,#ff485806 0px,#ff485806 1px,#59ff9406 1px,#59ff9406 2px,#608aff06 2px,#608aff06 3px);
 opacity:.55;
}
body.crt-enabled:not(.power-off):not(.video-mode) #screen-ui{filter:brightness(1.055) saturate(1.06);text-shadow:.3px 0 #ff77772b,-.3px 0 #80cfff2b}
/* Curved-mesh video gets its scanlines in the shader, avoiding doubled patterns. */
body.crt-enabled.video-mode:not(.expanded) #screen-anchor::after{opacity:.18}
body.expanded.crt-enabled:not(.power-off) #screen-anchor::before{box-shadow:inset 0 0 18px #10062044;background:radial-gradient(ellipse at 50% 46%,transparent 65%,#08041827 100%)}
body.expanded.crt-enabled:not(.power-off) #screen-anchor::after{opacity:.28}
body.crt-enabled:not(.power-off) #boot strong{color:#e9d7ff;text-shadow:0 0 9px #c49aff88}
#crt-power-flash{position:absolute;inset:0;z-index:18;pointer-events:none;opacity:0;background:radial-gradient(ellipse,#f3ebff 0%,#c4a2ef 38%,transparent 75%);transform-origin:center}
#crt-power-flash.crt-start{animation:crt-warmup 420ms ease-out both}
#crt-power-flash.crt-stop{animation:crt-collapse 250ms ease-out both}
@keyframes crt-warmup{0%{opacity:.7;transform:scale(.08,.006)}35%{opacity:.55;transform:scale(.96,.012)}72%{opacity:.12;transform:scale(1,.85)}100%{opacity:0;transform:scale(1)}}
@keyframes crt-collapse{0%{opacity:.3;transform:scale(.95,.018)}45%{opacity:.6;transform:scale(.4,.006)}100%{opacity:0;transform:scale(.005,.003)}}
@media(prefers-reduced-motion:reduce){#crt-power-flash{display:none!important}body.crt-enabled:not(.power-off) #screen-anchor::after{opacity:.28}}
.crt-motion-layer{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:13;border-radius:inherit}
/* The procedural layer owns scanlines, avoiding two stacked line patterns. */
body.crt-enabled:not(.power-off) #screen-anchor::after{background:repeating-linear-gradient(to right,#ff485806 0px,#ff485806 1px,#59ff9406 1px,#59ff9406 2px,#608aff06 2px,#608aff06 3px);opacity:.35}
@media(max-width:700px){body.expanded #screen-anchor{height:calc(100dvh - 215px)!important}body.expanded .toolbar{min-height:126px;align-content:center}}
/* Clean revision: remove grain-like grids and chromatic text shadows. */
body.crt-enabled:not(.power-off) #screen-anchor::after{display:none}
body.crt-enabled:not(.power-off):not(.video-mode) #screen-ui{filter:none;text-shadow:none}
#desktop{background-image:none}
body.crt-enabled:not(.power-off) #screen-anchor::before{background:linear-gradient(125deg,#ffffff09,transparent 40%),radial-gradient(ellipse at 50% 48%,transparent 70%,#07031028 100%);box-shadow:inset 0 0 5px #10062022}
/* Phosphor emission: brighter image and a soft light spill onto the bezel. */
body.crt-enabled:not(.power-off):not(.video-mode) #screen-ui{filter:brightness(1.14) saturate(1.06);text-shadow:none}
body.crt-enabled:not(.power-off):not(.expanded) #screen-anchor{box-shadow:0 0 7px 3px #eee3ffb0,0 0 22px 8px #dcc8ff78,0 0 48px 15px #baa0f445,0 0 85px 22px #a589e51c}
body.crt-enabled:not(.power-off) #screen-anchor::before{background:linear-gradient(125deg,#ffffff10,transparent 43%),radial-gradient(ellipse at 50% 48%,transparent 72%,#07031020 100%);box-shadow:inset 0 0 9px #eee3ff30,inset 0 1px 3px #ffffff60}
body.expanded.crt-enabled:not(.power-off) #screen-anchor{box-shadow:0 0 22px #d1b6ff66,0 0 0 100vmax #16121bec}
body.expanded.crt-enabled:not(.power-off) #expanded-video-host video{filter:brightness(1.12) saturate(1.04)}
/* Monitor-only controls: no footer toolbar space in expanded mode. */
.hardware-hit{min-width:44px;min-height:44px}
@media(max-width:700px){body.expanded #screen-anchor{height:calc(100dvh - 90px)!important}}
.boot-progress{width:58%;height:13px;padding:2px;border:1px solid #cdb5ef;background:#100b17;overflow:hidden}
.boot-progress span{display:block;height:100%;background:repeating-linear-gradient(90deg,#c9a3ff 0 9px,transparent 9px 12px);transform:scaleX(0);transform-origin:left}
body.booting .boot-progress span{animation:crt-boot-load 2.1s linear forwards}
.boot-hint{opacity:.7;font-size:9px!important;letter-spacing:1px}
@keyframes crt-boot-load{0%{transform:scaleX(.02)}25%{transform:scaleX(.25)}40%{transform:scaleX(.28)}72%{transform:scaleX(.72)}88%{transform:scaleX(.8)}100%{transform:scaleX(1)}}
@media(prefers-reduced-motion:reduce){body:not(.preview-motion).booting .boot-progress span{animation:none;transform:scaleX(1)}body.preview-motion #crt-power-flash{display:block!important}}
body.preview-motion.booting .boot-progress span{animation:crt-boot-load 2.1s linear forwards!important}

/* Reveal the actual curved 3D glass when the display is off. */
body.power-off:not(.expanded) #screen-anchor,body.power-off:not(.expanded) #screen-ui,body.power-off:not(.expanded) #standby{background:transparent;box-shadow:none}
body.power-off:not(.expanded) #screen-anchor::before,body.power-off:not(.expanded) #screen-anchor::after{opacity:0}

/* The powered monitor halo is now rendered by the selective 3D bloom pass. */
body.crt-enabled:not(.power-off):not(.expanded) #screen-anchor{box-shadow:none}

/* Sharp mint cores with limited bloom; no expensive full-screen blur. */
body.phosphor-theme.crt-enabled:not(.power-off):not(.video-mode) #screen-ui{filter:brightness(1.12);text-shadow:0 0 3px #78ffb45c}
body.phosphor-theme.crt-enabled:not(.power-off) #boot strong{color:#d1ffe6;text-shadow:0 0 7px #78ffb488}
body.phosphor-theme.crt-enabled:not(.power-off) #screen-anchor::before{background:linear-gradient(125deg,#c8ffe50a,transparent 43%),radial-gradient(ellipse at 50% 48%,transparent 64%,#010c0866 100%);box-shadow:inset 0 0 10px #72ffb333,inset 0 1px 3px #c4ffe466}
body.phosphor-theme.expanded.crt-enabled:not(.power-off) #screen-anchor{box-shadow:0 0 22px #74ffb466,0 0 0 100vmax #06150eec}
body.phosphor-theme #crt-power-flash{background:radial-gradient(ellipse,#e1ffee 0%,#85ffc2 38%,transparent 75%)}
