:root {
  --bg: #04030b;
  --panel: rgba(16, 13, 32, 0.62);
  --panel-solid: #100d20;
  --panel-2: rgba(28, 22, 54, 0.55);
  --line: rgba(160, 140, 255, 0.12);
  --line-2: rgba(160, 140, 255, 0.22);
  --text: #ece9ff;
  --muted: #9a93c2;
  --dim: #645e8a;
  --claude: #ef8a5d;
  --openai: #46d6b4;
  --local: #9d7bff;
  --hermes: #f2c45a;
  --cyan: #48e1ff;
  --pink: #ff5fd2;
  --good: #49e39b;
  --warn: #ffb547;
  --bad: #ff5f7a;
  --r: 18px;
  --font: 'Inter', system-ui, sans-serif;
  --display: 'Space Grotesk', 'Inter', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(157, 123, 255, .4); }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: rgba(157,123,255,.25); border-radius: 8px; }

#cosmos { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: 248px 1fr; height: 100vh; }

/* ---------- sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 6px; padding: 18px 12px; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(10,8,22,.85), rgba(6,5,14,.92)); backdrop-filter: blur(18px); overflow-y: auto; }
.brand { display: flex; gap: 10px; align-items: center; padding: 2px 8px 18px; }
.brand-mark { width: 36px; height: 36px; color: #b9a4ff; filter: drop-shadow(0 0 10px rgba(157,123,255,.7)); }
.brand-name { font: 600 19px var(--display); letter-spacing: -.02em; }
.brand-sub { font-size: 8.5px; letter-spacing: .32em; color: var(--dim); }
.nav-label { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; color: var(--muted); cursor: pointer; transition: .2s; margin-bottom: 2px; }
.nav a:hover { color: var(--text); background: rgba(157,123,255,.07); }
.nav a.active { color: var(--text); background: linear-gradient(90deg, rgba(157,123,255,.22), rgba(157,123,255,.06)); box-shadow: inset 0 0 0 1px rgba(157,123,255,.25); }
i[data-i] { width: 18px; height: 18px; display: inline-flex; } i[data-i] svg { width: 100%; height: 100%; }

.live-card { margin: 18px 4px 4px; border-radius: 16px; padding: 10px 12px 14px; text-align: center; background: radial-gradient(120% 100% at 50% 0%, rgba(110,70,255,.45), rgba(30,14,70,.6) 55%, rgba(12,8,28,.9)); border: 1px solid rgba(157,123,255,.3); box-shadow: 0 10px 40px rgba(80,40,200,.25); }
.live-card canvas { width: 100%; height: 110px; display: block; }
.live-model { font: 600 13px var(--display); margin-top: 2px; }
.live-route { font-size: 11px; color: var(--muted); margin-top: 2px; }

.agent-list { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }
.agent { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 13px; color: var(--muted); }
.agent .s { margin-left: auto; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.dotc { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
.dotc.on { background: var(--good); box-shadow: 0 0 10px var(--good); animation: pulse 1.8s infinite; }
.dotc.warn { background: var(--warn); }
.sidebar-foot { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 14px 8px 0; border-top: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; background: linear-gradient(135deg, var(--local), var(--pink)); }
.who { font-weight: 600; font-size: 13px; } .who-sub { font-size: 9px; letter-spacing: .2em; color: var(--dim); }

/* ---------- main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; border-bottom: 1px solid var(--line); background: rgba(6,5,14,.4); backdrop-filter: blur(12px); }
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); } .crumbs b { color: var(--text); font-weight: 600; }
.crumbs .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text); }
.top-actions { display: flex; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line-2); background: rgba(20,16,40,.6); color: var(--muted); }
.pill.stop { cursor: pointer; font: inherit; font-size: 12px; color: #ffb3c8; border-color: rgba(255,92,140,.35); transition: .15s; }
.pill.stop:hover { color: #fff; border-color: rgba(255,92,140,.8); background: rgba(120,20,60,.55); box-shadow: 0 0 14px rgba(255,92,140,.35); }
.stopped { position: fixed; inset: 0; z-index: 999; display: grid; place-items: center; background: rgba(4,3,12,.92); backdrop-filter: blur(10px); text-align: center; color: var(--muted); font-size: 14px; }
.stopped b { display: block; color: var(--text); font-size: 22px; margin-bottom: 8px; }
.pill.live { color: var(--text); border-color: rgba(73,227,155,.4); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.pill.live.on .pulse { background: var(--good); box-shadow: 0 0 10px var(--good); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .45; transform: scale(.8); } }

.view { display: none; flex: 1; min-height: 0; overflow-y: auto; padding: 26px 28px 40px; }
.view.active { display: block; animation: fadein .35s ease; }
#view-browser.active, #view-kanban.active { display: flex; flex-direction: column; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(16px); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 60px rgba(0,0,0,.35); position: relative; }
.eyebrow { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--hermes); box-shadow: 0 0 8px var(--hermes); }
.btn { border: 1px solid var(--line-2); background: rgba(30,24,60,.6); padding: 7px 13px; border-radius: 10px; cursor: pointer; color: var(--text); font-size: 12.5px; transition: .15s; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: rgba(157,123,255,.55); background: rgba(60,40,120,.5); }
.btn.primary { background: linear-gradient(135deg, #7b5cff, #b45cff); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 9px; font-size: 11.5px; border-radius: 8px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(8,6,18,.7); border: 1px solid var(--line); gap: 3px; }
.seg span { padding: 6px 14px; border-radius: 9px; font-size: 12.5px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.seg span.on { color: var(--text); background: rgba(60,40,120,.55); box-shadow: inset 0 0 0 1px rgba(157,123,255,.4); }
.seg span.on.cloud { box-shadow: inset 0 0 0 1px rgba(239,138,93,.6); background: rgba(239,138,93,.12); }
.seg span.on.local { box-shadow: inset 0 0 0 1px rgba(157,123,255,.6); }
.seg span.on.green { box-shadow: inset 0 0 0 1px rgba(73,227,155,.6); background: rgba(73,227,155,.1); }
input.field, textarea.field, select.field { width: 100%; background: rgba(6,5,16,.7); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; outline: none; }
input.field:focus, textarea.field:focus, select.field:focus { border-color: rgba(157,123,255,.7); box-shadow: 0 0 0 3px rgba(157,123,255,.15); }
.muted { color: var(--muted); } .mono { font-family: var(--mono); }

/* ---------- dashboard ---------- */
.dash-grid { display: grid; gap: 20px; max-width: 1500px; margin: 0 auto; }
.row-top { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.orbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 26px 26px 22px; }
.orb-wrap { display: flex; align-items: center; gap: 18px; }
.orb-wrap canvas { width: 150px; height: 150px; flex: none; }
.orb-num { font: 600 54px/1 var(--display); letter-spacing: -.04em; }
.orb-num small { font-size: 20px; color: var(--muted); margin-left: 2px; }
.orb-cap { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; margin-top: 8px; }
.orb-cap .dotc { width: 7px; height: 7px; }
.orb-sub { font-size: 11.5px; color: var(--dim); margin-top: 4px; font-family: var(--mono); }
.panel-tools { position: absolute; top: 16px; right: 18px; display: flex; gap: 8px; }

