:root{color-scheme:dark;--copper:#cb9956;--energy:#68f4de;--gold:#ebca80;--border:#6d5938;--muted:#b8b8a2;--text:#f0e6ce;font-family:ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;background:#070d0d;color:var(--text)}
*{box-sizing:border-box}body{margin:0;height:100dvh;display:flex;flex-direction:column;overflow:hidden}button,select,input,textarea{font:inherit}button,select{color:var(--text);border:1px solid #7f694466;background:#19271f;border-radius:3px}button{cursor:pointer;padding:8px 12px;transition:background .15s}button:hover{background:#354535;border-color:#c6a46a}button:disabled{opacity:.4;cursor:default}:focus-visible{outline:2px solid var(--gold);outline-offset:3px}[hidden]{display:none!important}
header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 18px;min-height:48px;flex-shrink:0;background:#101c18;border-bottom:1px solid #5b4a2e;z-index:10}.brand{display:flex;align-items:center;gap:8px;color:var(--gold);text-decoration:none;font:700 14px Georgia,serif;letter-spacing:1.5px;white-space:nowrap}.brand-icon{font-size:25px;color:var(--energy)}.header-actions{display:flex;gap:6px;align-items:center}.header-actions button{font-size:11px}.header-actions #information-toggle{width:32px;height:32px;padding:4px;color:var(--gold)}#information-toggle span{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border:1px solid currentColor;border-radius:50%;font:13px Georgia,serif}
#scene-host{flex:1;min-height:0;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden}.scene-wrapper{position:relative;flex-shrink:0;overflow:hidden}.scene-stage{position:absolute;left:0;top:0;transform-origin:top left}.scene-art{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;user-select:none}.game-viewport{position:absolute;background:var(--backing,#101e19);box-shadow:inset 0 0 12px #000c,0 0 8px rgb(104 244 222 / var(--energy-reflection,0));border:1px solid #ae854f;overflow:hidden}
#board{position:absolute;display:grid;grid-template-columns:repeat(var(--cols),var(--cell));grid-template-rows:repeat(var(--rows),var(--cell));gap:2px;pointer-events:auto}.tile{aspect-ratio:1;min-width:0;padding:0;border:1px solid #846439;border-radius:2px;background:radial-gradient(ellipse at 35% 25%,#29352b,#142019);position:relative;overflow:hidden;touch-action:manipulation;box-shadow:inset 0 0 0 1px #08130b}.tile::after{content:'';position:absolute;inset:3px;background:radial-gradient(circle at 1px 1px,#d4ad64 0 1px,transparent 1.6px),radial-gradient(circle at calc(100% - 1px) calc(100% - 1px),#9e7c40 0 1px,transparent 1.6px);pointer-events:none;opacity:.75}.tile:hover{background:#334533;border-color:#e0bb77}.tile.selected{border-color:#ffdb89;box-shadow:inset 0 0 0 1px #ffdb8970,0 0 6px #d5b46740;z-index:1}.tile svg{display:block;width:100%;height:100%}.tile .pipe-edge{fill:none;stroke:#553715;stroke-width:10;stroke-linecap:round}.tile .trace{fill:none;stroke:var(--copper);stroke-width:6;stroke-linecap:round;transition:stroke .18s}.tile .pipe-shine{fill:none;stroke:#f5d69b;stroke-width:1.5;stroke-linecap:round;opacity:.55}.tile .pipe-collar{fill:none;stroke:#edc17c;stroke-width:2.5;filter:drop-shadow(1px 1px 0 #2a1c10)}.tile .hub{fill:var(--copper)}.tile .terminal{fill:#172c23;stroke:#d7b36d;stroke-width:2}.tile text{font:26px Georgia,serif;fill:var(--copper);text-anchor:middle;dominant-baseline:central}.tile.powered{background:radial-gradient(ellipse at center,#234038,#142822)}.tile.powered .trace{stroke:var(--energy);filter:drop-shadow(0 0 3px #65e5d550)}.tile.powered .pipe-edge{stroke:#275951}.tile.powered .pipe-shine{stroke:#d0fff0;opacity:.85}.tile.powered .pipe-collar,.tile.powered .terminal{stroke:var(--energy)}.tile.powered .hub,.tile.powered text{fill:var(--energy)}.tile .pulse{fill:none;stroke:#defff7;stroke-width:2;stroke-linecap:round;stroke-dasharray:3 38;animation:flow 1.7s linear infinite;opacity:.65}.tile.fixed{cursor:default}.tile.blocker{background:repeating-linear-gradient(135deg,#19211a,#19211a 6px,#333527 6px,#333527 7px)}.tile .block-mark{stroke:#6c7359;fill:none;stroke-width:2}.tile .open-port{fill:#ff995c}.tile .direction-label{font:7px monospace;fill:#ead095;paint-order:stroke;stroke:#142022;stroke-width:2px}.tile.route{animation:arrival .8s ease-out}
.scene-status{position:absolute;display:flex;align-items:center;justify-content:center;color:#b0eee0;text-shadow:0 0 6px #65e5d545;overflow:hidden;pointer-events:none}.scene-status.numeric{gap:12px;font:30px Georgia,serif;font-variant-numeric:tabular-nums;white-space:nowrap}.numeric>span:first-child:not(:last-child){color:var(--gold);font-size:26px}.target{flex-direction:column;gap:0;color:#b4a481;text-shadow:none}.receiver-symbol{font:47px/48px Georgia,serif}.target #target-state{font-size:10px;letter-spacing:1.5px}.target.active{color:var(--energy);text-shadow:0 0 8px #65e5d580}.scene-effects{position:absolute;inset:0;pointer-events:none}.sphere-discharge{position:absolute;border:2px solid #b8fff0;border-radius:50%;opacity:0;box-shadow:0 0 22px 9px #67f7e2,inset 0 0 20px #67f7e2}.discharging .sphere-discharge{animation:discharge 1.1s ease-out}.discharging .module-current{animation:module-current 1.1s ease-out}
.play-controls{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:6px 18px;background:#101c18;border-top:1px solid #5b4a2e;min-height:42px;flex-shrink:0}.live-metrics{display:flex;align-items:center;gap:17px;color:#bebc9f;font-size:11px;white-space:nowrap}.live-metrics b{color:var(--text);font-weight:500}.rotation-tools{display:flex;gap:7px;align-items:center;color:var(--muted);font-size:10px}.rotation-tools button{font-size:23px;line-height:24px;padding:4px 12px;min-width:42px}.feedback{font-size:10px;color:#adb4a0;background:#0a1410;margin:0;padding:5px 18px;min-height:24px;flex-shrink:0}.completion h2{font:26px Georgia,serif;margin:12px 0}.completion p{font-size:12px}.primary{background:#9cdebf;color:#0b251b;font-weight:650;border-color:#a9e1c9}.primary:hover{background:#baf3d8}.eyebrow{font-size:10px;letter-spacing:1.5px;color:var(--gold);margin:0 0 12px}
.intro h1{font:43px/1.05 Georgia,serif;color:#eddaaa;margin:16px 0}.intro h1 em{color:var(--energy)}.lede,.objective p,.difficulty p,.note{font-size:12px;color:#bcc2ad;line-height:1.8}.objective{display:flex;gap:10px;margin-top:22px;padding-top:20px;border-top:1px solid var(--border)}.objective strong{font-size:13px}.status-dot{width:7px;height:7px;background:var(--energy);border-radius:50%;flex-shrink:0;margin-top:7px}.cyan{color:var(--energy)}.copper{color:var(--copper)}.legend{display:flex;flex-direction:column;gap:12px;font-size:11px;color:var(--muted);margin:18px 0}.wire-sample{display:inline-block;width:24px;height:3px;background:var(--copper);vertical-align:middle;margin-right:8px}.wire-sample.live{background:var(--energy)}summary{cursor:pointer;color:#d6c69c;font-size:12px}.controls{padding-top:18px;border-top:1px solid var(--border)}.controls p{display:flex;justify-content:space-between;font-size:10px;color:var(--muted);gap:8px}.controls p.small{display:block;line-height:1.8}kbd{font-family:inherit;color:#dfdcc1;white-space:nowrap}.volume{display:flex;align-items:center;gap:14px;font-size:11px;color:var(--muted);margin:22px 0}input[type=range]{accent-color:var(--energy);width:110px}.progress{border-top:1px solid var(--border);padding-top:25px;margin-top:25px}.score-card{padding:15px 0}.score-card>span{font-size:10px;color:var(--muted)}.score-card>strong{display:block;font:35px Georgia,serif;color:var(--energy);margin:6px 0}.score-card p{font-size:11px;color:var(--muted)}.score-card b{color:var(--gold);font-weight:400}.progress-stat{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);padding:14px 0;border-bottom:1px solid var(--border)}.progress-stat strong{color:var(--gold);font-weight:400}.difficulty{margin-top:25px}.difficulty label{font-size:10px;letter-spacing:1px;color:var(--muted)}select{padding:10px;font-size:12px;width:100%;margin-top:10px}.art-reference{border-top:1px solid var(--border);padding-top:18px}.art-reference img{width:100%;margin-top:12px}.art-reference p,#seed{font-size:10px;color:var(--muted)}#seed{overflow-wrap:anywhere}#debug{margin-top:22px}#debug button,#debug label{font-size:10px;margin-top:10px}#graph{font-size:9px;white-space:pre-wrap;max-height:180px;overflow:auto}

.calibration-tools{position:fixed;right:12px;bottom:70px;z-index:25;width:min(310px,calc(100vw - 24px));max-height:70dvh;overflow:auto;background:#102119f5;border:1px solid #dfc37f;padding:16px;font-size:11px}.calibration-tools h2{font:21px Georgia,serif;margin:0 0 10px}.calibration-tools p{line-height:1.6}.calibration-tools label{display:block;margin:10px 0}.rect-fields{display:grid;grid-template-columns:1fr 1fr;gap:5px}.rect-fields input{width:100%;margin-top:5px;background:#07150e;color:#e8e4c8;border:1px solid #74633c;padding:8px}.calibration-tools textarea{width:100%;font:10px monospace;background:#07150e;color:#d9e9cb;margin-top:8px}#calibration-error{color:#ffb88b}#calibration-overlay{position:absolute;inset:0;pointer-events:none;z-index:6}.scene-rulers{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.scene-rulers path{stroke:#e4ff7e;stroke-width:1;opacity:.4}.scene-rulers text{fill:#e4ff7e;font:14px monospace;paint-order:stroke;stroke:#06130f;stroke-width:2}.calibration-rect{position:absolute;pointer-events:auto;border:2px dashed #ffcf64;color:#ffed9d;font:12px monospace;cursor:move;touch-action:none;overflow:visible;white-space:nowrap;background:#ffdc6110}
@keyframes flow{to{stroke-dashoffset:-41}}@keyframes arrival{from{box-shadow:inset 0 0 20px #baffe4}to{box-shadow:inset 0 0 0 transparent}}@keyframes discharge{0%,35%,65%{opacity:0}10%,45%{opacity:.85}100%{opacity:0;transform:scale(1.2)}}@keyframes module-current{0%{opacity:0;stroke-dashoffset:100}20%{opacity:.65}80%{opacity:.4}100%{opacity:0;stroke-dashoffset:0}}
@media(max-width:850px){header{padding:6px 10px;gap:8px;flex-wrap:wrap}.header-actions{flex-wrap:wrap}.header-actions button{font-size:10px;padding:7px 9px}.live-metrics{gap:10px;font-size:10px}.live-metrics #level-name,.live-metrics #energized{display:none}.play-controls{padding:5px 10px;gap:8px}.rotation-tools #selection-label{display:none}}
@media(max-width:500px){header{min-height:78px}.brand{font-size:12px}.header-actions{gap:4px}.header-actions button{padding:7px 8px}.live-metrics{gap:7px}.live-metrics #level-label{display:none}.rotation-tools button{min-width:44px;min-height:42px;padding:4px 10px}.feedback{font-size:9px;padding:4px 10px}.calibration-tools{bottom:90px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
/* Status typography derives from each theme's calibrated display height. */
.receiver-symbol{font-size:calc(var(--region-height,70px) * .67);line-height:1}.target #target-state{font-size:calc(var(--region-height,70px) * .14)}.numeric>span:first-child:not(:last-child){font-size:.85em}

/* Three independent layers: recessed surface, removable module, live grid. */
.game-viewport{border:0;background:#101b19;box-shadow:inset 0 0 0 1px #ae854f;overflow:hidden}
.ether-playfield-surface{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% 45%,#34534a47,transparent 72%),radial-gradient(ellipse at 85% 95%,#493b2b25,transparent 65%),linear-gradient(145deg,#142822 0%,#101b19 55%,#090f0e 100%);box-shadow:inset 0 0 18px 6px #070d0caa,inset 0 1px 1px #34534a55}
.active-puzzle{position:absolute;pointer-events:none}
.puzzle-frame{position:absolute;inset:0;pointer-events:none;border:1px solid #af8a4f;border-radius:3px;background:linear-gradient(145deg,#8e7145 0%,#493b2b 14%,#1c211a 48%,#382e21 83%,#705635 100%);box-shadow:0 7px 9px #070d0cbf,inset 0 1px 0 #f3d596b0,inset 0 -2px 2px #070d0ce0}
.puzzle-frame::before{content:'';position:absolute;inset:2px;border:1px solid #1e1b12;border-radius:1px;box-shadow:inset 0 2px 3px #070d0ce6,0 1px 0 #a38a5140}
.puzzle-frame::after{content:'';position:absolute;inset:calc(var(--module-frame) - 1px);border:1px solid #d0ae6a80;box-shadow:0 0 4px rgb(104 244 222 / calc(var(--energy-reflection,0) * .35));pointer-events:none}
.corner{position:absolute;width:5px;height:5px;transform:rotate(45deg);border:1px solid #ddba72a6;background:#2c2b1e;z-index:1}.corner.nw{left:2px;top:2px}.corner.ne{right:2px;top:2px}.corner.sw{left:2px;bottom:2px}.corner.se{right:2px;bottom:2px}
.module-current{position:absolute;inset:0;width:100%;height:100%;fill:none;stroke:var(--energy);stroke-width:1.3;stroke-dasharray:12 88;stroke-dashoffset:100;opacity:0;filter:drop-shadow(0 0 2px #68f4de80);pointer-events:none}

/* Responsive page views: information replaces gameplay instead of covering it. */
body{height:100dvh;min-height:0;background:radial-gradient(ellipse at 50% 35%,#1a3026,#0a1410 75%)}
header{padding:max(6px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 6px max(12px,env(safe-area-inset-left));flex-wrap:wrap;min-height:48px;gap:6px 14px}
.brand{font-size:13px}.header-actions{margin-left:auto;gap:6px}.header-actions button{min-height:40px;touch-action:manipulation}.header-actions #information-toggle{width:40px;height:40px}.compact-stats{display:flex;align-items:center;gap:18px;font-size:10px;letter-spacing:1px;color:var(--muted)}.compact-stats b{font-size:14px;font-weight:500;color:var(--text);letter-spacing:0;margin-left:6px;font-variant-numeric:tabular-nums}.cinematic .compact-stats{display:none}
.game-view{flex:1;min-height:0;display:flex;flex-direction:column}.game-first #scene-host{background:radial-gradient(ellipse at 50% 45%,#34534a47,transparent 72%),linear-gradient(145deg,#142822,#101b19 55%,#090f0e);}
.game-first .scene-art,.game-first .scene-status,.game-first .scene-effects,.game-first .ether-playfield-surface{display:none}.game-first .game-viewport{background:none;box-shadow:none;overflow:visible}.game-first .scene-wrapper{background:none}
.play-controls{display:flex;align-items:center;justify-content:space-between;gap:8px 18px;flex-wrap:wrap;padding:max(6px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 6px max(12px,env(safe-area-inset-left));min-height:56px;touch-action:manipulation}.live-metrics{gap:14px;font-size:11px}.footer-actions{display:flex;gap:8px;align-items:center;justify-content:center}.footer-actions>button{min-height:44px;font-size:12px;padding:8px 13px;touch-action:manipulation}.rotation-tools button{min-width:44px;min-height:44px;touch-action:manipulation}.feedback{padding:4px max(12px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom));min-height:22px;font-size:10px;flex-shrink:0}
.completion{position:absolute;inset:auto 8px 8px;z-index:4;max-width:640px;width:auto;box-shadow:0 2px 12px #000a;border:1px solid var(--border);border-radius:6px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 14px;background:#173025;margin:0 auto}.completion .eyebrow{font-size:9px;margin:0}.completion h2{display:none}.completion #summary{font-size:11px;margin:0;flex:1}.completion button{min-height:44px}
.information-view{position:relative;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:24px max(18px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));background:radial-gradient(ellipse at 50% 20%,#20392b,#0e1b15 80%);color:var(--text);visibility:visible;opacity:1;transform:none;transition:none;width:100%;max-width:none;inset:auto;box-shadow:none;border:0;border-radius:0;z-index:auto}
.info-shell{max-width:900px;margin:auto}.info-navigation{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:20px}.info-navigation h1{font:32px Georgia,serif;margin:0;color:var(--gold)}.info-navigation button{min-height:44px}.info-tabs{display:flex;gap:8px;border-bottom:1px solid var(--border);padding-bottom:18px;margin-bottom:24px}.info-tabs button{min-height:44px}.info-tabs button[aria-pressed=true]{color:var(--energy);border-color:#7a9b73;background:#253d2e}.workbench-content{display:grid;grid-template-columns:1fr 1fr;gap:48px}.information-view .intro h1{font-size:39px}.information-view .progress{border-top:0;border-left:1px solid var(--border);padding:0 0 0 30px;margin:0}.information-open #game-only,.information-open #calibration-button{display:none}.tutorial-content{max-width:650px;margin:auto}.tutorial-content h2{font:29px/1.2 Georgia,serif;margin:20px 0}.tutorial-content ol{padding-left:22px}.tutorial-content li,.tutorial-content>p:not(.eyebrow){font-size:14px;line-height:1.9;color:#c9ccb7;margin-bottom:16px}.tutorial-content li strong{color:var(--text)}.tutorial-content .controls{max-width:400px;margin:24px 0}.tutorial-content .controls p{font-size:12px}.tutorial-content .primary{min-height:44px;margin:12px 0}.art-reference img:not([src]){display:none}
@media(max-width:850px){.play-controls{justify-content:center}.live-metrics{justify-content:center;gap:12px;width:100%}.live-metrics #level-name,.live-metrics #energized{display:inline}.live-metrics #level-label,.rotation-tools #selection-label{display:none}}
@media(max-width:650px){header{min-height:70px}.brand{font-size:12px;letter-spacing:1px}.compact-stats{order:3;width:100%;gap:22px}.header-actions button{font-size:10px;padding:6px 8px}.header-actions #information-toggle{width:40px;height:40px}.information-view{padding-top:18px}.info-navigation h1{font-size:26px}.info-navigation{gap:12px}.info-navigation button{font-size:12px}.workbench-content{display:block}.information-view .progress{border-left:0;border-top:1px solid var(--border);padding:24px 0 0;margin-top:25px}.information-view .intro h1{font-size:30px}.play-controls{padding-top:5px;padding-bottom:5px;gap:5px}.live-metrics{font-size:10px;gap:9px}.live-metrics #level-name{display:none}.footer-actions{gap:6px;width:100%}.footer-actions>button{flex:1;padding:7px 9px;white-space:nowrap;max-width:130px}.rotation-tools{gap:6px}.completion{padding:6px 12px;width:auto}.completion .eyebrow{display:none}.completion #summary{font-size:10px}.feedback{font-size:9px}}
@media(max-height:500px) and (min-width:651px){header{min-height:44px;padding-top:max(2px,env(safe-area-inset-top));padding-bottom:2px}.header-actions button{min-height:36px}.play-controls{flex-wrap:nowrap;justify-content:space-between;min-height:50px;padding-block:3px}.live-metrics{width:auto;gap:9px;font-size:10px}.live-metrics #level-name,.live-metrics #energized{display:none}.feedback{min-height:18px;font-size:9px;padding-top:2px;padding-bottom:max(2px,env(safe-area-inset-bottom))}}
.completion{padding-bottom:max(8px,env(safe-area-inset-bottom))}
/* Three supplied compositions share one geometry-aligned effect renderer. */
.scene-backdrop{position:absolute;inset:-16px;background-position:center;background-size:cover;filter:blur(14px) brightness(.32);pointer-events:none}.scene-wrapper{z-index:1}.game-first .scene-backdrop{display:none}.scene-instrument-label{position:absolute;display:flex;align-items:center;justify-content:center;color:#e2c78a;font:13px Georgia,serif;letter-spacing:1px;pointer-events:none;z-index:2}
.ambient-effects,.awakening-effects{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.awakening-effects *{pointer-events:none}.architectural-current{fill:none;stroke:var(--energy);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:100;stroke-dashoffset:100;opacity:0;filter:drop-shadow(0 0 3px #68f4dea0)}.module-awakening{stroke-width:1.7}.receiver-awakening{fill:none;stroke:#bcfff0;stroke-width:2;opacity:0}.orb-awakening{fill:#68f4de15;stroke:#befff3;stroke-width:2.5;opacity:0;filter:drop-shadow(0 0 8px #68f4de)}.orb-orbit{fill:none;stroke:#c5fff4;stroke-width:1.6;stroke-dasharray:5 9;opacity:0;filter:drop-shadow(0 0 3px #68f4de)}.ornament-awakening{fill:none;stroke:#68f4de;stroke-width:3;opacity:0;filter:drop-shadow(0 0 5px #68f4de80)}.contact-spark{fill:#d3fff2;opacity:0;filter:drop-shadow(0 0 2px #68f4de)}.ambient-orb{fill:none;stroke:var(--energy);stroke-width:2;opacity:0;filter:drop-shadow(0 0 5px #68f4de);animation:ambient-energy var(--ambient-period,9000ms) ease-in-out infinite}
.awakening .tile.powered .trace{animation:circuit-overcharge var(--overcharge-duration,350ms) ease-out var(--overcharge-delay,0ms)}.awakening .tile.powered .pulse{animation-duration:var(--overcharge-pulse,450ms)}
@keyframes circuit-overcharge{0%{stroke:#68f4de}40%{stroke:#d5fff4;filter:drop-shadow(0 0 5px #68f4de)}100%{stroke:#68f4de}}
@keyframes ambient-energy{0%,78%,100%{opacity:0}88%{opacity:var(--ambient-intensity,.09)}}
.calibration-orb{border-radius:50%;border-color:#75fff1}.calibration-point{border:1px solid #f4b46b;background:#f4b46b80;overflow:visible}.calibration-route{fill:none;stroke:#ffbe62!important;stroke-width:2;opacity:.8!important}
@media(max-width:650px){header{display:grid;grid-template-columns:auto 1fr;gap:4px 10px}.brand{grid-column:1;grid-row:1;font-size:11px}.compact-stats{grid-column:2;grid-row:1;order:initial;width:auto;justify-self:end;gap:10px;font-size:8px}.compact-stats b{font-size:12px;margin-left:4px}.header-actions{grid-column:1/-1;grid-row:2;justify-content:center;margin:0;width:100%;gap:8px}.header-actions button{min-height:36px}.header-actions #information-toggle{height:36px;width:36px}}
@media(prefers-reduced-motion:reduce){.ambient-effects,.awakening-effects{display:none}.awakening .tile.powered .trace{animation:none!important}.awakening .tile.powered .pulse{animation:none!important}}
/* Theme materials share gameplay markup and the same directional port graphics. */
.theme-picker{margin:24px 0}.theme-picker label{display:block;font-size:10px;letter-spacing:1.5px;color:var(--muted);margin-bottom:8px}.theme-picker select{width:100%;padding:10px}.theme-picker p{font-size:12px;line-height:1.7;color:var(--muted)}
.effect-preview:has(button[hidden]):has(span[hidden]){display:none}.effect-preview{display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;padding:5px 12px;background:#171c19;font-size:10px;color:var(--muted)}.effect-preview button{font-size:11px;min-height:36px}
.illumination-wash{fill:var(--energy);stroke:none;opacity:0;mix-blend-mode:screen;filter:blur(2px)}.illumination-lights{fill:none;stroke:var(--energy);stroke-width:2.5;stroke-dasharray:3 10;stroke-linecap:round;opacity:0;filter:drop-shadow(0 0 3px var(--energy))}.illumination-reflection{fill:none;stroke:var(--energy);stroke-width:1.3;stroke-dasharray:9 7 2 11;stroke-linecap:round;opacity:0}
body[data-material="photographic"]{filter:grayscale(1);background:radial-gradient(ellipse at 50% 35%,#343434,#111 75%)}
body[data-material="photographic"] header,body[data-material="photographic"] .play-controls{background:#1b1b1b;border-color:#777}
body[data-material="photographic"] button,body[data-material="photographic"] select{background:#262626;border-color:#777;color:#eee}body[data-material="photographic"] button:hover{background:#414141;border-color:#ddd}body[data-material="photographic"] .primary{background:#d8d8d8;color:#171717}
body[data-material="photographic"] .game-viewport{border-color:#bcbcbc;background:var(--backing);box-shadow:inset 0 0 12px #000c}
body[data-material="photographic"] .ether-playfield-surface{background:radial-gradient(ellipse at 40% 30%,#292929,#171717);filter:none}
body[data-material="photographic"] .puzzle-frame{border-color:#c7c7c7;background:linear-gradient(145deg,#999,#454545 15%,#222 48%,#444 83%,#888);box-shadow:0 7px 9px #000a,inset 0 1px 0 #fffb,inset 0 -2px 2px #000d}
body[data-material="photographic"] .puzzle-frame::before{border-color:#333;box-shadow:inset 0 2px 3px #000d}body[data-material="photographic"] .puzzle-frame::after{border-color:#ccc8;box-shadow:none}body[data-material="photographic"] .corner{border-color:#eee}
body[data-material="photographic"] .tile{background:radial-gradient(ellipse at 35% 25%,#353535,#202020);border-color:#777;box-shadow:inset 0 0 0 1px #111}body[data-material="photographic"] .tile:hover{background:#414141;border-color:#eee}body[data-material="photographic"] .tile.selected{border-color:#fff;box-shadow:inset 0 0 0 1px #fff8,0 0 4px #fff4}body[data-material="photographic"] .tile.powered{background:radial-gradient(ellipse at center,#383838,#232323)}body[data-material="photographic"] .tile .pipe-edge{stroke:#171717}body[data-material="photographic"] .tile .pipe-shine{stroke:#ddd}body[data-material="photographic"] .tile .pipe-collar{stroke:#bcbcbc;filter:drop-shadow(1px 1px 0 #111)}body[data-material="photographic"] .tile .terminal{fill:#222;stroke:#cfcfcf}body[data-material="photographic"] .tile.powered .trace{stroke:#fff;filter:drop-shadow(0 0 2px #ffffff60)}body[data-material="photographic"] .tile.powered .pipe-shine,body[data-material="photographic"] .tile.powered .terminal,body[data-material="photographic"] .tile.powered .pipe-collar{stroke:#fff}body[data-material="photographic"] .tile .pulse{stroke:#fff}
body[data-material="photographic"] .scene-status,body[data-material="photographic"] .scene-instrument-label{color:#eee;text-shadow:0 0 5px #fff3}body[data-material="photographic"] .target.active{color:#fff}
body[data-material="photographic"] .information-view{background:radial-gradient(ellipse at 50% 20%,#333,#171717 80%)}body[data-material="photographic"] .completion{background:#303030;border-color:#999}body[data-material="photographic"] .feedback{background:#151515;color:#ccc}
body[data-material="photographic"] .architectural-current,body[data-material="photographic"] .ornament-awakening{stroke:#fff;filter:drop-shadow(0 0 3px #ffffff90)}body[data-material="photographic"] .ornament-awakening{stroke-width:4}body[data-material="photographic"] .receiver-awakening{stroke:#fff}body[data-material="photographic"] .contact-spark{fill:#fff;filter:none}body[data-material="photographic"] .awakening .tile.powered .trace{animation:silver-overcharge var(--overcharge-duration,500ms) ease-out var(--overcharge-delay,0ms)}
body[data-material="photographic"] .game-first #scene-host{background:radial-gradient(ellipse at 50% 45%,#373737,#171717 75%)}body[data-material="photographic"] .reduced-success .puzzle-frame{outline:2px solid #fff;outline-offset:1px}
@keyframes silver-overcharge{0%{stroke:#fff}45%{stroke:#fff;filter:drop-shadow(0 0 5px #fff9)}100%{stroke:#fff}}
@media(prefers-reduced-motion:reduce){body[data-material="photographic"] .awakening .tile.powered .trace{animation:none}}
/* Compact immersive controls; phone play overlays these on the full scene. */
#board-zoom{display:none}#board-zoom svg{display:block;width:24px;height:24px;margin:auto}#board-zoom[aria-pressed=true] .zoom-plus{display:none}
.immersive-hud{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:max(2px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 2px max(12px,env(safe-area-inset-left));flex-shrink:0;background:color-mix(in srgb,var(--backing) 94%,transparent);z-index:2;order:0}
.immersive-hud #game-menu{width:44px;min-width:44px;height:44px;padding:6px;font-size:23px;line-height:1;touch-action:manipulation;margin-left:auto}
.immersive-hud .compact-stats{display:flex;gap:18px;width:auto;font-size:9px;letter-spacing:1px}.immersive-hud .compact-stats b{font-size:13px}
.immersive[data-instruments=true] .immersive-hud #compact-stats{display:none}
.immersive #scene-host{order:1}.immersive .effect-preview{order:0}
.immersive-dock{display:flex;justify-content:center;align-items:center;flex-shrink:0;order:3;min-height:64px;padding:6px max(12px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:color-mix(in srgb,var(--backing) 94%,transparent);border-top:1px solid var(--border)}
.immersive-dock .rotation-tools{display:grid;grid-template-columns:56px 1fr 56px;gap:12px;width:min(100%,320px);align-items:center}
.immersive-dock #ccw{grid-column:1;grid-row:1}.immersive-dock #network-status{grid-column:2;grid-row:1;text-align:center;font-size:10px;white-space:nowrap;color:var(--muted)}.immersive-dock #network-status.complete{color:var(--energy)}.immersive-dock #cw{grid-column:3;grid-row:1}
.immersive-dock button{width:56px;min-height:50px;font-size:27px;padding:4px;touch-action:manipulation}.immersive-dock #selection-label{display:none}
.immersive .feedback{position:absolute;width:1px;height:1px;min-height:0;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.immersive .completion{order:2;gap:8px;padding:6px max(12px,env(safe-area-inset-right)) 6px max(12px,env(safe-area-inset-left));background:var(--backing);border-color:var(--border)}.immersive .completion .eyebrow{display:none}.immersive .completion #summary{line-height:1.5;font-size:11px}.immersive .completion button{min-height:44px}
.game-menu-content{max-width:620px;margin:auto}.game-menu-content>button{width:100%;min-height:48px;margin-bottom:16px}.menu-action-grid{display:flex;flex-wrap:wrap;gap:10px}.menu-action-grid button{min-height:46px;flex:1;font-size:13px}.menu-settings{padding-top:12px;border-top:1px solid var(--border);margin-top:20px}.menu-settings h2{font:24px Georgia,serif;color:var(--gold)}.menu-settings button{min-height:44px}.menu-settings>button{margin:10px 8px 0 0}.menu-metrics .live-metrics{display:flex;flex-wrap:wrap;justify-content:flex-start;white-space:normal;gap:12px;margin-top:20px;font-size:12px}.menu-metrics #level-label,.menu-metrics #level-name,.menu-metrics #energized{display:inline!important}.menu-settings .volume{margin:18px 0}.menu-note,#presentation-message{font-size:12px;line-height:1.7;color:var(--muted)}
.immersive.information-open .information-view{padding-top:max(16px,env(safe-area-inset-top))}.info-tabs{flex-wrap:wrap}.info-navigation button{flex-shrink:0}
@media(max-width:650px){.immersive-hud .compact-stats{grid-column:auto;grid-row:auto;justify-self:auto;gap:16px;font-size:9px}.immersive-hud .compact-stats b{font-size:13px}.menu-action-grid button{min-width:120px}}
.immersive.mobile-hud{
  .game-view{position:relative;isolation:isolate;height:100dvh;overflow:hidden}
  #scene-host{position:absolute;inset:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}
  .immersive-hud{position:absolute;inset:0;z-index:3;background:none;pointer-events:none;padding:0}
  #game-menu{position:absolute;top:max(4px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));pointer-events:auto;background:color-mix(in srgb,var(--backing) 88%,transparent);border:1px solid var(--border);border-radius:5px;box-shadow:0 2px 8px #0006}
  /* Below the opening, between the independent corner controls. No top plaque. */
  #immersive-status{position:absolute;left:50%;bottom:calc(16px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);width:max-content;max-width:calc(100% - 136px);padding:6px 9px;background:color-mix(in srgb,var(--backing) 85%,transparent);border:1px solid color-mix(in srgb,var(--gold) 35%,transparent);border-radius:16px;box-shadow:inset 0 1px 0 #ffffff12,0 2px 6px #0005}
  .immersive-hud #compact-stats{display:flex;flex-wrap:nowrap;gap:0;font-size:clamp(8px,2.2vw,9px);letter-spacing:.5px;white-space:nowrap}
  #compact-stats b{font-size:clamp(10px,3vw,12px);margin-left:4px}
  #compact-stats>span+span::before{content:'·';margin:0 8px;color:var(--gold)}
  .immersive-dock{position:absolute;inset:auto 0 0;z-index:3;height:0;min-height:0;border:0;background:none;pointer-events:none;padding:0}
  .rotation-tools{position:static;display:contents;background:none;border:0;box-shadow:none}
  .immersive-dock button{position:absolute;bottom:max(8px,env(safe-area-inset-bottom));pointer-events:auto;width:48px;min-height:48px;padding:5px;font-size:25px;border-color:color-mix(in srgb,var(--gold) 45%,transparent);background:color-mix(in srgb,var(--backing) 88%,transparent);border-radius:9px;box-shadow:inset 0 1px 0 #ffffff18,0 3px 8px #0006}
  #ccw{left:max(8px,env(safe-area-inset-left))}#cw{right:max(8px,env(safe-area-inset-right))}
  #board-zoom{display:grid;place-items:center;right:calc(max(8px,env(safe-area-inset-right)) + 56px)}
  &.stacked-mobile-controls #immersive-status{bottom:calc(72px + env(safe-area-inset-bottom,0px));max-width:calc(100% - 32px)}
  .completion{bottom:72px}
  &.stacked-mobile-controls .completion{bottom:112px}
  &.game-first .completion{bottom:8px}
  .effect-preview{position:absolute;top:calc(52px + env(safe-area-inset-top,0px));z-index:3}
  .artwork-notice{position:absolute;top:calc(52px + env(safe-area-inset-top,0px));z-index:3}
  /* Focus board keeps control clearance, independently of artwork framing. */
  &.game-first #scene-host{top:calc(52px + env(safe-area-inset-top,0px));bottom:calc(68px + env(safe-area-inset-bottom,0px))}
  &.game-first.stacked-mobile-controls #scene-host{bottom:calc(112px + env(safe-area-inset-bottom,0px))}
}
@media(orientation:landscape){
  .immersive.mobile-hud #scene-host{top:calc(48px + env(safe-area-inset-top,0px));bottom:calc(68px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:379px){
  .immersive.mobile-hud #immersive-status{bottom:calc(72px + env(safe-area-inset-bottom,0px));max-width:calc(100% - 32px)}
  .immersive.mobile-hud.game-first #scene-host{bottom:calc(112px + env(safe-area-inset-bottom,0px))}
}
/* Focus board stays available after its existing button moves into the menu. */
.information-open #menu-presentation #game-only{display:block}
.pwa-settings{margin-top:22px;padding-top:12px;border-top:1px solid var(--border)}.pwa-settings p{font-size:12px;line-height:1.7;color:var(--muted)}.pwa-settings button{min-height:44px;margin:4px 6px 4px 0}.pwa-theme-row{display:grid;grid-template-columns:1fr auto;gap:4px 12px;align-items:center;border-bottom:1px solid var(--border);padding:12px 0}.pwa-theme-row strong{font-size:13px;color:var(--text)}.pwa-theme-row span{grid-column:1;font-size:11px;color:var(--muted)}.pwa-theme-row button{grid-column:2;grid-row:1/3;font-size:12px}.pwa-settings #pwa-update-status:empty,.pwa-settings #pwa-message:empty{display:none}
#game-menu{position:relative}#game-menu[data-update=true]::after{content:'';position:absolute;right:3px;top:3px;width:7px;height:7px;background:var(--energy);border-radius:50%}
#pwa-update-dialog{width:min(440px,calc(100vw - 32px));max-height:80dvh;overflow:auto;border:1px solid var(--border);border-radius:6px;background:var(--backing);color:var(--text);padding:24px}#pwa-update-dialog::backdrop{background:#000a}#pwa-update-dialog h2{font:27px Georgia,serif;color:var(--gold)}#pwa-update-dialog p{line-height:1.7;font-size:14px}#pwa-update-dialog>div{display:flex;flex-wrap:wrap;gap:10px}#pwa-update-dialog button{min-height:44px}
.artwork-notice{flex-shrink:0;order:0;padding:6px 12px;background:var(--backing);font-size:11px;line-height:1.6;color:var(--text)}.artwork-notice button{font-size:11px;min-height:36px;margin-left:6px}
.game-menu-content .choose-world{display:flex;align-items:center;justify-content:space-between;min-height:54px;border-color:#a48b59;background:linear-gradient(110deg,#283a30,#14251f);color:#f0dfb7;font:19px Georgia,serif}
.world-selector{position:fixed;inset:0;width:min(1080px,calc(100vw - 48px));max-height:90dvh;overflow:auto;overscroll-behavior:contain;margin:auto;padding:36px;border:1px solid #827150;border-radius:14px;background:radial-gradient(ellipse at 50% 0%,#263a32,#0b1613 80%);color:#f1e7ce;box-shadow:0 24px 100px #000c;color-scheme:dark}
.world-selector::backdrop{background:#020907d9;backdrop-filter:blur(7px)}
.world-gallery-header{position:relative;padding-right:40px;margin-bottom:26px}.world-gallery-header .eyebrow{color:#d9bb7d;font-size:10px;letter-spacing:2px}.world-gallery-header h1{font:44px/1.1 Georgia,serif;margin:14px 0 10px;color:#f1dfb7}.world-gallery-header p{line-height:1.6;margin:8px 0}.world-intro{font-size:13px;color:#b9c4b9;max-width:640px}#world-subtitle{font:italic 20px Georgia,serif;color:#dbcfaf}
#world-close{position:absolute;right:-12px;top:-12px;min-width:44px;min-height:44px;padding:6px;font-size:18px;background:#14251f;color:#f0dfb7;border:1px solid #827150;border-radius:50%}
.world-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:20px}.world-selector .world-card{display:flex;flex-direction:column;overflow:hidden;min-width:0;text-align:left;border:1px solid #56635a;background:#15251f;color:#f1e7ce;padding:0;border-radius:9px;box-shadow:0 5px 20px #0005;transition:border-color .15s,transform .15s}.world-selector .world-card:hover{border-color:#d8c18c;transform:translateY(-2px)}.world-selector .world-card[aria-pressed=true]{border-color:#d8bc78;box-shadow:0 0 0 1px #d8bc7855,0 5px 20px #0005}.world-selector .world-card:disabled{opacity:.55;cursor:default;transform:none}.world-selector :focus-visible{outline:3px solid #f4d48e;outline-offset:3px}
.world-card-art{display:block;position:relative;width:100%;aspect-ratio:4/3;background:#0b1513;overflow:hidden}.world-card-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0}.world-card-art.has-image img{opacity:1}.world-placeholder{display:flex;align-items:center;justify-content:center;position:absolute;inset:0;padding:20px;text-align:center;font:26px Georgia,serif;background:radial-gradient(ellipse,#395147,#14251f);color:#e3c994}.has-image .world-placeholder{visibility:hidden}
.world-card-caption{display:flex;flex-direction:column;gap:5px;padding:18px;flex:1}.world-card-caption strong{font:26px Georgia,serif;color:#f0dfb7}.world-card-caption>span{font-size:13px;color:#c7cfc0}.world-card-caption small{margin-top:12px;font-size:10px;letter-spacing:1px;text-transform:uppercase;color:#b2d8bc}.world-card[aria-pressed=true] small{color:#e8c987}.world-message{min-height:22px;margin:18px 0 0;font-size:13px;color:#e7cf9f;line-height:1.6}.world-gallery-note{font-size:11px;color:#abb8a9;line-height:1.6;margin-bottom:0}
@media(max-width:650px){.world-selector{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:max(22px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(22px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));border-radius:10px}.world-gallery-header{padding-right:32px;margin-bottom:22px}.world-gallery-header h1{font-size:34px}#world-subtitle{font-size:18px}.world-intro{font-size:12px}.world-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.world-card-caption{padding:12px 10px}.world-card-caption strong{font-size:20px}.world-card-caption>span{font-size:11px}.world-card-caption small{font-size:9px;letter-spacing:.3px}#world-close{right:-6px;top:-10px}}
@media(max-width:339px){.world-grid{grid-template-columns:1fr}.world-gallery-header h1{font-size:29px}}


/* Shared rotation preference stays in the same control group in every layout. */
#rotation-mode{min-width:100px;min-height:44px;font-size:12px;padding:6px 9px;white-space:nowrap;border-color:var(--border);color:var(--gold);background:var(--backing)}
#rotation-mode[aria-pressed=true]{box-shadow:inset 0 0 0 1px var(--gold);font-weight:650}
.rotation-tools #ccw,.rotation-tools #cw{min-width:44px;min-height:44px}
.immersive-dock #rotation-mode{grid-column:2;grid-row:1;width:auto;min-width:100px;font-size:12px}
.tile[data-kit=ether].selected{outline-color:var(--kit-light);border-color:var(--kit-light)}
.tile[data-kit=illumination].selected{outline-color:var(--kit-light)}
.tile[data-kit].selected .kit-plate{stroke:var(--kit-light);stroke-width:2}
.immersive.mobile-hud{
 #ccw,#cw{min-height:48px}
 #rotation-mode{position:absolute;left:50%;right:auto;transform:translateX(-50%);bottom:max(8px,env(safe-area-inset-bottom));width:100px;min-width:100px;min-height:48px;font-size:11px}
 #immersive-status{bottom:calc(72px + env(safe-area-inset-bottom,0px));max-width:calc(100% - 32px)}
 &.game-first #scene-host{bottom:calc(112px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:359px){.immersive.mobile-hud #rotation-mode{width:80px;min-width:80px;font-size:10px;padding:5px}}

/* Calibrated world effects share the image transform, outside the board clip. */
.scene-art{z-index:0}.scene-effects{position:absolute;inset:0;z-index:2;pointer-events:none;overflow:visible}.game-viewport,.scene-status{z-index:3}
.lightning-core,.lightning-halo{fill:none;stroke-linecap:round;stroke-linejoin:round;opacity:0;vector-effect:non-scaling-stroke}
.lightning-core{stroke:#e1fff9}.lightning-halo{stroke:#6ee8d9;filter:drop-shadow(0 0 3px #6ee8d9aa);stroke-dasharray:100;stroke-dashoffset:100}.lightning-core[pathLength]{stroke-dasharray:100;stroke-dashoffset:100}
.architectural-surface,.architectural-bloom{fill:none;stroke:var(--energy);stroke-linecap:round;stroke-linejoin:round;stroke-width:26;filter:blur(5px);mix-blend-mode:screen;opacity:0}
.architectural-bloom{stroke-width:34;filter:blur(7px)}
body[data-material=photographic]{filter:none}body[data-material=photographic] .scene-art,body[data-material=photographic] .scene-backdrop,body[data-material=photographic] .scene-effects{filter:grayscale(1)}
body[data-material=photographic] .architectural-surface,body[data-material=photographic] .architectural-bloom{stroke:#fff}
.completion-skip{position:fixed;z-index:15;left:max(8px,env(safe-area-inset-left));top:max(6px,env(safe-area-inset-top));min-height:44px;padding:6px 10px;font-size:11px;background:color-mix(in srgb,var(--backing) 85%,transparent);border-color:var(--border);color:var(--text)}
.world-completing .completion{display:none}
@media(orientation:landscape){.immersive.mobile-hud .completion{bottom:8px}}
@media(prefers-reduced-motion:reduce){.lightning-core,.lightning-halo{display:none}}
#sound-dialog{width:min(390px,calc(100vw - 32px));max-height:85dvh;overflow:auto;padding:20px;border:1px solid var(--border);border-radius:8px;background:var(--backing);color:var(--text)}
#sound-dialog::backdrop{background:#000a}
#sound-dialog h2{margin:0 0 12px;color:var(--gold);font:27px Georgia,serif}
#sound-dialog label{display:flex;align-items:center;gap:8px;min-height:36px}
#sound-dialog output{margin-left:auto;font-variant-numeric:tabular-nums}
#sound-dialog input{accent-color:var(--energy)}
#sound-dialog input[type=range]{display:block;width:100%;min-height:32px;margin:0}
#sound-dialog summary{cursor:pointer;padding:8px 0}
#sound-dialog p{color:var(--muted);font-size:.85rem}
#sound-close{min-height:44px;margin-top:12px}

body[data-theme="002"] [data-variant="desktop"] .scene-status,
body[data-theme="002"] [data-variant="desktop"] .scene-instrument-label{background:#222120}
body[data-theme="002"] [data-variant="desktop"] .scene-instrument-label{font-size:18px}
body.game-first[data-theme="002"] [data-variant="desktop"] .scene-instrument-label{display:none}

body[data-material=stone] .game-viewport{background:var(--backing);box-shadow:none}
body[data-material=stone] .ether-playfield-surface{background:radial-gradient(ellipse,#23201c,#1b1917)}
body[data-material=stone] .puzzle-frame{border-color:#85634b;background:linear-gradient(145deg,#504036,#1b1917 40%,#302823)}
body[data-theme="006"] .scene-instrument-label{color:#fff0ba;font:bold 19px Georgia,serif;text-shadow:0 1px 2px #24110b}
body.game-first[data-theme="006"] .scene-instrument-label{display:none}
body[data-theme="006"] [data-variant="desktop"] .scene-instrument-label{background:linear-gradient(#63362a,#783e2b 48%,#562f24);box-shadow:inset 0 0 4px #3a2018}
body[data-theme="006"] .architectural-current,body[data-theme="006"] .ornament-awakening{stroke:var(--energy);filter:drop-shadow(0 0 4px var(--energy))}
body[data-theme="006"] .receiver-awakening{stroke:#fff0ba}
body[data-theme="006"] .contact-spark{fill:#fff0ba}
body[data-theme="006"] .illumination-lights{stroke-dasharray:none;stroke-width:3}
body[data-theme="006"] .architectural-bloom{stroke-width:22;filter:blur(6px)}
body[data-theme="006"] .awakening .tile.powered .trace{animation-name:solar-overcharge}
@keyframes solar-overcharge{0%,100%{stroke:var(--kit-energy)}35%{stroke:var(--kit-core);filter:drop-shadow(0 0 4px var(--kit-energy))}}

body.themed[data-theme="004"] .game-viewport{background:#100f15;box-shadow:none}
body[data-theme="004"] .ether-playfield-surface{background:radial-gradient(ellipse,#19202d,#100f15)}
body[data-theme="004"] .puzzle-frame{border-color:#aa7942;background:linear-gradient(145deg,#5a4530,#111b2c 38%,#263b56)}
body[data-theme="004"] .scene-instrument-label{background:linear-gradient(#253e66,#111d39);color:#fff4cb;font:bold 19px Georgia,serif;text-shadow:0 1px 2px #080f20}
body.game-first[data-theme="004"] .scene-instrument-label{display:none}
body[data-theme="004"] .scene-status.numeric,body[data-theme="004"] .numeric>span:first-child:not(:last-child){color:#392414;text-shadow:none}
body[data-theme="004"] .target{color:#edcc92}
body[data-theme="004"] .target.active{color:var(--energy);text-shadow:0 0 8px #ffc64e66}
body[data-theme="004"] .architectural-current,body[data-theme="004"] .ornament-awakening{stroke:var(--energy);filter:drop-shadow(0 0 4px var(--energy))}
body[data-theme="004"] .receiver-awakening{stroke:#fff4cb}
body[data-theme="004"] .contact-spark{fill:#fff4cb}
body[data-theme="004"] .illumination-lights{stroke-dasharray:none}
body[data-theme="004"] .architectural-bloom{stroke-width:24;filter:blur(6px)}
body[data-theme="004"] .awakening .tile.powered .trace{animation-name:solar-overcharge}

body[data-theme="008"] .game-viewport{background:transparent;box-shadow:none}
body[data-theme="008"] .ether-playfield-surface{display:none}
body[data-theme="008"] #scene-host{background:radial-gradient(ellipse,#232631,#14161e)}
body[data-theme="008"] .puzzle-frame{border-color:#a4a9b6;background:linear-gradient(145deg,#666976,#15171f 35%,#363743)}
body[data-theme="008"] .scene-instrument-label{background:#a5a5a7;color:#16171e;font:bold 15px Georgia,serif;letter-spacing:.4px}
body.game-first[data-theme="008"] .scene-instrument-label{display:none}
body[data-theme="008"] .scene-status{color:#e5e4ed;text-shadow:none}
body[data-theme="008"] .scene-status.target.active{color:var(--energy)}
body[data-theme="008"] .scene-status.numeric>span:first-child:not(:last-child){color:#e5e4ed}
body[data-theme="008"] .architectural-current,body[data-theme="008"] .ornament-awakening{stroke:#f1f3ff;filter:drop-shadow(0 0 4px #e9edff)}
body[data-theme="008"] .receiver-awakening,body[data-theme="008"] .illumination-lights,body[data-theme="008"] .illumination-reflection{stroke:#f1f3ff}
body[data-theme="008"] .illumination-lights{filter:drop-shadow(0 0 3px #e9edff)}
body[data-theme="008"] .architectural-bloom{stroke:#f1f3ff;stroke-width:21;filter:blur(6px)}
body[data-theme="008"] .awakening .tile.powered .trace{animation-name:solar-overcharge}

body[data-theme="009"] .game-viewport{background:transparent;box-shadow:none}
body[data-theme="009"] .ether-playfield-surface{display:none}
body[data-theme="009"] #scene-host{background:radial-gradient(ellipse,#332921,#1e1916)}
body[data-theme="009"] .puzzle-frame{border-color:#aa8054;background:linear-gradient(145deg,#644a32,#211d1a 38%,#403126)}
body[data-theme="009"] .scene-instrument-label{background:#dcc7a7;color:#422b19;font:bold 22px Georgia,serif;letter-spacing:.4px}
body.game-first[data-theme="009"] .scene-instrument-label{display:none}
body[data-theme="009"] .scene-status{color:#f4e1c1;text-shadow:none}
body[data-theme="009"] .scene-status.target.active{color:var(--energy)}
body[data-theme="009"] .architectural-current,body[data-theme="009"] .ornament-awakening{stroke:#ffe2a6;filter:drop-shadow(0 0 3px #ffce80)}
body[data-theme="009"] .receiver-awakening{stroke:#e8fff7}
body[data-theme="009"] .illumination-lights,body[data-theme="009"] .illumination-reflection{stroke:#fff0cd}
body[data-theme="009"] .illumination-lights{filter:drop-shadow(0 0 3px #ffce80)}
body[data-theme="009"] .architectural-bloom{stroke:#ffe2a6;stroke-width:21;filter:blur(5px)}
body[data-theme="009"] .awakening .tile.powered .trace{animation-name:solar-overcharge}

body[data-theme="010"] .game-viewport{background:transparent;box-shadow:none}
body[data-theme="010"] .ether-playfield-surface{display:none}
body[data-theme="010"] #scene-host{background:radial-gradient(ellipse,#3c3229,#211c19)}
body[data-theme="010"] .puzzle-frame{border-color:#b38a49;background:linear-gradient(145deg,#654e36,#24201d 38%,#46392e)}
body[data-theme="010"] .scene-instrument-label{background:#ebd4ac;color:#392517;font:bold 17px Georgia,serif}
body.game-first[data-theme="010"] .scene-instrument-label{display:none}
body[data-theme="010"] .scene-status{color:#f5e2bf;text-shadow:none}
body[data-theme="010"] .scene-status.target.active{color:var(--energy)}
body[data-theme="010"] .architectural-current{stroke:#ffe1a1;filter:drop-shadow(0 0 3px #ffd18c)}
body[data-theme="010"] .receiver-awakening{stroke:#effaff}
body[data-theme="010"] .illumination-wash{fill:#ffce7e;filter:blur(1.5px)}
body[data-theme="010"] .illumination-lights,body[data-theme="010"] .architectural-surface{stroke:#fff0c5}
body[data-theme="010"] .illumination-lights{filter:drop-shadow(0 0 3px #ffd18c)}
body[data-theme="010"] .architectural-bloom{stroke:#ffda91;stroke-width:17;filter:blur(5px)}
body[data-theme="010"] .awakening .tile.powered .trace{animation-name:solar-overcharge}

body[data-theme="011"] .game-viewport{background:transparent;box-shadow:none}
body[data-theme="011"] .ether-playfield-surface{display:none}
body[data-theme="011"] #scene-host{background:radial-gradient(ellipse,#302e2c,#191817)}
body[data-theme="011"] .puzzle-frame{border-color:#8a7763;background:linear-gradient(145deg,#50443a,#1d1b19 42%,#36312c)}
body[data-theme="011"] .scene-instrument-label{background:#aba7a0;color:#292621;font:bold 15px Georgia,serif}
body.game-first[data-theme="011"] .scene-instrument-label{display:none}
body[data-theme="011"] .scene-status{color:#f0e9dc;text-shadow:none}
body[data-theme="011"] .scene-status.target.active{color:var(--energy)}
body[data-theme="011"] .architectural-current,body[data-theme="011"] .ornament-awakening{stroke:#f0eee6;filter:drop-shadow(0 0 3px #e5e2d6)}
body[data-theme="011"] .receiver-awakening,body[data-theme="011"] .illumination-lights,body[data-theme="011"] .illumination-reflection{stroke:#f0eee6}
body[data-theme="011"] .illumination-wash{fill:#eeeade;filter:none}
body[data-theme="011"] .illumination-lights{filter:drop-shadow(0 0 3px #e5e2d6)}
body[data-theme="011"] .awakening .tile.powered .trace{animation-name:solar-overcharge}

body[data-theme="012"] .game-viewport{background:transparent;box-shadow:none}
body[data-theme="012"] .ether-playfield-surface{display:none}
body[data-theme="012"] #scene-host{background:radial-gradient(ellipse,#2a3237,#171c1f)}
body[data-theme="012"] .puzzle-frame{border-color:#8c9ba3;background:linear-gradient(145deg,#424d53,#191f23 42%,#31393e)}
body[data-theme="012"] .scene-instrument-label{background:#a3a8a8;color:#23282b;font:bold 17px Georgia,serif}
body.game-first[data-theme="012"] .scene-instrument-label{display:none}
body[data-theme="012"] .scene-status{color:#e8eeec;text-shadow:none}
body[data-theme="012"] .scene-status.target.active{color:var(--energy)}
body[data-theme="012"] .architectural-current{stroke:#e2ebe7;filter:drop-shadow(0 0 3px #d4dfda)}
body[data-theme="012"] .receiver-awakening{stroke:#ecfff5}
body[data-theme="012"] .illumination-wash{fill:#fff0ca}
body[data-theme="012"] .illumination-lights,body[data-theme="012"] .illumination-reflection{stroke:#f4f0df}
body[data-theme="012"] .illumination-lights{filter:drop-shadow(0 0 3px #f4f0df)}
body[data-theme="012"] .architectural-bloom{stroke:#fff0ca;stroke-width:16;filter:blur(5px)}
body[data-theme="012"] .awakening .tile.powered .trace{animation-name:solar-overcharge}
.master-mute{display:grid;place-items:center;flex-shrink:0;width:44px;min-height:44px;padding:8px;touch-action:manipulation}
.master-mute svg{width:22px;height:22px;pointer-events:none}
.master-mute .mute-cross,.master-mute[data-muted=true] .mute-waves{display:none}
.master-mute[data-muted=true] .mute-cross{display:inline}
.master-mute[data-muted=true]{border-color:var(--gold);color:var(--gold)}
.immersive.mobile-hud #immersive-mute-anchor{position:absolute;top:max(4px,env(safe-area-inset-top));right:calc(max(8px,env(safe-area-inset-right)) + 104px);pointer-events:auto;background:color-mix(in srgb,var(--backing) 88%,transparent)}

.quick-audio-anchor{position:relative;flex-shrink:0}
.quick-audio{position:absolute;top:calc(100% + 4px);right:0;z-index:12;width:max-content;padding:6px 10px;border:1px solid var(--border);border-radius:6px;background:var(--backing);color:var(--text);box-shadow:0 4px 12px #0008}
.quick-audio label{display:flex;align-items:center;gap:8px;min-height:40px;cursor:pointer}
.quick-audio input{accent-color:var(--energy)}
.immersive-hud .quick-audio-anchor{pointer-events:auto}
.immersive.mobile-hud .quick-audio{right:auto;left:0}
@media(max-width:650px){.header-actions .quick-audio{right:auto;left:0}}
