/* B3 web — "glossy black & white" theme, mirroring the Android app
   (ui/theme/{Color,Theme,Type}.kt). Dark scheme is primary: accent is white-on-black.
   Layout is wide command-ops: nav rail | list column | chat pane. */
:root {
  --bg: #000000;
  --surface: #0a0a0a;
  --surface-2: #121212;
  --surface-3: #1a1a1a;
  --carbon: #1e1e1e;
  --metal: #2a2a2c;
  --line: #353535;
  --line-soft: #454545;
  --line-hair: rgba(255, 255, 255, .08);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, .6);
  --faint: rgba(255, 255, 255, .38);
  --accent: #ffffff;
  --accent-ink: #000000;
  --cyan: #34d6ff;
  --green: #30d158;
  --red: #ff453a;
  --amber: #ffb340;
  --avatar-a: #2a2a2c;
  --avatar-b: #000000;
  font-synthesis: none;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; }
html, body { height: 100%; }
body {
  background: radial-gradient(circle at 50% 0%, #1a1a1a 0%, #000000 100%);
  color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
.mono, code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .3px; }

/* ---- screen switching ---- */
.app { height: 100%; position: relative; }
.screen { display: none; height: 100%; }
.screen.active { display: block; }

/* auth screens (create / unlock / boot) — stay centered & narrow */
.screen.pad { max-width: 460px; margin: 0 auto; padding: max(48px, 8vh) 24px 32px; overflow-y: auto; }
.brand { display: flex; align-items: baseline; gap: 10px; margin-bottom: 26px; }
.logo { font-weight: 800; font-size: 32px; letter-spacing: -1.2px; color: var(--text); }
.sub { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 3px; font-weight: 600; }
h1 { font-size: 24px; margin: 0 0 10px; font-weight: 800; letter-spacing: -.5px; }
.muted { color: var(--muted); margin: 0 0 22px; }
.small { font-size: 12.5px; }
.hint { color: var(--muted); font-size: 12px; font-weight: 400; }

form { display: flex; flex-direction: column; gap: 16px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 14px; }
input[type=text], input[type=password], textarea {
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); color: var(--text);
  padding: 12px 14px; border-radius: 12px; font-size: 15px; outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s; width: 100%; font-family: inherit;
}
input:focus, textarea:focus { 
  border-color: rgba(255, 255, 255, 0.35); 
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .05), 0 4px 12px rgba(0, 0, 0, 0.25); 
}
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--text); cursor: pointer; }

button { 
  font: inherit; cursor: pointer; border: none; border-radius: 12px; 
  padding: 12px 18px; font-weight: 600;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
}
button:hover { transform: translateY(-1.5px); }
button:active { transform: translateY(0.5px); }
button[disabled] { opacity: .4; cursor: default; transform: none; }
button[data-busy="1"]::after { content: " …"; }

