/* A.R.I.S. reactor theme: deep navy-violet night sky, glass controls, and an accent colour that follows what she is doing.
   Loaded after plasma.css. body[data-state] is set by hud.js: idle (cyan) / thinking + working (amber) / listening (red) / speaking (white). */
:root{--st:#40d0de;--st-rgb:64,208,222}
body[data-state=idle]{--st:#40d0de;--st-rgb:64,208,222}
body[data-state=thinking],body[data-state=working]{--st:#f2a63e;--st-rgb:242,166,62}
body[data-state=listening]{--st:#f4546c;--st-rgb:244,84,108}
body[data-state=speaking]{--st:#ecf4ff;--st-rgb:236,244,255}
body[data-state=error]{--st:#ff3c3c;--st-rgb:255,60,60}

body.hud{--accent:var(--st);--amber:var(--st);--text:#e8eefb;--muted:#8791b5;--line:rgba(160,170,230,.18);--panel:rgba(14,16,42,.6);
  --user:rgba(var(--st-rgb),.1);--userText:#e8eefb;--code:#070d24;background:#040a1e;
  font-family:"Segoe UI Variable Text","Segoe UI",Inter,system-ui,sans-serif}
body.hud #shell{position:relative;background:
  radial-gradient(ellipse 80% 55% at 50% 108%,rgba(24,92,200,.5),transparent 62%),
  radial-gradient(ellipse 60% 50% at 12% 0%,rgba(30,70,190,.5),transparent 60%),
  radial-gradient(ellipse 50% 40% at 92% 14%,rgba(20,110,200,.32),transparent 60%),#040a1e}
body.hud #shell::before{content:"";position:absolute;inset:0;background-image:var(--stars);opacity:.8;pointer-events:none;z-index:0}
body.hud #topbar,body.hud #app,body.hud #foot{position:relative;z-index:1}

/* top bar: serif wordmark, state-coloured tabs */
.brand b{font-family:"Cormorant Garamond","Georgia","Times New Roman",serif;font-size:26px;font-weight:500;letter-spacing:5px;color:#eef1ff;text-shadow:none}
.brand b::before{content:"";display:inline-block;width:2px;height:22px;background:var(--st);margin-right:12px;vertical-align:-3px;box-shadow:0 0 12px var(--st)}
.brand span{display:block;font-size:9px;letter-spacing:3.5px;color:var(--muted);margin:2px 0 0 14px}
#views button{color:var(--muted);font-weight:500;letter-spacing:1.2px}
#views button.active{color:#07061a;background:var(--st);box-shadow:0 0 22px rgba(var(--st-rgb),.5)}
#conn{display:flex;align-items:center;gap:7px;font-size:10px;letter-spacing:1.8px;color:var(--muted);border:1px solid var(--line);border-radius:99px;padding:5px 11px;background:rgba(14,16,42,.5)}
#conn i{width:6px;height:6px;border-radius:50%;background:#46d8a0;box-shadow:0 0 8px #46d8a0}
#conn.off i{background:#f4546c;box-shadow:0 0 8px #f4546c}
body.hud .icon{color:#dfe5ff}
body.hud .icon:hover{background:rgba(var(--st-rgb),.14)}
body.hud .icon[aria-pressed=true],#earBtn[aria-pressed=true]{background:var(--st);color:#07061a}

/* glass: composer, panels, drawer */
body.hud #composer{background:rgba(14,16,42,.55);backdrop-filter:blur(14px);border:1px solid var(--line);box-shadow:0 0 40px rgba(var(--st-rgb),.08)}
body.hud #composer:focus-within{border-color:rgba(var(--st-rgb),.55);box-shadow:0 0 36px rgba(var(--st-rgb),.22)}
body.hud #input::placeholder{color:#6e789f}
body.hud .panel{background:rgba(14,16,42,.55);backdrop-filter:blur(10px)}
body.hud .panel::before,body.hud .panel::after{border-color:var(--st)}
.panel h3{color:var(--st)}
.vbar{background:rgba(160,170,230,.14)}.vbar i{background:linear-gradient(90deg,rgba(var(--st-rgb),.4),var(--st));box-shadow:0 0 8px rgba(var(--st-rgb),.6)}
.ok{color:var(--st)}.off{color:#5d6690}#telemetry b,#telemetry .op b{color:var(--st)}
body.hud #side{background:rgba(9,9,30,.96)}
body.hud .item:hover,body.hud .item.active{background:rgba(var(--st-rgb),.12)}
body.hud .btn.primary,body.hud #toast{background:var(--st);color:#07061a}
body.hud dialog{background:#0b0c26;border-color:rgba(var(--st-rgb),.5)}
body.hud .msg.assistant{border-left-color:var(--st)}
body.hud .tool{background:rgba(10,11,34,.8)}
#orbState{color:var(--st);text-shadow:0 0 14px rgba(var(--st-rgb),.7)}
body.view-home #orbState{top:auto;bottom:calc(50% - min(40vh,34vw) - 4px);display:none}
#foot .bar i{background:repeating-linear-gradient(90deg,var(--st) 0 12px,transparent 12px 15px);filter:drop-shadow(0 0 5px rgba(var(--st-rgb),.8))}
#foot .bar{background:repeating-linear-gradient(90deg,rgba(160,170,230,.12) 0 12px,transparent 12px 15px)}
#foot .obj b{color:#eef1ff}

/* home: the reactor is the whole stage, and a state caption floats under it */
#stage-caption{position:absolute;left:0;right:0;bottom:30%;text-align:center;z-index:1;pointer-events:none;display:none}
body.view-home #stage-caption{display:block}
#stage-caption b{display:block;font-size:11px;letter-spacing:7px;color:var(--st);text-shadow:0 0 14px rgba(var(--st-rgb),.7);font-weight:500}
#stage-caption small{display:block;margin-top:6px;font-size:11px;color:var(--muted);letter-spacing:1px}
body.view-home #orbWrap{cursor:pointer}
body.view-home #orbWrap{pointer-events:auto}

/* settings: round gear bottom-right opening a glass panel */
#gearBtn{position:fixed;right:22px;bottom:70px;z-index:12;width:54px;height:54px;border-radius:50%;border:1px solid var(--line);background:rgba(14,16,42,.7);color:#dfe5ff;font-size:22px;cursor:pointer;backdrop-filter:blur(10px);transition:.2s}
#gearBtn:hover{border-color:var(--st);box-shadow:0 0 24px rgba(var(--st-rgb),.35);transform:rotate(30deg)}
#settingsPanel{position:fixed;right:22px;bottom:134px;z-index:12;width:min(400px,calc(100vw - 34px));max-height:calc(100dvh - 190px);overflow:auto;padding:18px 20px;border:1px solid var(--line);border-radius:18px;background:rgba(10,11,34,.93);backdrop-filter:blur(16px);box-shadow:0 20px 60px #000a;color:var(--text);scrollbar-width:thin}
#settingsPanel[hidden]{display:none}
#settingsPanel header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
#settingsPanel h2{margin:0;font:500 20px "Cormorant Garamond",Georgia,serif;letter-spacing:3px}
#settingsPanel h3{margin:18px 0 8px;font-size:11px;letter-spacing:3px;color:var(--st);font-weight:600}
#settingsPanel label{display:block;margin:10px 0 4px;font-size:13px;color:#c7cff0}
#settingsPanel select,#settingsPanel input[type=password]{width:100%;padding:9px 10px;border-radius:10px;border:1px solid var(--line);background:#0a0b22;color:var(--text);font:inherit}
#settingsPanel input[type=range]{width:100%;accent-color:var(--st)}
#settingsPanel .chk{display:flex;gap:10px;align-items:center;cursor:pointer}
#settingsPanel button.set{margin-top:10px;padding:9px 16px;border-radius:99px;border:1px solid rgba(var(--st-rgb),.5);background:transparent;color:var(--text);cursor:pointer;font:inherit;font-size:13px}
#settingsPanel button.set:hover{background:rgba(var(--st-rgb),.15)}
#settingsPanel p,#settingsPanel small{font-size:11.5px;line-height:1.6;color:var(--muted);margin:6px 0}
.legend{display:grid;grid-template-columns:auto 1fr;gap:6px 10px;align-items:center;font-size:12px;color:#c7cff0}
.legend i{width:11px;height:11px;border-radius:50%;display:block}
@media (max-width:640px){#gearBtn{right:12px;bottom:64px;width:46px;height:46px}}

/* line icons (replace emoji) */
.i{width:1.15em;height:1.15em;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;vertical-align:-.2em;flex:none}
.i.fill{fill:currentColor;stroke:none}
.icon{display:inline-flex;align-items:center;justify-content:center}
.icon .i{width:21px;height:21px}
#gearBtn .i{width:24px;height:24px}
#bell{position:relative}
.dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#3d4468;margin-right:6px}.dot.on{background:#46d8a0;box-shadow:0 0 8px #46d8a0}
.chip .i{width:20px;height:20px}
.tool summary .i{width:14px;height:14px;margin-right:2px}
.job .i{width:15px;height:15px}
.item button .i{width:15px;height:15px}
