:root {
  --bg: #181818;
  --bg-deep: #121211;
  --sidebar: #1d2026;
  --surface: #20201f;
  --surface-2: #242423;
  --surface-3: #2b2b29;
  --surface-hover: #2c2d30;
  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.13);
  --text: #f2f0e9;
  --text-soft: #c8c5bd;
  --muted: #96938c;
  --faint: #6d6a64;
  --accent: #d9f99d;
  --accent-ink: #17200d;
  --green: #78d68b;
  --amber: #e7bd67;
  --red: #ef8f88;
  --blue: #8fb9ff;
  --violet: #b9a2ff;
  --sidebar-width: 292px;
  --inspector-width: 336px;
  --topbar-height: 66px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 17px;
  --shadow-lg: 0 24px 72px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
}

body {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

button:not(:disabled),
select:not(:disabled) {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid rgba(217, 249, 157, 0.75);
  outline-offset: 2px;
}

button:disabled,
textarea:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.icon-sprite {
  position: fixed;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--inspector-width);
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
}

.sidebar {
  grid-column: 1;
  grid-row: 1;
  z-index: 20;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-height);
  padding: 0 12px 0 15px;
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 7px 5px;
  color: var(--text);
  background: transparent;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 23px;
  height: 23px;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(217, 249, 157, 0.3);
  border-radius: 7px;
  background: rgba(217, 249, 157, 0.08);
}

.brand-mark i {
  display: block;
  border-radius: 1.5px;
  background: var(--accent);
}

.brand-mark i:nth-child(2),
.brand-mark i:nth-child(3) {
  opacity: 0.52;
}

.build-tag,
.mock-chip {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 6px;
  border: 1px solid rgba(217, 249, 157, 0.16);
  border-radius: 5px;
  color: #b9c69e;
  background: rgba(217, 249, 157, 0.055);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  transition: color 120ms ease, background 120ms ease;
}

.icon-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.icon-button.compact {
  width: 29px;
  height: 29px;
  border-radius: 7px;
}

.icon-button.compact svg {
  width: 16px;
  height: 16px;
}

.host-trigger {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  width: calc(100% - 20px);
  margin: 2px 10px 10px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  transition: background 120ms ease, border-color 120ms ease;
}

.host-trigger:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.045);
}

.host-trigger > svg {
  width: 15px;
  color: var(--faint);
}

.host-glyph {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  color: #ddd9ce;
  background: linear-gradient(145deg, #393833, #262622);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  font-size: 12px;
  font-weight: 750;
}

.host-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.host-copy strong,
.host-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-copy strong {
  font-size: 12.5px;
  font-weight: 620;
}

.host-copy small {
  color: var(--muted);
  font-size: 10.5px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--faint);
  box-shadow: 0 0 0 2px rgba(109, 106, 100, 0.1);
}

.status-dot.online,
.status-dot.idle,
.status-dot.completed {
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(120, 214, 139, 0.12);
}

.status-dot.running {
  background: var(--blue);
  box-shadow: 0 0 0 2px rgba(143, 185, 255, 0.14);
  animation: pulse 1.5s ease-out infinite;
}

.status-dot.attention,
.status-dot.interrupted,
.status-dot.reconnecting,
.status-dot.uncertain {
  background: var(--amber);
  box-shadow: 0 0 0 2px rgba(231, 189, 103, 0.13);
}

.status-dot.offline,
.status-dot.error {
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(239, 143, 136, 0.12);
}

.status-dot.mock {
  background: var(--violet);
  box-shadow: 0 0 0 2px rgba(185, 162, 255, 0.12);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(143, 185, 255, 0.42); }
  70% { box-shadow: 0 0 0 7px rgba(143, 185, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(143, 185, 255, 0); }
}

.primary-action {
  display: flex;
  align-items: center;
  gap: 9px;
  width: calc(100% - 20px);
  height: 38px;
  margin: 0 10px 9px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  color: var(--text);
  background: #242421;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
  font-size: 12.5px;
  font-weight: 590;
  text-align: left;
}

.primary-action:hover {
  background: #2a2a26;
}

.primary-action svg {
  width: 16px;
}

kbd {
  margin-left: auto;
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--faint);
  background: rgba(0, 0, 0, 0.12);
  font: 9px/1.6 inherit;
}

.search-box {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  height: 36px;
  margin: 0 10px 9px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--faint);
  background: rgba(255, 255, 255, 0.035);
}

.sidebar-utility {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin: 0 10px 9px;
}

.sidebar-utility .search-box {
  grid-template-columns: 15px minmax(0, 1fr);
  height: 34px;
  min-width: 0;
  margin: 0;
  padding: 0 7px;
  gap: 5px;
}

.sidebar-utility .search-box kbd {
  display: none;
}

