/* Alurx Console - AMOLED dark. One accent (blue) for live work, amber for "needs you",
   red for danger and bypass. Geist / Geist Mono. */
:root {
  --bg: #000000; --s1: #050506; --s2: #08080a; --s3: #0b0b0d; --s4: #111115; --s5: #141418;
  --line: #17171b; --line2: #232328; --line3: #2a2a30;
  --text: #ededef; --text2: #c9c9d1; --muted: #9a9aa3; --dim: #85858f; --faint: #3a3a44;
  --blue: #6cb6ff; --blue2: #8fb8ff; --violet: #b9a6ff; --amber: #ffb547; --red: #ff8a8a;
  --green: #4ade80; --code: #d5d5dd;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 14px; line-height: 1.5; }
button { font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, textarea:focus-visible, input:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px; }
a { color: var(--blue2); } a:hover { color: #b8d2ff; }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- layout ---------- */
.app { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
/* The sidebar never scrolls as a whole: only the session list does, so the bridge and Alurx
   cards and the account row stay put however many turns there are (owner, 2026-10-19). */
.side { width: 264px; flex: none; border-right: 1px solid var(--line); padding: 18px 14px;
  display: flex; flex-direction: column; gap: 18px; overflow: hidden; min-height: 0; }
.side > * { flex: none; }
.side > .side-sec { flex: 1 1 auto; min-height: 90px; display: flex; flex-direction: column; }
.side-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  margin: 0 -6px; padding: 0 6px; }
#turnCount { color: var(--faint); font-weight: 400; margin-left: 4px; }
@media (max-height: 640px) { .side .card { display: none; } }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.insp { width: 400px; flex: none; border-left: 1px solid var(--line); display: flex;
  flex-direction: column; min-height: 0; }
@media (max-width: 1180px) {
  .insp { position: fixed; inset: auto 0 0 0; width: auto; height: 62vh; z-index: 30;
    background: var(--bg); border-left: 0; border-top: 1px solid var(--line2);
    border-radius: 18px 18px 0 0; box-shadow: 0 -20px 60px #000; }
}
@media (max-width: 860px) {
  .side { position: fixed; inset: 0 auto 0 0; z-index: 40; background: var(--bg);
    transform: translateX(-100%); transition: transform .2s; width: 280px; }
  .side.open { transform: none; box-shadow: 20px 0 60px #000; }
  body.drawer .main { filter: brightness(.35); pointer-events: none; transition: filter .2s; }
}
.btn.menu-btn { display: none; }
@media (max-width: 860px) { .btn.menu-btn { display: inline-flex; } }
@media (max-width: 600px) {
  .head { padding: 10px 12px; gap: 8px; }
  .head .kbd, #conn { display: none; }
  .thread-in { padding: 16px 12px 32px; }
  .composer { padding: 8px 10px 12px; }
  .comp-bar .kbd, #expandAll, .head .chip { display: none; }
  .comp-bar { gap: 6px; }
  .comp-bar .grow { flex: 1 1 0; }
  .select { max-width: 112px; padding: 0 6px; }
  .seg button { padding: 0 9px; }
  .bubble { max-width: 92%; }
  .confirm .acts .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- sidebar ---------- */
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px; }
.brand b { font-weight: 600; font-size: 15px; letter-spacing: .2px; display: block; }
.brand small { font-size: 11px; color: var(--dim); }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--line2); background: var(--s3); color: var(--text2);
  font-size: 13px; }
.btn:hover { border-color: var(--line3); color: var(--text); }
.btn.ghost { background: transparent; }
.btn.icon { width: 36px; padding: 0; justify-content: center; }
.btn.primary { background: var(--text); color: #000; border: 0; font-weight: 600; }
.btn.danger { color: var(--red); }
.kbd { font-family: var(--mono); font-size: 11px; color: var(--dim); font-weight: 400; }
.search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px;
  border-radius: 10px; background: var(--s3); border: 1px solid var(--line); color: var(--dim); }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none;
  color: var(--text); font: inherit; font-size: 13px; }
.sec-title { font-size: 11px; font-weight: 500; color: var(--dim); padding: 0 8px 6px;
  letter-spacing: .6px; text-transform: uppercase; }
.turn-link { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px;
  color: var(--text2); text-decoration: none; border: 0; background: transparent; text-align: left;
  width: 100%; }
.turn-link:hover, .turn-link.on { background: var(--s4); color: var(--text); }
.turn-link span:first-child { font-size: 13px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.turn-link span:last-child { font-size: 11px; color: var(--dim); }
.card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px;
  border: 1px solid var(--line); background: #070708; }
.card-h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); flex: none; }
.dot.on { background: var(--green); } .dot.live { background: var(--blue);
  animation: pulse 1.2s ease-in-out infinite; } .dot.wait { background: var(--amber);
  animation: pulse 1.2s ease-in-out infinite; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-size: 11px; }
