:root { --bg:#040C18; --surface:#061321; --elev:#09192D; --hover:#10243B; --border:#1D4564; --cyan:#16D8ED; --cyanSoft:#57E9F0; --blue:#008DFF;
        --white:#F5F8FD; --muted:#B9C9DA; --dim:#849BB1; --ok:#2AD9A0; --warn:#F0B84A; --danger:#FF6E78; }
* { box-sizing: border-box; }
html, body { margin:0; height:100%; overflow-x:hidden; background:var(--bg); color:var(--white); font:15px/1.55 Inter, Arial, Helvetica, sans-serif; }
body { display:flex; flex-direction:column; min-height:100vh; }
.top { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid var(--border); background:var(--surface); flex-wrap:wrap; }
.brand { display:flex; align-items:center; gap:8px; font-weight:600; flex-wrap:wrap; }
.brand strong { font-weight:800; letter-spacing:-0.02em; } .sep { color:var(--dim); }
.mark { width:18px; height:18px; background:linear-gradient(110deg,#3BE9EF,#008BFF); clip-path:polygon(50% 0, 100% 100%, 0 100%); display:inline-block; }
.badge { font-size:11px; letter-spacing:.12em; text-transform:uppercase; padding:2px 8px; border:1px solid var(--border); border-radius:999px; color:var(--dim); }
.status { padding:4px 12px; border-radius:999px; background:var(--elev); border:1px solid var(--border); color:var(--muted); font-size:13px; min-height:32px; display:flex; align-items:center; }
.status[data-s=listening] { color:var(--ok); border-color:var(--ok); } .status[data-s=thinking] { color:var(--warn); border-color:var(--warn); } .status[data-s=speaking] { color:var(--cyanSoft); border-color:var(--cyan); }
.grid { flex:1; display:grid; gap:12px; padding:12px 16px 16px; grid-template-columns: minmax(300px, 1fr) minmax(320px, 1.1fr) minmax(300px, 1.2fr); min-height:0; }
.grid > * { min-width:0; }
.panel { background:var(--elev); border:1px solid var(--border); border-radius:12px; position:relative; overflow:hidden; display:flex; flex-direction:column; min-height:360px; }
.stage { min-height:440px; }
.stage canvas { position:absolute; inset:0; width:100%; height:100%; display:block; background:radial-gradient(ellipse at 50% 40%, #0a2340 0%, var(--surface) 70%); }
.slots { position:absolute; inset:0; display:flex; background:radial-gradient(ellipse at 50% 40%, #0a2340 0%, var(--surface) 70%); }
.slot { position:relative; flex:1; min-width:0; cursor:pointer; } .slot[hidden] { display:none; }
.slot + .slot { border-left:1px solid var(--border); } .slots.both .slot.active { box-shadow:inset 0 0 0 1px var(--cyan); }
.slot canvas { background:none; } .slotTag { position:absolute; left:14px; bottom:10px; z-index:2; font-size:12px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); }
.msg.bia { align-self:flex-start; background:var(--surface); border-color:#2a5f8a; }
.stageNote { z-index:2; position:absolute; left:14px; top:12px; color:var(--muted); font-size:13px; letter-spacing:.04em; }
.login { position:absolute; left:0; right:0; bottom:0; z-index:2; padding:14px; border-top:1px solid var(--border); background:var(--surface); }
.login label { display:block; color:var(--muted); font-size:13px; margin-bottom:6px; } .row { display:flex; gap:8px; }
input[type=text], input[type=password] { flex:1; min-height:44px; padding:0 12px; border-radius:10px; border:1px solid var(--border); background:var(--bg); color:var(--white); font:inherit; }
input:focus-visible, button:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
button { min-height:44px; padding:0 16px; border-radius:10px; border:1px solid var(--border); background:var(--hover); color:var(--white); font:inherit; font-weight:600; cursor:pointer; }
button.primary { background:linear-gradient(110deg,#3BE9EF,#008BFF); color:#04101f; border:0; } button:disabled { opacity:.45; cursor:not-allowed; }
button.ghost { background:transparent; min-height:36px; color:var(--muted); font-weight:500; }
.chat { min-height:420px; }
.log { flex:1; overflow:auto; padding:14px; display:flex; flex-direction:column; gap:10px; min-height:220px; max-height:calc(100vh - 260px); }
.msg { max-width:92%; padding:10px 12px; border-radius:12px; border:1px solid var(--border); white-space:pre-wrap; word-wrap:break-word; }
.msg.user { align-self:flex-end; background:var(--hover); } .msg.atlas { align-self:flex-start; background:var(--surface); }
.msg.sys { align-self:center; color:var(--dim); font-size:13px; border-style:dashed; background:transparent; }
.who { display:block; font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--dim); margin-bottom:2px; }
.chips { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.chip { min-height:28px; padding:2px 10px; font-size:12px; border-radius:999px; background:transparent; border-color:var(--cyan); color:var(--cyanSoft); font-weight:500; }
.composer { min-width:0; display:flex; gap:8px; padding:10px 12px; border-top:1px solid var(--border); background:var(--surface); }
.mic { width:48px; padding:0; display:grid; place-items:center; } .mic[aria-pressed=true] { background:var(--ok); color:#04101f; border-color:var(--ok); animation:pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow:0 0 0 8px #2AD9A022; } } @media (prefers-reduced-motion: reduce) { .mic[aria-pressed=true] { animation:none; } }
.opts { display:flex; gap:12px; align-items:center; padding:6px 12px 10px; background:var(--surface); flex-wrap:wrap; color:var(--muted); font-size:13px; }
.chk { display:flex; align-items:center; gap:6px; min-height:36px; } .chk input { width:18px; height:18px; }
.galaxy { min-height:420px; } .galHead { padding:10px 14px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.muted { color:var(--dim); font-size:13px; } #graph { flex:1; min-height:340px; background:#050e1b; }
.galList { margin:0; padding:10px 14px 14px 30px; overflow:auto; max-height:320px; }
@media (max-width: 1100px) { .grid { grid-template-columns: 1fr 1fr; } .galaxy { grid-column: 1 / -1; } }
@media (max-width: 720px) { .grid { grid-template-columns: minmax(0,1fr); padding:8px 12px 14px; } .log { max-height: 45vh; } .stage { min-height:400px; } .brand { font-size:14px; } }

@media (min-width: 1101px) { .grid.dual { grid-template-columns: minmax(400px, 1.4fr) minmax(380px, 1.1fr) minmax(280px, 1fr); } }