.search-box:focus-within {
  border-color: rgba(217, 249, 157, 0.26);
  background: rgba(255, 255, 255, 0.05);
}

.search-box svg {
  width: 15px;
}

.search-box input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text-soft);
  background: transparent;
  font-size: 12px;
}

.search-box input::placeholder {
  color: var(--faint);
}

.sidebar-scroll,
.inspector-scroll,
.conversation {
  scrollbar-color: #42413d transparent;
  scrollbar-width: thin;
}

.sidebar-scroll {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 8px 18px;
}

.nav-shortcuts {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 0;
  border: 0;
}

.sidebar-utility .nav-shortcuts {
  display: grid;
  grid-column: span 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.nav-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 34px;
  padding: 0 8px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  text-align: left;
}

.sidebar-utility .nav-row {
  grid-template-columns: 14px auto auto;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 5px;
  font-size: 10px;
  white-space: nowrap;
}

.sidebar-utility .nav-row svg {
  width: 13px;
}

.sidebar-utility .nav-row b {
  font-size: 9px;
}

.nav-row:hover,
.nav-row.active {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.045);
}

.nav-row.active {
  color: var(--text);
}

.nav-row svg {
  width: 15px;
}

.nav-row b {
  color: var(--faint);
  font-size: 10px;
  font-weight: 550;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  padding: 7px 4px 3px 9px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-actions {
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.catalog-scope-button {
  position: relative;
}

.catalog-scope-button::after {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 5px;
  height: 5px;
  border: 1px solid var(--sidebar);
  border-radius: 50%;
  background: var(--amber);
  content: "";
}

.catalog {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.project-block {
  min-width: 0;
}

.project-actions {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 1px;
  margin-right: 2px;
}

.project-actions .icon-button {
  width: 29px;
  height: 29px;
  color: var(--muted);
}

.project-actions .icon-button:hover,
.project-actions .icon-button[aria-expanded="true"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.project-actions .project-compose svg {
  width: 16px;
  height: 16px;
}

.project-empty-note {
  margin: 3px 0 9px;
  padding: 4px 9px;
  color: var(--faint);
  font-size: 11px;
}

.project-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  width: 100%;
  height: 32px;
  padding: 0 6px;
  border-radius: 7px;
  color: var(--text-soft);
  background: transparent;
  text-align: left;
}

.project-row:hover {
  background: rgba(255, 255, 255, 0.035);
}

.project-row svg {
  width: 15px;
  color: var(--muted);
}

.project-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 620;
}

.project-row small {
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--faint);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.project-row small .status-dot {
  width: 6px;
  height: 6px;
  margin: 0 0 0 4px;
  vertical-align: 1px;
}

.project-row .disclosure {
  width: 14px;
  transition: transform 140ms ease;
}

.project-block.collapsed .project-row .disclosure {
  transform: rotate(-90deg);
}

.thread-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 7px 16px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.055);
}

.project-block.collapsed .thread-list {
  display: none;
}

.thread-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.thread-row:hover {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.035);
}

.thread-row.active {
  color: var(--text);
  background: #34353a;
}

.thread-row-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.thread-row-copy strong,
.thread-row-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-row-copy strong {
  font-size: 13px;
  font-weight: 530;
}

.thread-row-copy small {
  display: none;
}

.thread-row.active .thread-row-copy small {
  color: var(--muted);
}

.thread-markers {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding-top: 2px;
}

.thread-markers svg {
  width: 11px;
  height: 11px;
  color: var(--faint);
}

.thread-markers .status-dot {
  width: 6px;
  height: 6px;
  margin: 3px 0 0;
}

.empty-search {
  display: grid;
  place-items: center;
  padding: 38px 12px;
  color: var(--faint);
  text-align: center;
}

.empty-search svg {
  width: 22px;
  height: 22px;
  margin-bottom: 10px;
}

.empty-search strong {
  color: var(--muted);
  font-size: 12px;
}

.empty-search small {
  margin-top: 3px;
  font-size: 10px;
}

.sidebar-foot {
  padding: 8px 10px 10px;
  border-top: 1px solid var(--border);
}

.profile-row {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) 17px;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px;
  border-radius: 8px;
  color: var(--text-soft);
  background: transparent;
  text-align: left;
}

.profile-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.profile-avatar {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(185, 162, 255, 0.22);
  border-radius: 50%;
  color: #d5caff;
  background: rgba(185, 162, 255, 0.08);
  font-size: 9px;
  font-weight: 750;
}

.profile-row > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.profile-row strong {
  font-size: 11px;
  font-weight: 610;
}

.profile-row small {
  color: var(--faint);
  font-size: 9.5px;
}

.profile-row > svg {
  width: 14px;
  color: var(--faint);
}

