/* Scoped 3D homepage integration. Registry and diagnostics retain their existing styles. */
.home .neural-3d{background:radial-gradient(ellipse at 50% 46%,#39161370 0%,#170e1050 40%,transparent 70%),#08090b;min-height:560px}
.home .neural-3d:before{opacity:1;background-image:linear-gradient(#ea535309 1px,transparent 1px),linear-gradient(90deg,#ea535309 1px,transparent 1px);background-size:60px 60px}
.neural-3d .neural-top{padding:18px 22px;gap:8px;z-index:2}
.head-settings-toggle{display:grid;place-items:center;flex:none;width:34px;height:34px;border:1px solid #55302e;border-radius:5px;background:#1c1111;color:#ed6660;cursor:pointer;padding:0;font:700 23px/1 system-ui}
.head-settings-toggle>span{position:relative}.head-settings-toggle sup{font-size:11px;position:absolute;top:-3px;right:-7px}
.head-settings-toggle:hover{background:#2b1818;border-color:#e6675e}
.head-settings-logo{display:grid;place-items:center;width:32px;height:32px}
.head-settings-logo img{display:block;width:29px;height:18px}
.head-stage{position:relative;width:100%;height:400px;min-height:360px;flex:1;isolation:isolate}
.head-stage:focus-visible{outline:1px solid #e4665d;outline-offset:-5px}
.head-stage #surface{position:absolute;inset:0;touch-action:pan-y}
.head-stage canvas{display:block;width:100%;height:100%}
.head-halo{position:absolute;inset:4%;background:radial-gradient(ellipse at 50% 46%,#b52c232b 0%,#98201912 40%,transparent 70%);pointer-events:none}
.head-stage #loading{position:absolute;inset:0;display:grid;place-items:center}
.head-stage #loading img{display:block;width:88%;height:96%;object-fit:contain;max-height:400px}
.head-stage .load-box{position:absolute;bottom:10px;left:20px;right:20px;text-align:center;background:linear-gradient(transparent,#08090bea 50%);padding:16px 10px 8px}
.head-stage #start{border:1px solid #553632;border-radius:4px;background:#1b1414;color:#e3d3d0;padding:7px 12px;font:10px var(--mono);min-height:32px}
.head-stage #load-message{font:9px/1.5 var(--mono);color:#aaa1a0;margin:8px 0 0}
.neural-3d .stage-label{pointer-events:none;font-size:6px;opacity:.75}
.neural-3d .neural-bottom{padding:20px 12px 26px}
.neural-3d [hidden],#head-settings [hidden]{display:none!important}
#head-settings{position:fixed;inset:20px 20px 20px auto;margin:0;width:350px;max-width:calc(100vw - 32px);height:auto;max-height:calc(100dvh - 40px);padding:24px;border:1px solid #44312f;border-radius:10px;background:#101114;color:#ececef;overflow:auto;box-shadow:0 12px 80px #0009;text-align:left;font:12px/1.6 system-ui,-apple-system,sans-serif;scrollbar-width:thin;scrollbar-color:#72423d #17171b;overscroll-behavior:contain}
#head-settings::backdrop{background:#0005}
.head-settings-heading{display:flex;justify-content:space-between;gap:12px;align-items:center}
#head-settings .eyebrow{font:9px var(--mono);color:#d56860;letter-spacing:.12em;margin:0 0 8px}
#head-settings h2{font-size:23px;margin:0;letter-spacing:-.04em}
#head-settings #head-settings-close{font-size:23px;min-width:38px;min-height:38px;padding:0}
#head-settings #help{font-size:11px;color:#a6a6ae;line-height:1.7;margin:17px 0}
#head-settings button{font:11px/1.4 system-ui;border:1px solid #373a40;color:#ebeaee;background:#1a1c21;border-radius:5px;min-height:38px;padding:9px 11px;cursor:pointer}
#head-settings button:hover{border-color:#aa615b;background:#252127}
#head-settings button:disabled{opacity:.4;cursor:wait}
#head-settings fieldset{padding:0;margin:20px 0 0;border:0;min-width:0}
#head-settings fieldset:disabled{opacity:.45}
#head-settings fieldset>button{width:100%;margin-bottom:10px}
#head-settings .angles{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px}
#head-settings .angles button{padding:9px 4px}
#head-settings label{display:flex;justify-content:space-between;gap:10px;font-size:11px;color:#b3b3bb;margin:19px 0 10px}
#head-settings output{font:11px var(--mono);color:#eee;white-space:nowrap}
#head-settings input[type=range]{width:100%;margin:0 0 20px;accent-color:#ef635c;cursor:pointer}
#head-settings .check{justify-content:flex-start;align-items:center;gap:9px;margin:0 0 12px}
#head-settings .check input{width:15px;height:15px;accent-color:#ef635c;flex:none}
#head-settings .expression-controls{padding:18px 0 5px;margin:10px 0 20px;border-top:1px solid #29282d;border-bottom:1px solid #29282d}
#head-settings .expression-controls button{width:100%}
#head-settings .control-note{font-size:10px;color:#85858f;margin:-10px 0 18px;line-height:1.5}
#head-settings #expression-state{font:10px var(--mono);color:#8e8991;margin:0 0 12px}
#head-settings #reset-controls{background:transparent;color:#b4b1ba;margin-top:12px}
#ambient-motion-control button{width:100%;margin:0 0 12px}
.head-settings-status{display:grid;gap:8px;border-top:1px solid #29282d;padding-top:16px;font:8px/1.6 var(--mono);color:#8d8992}
#head-settings :focus-visible{outline:2px solid #ef635c;outline-offset:3px}
@media(min-width:1450px){.home .neural-3d{min-height:590px}.head-stage{height:430px}.head-stage #loading img{max-height:430px}}
@media(max-width:800px){.home .neural-3d{min-height:560px}.head-stage{height:390px;min-height:360px}.head-settings-toggle{width:40px;height:40px}.neural-3d .stage-label{display:block}#head-settings{inset:16px 16px 16px auto;padding:20px;max-height:calc(100dvh - 32px)}}
#head-settings .head-settings-heading{position:sticky;top:0;z-index:5;background:#101114;padding-bottom:12px;border-bottom:1px solid #29282d}