.active-card { padding: 22px; display: flex; flex-direction: column; gap: 12px; border-color: rgba(73,227,155,.25); }
.active-title { font: 600 22px/1.15 var(--display); background: linear-gradient(90deg, #7dffc5, #48e1ff); -webkit-background-clip: text; color: transparent; }
.active-list { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; max-height: 120px; overflow-y: auto; }
.route-row { display: flex; align-items: center; gap: 8px; }
.route-row .tag { margin-left: auto; }
.tag { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.tag.claude { color: var(--claude); border-color: rgba(239,138,93,.4); } .tag.openai { color: var(--openai); border-color: rgba(70,214,180,.4); }
.tag.local { color: var(--local); border-color: rgba(157,123,255,.5); } .tag.hermes { color: var(--hermes); border-color: rgba(242,196,90,.4); }

.flow-panel { display: grid; grid-template-columns: 330px 1fr; min-height: 360px; overflow: hidden; }
.flow-info { padding: 24px; display: flex; flex-direction: column; gap: 16px; border-right: 1px solid var(--line); }
.flow-info .kv { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; font-size: 12.5px; color: var(--muted); padding: 14px; border-radius: 14px; background: rgba(6,5,16,.5); border: 1px solid var(--line); }
.flow-canvas { position: relative; min-height: 360px; } .flow-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.section-head { display: flex; align-items: end; justify-content: space-between; margin-top: 14px; }
.section-head h2 { font: 600 40px/1 var(--display); letter-spacing: -.035em; margin: 6px 0 0; }
.row-3 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.card { padding: 20px 22px; }
.card h3 { margin: 0 0 14px; font: 600 16px var(--display); display: flex; align-items: center; gap: 10px; }
.chart { height: 220px; }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); } .legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; background: var(--c); }
table.roster { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.roster th { text-align: left; font-weight: 500; color: var(--dim); font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.roster td { padding: 9px 8px; border-bottom: 1px solid rgba(160,140,255,.06); }
table.roster tr:hover td { background: rgba(157,123,255,.05); }
.feed { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; font-size: 12.5px; }
.feed div { display: flex; gap: 10px; padding: 7px 4px; border-bottom: 1px solid rgba(160,140,255,.06); }
.feed .t { color: var(--dim); font-family: var(--mono); font-size: 11px; width: 52px; flex: none; }
.mini-board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.mini-col { padding: 12px; border-radius: 12px; background: rgba(6,5,16,.5); border: 1px solid var(--line); }
.mini-col b { font: 600 26px var(--display); display: block; } .mini-col span { font-size: 11px; color: var(--muted); }
.empty { color: var(--dim); font-size: 12.5px; padding: 12px 0; }
.hint { font-size: 11.5px; color: var(--dim); line-height: 1.5; } .hint code { font-family: var(--mono); color: var(--muted); background: rgba(157,123,255,.1); padding: 1px 5px; border-radius: 5px; }

/* ---------- kanban ---------- */
.kb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.kb-head h2 { font: 600 30px var(--display); margin: 0 auto 0 0; letter-spacing: -.03em; }
.kb-head input.field { width: 240px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 16px; flex: 1; min-height: 0; overflow-x: auto; padding-bottom: 6px; }
.col { display: flex; flex-direction: column; min-height: 0; padding: 14px; }
.col-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font: 600 14px var(--display); }
.col-head .n { font: 500 11px var(--mono); color: var(--muted); background: rgba(157,123,255,.12); padding: 1px 7px; border-radius: 999px; }
.col-head .add { margin-left: auto; }
.col-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; min-height: 60px; border-radius: 12px; transition: background .15s; padding: 2px; }
.col-body.over { background: rgba(157,123,255,.08); box-shadow: inset 0 0 0 1px rgba(157,123,255,.35); }
.kcard { padding: 12px 13px; border-radius: 13px; background: linear-gradient(180deg, rgba(36,28,70,.75), rgba(22,17,44,.8)); border: 1px solid var(--line-2); cursor: grab; position: relative; transition: transform .15s, box-shadow .15s; }
.kcard:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(80,40,200,.25); }
.kcard.dragging { opacity: .4; }
.kcard .title { font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
.kcard .desc { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kcard .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.prio { width: 4px; position: absolute; left: 0; top: 12px; bottom: 12px; border-radius: 0 4px 4px 0; }
.prio.high { background: var(--bad); box-shadow: 0 0 8px var(--bad); } .prio.med { background: var(--warn); } .prio.low { background: var(--cyan); }
.modal-bg { position: fixed; inset: 0; background: rgba(2,1,8,.65); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 50; }
.modal { width: min(560px, 92vw); padding: 24px; display: flex; flex-direction: column; gap: 12px; background: var(--panel-solid); }
.modal h3 { margin: 0; font: 600 20px var(--display); }
.modal .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal label { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; display: flex; flex-direction: column; gap: 5px; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.modal .actions .left { margin-right: auto; }

/* ---------- browser ---------- */
.bw { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 0; }
.bw-tabs { display: flex; gap: 4px; padding: 10px 12px 0; overflow-x: auto; }
.bw-tab { display: flex; align-items: center; gap: 8px; max-width: 220px; padding: 7px 10px 7px 12px; border-radius: 10px 10px 0 0; background: rgba(20,16,40,.5); color: var(--muted); font-size: 12px; cursor: pointer; border: 1px solid transparent; border-bottom: none; }
.bw-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bw-tab.on { background: rgba(40,30,80,.75); color: var(--text); border-color: var(--line-2); }
.bw-tab .x { opacity: .5; padding: 0 3px; } .bw-tab .x:hover { opacity: 1; }
.bw-bar { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(40,30,80,.35); }
.bw-bar .url { flex: 1; display: flex; align-items: center; gap: 8px; background: rgba(6,5,16,.75); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 14px; }
.bw-bar .url input { flex: 1; background: none; border: none; outline: none; padding: 8px 0; font-size: 13px; }
.bw-bar .lion { width: 16px; height: 16px; color: #fb542b; }
.bw-stage { position: relative; flex: 1; min-height: 0; background: #0b0918; outline: none; }
.bw-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.bw-overlay { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; }
.loadbar { position: absolute; top: 0; left: 0; height: 2px; width: 0; background: linear-gradient(90deg, var(--cyan), var(--pink)); transition: width .4s; z-index: 2; }
.loadbar.on { width: 70%; } .loadbar.done { width: 100%; opacity: 0; transition: width .2s, opacity .5s .2s; }

/* ---------- memory ---------- */
.mem-page { max-width: 1560px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.mem-title h1 { font: 600 34px/1 var(--display); letter-spacing: -.03em; margin: 0; }
.mem-title p { margin: 8px 0 0; color: var(--muted); }
.mem-grid { display: grid; grid-template-columns: 1fr 290px; gap: 18px; }
.cortex { display: flex; flex-direction: column; overflow: hidden; background: rgba(6,5,14,.82); }
.cortex-bar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cortex-name { display: flex; gap: 8px; align-items: center; font: 600 15px var(--display); margin-right: 6px; }
.cortex-name .dotc { width: 6px; height: 6px; }
.cx-search { display: flex; align-items: center; gap: 8px; background: rgba(14,11,30,.9); border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px; flex: 1; min-width: 160px; max-width: 260px; }
.cx-search svg { width: 14px; height: 14px; color: var(--dim); flex: none; }
.cx-search input { flex: 1; background: none; border: 0; outline: none; padding: 8px 0; font-size: 12.5px; }
.cx-count { font-size: 11px; color: var(--dim); white-space: nowrap; }
.btn.explore { margin-left: auto; border-color: rgba(73,227,155,.45); background: rgba(20,60,45,.45); color: #c9ffe6; }
.cortex-stage { position: relative; height: min(720px, calc(100vh - 230px)); min-height: 520px; background: radial-gradient(60% 60% at 50% 50%, rgba(40,25,90,.25), transparent 70%); }
.cortex-stage canvas, .cortex-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cx-legend { position: absolute; left: 16px; bottom: 16px; padding: 12px 14px; border-radius: 12px; background: rgba(10,8,22,.86); border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; font-size: 12px; min-width: 230px; pointer-events: none; }
.cx-legend div { display: flex; align-items: center; gap: 10px; color: var(--muted); } .cx-legend b { margin-left: auto; color: var(--text); font: 500 12px var(--mono); }
.cx-legend i { width: 9px; height: 9px; display: inline-block; background: #d9d4ff; flex: none; }
.lg-dot { border-radius: 50%; } .lg-diamond { transform: rotate(45deg) scale(.85); } .lg-ring { border-radius: 50%; background: none !important; border: 1.6px solid #d9d4ff; }
.lg-new { border-radius: 50%; background: none !important; border: 1.6px solid #d9d4ff; box-shadow: 0 0 6px #fff; } .lg-line { height: 1.5px !important; width: 12px !important; }
.cx-tip { position: absolute; display: none; pointer-events: none; max-width: 250px; padding: 9px 11px; border-radius: 10px; background: rgba(10,8,22,.95); border: 1px solid var(--line-2); font-size: 12px; z-index: 3; }
.cx-tip b { display: block; } .cx-tip span { display: block; font-size: 11px; margin: 2px 0 4px; } .cx-tip em { color: var(--muted); font-style: normal; font-size: 11.5px; }
.cx-drawer { position: absolute; top: 14px; right: 14px; bottom: 14px; width: 360px; padding: 18px; border-radius: 16px; background: rgba(12,10,26,.96); border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 11px; overflow-y: auto; transform: translateX(calc(100% + 30px)); transition: transform .3s ease; z-index: 4; }
.cx-drawer.open { transform: none; }
.cx-drawer h3 { margin: 0; font: 600 19px/1.25 var(--display); padding-right: 30px; }
.cx-drawer .x { position: absolute; top: 12px; right: 12px; }
.cx-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.mem-body { font-size: 12.5px; color: #cfc9f2; white-space: pre-wrap; line-height: 1.6; background: rgba(6,5,16,.6); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; max-height: 42vh; overflow-y: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.conn { display: flex; flex-direction: column; gap: 2px; }
.conn a { font-size: 12.5px; color: var(--muted); cursor: pointer; padding: 6px 8px; border-radius: 8px; display: flex; gap: 8px; align-items: center; }
.conn a:hover { background: rgba(157,123,255,.1); color: var(--text); }

.mem-sources { padding: 16px 14px; display: flex; flex-direction: column; gap: 4px; align-self: start; }
.ms-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 0 4px 10px; } .ms-head span { font-size: 11px; }
.ms-row { display: flex; align-items: center; gap: 11px; padding: 8px 6px; border-radius: 10px; }
.ms-row:hover { background: rgba(157,123,255,.06); }
.ms-row.off { opacity: .45; }
.ms-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--c) 90%, #fff), color-mix(in srgb, var(--c) 55%, #000)); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 40%, transparent); flex: none; }
.ms-ico svg { width: 17px; height: 17px; }
.ms-txt { display: flex; flex-direction: column; min-width: 0; } .ms-txt b { font-size: 13px; font-weight: 600; } .ms-txt span { font-size: 11px; color: var(--dim); }
.switch { margin-left: auto; position: relative; width: 32px; height: 18px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: rgba(120,110,170,.3); transition: .2s; cursor: pointer; }
.switch i::after { content: ''; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #cfc9f2; transition: .2s; }
.switch input:checked + i { background: rgba(73,227,155,.55); } .switch input:checked + i::after { transform: translateX(14px); background: #fff; }
.switch input:disabled + i { cursor: not-allowed; }
.btn.refresh { margin-top: 12px; justify-content: center; padding: 10px; background: linear-gradient(135deg, #e0559b, #ff7ac6); border: 0; font-weight: 600; }
.ms-updated { font-size: 11px; color: var(--dim); padding: 6px 4px; }
.mem-sources .hint { padding: 4px; }

.heard { padding: 26px 28px; background: linear-gradient(120deg, rgba(20,14,44,.85), rgba(40,18,40,.6) 60%, rgba(70,40,20,.35)); }
.heard-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.heard-head h2 { font: 600 30px/1.1 var(--display); letter-spacing: -.03em; margin: 8px 0 6px; } .heard-head p { margin: 0; font-size: 13px; }
.heard-search { max-width: 360px; }
.heard-list { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }
.heard-row { display: grid; grid-template-columns: 80px 84px 1fr 70px; gap: 12px; align-items: baseline; padding: 10px 8px; border-bottom: 1px solid rgba(160,140,255,.07); cursor: pointer; font-size: 12.5px; border-radius: 8px; }
.heard-row:hover { background: rgba(157,123,255,.07); }
.heard-src { color: var(--c); font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.heard-role { color: var(--dim); font-size: 11px; } .heard-t { color: var(--dim); font-size: 11px; text-align: right; }
.heard-text { color: #d6d1f5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.heard-text mark { background: rgba(242,196,90,.3); color: #fff; border-radius: 3px; padding: 0 2px; }
.node-label { font: 500 11px var(--font); fill: #d9d4ff; pointer-events: none; paint-order: stroke; stroke: rgba(4,3,11,.9); stroke-width: 3px; }

#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; padding: 10px 18px; border-radius: 12px; background: var(--panel-solid); border: 1px solid var(--line-2); transition: .25s; z-index: 99; font-size: 13px; pointer-events: none; }
#toast.show { opacity: 1; transform: translateX(-50%); }

@media (max-width: 1200px) { .row-top, .row-3, .flow-panel { grid-template-columns: 1fr; } .orbs { grid-template-columns: 1fr 1fr; } .mem-grid { grid-template-columns: 1fr; } }