.workspace {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  grid-template-rows: var(--topbar-height) auto auto minmax(0, 1fr) auto;
  background:
    radial-gradient(circle at 50% -20%, rgba(255, 255, 255, 0.025), transparent 38%),
    var(--bg);
}

.topbar {
  grid-row: 1;
  z-index: 11;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 0 16px 0 21px;
  border-bottom: 1px solid var(--border);
  background: var(--sidebar);
  backdrop-filter: blur(16px);
}

.mobile-menu {
  display: none;
}

.task-heading {
  min-width: 0;
  flex: 1;
}

.breadcrumb {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-size: 9.5px;
}

.breadcrumb span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 3px;
}

.title-row h1 {
  min-width: 0;
  margin: 1px 0 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 640;
  letter-spacing: -0.008em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 25px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 99px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 10px;
  white-space: nowrap;
}

.state-pill > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.state-pill.running > span {
  background: var(--blue);
  animation: pulse 1.5s ease-out infinite;
}

.state-pill.attention > span,
.state-pill.interrupted > span,
.state-pill.uncertain > span,
.state-pill.reconnecting > span {
  background: var(--amber);
}

.state-pill.error > span,
.state-pill.offline > span {
  background: var(--red);
}

.connection-banner,
.unknown-banner {
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 36px;
  padding: 8px 18px;
  border-bottom: 1px solid rgba(231, 189, 103, 0.17);
  color: #d6bd86;
  background: rgba(101, 75, 27, 0.19);
  font-size: 11px;
  text-align: center;
}

.connection-banner.error {
  border-color: rgba(239, 143, 136, 0.17);
  color: #e6aaa5;
  background: rgba(111, 46, 42, 0.18);
}

.connection-banner {
  grid-row: 2;
}

.unknown-banner {
  grid-row: 3;
}

.connection-banner svg,
.unknown-banner svg {
  width: 15px;
}

.unknown-banner {
  justify-content: space-between;
  border-color: rgba(231, 189, 103, 0.22);
  background: rgba(91, 67, 22, 0.26);
}

.banner-copy {
  display: flex;
  align-items: center;
  gap: 8px;
}

.banner-action {
  padding: 4px 8px;
  border: 1px solid rgba(231, 189, 103, 0.25);
  border-radius: 6px;
  color: #e8c57d;
  background: rgba(231, 189, 103, 0.07);
  font-size: 10px;
}

.conversation {
  /* Keep the scroll track fixed when either status banner is hidden. */
  grid-row: 4;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  padding: 31px clamp(22px, 5vw, 66px) 38px;
}

.conversation-inner {
  width: min(100%, 820px);
  margin: 0 auto;
}

.thread-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 2px 0 35px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.thread-intro h2 {
  margin: 0 0 7px;
  color: var(--text);
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 620;
  letter-spacing: -0.025em;
}

.thread-intro p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.identity-chip {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid rgba(185, 162, 255, 0.18);
  border-radius: 6px;
  color: #b9aadf;
  background: rgba(185, 162, 255, 0.05);
  font: 9px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: nowrap;
}

.message-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0 0 42px;
}

.message-group.user {
  grid-template-columns: minmax(0, 1fr);
  justify-items: end;
  margin-top: 5px;
}

.message-avatar {
  display: none;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--text-soft);
  background: var(--surface-2);
  font-size: 9px;
  font-weight: 750;
}

.message-main {
  min-width: 0;
}

.message-label {
  display: none;
  align-items: center;
  gap: 6px;
  height: 25px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 630;
}

.message-label time {
  color: var(--faint);
  font-weight: 450;
}

.message-card.user {
  width: fit-content;
  max-width: min(88%, 680px);
  padding: 12px 16px;
  border: 0;
  border-radius: 17px 17px 5px 17px;
  color: #f7f9ff;
  background: #204d88;
  font-size: 14px;
  line-height: 1.62;
}

.assistant-body {
  color: #dcdbd5;
  font-size: 14px;
  line-height: 1.76;
}

.assistant-body > :first-child {
  margin-top: 0;
}

.assistant-body > :last-child {
  margin-bottom: 0;
}

.assistant-body p {
  margin: 0 0 12px;
}