.kv div { display: flex; flex-direction: column; min-width: 0; }
.kv span:first-child { color: var(--dim); }
.kv span:last-child { font-family: var(--mono); color: var(--text2); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.who { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 8px 6px 0;
  border-top: 1px solid var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #1a1a22; flex: none;
  object-fit: cover; }
.search-out { font-family: var(--mono); font-size: 11.5px; color: var(--text2);
  white-space: pre-wrap; max-height: 260px; overflow: auto; padding: 8px 10px;
  border-radius: 10px; background: var(--s1); border: 1px solid var(--line); }

/* ---------- header ---------- */
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 20px;
  border-bottom: 1px solid var(--line); }
.head h1 { margin: 0; font-size: 15px; font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--line2); font-size: 12px; color: var(--text2);
  background: transparent; }
.grow { flex: 1; }
.conn { font-size: 12px; color: var(--dim); display: flex; align-items: center; gap: 6px; }

/* ---------- thread ---------- */
.thread { flex: 1; overflow-y: auto; overflow-anchor: none; }
.thread-in { max-width: 860px; margin: 0 auto; padding: 24px 20px 40px; display: flex;
  flex-direction: column; gap: 24px; }
.turn { display: flex; flex-direction: column; gap: 10px; }
.bubble { align-self: flex-end; max-width: 80%; padding: 10px 14px;
  border-radius: 14px 14px 4px 14px; background: var(--s5); white-space: pre-wrap;
  overflow-wrap: anywhere; }
.bubble .tag { display: block; font-size: 11px; color: var(--dim); margin-bottom: 2px; }
.from-discord { align-self: flex-end; font-size: 11px; color: var(--dim); margin-top: -6px; }
.answer { font-size: 15px; overflow-wrap: anywhere; }
.answer p { margin: 0 0 10px; } .answer p:last-child { margin-bottom: 0; }
.answer pre { background: var(--s1); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; color: var(--code); }
.answer code { font-family: var(--mono); font-size: .9em; background: var(--s4);
  padding: 1px 5px; border-radius: 5px; }
.answer pre code { background: none; padding: 0; }
.answer h1, .answer h2, .answer h3 { font-size: 15px; margin: 14px 0 6px; }
.answer ul, .answer ol { margin: 0 0 10px; padding-left: 22px; }
.answer.streaming::after { content: ''; display: inline-block; width: 7px; height: 15px;
  background: var(--blue); vertical-align: -2px; margin-left: 2px;
  animation: blink 1s steps(1) infinite; }
.answer-tools { display: flex; gap: 6px; margin-top: -2px; opacity: .55; transition: opacity .15s; }
.turn:hover .answer-tools, .answer-tools:focus-within { opacity: 1; }
.answer-tools .btn.icon { width: 28px; height: 28px; border: 0; }
.sys-note { font-size: 12px; color: var(--dim); font-family: var(--mono); }
.sys-note.ok { color: var(--green); } .sys-note.no { color: var(--red); }
.err { color: var(--red); font-size: 13px; }
.empty { margin: 18vh auto 0; text-align: center; color: var(--dim); display: flex;
  flex-direction: column; align-items: center; gap: 12px; }
.empty b { color: var(--text); font-size: 18px; font-weight: 600; }

/* ---------- activity ---------- */
.act { display: flex; flex-direction: column; border-radius: 14px; border: 1px solid var(--line);
  background: var(--s1); overflow: hidden; }
.act.waiting { border-color: #2a2416; }
.act-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 0;
  background: transparent; color: var(--text2); font-size: 13px; text-align: left; width: 100%; }
.act-head .sum { flex: 1; min-width: 0; }
.act-body { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px 8px;
  border-top: 1px solid var(--s4); }
.row { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 5px 10px;
  border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text);
  text-align: left; width: 100%; font-size: 13px; }
