/* DLB / AUDIO SPACE 3D — one cinematic scene, one settings button */
:root{--s3-accent:#65d8ff;--s3-accent2:#b08cff}
body.space3d-on{background:#05070d;color:#f5f6fc}
body.space3d-on header{background:#080b13;border-color:#1c2333}
body.space3d-on #more{display:none}
body.space3d-on .work{background:linear-gradient(120deg,#080c16 0%,#090b12 100%);gap:15px;padding:24px 28px}
body.space3d-on aside{background:#080a11;border-color:#1d2635}
body.space3d-on .track.current{background:#131d2a;border-color:#45788e}
body.space3d-on .player{background:#0c111b;border:1px solid #242f40;box-shadow:0 8px 35px #0005}
body.space3d-on .primary{background:linear-gradient(130deg,var(--s3-accent),var(--s3-accent2));border:0;color:#080b11}
body.space3d-on .current-cover{box-shadow:0 4px 25px #0006}
body.space3d-on .trackhead{align-items:center}
.karaoke.space3d-stage{isolation:isolate;position:relative;overflow:hidden;display:block;min-height:clamp(460px,66vh,800px);border:1px solid #29334a;border-radius:25px;padding:0;background:#080c14;box-shadow:0 25px 90px #000a}
.space3d-stage .space3d-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:0;display:block;outline:0}
.space3d-stage .space3d-tint{position:absolute;inset:0;z-index:1;pointer-events:none;background:radial-gradient(ellipse at 50% 43%,transparent 22%,#04070d25 66%,#02050bd2 100%);opacity:.9}
.space3d-stage .space3d-brand{position:absolute;left:22px;top:22px;z-index:3;font-size:10px;letter-spacing:.3em;color:#ffffff77;font-weight:700;pointer-events:none;text-shadow:0 2px 16px #000}
.space3d-stage .space3d-gear{position:absolute;right:19px;top:16px;z-index:22;width:46px;height:46px;display:grid;place-items:center;border:1px solid #ffffff3e;border-radius:15px;background:#060912b8;backdrop-filter:blur(16px);color:#fafaff;padding:0;box-shadow:0 6px 24px #0007;transition:background .18s,border-color .18s,transform .18s}
.space3d-stage .space3d-gear:hover{background:#1e2c39d9;border-color:var(--s3-accent);transform:rotate(18deg)}
.space3d-stage .space3d-gear svg{width:21px;height:21px}
.space3d-stage .space3d-lyrics{position:absolute;bottom:13px;left:50%;transform:translateX(-50%);width:min(94%,950px);z-index:8;display:flex;flex-direction:column;align-items:center;gap:9px;pointer-events:none;padding:45px 20px 13px;background:linear-gradient(0deg,#02040dd9,transparent);text-align:center}
.space3d-stage .space3d-lyrics #active,.space3d-stage .space3d-lyrics #previous,.space3d-stage .space3d-lyrics #next,.space3d-stage .space3d-lyrics #secondary,.space3d-stage .space3d-lyrics #cueinfo,.space3d-stage .space3d-lyrics #slangHints{position:static;max-width:100%;min-height:0;pointer-events:auto;text-shadow:0 2px 12px #000,0 5px 30px #000;overflow-wrap:anywhere}
.space3d-stage .space3d-lyrics #active{font-size:clamp(29px,3.5vw,53px);font-weight:830;line-height:1.2;letter-spacing:-.035em;color:#fff}
.space3d-stage .space3d-lyrics #active .word{color:#fff;text-shadow:0 2px 15px #000}
.space3d-stage .space3d-lyrics #active .word.spoken{color:var(--s3-accent)}
.space3d-stage .space3d-lyrics #active .word.now{background:#fefefe;color:#111c23;text-shadow:none;box-shadow:0 0 30px var(--s3-accent)}
.space3d-stage .space3d-lyrics #previous,.space3d-stage .space3d-lyrics #next{color:#c9d1e1ac;font-size:clamp(14px,1.4vw,18px)}
.space3d-stage .space3d-lyrics #secondary{color:#dae8ff;font-size:clamp(17px,2.1vw,25px)}
.space3d-stage.empty .space3d-lyrics{padding:15px 14px;bottom:12px;width:auto;max-width:90%;background:#04081391;border:1px solid #ffffff14;border-radius:12px;backdrop-filter:blur(7px)}
.space3d-stage.empty .space3d-lyrics #active{font-size:12px!important;font-weight:500!important;color:#d5dce9;letter-spacing:.015em;white-space:normal}
.space3d-stage.empty .space3d-lyrics #previous,.space3d-stage.empty .space3d-lyrics #next{display:none}
.space3d-stage .space3d-settings{position:absolute;top:70px;right:16px;z-index:21;width:min(350px,calc(100% - 32px));max-height:calc(100% - 90px);overflow:auto;background:#080e19ec;backdrop-filter:blur(28px) saturate(140%);border:1px solid #60738d70;border-radius:20px;box-shadow:0 22px 70px #000d;padding:20px;display:none;overscroll-behavior:contain;text-align:left}
.space3d-stage .space3d-settings.is-open{display:block}
.space3d-settings h3{font-size:14px;font-weight:800;letter-spacing:.04em;color:#fff;margin:0 0 6px}
.space3d-settings .s3-desc{font-size:11px;color:#9aacc3;line-height:1.55;margin:0 0 14px}
.space3d-settings .s3-section{font-size:10px;letter-spacing:.15em;text-transform:uppercase;font-weight:750;color:#8192ac;margin:18px 0 9px}
.space3d-settings .s3-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.space3d-settings .s3-preset{min-width:0;border:1px solid #46536c77;border-radius:12px;background:#1821339c;padding:11px 10px;display:flex;align-items:center;gap:8px;color:#e7f1ff;font-size:11px;font-weight:680;text-align:left}
.space3d-settings .s3-preset .s3-dot{height:15px;width:15px;border-radius:50%;background:var(--dot);box-shadow:0 0 15px var(--dot);flex:0 0 auto}
.space3d-settings .s3-preset.selected{border-color:var(--s3-accent);background:#26374bbb;color:#fff;box-shadow:inset 0 0 0 1px #ffffff1c}
.space3d-settings .s3-preset:hover{border-color:#ffffff77}
.space3d-settings .s3-slider{display:flex;flex-direction:column;gap:6px;margin:13px 0}
.space3d-settings .s3-slider label{display:flex;justify-content:space-between;color:#d7e1ee;font-size:12px;font-weight:560;margin:0}
.space3d-settings .s3-slider output{color:var(--s3-accent);font-variant-numeric:tabular-nums;font-size:11px}
.space3d-settings .s3-slider input{width:100%;accent-color:var(--s3-accent);padding:0;cursor:pointer;height:17px;background:transparent;border:0}
.space3d-settings .s3-actions{display:flex;gap:8px;margin-top:18px}
.space3d-settings .s3-actions button{flex:1;padding:11px 9px;background:#1b2839;border:1px solid #4c5e77;border-radius:11px;color:#e7f4ff;font-size:11px;font-weight:700}
.space3d-settings .s3-actions button:hover{border-color:var(--s3-accent)}
.space3d-stage:fullscreen{min-height:100dvh!important;border:0;border-radius:0}
.space3d-stage:fullscreen .space3d-lyrics{bottom:6%}
.space3d-stage.space3d-off .space3d-canvas{filter:saturate(.3) brightness(.35)}
@media(min-width:1450px){.karaoke.space3d-stage{min-height:72vh}}
@media(max-width:800px){
 body.space3d-on .work{padding:15px 12px;gap:13px}
 .karaoke.space3d-stage{min-height:clamp(420px,57dvh,650px);border-radius:17px}
 .space3d-stage .space3d-brand{font-size:8px;left:13px;top:18px}
 .space3d-stage .space3d-gear{top:9px;right:9px;width:42px;height:42px;border-radius:12px}
 .space3d-stage .space3d-lyrics{bottom:8px;width:98%;padding:30px 10px 10px}
 .space3d-stage .space3d-lyrics #active{font-size:clamp(25px,7.5vw,36px)}
 .space3d-stage.empty .space3d-lyrics{max-width:94%}
 .space3d-stage .space3d-settings{top:59px;right:8px;width:calc(100% - 16px);max-height:calc(100% - 69px);padding:14px}
 .space3d-settings .s3-presets{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 .space3d-settings .s3-preset{padding:9px 7px;font-size:10px}
}
@media(prefers-reduced-motion:reduce){.space3d-stage .space3d-gear{transition:none}}

/* SPACE 3D v2 — cinematic palette controls + lyric composition presets */
.space3d-stage .space3d-settings{max-height:calc(100% - 88px);scrollbar-width:thin;scrollbar-color:#7d90ad #0b101b}
.space3d-settings .s3-presets{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.space3d-settings .s3-preset{padding:10px 7px;min-height:42px;line-height:1.25}
.space3d-settings .s3-section{margin:19px 0 10px}
.space3d-settings .s3-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.space3d-settings .s3-option{border:1px solid #4a566f85;background:#1922377f;color:#d7e4f7;font-size:11px;border-radius:11px;padding:10px 7px;min-height:37px;font-weight:650}
.space3d-settings .s3-option.selected{color:#fff;background:#253c4dbb;border-color:var(--s3-accent);box-shadow:inset 0 0 0 1px #ffffff18}
.space3d-settings .s3-option:hover{border-color:#ffffffaa}
.space3d-settings .s3-palette-preview{width:100%;height:22px;margin:12px 0;border-radius:8px;border:1px solid #ffffff3a;box-shadow:inset 0 0 12px #0005}
.space3d-settings .s3-manual{display:flex;justify-content:space-between;align-items:center;font-size:11px;font-weight:650;color:#b9d0df;margin:8px 0}
.space3d-settings .s3-manual input{width:57px;height:33px;padding:2px;border-radius:9px;cursor:pointer}
.space3d-stage .space3d-lyrics{--s3-overlay-opacity:.55;--s3-text-shadow:0 3px 10px #000,0 7px 25px #000,0 0 2px #000;will-change:filter}
.space3d-stage:not(.empty) .space3d-lyrics #active,.space3d-stage:not(.empty) .space3d-lyrics #secondary,.space3d-stage:not(.empty) .space3d-lyrics #previous,.space3d-stage:not(.empty) .space3d-lyrics #next{text-shadow:var(--s3-text-shadow)}
.space3d-stage:not(.empty)[data-textfx="none"] .space3d-lyrics{background:none;border:none;box-shadow:none;backdrop-filter:none}
.space3d-stage:not(.empty)[data-textfx="none"] .space3d-lyrics :is(#active,#secondary,#previous,#next){text-shadow:none}
.space3d-stage:not(.empty)[data-textfx="shadow"] .space3d-lyrics{background:none;box-shadow:none;backdrop-filter:none;--s3-text-shadow:0 3px 5px #000,0 7px 27px #000,0 0 40px #000}
.space3d-stage:not(.empty)[data-textfx="blur"] .space3d-lyrics{background:rgb(4 9 22 / calc(var(--s3-overlay-opacity) * .62));backdrop-filter:blur(calc(8px + var(--s3-overlay-opacity) * 16px));border-radius:22px;box-shadow:0 12px 44px #0005;padding:18px 22px 20px;bottom:21px}
.space3d-stage:not(.empty)[data-textfx="rectangle"] .space3d-lyrics{background:rgb(1 5 13 / calc(var(--s3-overlay-opacity) * .96));border:1px solid #ffffff2e;border-radius:13px;padding:18px 22px 20px;bottom:21px;box-shadow:0 12px 36px #000a}
.space3d-stage:not(.empty)[data-textfx="darken"] .space3d-lyrics{background:linear-gradient(0deg,rgb(0 0 0 / var(--s3-overlay-opacity)) 0%,rgb(0 0 0 / calc(var(--s3-overlay-opacity) * .67)) 54%,transparent 100%);width:100%;max-width:100%;padding:65px 26px 19px}
.space3d-stage:not(.empty)[data-textfx="glass"] .space3d-lyrics{background:linear-gradient(130deg,rgb(8 20 32 / calc(var(--s3-overlay-opacity) * .82)),rgb(27 22 40 / calc(var(--s3-overlay-opacity) * .85)));backdrop-filter:blur(18px) saturate(1.5);border:1px solid #ffffff29;border-radius:18px;box-shadow:inset 0 1px #ffffff1c,0 14px 50px #0007;padding:18px 22px 20px;bottom:21px}
.space3d-stage:not(.empty)[data-textfx="gradient"] .space3d-lyrics{background:linear-gradient(0deg,rgb(2 3 11 / var(--s3-overlay-opacity)),rgb(3 7 17 / calc(var(--s3-overlay-opacity) * .65)) 48%,transparent);width:100%;max-width:100%;padding:68px 26px 20px;box-shadow:none}
.space3d-stage:not(.empty)[data-textfx="outline"] .space3d-lyrics{background:none;--s3-text-shadow:0 2px 10px #000,0 0 26px var(--s3-accent),0 0 3px var(--s3-accent);filter:drop-shadow(0 0 6px var(--s3-accent))}
.space3d-stage:not(.empty)[data-textfx="outline"] .space3d-lyrics #active{-webkit-text-stroke:.35px var(--s3-accent)}
@media(max-width:800px){
 .space3d-stage:not(.empty)[data-textfx="blur"] .space3d-lyrics,.space3d-stage:not(.empty)[data-textfx="rectangle"] .space3d-lyrics,.space3d-stage:not(.empty)[data-textfx="glass"] .space3d-lyrics{width:calc(100% - 20px);padding:13px 11px 14px;bottom:9px}
 .space3d-stage:not(.empty)[data-textfx="darken"] .space3d-lyrics,.space3d-stage:not(.empty)[data-textfx="gradient"] .space3d-lyrics{padding:55px 9px 14px}
 .space3d-settings .s3-option{font-size:10px;padding:9px 6px}
}

/* DLB Resonance Architect v3.0: EQ routing, creative automation, editable templates */
.space3d-settings .s3-eq-grid{display:grid;gap:7px;padding:1px 0 4px}
.space3d-settings .s3-eq-line{display:grid;grid-template-columns:minmax(0,1fr) 92px;align-items:center;column-gap:9px;row-gap:5px;padding:10px;border:1px solid #51658256;border-radius:12px;background:#121d2bd9}
.space3d-settings .s3-eq-name{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;font-size:10px;letter-spacing:.065em;font-weight:700;color:#cde5f7}
.space3d-settings .s3-eq-meter{width:97px;height:6px;background:#25374c;border-radius:99px;overflow:hidden;display:block}
.space3d-settings .s3-eq-meter i{display:block;height:100%;width:100%;background:linear-gradient(90deg,var(--s3-accent),var(--s3-accent2));border-radius:99px;transform:scaleX(0);transform-origin:left;box-shadow:0 0 8px var(--s3-accent)}
.space3d-settings .s3-eq-line select{min-width:0;width:100%;padding:7px 20px 7px 8px;color:#e3f4ff;background:#111b2c;border:1px solid #54678177;border-radius:8px;font-size:10px;font-weight:650}
.space3d-settings .s3-eq-line select option{background:#152033;color:#fff}
.space3d-settings .s3-eq-line input[type=range]{accent-color:var(--s3-accent);width:100%;min-width:0;padding:0;height:20px;cursor:pointer}
.space3d-settings .s3-evolution{border:1px solid #50678366;border-radius:14px;background:#101c2dbe;padding:12px}
.space3d-settings .s3-evolution-switch{display:flex;align-items:center;gap:10px;font-size:11px;line-height:1.5;font-weight:650;color:#e5f5ff}
.space3d-settings .s3-evolution-switch input{accent-color:var(--s3-accent);width:16px;height:16px;flex:0 0 16px}
.space3d-settings .s3-evolution .s3-slider{margin:9px 0}
.space3d-settings .s3-narrative{margin-top:11px;letter-spacing:.12em;font-size:9px;font-weight:800;color:var(--s3-accent);text-transform:uppercase}
.space3d-settings .s3-template-name,.space3d-settings .s3-template-select{width:100%;padding:10px 11px;background:#111c2c;border:1px solid #60738d85;border-radius:10px;color:#eff8ff;font-size:12px;outline-color:var(--s3-accent);margin-bottom:10px;box-sizing:border-box}
.space3d-settings .s3-lab-buttons{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-bottom:8px}
.space3d-settings .s3-lab-buttons button{min-width:0;line-height:1.4;padding:10px 7px;border:1px solid #6d829f7c;border-radius:10px;background:#26364a;color:#effaff;font-size:10px;font-weight:750}
.space3d-settings .s3-lab-buttons button:hover{background:#35506a;border-color:var(--s3-accent)}
.space3d-settings .s3-lab-buttons button:first-child{background:linear-gradient(135deg,#26445f,#344363)}
.space3d-settings .s3-lab-status{min-height:32px;padding:7px;font-size:10px;line-height:1.5;color:#a4e9df}
@media(max-width:800px){
 .space3d-settings .s3-eq-line{padding:8px;grid-template-columns:minmax(0,1fr) 80px}
 .space3d-settings .s3-eq-name{font-size:9px}
 .space3d-settings .s3-eq-meter{width:65px}
 .space3d-settings .s3-eq-line select{font-size:9px}
}

/* DLB Kinetic Lyrics: vertically moving text over the 3D world. */
.space3d-stage .s3-scroll-viewport{position:absolute;inset:9% 3% 5%;overflow:hidden;z-index:12;pointer-events:none;mask-image:linear-gradient(180deg,transparent,#000 14%,#000 82%,transparent);-webkit-mask-image:linear-gradient(180deg,transparent,#000 14%,#000 82%,transparent);contain:layout paint}
.space3d-stage .s3-scroll-rail{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.space3d-stage .s3-scroll-viewport[hidden]{display:none}
.space3d-stage .space3d-lyrics[hidden]{display:none}
.space3d-stage .s3-lyric-line{position:absolute;top:0;left:50%;width:min(87%,820px);box-sizing:border-box;text-align:center;color:#e9e9f5;transform-origin:center center;opacity:0;line-height:1.32;padding:10px 30px 12px;pointer-events:auto;overflow-wrap:anywhere;white-space:normal;will-change:transform,opacity;backface-visibility:hidden;transition:background .24s,border-color .24s;cursor:pointer;text-shadow:0 4px 23px #000,0 0 5px #000}
.space3d-stage .s3-lyric-main{font-size:clamp(17px,var(--s3-lyric-font,28px),46px);font-weight:760;letter-spacing:-.025em}
.space3d-stage .s3-lyric-translation{font-size:clamp(13px,1.7vw,21px);line-height:1.25;color:#d9eaff;font-weight:570;margin-top:7px;text-shadow:0 1px 10px #000}
.space3d-stage .s3-lyric-number{position:absolute;top:50%;left:12px;transform:translateY(-50%);font-size:10px;font-weight:750;letter-spacing:.12em;color:#ffffff55}
.space3d-stage .s3-lyric-line:not(.is-active){filter:blur(.18px);color:#c3cbe0}
.space3d-stage .s3-lyric-line.is-active{color:#fff;border-radius:18px}
.space3d-stage .s3-lyric-word{display:inline;cursor:pointer}
.space3d-stage .s3-lyric-word.s3-spoken{color:var(--s3-accent);text-shadow:0 0 14px var(--s3-accent)}
.space3d-stage .s3-lyric-word.s3-now{color:#fff4bd;text-shadow:0 0 13px var(--s3-accent),0 0 8px #fff;font-weight:900}
.space3d-stage[data-lyriclook="glass"] .s3-lyric-line.is-active{background:rgb(5 14 28 / calc(var(--s3-lyric-opacity,.7)*.8));backdrop-filter:blur(18px);border:1px solid #ffffff22;box-shadow:0 12px 48px #0008}
.space3d-stage[data-lyriclook="clean"] .s3-lyric-line.is-active{background:none;box-shadow:none;text-shadow:0 3px 14px #000,0 7px 28px #000}
.space3d-stage[data-lyriclook="neon"] .s3-lyric-line.is-active{text-shadow:0 0 10px var(--s3-accent),0 0 24px var(--s3-accent2),0 5px 24px #000;-webkit-text-stroke:.3px var(--s3-accent)}
.space3d-stage[data-lyriclook="poster"] .s3-lyric-line.is-active{background:rgb(0 0 0 / calc(var(--s3-lyric-opacity,.8)*.93));border:2px solid #fff;box-shadow:7px 7px 0 var(--s3-accent)}
.space3d-stage[data-lyriclook="poster"] .s3-lyric-line.is-active .s3-lyric-main{font-weight:950;letter-spacing:-.06em;text-transform:uppercase}
.space3d-stage[data-lyriclook="mono"] .s3-lyric-line{font-family:ui-monospace,Menlo,Consolas,monospace;letter-spacing:.01em;font-weight:500}
.space3d-stage[data-lyriclook="mono"] .s3-lyric-main{font-weight:500}
.space3d-stage[data-lyriclook="gradient"] .s3-lyric-line.is-active .s3-lyric-main{background:linear-gradient(100deg,var(--s3-accent),#fff,var(--s3-accent2));background-clip:text;-webkit-background-clip:text;color:transparent;filter:drop-shadow(0 4px 16px #000)}
.space3d-stage[data-lyriclook="glassdark"] .s3-lyric-line.is-active{background:rgb(0 1 5 / calc(var(--s3-lyric-opacity,.8)*.95));border-radius:5px;padding:16px 30px 20px;box-shadow:0 12px 35px #000c}
.space3d-stage[data-lyriclook="soft"] .s3-lyric-line.is-active{background:rgb(12 6 34 / calc(var(--s3-lyric-opacity,.7)*.6));border-radius:40px;backdrop-filter:blur(23px);box-shadow:0 0 42px var(--s3-accent2)}
.space3d-stage[data-lyricmode="stack"] .s3-scroll-viewport{mask-image:linear-gradient(to bottom,transparent,black 20%,black 80%,transparent)}
.space3d-stage[data-lyricmode="prompt"] .s3-lyric-main{font-family:ui-monospace,Menlo,monospace;letter-spacing:.015em;font-weight:580}
.space3d-stage.s3-scroll-on .space3d-lyrics{display:none!important}
.space3d-stage:not(.s3-scroll-on) .s3-scroll-viewport{display:none!important}
@media(max-width:800px){
 .space3d-stage .s3-scroll-viewport{inset:8% 1% 5%}
 .space3d-stage .s3-lyric-line{width:94%;padding:10px 11px 13px}
 .space3d-stage .s3-lyric-main{font-size:clamp(16px,5.7vw,30px)}
 .space3d-stage .s3-lyric-translation{font-size:clamp(12px,3.5vw,18px);margin-top:3px}
 .space3d-stage .s3-lyric-number{display:none}
}
@media(prefers-reduced-motion:reduce){.space3d-stage .s3-lyric-line{transition:none}}

/* Six distinct concept engines and precise randomized scopes. */
.space3d-settings .s3-world-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 13px}
.space3d-settings .s3-world-choice{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-height:72px;min-width:0;padding:12px 10px;text-align:left;border:1px solid #415675;border-radius:12px;color:#d9ebff;background:linear-gradient(136deg,#0f1b2f,#202540);box-shadow:inset 0 0 16px #0004}
.space3d-settings .s3-world-choice strong{font-size:10px;line-height:1.35;font-weight:900;letter-spacing:.025em}
.space3d-settings .s3-world-choice small{font-size:9px;color:#93aac6;line-height:1.45;font-weight:450}
.space3d-settings .s3-world-choice.selected{border-color:var(--s3-accent);box-shadow:0 0 16px #3d83b526,inset 0 0 0 1px var(--s3-accent);background:linear-gradient(135deg,#193b4c,#242e49)}
.space3d-settings .s3-world-choice:hover{border-color:#ffffffa8}
.space3d-settings .s3-random-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:4px 0 12px}
.space3d-settings .s3-random-scope{min-width:0;min-height:41px;padding:8px 6px;color:#cfe0f7;border:1px solid #51658188;border-radius:10px;background:#1a263a;text-align:center}
.space3d-settings .s3-random-scope strong{display:block;font-size:10px;letter-spacing:.045em;line-height:1.4}
.space3d-settings .s3-random-scope.selected{border-color:var(--s3-accent);background:#2b415a;box-shadow:inset 0 0 0 1px var(--s3-accent)}
.space3d-settings .s3-random-scope:hover{border-color:#c8e4ff}
.space3d-settings .s3-random-action{display:block;width:100%;border:1px solid var(--s3-accent);background:linear-gradient(135deg,#377397,#5c4178);color:#fff;border-radius:12px;font-size:12px;font-weight:900;letter-spacing:.05em;padding:13px 10px;text-align:center}
.space3d-settings .s3-random-action:hover{filter:brightness(1.18)}
.space3d-settings .s3-random-msg{min-height:16px;color:#9fe5d9;font-size:10px;line-height:1.4;margin:7px 0}
@media(max-width:800px){.space3d-settings .s3-world-choice{min-height:59px;padding:8px}.space3d-settings .s3-world-choice strong{font-size:9px}.space3d-settings .s3-world-choice small{font-size:8px}}

/* ART DIRECTOR v5 — 20 thematic 3D environments, not 20 recolors */
.space3d-settings .s3-art-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:3px 0 13px}
.space3d-settings .s3-world-choice.s3-art-card{position:relative;min-height:100px;padding:11px 10px 12px 13px;justify-content:flex-end;overflow:hidden;border:1px solid #ffffff33;border-radius:12px;background:linear-gradient(153deg,#101722 6%,color-mix(in srgb,var(--art-a) 17%,#10121a) 56%,#080d15);box-shadow:inset 0 1px 0 #ffffff19;transition:border-color .16s,transform .16s,background .16s;gap:5px;isolation:isolate}
.space3d-settings .s3-art-card::before{content:"";position:absolute;inset:-22% -25% 40% 30%;z-index:-1;background:radial-gradient(ellipse, color-mix(in srgb,var(--art-b) 57%,transparent),transparent 70%);opacity:.65;transform:rotate(-25deg)}
.space3d-settings .s3-art-card::after{content:"";position:absolute;inset:auto 10px 0 10px;height:2px;background:linear-gradient(90deg,var(--art-a),var(--art-b),transparent);opacity:.6}
.space3d-settings .s3-art-card .s3-art-genre{position:absolute;top:9px;left:12px;color:var(--art-a);font-size:9px;font-weight:850;letter-spacing:.15em;text-transform:uppercase}
.space3d-settings .s3-art-card strong{color:#f6f7fa;font-size:12px;font-weight:850;text-shadow:0 2px 12px #000b;line-height:1.3;position:relative}
.space3d-settings .s3-art-card small{font-size:9px;line-height:1.3;font-weight:500;opacity:.93;position:relative;color:#cbd6e9}
.space3d-settings .s3-art-card:hover{transform:translateY(-2px);border-color:var(--art-a)}
.space3d-settings .s3-art-card.selected{border-color:var(--art-a);box-shadow:inset 0 0 0 1px var(--art-a),0 0 17px color-mix(in srgb,var(--art-b) 30%,transparent)}
.space3d-settings .s3-art-card.selected::after{height:3px;opacity:1}
.space3d-settings :is(.s3-legacy-palettes,.s3-legacy-worlds){margin:6px 0 13px;background:#121b29;border:1px solid #31445b;border-radius:11px;padding:0 10px}
.space3d-settings :is(.s3-legacy-palettes,.s3-legacy-worlds) summary{cursor:pointer;color:#99aac1;font-size:11px;font-weight:700;padding:11px 2px;list-style-position:inside}
.space3d-settings :is(.s3-legacy-palettes,.s3-legacy-worlds) summary:hover{color:#e5faff}
.space3d-settings .s3-legacy-palettes .s3-section{margin:8px 0}
.space3d-settings .s3-legacy-worlds .s3-world-grid{padding:7px 0 11px}
@media(max-width:800px){
 .space3d-settings .s3-art-grid{gap:7px}
 .space3d-settings .s3-world-choice.s3-art-card{min-height:90px;padding:9px 7px}
 .space3d-settings .s3-art-card strong{font-size:11px}
 .space3d-settings .s3-art-card small{font-size:8px}
 .space3d-settings .s3-art-card .s3-art-genre{top:6px;left:9px;font-size:8px}
}

/* Studio v6.1 — premium stage-first karaoke, instead of words obscuring the album. */
.space3d-stage[data-studio]:not([data-studio=""]) .space3d-lyrics{
 width:100%;max-width:100%;bottom:0;gap:4px;box-sizing:border-box;
 padding:25px 24px 15px;border:none;border-radius:0;backdrop-filter:none;
 background:linear-gradient(0deg,#02050ce8 0%,#03070cd7 62%,transparent 100%);
 box-shadow:none;transform:translateX(-50%)
}
.space3d-stage[data-studio]:not([data-studio=""]) .space3d-lyrics #active{
 font-size:clamp(20px,2.45vw,31px);line-height:1.21;font-weight:770;
 width:min(88%,860px);max-width:88%;letter-spacing:-.024em;
 text-shadow:0 2px 10px #000,0 5px 19px #000;
}
.space3d-stage[data-studio]:not([data-studio=""]) .space3d-lyrics #active .word{
 text-shadow:0 2px 9px #000,0 4px 15px #000
}
.space3d-stage[data-studio]:not([data-studio=""]) .space3d-lyrics #previous,
.space3d-stage[data-studio]:not([data-studio=""]) .space3d-lyrics #next{
 display:none
}
.space3d-stage[data-studio]:not([data-studio=""]) .space3d-lyrics #secondary{
 font-size:clamp(14px,1.6vw,19px);line-height:1.22;max-width:85%
}
.space3d-stage[data-studio]:not([data-studio=""]) .space3d-lyrics #cueinfo{
 font-size:10px;letter-spacing:.09em;opacity:.62
}
@media(max-width:800px){
 .space3d-stage[data-studio]:not([data-studio=""]) .space3d-lyrics{padding:19px 9px 11px;gap:3px}
 .space3d-stage[data-studio]:not([data-studio=""]) .space3d-lyrics #active{
   font-size:clamp(19px,5vw,26px);max-width:98%;width:98%;
 }
 .space3d-stage[data-studio]:not([data-studio=""]) .space3d-lyrics #secondary{
   font-size:13px;max-width:98%
 }
}

/* AUDIO-REACTIVE WINGS v9 — behind karaoke captions, never intercepting clicks */
.space3d-stage .s3-reactive-wings{position:absolute;inset:0;display:block;width:100%;height:100%;z-index:2;pointer-events:none;mix-blend-mode:screen}
.space3d-settings .s3-auto-cover{width:100%;padding:13px 10px;border:1px solid #526073;border-radius:12px;background:#172231;color:#dbe5f1;font-size:12px;font-weight:800;text-align:center;cursor:pointer;letter-spacing:.025em}
.space3d-settings .s3-auto-cover.is-active{color:#d4f4a5;background:#26352b;border-color:#90bd79;box-shadow:inset 0 0 0 1px #b3e6a328}
.space3d-settings .s3-auto-cover:hover{border-color:#defca2}
@media (prefers-reduced-motion:reduce){.space3d-stage.space3d-off .s3-reactive-wings{display:none}}

/* V10 actual spectrum: dark instrument panels must stay visible, not screen-blended away. */
.space3d-stage .s3-reactive-wings{mix-blend-mode:normal}

/* SPACE 3D v19 — engine-native, selectable postprocessing */
.space3d-settings .s3-postfx{margin:13px 0;padding:12px;border:1px solid #345674;background:linear-gradient(145deg,#07172adc,#142c42cc);border-radius:12px;}
.s3-postfx h4{font-size:11px;letter-spacing:.11em;margin:0 0 6px;color:#b2e5fa}
.s3-postfx p{font-size:11px;line-height:1.45;margin:0 0 10px;color:#9fbac8}
.s3-postfx-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.s3-postfx-grid button{min-width:0;min-height:35px;border-radius:8px;font-size:11px;font-weight:650;padding:7px!important;background:#0c243b;color:#b8d8e8;border:1px solid #31536b}
.s3-postfx-grid button.selected{color:#f0ffff;background:#125892;border-color:#5bcff8;box-shadow:inset 0 1px 0 #b4f5ff75,0 0 12px #008fe444}
.s3-postfx-grid button:focus-visible{outline:2px solid #6ae1ff;outline-offset:2px}
@media(max-width:800px){.s3-postfx-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Spatial sound sculptures replace the old two dimensional spectrum windows. */
.space3d-stage .s3-reactive-wings{display:none!important}

/* v21: lyric cue collision guard and scene-specific 3D equalizer selector */
.space3d-stage .s3-scroll-viewport{z-index:13;isolation:isolate}
.space3d-stage .s3-lyric-line{transform-origin:top center;overflow-wrap:anywhere;max-width:96%;box-sizing:border-box}
.space3d-stage .s3-lyric-line:not(.is-active){filter:none!important;box-shadow:none!important;backdrop-filter:none!important}
.space3d-stage .s3-lyric-line.is-active{position:absolute}
.space3d-stage .s3-lyric-main{line-height:1.2;max-width:100%}
.space3d-stage .s3-lyric-translation{line-height:1.24}
.space3d-settings .s3-scene-eq{margin:14px 0;padding:12px;border:1px solid #315b84;border-radius:13px;background:linear-gradient(150deg,#05152a,#132942)}
.s3-scene-eq h4{font-size:11px;letter-spacing:.1em;margin:0 0 6px;color:#c3efff}
.s3-scene-eq p{font-size:11px;color:#9eb8c9;margin:0 0 10px;line-height:1.45}
.s3-scene-eq-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.s3-scene-eq-btn{min-height:38px;border:1px solid #35536e;border-radius:9px;padding:8px 6px;font-weight:700;font-size:11px;background:#0d2139;color:#bed9eb;text-align:center}
.s3-scene-eq-btn.selected{background:linear-gradient(145deg,#116cae,#194d80);border-color:#5ce2ff;color:#fff;box-shadow:inset 0 1px 0 #b2f6ff80,0 0 12px #008ef844}
.s3-scene-eq-btn:focus-visible{outline:2px solid #8ce8ff;outline-offset:2px}
@media(max-width:800px){.space3d-stage .s3-lyric-line{width:94%;padding:8px 8px 10px}.space3d-stage .s3-lyric-main{font-size:clamp(17px,5.2vw,29px)}}

/* v21.2 adaptive lyric typography; preserve the scene for oversized cues */
.space3d-stage .s3-lyric-line[data-compact="md"] .s3-lyric-main{font-size:clamp(16px,2.4vw,26px)}
.space3d-stage .s3-lyric-line[data-compact="lg"] .s3-lyric-main{font-size:clamp(16px,2vw,22px)}
.space3d-stage .s3-lyric-line[data-compact="xl"] .s3-lyric-main{font-size:clamp(15px,1.8vw,20px)}
@media(max-width:800px){
 .space3d-stage .s3-lyric-line[data-compact="md"] .s3-lyric-main{font-size:clamp(16px,4.6vw,23px)}
 .space3d-stage .s3-lyric-line[data-compact="lg"] .s3-lyric-main{font-size:clamp(15px,4.1vw,20px)}
 .space3d-stage .s3-lyric-line[data-compact="xl"] .s3-lyric-main{font-size:clamp(14px,3.9vw,18px)}
}