.assistant-body h3 {
  margin: 21px 0 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.assistant-body ul,
.assistant-body ol {
  margin: 8px 0 15px;
  padding-left: 21px;
}

.assistant-body li {
  margin: 4px 0;
}

.assistant-body code:not(.code-block code) {
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: #d7e6b5;
  background: rgba(255, 255, 255, 0.04);
  font: 0.92em/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.assistant-body a {
  color: #b9d6ff;
  text-underline-offset: 3px;
}

.code-block {
  margin: 15px 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: #0d0f0d;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  padding: 0 9px 0 12px;
  border-bottom: 1px solid var(--border);
  color: var(--faint);
  background: #151714;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 9.5px;
  text-transform: none;
  letter-spacing: normal;
}

.copy-button:hover {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.055);
}

.copy-button svg {
  width: 13px;
  height: 13px;
}

.code-block pre {
  margin: 0;
  overflow-x: auto;
  padding: 13px 14px 15px;
  color: #cad6c2;
  font: 11px/1.65 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  tab-size: 2;
}

.code-keyword { color: #c6a6ff; }
.code-string { color: #d8dc9d; }
.code-comment { color: #70786d; }
.code-function { color: #8fc7c0; }

.response-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  color: var(--faint);
  font-size: 9.5px;
}

.response-meta button {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  padding: 0;
  border-radius: 6px;
  color: var(--faint);
  background: transparent;
  font-size: inherit;
}

.response-meta button:hover {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
}

.response-meta svg {
  width: 14px;
  height: 14px;
}

.activity-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 3px;
}

.activity-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.activity-card[open] {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.025);
}

.activity-card summary {
  display: grid;
  min-height: 39px;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  cursor: pointer;
  list-style: none;
}

.activity-card summary::-webkit-details-marker {
  display: none;
}

.activity-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
}

.activity-icon svg {
  width: 14px;
  height: 14px;
}

.activity-title {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.activity-title strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-title small {
  overflow: hidden;
  color: var(--faint);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-result {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-size: 9px;
}

.activity-result.running { color: var(--blue); }
.activity-result.interrupted { color: var(--amber); }
.activity-result.error { color: var(--red); }
.activity-result.attention { color: var(--amber); }

.activity-result svg {
  width: 12px;
  height: 12px;
}

.activity-detail {
  margin: 0;
  overflow-x: auto;
  padding: 10px 12px 12px 43px;
  border-top: 1px solid var(--border);
  color: #aeb8aa;
  background: rgba(0, 0, 0, 0.16);
  font: 9.5px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
}

.run-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0 0;
  padding: 9px 10px;
  border: 1px solid rgba(143, 185, 255, 0.14);
  border-radius: 9px;
  color: #aebfda;
  background: rgba(53, 87, 139, 0.08);
  font-size: 10px;
}

.run-strip strong {
  color: #cad9ef;
  font-weight: 600;
}

.run-strip .elapsed {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  border-radius: 1px;
  vertical-align: -0.12em;
  background: var(--accent);
  animation: blink 0.85s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.approval-inline,
.error-inline,
.uncertain-inline,
.empty-state-card {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(231, 189, 103, 0.2);
  border-radius: 11px;
  background: rgba(99, 72, 24, 0.1);
}

.error-inline {
  border-color: rgba(239, 143, 136, 0.2);
  background: rgba(102, 42, 39, 0.1);
}

.uncertain-inline {
  border-style: dashed;
}

.approval-heading,
.inline-state-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.approval-heading svg,
.inline-state-heading svg {
  width: 17px;
  color: var(--amber);
}

.error-inline .inline-state-heading svg {
  color: var(--red);
}

.approval-heading strong,
.inline-state-heading strong {
  color: var(--text);
  font-size: 11px;
}

.approval-inline p,
.error-inline p,
.uncertain-inline p,
.empty-state-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10.5px;
}

.command-preview {
  margin: 10px 0;
  overflow-x: auto;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: #c8d4c1;
  background: rgba(0, 0, 0, 0.2);
  font: 10px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: nowrap;
}

.approval-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 10px;
}

.request-question {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 600;
}

.request-question input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  outline: 0;
  color: var(--text);
  background: rgba(0, 0, 0, 0.2);
  font-size: 11px;
  font-weight: 450;
}

.request-question input:focus {
  border-color: rgba(217, 249, 157, 0.34);
}

.request-question small {
  color: var(--faint);
  font-size: 9px;
  font-weight: 450;
}

.unsupported-request {
  border-style: dashed;
}

.mini-button,
.secondary-button,
.primary-button,
.danger-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
  font-size: 10.5px;
  font-weight: 600;
}

.mini-button:hover,
.secondary-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.075);
}

.primary-button {
  border-color: rgba(217, 249, 157, 0.2);
  color: var(--accent-ink);
  background: var(--accent);
}

.primary-button:hover {
  background: #e2ffac;
}

.danger-button {
  border-color: rgba(239, 143, 136, 0.18);
  color: #efaaa5;
  background: rgba(239, 143, 136, 0.07);
}

.context-note {
  display: flex;
  gap: 9px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid rgba(185, 162, 255, 0.13);
  border-radius: 9px;
  color: #aca3c5;
  background: rgba(185, 162, 255, 0.04);
  font-size: 10px;
}

