/* One interactive Three.js universe; conversation controls float over it. */
#intro,#personal,#studio-open,#chat-open,#exit,#enter,.bottom #mode,.bottom #catalog-note{display:none!important}
header{padding:25px 32px}.header-right{gap:8px}.header-right .outline{background:#12102388}
.vignette{background:radial-gradient(ellipse at 48% 43%,transparent 5%,#05051044 62%,#04050ce0 100%)}
#studio{position:fixed;inset:0;z-index:3;pointer-events:none;color:#f1ecfc;background:none}
#studio button,#studio input,#studio-log{pointer-events:auto}
.studio-top,.studio-side,.presence,.studio-center h1,.studio-center>small,.voice-actions label,#studio-mic,#studio-transition{display:none!important}
#world-heading{position:absolute;left:50%;top:110px;transform:translateX(-50%);display:flex;align-items:center;flex-direction:column;gap:10px}
.studio-kicker{font-size:8px;letter-spacing:2.5px;color:#a49bb8}
#world-name{font-weight:400;letter-spacing:9px;font-size:20px;color:#eee4ff;text-shadow:0 0 35px #c3a1ff}
#world-home{padding:6px 12px;font-size:9px}
#engine-selector{position:absolute;left:32px;top:120px;width:190px;padding:18px;border:1px solid #b9a0dd24;border-radius:20px;background:linear-gradient(140deg,#171224b8,#08091244);backdrop-filter:blur(12px)}
#engine-orbits{display:flex;gap:8px;margin:17px 0}.engine-orbit{height:26px;width:26px;border-radius:50%;border:1px dashed #b7a3d53d;background:#17142377;color:#80758f;font-size:10px}.engine-orbit.selected{border:1px solid #d3b8ff;background:radial-gradient(circle at 30% 30%,#ecdcff,#8563bb);color:#1c122d;box-shadow:0 0 23px #b58be86b}.engine-orbit:hover{border-color:#c8a9f8}#team-mode{font-size:10px;padding:8px 12px;width:100%}#engine-status{font-size:10px;line-height:1.7;color:#a699b9;margin-bottom:0}
.studio-center{position:absolute;left:50%;bottom:75px;transform:translateX(-50%);width:min(560px,calc(100vw - 55px));text-align:center}
.studio-overline{font-size:8px;letter-spacing:3px;color:#d5c2f3;display:flex;justify-content:center;align-items:center;gap:9px}.studio-overline i{width:5px;height:5px;background:#ccadff;border-radius:50%;box-shadow:0 0 12px #b48df4}
#studio-status{font-size:12px;color:#c5b9d5;line-height:1.5;margin:10px auto;max-width:480px;min-height:18px;text-shadow:0 2px 12px #000}
.voice-actions{position:absolute;right:9px;bottom:10px}.voice-actions #studio-stop{font-size:0;padding:0;width:27px;height:27px;border-color:#c9b2e33b;background:#21162b}.voice-actions #studio-stop:after{content:'■';font-size:9px;color:#bda2d8}.voice-actions #studio-stop:hover{background:#52365e}
#studio-form{display:flex;align-items:center;border:1px solid #ba9ee03d;border-radius:22px;padding:6px 48px 6px 14px;background:linear-gradient(120deg,#231c31b8,#0e0c19c9);backdrop-filter:blur(20px);box-shadow:0 10px 70px #0006}
#studio-text{width:0;flex:1;background:none;border:0;padding:12px 4px;font:inherit;font-size:12px;color:#f1e9ff;outline:none}#studio-text::placeholder{color:#8d7e9f}#studio-send{width:33px;height:33px;border:1px solid #e2c7ff30;border-radius:50%;background:#ad8bd54d;font-size:21px;color:#e3cdfa}
.studio-feed{position:absolute;right:28px;top:125px;width:245px;max-height:calc(100vh - 345px);padding:18px;border:1px solid #b69bd81f;border-radius:20px;background:linear-gradient(135deg,#100f1b9c,#08091155);backdrop-filter:blur(14px)}
#studio-log{max-height:calc(100vh - 415px);overflow:auto;scrollbar-width:thin;scrollbar-color:#a384ba40 transparent;margin-top:15px}.studio-entry{padding:13px 0;border-bottom:1px solid #dac2ff12;font-size:12px;line-height:1.65}.studio-entry b{font-size:8px;letter-spacing:1.8px;color:#a996c4}.studio-entry p{white-space:pre-wrap;overflow-wrap:anywhere;color:#e2d8ed;margin:7px 0}.studio-entry.activity p{color:#b4d4d3}.studio-hint{font-size:11px;line-height:1.7;color:#8d819e}
#wake-hud{position:fixed;bottom:21px;left:50%;transform:translateX(-50%);z-index:4;display:flex;align-items:center;gap:12px;font-size:9px;color:#b3a4c6;background:#100c18c9;border:1px solid #b89ae525;padding:6px 10px;border-radius:25px;max-width:95vw;backdrop-filter:blur(10px)}#wake-toggle{font-size:9px;padding:6px 10px}#wake-status{line-height:1.4}#wake-hud:before{content:'';width:5px;height:5px;border-radius:50%;background:#b99cdd;box-shadow:0 0 12px #c0a0ee}
.bottom{z-index:2;pointer-events:none;bottom:28px}.bottom .controls{pointer-events:auto}.bottom .controls span{display:none}
body[data-world-travel=true] #world-name{animation:worldArrival 1.2s ease}
@keyframes worldArrival{0%{opacity:.1;filter:blur(9px);letter-spacing:18px}100%{opacity:1;filter:blur(0);letter-spacing:9px}}
@media(max-width:980px){#engine-selector{left:22px;width:160px;padding:14px}#engine-orbits{gap:5px}.engine-orbit{width:22px;height:22px}.studio-feed{right:20px;width:210px}.header-right .outline{font-size:10px;padding:8px 10px}}
@media(max-width:740px){header{padding:20px}.wordmark{font-size:18px}.header-right{gap:5px}.header-right #computer-open{display:none}#engine-selector{left:18px;top:95px;width:140px;padding:12px}#engine-selector .studio-kicker{font-size:7px}#engine-status{font-size:9px}.engine-orbit{width:19px;height:19px}#world-heading{top:210px}.studio-feed{top:auto;right:20px;bottom:205px;width:calc(100vw - 40px);max-height:120px;background:#110e1a99}#studio-log{max-height:80px;margin-top:0}.studio-feed>.studio-kicker,.studio-hint{display:none}.studio-center{bottom:78px}#wake-hud{width:max-content;max-width:95vw}.bottom{left:14px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

.voice-actions{z-index:2}#studio-stop{cursor:pointer}#studio-stop:hover:before{content:'Terminar';position:absolute;right:35px;font-size:10px;background:#1e142a;padding:6px 10px;border-radius:10px}

button.planet-label{pointer-events:auto;background:none;border:0;padding:5px;color:#d8c9ec;font:inherit;font-size:9px;cursor:pointer}button.planet-label.core{font-size:11px;letter-spacing:4px}button.planet-label:hover{color:#fff;text-shadow:0 0 15px #d1aeff}

.voice-picker{border-top:1px solid #bba2e324;margin-top:15px;padding-top:15px}.voice-picker label{font-size:8px;letter-spacing:2px;color:#a99abf;display:block;margin-bottom:10px}.voice-picker select{pointer-events:auto;width:100%;border:1px solid #af91d13b;background:#181123;color:#e8ddf8;border-radius:9px;padding:8px;font:inherit;font-size:10px}.voice-picker button{width:100%;font-size:10px;margin-top:8px;padding:8px}.voice-picker p{font-size:9px;color:#9d8baa;line-height:1.6;margin-bottom:0}

.voice-picker label[for=voice-tone]{margin-top:12px}#engine-selector{max-height:calc(100vh - 255px);overflow-y:auto;pointer-events:auto;scrollbar-width:thin}

/* Compact voice console, with connection status separate from credentials. */
#engine-selector{width:208px;padding:20px;border-radius:24px;background:linear-gradient(155deg,#1a142bdc,#090b16c9);border-color:#cdb0ff24;box-shadow:0 18px 60px #0004,inset 0 1px 0 #ffffff08;max-height:calc(100vh - 245px);scrollbar-color:#84709c44 transparent}
#engine-orbits{justify-content:space-between;margin:16px 0 12px;gap:7px}.engine-orbit{width:28px;height:28px}#engine-status{font-size:9px;line-height:1.5;margin:10px 0 0}#team-mode{border-radius:11px;background:#b599de08;border-color:#bba0df25;padding:9px}
.voice-picker{margin-top:17px;padding-top:17px;display:flex;flex-direction:column;gap:8px}.voice-picker label{margin:0;font-size:7px;letter-spacing:1.8px}.voice-picker select{min-height:35px;padding:9px 11px;border-radius:11px;background:#21192e99;border-color:#b79bd02b;font-size:11px;outline-offset:3px}.voice-picker select:focus-visible{outline:2px solid #c0a4ed}
.voice-connection{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:20px;margin:0 0 7px}.voice-connection span{font-size:8px;color:#b8dace;display:flex;align-items:center;gap:5px}.voice-connection span[hidden]{display:none}.voice-connection i{width:4px;height:4px;border-radius:50%;background:#94d6b8;box-shadow:0 0 8px #94d6b840}.voice-picker #eleven-connect{margin:0;width:auto;font-size:8px;padding:5px 7px;border-radius:8px}.voice-picker #eleven-connect.connected{border:0;background:transparent;color:#b5a5ca}.voice-picker #eleven-connect.connected:hover{background:#b394d81c;color:#eee2ff}
.voice-picker .voice-description{margin:0;min-height:13px;font-size:9px;line-height:1.45;color:#b9a8cf;overflow-wrap:anywhere}.voice-options{pointer-events:auto;margin:2px 0 3px;border-top:1px solid #b79bd014;padding-top:10px}.voice-options summary{cursor:pointer;font-size:9px;color:#b6a5c9;list-style:none;display:flex;justify-content:space-between}.voice-options summary:after{content:'+';font-size:13px}.voice-options[open] summary:after{content:'−'}.voice-options label{margin-top:12px!important;margin-bottom:7px!important}
.voice-picker #voice-preview{margin:3px 0 0;border-radius:11px;border-color:#cfb8f344;background:linear-gradient(120deg,#a681d525,#725ca218);padding:10px;font-size:10px;color:#e6d7fa}.voice-picker #voice-preview:hover{background:#ae87dc30}.voice-picker #voice-choice-status{font-size:8px;line-height:1.5;margin:0;overflow-wrap:anywhere;color:#9688a7;min-height:24px}
@media(max-width:980px){#engine-selector{width:184px;padding:16px;left:20px}.engine-orbit{width:24px;height:24px}}

/* Deep black space lets Avrell's stellar light carry the scene. */
body{background:#000}.vignette{background:radial-gradient(ellipse at 50% 48%,transparent 15%,#0005 66%,#000d 100%)}
#engine-selector{background:linear-gradient(155deg,#0c0b12e8,#020204db);border-color:#cdb0ff1c}
.studio-feed{background:linear-gradient(135deg,#09090ee0,#020203ba)}
#studio-form{background:linear-gradient(120deg,#100e16e8,#040406ee)}
#wake-hud{background:#060509e8}.header-right .outline{background:#08080caa}
#computer-open,#account-register-tab,#studio-open,#chat-open{display:none!important}
#engine-selector{top:110px;max-height:calc(100dvh - 230px)}
@media(max-width:740px){header{padding:16px}.header-right #settings{display:none}#engine-selector{left:12px;top:86px;width:150px;padding:12px;max-height:calc(100dvh - 270px)}.voice-picker{margin-top:10px;padding-top:10px;gap:6px}#engine-orbits{gap:4px}.engine-orbit{width:20px;height:20px}#engine-status,#team-mode,.voice-connection{display:none}#world-heading{top:100px;left:72%}#world-name{font-size:12px;letter-spacing:4px}.studio-feed{bottom:198px;right:12px;width:calc(100vw - 24px);max-height:120px}.studio-center{width:calc(100vw - 24px);bottom:75px}#studio-status{font-size:10px}#wake-hud{bottom:14px}#world-heading .studio-kicker{font-size:6px}dialog{width:calc(100vw - 24px);max-height:85dvh;overflow:auto}}
/* Safari form controls and resilient, GPU-independent stellar presentation. */
.voice-picker select{-webkit-appearance:none;appearance:none;padding-right:28px;background-color:#15101d;background-image:linear-gradient(45deg,transparent 50%,#cdb8e6 50%),linear-gradient(135deg,#cdb8e6 50%,transparent 50%);background-position:calc(100% - 15px) 50%,calc(100% - 11px) 50%;background-size:4px 4px;background-repeat:no-repeat}
.voice-options summary::-webkit-details-marker{display:none}
#stellar-fallback{position:absolute;inset:0;overflow:hidden;background:#000;pointer-events:none;z-index:1}
.galaxy-ready #stellar-fallback{display:none}
.fallback-stars{position:absolute;inset:0;background-image:radial-gradient(circle,#cbb6f578 .7px,transparent 1.4px),radial-gradient(circle,#e7e3ff58 .6px,transparent 1.2px),radial-gradient(ellipse at center,#28103922,transparent 52%);background-size:137px 163px,211px 193px,100% 100%;background-position:17px 37px,83px 121px,center}
.fallback-core{position:absolute;left:50%;top:49%;width:150px;height:150px;transform:translate(-50%,-50%);filter:drop-shadow(0 0 18px #b58bf599)}
.fallback-core i{position:absolute;inset:0;background:radial-gradient(ellipse,#fff 0%,#eee4ff 5%,#ba8affaa 13%,#a675d52b 28%,transparent 65%);transform:scaleX(.18);animation:stellar-ray 8s ease-in-out infinite alternate}
.fallback-core i:nth-child(2){transform:rotate(60deg) scaleX(.18);animation-delay:-3s}
.fallback-core i:nth-child(3){transform:rotate(120deg) scaleX(.18);animation-delay:-5s}
.fallback-core span{position:absolute;inset:58px;border-radius:50%;background:radial-gradient(circle,#fff 15%,#f0e5ff 30%,#c197ff88 55%,transparent 75%);box-shadow:0 0 32px #d5adff66;animation:stellar-pulse 3s ease-in-out infinite alternate}
#stellar-fallback[data-phase=speaking] .fallback-core{filter:drop-shadow(0 0 32px #c197ff);width:200px;height:200px}
#stellar-fallback[data-phase=speaking] .fallback-core i{animation-duration:.7s}
#stellar-fallback[data-phase=speaking] .fallback-core span{inset:78px;animation-duration:.4s}
@keyframes stellar-ray{to{rotate:22deg;opacity:.65;scale:1.22}}
@keyframes stellar-pulse{to{transform:scale(1.22);opacity:.8}}
@media(prefers-reduced-motion:reduce){.fallback-core i,.fallback-core span{animation:none}}
/* Blender universe: a real lightweight path, plus progressively richer 3D. */
#universe-portrait{position:absolute;left:50%;top:48%;width:min(70vw,640px);height:min(70vw,640px);object-fit:contain;transform:translate(-50%,-50%);opacity:0;transition:opacity .6s,filter .5s;filter:brightness(1);}
#stellar-fallback.portrait-ready #universe-portrait{opacity:1}
#stellar-fallback.portrait-ready .fallback-core{display:none}
#stellar-fallback .fallback-stars{background-image:var(--galaxy-plate),radial-gradient(circle,#cbb6f578 .7px,transparent 1.4px),radial-gradient(circle,#e7e3ff58 .6px,transparent 1.2px);background-size:cover,137px 163px,211px 193px;background-position:center,17px 37px,83px 121px;opacity:.48}
body[data-quality=low] #stellar-fallback{display:block}
body[data-quality=low] #space>canvas,body[data-quality=low] #labels{display:none}
#stellar-fallback[data-phase=speaking] #universe-portrait{animation:horizon-voice 1.2s ease-in-out infinite alternate}
#stellar-fallback[data-phase=listening] #universe-portrait{filter:brightness(1.12)}
@keyframes horizon-voice{to{filter:brightness(1.3);transform:translate(-50%,-50%) scale(1.035)}}
#universe-settings{width:min(650px,calc(100vw - 32px));max-height:88dvh;overflow:auto;background:linear-gradient(145deg,#12101b,#030305);border:1px solid #c4a5eb30;border-radius:24px;padding:32px;color:#eee6fa}
#universe-settings h2{font-size:30px;margin:16px 0}#universe-settings p,#universe-settings small{color:#afa4bc;line-height:1.6}#universe-settings small{display:block;font-size:12px}#universe-settings label{display:block;margin:20px 0 10px;font-size:12px;letter-spacing:1px}
#quality-choice{width:100%;padding:13px 16px;color:#eee6fa;background:#191320;border:1px solid #c4a5eb35;border-radius:12px;font:inherit;color-scheme:dark}
.world-gallery{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:24px 0}.world-gallery button{display:flex;flex-direction:column;align-items:center;padding:8px 4px 14px;background:#ffffff03;border:1px solid #c4a5eb20;border-radius:15px;cursor:pointer;color:#eee6fa}.world-gallery button:hover,.world-gallery button:focus-visible{border-color:#d0a8f5;background:#b089d514}.world-gallery img{width:100%;height:auto;aspect-ratio:1;object-fit:contain}.world-gallery strong{font-size:10px;letter-spacing:2px}.world-gallery span{font-size:9px;color:#aca0bb;margin-top:8px;text-align:center}
#quality-status{font-size:12px}#settings{display:none!important}
@media(max-width:740px){#universe-portrait{left:68%;top:40%;width:92vw;height:92vw}#universe-settings{padding:22px}.world-gallery{grid-template-columns:repeat(2,1fr)}.header-right .outline{font-size:9px;padding:8px}.wordmark{font-size:16px}.wordmark span{font-size:5px}}
@media(prefers-reduced-motion:reduce){#stellar-fallback[data-phase=speaking] #universe-portrait{animation:none}}

@media(max-width:740px){.studio-feed:not(:has(.studio-entry)){display:none}}

/* All quality levels remain explorable. */
#stellar-fallback{pointer-events:auto;touch-action:none;cursor:grab}
#stellar-fallback:active{cursor:grabbing}
#universe-portrait,.fallback-stars,.lite-orbits{pointer-events:none}
.lite-orbits{position:absolute;inset:0;width:100%;height:100%}
.universe-gesture{position:fixed;left:50%;top:174px;transform:translateX(-50%);font-size:10px;letter-spacing:.4px;color:#b7a58b;pointer-events:none;z-index:3;text-align:center}
@media(max-width:740px){.universe-gesture{left:73%;top:155px;width:43%;font-size:8px}}

/* Genuine 3D at every tier; the lightweight artwork is a GPU fallback only. */
body.galaxy-ready[data-quality=low] #stellar-fallback{display:none}
body.galaxy-ready[data-quality=low] #space>canvas{display:block}
body.galaxy-ready[data-quality=low] #labels{display:block}

/* Names stay attached to their world without rotating or lagging behind it. */
#labels .planet-label{transform:translateX(-50%);transition:none;white-space:nowrap;font-size:10px;letter-spacing:1.5px;text-align:center;text-shadow:0 1px 5px #000,0 0 12px #000;line-height:1.3}
#labels button.planet-label{padding:5px 9px;border-radius:8px;background:#05050888;border:1px solid #ffffff12;backdrop-filter:blur(4px)}
#labels .planet-label.core{font-size:11px;letter-spacing:3px}
