:root {
  --bg: #faf9f5; --side: #f3f1ea; --panel: #ffffff; --ink: #141413; --ink2: #3d3d3a; --mute: #73726c;
  --line: #e6e3da; --line2: #d9d5c9; --accent: #c96442; --accent-ink: #fff; --hover: #ebe8df;
  --user: #f0eee6; --code-bg: #f2f0e9; --term: #1f1e1d; --ok: #3f7d4f; --bad: #b5463a; --warn: #a86b12;
  --add: #e3f1e3; --add-ink: #1f5a2a; --del: #f8e1de; --del-ink: #8a2a1e;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #262624; --side: #1f1e1d; --panel: #30302e; --ink: #faf9f5; --ink2: #dedcd4; --mute: #a3a199;
    --line: #3a3936; --line2: #4a4844; --accent: #d97757; --hover: #34332f; --user: #393836; --code-bg: #1f1e1d;
    --ok: #7cc48d; --bad: #f08a7c; --warn: #e3b25a; --add: #213a26; --add-ink: #a9dcb2; --del: #43221e; --del-ink: #f2b3a9;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body { font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
code, pre { font-family: var(--mono); }
.hide { display: none !important; }
.muted { color: var(--mute); }
.small { font-size: 12.5px; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; margin-top: 8px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; border: 1px solid var(--line2); background: var(--panel); color: var(--ink);
  border-radius: 9px; padding: 7px 13px; cursor: pointer; font-size: 14px; line-height: 1.3; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.primary:hover { opacity: .88; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn.wide { width: 100%; justify-content: center; padding: 10px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { border: 0; background: none; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; color: var(--mute); font-size: 17px; flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }

/* login */
#login { height: 100%; display: grid; place-items: center; padding: 16px; }
.login-box { width: 100%; max-width: 340px; text-align: center; }
.login-box h1 { font-size: 26px; margin: 6px 0 0; font-weight: 600; letter-spacing: -.02em; }
.login-box form { margin-top: 22px; display: grid; gap: 10px; }
.login-box input { text-align: center; }

/* layout */
#app { display: flex; height: 100%; height: 100dvh; }
#side { width: 272px; flex: none; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: calc(10px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom)); }
.side-top { display: flex; align-items: center; padding: 2px 6px 10px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -.01em; flex: 1; }
.spark { width: 20px; height: 20px; color: var(--accent); }
.new-btn { display: flex; align-items: center; gap: 8px; text-decoration: none; padding: 8px 10px; border-radius: 9px; font-weight: 500; }
.new-btn span { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 14px; }
.new-btn:hover { background: var(--hover); }
.search { margin: 8px 0 6px; border: 1px solid var(--line); background: var(--bg); border-radius: 9px; padding: 7px 10px; font-size: 13.5px; width: 100%; }
.chat-list { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.chat-group { font-size: 12px; color: var(--mute); padding: 12px 10px 4px; }
.chat-item { display: block; text-decoration: none; padding: 7px 10px; border-radius: 9px; position: relative; }
.chat-item:hover { background: var(--hover); }
.chat-item.on { background: var(--hover); }
.chat-item .t { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 16px; }
.chat-item .s { font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item .dot { position: absolute; right: 10px; top: 13px; width: 8px; height: 8px; border-radius: 50%; }
.dot.running { background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.dot.requires_action { background: var(--bad); }
.dot.idle { background: var(--ok); opacity: .7; }
.badge { display: inline-block; font-size: 11px; color: #fff; background: var(--bad); border-radius: 999px; padding: 0 6px; margin-left: 4px; }
@keyframes pulse { 50% { opacity: .35; } }
.side-nav { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 6px; display: grid; }
.side-nav a, .side-nav button { text-align: left; text-decoration: none; background: none; border: 0; padding: 6px 10px; border-radius: 8px; font-size: 14px; color: var(--ink2); cursor: pointer; }
.side-nav a:hover, .side-nav button:hover, .side-nav a.on { background: var(--hover); color: var(--ink); }
#scrim { display: none; }

#main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; gap: 6px; padding: calc(8px + env(safe-area-inset-top)) 14px 8px; border-bottom: 1px solid var(--line); position: relative; min-height: 54px; }
.chat-head.plain { border-bottom: 0; }
.chat-head h2 { font-size: 17px; margin: 0; font-weight: 600; }
.head-text { flex: 1; min-width: 0; }
.chat-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: text; }
.chat-title[contenteditable="true"] { outline: 1px solid var(--line2); border-radius: 6px; padding: 0 4px; }
.chat-sub { font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu { position: absolute; right: 12px; top: calc(48px + env(safe-area-inset-top)); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; z-index: 10; min-width: 150px; display: grid; }
.menu button { background: none; border: 0; text-align: left; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.menu button:hover { background: var(--hover); }
.menu .danger { color: var(--bad); }

/* thread */
.thread { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.msgs { max-width: 780px; margin: 0 auto; padding: 22px 18px 30px; }
.m-user { display: flex; justify-content: flex-end; margin: 22px 0 14px; }
.m-user .bubble { background: var(--user); border-radius: 16px; padding: 9px 14px; max-width: 85%; white-space: pre-wrap; word-wrap: break-word; }
.m-user img { max-width: 220px; max-height: 220px; border-radius: 10px; display: block; margin-bottom: 6px; }
.m-cmd { text-align: right; font-family: var(--mono); font-size: 13px; color: var(--mute); margin: 16px 0 8px; }
.m-text { margin: 10px 0; word-wrap: break-word; }
.m-text > :first-child { margin-top: 0; } .m-text > :last-child { margin-bottom: 0; }
.m-text p, .m-text ul, .m-text ol { margin: 0 0 10px; }
.m-text ul, .m-text ol { padding-left: 22px; }
.m-text li { margin: 3px 0; }
.m-text h1, .m-text h2, .m-text h3 { font-size: 16px; margin: 16px 0 8px; }
.m-text code { background: var(--code-bg); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; font-size: .88em; }
.m-text pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; overflow-x: auto; font-size: 13px; line-height: 1.45; }
.m-text pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.m-text a { color: var(--accent); }
.m-text table { border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; margin: 0 0 10px; }
.m-text th, .m-text td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; }
.m-text blockquote { margin: 0 0 10px; padding-left: 12px; border-left: 3px solid var(--line2); color: var(--ink2); }
.m-think { margin: 8px 0; font-size: 13.5px; color: var(--mute); }
.m-think summary { cursor: pointer; list-style: none; }
.m-think summary::before { content: "› "; }
.m-think[open] summary::before { content: "⌄ "; }
.m-think div { white-space: pre-wrap; border-left: 2px solid var(--line); padding-left: 10px; margin-top: 4px; }
.m-note { text-align: center; color: var(--mute); font-size: 12.5px; margin: 14px 0; }
.m-err { color: var(--bad); font-size: 13.5px; margin: 10px 0; border: 1px solid currentColor; border-radius: 10px; padding: 8px 12px; }
.m-done { color: var(--mute); font-size: 12px; margin: 4px 0 6px; }
.streaming .cursor { display: inline-block; width: 7px; height: 15px; background: var(--accent); vertical-align: -2px; animation: pulse 1s infinite; margin-left: 2px; }

/* tool cards */
.tool { margin: 6px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
.tool > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 13.5px; min-width: 0; }
.tool > summary::-webkit-details-marker { display: none; }
.tool > summary:hover { background: var(--hover); }
.tool .ti { width: 16px; text-align: center; flex: none; }
.tool .tn { font-weight: 600; flex: none; }
.tool .ts { color: var(--mute); font-family: var(--mono); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.tool .st { flex: none; font-size: 12px; }
.tool .st.run { color: var(--accent); animation: pulse 1s infinite; }
.tool .st.ok { color: var(--ok); }
.tool .st.bad { color: var(--bad); }
.tool .tb { border-top: 1px solid var(--line); padding: 8px 10px; font-size: 12.5px; }
.tool pre { margin: 0; font-size: 12px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto; background: var(--code-bg); border-radius: 7px; padding: 8px 10px; }
.tool pre + pre { margin-top: 6px; }
.tool .lbl { font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .04em; margin: 6px 0 3px; }
.tool .lbl:first-child { margin-top: 0; }
.diff { font-family: var(--mono); font-size: 12px; line-height: 1.45; background: var(--code-bg); border-radius: 7px; overflow: auto; max-height: 420px; }
.diff div { white-space: pre-wrap; word-break: break-word; padding: 0 10px; }
.diff .a { background: var(--add); color: var(--add-ink); }
.diff .d { background: var(--del); color: var(--del-ink); }
.diff .h { color: var(--mute); padding-top: 4px; }
.subs { margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--mute); }
.todos { margin: 8px 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--panel); font-size: 14px; }
.todos .tt { font-size: 12px; color: var(--mute); margin-bottom: 4px; }
.todo { display: flex; gap: 8px; padding: 2px 0; }
.todo .b { flex: none; width: 16px; color: var(--mute); }
.todo.completed { color: var(--mute); text-decoration: line-through; }
.todo.in_progress { font-weight: 600; }
.todo.in_progress .b { color: var(--accent); }

/* dock + composer */
.dock { padding: 0 14px calc(12px + env(safe-area-inset-bottom)); max-width: 808px; width: 100%; margin: 0 auto; }
.working { font-size: 13.5px; color: var(--accent); padding: 4px 4px 8px; }
.spin { display: inline-block; animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.composer { background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow); padding: 10px 10px 8px 14px; }
.composer:focus-within { border-color: var(--mute); }
.composer textarea { min-height: 0; width: 100%; border: 0; outline: 0; background: none; resize: none; max-height: 40vh; padding: 2px 0; line-height: 1.5; font-size: 15.5px; }
.composer.big textarea { min-height: 76px; }
.comp-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.chip { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; color: var(--ink2); cursor: pointer; max-width: 46vw; appearance: none; -webkit-appearance: none; }
.chip.icon { width: 30px; height: 30px; padding: 0; display: grid; place-items: center; font-size: 16px; }
.chip:hover { background: var(--hover); }
select.chip { padding-right: 10px; }
.send { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--accent); color: #fff; font-size: 17px; font-weight: 700; cursor: pointer; flex: none; }
.send:disabled { opacity: .4; }
.send.stop { background: var(--ink); color: var(--bg); font-size: 12px; }
.attach-preview { display: flex; gap: 6px; flex-wrap: wrap; }
.attach-preview:not(:empty) { margin-bottom: 8px; }
.attach-preview .att { position: relative; }
.attach-preview img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.attach-preview button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); font-size: 11px; cursor: pointer; }

/* permission prompts */
.perm { background: var(--panel); border: 1px solid var(--accent); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.perm h4 { margin: 0 0 4px; font-size: 14.5px; }
.perm .pd { color: var(--mute); font-size: 13px; }
.perm pre { background: var(--code-bg); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; margin: 8px 0 0; }
.perm .m-text { max-height: 45vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-top: 8px; }
.perm .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.perm input[type=text] { flex: 1; min-width: 160px; }
.q { margin-top: 10px; }
.q .qh { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.opt { display: block; width: 100%; text-align: left; border: 1px solid var(--line2); background: var(--bg); border-radius: 10px; padding: 7px 11px; margin: 5px 0; cursor: pointer; }
.opt.on { border-color: var(--accent); background: var(--hover); }
.opt small { display: block; color: var(--mute); font-size: 12.5px; }

/* new session */
.hero { flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: 8vh 16px 30px; }
.hero-spark { width: 38px; height: 38px; color: var(--accent); }
.hero h1 { font-size: 28px; font-weight: 500; letter-spacing: -.02em; margin: 10px 0 22px; text-align: center; font-family: ui-serif, Georgia, "Times New Roman", serif; }
.hero .composer { width: 100%; max-width: 680px; }
.folder-pop { width: 100%; max-width: 680px; margin-top: 8px; }
.folder-pop .fo { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 6px 8px; cursor: pointer; font-family: var(--mono); font-size: 13px; }
.folder-pop .fo:hover, .folder-pop .fo.on { background: var(--hover); }
.recent { width: 100%; max-width: 680px; margin-top: 28px; }
.recent .chat-item { border: 1px solid var(--line); margin-bottom: 6px; }

/* pages */
.page .page-body { flex: 1; overflow-y: auto; padding: 4px 16px 40px; max-width: 860px; width: 100%; margin: 0 auto; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.card h3 { font-size: 15px; margin: 0; }
label { display: block; font-size: 13px; color: var(--mute); margin: 10px 0 4px; }
input, select, textarea { width: 100%; border: 1px solid var(--line2); background: var(--bg); border-radius: 9px; padding: 9px 11px; }
.composer select, .comp-row input { width: auto; }
textarea { min-height: 80px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--ink); font-size: 14px; }
.check input { width: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.pill { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line2); color: var(--mute); }
.pill.ok { color: var(--ok); border-color: currentColor; } .pill.bad { color: var(--bad); border-color: currentColor; } .pill.acc { color: var(--accent); border-color: currentColor; }
.card pre { background: var(--term); color: #e8e6df; border-radius: 9px; padding: 10px; font-size: 12px; line-height: 1.35; overflow: auto; margin: 10px 0 0; max-height: 220px; white-space: pre; }
.key { font: 12px var(--mono); word-break: break-all; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat .v { font-size: 19px; font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 10px; z-index: 60; max-width: 90vw; font-size: 14px; }

/* terminal overlay */
#term-view { position: fixed; inset: 0; background: var(--term); z-index: 40; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); }
#term-bar { display: flex; gap: 8px; align-items: center; padding: 6px 8px; color: #e8e6df; border-bottom: 1px solid #333; }
#term-view .btn { background: #2c2b27; border-color: #444; color: #e8e6df; flex: none; }
#term { flex: 1; min-height: 0; padding: 4px; }
#keys { display: flex; gap: 6px; overflow-x: auto; padding: 6px 8px; border-top: 1px solid #333; }
#term-input { display: flex; gap: 6px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
#term-input textarea { min-height: 40px; max-height: 120px; background: #2c2b27; border-color: #444; color: #e8e6df; }

.only-mobile { display: none; }
@media (max-width: 820px) {
  .only-mobile { display: inline-block; }
  #side { position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: min(86vw, 310px); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  #app.side-open #side { transform: none; }
  #app.side-open #scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 25; }
  .grid2 { grid-template-columns: 1fr; }
  .msgs { padding: 14px 14px 24px; }
  .hero { padding-top: 4vh; }
  .hero h1 { font-size: 24px; }
  .m-user .bubble { max-width: 92%; }
}

/* ---- status, filters, projects ---- */
.filters { display: flex; gap: 4px; margin: 2px 0 4px; }
.filters button { flex: 1; border: 1px solid var(--line); background: none; border-radius: 8px; padding: 4px 6px; font-size: 12.5px; color: var(--ink2); cursor: pointer; white-space: nowrap; }
.filters button.on { background: var(--panel); border-color: var(--line2); color: var(--ink); font-weight: 600; }
.cnt { margin-left: 4px; font-size: 11px; color: var(--mute); }
.cnt.red:not(:empty) { color: #fff; background: var(--bad); border-radius: 999px; padding: 0 5px; }
.chat-group.live { color: var(--accent); font-weight: 600; }
.chat-item .s { display: flex; gap: 6px; align-items: center; }
.st-txt { font-weight: 600; font-size: 11.5px; flex: none; }
.st-txt.running { color: var(--accent); }
.st-txt.requires_action { color: var(--bad); }
.st-txt.idle { color: var(--ok); }
.st-txt.stopped { color: var(--mute); font-weight: 400; }
.tag { display: inline-block; font-size: 11px; border: 1px solid var(--line2); border-radius: 6px; padding: 0 5px; color: var(--ink2); flex: none; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.chat-item .dot { top: 12px; }
.dot.stopped { background: transparent; border: 1.5px solid var(--line2); }
.chat-sub { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; overflow: hidden; }
.chat-sub .cwd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 1px 8px 1px 7px; flex: none; }
.spill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.spill.running { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.spill.running::before { animation: pulse 1.2s infinite; }
.spill.requires_action { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.spill.idle { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.spill.stopped { color: var(--mute); background: var(--hover); }
.chip.mini { padding: 0 8px; font-size: 11.5px; height: 20px; line-height: 18px; }
.banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; background: color-mix(in srgb, var(--accent) 10%, var(--bg)); border-bottom: 1px solid var(--line); font-size: 13.5px; }
.banner .spacer { flex: 1; }
.tabs { display: inline-flex; background: var(--side); border: 1px solid var(--line); border-radius: 11px; padding: 3px; margin-bottom: 14px; }
.tabs button { border: 0; background: none; padding: 6px 16px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--ink2); }
.tabs button.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.comp-row.wrap { flex-wrap: wrap; }
.card.proj { width: 100%; max-width: 680px; }
.extras { display: flex; flex-wrap: wrap; gap: 6px; }
.extras label { display: inline-flex; align-items: center; gap: 6px; margin: 0; border: 1px solid var(--line2); border-radius: 999px; padding: 4px 11px; color: var(--ink); font-size: 13px; cursor: pointer; }
.extras input { width: auto; margin: 0; }
.extras label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.proj-card .meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.proj-card .sess { margin-top: 8px; }
.proj-card .sess .chat-item { border: 1px solid var(--line); margin-bottom: 4px; }
.srv-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line2); margin-right: 6px; }
.srv-dot.ok { background: var(--ok); } .srv-dot.bad { background: var(--bad); }
.chat-sub select.chip { width: auto; flex: none; max-width: 220px; }
@media (max-width: 820px) {
  .composer .chip { font-size: 12px; padding: 3px 9px; max-width: 42vw; }
  .chat-sub .cwd { display: none; }
}