.context-note svg {
  width: 15px;
  margin-top: 1px;
  color: var(--violet);
}

.jump-latest {
  position: absolute;
  z-index: 9;
  bottom: 145px;
  left: 50%;
  display: inline-flex;
  transform: translateX(-50%);
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  color: var(--text-soft);
  background: rgba(30, 30, 28, 0.93);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  font-size: 10px;
}

.composer-dock {
  grid-row: 5;
  min-width: 0;
  z-index: 10;
  padding: 8px clamp(20px, 5vw, 64px) env(safe-area-inset-bottom, 0px);
  background: linear-gradient(to bottom, rgba(24, 24, 24, 0), var(--bg) 18%, var(--bg));
}

.composer,
.composer-lock {
  width: min(100%, 820px);
  margin-right: auto;
  margin-left: auto;
}

.message-queue {display:flex;flex-direction:column;max-height:min(190px,20dvh);width:min(100%,820px);margin:0 auto 8px;border:1px solid var(--border);border-radius:12px;background:var(--surface);font-size:12px;overflow:hidden}
.queue-heading {display:flex;flex-shrink:0;align-items:center;justify-content:space-between;gap:8px;padding:6px 12px;color:var(--muted)}
.queue-heading strong {font-size:11px;font-weight:500}
.queue-heading>div {display:flex;gap:6px}
.message-queue ol {list-style:none;min-height:0;margin:0;padding:0 8px 5px;overflow:auto}
.message-queue li {display:flex;gap:8px;align-items:center;padding:5px 4px;border-top:1px solid var(--border)}
.queue-index {font-size:10px;color:var(--faint)}
.message-queue li p {flex:1;min-width:0;margin:0;white-space:pre-wrap;overflow-wrap:anywhere;max-height:4.5em;overflow:auto;line-height:1.5}
.message-queue li .icon-button {flex:0 0 28px;width:28px;height:28px}
.queue-notice {margin:0;padding:0 12px 8px;color:var(--muted);font-size:11px}
.send-mode {max-width:110px;padding:5px 6px;border:1px solid var(--border-strong);border-radius:7px;background:var(--surface-2);color:var(--text);font-size:11px}
.send-mode option {background:var(--surface-2);color:var(--text)}
@media(max-width:620px){.composer-tools:has(.send-mode:not([hidden])) .composer-tools-left{display:none}.composer-tools:has(.send-mode:not([hidden])) .composer-tools-right{width:100%;justify-content:flex-end}}

.composer {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 15px;
  background: var(--surface-2);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.composer:focus-within {
  border-color: rgba(217, 249, 157, 0.23);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.27), 0 0 0 1px rgba(217, 249, 157, 0.05);
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 51px;
  max-height: min(190px, 25dvh);
  resize: none;
  overflow-y: auto;
  padding: 14px 15px 8px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 12.5px;
  line-height: 1.55;
}

.composer textarea::placeholder {
  color: #77746e;
}

.composer-tools {
  display: flex;
  min-height: 43px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 7px 7px;
}

.composer-tools-left,
.composer-tools-right {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 3px;
}

.attach-button {
  width: 31px;
  height: 31px;
}

.setting-button {
  display: inline-flex;
  min-width: 0;
  max-width: 170px;
  height: 29px;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 9.5px;
}

.setting-button:hover,
.setting-button[aria-expanded="true"] {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.05);
}

.setting-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setting-button svg {
  width: 12px;
  height: 12px;
}

.composer-hint {
  margin-right: 4px;
  color: var(--faint);
  font-size: 9px;
}

.send-button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  color: var(--accent-ink);
  background: var(--accent);
}

.send-button:hover {
  background: #e2ffac;
}

.send-button:disabled {
  color: var(--faint);
  background: rgba(255, 255, 255, 0.055);
}

.send-button svg {
  width: 16px;
  height: 16px;
}

.send-button.stop {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.075);
}

.composer-lock {
  margin-bottom: 7px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(30, 30, 28, 0.92);
  font-size: 10px;
  text-align: center;
}

.inspector {
  grid-column: 3;
  grid-row: 1;
  z-index: 20;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--sidebar);
}

.inspector-head {
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 14px;
  border-bottom: 1px solid var(--border);
}

.inspector-tabs {
  display: flex;
  align-self: stretch;
  gap: 16px;
}

.inspector-tab {
  position: relative;
  padding: 0 2px;
  color: var(--faint);
  background: transparent;
  font-size: 11px;
  font-weight: 620;
}

.inspector-tab.active {
  color: var(--text-soft);
}

.inspector-tab.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  content: "";
}

.inspector-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 15px 13px 24px;
}

.inspector-section {
  margin-bottom: 18px;
}

.inspector-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 1px 8px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.inspector-section-title span:last-child {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.inspector-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
}

