@font-face {
  font-family: Manrope;
  src: url('/fonts/manrope-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  font-family: Manrope, "Noto Sans SC", "Noto Sans CJK SC", "PingFang SC", sans-serif;
  color-scheme: light;
  --canvas: #f9fafc;
  --paper: #fff;
  --rail: #f4f6fa;
  --rail-active: #e8efff;
  --text: #151d30;
  --muted: #57637b;
  --soft: #6a7487;
  --line: #dfe5ef;
  --field: #f4f6fa;
  --accent: #2856d5;
  --accent-hover: #1b45bd;
  --accent-on: #fff;
  --accent-tint: #eaf0ff;
  --green: #21704e;
  --green-soft: #e8f6ee;
  --red: #a63541;
  --red-soft: #ffeff0;
  --amber: #855411;
  --amber-soft: #fff5e3;
  --shadow: 0 10px 32px #17284624;
  --fast: 150ms;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --header: 60px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #141923;
  --paper: #191f2c;
  --rail: #161d2a;
  --rail-active: #273849;
  --text: #edf2ff;
  --muted: #a5b1c8;
  --soft: #a2aec3;
  --line: #303a4d;
  --field: #202737;
  --accent: #658bff;
  --accent-hover: #85a6ff;
  --accent-on: #101b39;
  --accent-tint: #253556;
  --green: #7bd7a6;
  --green-soft: #193931;
  --red: #fa99a6;
  --red-soft: #452a36;
  --amber: #f0c078;
  --amber-soft: #3c3127;
  --shadow: 0 10px 32px #0006;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--canvas); color: var(--text); font-size: 14px; }
:where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(button, a) { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
:where(input, textarea) { caret-color: var(--accent); }
:where(input, textarea)::placeholder { color: var(--soft); opacity: 1; }
::selection { background: var(--accent-tint); color: var(--text); }
a { color: var(--accent); text-underline-offset: .2em; }
svg { display: block; flex: none; }
pre, code, kbd { font-family: "IBM Plex Mono", Consolas, monospace; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.topbar { height: var(--header); display: flex; align-items: center; padding-inline: 19px; gap: 12px; border-bottom: 1px solid var(--line); background: var(--paper); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-size: 17px; font-weight: 790; letter-spacing: -.035em; color: var(--text); white-space: nowrap; }
.brand-mark { width: 33px; height: auto; display: block; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.connection, .preview-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.connection { display: inline-flex; gap: 6px; align-items: center; }
.connection i, .turn-status::before, .row-status::before { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.connection[data-state="online"] i { color: var(--green); }
.connection[data-state="offline"] i { color: var(--red); }
.connection[data-state="reconnecting"] i { color: var(--amber); }
.preview-label { background: var(--amber-soft); color: var(--amber); border-radius: 999px; padding: 3px 8px; }
.topbar .site-menu-anchor {
  --bg-surface: var(--paper); --site-shadow: var(--shadow); --border-strong: var(--line);
  --border-subtle: var(--line); --text-primary: var(--text); --text-secondary: var(--muted);
  --text-muted: var(--soft); --brand-tint: var(--accent-tint); --brand-ink: var(--accent);
  --danger: var(--red); --danger-bg: var(--red-soft); --motion-fast: var(--fast);
  --accent-contrast: var(--accent-on); --accent-soft: var(--accent-hover);
  z-index: 6;
}
.topbar .site-account-trigger { padding: 0; }
.site-account-menu:not([hidden]) { animation: account-menu-in 160ms var(--ease) both; }
@keyframes account-menu-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.account-error { padding: 5px 12px; font-size: 12px; }
.account-inbox { display: grid; gap: 7px; }
.account-message { margin: 0; }
.account-message-indicator { width: 7px; height: 7px; flex: none; border-radius: 50%; }
.account-message[data-unread="true"] .account-message-indicator { background: var(--accent); }
.account-message-body { padding: 2px 12px 11px 25px; overflow-wrap: anywhere; line-height: 1.6; }
.account-message-body > :first-child { margin-top: 0; }
.account-message-body > :last-child { margin-bottom: 0; }
.account-message .form-error { margin: 0 12px 10px 25px; }
.icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); flex: none; transition: background-color var(--fast); }
.icon-button:hover:not(:disabled) { background: var(--field); }
#connector-guide { text-decoration: none; }
.mobile-history, .history-backdrop { display: none; }

.shell { height: calc(100dvh - var(--header)); display: grid; grid-template-columns: clamp(170px, 17vw, 224px) minmax(0, 1fr) 64px; gap: 9px; padding: 10px 12px 12px; overflow: hidden; }
.shell.no-session { grid-template-columns: clamp(170px, 17vw, 224px) minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; min-height: 0; padding: 12px 9px 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.history-head { padding-inline: 3px; }
.history-head h2 { margin: 0 0 10px; font-size: 15px; font-weight: 800; }
.new-button, .primary-button, .secondary-button, .send-button {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 40px; padding: 7px 13px; border-radius: 8px; border: 1px solid transparent;
  text-decoration: none; font-weight: 720; font-size: 14px;
  transition: background-color var(--fast), color var(--fast), border-color var(--fast), transform var(--fast) var(--ease);
}
.primary-button, .send-button { background: var(--accent); color: var(--accent-on); }
:is(.primary-button, .send-button):hover:not(:disabled) { background: var(--accent-hover); }
:where(.new-button, .primary-button, .secondary-button, .send-button):active:not(:disabled) { transform: translateY(1px); }
.new-button { justify-content: flex-start; width: 100%; background: var(--paper); border-color: var(--line); color: var(--text); }
.new-button:hover:not(:disabled) { background: var(--rail-active); border-color: var(--accent); }
.secondary-button { border-color: var(--line); background: var(--paper); }
.secondary-button:hover:not(:disabled) { border-color: var(--accent); }
.search-box { margin: 10px 2px 15px; min-height: 37px; padding-inline: 9px; display: flex; align-items: center; gap: 7px; color: var(--soft); border: 1px solid transparent; border-radius: 8px; background: var(--field); }
.search-box:focus-within { border-color: var(--accent); background: var(--paper); }
.search-box input { min-width: 0; width: 100%; border: 0; background: transparent; outline: 0; font-size: 13px; }
.history-scroll { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; }
.session-list, .agent-list, .supported-agents, .host-list { list-style: none; margin: 0; padding: 0; }
.history-row { position: relative; }
.history-item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 39px; padding: 7px 39px 7px 9px; border: 1px solid transparent; border-radius: 7px; background: transparent; text-align: left; color: var(--muted); transition: background-color var(--fast); }
.history-item:hover { background: var(--field); }
.history-item[aria-current="true"] { background: var(--rail-active); color: var(--text); border-color: var(--line); }
.history-actions { position: absolute; top: 50%; right: 3px; width: 34px; height: 34px; transform: translateY(-50%); }
@media (hover: hover) {
  .history-row:not(:hover, :focus-within, :has([aria-current="true"])) .history-actions { opacity: 0; }
}
.history-item > span { min-width: 0; }
.history-item strong, .history-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item strong { font-size: 13px; font-weight: 710; }
.history-item small { color: var(--soft); font-size: 11px; margin-top: 2px; }
.zero-history, .empty-agents { padding: 7px 9px; color: var(--soft); font-size: 13px; line-height: 1.6; }
.sidebar-foot { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 6px; display: grid; gap: 1px; }
.archive-button, .hosts-button {
  min-height: 37px; display: flex; align-items: center; gap: 8px; border: 0; background: transparent;
  border-radius: 7px; padding-inline: 9px; text-align: left; color: var(--muted); font-size: 13px;
}
:where(.archive-button, .hosts-button):hover, .archive-button[aria-pressed="true"] { background: var(--field); color: var(--text); }

.conversation { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.conversation-head { flex: none; display: flex; align-items: center; justify-content: space-between; min-height: 53px; gap: 12px; padding: 8px 19px; border-bottom: 1px solid var(--line); }
.conversation-title { min-width: 0; }
.conversation-head h1 { margin: 0 0 3px; font-size: 15px; font-weight: 800; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.context-line { display: flex; align-items: center; gap: 5px; color: var(--soft); font-size: 11px; font-weight: 680; }
.workspace-archived { color: var(--amber); padding-inline-start: 3px; }
.workspace-rebind { border: 0; border-radius: 5px; background: var(--accent-tint); color: var(--accent); padding: 3px 6px; white-space: nowrap; }
.conversation-actions { display: flex; align-items: center; flex: none; gap: 7px; }
.participant-count { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.transcript { flex: 1; min-height: 0; overflow: auto; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.transcript:focus-visible { outline-offset: -3px; }
.timeline { width: min(100%, 832px); min-height: 100%; margin-inline: auto; padding: 23px clamp(16px, 4vw, 38px) 23px; display: flex; flex-direction: column; gap: 24px; overflow-wrap: anywhere; }
.welcome { width: min(100%, 700px); margin: auto; padding: 26px 0; }
.home-welcome { text-align: left; padding-inline: clamp(3px, 5vw, 35px); }
.welcome-mark { width: 55px; height: auto; display: block; margin-bottom: 23px; }
.welcome :where(h1, h2) { font-size: clamp(29px, 4.2vw, 48px); font-weight: 760; letter-spacing: -.04em; line-height: 1.2; margin: 0 0 12px; text-wrap: balance; }
.welcome p { font-size: 15px; line-height: 1.75; color: var(--muted); margin: 0 0 23px; max-width: 60ch; }
.welcome .primary-button { align-self: start; min-height: 43px; padding-inline: 15px; }
.supported-agents { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 16px; margin-top: 33px; }
.supported-agents a { display: flex; align-items: center; gap: 6px; min-height: 30px; font-size: 12px; font-weight: 650; color: var(--muted); text-decoration: none; }
.supported-agents a:hover { color: var(--text); text-decoration: underline; }
dialog .supported-agents { margin-top: 14px; }
.conversation[data-empty="true"] { justify-content: center; }
.conversation[data-empty="true"] .conversation-head { position: absolute; z-index: 1; top: 0; left: 0; right: 0; }
.conversation[data-empty="true"] .transcript { flex: 0 1 auto; min-height: auto; overflow: visible; }
.conversation[data-empty="true"] .timeline { padding-bottom: 0; min-height: auto; }
.thread-welcome { margin: 0; padding: 9px 0 0; }
.thread-welcome p { margin-bottom: 17px; }
.older-button { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--muted); padding: 7px 14px; align-self: center; }
.older-button:hover { border-color: var(--accent); }

.turn { display: flex; gap: 12px; width: 100%; }
.arrive { animation: appear 210ms var(--ease) both; }
@keyframes appear { from { opacity: .72; transform: translateY(5px); } }
.user-turn { justify-content: flex-end; }
.user-main { max-width: min(84%, 555px); }
.user-mark { display: none; }
.user-turn .message-byline { justify-content: flex-end; }
.turn-main { min-width: 0; flex: 1; }
.message-byline { display: flex; align-items: center; gap: 7px; min-height: 21px; margin-bottom: 5px; color: var(--soft); font-size: 12px; }
.message-byline strong { color: var(--text); font-weight: 800; font-size: 13px; }
.message-byline time { font-variant-numeric: tabular-nums; font-size: 11px; }
.user-bubble { background: var(--rail); padding: 10px 14px; border-radius: 14px 14px 4px 14px; line-height: 1.65; white-space: pre-wrap; }
.agent-mark { width: 35px; height: 35px; display: inline-grid; place-items: center; flex: none; overflow: hidden; border-radius: 9px; color: var(--muted); background: var(--field); }
.agent-mark img { width: 68%; height: 68%; object-fit: contain; display: block; }
.agent-mark[data-brand="laintas"] img { width: 100%; height: 100%; }
.agent-mark.small { width: 22px; height: 22px; border-radius: 6px; }
.agent-mark:is([data-brand="codex"], [data-brand="claude"], [data-brand="opencode"]) { background: #f5f5f0; }
.turn-status, .row-status { display: inline-flex; align-items: center; gap: 5px; color: var(--soft); font-size: 11px; font-weight: 690; }
.turn-status::before, .row-status::before { content: ''; }
.turn-status[data-status="running"], .agent-row[data-status="running"] .row-status { color: var(--accent); }
.turn-status[data-status="done"], .agent-row[data-status="done"] .row-status { color: var(--green); }
.turn-status[data-status="failed"], .agent-row[data-status="failed"] .row-status { color: var(--red); }
.agent-content { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.agent-message { color: var(--text); font-size: 15px; line-height: 1.75; }
.agent-message > :first-child { margin-top: 0; }
.agent-message > :last-child { margin-bottom: 0; }
.agent-message :where(p, ul, ol, pre, blockquote, table, h3) { margin: 0 0 12px; }
.agent-message :where(ul, ol) { padding-left: 22px; }
.agent-message li { margin: 3px 0; }
.agent-message code { background: var(--field); border-radius: 4px; padding: 2px 4px; font-size: .9em; }
.agent-message pre { overflow-x: auto; background: var(--field); padding: 13px; border-radius: 8px; line-height: 1.6; }
.agent-message pre code { padding: 0; }
.agent-message blockquote { border-left: 1px solid var(--line); margin-inline: 0; padding-left: 12px; color: var(--muted); }
.agent-message table { display: block; overflow: auto; border-collapse: collapse; }
.agent-message :where(th, td) { padding: 5px 9px; border: 1px solid var(--line); text-align: start; }
.agent-message th { background: var(--field); }
.message-actions { display: flex; }
.message-actions .icon-button { width: 28px; height: 28px; }

.timeline-card { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.timeline-card > summary, .approval-head { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 10px; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.timeline-card > summary > svg:last-child { color: var(--soft); }
.timeline-card[open] > summary > svg:last-child { transform: rotate(180deg); }
.card-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 7px; background: var(--field); color: var(--muted); }
.card-summary { flex: 1; min-width: 0; }
.card-summary strong, .card-summary small { display: block; }
.card-summary strong { font-size: 13px; font-weight: 780; }
.card-summary small { color: var(--soft); font-size: 12px; margin-top: 2px; }
.approval-card[data-state="pending"] { border-color: color-mix(in srgb, var(--amber) 36%, var(--line)); }
.approval-card[data-state="pending"] .card-icon, .approval-card[data-state="pending"] .card-summary small { color: var(--amber); }
.approval-card[data-state="pending"] .card-icon { background: var(--amber-soft); }
.approval-card[data-state="allowed"] .card-icon { color: var(--green); background: var(--green-soft); }
.approval-actions { display: flex; gap: 7px; flex-wrap: wrap; padding: 2px 10px 10px; }
.approval-actions:empty { display: none; }
.approval-actions button { min-height: 34px; font-size: 13px; }
.approval-error { margin: 0 10px 8px; font-size: 12px; color: var(--red); }
.tool-text, .diff, .resource, .plan-text { margin: 0 9px 9px; }
.tool-text, .resource pre, .diff pre, .plan-text { background: var(--field); white-space: pre-wrap; overflow: auto; max-height: 270px; border-radius: 7px; padding: 8px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.agent-content > .resource { margin: 0; }
.resource { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 8px; }
.resource pre { margin: 0; width: 100%; }
.diff { border-radius: 7px; overflow: hidden; }
.diff summary { background: var(--field); color: var(--muted); font: 12px/1.5 "IBM Plex Mono", Consolas, monospace; display: flex; align-items: center; gap: 6px; padding: 7px 8px; }
.diff pre { margin: 0; background: var(--paper); white-space: pre; }
.diff pre span { display: block; }
.diff-counts { display: flex; gap: 5px; margin-inline-start: auto; }
.diff-add { color: var(--green); background: var(--green-soft); }
.diff-del { color: var(--red); background: var(--red-soft); }
.plan-steps { list-style: none; padding: 0 4px; margin: 0 10px 10px; color: var(--muted); }
.plan-steps li { display: flex; gap: 6px; align-items: start; padding: 3px 0; }
.plan-steps li[data-status="completed"] svg { color: var(--green); }
.turn-detail { display: flex; gap: 6px; align-items: center; padding: 7px 9px; margin: 0; border-radius: 7px; background: var(--field); color: var(--muted); font-size: 13px; }

.composer-area { position: relative; flex: none; width: min(100%, 832px); margin-inline: auto; padding: 3px clamp(16px, 4vw, 38px) 16px; }
.composer { position: relative; display: flex; align-items: center; gap: 7px; background: var(--paper); border: 1px solid var(--line); border-radius: 26px; padding: 6px 7px 6px 9px; transition: border-color var(--fast); }
.composer:focus-within { border-color: var(--accent); }
.composer textarea { display: block; min-width: 0; flex: 1; min-height: 31px; max-height: min(220px, 30vh); resize: none; border: 0; outline: 0; padding: 3px 1px; color: var(--text); background: transparent; font-size: 15px; line-height: 1.55; }
.composer-hint { padding: 5px 5px 0; color: var(--soft); font-size: 12px; text-align: end; }
.composer-hint:empty { display: none; }
.approval-jump { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 3px 8px; border: 0; border-radius: 6px; background: var(--amber-soft); color: var(--amber); font-weight: 700; }
.slash-popup { position: absolute; z-index: 3; bottom: calc(100% + 4px); inset-inline: clamp(16px, 4vw, 38px); padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); box-shadow: var(--shadow); }
.slash-heading { padding: 7px 9px; font-size: 12px; font-weight: 750; color: var(--muted); }
.slash-options { max-height: min(240px, 28dvh); overflow: auto; overscroll-behavior: contain; }
.slash-option { display: grid; grid-template-columns: minmax(72px, max-content) minmax(0, 1fr); align-items: start; gap: 10px; padding: 8px 9px; border-radius: 7px; cursor: pointer; font-size: 13px; overflow-wrap: anywhere; }
.slash-option[aria-selected="true"], .slash-option:hover { background: var(--accent-tint); }
.slash-option code { color: var(--accent); font-weight: 700; }
.slash-option small { display: block; margin-top: 2px; color: var(--soft); }
#slash-status { margin: 0; padding: 6px 9px 9px; color: var(--muted); font-size: 12px; }
.target-line { position: relative; flex: none; }
.target-pill { display: flex; align-items: center; gap: 4px; min-height: 31px; padding: 3px 4px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 16px; font-size: 12px; font-weight: 700; }
.target-pill:hover { background: var(--field); color: var(--text); }
.target-menu { position: absolute; z-index: 4; bottom: calc(100% + 7px); left: 0; min-width: 185px; padding: 4px; border-radius: 9px; background: var(--paper); box-shadow: var(--shadow); }
.target-menu button { width: 100%; display: flex; gap: 7px; align-items: center; padding: 6px 7px; min-height: 36px; border: 0; border-radius: 6px; background: transparent; text-align: left; white-space: nowrap; }
.target-menu button:hover, .target-menu button[aria-checked="true"] { background: var(--field); }
.target-menu button > span:nth-child(2) { margin-inline-end: auto; }
.send-button { padding: 0; width: 34px; height: 34px; min-height: 34px; flex: none; border-radius: 50%; }
.cancel-button { display: grid; place-items: center; padding: 0; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 8px; background: var(--red-soft); color: var(--red); }
.latest { position: absolute; top: -43px; left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--muted); box-shadow: 0 3px 12px #17284620; }
.floating-stop { position: absolute; top: -43px; right: clamp(16px, 4vw, 38px); display: inline-flex; align-items: center; gap: 6px; height: 35px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--red-soft); color: var(--red); font-size: 13px; box-shadow: 0 3px 12px #17284620; cursor: pointer; }
.floating-stop:disabled { opacity: .55; cursor: default; }
.turn-target { color: var(--muted); font-size: 12px; font-weight: 400; }
.turn-command { padding: 0 7px; border-radius: 999px; background: var(--accent-tint); color: var(--accent); font-size: 11px; }
.context-note { margin: 12px auto; padding: 4px 12px; width: fit-content; max-width: 92%; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); font-size: 12px; text-align: center; }
.approval-timer { margin-left: auto; color: var(--red); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.content-image { display: block; max-width: 100%; border-radius: 8px; }
.tool-raw { margin: 0 10px 10px; }
.tool-raw > summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.tool-raw pre { overflow: auto; max-height: 240px; margin: 6px 0 0; font-size: 12px; white-space: pre-wrap; word-break: break-word; }
.diff-gap { color: var(--muted); }
.diff-note { margin: 6px 10px; color: var(--red); font-size: 12px; }
.notice { padding: 7px 9px; margin-bottom: 6px; border-radius: 7px; color: var(--red); background: var(--red-soft); font-size: 13px; }

.agents { position: relative; z-index: 2; display: flex; flex-direction: column; padding: 7px; min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.agent-list { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.agent-row { position: relative; display: flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); transition: background-color var(--fast), border-color var(--fast); }
.agent-row:has(.agent-select[aria-pressed="true"]) { background: var(--accent-tint); border-color: var(--accent); }
.agent-row:hover:not(:has(.agent-select[aria-pressed="true"])) { background: var(--field); }
.agent-select { position: relative; display: grid; place-items: center; width: 100%; height: 100%; border: 0; border-radius: 8px; background: transparent; padding: 4px; }
.agent-select .agent-mark { width: 30px; height: 30px; border-radius: 7px; }
.agent-status-dot { position: absolute; right: 3px; bottom: 3px; width: 9px; height: 9px; border: 2px solid var(--paper); border-radius: 50%; color: var(--accent); background: currentColor; }
.agent-row[data-status="done"] .agent-status-dot { color: var(--green); }
.agent-row[data-status="failed"] .agent-status-dot { color: var(--red); }
.agent-info { position: absolute; right: 0; top: 0; width: 16px; height: 17px; padding: 0; opacity: 0; background: var(--paper); }
.agent-row:hover .agent-info, .agent-row:focus-within .agent-info { opacity: 1; }
.agent-row.dragging { opacity: .55; cursor: grabbing; }
.agent-row.drag-over { border-color: var(--accent); }
.add-agent { width: 44px; height: 41px; border: 1px dashed var(--line); background: var(--paper); }
.agent-tooltip { position: absolute; right: calc(100% + 8px); top: 1px; display: grid; gap: 4px; padding: 8px 10px; min-width: 125px; width: max-content; max-width: 210px; background: var(--paper); box-shadow: var(--shadow); border-radius: 8px; color: var(--muted); opacity: 0; pointer-events: none; transform: translateX(4px); transition: opacity var(--fast), transform var(--fast); z-index: 2; }
.agent-tooltip strong { color: var(--text); }
.agent-tooltip code { font-size: 11px; }
@media (hover: hover) and (min-width: 761px) {
  .agent-row:has(.agent-select:hover):not(.dragging) .agent-tooltip { transform: none; opacity: 1; transition-delay: 280ms; }
}

dialog { width: min(94vw, 480px); max-width: 100%; max-height: min(90dvh, 690px); overflow: auto; border: 1px solid var(--line); border-radius: 13px; padding: 0; background: var(--paper); color: var(--text); box-shadow: var(--shadow); }
dialog[open] { animation: appear 175ms var(--ease) both; }
dialog::backdrop { background: #14254270; }
.dialog-shell { padding: 17px 18px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.dialog-head h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.025em; }
.dialog-note { color: var(--muted); line-height: 1.65; }
.dialog-form { display: grid; gap: 11px; }
.dialog-actions { display: flex; justify-content: flex-end; margin-top: 7px; }
.field { display: grid; gap: 4px; font-weight: 700; color: var(--muted); }
.field :where(input, select) { min-height: 41px; width: 100%; padding: 7px 9px; border-radius: 7px; border: 1px solid var(--line); background: var(--field); color: var(--text); }
.profile-options { border: 1px solid var(--line); border-radius: 8px; margin: 0; padding: 6px 9px 9px; }
.profile-options legend { color: var(--muted); font-weight: 700; }
.profile-options label { display: flex; gap: 7px; align-items: center; min-height: 34px; }
.profile-options input { accent-color: var(--accent); }
.form-error { color: var(--red); }
.form-error:empty { display: none; }
.action-list, .profile-list { display: grid; gap: 5px; }
.action-list :where(button, a), .profile-choice { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--field); color: var(--text); text-align: left; text-decoration: none; }
.action-list :where(button, a) > svg:last-child, .profile-choice > svg:last-child { margin-inline-start: auto; color: var(--soft); }
.action-list :where(button, a):hover, .profile-choice:hover:not(:disabled) { border-color: var(--accent); }
.action-list .danger-text, .action-list .danger-text svg { color: var(--red); }
.primary-button.danger-button { background: var(--red); color: var(--paper); }
.primary-button.danger-button:hover:not(:disabled) { background: color-mix(in srgb, var(--red) 90%, var(--text)); }
.session-action-title { overflow-wrap: anywhere; }
.confirm-actions { gap: 8px; }
.profile-choice strong, .profile-choice small { display: block; }
.profile-choice small { margin-top: 2px; color: var(--muted); }
.agent-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 10px; margin: 0 0 12px; }
.agent-facts :where(dt, dd) { margin: 0; overflow-wrap: anywhere; }
.agent-facts dt { color: var(--muted); }
.connector-link { display: inline-flex; gap: 7px; align-items: center; font-weight: 730; min-height: 35px; }
.connector-platform { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.connector-platform select { min-height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; background: var(--field); color: var(--text); font: inherit; }
.connector-command { background: var(--field); padding: 11px; overflow: auto; border-radius: 8px; line-height: 1.65; font-size: 13px; }
.connector-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.connector-status { font-size: 13px; color: var(--muted); }
.text-button { border: 0; padding: 7px; background: transparent; color: var(--accent); }
.host-row { display: flex; gap: 9px; align-items: start; padding: 9px 0; border-block-end: 1px solid var(--line); }
.host-row > .icon-button { margin-inline-start: auto; }
.host-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--field); display: grid; place-items: center; color: var(--muted); }
.host-row small { margin-inline-start: 8px; color: var(--soft); }
.host-row small[data-online="true"] { color: var(--green); }
.host-folders { margin-top: 3px; color: var(--muted); font-size: 12px; }

@media (max-height: 700px) and (min-width: 761px) {
  .agent-list { overflow: auto; scrollbar-width: thin; }
  .agent-tooltip { display: none; }
}
@media (max-width: 760px) {
  #connector-guide { width: 30px; }
  :root { --header: 53px; }
  .topbar { padding-inline: 7px; gap: 5px; }
  .brand { font-size: 14px; gap: 5px; }
  .brand-mark { width: 29px; }
  .mobile-history { display: inline-grid; }
  .topbar-right { gap: 4px; }
  .topbar-right .connection { display: none; }
  .topbar .site-account-trigger { width: 34px; height: 34px; }
  .topbar .site-account-avatar { width: 30px; height: 30px; }
  .topbar .site-signin { min-height: 34px; padding-inline: 9px; }
  .shell, .shell.no-session { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 0; padding: 0; }
  .shell.no-session { grid-template-rows: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: var(--header) auto 0 0; z-index: 5; width: min(85vw, 293px); padding: 13px 13px 8px; border-radius: 0 10px 0 0; transform: translateX(-103%); opacity: 0; transition: transform 230ms var(--ease), opacity var(--fast); }
  .history-open .sidebar { transform: none; opacity: 1; }
  .history-backdrop { display: block; position: fixed; inset: var(--header) 0 0; z-index: 4; border: 0; background: #14254269; }
  .conversation { border: 0; border-radius: 0; }
  .conversation-head { min-height: 53px; padding: 5px 13px; }
  .conversation-head h1 { font-size: 14px; }
  .participant-count { display: none; }
  .timeline { padding: 16px 13px 12px; gap: 17px; }
  .turn { gap: 7px; }
  .agent-turn > .agent-mark { width: 28px; height: 28px; border-radius: 7px; }
  .agent-message { font-size: 14px; }
  .welcome { padding: 15px 6px 11px; }
  .welcome :where(h1, h2) { font-size: clamp(28px, 7.5vw, 38px); }
  .welcome p { font-size: 14px; }
  .welcome-mark { margin-bottom: 17px; }
  .thread-welcome { padding: 5px 0 0; }
  .composer-area { padding: 3px 9px 7px; }
  .slash-popup { inset-inline: 9px; }
  .composer { gap: 5px; padding: 5px 6px; }
  .composer textarea { font-size: 16px; min-height: 30px; }
  .composer-hint { font-size: 11px; }
  .target-pill .target-name { display: none; }
  .agents { flex-direction: row; align-items: stretch; padding: 3px 10px calc(5px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line); border-radius: 0; }
  .agent-list { flex: 1; min-width: 0; flex-direction: row; justify-content: flex-start; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding: 3px 1px; }
  .agent-row { flex: 0 0 auto; height: 39px; min-width: 46px; }
  .agent-select { touch-action: pan-y; user-select: none; }
  .agent-info { opacity: 1; width: 14px; height: 14px; right: 1px; top: 1px; }
  .agent-info svg { width: 10px; }
  .add-agent { width: 43px; height: 38px; }
  .agent-tooltip { display: none; }
}
@media (max-width: 350px) {
  .topbar [data-laintas-preferences].lnp-controls > button.lnp-language { width: 34px; padding: 0; }
  .topbar .lnp-language-code, .topbar .lnp-language .lnp-icon-small, .topbar .site-signin svg { display: none; }
  .brand { font-size: 12px; }
  .topbar-right { gap: 1px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
