:root{--night:#100e17;--surface:#1c1926;--ink:#f5f0f4;--dim:#bab2c4;--faint:#948a9e;--line:#37313f;--gold:#e5c78c;--violet:#cbb0ff;--btn:#cdb1ef;--btn-ink:#281737;--sheet:#201c2a;--soft:#282330}
:root[data-theme=light]{color-scheme:light;--night:#f7f4ef;--surface:#fffdf9;--ink:#2c2631;--dim:#645c67;--faint:#726879;--line:#d7cfd4;--gold:#795320;--violet:#6c4096;--btn:#56346e;--btn-ink:#fff7ff;--sheet:#fffdf9;--soft:#eee8ed}
html{scroll-padding-top:80px}body{margin:0}#hud-bar{position:sticky;top:0;z-index:1000;background:var(--night);color:var(--ink);border-bottom:1px solid var(--line);padding-top:env(safe-area-inset-top);font:500 15px/1.3 system-ui,sans-serif}
#hud-bar *,.hud-page *{box-sizing:border-box}.bar-inner{position:relative;width:min(1180px,100%);margin:auto;padding:8px clamp(14px,4vw,48px);min-height:62px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.shell-home,.shell-actions,.switch-mode,.shell-home i{display:inline-flex;align-items:center;justify-content:center;gap:9px}
.shell-home,.shell-actions a,.shell-actions button{color:var(--ink);text-decoration:none}
.shell-home{white-space:nowrap}.shell-home strong{font:650 clamp(16px,2.6vw,23px) Georgia,'Songti SC','Noto Serif CJK SC',serif;letter-spacing:.08em}
.shell-home i{width:28px;height:28px;background:linear-gradient(145deg,#eee1c3,#b38848);border-radius:8px;color:#342235}
.shell-home svg{width:19px;height:19px}.shell-actions{gap:5px}.shell-actions button,.shell-actions a{box-sizing:border-box;padding:0;width:42px;height:42px;min-height:42px;display:inline-flex;align-items:center;justify-content:center;font:inherit;cursor:pointer;border:1px solid transparent;border-radius:9px;background:none}
.shell-actions svg,.hud-page svg{width:20px;height:20px;flex-shrink:0}.shell-actions .switch-mode{width:auto;min-width:64px;padding:0 12px;border-color:var(--line);font-size:14px;margin-right:3px}
.shell-actions button:hover,.shell-actions a:hover{background:var(--soft)}.shell-actions button:focus-visible,.shell-actions a:focus-visible,.hud-page :focus-visible{outline:2px solid var(--violet);outline-offset:3px}
#quick-options{position:absolute;right:clamp(14px,4vw,48px);top:calc(100% + 4px);width:min(310px,calc(100vw - 28px));background:var(--sheet);border:1px solid var(--line);box-shadow:0 14px 40px #0005;border-radius:15px;padding:16px}
[data-pref-fields] label{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0;color:var(--ink);font:500 14px system-ui}
[data-pref-fields] select{font:inherit;min-height:42px;min-width:115px;max-width:68%;border:1px solid var(--line);border-radius:7px;padding:6px;color:var(--ink);background:var(--soft)}
[data-pref-fields][hidden],[hidden]{display:none!important}
.config-head{margin:25px 0}.config-head h1{font-size:2.6rem;margin-bottom:6px}.config-head p{color:var(--dim)}
body:has(.config-head),body:has(#identity){background:var(--night);color:var(--ink)}
body:has(.config-head) .panel,body:has(.config-head) .location,body:has(.config-head) .card,body:has(#identity) .panel{background:var(--surface);border-color:var(--line)}
html[data-theme=light] body{background:var(--night);color:var(--ink)}
html[data-theme=light] main{color:var(--ink);background-color:var(--night)}
html[data-theme=light] :is(.panel,.card,.location,.copy,.stage){color:var(--ink);background:var(--surface);border-color:var(--line)}
html[data-theme=light] :is(button,select,input,textarea,.button){color:var(--ink);background:var(--surface);border-color:var(--line)}
html[data-theme=light] :is(p,small,footer,label,.section-led p,.panel p,.card p,.fine,li,.small,.switch,.source,#status,.collection span,#apk-info){color:var(--dim)}
html[data-theme=light] :is(a,summary,.panel details>summary,#level){color:var(--violet)}
html[data-theme=light] :is(.gold,.play){background:var(--btn);color:var(--btn-ink)}
html[data-theme=light] .hero :is(h1,p,div,span),html[data-theme=light] .specimen *{color:#fff5e5}
html[data-theme=light] #audio-status:not(:empty){background:var(--soft);color:var(--ink)}
html[data-theme=light] .choices button[aria-pressed=true],html[data-theme=light] .times button[aria-pressed=true]{outline:2px solid var(--violet);color:var(--violet)}
html[data-theme=light] .orb{background:#443451;color:white}
.hud-page{background:var(--night);color:var(--ink);font:16px/1.5 system-ui,-apple-system,"PingFang SC",sans-serif}
.hud-page main{box-sizing:border-box;width:min(1180px,100%);max-width:none;margin:auto;padding:clamp(24px,3vw,42px) clamp(14px,4vw,48px) 35px}
.hud-page h1,.hud-page h2,.hud-page p{margin:0}.hud-page h1,.hud-page h2{font-family:Georgia,'Songti SC','Noto Serif CJK SC','SimSun',serif}.hud-page a{color:var(--violet);text-decoration:none}
.hud-page button,.hud-page select{font:inherit;cursor:pointer}.hud-head,.section-heading,.level-line,.sky-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.hud-head{margin-bottom:16px}.hud-head h1{font-size:clamp(25px,3vw,36px);letter-spacing:.05em;font-weight:600}.bind-state{color:var(--dim);font-size:14px;display:flex;align-items:center;gap:8px}.bind-state i{display:block;width:6px;height:6px;border-radius:50%;background:#bb9ef1;box-shadow:0 0 10px #bd9ae6}
.chamber{isolation:isolate;position:relative;overflow:hidden;color:#fcf4ff;background:#110d19;min-height:340px;border:1px solid #494050;border-radius:20px;display:grid;align-items:center;padding:clamp(25px,4.5vw,62px)}
.chamber .art{position:absolute;z-index:-2;right:0;top:0;height:100%;width:68%;object-fit:cover;object-position:52% center;mask-image:linear-gradient(to right,transparent,#000 22%)}
.chamber:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#19141f 3%,#1d1621e6 23%,transparent 62%);z-index:-1}
.chamber .frame{position:absolute;inset:11px;border:1px solid #dac09d35;border-radius:12px;pointer-events:none}
.hero-words{max-width:53%;position:relative}.hero-words .identity-label{color:#e5c891;font-size:14px;letter-spacing:.08em;display:flex;align-items:center;gap:10px}
.identity-label:before{content:"";width:26px;height:1px;background:currentColor}
.hero-words h2{font-size:clamp(37px,5.1vw,69px);font-weight:540;letter-spacing:.04em;line-height:1.23;margin:13px 0 9px;overflow-wrap:anywhere}
.hero-words .host-rank{color:#dbcedc;font-size:16px}
.hud-page .wake-btn,.hud-page .action-btn{border-radius:8px;display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:46px;padding:10px 19px;font-weight:650;border:0}
.hud-page .wake-btn{margin-top:26px;background:#e4ceaa;color:#302633}
.chamber.is-speaking .art{animation:breathe 2.3s ease-in-out infinite alternate}@keyframes breathe{to{filter:brightness(1.22)}}@media(prefers-reduced-motion:reduce){.chamber.is-speaking .art{animation:none}}
.hud-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:15px;margin-top:16px}
.hud-card{border:1px solid var(--line);background:var(--surface);padding:clamp(17px,2.4vw,27px);border-radius:14px;min-width:0}
.hud-card h2{font-size:22px}.section-heading>span,.sky-top>span{display:inline-flex;align-items:center;gap:9px;font-weight:600}.section-heading svg,.sky-top svg{color:var(--gold)}
.hud-card p{color:var(--dim);margin:12px 0 0}.hud-page .action-btn{background:var(--btn);color:var(--btn-ink);font-size:15px}.hud-page .action-btn:disabled{opacity:.65;cursor:progress}
.sky-action{margin-top:16px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.hud-page select{max-width:100%;background:var(--soft);color:var(--ink);border:1px solid var(--line);border-radius:7px;min-height:46px;padding:6px 9px}
.sky-metrics{margin:16px 0 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(95px,1fr));gap:8px}.sky-metrics dt{color:var(--dim);font-size:13px}.sky-metrics dd{margin:3px 0;font-size:17px}
.hud-page .data-credit{font-size:13px;line-height:1.6}.data-credit a{text-decoration:underline}
.level-line{margin:17px 0 8px}.level-line strong{font:500 29px Georgia,serif;color:var(--gold)}.level-line span{font:14px ui-monospace,monospace;color:var(--dim)}
.hud-page progress{appearance:none;display:block;width:100%;height:5px;overflow:hidden;accent-color:var(--violet);border:0;border-radius:9px;background:var(--soft)}progress::-webkit-progress-bar{background:var(--soft)}progress::-webkit-progress-value{background:var(--violet)}.task-list{display:grid;gap:9px;margin-top:15px}.task-list article{border-top:1px solid var(--line);padding:10px 0}.task-list h3{margin:0}.task-list a,.hud-page .text-link{display:inline-flex;align-items:center;gap:5px;padding:7px 0;color:var(--violet);font-size:14px}.text-link svg{width:14px;height:14px}
.hud-links{display:flex;flex-wrap:wrap;gap:9px 20px;margin-top:19px;padding:12px 3px;border-top:1px solid var(--line);font-size:14px}
@media(max-width:680px){
 .hud-grid{grid-template-columns:1fr}.chamber{min-height:278px}.hero-words{max-width:65%}.chamber .art{width:66%;object-position:50%}.chamber:before{background:linear-gradient(90deg,#171220 2%,#191321b8 32%,transparent 75%)}.hud-head{margin-bottom:11px}.hud-page main{padding-top:18px}.hud-page .wake-btn{margin-top:19px}.bar-inner{min-height:56px;padding-top:5px;padding-bottom:5px}
}
@media(max-width:410px){.chamber{min-height:247px;padding:21px}.hero-words h2{font-size:33px}.shell-actions{gap:0}.shell-actions .switch-mode{padding:0 8px}.shell-home{gap:6px}.bind-state{font-size:12px}.hud-head h1{font-size:24px}.chamber .art{right:-4%;width:68%}}
.quest-box{margin-top:15px}.hud-card i,.wake-btn>span[data-icon],.text-link i{display:inline-flex;align-items:center}
#sky-play:not([hidden]){margin-top:10px}.hud-page .sky-action button,.hud-page .wake-btn{touch-action:manipulation}
html[data-theme=light] .chamber .host-rank{color:#dbcedc}.hud-page #sky-message{min-height:1.6em}

.hud-page .app-subtitle{font-size:14px;color:var(--gold);margin:0 0 4px;letter-spacing:.07em}
#nearby label{display:inline-flex;gap:6px;margin:12px 14px 12px 0}.peer-line{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid var(--line);padding:10px 0}.near-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap}#nearby button{margin:5px 0}
@media(max-width:410px){.bar-inner{padding-inline:10px}.shell-home{min-width:0}.shell-home strong{overflow:hidden;text-overflow:ellipsis;letter-spacing:.025em}.shell-actions{flex-shrink:0}.shell-actions button{width:38px}}