.host-health {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
}

.host-health .host-glyph {
  width: 34px;
  height: 34px;
}

.host-health-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.host-health-copy strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-health-copy small {
  color: var(--faint);
  font-size: 9px;
}

.health-label {
  color: var(--green);
  font-size: 9px;
}

.health-label.warning { color: var(--amber); }
.health-label.error { color: var(--red); }

.kv-list {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--border);
}

.kv-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  font-size: 9.5px;
}

.kv-row:last-child {
  border-bottom: 0;
}

.kv-row dt {
  color: var(--faint);
}

.kv-row dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text-soft);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kv-row dd.null-value {
  color: var(--amber);
}

.event-list {
  display: flex;
  flex-direction: column;
}

.event-row {
  position: relative;
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.event-row:last-child {
  border-bottom: 0;
}

.event-icon {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.event-icon svg {
  width: 12px;
  height: 12px;
}

.event-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.event-copy strong {
  overflow: hidden;
  color: var(--text-soft);
  font: 9.5px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-copy small,
.event-row time {
  color: var(--faint);
  font-size: 8.5px;
}

.event-row time {
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}

.scenario-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.scenario-button {
  display: flex;
  min-width: 0;
  min-height: 48px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
}

.scenario-button:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.045);
}

.scenario-button strong {
  font-size: 9.5px;
  font-weight: 610;
}

.scenario-button small {
  color: var(--faint);
  font-size: 8.5px;
}

.approval-panel {
  padding: 11px;
}

.approval-panel .approval-heading {
  margin-bottom: 6px;
}

.approval-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
}

.context-path {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 11px;
  color: var(--text-soft);
  font: 9.5px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  word-break: break-all;
}

.context-path svg {
  width: 14px;
  margin-top: 1px;
  color: var(--faint);
}

.capability-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px;
}

.capability-chip {
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  font-size: 8.5px;
}

.drawer-backdrop,
.inspector-backdrop {
  display: none;
}

