
/* R25: non-interactive CRT overlays, independent of content layout. */
.lab-atmosphere[hidden],.lab-crt[hidden]{display:none!important}
.lab-atmosphere{display:flex;align-items:center;justify-content:flex-end;gap:8px 14px;flex-wrap:wrap;padding:6px max(12px,calc((100% - 1120px)/2));background:var(--well,#0b100d);border-bottom:1px solid var(--line,#48574a);color:var(--muted,#a9b5a7);font:11px/1.4 var(--mono,monospace)}
.lab-atmosphere label{display:flex;align-items:center;gap:5px}
.lab-atmosphere select,.lab-atmosphere button{font:inherit;min-height:28px;padding:3px 7px;color:var(--green,#a2e3a8);background:var(--panel,#172019);border:1px solid var(--line,#48574a)}
.lab-atmosphere input[type=range]{width:64px;accent-color:var(--green,#a2e3a8)}
.lab-atmosphere .lab-hdd{white-space:nowrap;letter-spacing:.07em}
.lab-hdd::before{content:"";display:inline-block;width:7px;height:7px;margin-right:6px;border-radius:50%;background:#465044}
.lab-hdd[data-active=true]::before{background:#e7d48a;box-shadow:0 0 6px #e7d48a}
.lab-crt{position:fixed;inset:0;z-index:1000;overflow:hidden;pointer-events:none;contain:strict}
.lab-crt>*{position:absolute;inset:0;pointer-events:none}
.lab-crt-scan{background:repeating-linear-gradient(0deg,#0002 0px,#0002 1px,transparent 1px,transparent 4px);opacity:.55}
.lab-crt-vignette{box-shadow:inset 0 0 100px 10px #0005;animation:lab-crt-breathe 19s ease-in-out infinite}
.lab-crt-grain{inset:-24px;opacity:.055;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='96' height='96' filter='url(%23n)'/%3E%3C/svg%3E");animation:lab-crt-noise .8s steps(4,end) infinite}
.lab-crt-sweep{inset:auto -20% auto -20%;top:0;height:70px;background:linear-gradient(transparent,#b4eac010,#0003,transparent);animation:lab-crt-sweep 15s linear infinite;will-change:transform}
html[data-lab-crt=lite] .lab-crt-grain,html[data-lab-crt=lite] .lab-crt-sweep{display:none}
html[data-lab-crt=lite] .lab-crt-vignette{animation:none;opacity:.6}
html[data-lab-crt=lite] .lab-crt-scan{opacity:.25}
html[data-lab-crt=off] .lab-crt{display:none}
html[data-lab-crt=full] h1,html[data-lab-crt=full] .systembar{ text-shadow:0 0 5px #a2e3a829 }
html[data-lab-paused=true] .lab-crt>*{animation-play-state:paused}
@keyframes lab-crt-noise{0%,100%{transform:translate(0,0)}25%{transform:translate(11px,-7px)}50%{transform:translate(-9px,13px)}75%{transform:translate(4px,9px)}}
@keyframes lab-crt-sweep{0%{transform:translateY(-30vh) rotate(-12deg)}100%{transform:translateY(135vh) rotate(-12deg)}}
@keyframes lab-crt-breathe{0%,100%{opacity:.75}50%{opacity:1}}
@media(prefers-reduced-motion:reduce){.lab-crt-grain,.lab-crt-sweep{display:none!important}.lab-crt-vignette{animation:none!important}}
@media(max-width:600px){.lab-atmosphere{justify-content:flex-start;gap:5px 10px}.lab-crt-vignette{box-shadow:inset 0 0 45px #0004}}
@media print{.lab-crt,.lab-atmosphere{display:none!important}}

/* R26: narrow sync fault, scan raster, phosphor mask and moving grain. */
.lab-crt-scan{opacity:.88;background:repeating-linear-gradient(0deg,transparent 0 2px,rgba(0,0,0,.21) 2px 3px);mix-blend-mode:multiply}
.lab-crt-vignette{background:radial-gradient(ellipse at 50% 42%,transparent 48%,#0003 78%,#0008 100%);box-shadow:inset 0 0 35px #0005;animation:lab-crt-breathe 17s ease-in-out infinite}
.lab-crt-grain{opacity:.14;mix-blend-mode:soft-light;animation:lab-crt-noise .36s steps(1,end) infinite;inset:-24px}
.lab-crt-sweep{inset:auto -35% auto -35%;top:0;height:16px;opacity:.68;background:repeating-linear-gradient(0deg,transparent 0 2px,#0008 2px 3px,transparent 3px 5px),linear-gradient(0deg,transparent 0%,#0007 40%,#a1ffb63b 45%,#a1ffb67a 51%,#0009 57%,transparent 100%);box-shadow:none;animation:lab-sync-r26 10s linear infinite;will-change:transform}
.lab-crt-sweep::after{content:"";position:absolute;inset:4px 0;background:repeating-linear-gradient(90deg,transparent 0 12px,#ceffdf55 13px 19px,transparent 20px 48px,#0009 49px 57px,transparent 58px 80px);opacity:.64}
.lab-crt::before{content:"";position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(90deg,#ffad8d10 0 1px,#8cf7a816 1px 2px,#819dff10 2px 3px);mix-blend-mode:soft-light;opacity:.66}
.lab-crt::after{content:"";position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(0deg,transparent 0 13px,#aaffc209 13px 14px,transparent 14px 19px);opacity:.5;animation:lab-raster-r26 5s ease-in-out infinite}
html[data-lab-crt=full] :is(h1,h2,h3,.systembar,.lab-hdd){text-shadow:-.55px 0 #db755134,.65px 0 #6dffbf44,0 0 5px #9bffb63b}
html[data-lab-crt=full][data-lab-seek=true] .lab-crt-sweep{opacity:.92}
html[data-lab-crt=full][data-lab-seek=true] .lab-crt-grain{opacity:.22}
html[data-lab-crt=full][data-lab-seek=true] :is(h1,h2,.systembar){animation:lab-ghost-r26 .42s ease-out both}
html[data-lab-crt=lite] .lab-crt::before,html[data-lab-crt=lite] .lab-crt::after{display:none}
html[data-lab-crt=lite] .lab-crt-vignette{background:none;box-shadow:inset 0 0 35px #0004}
html[data-lab-paused=true] .lab-crt::after{animation-play-state:paused}
.lab-atmosphere .lab-sfx-credit{font:inherit;color:inherit;opacity:.75;text-decoration:underline;text-underline-offset:2px}
@keyframes lab-sync-r26{0%{transform:translateY(-34vh) rotate(-14deg)}70%,100%{transform:translateY(142vh) rotate(-14deg)}}
@keyframes lab-raster-r26{0%,100%{transform:translateY(-2px);opacity:.4}50%{transform:translateY(3px);opacity:.7}}
@keyframes lab-ghost-r26{0%{text-shadow:2px 0 #80ffc57a,-1px 0 #d97e5855}100%{text-shadow:-.55px 0 #db755134,.65px 0 #6dffbf44,0 0 5px #9bffb63b}}
@media(max-width:600px){.lab-crt-sweep{height:12px}.lab-crt-vignette{box-shadow:inset 0 0 26px #0005}}
@media(prefers-reduced-motion:reduce){.lab-crt::after{animation:none!important}.lab-crt-sweep,.lab-crt-grain{display:none!important}html[data-lab-seek=true] :is(h1,h2,.systembar){animation:none!important}}


/* R27: aligned console controls and horizontal sync interference. */
.lab-atmosphere{justify-content:center;align-items:center;gap:6px 10px;padding-block:9px}
.lab-atmosphere>*,.lab-atmosphere label>*{margin:0!important;align-self:center}
.lab-atmosphere label{display:inline-flex;align-items:center;white-space:nowrap;gap:5px;min-width:0}
.lab-atmosphere select,.lab-atmosphere button{box-sizing:border-box;height:34px;min-height:34px;width:auto;line-height:1.2;padding:0 8px;margin:0!important;box-shadow:none;white-space:nowrap}
.lab-atmosphere input[type=range]{width:64px;height:34px;min-height:0;padding:0;margin:0!important;box-shadow:none;border:0;background:transparent}
.lab-atmosphere .lab-hdd{display:inline-flex;align-items:center;height:34px}
.lab-atmosphere .lab-sfx-credit{display:inline-flex;align-items:center;height:34px}
@media(max-width:600px){.lab-atmosphere{display:grid;grid-template-columns:auto auto minmax(0,1fr);gap:4px 8px;justify-content:stretch;padding-inline:10px}.lab-atmosphere[hidden]{display:none!important}.lab-atmosphere .lab-hdd{grid-column:1;grid-row:1}.lab-atmosphere label{grid-column:2;grid-row:1;justify-self:center}.lab-atmosphere button{grid-column:3;grid-row:1;justify-self:end}.lab-atmosphere input[type=range]{grid-column:2/4;grid-row:2;width:100%;max-width:160px;height:22px;justify-self:end}.lab-atmosphere .lab-sfx-credit{grid-column:1;grid-row:2;height:22px;justify-self:start}.lab-atmosphere select,.lab-atmosphere button{font-size:11px;padding-inline:5px}}
.lab-crt-sweep{inset:0;top:0;height:auto;background:none;box-shadow:none;opacity:1;animation:none;will-change:auto}
.lab-crt-sweep::after{display:none}
.lab-sync-line{position:absolute;left:0;width:100%;height:5px;top:0;background:linear-gradient(180deg,transparent,#0009 25%,#b8ffd75c 49%,#0008 72%,transparent);clip-path:polygon(0 42%,calc(var(--tip) - 8%) 42%,var(--tip) 0%,calc(var(--tip) + 8%) 42%,100% 42%,100% 58%,calc(var(--tip) + 8%) 58%,var(--tip) 100%,calc(var(--tip) - 8%) 58%,0 58%);animation:lab-sync-r27 var(--duration) linear infinite;animation-delay:var(--delay);opacity:var(--alpha);will-change:transform}
.lab-sync-line:nth-child(2n){background:linear-gradient(180deg,transparent,#9ddca040 30%,#000b 60%,transparent);height:7px}
@keyframes lab-sync-r27{0%{transform:translate3d(0,-12px,0)}23%{transform:translate3d(2px,24vh,0)}24%{transform:translate3d(-3px,25vh,0)}51%{transform:translate3d(0,54vh,0)}52%{transform:translate3d(4px,55vh,0)}79%{transform:translate3d(-2px,83vh,0)}100%{transform:translate3d(0,105vh,0)}}
html[data-lab-paused=true] .lab-sync-line{animation-play-state:paused}
html[data-lab-seek=true] .lab-sync-line{filter:brightness(1.35)}
.lab-boot[hidden]{display:none!important}
.lab-boot{position:fixed;inset:0;z-index:1100;display:flex;align-items:center;justify-content:center;background:#080e0a;color:#a2e3a8;padding:20px;font:13px/1.65 var(--mono,monospace)}
.lab-boot-inner{width:min(100%,540px);border:1px solid #46604b;padding:22px;background:repeating-linear-gradient(0deg,#0b130e 0 2px,#0a100c 2px 4px)}
.lab-boot-title{font-size:clamp(17px,5vw,25px);color:#a2e3a8;letter-spacing:.08em;margin-bottom:12px}
.lab-boot-log{white-space:pre-wrap;min-height:8.5em;color:#a2e3a8}
.lab-boot-progress{height:5px;background:#26382b;margin:10px 0}
.lab-boot-progress>span{display:block;height:100%;width:0;background:#a2e3a8;transition:width .25s linear}
.lab-boot button{margin:10px 0 0;background:#17271d;color:#a2e3a8;box-shadow:none;border:1px solid #526152;font:inherit;padding:6px 12px}
@media(prefers-reduced-motion:reduce){.lab-boot-progress>span{transition:none}.lab-sync-line{animation:none!important}}
@media print{.lab-boot{display:none!important}}

@media(max-width:600px){.lab-atmosphere .lab-boot-setting{grid-column:1/4;grid-row:3;justify-self:center}}
.lab-atmosphere .lab-boot-setting{white-space:nowrap}