.row:hover { background: #0a0a0d; }
.row.sel { background: #0d1626; border-color: #203a5e; }
.rail { font-family: var(--mono); color: var(--faint); white-space: pre; }
.glyph { width: 20px; height: 20px; border-radius: 6px; background: var(--s4); display: flex;
  align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; flex: none; }
.row .t { font-weight: 500; white-space: nowrap; }
.row .m { color: var(--dim); font-family: var(--mono); font-size: 12px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.row .s { font-size: 12px; white-space: nowrap; color: var(--dim); }
.s.ok { color: var(--green); } .s.fail { color: var(--red); } .s.run { color: var(--blue); }
.s.wait { color: var(--amber); }
.spin { width: 11px; height: 11px; border: 1.5px solid var(--blue); border-right-color: transparent;
  border-radius: 50%; display: inline-block; animation: spin .8s linear infinite;
  vertical-align: -1px; }
.think-live { margin: 0 10px 6px 0; padding: 8px 12px; border-radius: 8px; background: #0a0a0c;
  color: #a9a9b3; font-family: var(--mono); font-size: 12px; line-height: 1.6; white-space: pre-wrap;
  max-height: 7.2em; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.think-live.full { max-height: none; }
.preview { margin: 0 10px 6px 0; padding: 6px 12px; border-radius: 8px; background: #0a0a0c;
  color: #a9a9b3; font-family: var(--mono); font-size: 12px; white-space: pre-wrap;
  overflow-wrap: anywhere; max-height: 9em; overflow: hidden; }

/* ---------- confirm ---------- */
.confirm { margin: 4px 12px 12px; display: flex; flex-direction: column; gap: 12px; padding: 16px;
  border-radius: 12px; border: 1px solid #5a4318; background: #0d0a04; }
.confirm.danger { border-color: #5a1f1f; background: #0f0505; }
.confirm-h { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.confirm-h .cd { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--amber);
  font-weight: 400; }
.confirm.danger .cd { color: var(--red); }
.confirm .what { font-family: var(--mono); font-size: 12px; color: var(--text2);
  overflow-wrap: anywhere; }
.confirm .box { padding: 10px 12px; border-radius: 8px; background: #000; border: 1px solid #1a1a1f;
  font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--text2);
  white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; }
.confirm .box.add { color: #9fe3b4; }
.confirm .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.confirm .acts .btn { height: 40px; padding: 0 16px; }
.warn-note { font-size: 12px; color: var(--red); }

/* ---------- composer ---------- */
.composer { padding: 10px 20px 18px; border-top: 1px solid #0f0f12; }
.comp { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px;
  padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line2); background: var(--s2); }
.comp textarea { resize: none; background: transparent; border: 0; outline: none; color: var(--text);
  font: inherit; font-size: 14px; padding: 4px 6px; max-height: 240px; min-height: 24px; }
.comp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.seg { display: flex; padding: 3px; border-radius: 10px; background: #000; border: 1px solid #1f1f24; }
.seg button { height: 28px; padding: 0 12px; border-radius: 7px; border: 0; background: transparent;
  color: var(--dim); font-size: 12px; font-weight: 500; }
.seg button[aria-checked="true"] { background: #1a1a20; color: var(--text); }
.seg button.bypass[aria-checked="true"] { background: #2a0e0e; color: var(--red); }
.select { height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid #1f1f24;
  background: transparent; color: var(--text2); font: inherit; font-size: 12px; }
.select option { background: #0b0b0d; }
.stop { border-color: #3a1d1d; background: #140808; color: var(--red); }

/* ---------- inspector ---------- */
.tabs { display: flex; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--line);
  align-items: center; }
.tabs button { height: 32px; padding: 0 12px; border-radius: 8px; border: 0; background: transparent;
  color: var(--dim); font-size: 12px; font-weight: 500; }
.tabs button[aria-selected="true"] { background: var(--s5); color: var(--text); }
.insp-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column;
  gap: 14px; min-height: 0; }
.insp-title { display: flex; align-items: center; gap: 10px; }
.insp-title .glyph { width: 26px; height: 26px; font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px;
  background: var(--s2); border: 1px solid var(--s5); min-width: 0; }
.stat span:first-child { font-size: 11px; color: var(--dim); }
.stat span:last-child { font-family: var(--mono); font-size: 13px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.lbl { font-size: 12px; font-weight: 500; color: var(--text2); display: flex; align-items: center;
  gap: 8px; }
.raw { padding: 12px; border-radius: 10px; background: var(--s1); border: 1px solid var(--s5);
  font-family: var(--mono); font-size: 12px; line-height: 1.75; color: var(--code);
  white-space: pre-wrap; overflow-wrap: anywhere; }
.raw .tk0 { background: rgba(185, 166, 255, .09); border-radius: 2px; }
.raw .tk1 { background: rgba(108, 182, 255, .12); border-radius: 2px; }
.raw.args { color: var(--blue2); }
.raw .cursor { display: inline-block; width: 7px; height: 14px; background: var(--blue);
  vertical-align: -2px; animation: blink 1s steps(1) infinite; }
.hint { font-size: 11px; color: var(--dim); }
.mini-seg { display: flex; padding: 2px; border-radius: 8px; border: 1px solid #1f1f24; margin-left: auto; }
.mini-seg button { height: 26px; padding: 0 10px; border-radius: 6px; border: 0;
  background: transparent; color: var(--text2); font-size: 11px; }
.mini-seg button[aria-pressed="true"] { background: #1a1a20; }
.ev { display: grid; grid-template-columns: 70px 92px minmax(0, 1fr); gap: 8px; padding: 3px 0;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.5; }
.ev span:first-child { color: #6f6f79; } .ev span:last-child { color: #b4b4be; overflow-wrap: anywhere; }

/* ---------- voice ---------- */
.voice { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .96); display: flex;
  flex-direction: column; align-items: center; padding: 24px 20px 36px; }
.voice-top { align-self: stretch; display: flex; align-items: center; gap: 8px; max-width: 560px;
  margin: 0 auto; width: 100%; }
.orb { width: 220px; height: 220px; border-radius: 50%; border: 1px solid #10243d; display: flex;
  align-items: center; justify-content: center; }
.orb > div { width: 168px; height: 168px; border-radius: 50%; border: 1px solid #1b3a60;
  display: flex; align-items: center; justify-content: center; }
.orb > div > div { width: 120px; height: 120px; border-radius: 50%; background: #071222;
  border: 1px solid #2c5a92; display: flex; align-items: center; justify-content: center; gap: 4px; }
.bar { width: 4px; border-radius: 2px; background: var(--blue); height: 8px; transition: height .08s; }
.voice-mid { flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 26px; width: 100%; max-width: 560px; }
.voice-state { font-size: 18px; font-weight: 600; }
.voice-log { align-self: stretch; display: flex; flex-direction: column; gap: 10px; padding: 14px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--s1); max-height: 30vh;
  overflow: auto; }
.voice-log small { font-size: 11px; color: var(--dim); display: block; }
.voice-btns { display: flex; gap: 22px; align-items: center; }
.round { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line2);
  background: var(--s3); color: var(--text); display: flex; align-items: center; justify-content: center; }
.round.end { width: 72px; height: 72px; border: 0; background: #e5484d; color: #fff; }
.round[aria-pressed="true"] { background: #2a0e0e; color: var(--red); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-in { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 24px; }
.login h1 { margin: 0; font-size: 24px; font-weight: 600; text-align: center; }
.login p { margin: 0; color: var(--muted); text-align: center; }
.discord { display: flex; align-items: center; justify-content: center; gap: 10px; height: 48px;
  border-radius: 12px; background: #5865f2; color: #fff; font-size: 15px; font-weight: 600;
  text-decoration: none; }
.discord:hover { background: #4752c4; color: #fff; }
.facts { display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--s1); }
.facts > div { display: flex; gap: 12px; padding: 10px; }
.facts b { font-size: 13px; font-weight: 500; display: block; }
.facts span { font-size: 12px; color: var(--dim); display: block; }

/* ---------- browser defaults, themed ---------- */
:root { color-scheme: dark; accent-color: var(--blue); }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent; }
/* Chrome ignores the ::-webkit-scrollbar styles below once scrollbar-width/-color are set,
   and draws Windows' native bar with arrow buttons; those two are for other browsers only. */
/* Scrollbars show only while the pointer is over the part that scrolls (owner, 2026-10-19);
   the gutter stays reserved so text never shifts when one appears. */
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: transparent transparent; }
  *:hover { scrollbar-color: #2a2a31 transparent; }
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: transparent; border-radius: 8px;
  border: 2px solid transparent; background-clip: padding-box; }
:hover::-webkit-scrollbar-thumb { background: #26262d; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #3a3a43; background-clip: padding-box; }
::-webkit-scrollbar-thumb:active { background: #4a4a55; background-clip: padding-box; }
/* Touch screens have no hover: a faint thumb so long lists still show they scroll. */
@media (hover: none) { ::-webkit-scrollbar-thumb { background: #1c1c21; background-clip: padding-box; } }
::-webkit-scrollbar-button { display: none; }
::selection { background: rgba(108, 182, 255, .28); color: #fff; }
::placeholder { color: var(--dim); opacity: 1; }
input, textarea, select { caret-color: var(--blue); }
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
input:-webkit-autofill, textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text); transition: background-color 9999s; }
:focus:not(:focus-visible) { outline: none; }
.select { -webkit-appearance: none; appearance: none; padding-right: 26px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%239a9aa3' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center; }
img { -webkit-user-drag: none; }
code, pre, .raw, .mono { font-variant-ligatures: none; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001s !important;
  transition-duration: .001s !important; scroll-behavior: auto !important; } }
body.calm * { animation-duration: .001s !important; transition-duration: .001s !important;
  scroll-behavior: auto !important; }

/* ---------- settings ---------- */
dialog.settings { width: min(440px, calc(100vw - 32px)); padding: 0; border-radius: 16px;
  border: 1px solid var(--line2); background: var(--s2); color: var(--text); }
dialog.settings::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(2px); }
.set-head { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.set-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.set-body { padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.set-sec { font-size: 11px; font-weight: 500; color: var(--dim); letter-spacing: .6px;
  text-transform: uppercase; margin: 12px 0 4px; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--s4); }
.set-row:last-child { border-bottom: 0; }
.set-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.set-row b { font-size: 13px; font-weight: 500; }
.set-row span { font-size: 12px; color: var(--dim); }
.switch { width: 40px; height: 24px; border-radius: 999px; border: 1px solid var(--line3);
  background: #0f0f12; position: relative; flex: none; padding: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--dim); transition: transform .15s, background .15s; }
.switch[aria-checked="true"] { background: #10243d; border-color: #2c5a92; }
.switch[aria-checked="true"]::after { transform: translateX(16px); background: var(--blue); }

/* ---------- compact mode ---------- */
body.compact { font-size: 13px; }
body.compact .side { width: 228px; padding: 12px 10px; gap: 12px; }
body.compact .head { padding: 8px 16px; }
body.compact .thread-in { gap: 14px; padding: 14px 16px 24px; max-width: 980px; }
body.compact .turn { gap: 6px; }
body.compact .bubble { padding: 6px 11px; }
body.compact .answer { font-size: 13.5px; }
body.compact .row { min-height: 26px; padding-top: 2px; padding-bottom: 2px; font-size: 12.5px; }
body.compact .glyph { width: 17px; height: 17px; font-size: 10px; }
body.compact .act-head { padding: 7px 12px; font-size: 12px; }
body.compact .act-body { padding: 4px 6px 6px; }
body.compact .card { padding: 9px; gap: 7px; }
body.compact .turn-link { padding: 5px 8px; }
body.compact .composer { padding: 6px 16px 12px; }
body.compact .comp { padding: 7px 10px; gap: 5px; max-width: 980px; }
body.compact .btn { height: 30px; }
body.compact .btn.icon { width: 30px; }
body.compact .seg button { height: 24px; }
body.compact .select { height: 30px; }
body.compact .confirm { padding: 12px; gap: 9px; }
body.compact .insp { width: 360px; }
body.compact .insp-body { padding: 12px; gap: 10px; }

/* ---------- model menu ---------- */
.picker { position: relative; }
.picker-btn { height: 36px; gap: 7px; font-size: 12px; color: var(--text2); border-color: #1f1f24;
  max-width: 300px; }
.picker-btn #modelBtnText { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-btn svg { flex: none; opacity: .7; }
.menu { position: absolute; right: 0; bottom: calc(100% + 8px); width: 340px; z-index: 45;
  max-height: min(70vh, 560px); overflow-y: auto; padding: 6px; border-radius: 14px;
  border: 1px solid var(--line2); background: #0a0a0c; box-shadow: 0 18px 50px #000; }
.menu-sec { font-size: 11px; font-weight: 500; color: var(--dim); letter-spacing: .6px;
  text-transform: uppercase; padding: 10px 10px 6px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
  border: 0; border-radius: 10px; background: transparent; text-align: left; }
.menu-item:hover { background: var(--s4); }
.menu-item.on { background: #0d1626; }
.menu-check { width: 14px; flex: none; color: var(--blue); font-size: 13px; }
.menu-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.menu-text b { font-size: 13px; font-weight: 500; color: var(--text); }
.menu-text span { font-size: 11.5px; color: var(--dim); }
.menu-tag { flex: none; font-size: 10.5px; color: var(--dim); border: 1px solid var(--line2);
  border-radius: 999px; padding: 1px 7px; }
.menu-seg { margin: 0 6px; }
.menu-seg button { flex: 1; }
.menu-note { font-size: 11.5px; color: var(--dim); padding: 8px 10px 4px; line-height: 1.45; }
.menu-row { display: flex; align-items: center; gap: 12px; padding: 4px 10px 8px; }
@media (max-width: 600px) {
  .menu { position: fixed; left: 8px; right: 8px; bottom: 120px; width: auto; }
  .picker-btn { max-width: 150px; }
}