.popover {
  position: fixed;
  z-index: 90;
  min-width: 210px;
  padding: 5px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(30, 30, 28, 0.98);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.popover[hidden] {
  display: none;
}

.popover button {
  display: grid;
  width: 100%;
  min-height: 34px;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  color: var(--text-soft);
  background: transparent;
  font-size: 10.5px;
  text-align: left;
}

.popover button:hover,
.popover button.selected {
  background: rgba(255, 255, 255, 0.055);
}

.popover button.selected::after {
  color: var(--accent);
  content: "✓";
}

.popover button svg {
  width: 14px;
}

.popover-label {
  display: block;
  padding: 6px 8px 5px;
  color: var(--faint);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.popover-note {
  margin: 4px 4px 2px;
  padding: 7px 8px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 8.5px;
  line-height: 1.45;
}

.task-menu {
  min-width: 165px;
}

.project-menu {
  width: 220px;
  min-width: 0;
  max-width: calc(100vw - 16px);
}

.project-menu .popover-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-menu button[data-project-action="remove"] {
  color: #d9aaa6;
}

.task-menu button[data-task-action="archive"] {
  color: #d9aaa6;
}

dialog {
  max-width: calc(100vw - 28px);
  padding: 0;
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: #1a1a18;
  box-shadow: var(--shadow-lg);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(3px);
}

.sheet-dialog {
  width: min(500px, calc(100vw - 28px));
  border-radius: 16px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 0;
}

.dialog-head h2 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 640;
  letter-spacing: -0.015em;
}

.dialog-eyebrow {
  color: var(--faint);
  font-size: 8.5px;
  font-weight: 680;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.dialog-intro {
  margin: 11px 18px 15px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.dialog-intro code,
.field-hint code {
  color: #cdd9b2;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.host-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 12px 12px;
}

.host-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.018);
  text-align: left;
}

.host-option:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.host-option.selected {
  border-color: rgba(217, 249, 157, 0.24);
  background: rgba(217, 249, 157, 0.045);
}

.host-option .host-glyph {
  width: 38px;
  height: 38px;
}

.host-option-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.host-option-copy strong {
  font-size: 11px;
  font-weight: 620;
}

.host-option-copy small {
  overflow: hidden;
  color: var(--faint);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-option-state {
  color: var(--muted);
  font-size: 9px;
}

.dialog-footnote {
  display: flex;
  gap: 8px;
  margin: 0 12px 12px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--faint);
  background: rgba(255, 255, 255, 0.025);
  font-size: 9px;
}

.dialog-footnote svg {
  width: 14px;
  margin-top: 1px;
}

.form-dialog form,
.compact-dialog form {
  padding-bottom: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 13px 18px;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 610;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  outline: 0;
  color: var(--text);
  background: #131312;
  font-size: 11px;
  font-weight: 450;
}

.form-field input,
.form-field select {
  height: 38px;
  padding: 0 10px;
}

#addProjectDialog {width:min(760px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto}
#existingProjectCandidateSelect {height:auto;max-height:min(52dvh,max(112px,calc(100dvh - 360px)));min-height:64px;padding:4px;font-size:12px}
#existingProjectCandidateSelect option {padding:7px 9px;line-height:1.5}
.existing-project-details {margin:12px 18px;padding:13px 15px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}
.existing-project-details>span {display:block;margin-bottom:5px;color:var(--muted);font-size:11px}
.existing-project-details>strong {font-size:14px;font-weight:600}
.existing-project-details>p {margin:6px 0 0;overflow-wrap:anywhere;font-size:12px;color:var(--muted)}

.form-field textarea {
  resize: vertical;
  min-height: 96px;
  padding: 10px;
  line-height: 1.55;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: rgba(217, 249, 157, 0.34);
}

.form-callout {
  display: flex;
  gap: 8px;
  margin: 13px 18px;
  padding: 9px 10px;
  border: 1px solid rgba(231, 189, 103, 0.14);
  border-radius: 8px;
  color: #bfa971;
  background: rgba(99, 72, 24, 0.08);
  font-size: 9px;
}

.form-callout svg {
  width: 14px;
  margin-top: 1px;
}

.form-callout code {
  color: #d6c28a;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.add-project-result {
  margin: 13px 18px;
  padding: 10px 11px;
  border: 1px solid rgba(120, 214, 139, 0.2);
  border-radius: 9px;
  color: #a8d9b1;
  background: rgba(52, 110, 67, 0.1);
  font-size: 9.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.add-project-result.warning {
  border-color: rgba(231, 189, 103, 0.2);
  color: #d4b978;
  background: rgba(99, 72, 24, 0.1);
}

.add-project-result.error {
  border-color: rgba(239, 143, 136, 0.2);
  color: #dda09a;
  background: rgba(111, 45, 41, 0.1);
}

.field-hint {
  margin: 8px 18px 13px;
  color: var(--faint);
  font-size: 9px;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 17px 18px 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 16px 18px 0;
}

.info-grid section {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.info-icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
}

.info-icon svg {
  width: 15px;
}

.info-grid h3 {
  margin: 10px 0 4px;
  color: var(--text-soft);
  font-size: 10.5px;
}

.info-grid p {
  margin: 0;
  color: var(--faint);
  font-size: 9.5px;
}

.compact-dialog {
  width: min(400px, calc(100vw - 28px));
  border-radius: 14px;
}

.toast-region {
  position: fixed;
  z-index: 120;
  right: 18px;
  bottom: 18px;
  display: flex;
  width: min(330px, calc(100vw - 28px));
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text-soft);
  background: rgba(34, 34, 31, 0.97);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  font-size: 10px;
  animation: toast-in 180ms ease both;
}

.toast svg {
  width: 15px;
  color: var(--green);
}

.toast.warning svg { color: var(--amber); }
.toast.error svg { color: var(--red); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(7px); }
}

@media (max-width: 1280px) {
  :root {
    --sidebar-width: 270px;
    --inspector-width: 314px;
  }

  .wide-only {
    display: none;
  }

  .composer-hint {
    display: none;
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .inspector {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 92vw);
    transform: translateX(102%);
    box-shadow: -24px 0 60px rgba(0, 0, 0, 0.35);
    transition: transform 180ms ease;
  }

  .app-shell.inspector-open .inspector {
    transform: translateX(0);
  }

  .app-shell.inspector-open .inspector-backdrop {
    position: fixed;
    z-index: 19;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, 0.42);
  }
}

@media (min-width: 1101px) {
  .app-shell.inspector-closed {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr) 0;
  }

  .app-shell.inspector-closed .inspector {
    display: none;
  }

  .inspector #closeInspector {
    display: none;
  }
}

@media (max-width: 820px) {
  :root {
    --topbar-height: 60px;
  }

  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace {
    grid-column: 1;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(330px, 88vw);
    transform: translateX(-102%);
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.38);
    transition: transform 180ms ease;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .app-shell.sidebar-open .drawer-backdrop {
    position: fixed;
    z-index: 19;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, 0.46);
  }

  .mobile-menu {
    display: inline-grid;
    flex: 0 0 auto;
  }

  .desktop-only {
    display: none;
  }

  .topbar {
    padding-left: 10px;
  }

  .conversation {
    padding-right: clamp(16px, 4.5vw, 34px);
    padding-left: clamp(16px, 4.5vw, 34px);
  }

  .composer-dock {
    padding-right: clamp(12px, 3.5vw, 25px);
    padding-left: clamp(12px, 3.5vw, 25px);
  }
}