.primary { 
  background: linear-gradient(180deg, #ffffff 0%, #e0e0e5 100%); 
  color: var(--accent-ink); 
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.4); 
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.primary:hover { 
  background: #ffffff; 
  box-shadow: 0 6px 18px rgba(255, 255, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.5); 
}

.ghost { 
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%); 
  color: var(--text); 
  border: 1px solid rgba(255, 255, 255, 0.09); 
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.ghost:hover { 
  background: rgba(255, 255, 255, 0.08); 
  border-color: rgba(255, 255, 255, 0.18); 
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.ghost.sm, .danger.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }

.danger { 
  background: rgba(255, 69, 58, 0.05); 
  color: var(--red); 
  border: 1px solid rgba(255, 69, 58, 0.25); 
}
.danger:hover { 
  background: rgba(255, 69, 58, 0.15); 
  border-color: rgba(255, 69, 58, 0.45);
  box-shadow: 0 0 12px rgba(255, 69, 58, 0.15);
}

.link { background: none; border: none; color: var(--muted); text-decoration: underline; padding: 14px 0 0; }
.link.danger { color: var(--red); border: none; }
.link:hover { color: var(--text); }

.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, #2c2c35 0%, #0d0d11 100%);
  color: #fff; font-weight: 700; font-size: 15px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}
.avatar.sm { width: 38px; height: 38px; }
.avatar.xl { 
  width: 92px; height: 92px; font-size: 36px; 
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6), inset 0 2px 2px rgba(255, 255, 255, 0.25);
}
.avatar { overflow: hidden; }
.avatar .av-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* profile editor */
.profile-edit { display: flex; align-items: center; gap: 16px; margin: 4px 0 12px; }
.pf-avatar-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.sheet textarea { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 11px 12px; font: inherit; resize: vertical; min-height: 62px; outline: none; }
.sheet textarea:focus { border-color: #6a6a6a; box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.prow .sub { font-size: 12px; color: var(--muted); }

/* ================= WIDE COMMAND-OPS SHELL ================= */
#main.active { display: block; }
.layout { display: grid; grid-template-columns: 64px 330px 1fr; height: 100vh; }

/* nav rail */
.rail { background: rgba(10, 10, 12, 0.6); border-right: 1px solid var(--line-hair); display: flex; flex-direction: column; align-items: center; padding: 16px 0 16px; gap: 8px; backdrop-filter: blur(20px); }
.rail-mark { font-weight: 900; font-size: 20px; letter-spacing: -.8px; background: linear-gradient(180deg, #ffffff, #8e8e93); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 16px; }
.rail-btn { position: relative; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--muted); background: none; transition: all .2s; }
.rail-btn svg { width: 22px; height: 22px; }
.rail-btn:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.rail-btn.active { background: rgba(255, 255, 255, 0.1); color: var(--text); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05); }
.rail-btn.danger { border: none; }
.rail-btn.danger:hover { background: rgba(255, 69, 58, 0.15); color: var(--red); }
.rail-spacer { flex: 1; }
.rail .badge { position: absolute; top: 4px; right: 5px; background: var(--red); color: #fff; font-style: normal; font-size: 10px; font-weight: 800; line-height: 1; border-radius: 8px; padding: 3px 6px; min-width: 16px; text-align: center; box-shadow: 0 2px 5px rgba(255, 69, 58, 0.4); }
.conn-dot { width: 9px; height: 9px; border-radius: 50%; margin: 6px 0; background: var(--red); }
.conn-dot.on { background: var(--green); box-shadow: 0 0 10px rgba(48, 209, 88, 0.6); }
.conn-dot.pending { background: var(--cyan); animation: pulse 1.2s infinite; }
.conn-dot.off { background: var(--red); }
@keyframes pulse { 50% { opacity: .35; } }

/* list column */
.list-col { background: rgba(10, 10, 12, 0.35); border-right: 1px solid var(--line-hair); display: flex; flex-direction: column; min-width: 0; backdrop-filter: blur(10px); }
.list-head { display: flex; gap: 8px; padding: 14px; border-bottom: 1px solid var(--line-hair); }
.list-head input { flex: 1; padding: 10px 14px; background: rgba(255, 255, 255, 0.03); font-size: 14px; }
.list-head .ghost.sm { font-size: 18px; line-height: 1; padding: 0 14px; display: grid; place-items: center; }
.list { flex: 1; overflow-y: auto; }
.list-section { font-size: 10px; font-weight: 800; letter-spacing: 1.5px; color: var(--faint); padding: 16px 16px 6px; text-transform: uppercase; }
.list-empty { color: var(--muted); font-size: 13.5px; padding: 40px 20px; text-align: center; line-height: 1.7; }

.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid rgba(255, 255, 255, .02); transition: background-color .15s; }
.row:hover { background: rgba(255, 255, 255, 0.03); }
.row.active { background: rgba(255, 255, 255, 0.06); }
.row .grow { flex: 1; min-width: 0; }
.row .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.row strong { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.row time { font-size: 11px; color: var(--faint); flex: none; }
.row .preview { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.row .unread { background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 800; border-radius: 9px; padding: 2px 6px; margin-left: 6px; box-shadow: 0 2px 6px rgba(255, 255, 255, 0.15); }
.row .sub-id { font-size: 10px; color: var(--faint); display: block; margin-top: 1px; }
.dot-btn { background: none; border: none; color: var(--muted); padding: 4px 8px; border-radius: 50%; font-size: 18px; }
.dot-btn:hover { color: var(--text); }

.req-row { display: flex; align-items: center; gap: 10px; padding: 11px 16px; background: rgba(255, 179, 64, .04); border-bottom: 1px solid rgba(255, 179, 64, .08); }
.req-row .grow { flex: 1; min-width: 0; }
.req-row strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req-row .sub-id { display: block; font-size: 10px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req-actions { display: flex; gap: 6px; }
.req-acc, .req-rej { padding: 6px 11px; font-size: 13px; font-weight: 700; border-radius: 8px; border: 1px solid; transition: background-color .15s; }
.req-acc { color: var(--green); border-color: rgba(48, 209, 88, 0.3); background: rgba(48, 209, 88, 0.08); }
.req-acc:hover { background: rgba(48, 209, 88, 0.16); }
.req-rej { color: var(--red); border-color: rgba(255, 69, 58, 0.3); background: transparent; }
.req-rej:hover { background: rgba(255, 69, 58, 0.12); }

.me-strip { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-hair); background: rgba(255, 255, 255, 0.02); cursor: pointer; transition: background-color .15s; }
.me-strip:hover { background: rgba(255, 255, 255, 0.05); }
.me-meta { min-width: 0; }
.me-meta strong { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-meta code { font-size: 10px; color: var(--cyan); font-weight: 600; }

/* main pane */
.pane { display: flex; flex-direction: column; min-width: 0; background: transparent; height: 100vh; }
.empty-state { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: 14px; color: var(--muted); padding: 40px; }
.empty-state.small { place-content: center; }
.empty-mark { font-size: 58px; font-weight: 900; letter-spacing: -1.5px; background: linear-gradient(180deg, #ffffff, #444446); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .85; }
.empty-mark svg { width: 50px; height: 50px; stroke: var(--faint); }
.empty-state h2 { color: var(--text); font-weight: 800; font-size: 22px; letter-spacing: -.3px; }
.empty-state p { max-width: 380px; font-size: 13.5px; line-height: 1.7; }
.pane-head { padding: 22px 28px 14px; border-bottom: 1px solid var(--line-hair); background: rgba(10, 10, 12, 0.2); backdrop-filter: blur(10px); }
.pane-head h1 { font-size: 24px; font-weight: 900; letter-spacing: -.5px; }

/* chat */
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line-hair); background: rgba(10, 10, 12, 0.4); backdrop-filter: blur(12px); }
.chat-meta { flex: 1; min-width: 0; }
.chat-meta strong { font-size: 15px; display: block; font-weight: 600; }
.chat-meta code { font-size: 11px; color: var(--muted); font-weight: 500; }
.chat-head .ic { background: none; border: none; color: var(--muted); padding: 7px; border-radius: 8px; transition: all .15s; }
.chat-head .ic:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.chat-head .ic svg { width: 21px; height: 21px; }
/* Unified inline SVG icons (replacing scattered emojis) so the whole app reads as one icon system. */
.avatar > svg { width: 20px; height: 20px; }
.dot-btn > svg { width: 17px; height: 17px; display: block; margin: auto; }
.icn { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; vertical-align: -3px; flex: none; }
.icn > svg { width: 100%; height: 100%; }
.btn { align-items: center; }
.btn .icn { width: 18px; height: 18px; margin-right: 10px; }
.ic-attach > svg { width: 20px; height: 20px; }
.req-rej > .icn { width: 15px; height: 15px; }
/* Message context menu (react / copy / edit / delete) + reaction chips + edited tag. */
.msg-menu { position: fixed; z-index: 2000; background: #14141c; border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 14px 40px rgba(0,0,0,.6); min-width: 168px; }
.msg-menu .react-row { display: flex; gap: 2px; padding: 2px 2px 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line-hair); }
.msg-menu .react-opt { background: none; border: none; font-size: 20px; line-height: 1; padding: 5px 6px; border-radius: 8px; cursor: pointer; }
.msg-menu .react-opt:hover { background: rgba(255,255,255,.09); transform: scale(1.12); }
.msg-menu .menu-item { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; color: var(--text); padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; font-weight: 500; text-align: left; }
.msg-menu .menu-item:hover { background: rgba(255,255,255,.06); }
.msg-menu .menu-item.danger { color: var(--red); }
.msg-menu .menu-item .icn { width: 16px; height: 16px; }
.msg .reacts { display: flex; gap: 3px; margin-top: 3px; }
.msg.mine .reacts { justify-content: flex-end; }
.react-chip { background: rgba(255,255,255,.08); border: 1px solid var(--line-hair); border-radius: 10px; padding: 1px 6px; font-size: 13px; line-height: 1.5; }
.edited-tag { font-size: 10px; color: var(--faint); font-weight: 400; }

.messages { flex: 1; overflow-y: auto; padding: 20px 28px; display: flex; flex-direction: column; gap: 4px; }
.msg { max-width: 60%; display: flex; flex-direction: column; margin-bottom: 6px; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg .bubble { 
  padding: 10px 14px; border-radius: 18px 18px 18px 4px; 
  background: rgba(255, 255, 255, 0.03); 
  border: 1px solid var(--line-hair); 
  word-wrap: break-word; white-space: pre-wrap; font-size: 14.5px; line-height: 1.45; user-select: text; 
}
.msg.mine .bubble { 
  background: rgba(255, 255, 255, 0.08); 
  border-color: rgba(255, 255, 255, 0.12); 
  border-radius: 18px 18px 4px 18px; 
}
.msg .meta { font-size: 10px; color: var(--faint); margin-top: 4px; display: flex; gap: 6px; align-items: center; font-weight: 500; }
.msg .ticks { letter-spacing: -1px; }
.msg .ticks.read { color: var(--cyan); }
/* Delivery/read bubbles (matches the phone): empty=sent, filled white=delivered, cyan=read. */
.msg .dots { display: inline-flex; gap: 3px; align-items: center; }
.dot { width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--faint); box-sizing: border-box; }
.dot.full { background: #fff; border-color: #fff; }
.dot.neon { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 4px var(--cyan); }
.msg.failed .bubble { border-color: rgba(255, 69, 58, 0.4); background: rgba(255, 69, 58, 0.02); }
.day-sep { text-align: center; font-size: 11px; color: var(--faint); margin: 16px 0 10px; font-weight: 600; letter-spacing: .5px; }

.composer { display: flex; gap: 12px; align-items: flex-end; padding: 14px 20px; border-top: 1px solid var(--line-hair); background: rgba(10, 10, 12, 0.4); backdrop-filter: blur(12px); }
.composer textarea { resize: none; max-height: 140px; background: rgba(255, 255, 255, 0.03); border-radius: 14px; padding: 10px 14px; }
.composer .send { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; box-shadow: 0 4px 10px rgba(255, 255, 255, 0.15); }
.composer .send svg { width: 18px; height: 18px; }

/* settings / cards */
.settings-scroll { overflow-y: auto; padding: 20px 28px 40px; max-width: 680px; }
.card { 
  background: rgba(255, 255, 255, 0.02); 
  border: 1px solid rgba(255, 255, 255, 0.08); 
  border-radius: 18px; margin: 0 0 16px; overflow: hidden; 
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
}
.card .item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: .5px solid rgba(255, 255, 255, .05); }
.card .item:last-child { border-bottom: none; }
.card .item .k { font-size: 14px; font-weight: 500; }
.card .item .v { font-size: 13.5px; color: var(--muted); }
.prow { display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; transition: background-color .15s; }
.prow:hover { background: rgba(255, 255, 255, 0.03); }
.prow .grow { flex: 1; min-width: 0; }
.prow strong { font-size: 14.5px; display: block; font-weight: 600; }
.eyebrow { text-transform: uppercase; font-size: 10.5px; font-weight: 800; letter-spacing: 1.5px; color: var(--faint); padding: 8px 4px 8px; }
.statline { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; }
.sdot { width: 9px; height: 9px; border-radius: 50%; background: #3a4a43; flex: none; }
.sdot.pending { background: var(--cyan); animation: pulse 1.2s infinite; }
.sdot.ok { background: var(--green); box-shadow: 0 0 8px rgba(48, 209, 88, 0.5); }
.sdot.warn { background: var(--amber); }
.sdot.error { background: var(--red); }
.actions { display: flex; gap: 12px; margin-top: 8px; }
.actions button { flex: 1; }

/* toggles / selects */
.sw { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; }
.sw input { opacity: 0; width: 0; height: 0; }
.sw .track { position: absolute; inset: 0; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 20px; transition: .2s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; }
.sw .track::before { content: ""; position: absolute; width: 20px; height: 20px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.sw input:checked + .track { background: var(--green); border-color: var(--green); box-shadow: 0 0 8px rgba(48, 209, 88, 0.25); }
.sw input:checked + .track::before { transform: translateX(18px); }
.sel { 
  background: rgba(255, 255, 255, 0.04); 
  color: var(--text); 
  border: 1px solid rgba(255, 255, 255, 0.08); 
  border-radius: 8px; padding: 7px 12px; font-size: 13px; outline: none; 
  cursor: pointer; transition: all .2s; font-family: inherit;
}
.sel:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}
/* The native dropdown popup renders with system colors — force dark bg + light text so the entries
   are readable (previously white-on-white / invisible) across ALL selects: language, auto-lock,
   disappearing messages, mic, camera. */
.sel option { background: #14141c; color: #fff; }

/* modal (centered) */
.sheet-bg { 
  position: fixed; inset: 0; 
  background: rgba(0, 0, 0, 0.7); 
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; z-index: 50; 
  transition: all 0.3s ease;
}
.sheet-bg.open { display: flex; }
.sheet { 
  width: 430px; max-width: 92vw; max-height: 86vh; overflow-y: auto; 
  background: linear-gradient(135deg, rgba(20, 20, 25, 0.85) 0%, rgba(10, 10, 12, 0.95) 100%); 
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px; 
  border: 1px solid rgba(255, 255, 255, 0.1); 
  padding: 26px; 
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.05); 
}
.sheet h3 { margin: 0 0 14px; font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.sheet .grab { display: none; }
.sheet .item { display: flex; justify-content: space-between; align-items: center; }

.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px); background: rgba(20, 20, 25, 0.9); backdrop-filter: blur(10px); border: 1px solid var(--line-soft); color: var(--text); padding: 11px 20px; border-radius: 12px; font-size: 13.5px; max-width: 90vw; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; text-align: center; z-index: 100; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: rgba(255, 69, 58, 0.5); background: rgba(255, 69, 58, 0.05); }
.toast.warn { border-color: rgba(255, 179, 64, 0.5); background: rgba(255, 179, 64, 0.05); }
.toast.ok { border-color: rgba(48, 209, 88, 0.5); background: rgba(48, 209, 88, 0.05); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.15); }
::-webkit-scrollbar-track { background: transparent; }

/* responsive: collapse rail labels, stack on narrow */
@media (max-width: 780px) {
  .layout { grid-template-columns: 56px 1fr; }
  .pane { display: none; }
  .layout.chat-open .list-col { display: none; }
  .layout.chat-open .pane { display: flex; }
}