@media (min-width: 821px) {
  .app-shell.sidebar-collapsed {
    grid-template-columns: 0 minmax(0, 1fr) var(--inspector-width);
  }

  .app-shell.sidebar-collapsed.inspector-closed {
    grid-template-columns: 0 minmax(0, 1fr) 0;
  }

  .app-shell.sidebar-collapsed .sidebar {
    display: none;
  }

  .app-shell.sidebar-collapsed .mobile-menu {
    display: inline-grid;
  }

  .app-shell.sidebar-collapsed.sidebar-open .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    width: var(--sidebar-width);
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.38);
  }

  .app-shell.sidebar-collapsed.sidebar-open .drawer-backdrop {
    position: fixed;
    z-index: 19;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, 0.35);
  }
}

@media (max-width: 620px) {
  :root {
    --topbar-height: 56px;
  }

  body {
    font-size: 13px;
  }

  .topbar {
    gap: 5px;
    padding-right: 8px;
  }

  .breadcrumb {
    display: none;
  }

  .title-row h1 {
    font-size: 12px;
  }

  .title-row .icon-button {
    display: none;
  }

  .state-pill {
    max-width: 96px;
    overflow: hidden;
    padding: 0 7px;
    text-overflow: ellipsis;
  }

  .mock-chip {
    display: none;
  }

  .connection-banner,
  .unknown-banner {
    align-items: flex-start;
    font-size: 9.5px;
    text-align: left;
  }

  .unknown-banner {
    flex-direction: column;
    gap: 5px;
  }

  .conversation {
    padding: 22px 14px 28px;
  }

  .thread-intro {
    flex-direction: column;
    gap: 11px;
    margin-bottom: 27px;
  }

  .thread-intro h2 {
    font-size: 18px;
  }

  .identity-chip {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .message-group {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-bottom: 34px;
  }

  .message-avatar {
    width: 23px;
    height: 23px;
    border-radius: 6px;
  }

  .message-card.user {
    max-width: 94%;
    font-size: 13.5px;
  }

  .assistant-body {
    font-size: 13.5px;
  }

  .activity-card summary {
    grid-template-columns: 25px minmax(0, 1fr);
  }

  .activity-result {
    grid-column: 2;
  }

  .activity-detail {
    padding-left: 12px;
  }

  .composer-dock {
    padding: 6px 8px env(safe-area-inset-bottom, 0px);
  }

  .composer {
    border-radius: 14px;
  }

  .composer textarea {
    min-height: 48px;
    padding: 12px 12px 7px;
    font-size: 12px;
  }

  .composer-tools {
    padding-right: 6px;
    padding-left: 5px;
  }

  .setting-button {
    max-width: 112px;
    padding: 0 5px;
    font-size: 8.8px;
  }

  #effortButton {
    display: inline-flex;
  }

  .jump-latest {
    bottom: 127px;
  }

  .inspector {
    top: 15vh;
    width: 100%;
    border-top: 1px solid var(--border-strong);
    border-left: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.4);
  }

  .inspector-head {
    height: 55px;
  }

  .sheet-dialog,
  .compact-dialog {
    width: 100%;
    max-width: 100%;
    margin: auto 0 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 17px 17px 0 0;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .host-option {
    min-height: 62px;
  }

  .toast-region {
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
  }

  .popover {
    max-width: calc(100vw - 16px);
  }
}

@media (max-width: 390px) {
  .state-pill {
    font-size: 0;
  }

  .state-pill > span {
    margin: 0;
  }

  .setting-button {
    max-width: 104px;
  }

  .attach-button {
    display: none;
  }
}

@media (max-height: 520px) {
  .workspace:has(.message-queue:not([hidden])) .conversation {
    padding-top: 0;
    padding-bottom: 0;
  }
  .conversation {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .composer-dock {
    padding-top: 5px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .composer textarea {
    max-height: max(48px, 20dvh);
  }

  .connection-banner,
  .unknown-banner,
  .composer-lock {
    min-height: 0;
    max-height: 10dvh;
    overflow-y: auto;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
#connectionBanner{grid-row:2}#unknownBanner{grid-row:3}.conversation{grid-row:4}.composer-dock{grid-row:5}@media(max-width:820px){.workspace{grid-column:1}}@media(min-width:821px) and (max-width:1100px){.app-shell.sidebar-collapsed,.app-shell.sidebar-collapsed.inspector-closed{grid-template-columns:0 minmax(0,1fr)}}

.queue-recovery{padding:10px;border-top:1px solid var(--border-strong);font-size:12px}.queue-recovery p{white-space:pre-wrap;max-height:100px;overflow:auto}#settingsPopover button small{display:block;font-size:11px;color:var(--text-muted)}
