@import "https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,100..900&family=Inter:wght@100..900&family=Inter+Tight:wght@400..700&display=swap";

/* packages/server/ui-src/tokens.css */
:root {
  --bg-app: #fafafa;
  --bg-sidebar: #f5f3f0;
  --bg-card: #ffffff;
  --bg-card-soft: #f7f9ff;
  --bg-elevated: #f7f5f1;
  --bg-surface-subtle: #fafaf8;
  --bg-input-soft: #f0f0ee;
  --bg-inverse: #1c1917;
  --bg-inverse-hover: #2a2725;
  --bg-inverse-soft: #1a1a2e;
  --bg-overlay-soft: #ffffff0f;
  --text-primary: #1c1917;
  --text-primary-strong: #1a1a18;
  --text-secondary: #7a7a72;
  --text-muted: #aeaea6;
  --text-subtle: #999999;
  --text-placeholder: #bbbbbb;
  --text-disabled: #ccccc6;
  --text-inverse: #ffffff;
  --text-inverse-muted: #fff8f08c;
  --text-inverse-subtle: #ffffff66;
  --border-card: #ebebeb;
  --border-panel: #eaeae6;
  --border-sidebar: #e8e5e0;
  --border-soft: #e0dbd5;
  --border-theme-soft: #dde3f2;
  --border-info-soft: #2e7a9e33;
  --border-brand-soft: #c4623a33;
  --border-glow: #00d4ff26;
  --accent-brand: #c4623a;
  --accent-info: #2e7a9e;
  --accent-info-strong: #2e7d9b;
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-error: #dc2626;
  --bg-user-bubble: #1a1a18;
  --text-user-bubble: #ffffff;
  --color-tool-success: #3a8c5c;
  --color-tool-active: #e0923a;
  --color-tool-progress-track: #f0f0ec;
  --color-bullet-accent: #d85a4a;
  --text-placeholder-chat: #ccccc6;
  --avatar-ring-color: #c4623a33;
  --avatar-ring-color-strong: #c4623a66;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 14px;
  --radius-2xl: 16px;
  --radius-pill: 999px;
  --radius-full: 9999px;
  --font-display:
    "DM Sans",
    system-ui,
    sans-serif;
  --font-ui:
    "Inter",
    system-ui,
    sans-serif;
  --font-mono:
    "JetBrains Mono",
    "SF Mono",
    monospace;
  --text-2xs: 10px;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-base: 13px;
  --text-md: 14px;
  --text-lg: 15px;
  --text-xl: 18px;
  --text-2xl: 24px;
  --text-3xl: 26px;
  --text-4xl: 32px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --sidebar-width: 240px;
  --shell-content-width: 1200px;
  --chat-panel-width-wide: 580px;
  --chat-panel-width-narrow: 420px;
  --widget-width-wide: 652px;
  --widget-width-main: 424px;
  --widget-width-narrow: 240px;
  --widget-height-tall: 283px;
  --widget-height-regular: 205px;
}
[data-surface-style=news] {
  --surface-bg: #1a1a2e;
  --surface-text: #fff8f0;
  --surface-text-muted: #fff8f08c;
  --surface-rule:
    linear-gradient(
      90deg,
      #cba98f 0%,
      #a4512f 50%,
      transparent 100%);
}
[data-surface-style=sports] {
  --surface-bg: #1d428a;
  --surface-bg-gradient:
    linear-gradient(
      135deg,
      #1d428a 0%,
      #3057a8 50%,
      #d9a441 100%);
  --surface-border: #d9ddeb;
  --surface-chip: #ffffff2e;
}
[data-surface-style=smart-home] {
  --surface-bg-gradient:
    linear-gradient(
      135deg,
      #28313f 0%,
      #364150 70%,
      #4b4048 100%);
  --surface-border: #dde3f2;
}
[data-surface-style=game] {
  --surface-bg: #0b0e17;
  --surface-glow: #00d4ff26;
  --surface-glow-strong: #00d4ff14;
}

/* packages/server/ui-src/base.css */
* {
  box-sizing: border-box;
}
.agent-builder-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 30px;
  border: 1px solid rgba(214, 205, 194, 0.72);
  border-radius: 28px;
  background:
    radial-gradient(
      circle at top right,
      rgba(208, 106, 45, 0.12),
      transparent 34%),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.94),
      rgba(250, 247, 242, 0.92));
  box-shadow: 0 16px 40px rgba(59, 44, 31, 0.06);
}
.agent-builder-hero {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.agent-builder-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 52px);
  line-height: 0.96;
}
.agent-builder-hero p {
  margin: 0;
  max-width: 720px;
  color: #746c63;
  line-height: 1.55;
}
.agent-space-page {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 0;
}
.agent-home-layout {
  display: flex;
  flex-direction: row;
  gap: 40px;
  min-height: 0;
  align-items: flex-start;
}
.agent-home-main {
  flex: 1;
  min-width: 0;
}
.agent-home-sidebar {
  flex: 0 0 320px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.agent-home-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.agent-home-block-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.agent-home-block-title {
  margin: 0;
  font-family:
    "Inter Tight",
    var(--font-display),
    system-ui,
    sans-serif;
  font-size: 18px;
  line-height: 22px;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: #1f1c18;
  flex: 0 0 auto;
}
.agent-home-block-count {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 16px;
  flex: 1 1 auto;
}
.agent-home-block-action {
  flex: 0 0 auto;
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  color: var(--accent-brand, #c4623a);
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
  cursor: pointer;
}
.agent-home-block-action:hover {
  text-decoration: underline;
}
.agent-home-block-action:disabled {
  opacity: 0.55;
  cursor: default;
  text-decoration: none;
}
.agent-home-empty-line {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 18px;
}
.agent-home-project-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.agent-home-project-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #e8e5e0;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.14s ease, transform 0.14s ease;
}
.agent-home-project-card:hover {
  transform: translateY(-1px);
  border-color: #d8d3cc;
}
.agent-home-project-card:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.agent-home-project-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.agent-home-project-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.agent-home-project-name {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: #1f1c18;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-home-project-subtitle {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-home-project-card-skeleton {
  height: 58px;
  background:
    linear-gradient(
      90deg,
      rgba(246, 241, 235, 0.86),
      rgba(255, 255, 255, 0.96),
      rgba(246, 241, 235, 0.86));
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
.agent-home-thread-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.agent-home-thread-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}
.agent-home-thread-row:hover {
  background: rgba(31, 28, 24, 0.03);
}
.agent-home-thread-row:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.agent-home-thread-row-active {
  background: rgba(31, 28, 24, 0.06);
}
.agent-home-thread-row-skeleton {
  height: 28px;
  background:
    linear-gradient(
      90deg,
      rgba(246, 241, 235, 0.86),
      rgba(255, 255, 255, 0.96),
      rgba(246, 241, 235, 0.86));
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
.agent-home-thread-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  flex-shrink: 0;
  background: #8b857c;
}
.agent-home-thread-dot-working {
  background: #3b7bb8;
}
.agent-home-thread-dot-ready {
  background: #6a8a3b;
}
.agent-home-thread-dot-error {
  background: #b84c3f;
}
.agent-home-thread-title {
  font-size: 13px;
  line-height: 18px;
  color: #1f1c18;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-home-thread-time {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 16px;
  flex-shrink: 0;
}
@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}
.agent-home-activity-target {
  box-shadow: 0 0 0 2px rgba(74, 122, 176, 0.16);
  border-radius: 8px;
}
.agent-home-activity-feed {
  padding-top: 0;
}
.agent-settings-screen {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.agent-settings-tabs {
  display: flex;
  gap: 4px;
  align-self: flex-start;
  padding: 3px;
  border-radius: 999px;
  background: rgba(31, 28, 24, 0.05);
}
.agent-settings-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
}
.agent-settings-tab:hover {
  color: var(--text-primary);
}
.agent-settings-tab-active {
  background: #1f1c18;
  color: #ffffff;
}
.agent-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.agent-settings-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 2px;
}
.agent-settings-meta-pair {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.agent-settings-meta-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.agent-settings-meta-value {
  font-size: 13px;
  line-height: 18px;
  color: #1f1c18;
}
.agent-settings-meta-value code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #1f1c18;
}
.agent-settings-instructions {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 20px;
  color: #1f1c18;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.agent-settings-body-copy {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--text-secondary);
}
.agent-settings-workspace-path {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  color: #1f1c18;
  background: rgba(31, 28, 24, 0.04);
  border-radius: 8px;
  word-break: break-all;
}
.agent-settings-skills-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.agent-settings-skills-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 4px;
  border-radius: 8px;
}
.agent-settings-skills-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 18px;
  color: #1f1c18;
}
.agent-settings-skills-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #6a8a3b;
  flex-shrink: 0;
}
.agent-settings-skills-detail {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.agent-artifacts-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.agent-artifacts-panel-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.agent-artifacts-panel-title {
  margin: 0;
  font-family:
    "Inter Tight",
    var(--font-display),
    system-ui,
    sans-serif;
  font-size: 18px;
  line-height: 22px;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: #1f1c18;
}
.agent-artifacts-panel-count {
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
}
.agent-artifacts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.agent-artifact-tile {
  --artifact-tile-tint: #f3ede6;
  --artifact-tile-accent: #8B857C;
  flex: 0 0 220px;
  width: 220px;
  height: 220px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: clip;
  border-radius: 14px;
  border: 1px solid #e8e5e0;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.agent-artifact-tile:hover {
  transform: translateY(-1px);
  border-color: #d8d3cc;
}
.agent-artifact-tile:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.agent-artifact-tile-preview {
  position: relative;
  flex: 0 0 148px;
  width: 100%;
  overflow: hidden;
  background: var(--artifact-tile-tint);
}
.agent-artifact-tile-preview * {
  pointer-events: none;
}
.agent-artifact-tile-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(31, 28, 24, 0.08);
  pointer-events: none;
}
.agent-artifact-tile-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--artifact-tile-accent);
  flex-shrink: 0;
}
.agent-artifact-tile-badge-label {
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #1f1c18;
}
.agent-artifact-tile-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 12px 14px 14px;
}
.agent-artifact-tile-body h3 {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: #1f1c18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-artifact-tile-body p {
  margin: 0;
  color: #8b857c;
  font-size: 12px;
  line-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-artifact-tile-kind-markdown-text {
  --artifact-tile-tint: #f4efe7;
  --artifact-tile-accent: #b88a3b;
}
.agent-artifact-tile-kind-html-web {
  --artifact-tile-tint: #eff1f4;
  --artifact-tile-accent: #3b7bb8;
}
.agent-artifact-tile-kind-image {
  --artifact-tile-tint: #eef1ec;
  --artifact-tile-accent: #6a8a3b;
}
.agent-artifact-tile-kind-file {
  --artifact-tile-tint: #f1eee9;
  --artifact-tile-accent: #8b857c;
}
.agent-artifact-tile-kind-component {
  --artifact-tile-tint: #f0f2ed;
  --artifact-tile-accent: #6a3bb8;
}
.agent-artifact-tile-kind-fallback {
  --artifact-tile-tint: #f1eee9;
  --artifact-tile-accent: #8b857c;
}
.agent-artifacts-empty-state {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 18px;
}
.agent-artifacts-empty-state strong {
  color: #1f1c18;
  font-weight: 500;
}
.agent-artifact-loading-tile {
  flex: 0 0 220px;
  width: 220px;
  height: 220px;
  border-radius: 14px;
  background:
    linear-gradient(
      135deg,
      rgba(241, 236, 229, 0.9) 0%,
      rgba(248, 244, 238, 0.95) 100%);
  border: 1px solid rgba(227, 220, 212, 0.95);
}
.artifact-preview-text-texture {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 16px;
  overflow: hidden;
  color: #4f4a45;
  font-family:
    "IBM Plex Mono",
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: 11px;
  line-height: 1.48;
  white-space: pre-wrap;
}
.artifact-preview-empty-copy,
.artifact-preview-generic,
.artifact-preview-file {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
}
.artifact-preview-empty-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #5a544f;
  font-size: 14px;
  text-align: center;
}
.artifact-preview-image,
.artifact-preview-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.artifact-preview-image {
  object-fit: cover;
  background: #ece7df;
}
.artifact-preview-iframe {
  background: #fff;
}
.artifact-preview-generic {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.18) 0%,
      rgba(255, 255, 255, 0.88) 100%),
    radial-gradient(
      circle at top left,
      rgba(138, 186, 255, 0.18) 0%,
      rgba(138, 186, 255, 0) 48%);
  color: #2a2825;
}
.artifact-preview-generic-widget {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0.88) 100%),
    radial-gradient(
      circle at top left,
      rgba(123, 211, 137, 0.22) 0%,
      rgba(123, 211, 137, 0) 52%);
}
.artifact-preview-generic-web {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0.88) 100%),
    radial-gradient(
      circle at top left,
      rgba(253, 186, 116, 0.24) 0%,
      rgba(253, 186, 116, 0) 52%);
}
.artifact-preview-generic strong,
.artifact-preview-file strong {
  font-size: 17px;
  line-height: 1.2;
}
.artifact-preview-generic span,
.artifact-preview-file span {
  color: #5f5953;
  font-size: 13px;
  line-height: 1.35;
}
.artifact-preview-generic-label {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(20, 20, 19, 0.08);
  color: #403c37;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}
.artifact-preview-file {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
}
.artifact-preview-file-badge {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1f2937;
  color: #f9fafb;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.artifact-preview-file-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.artifact-preview-file-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.artifact-preview-widget-frame {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 12px;
  overflow: hidden;
}
.artifact-preview-widget-frame > * {
  max-width: 100%;
}
.agent-settings-delete-confirm {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.agent-settings-secondary,
.agent-settings-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  align-self: flex-start;
}
.agent-settings-secondary {
  background: transparent;
  border-color: #e8e5e0;
  color: var(--text-secondary);
}
.agent-settings-danger {
  background: rgba(184, 76, 63, 0.08);
  border-color: rgba(184, 76, 63, 0.24);
  color: #b84c3f;
}
.agent-settings-secondary:disabled,
.agent-settings-danger:disabled {
  cursor: default;
  opacity: 0.58;
}
.agent-settings-delete-confirm span {
  color: var(--text-secondary);
  font-size: 13px;
}
.agent-skills-panel,
.agent-activity-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.agent-skills-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.agent-skills-header-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.agent-skills-header-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
}
.agent-skills-header-copy p,
.agent-skills-library-group-header p,
.agent-skills-card-header p,
.agent-skills-modal-header p {
  margin: 0;
  color: #746b61;
  line-height: 1.6;
}
.agent-skills-status,
.agent-activity-status {
  margin: 0;
}
.agent-skills-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.agent-skills-card,
.agent-skills-empty-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(232, 228, 222, 0.96);
  background: #fdfcfb;
}
.agent-skills-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.agent-skills-card-title-row,
.agent-skills-library-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.agent-skills-card-title-row h3,
.agent-skills-library-title-row strong,
.agent-skills-library-group-header h4,
.agent-skills-modal-header h3 {
  margin: 0;
}
.agent-skills-kind-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.agent-skills-kind-badge-shared {
  background: rgba(90, 112, 147, 0.12);
  color: #49607f;
}
.agent-skills-kind-badge-custom {
  background: rgba(200, 90, 42, 0.1);
  color: #a14e28;
}
.agent-skills-kind-badge-os-service {
  background: rgba(74, 124, 89, 0.12);
  color: #4a7c59;
}
.agent-skills-meta-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.agent-skills-meta-label {
  color: #8f8174;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.agent-skills-tool-pills,
.agent-skills-artifact-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.agent-skills-tool-pill,
.agent-skills-artifact-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(244, 239, 233, 0.92);
  color: #5c5249;
  font-size: 12px;
}
.agent-skills-tool-pill {
  font-family: var(--font-mono);
}
.agent-skills-primary,
.agent-skills-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.agent-skills-primary {
  background: #1d1c19;
  color: #f8f4ee;
}
.agent-skills-secondary {
  background: rgba(247, 243, 238, 0.92);
  border-color: rgba(214, 205, 194, 0.92);
  color: #5f5750;
}
.agent-skills-primary:disabled,
.agent-skills-secondary:disabled {
  cursor: default;
  opacity: 0.58;
}
.agent-skills-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(32, 26, 22, 0.24);
}
.agent-skills-modal-card {
  width: min(840px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-radius: 22px;
  border: 1px solid rgba(220, 212, 202, 0.92);
  background: #fff;
  overflow: auto;
  box-shadow: 0 24px 60px rgba(56, 44, 36, 0.18);
}
.agent-skills-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.agent-skills-library-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.agent-skills-library-group-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.agent-skills-library-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.agent-skills-library-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(247, 243, 238, 0.72);
}
.agent-skills-library-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.agent-builder-page {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 24px;
  min-height: 0;
  overflow: hidden;
}
.agent-builder-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.agent-builder-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 720px;
}
.agent-builder-hero-copy h1 {
  margin: 0;
}
.agent-builder-hero-copy p {
  margin: 0;
  color: #6b635a;
  line-height: 1.6;
}
.agent-builder-kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b4632a;
  font-weight: 700;
}
.agent-builder-layout {
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  gap: 20px;
  min-height: 0;
  overflow: hidden;
}
.agent-builder-column {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.agent-builder-column-chat {
  flex: 1.15;
}
.agent-builder-column-preview {
  flex: 0.85;
}
.agent-builder-chat-shell {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}
.agent-builder-chat-shell .chat-panel-page {
  flex: 1 1 auto;
  min-height: 0;
}
.agent-builder-loading-panel,
.agent-builder-preview-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1 1 auto;
  padding: 24px 26px;
  border-radius: 24px;
  border: 1px solid rgba(220, 212, 202, 0.92);
  background: rgba(255, 255, 255, 0.92);
  min-height: 0;
  overflow: hidden;
}
.agent-builder-loading-panel h2,
.agent-builder-preview-header h2,
.agent-builder-preview-card h3,
.agent-builder-preview-section h3 {
  margin: 0;
}
.agent-builder-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
.agent-builder-preview-scroll {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  flex-direction: column;
  gap: 18px;
  padding-right: 4px;
}
.agent-builder-create-button {
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  background: #1a1a1a;
  color: #fff;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
}
.agent-builder-create-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.agent-builder-preview-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: #faf7f2;
  border: 1px solid rgba(232, 226, 217, 0.9);
}
.agent-builder-preview-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #e8d8c9;
  color: #5a4334;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.agent-builder-preview-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.agent-builder-preview-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.agent-builder-preview-id {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: #7b7167;
}
.agent-builder-preview-copy p {
  margin: 0;
  color: #5f5851;
  line-height: 1.6;
}
.agent-builder-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: var(--text-sm);
  color: #5f5851;
}
.agent-builder-preview-personality {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.agent-builder-preview-personality strong {
  font-size: var(--text-sm);
}
.agent-builder-preview-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid rgba(232, 226, 217, 0.9);
}
.agent-builder-preview-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.agent-builder-preview-section-header span {
  font-size: var(--text-xs);
  color: #7b7167;
}
.agent-builder-preview-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.agent-builder-preview-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f3ece3;
  color: #5f4a3d;
  padding: 6px 10px;
  font-size: var(--text-sm);
}
.agent-builder-preview-tool-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.agent-builder-preview-tool-group strong {
  font-size: var(--text-sm);
  color: #463c34;
}
.agent-builder-preview-tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #faf7f2;
}
.agent-builder-preview-tool-row code,
.agent-builder-preview-prompt {
  font-family: var(--font-mono);
}
.agent-builder-preview-tool-row code {
  font-size: var(--text-xs);
  color: #4d433b;
}
.agent-builder-preview-tool-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.agent-builder-preview-tool-badge-safe {
  background: #e7f3ea;
  color: #33624a;
}
.agent-builder-preview-tool-badge-sensitive {
  background: #f7ead6;
  color: #8b5b1f;
}
.agent-builder-preview-tool-badge-approved {
  background: #e5efe8;
  color: #3f7258;
}
.agent-builder-preview-tool-badge-unknown {
  background: #f7e3df;
  color: #934b3f;
}
.agent-builder-preview-prompt {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fcfbf8;
  border: 1px solid rgba(232, 226, 217, 0.9);
  color: #3f3832;
  font-size: 12px;
  white-space: pre-wrap;
  line-height: 1.6;
}
.agent-builder-preview-errors {
  border-top: 0;
  padding-top: 0;
}
.agent-builder-preview-errors ul {
  margin: 0;
  padding-left: 18px;
  color: #934b3f;
  line-height: 1.6;
}
.sidebar-agent-glyph {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #8b857c;
}
@media (max-width: 900px) {
  .agent-builder-hero {
    flex-direction: column;
  }
  .agent-home-layout {
    flex-direction: column;
  }
  .agent-home-sidebar {
    flex: 1 1 auto;
    width: auto;
  }
  .agent-home-block-header {
    flex-wrap: wrap;
  }
  .agent-artifacts-panel-header {
    flex-wrap: wrap;
  }
  .agent-settings-meta-row {
    flex-direction: column;
    gap: 12px;
  }
  .agent-builder-layout,
  .agent-skills-header,
  .agent-skills-card-header,
  .agent-skills-library-row,
  .agent-skills-modal-header {
    flex-direction: column;
  }
  .agent-builder-page,
  .agent-builder-layout {
    overflow: visible;
  }
  .agent-builder-layout {
    flex: 0 0 auto;
  }
  .agent-builder-chat-shell,
  .agent-builder-chat-shell .chat-panel-page,
  .agent-builder-loading-panel,
  .agent-builder-preview-panel,
  .agent-builder-preview-scroll {
    min-height: auto;
  }
  .agent-builder-preview-panel {
    overflow: visible;
  }
  .agent-builder-preview-scroll {
    overflow: visible;
    padding-right: 0;
  }
  .agent-skills-primary,
  .agent-skills-secondary {
    width: 100%;
  }
  .agent-skills-modal-backdrop {
    padding: 16px;
  }
}
html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding: 0;
  margin: 0;
}
#root {
  width: 100%;
  height: 100%;
  min-height: 100%;
}
body {
  background:
    radial-gradient(
      circle at top right,
      #f4f6fb 0%,
      var(--bg-app) 48%);
  color: var(--text-primary);
  font-family: var(--font-ui);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.bootstrap-root {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.bootstrap-card {
  width: min(560px, 100%);
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-2xl);
  background: var(--bg-card);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  box-shadow: 0 8px 20px rgb(28 25 23 / 4%);
}
.bootstrap-card h1 {
  margin: 0;
  font-family: var(--font-display);
}
.auth-root {
  background:
    radial-gradient(
      circle at top right,
      rgba(196, 98, 58, 0.1),
      transparent 42%),
    radial-gradient(
      circle at bottom left,
      rgba(46, 122, 158, 0.05),
      transparent 46%),
    var(--bg-app);
}
.auth-card {
  max-width: 420px;
  gap: var(--space-5);
  padding: var(--space-8) var(--space-8) var(--space-6);
  box-shadow: 0 16px 40px rgb(59 44 31 / 8%);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.96),
      rgba(250, 247, 242, 0.96));
}
.auth-header,
.auth-form,
.auth-field {
  display: flex;
  flex-direction: column;
}
.auth-header {
  gap: var(--space-2);
}
.auth-brand-mark {
  width: 36px;
  height: 36px;
  margin-bottom: var(--space-2);
  border-radius: 10px;
  background:
    radial-gradient(
      circle at 30% 28%,
      rgba(255, 255, 255, 0.42),
      transparent 60%),
    var(--accent-brand);
  box-shadow: 0 4px 12px rgb(196 98 58 / 28%);
}
.auth-card h1 {
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.auth-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.5;
}
.auth-form {
  gap: var(--space-4);
}
.auth-field {
  gap: 6px;
}
.auth-field span {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-secondary);
}
.auth-field input {
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 11px 13px;
  font-size: var(--text-md);
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.auth-field input:focus,
.auth-field input:focus-visible {
  outline: none;
  border-color: var(--accent-brand);
  box-shadow: 0 0 0 3px var(--border-brand-soft);
}
.auth-primary-button,
.auth-google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: 0 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.14s ease, background-color 0.14s ease;
}
.auth-primary-button {
  background: var(--bg-inverse);
  color: var(--text-inverse);
}
.auth-primary-button:hover:not(:disabled) {
  background: var(--bg-inverse-hover);
}
.auth-primary-button:disabled {
  opacity: 0.5;
  cursor: default;
}
.auth-google-button {
  background: var(--bg-elevated);
  border-color: var(--border-soft);
  color: var(--text-primary);
}
.auth-google-button:hover {
  filter: brightness(0.98);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-panel);
}
.auth-error {
  margin: 0;
  font-size: var(--text-base);
}
.auth-notice {
  margin: 0;
  color: var(--color-success, #16a34a);
  font-size: var(--text-base);
}
.auth-link-button {
  border: none;
  background: transparent;
  color: var(--accent-brand);
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}
.auth-link-button:hover:not(:disabled) {
  text-decoration: underline;
}
.auth-link-button:disabled {
  cursor: default;
  opacity: 0.6;
}
.auth-forgot-button {
  align-self: flex-start;
}
.auth-toggle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: var(--text-base);
  color: var(--text-secondary);
}
.device-card {
  max-width: 440px;
}
.device-help-text {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: 1.45;
}
.device-help-text code {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.92em;
  white-space: nowrap;
}
.device-code-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
}
.device-code-panel span {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text-primary);
}
.device-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.device-primary-button,
.device-secondary-button {
  width: 100%;
}
.device-status-text {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: 1.5;
  text-align: center;
}
button,
input,
textarea,
select {
  font: inherit;
}
a {
  color: inherit;
}
.shell-root {
  display: flex;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  margin: 0;
  overflow: hidden;
}
.shell-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-sidebar);
  padding: 20px 0;
  overflow-y: auto;
}
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 24px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
}
.sidebar-header:hover {
  opacity: 0.8;
}
.sidebar-header-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--accent-brand);
  flex-shrink: 0;
}
.sidebar-header-label {
  font-family: var(--font-ui);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--text-primary);
}
.sidebar-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.sidebar-section-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 10px;
}
.sidebar-section-eyebrow,
.sidebar-secondary-label {
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9b938a;
}
.sidebar-secondary-label {
  padding-bottom: 10px;
}
.sidebar-stack-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-divider {
  height: 1px;
  background: #e8e5e0;
  margin: 14px 20px;
  flex-shrink: 0;
}
.sidebar-home-row {
  width: calc(100% - 24px);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 12px;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}
.sidebar-home-row:hover,
.sidebar-home-row-active {
  background: #f1ebe2;
}
.sidebar-home-row-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #fff3eb;
  color: var(--accent-brand);
  flex-shrink: 0;
}
.sidebar-home-row-label {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
}
.sidebar-project-section {
  display: flex;
  flex-direction: column;
  padding: 0 8px;
  gap: 2px;
}
.sidebar-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--project-ink, #4A4540);
  padding: 6px 8px;
  margin: 0 4px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--project-tint, transparent);
  text-align: left;
  cursor: pointer;
  width: calc(100% - 8px);
  transition: background-color 0.12s ease, filter 0.12s ease;
}
.sidebar-section-label:hover {
  filter: brightness(0.96);
}
.sidebar-section-label-home:hover {
  background: #c4623a22;
  filter: none;
}
.sidebar-section-label-active {
  filter: none;
}
.sidebar-section-label-active:hover {
  filter: none;
}
.sidebar-section-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--project-color, #999);
}
.sidebar-section-home-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--accent-brand);
}
.sidebar-section-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-section-chevron {
  flex-shrink: 0;
  opacity: 0.35;
  color: var(--project-ink, #4A4540);
}
.sidebar-artifact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-artifact-row,
.sidebar-agent-row,
.sidebar-project-row,
.sidebar-ghost-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
}
.sidebar-artifact-row:hover,
.sidebar-agent-row:hover,
.sidebar-project-row:hover,
.sidebar-ghost-row:hover {
  background: var(--bg-card);
}
.sidebar-artifact-row-active,
.sidebar-agent-row-active,
.sidebar-project-row-active,
.sidebar-ghost-row-active {
  background: var(--bg-card);
}
.sidebar-agent-slot,
.sidebar-project-dot,
.sidebar-ghost-slot {
  flex-shrink: 0;
}
.sidebar-agent-slot {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sidebar-agent-row-label,
.sidebar-project-row-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: var(--text-primary);
}
.sidebar-project-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-left: 8px;
}
.sidebar-project-shared-pill {
  margin-left: auto;
  padding: 2px 7px;
  font-size: 10px;
  line-height: 13px;
}
.sidebar-ghost-row {
  color: var(--text-secondary);
}
.sidebar-ghost-row span:last-child {
  font-size: 14px;
}
.sidebar-ghost-slot {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #d2c8bb;
  border-radius: 7px;
  color: #a2917d;
  font-size: 14px;
  line-height: 1;
}
.sidebar-artifact-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #ece7e2;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}
.sidebar-artifact-icon-agent {
  background: #f4ede6;
  color: #7c654f;
}
.sidebar-artifact-icon-agent .sidebar-agent-glyph {
  width: 20px;
  height: 20px;
  border-radius: 8px;
}
.artifact-icon-glyph {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  flex-shrink: 0;
}
.home-widget-icon .artifact-icon-glyph,
.widget-runtime-icon .artifact-icon-glyph {
  width: 16px;
  height: 16px;
}
.sidebar-artifact-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.sidebar-artifact-title {
  font-size: var(--text-base);
  color: var(--text-primary);
  font-weight: 400;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-artifact-subtitle {
  font-size: var(--text-xs);
  color: #999;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-section-recents {
  display: flex;
  flex-direction: column;
  padding: 0 8px;
  gap: 2px;
}
.sidebar-agent-expanded {
  display: flex;
  margin: 6px 12px 8px 12px;
  padding: 0 0 0 18px;
  border-left: 1px solid #e8e5e0;
}
.sidebar-agent-rail {
  display: none;
}
.sidebar-agent-sections {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-agent-subsection {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.sidebar-agent-subsection-header {
  padding: 8px 14px 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a2917d;
}
.sidebar-subsection-empty {
  margin: 0;
  padding: 2px 14px 2px;
  font-size: 12px;
  color: var(--text-muted);
}
.sidebar-subsection-error {
  color: #934b3f;
}
.sidebar-recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.sidebar-agent-sections .sidebar-thread-row,
.sidebar-agent-sections .sidebar-artifact-row {
  padding: 5px 14px;
  border-radius: 8px;
  gap: 8px;
}
.sidebar-agent-sections .sidebar-artifact-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  font-size: 11px;
}
.sidebar-agent-sections .sidebar-artifact-title,
.sidebar-agent-sections .sidebar-thread-copy .sidebar-thread-title {
  font-size: 13px;
  line-height: 16px;
}
.sidebar-agent-sections .sidebar-artifact-subtitle,
.sidebar-agent-sections .sidebar-thread-subtitle {
  font-size: 11px;
  line-height: 14px;
}
.sidebar-agent-sections .sidebar-thread-icon {
  width: 14px;
  height: 14px;
}
.sidebar-section-thread-divider {
  height: 1px;
  background: #ece7e2;
  margin: 10px 20px 8px 48px;
  flex-shrink: 0;
}
.sidebar-thread-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
}
.sidebar-thread-row:hover {
  background: var(--bg-card);
}
.sidebar-thread-row-active {
  background: var(--bg-card);
}
.sidebar-thread-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.sidebar-thread-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-thread-icon-working {
  color: var(--accent-info);
}
.sidebar-thread-icon-idle {
  color: #b1aaa2;
}
.sidebar-thread-icon-ready {
  color: var(--color-success, #16a34a);
}
.sidebar-thread-icon-error {
  color: var(--color-error, #991b1b);
}
.sidebar-thread-title {
  font-size: var(--text-base);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-thread-subtitle {
  font-size: var(--text-xs);
  color: var(--text-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-thread-subtitle-working {
  color: var(--accent-info);
}
.sidebar-thread-subtitle-idle {
  color: #9b938a;
}
.sidebar-thread-subtitle-ready {
  color: var(--text-muted);
}
.sidebar-thread-subtitle-error {
  color: var(--color-error, #991b1b);
}
.sidebar-task-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
}
.sidebar-task-row:hover {
  background: var(--bg-card);
}
.sidebar-task-row-active {
  background: var(--bg-card);
}
.sidebar-task-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-task-icon-running,
.sidebar-task-icon-queued {
  color: var(--accent-info);
}
.sidebar-task-icon-completed {
  color: var(--color-success, #16a34a);
}
.sidebar-task-icon-failed,
.sidebar-task-icon-cancelled {
  color: var(--color-error, #991b1b);
}
.sidebar-task-spinner {
  animation: sidebar-task-spin 0.8s linear infinite;
}
@keyframes sidebar-task-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.sidebar-task-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.sidebar-task-title {
  font-size: var(--text-base);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-task-status {
  font-size: var(--text-xs);
  line-height: 1.25;
}
.sidebar-task-status-active {
  color: var(--accent-info);
}
.sidebar-task-status-completed {
  color: var(--color-success, #16a34a);
}
.sidebar-task-status-failed,
.sidebar-task-status-cancelled {
  color: var(--color-error, #991b1b);
}
.sidebar-section-more {
  border: none;
  background: transparent;
  color: var(--accent-brand);
  font-size: 12px;
  line-height: 1.2;
  padding: 4px 14px 6px;
  margin-top: 2px;
  text-align: left;
  cursor: pointer;
}
.sidebar-section-more:hover {
  color: var(--text-primary);
}
.sidebar-section-more-inline {
  padding-left: 44px;
}
.sidebar-section-action {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.2;
  padding: 6px 12px 8px 44px;
  margin-top: 2px;
  text-align: left;
  cursor: pointer;
}
.sidebar-section-action:hover:not(:disabled) {
  color: var(--text-primary);
}
.sidebar-section-action:disabled {
  cursor: default;
  opacity: 0.6;
}
.sidebar-new-project {
  padding: 8px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-base);
  color: var(--text-muted);
  font-family: var(--font-ui);
  width: 100%;
  text-align: left;
}
.sidebar-new-project:hover {
  color: var(--text-primary);
}
.sidebar-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.sidebar-modal-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 340px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}
.sidebar-modal-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
}
.sidebar-modal-card input {
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: var(--text-base);
}
.sidebar-modal-card input:focus {
  outline: 2px solid var(--accent-info-strong);
  outline-offset: 1px;
}
.sidebar-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.sidebar-modal-actions button {
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: var(--text-base);
  cursor: pointer;
  background: var(--bg-card);
  color: var(--text-primary);
}
.sidebar-modal-actions button:hover {
  background: var(--bg-surface-subtle);
}
.sidebar-modal-actions button[type=submit] {
  background: var(--accent-brand);
  border-color: var(--accent-brand);
  color: #fff;
}
.sidebar-modal-actions button[type=submit]:hover {
  opacity: 0.9;
}
.sidebar-modal-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.sidebar-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}
.sidebar-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sidebar-status-bar-connected {
  background: #EEF7F1;
  border-top: 1px solid var(--border-panel);
  border-top-color: #D5E7D9;
}
.sidebar-status-bar-connected .sidebar-status-dot {
  background: #3D8D58;
}
.sidebar-status-bar-connected .sidebar-status-label {
  color: #2F6741;
}
.sidebar-status-bar-connecting {
  background: #F5F4F0;
}
.sidebar-status-bar-connecting .sidebar-status-dot {
  background: #AEAEA6;
}
.sidebar-status-bar-connecting .sidebar-status-label {
  color: #7A7A72;
}
.sidebar-status-bar-reconnecting {
  background: #FAF0D8;
  border-top: 1px solid #EDE0BB;
}
.sidebar-status-bar-reconnecting .sidebar-status-dot {
  background: #C8960F;
}
.sidebar-status-bar-reconnecting .sidebar-status-label {
  color: #9A7209;
}
.sidebar-status-bar-disconnected {
  background: #FDF0EE;
  border-top: 1px solid #F0D5CF;
}
.sidebar-status-bar-disconnected .sidebar-status-dot {
  background: #C45C4A;
}
.sidebar-status-bar-disconnected .sidebar-status-label {
  color: #A84A3A;
}
.chat-run-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 4px 0;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  border-radius: 6px;
}
.chat-run-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.chat-run-status-failed {
  background: #FDF0EE;
}
.chat-run-status-failed .chat-run-status-dot {
  background: #C45C4A;
}
.chat-run-status-failed .chat-run-status-label {
  color: #A84A3A;
}
.chat-run-status-cancelled {
  background: #F5F4F0;
}
.chat-run-status-cancelled .chat-run-status-dot {
  background: #AEAEA6;
}
.chat-run-status-cancelled .chat-run-status-label {
  color: #7A7A72;
}
.sidebar-header:focus-visible,
.sidebar-home-row:focus-visible,
.sidebar-section-label:focus-visible,
.sidebar-artifact-row:focus-visible,
.sidebar-agent-row:focus-visible,
.sidebar-project-row:focus-visible,
.sidebar-ghost-row:focus-visible,
.sidebar-thread-row:focus-visible,
.sidebar-task-row:focus-visible,
.sidebar-section-more:focus-visible,
.sidebar-section-action:focus-visible,
.sidebar-new-project:focus-visible,
.sidebar-modal-card input:focus-visible {
  outline: 2px solid var(--accent-info-strong);
  outline-offset: 2px;
}
.sidebar-header:focus:not(:focus-visible),
.sidebar-home-row:focus:not(:focus-visible),
.sidebar-section-label:focus:not(:focus-visible),
.sidebar-artifact-row:focus:not(:focus-visible),
.sidebar-agent-row:focus:not(:focus-visible),
.sidebar-project-row:focus:not(:focus-visible),
.sidebar-ghost-row:focus:not(:focus-visible),
.sidebar-thread-row:focus:not(:focus-visible),
.sidebar-task-row:focus:not(:focus-visible),
.sidebar-section-more:focus:not(:focus-visible),
.sidebar-section-action:focus:not(:focus-visible),
.sidebar-new-project:focus:not(:focus-visible) {
  outline: none;
}
.shell-workspace {
  flex: 1 1 0;
  display: flex;
  min-width: 0;
  min-height: 0;
}
.shell-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-6) var(--space-5);
}
.page-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.page-scroll-task {
  overflow: hidden;
  gap: 0;
}
.shell-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  border-bottom: 1px solid var(--border-card);
  padding-bottom: var(--space-4);
}
.topbar-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.topbar-title {
  display: none;
}
.topbar-metadata {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}
.topbar-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-width: 0;
}
.topbar-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.topbar-breadcrumb-link,
.topbar-breadcrumb-current {
  font-size: var(--text-sm);
  line-height: 1.3;
}
.topbar-breadcrumb-link {
  color: var(--text-secondary);
  text-decoration: none;
}
.topbar-breadcrumb-link:hover {
  text-decoration: underline;
  color: var(--text-primary);
}
.topbar-breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
}
.topbar-separator {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-family: var(--font-mono);
}
.topbar-breadcrumb-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--text-muted);
  flex-shrink: 0;
}
.topbar-inline-meta {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 16px;
  white-space: nowrap;
}
.shell-topbar-hero .topbar-breadcrumb-current {
  font-family:
    "Inter Tight",
    var(--font-display),
    system-ui,
    sans-serif;
  font-size: 24px;
  line-height: 28px;
  letter-spacing: -0.015em;
  font-weight: 600;
}
.shell-topbar-hero .topbar-breadcrumbs {
  row-gap: 4px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.topbar-search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-panel);
  border-radius: 8px;
  padding: 6px 14px;
  background: var(--bg-card);
  cursor: text;
}
.topbar-search-icon {
  flex-shrink: 0;
  color: #999;
}
.topbar-search-input input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 14px;
  line-height: 18px;
  color: var(--text-primary);
  padding: 0;
  outline: none;
  cursor: pointer;
}
.topbar-search-input input::placeholder {
  color: var(--text-placeholder);
}
.topbar-search-input:focus-within {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
  border-color: var(--accent-info);
}
.topbar-search-input input:focus-visible {
  outline: none;
}
.topbar-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e8e5e0;
  background: #ffffff;
  color: var(--text-secondary);
  text-decoration: none;
  flex-shrink: 0;
}
.topbar-icon-button:hover {
  color: var(--text-primary);
  border-color: #d8d3cc;
}
.topbar-icon-button-active {
  background: #f1ebe2;
  color: var(--text-primary);
  border-color: #d8d3cc;
}
.topbar-icon-button:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.topbar-chat-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: #3D3833;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.topbar-chat-button:hover {
  background: #2C2926;
}
.topbar-chat-button:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.topbar-account {
  position: relative;
}
.topbar-account-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-panel);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.topbar-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: 220px;
  border: 1px solid var(--border-panel);
  border-radius: 8px;
  background: var(--bg-card);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 12px 28px rgb(28 25 23 / 12%);
}
.topbar-artifacts-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.topbar-artifacts-pill:hover {
  background: var(--bg-card-soft);
  color: var(--text-primary);
}
.page-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-4);
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.page-section h1,
.page-section h2 {
  margin: 0;
  font-family: var(--font-display);
}
.page-section p {
  margin: 0;
}
.home-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-display);
}
.home-header h1 {
  margin: 0;
  font-size: 26px;
  font-family: var(--font-display);
  font-weight: 700;
  color: #1C1917;
  line-height: 32px;
}
.home-header-date {
  font-size: 14px;
  line-height: 18px;
  color: #999;
}
.home-header-spacer {
  flex: 1;
}
.home-header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 200px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--bg-input-soft);
  padding: 7px 14px;
  cursor: text;
}
.home-header-search-icon {
  flex-shrink: 0;
  color: #999;
}
.home-header-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  padding: 0;
  font-family: var(--font-display);
  font-size: var(--text-base);
  line-height: 16px;
  outline: none;
}
.home-header-search input::placeholder {
  color: var(--text-placeholder);
}
.home-header-search:focus-within {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
  border-color: var(--accent-info);
}
.home-header-search input:focus-visible {
  outline: none;
}
.home-header-chat {
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 8px;
  background: #1C1917;
  color: #fff;
  padding: 7px 14px;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: var(--text-base);
  line-height: 16px;
  font-weight: 500;
}
.home-header-chat:hover {
  background: #2C2926;
}
.home-header-chat:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.home-widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.home-widget-card {
  min-width: 0;
  border: 1px solid #E8E5E0;
  border-radius: 12px;
  background: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  font-family: var(--font-display);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.home-widget-card:hover {
  border-color: #D5D0CB;
  background-color: #FAFAF8;
}
.home-widget-card:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.home-widget-card[data-widget-size=wide] {
  grid-column: 1 / -1;
}
.home-widget-card[data-widget-size=main] {
  grid-column: span 2;
}
.home-widget-card[data-widget-height=tall] {
  min-height: 260px;
}
.home-widget-card.widget-runtime-card {
  padding: 20px 24px 18px;
  gap: 14px;
}
.home-widget-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.home-widget-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.home-widget-icon-default {
  background: #F5F3F0;
  color: #9A9590;
}
.home-widget-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.home-widget-shared-badge {
  background: var(--bg-card-soft);
  color: var(--accent-info);
  border-color: var(--border-info-soft);
}
.home-widget-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.home-widget-copy h2 {
  font-family:
    "DM Sans",
    var(--font-display),
    sans-serif;
  font-size: 15px;
  line-height: 18px;
  font-weight: 600;
  color: #1A1A18;
  margin: 0;
}
.home-widget-subtitle {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  color: #9A9590;
  line-height: 16px;
}
.home-widget-desc {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  color: #6B6660;
  line-height: 16px;
  margin: 0;
}
.home-widget-tags {
  display: flex;
  gap: 6px;
  margin-top: auto;
}
.home-widget-tag {
  display: inline-block;
  border-radius: 4px;
  padding: 3px 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 400;
  line-height: 14px;
}
.home-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding-bottom: 80px;
}
.home-empty-decoration {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: 36px;
}
.home-empty-shape-1 {
  position: absolute;
  width: 76px;
  height: 76px;
  left: 16px;
  top: 28px;
  border-radius: 18px;
  rotate: -12deg;
  background: #D4845A29;
}
.home-empty-shape-2 {
  position: absolute;
  width: 64px;
  height: 64px;
  right: 18px;
  top: 18px;
  border-radius: 50%;
  background: #4A90D924;
}
.home-empty-shape-3 {
  position: absolute;
  width: 54px;
  height: 54px;
  bottom: 16px;
  left: 46px;
  border-radius: 14px;
  rotate: 8deg;
  background: #5AB47824;
}
.home-empty-state .home-empty-headline {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 30px;
  color: #1A1A1A;
  margin: 0 0 10px;
}
.home-empty-state .home-empty-subtitle {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 22px;
  color: #9B9590;
  max-width: 380px;
  text-align: center;
  margin: 0 0 60px;
}
.home-empty-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 24px;
  background: #1A1A1A;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  text-decoration: none;
  margin-bottom: 32px;
  transition: background 0.15s;
}
.home-empty-cta:hover {
  background: #333;
}
.home-empty-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.home-empty-chip {
  display: flex;
  align-items: center;
  border-radius: 20px;
  padding: 6px 14px;
  border: 1px solid;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 400;
  line-height: 16px;
  text-decoration: none;
  transition: filter 0.15s;
}
.home-empty-chip:hover {
  filter: brightness(0.95);
}
.entity-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.entity-list li {
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.project-task-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: 16px 20px;
}
.project-task-banner-running {
  border-color: var(--border-info-soft);
}
.project-task-banner-queued {
  border-color: var(--border-brand-soft);
}
.project-task-banner-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.project-task-indicator {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.project-task-indicator-running {
  background: var(--accent-info);
  box-shadow: 0 0 0 4px rgb(46 122 158 / 20%);
  animation: project-task-indicator-pulse 1.6s ease-in-out infinite;
}
.project-task-indicator-queued {
  background: var(--accent-brand);
  box-shadow: 0 0 0 4px rgb(196 98 58 / 18%);
}
.project-task-banner-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.project-task-banner-text strong {
  font-family: var(--font-display);
  font-size: var(--text-md);
  line-height: 1.28;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-task-banner-text .muted {
  font-size: var(--text-sm);
  line-height: 1.33;
}
.project-task-banner-link {
  border: 1px solid var(--border-panel);
  border-radius: 7px;
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 6px 12px;
  font-size: var(--text-sm);
  line-height: 1.33;
  text-decoration: none;
  white-space: nowrap;
}
.project-task-banner-link:hover {
  border-color: var(--border-soft);
  background: var(--bg-surface-subtle);
}
.project-task-banner-link:active {
  background: var(--bg-input-soft);
}
@keyframes project-task-indicator-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18);
  }
}
.project-header-card {
  border: none;
  background: transparent;
  padding: 0 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.project-header-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.project-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
}
.project-header-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.project-header-copy h1 {
  font-family:
    "DM Sans",
    var(--font-display),
    sans-serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 32px;
  color: var(--text-primary-strong);
}
.project-header-copy .muted {
  font-size: var(--text-md);
  line-height: 20px;
}
.project-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.project-share-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-panel);
  border-radius: 20px;
  background: var(--bg-card);
  padding: 6px 16px;
  font-size: 13px;
  line-height: 18px;
  color: var(--text-secondary);
  cursor: pointer;
}
.project-share-button:hover {
  border-color: var(--border-soft);
  color: var(--text-primary);
}
.project-share-button:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.project-share-button:disabled {
  opacity: 0.6;
  cursor: default;
}
.project-shared-indicator {
  font-size: 13px;
  color: var(--text-secondary);
}
.project-member-stack {
  display: inline-flex;
  align-items: center;
  min-width: 28px;
  min-height: 28px;
}
.project-member-stack-avatar,
.project-member-stack-more,
.share-row-avatar,
.user-initial-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: 1px solid var(--bg-card);
  background: var(--bg-elevated);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1;
  object-fit: cover;
  flex-shrink: 0;
}
.project-member-stack-avatar + .project-member-stack-avatar,
.project-member-stack-more {
  margin-left: -8px;
}
.project-member-stack-more {
  background: var(--text-primary);
  color: var(--text-inverse);
  font-size: 10px;
}
.artifact-sharing {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.artifact-sharing-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  background: var(--bg-card);
  padding: 0 12px 0 6px;
  font-size: 13px;
  line-height: 18px;
  color: var(--text-secondary);
  cursor: pointer;
}
.artifact-sharing-trigger:hover,
.artifact-sharing-trigger[aria-expanded=true] {
  border-color: var(--border-panel);
  color: var(--text-primary);
}
.artifact-sharing-trigger:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.artifact-sharing-trigger-label {
  font-weight: 600;
}
.artifact-sharing-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: 280px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: var(--space-4);
  box-shadow: 0 18px 40px rgb(28 25 23 / 16%);
}
.artifact-sharing-popover-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.artifact-sharing-popover-header strong {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary-strong);
}
.artifact-sharing-popover-header .muted {
  font-size: 12px;
}
.artifact-sharing-popover-body {
  display: flex;
  flex-direction: column;
}
.artifact-sharing-popover-body .share-row:first-child {
  border-top: none;
  padding-top: 0;
}
.artifact-sharing-popover-footer {
  display: flex;
  border-top: 1px solid var(--border-panel);
  padding-top: var(--space-3);
}
.artifact-sharing-popover-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent-info);
  text-decoration: none;
}
.artifact-sharing-popover-link:hover {
  text-decoration: underline;
}
.share-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 72px 28px;
  background: rgb(0 0 0 / 12%);
}
.share-dialog {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: var(--space-5);
  box-shadow: 0 18px 40px rgb(28 25 23 / 16%);
}
.share-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}
.share-dialog-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 24px;
  color: var(--text-primary-strong);
}
.share-dialog-header .muted {
  margin-top: 2px;
  font-size: var(--text-sm);
  line-height: 18px;
}
.share-dialog-grid h3 {
  margin: 0 0 var(--space-1);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.topbar-account-menu button {
  border: 1px solid var(--border-panel);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 6px 10px;
  cursor: pointer;
}
.share-dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.share-dialog-close:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.share-row button {
  flex-shrink: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  padding: 5px 10px;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
}
.share-row button:hover {
  border-color: var(--border-soft);
  background: var(--bg-elevated);
  color: var(--color-error);
}
.share-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.share-dialog-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.share-dialog-grid > section {
  display: flex;
  flex-direction: column;
}
.share-dialog-grid section > .muted {
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
}
.share-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border-top: 1px solid var(--border-panel);
  padding: var(--space-3) 0;
}
.share-row-main,
.share-row-copy,
.topbar-account-copy {
  display: flex;
}
.share-row-main {
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.share-row-copy,
.topbar-account-copy {
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.share-row-copy strong,
.share-row-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-row-copy strong {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
}
.share-row-copy span,
.topbar-account-copy span {
  font-size: 12px;
  color: var(--text-secondary);
}
.share-role-chip,
.share-owner-tag,
.project-shared-badge,
.sidebar-project-shared-pill,
.artifact-workspace-sidebar-shared-pill {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  background: var(--bg-input-soft);
  color: var(--text-secondary);
  padding: 3px 8px;
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}
.share-owner-tag {
  background: var(--bg-card-soft);
  color: var(--accent-info);
  border-color: var(--border-info-soft);
}
.share-link-field {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1 1 100%;
  min-width: 0;
}
.share-link-field input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-sm);
  background: var(--bg-input-soft);
  color: var(--text-secondary);
  padding: 7px 10px;
  font: inherit;
  font-size: var(--text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-link-field button {
  flex-shrink: 0;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 7px 12px;
  font-size: var(--text-sm);
  cursor: pointer;
}
.share-link-field button:hover {
  border-color: var(--border-soft);
}
.share-link-field span {
  flex-shrink: 0;
  color: var(--color-success);
  font-size: var(--text-sm);
  font-weight: 600;
}
.invite-page {
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.invite-panel {
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-2xl);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.96),
      rgba(250, 247, 242, 0.96));
  padding: var(--space-8);
  box-shadow: 0 16px 40px rgb(59 44 31 / 8%);
}
.invite-panel h1 {
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.invite-accept-button {
  width: 100%;
}
.project-brief-card {
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  padding: 24px;
  display: flex;
  align-items: stretch;
  gap: 24px;
}
.project-brief-left {
  width: min(280px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}
.project-brief-label {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary-strong);
}
.project-brief-description {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.55;
}
.project-brief-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}
.project-brief-action {
  text-decoration: none;
}
.project-brief-divider {
  width: 1px;
  align-self: stretch;
  background: var(--border-soft);
  flex-shrink: 0;
}
.project-brief-preview {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-start;
}
.project-brief-preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.project-brief-file-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg-card-soft);
  color: var(--text-secondary);
  flex-shrink: 0;
}
.project-brief-filename {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.project-brief-preview-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary-strong);
}
.project-brief-preview-body {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-brief-empty {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.55;
}
.project-brief-header-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-panel);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-secondary);
  padding: 8px 16px;
  cursor: pointer;
}
.project-brief-header-button:hover {
  border-color: var(--border-soft);
  color: var(--text-primary);
  background: var(--bg-card-soft);
}
.project-brief-header-button:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.project-brief-header-button:disabled {
  opacity: 0.6;
  cursor: default;
}
.project-brief-page-empty {
  width: 100%;
  max-width: 800px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}
.project-brief-page-empty h2,
.project-brief-page-empty p {
  margin: 0;
}
.project-artifact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.project-artifact-card {
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 260px;
  flex: 1 1 320px;
}
.project-artifact-card[data-widget-size=wide] {
  flex: 1 1 100%;
}
.project-artifact-card[data-widget-size=main] {
  flex: 1 1 460px;
}
.project-artifact-card[data-widget-size=narrow] {
  flex: 1 1 280px;
  max-width: 420px;
}
.project-artifact-card[data-widget-height=tall] {
  min-height: 280px;
}
.project-artifact-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.project-artifact-card-header .project-shared-badge,
.widget-runtime-shared-badge {
  margin-left: auto;
}
.project-artifact-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid rgb(28 25 23 / 10%);
  background: var(--accent-info);
  color: var(--text-inverse);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  flex-shrink: 0;
}
.project-artifact-icon-default {
  background: var(--bg-card);
  color: var(--text-secondary);
  border-color: var(--border-soft);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.project-artifact-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.project-artifact-card-copy h2 {
  font-size: var(--text-xl);
  line-height: 1.22;
}
.project-artifact-card-copy .muted {
  font-size: var(--text-sm);
  line-height: 16px;
}
.project-artifact-card-copy p {
  overflow-wrap: anywhere;
}
.project-artifact-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--text-sm);
}
.project-artifact-card-meta span {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xs);
  background: var(--bg-input-soft);
  padding: 4px 8px;
  line-height: 16px;
}
.project-artifact-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.project-artifact-open-link {
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  padding: 6px 12px;
  font-size: var(--text-sm);
  line-height: 16px;
  text-decoration: none;
  white-space: nowrap;
}
.project-artifact-open-link:hover {
  text-decoration: underline;
  border-color: var(--border-soft);
}
.project-artifact-open-link:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.project-artifact-card-footer .muted {
  font-size: var(--text-sm);
  line-height: 16px;
}
.widget-runtime-card {
  gap: var(--space-2);
}
.widget-runtime-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.widget-runtime-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.widget-runtime-title-row h2 {
  font-size: var(--text-base);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-artifact-card .widget-runtime-title-row h2 {
  font-size: var(--text-xl);
  line-height: 1.22;
}
.widget-runtime-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  border: 1px solid rgb(28 25 23 / 10%);
  background: var(--accent-brand);
  color: var(--text-inverse);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  flex-shrink: 0;
}
.widget-runtime-open-button {
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 4px 10px;
  font-size: var(--text-sm);
  white-space: nowrap;
  cursor: pointer;
}
.project-artifact-card .widget-runtime-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}
.project-artifact-card .widget-runtime-open-button {
  border-radius: var(--radius-sm);
  padding: 6px 12px;
}
.widget-runtime-body {
  border: 1px solid var(--border-theme-soft);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: var(--space-3);
  min-height: 110px;
}
.widget-runtime-body > * {
  max-width: 100%;
}
.project-task-banner-link:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.recent-activity-bar {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.recent-activity-bar h2 {
  margin: 0;
  font-family:
    "Inter",
    var(--font-ui),
    sans-serif;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: #9A9590;
  padding-bottom: 14px;
}
.recent-activity-bar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.recent-activity-bar li {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}
.recent-activity-bar li + li {
  border-top: 1px solid #F0EDE8;
}
.recent-activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  transition: background-color 0.12s ease;
}
.recent-activity-row:hover {
  background-color: #F5F3F0;
}
.recent-activity-row:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: -2px;
}
.recent-activity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-info);
  flex-shrink: 0;
}
.recent-activity-dot-thread-working {
  box-shadow: 0 0 0 0 rgba(46, 122, 158, 0.28);
  animation: recent-activity-working-pulse 1.6s ease-out infinite;
}
.recent-activity-summary-thread-working {
  color: #2f5768;
}
.recent-activity-summary-thread-error {
  color: #8f3030;
}
.recent-activity-summary {
  font-family:
    "Inter",
    var(--font-ui),
    sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #3A3835;
  line-height: 18px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-activity-summary strong {
  font-weight: 500;
}
.recent-activity-time {
  font-family:
    "Inter",
    var(--font-ui),
    sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #B5B0AA;
  line-height: 16px;
  white-space: nowrap;
  flex-shrink: 0;
}
@keyframes recent-activity-working-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 122, 158, 0.28);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(46, 122, 158, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 122, 158, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .recent-activity-dot-thread-working {
    animation: none;
  }
}
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.activity-feed-description {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--text-muted);
}
.activity-feed-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.activity-feed-row {
  display: grid;
  grid-template-columns: 56px 8px 1fr;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}
.activity-feed-row:hover {
  background: rgba(31, 28, 24, 0.03);
}
.activity-feed-row:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.activity-feed-row-time {
  font-size: 12px;
  line-height: 16px;
  color: var(--text-muted);
  white-space: nowrap;
}
.activity-feed-row-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  flex-shrink: 0;
  background: #8b7565;
  justify-self: center;
}
.activity-feed-row-label {
  font-size: 13px;
  line-height: 18px;
  color: #1f1c18;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shell-main-artifacts {
  gap: 0;
  padding: 0;
}
.page-scroll-artifact-workspace {
  gap: 0;
  overflow: hidden;
}
.artifact-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  background: #fbfbfa;
  color: var(--text-primary);
}
.artifact-workspace-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.artifact-workspace-topbar {
  flex-shrink: 0;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 10px 14px 10px 18px;
  border-bottom: 1px solid var(--border-panel);
  background: #fff;
}
.artifact-workspace-topbar-main {
  flex: 1;
  min-width: 0;
}
.artifact-workspace-topbar-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.artifact-workspace-topbar-title h1 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--text-lg);
  line-height: 23px;
  font-weight: 650;
  color: var(--text-primary-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.artifact-workspace-topbar-title p {
  margin: 0;
  font-size: var(--text-xs);
  line-height: 15px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.artifact-workspace-breadcrumbs {
  row-gap: 4px;
}
.artifact-workspace-breadcrumbs .topbar-breadcrumb-link,
.artifact-workspace-breadcrumbs .topbar-breadcrumb-current,
.artifact-workspace-breadcrumbs .topbar-separator {
  font-size: 15px;
  line-height: 20px;
}
.artifact-workspace-topbar-meta {
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.artifact-workspace-breadcrumb-static {
  cursor: default;
}
.artifact-workspace-topbar-actions {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  min-width: 0;
}
.artifact-workspace-pane-toggles {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.artifact-workspace-pane-toggle {
  flex-shrink: 0;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 0 10px;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
}
.artifact-workspace-pane-toggle:hover:not(:disabled) {
  background: var(--bg-card-soft);
}
.artifact-workspace-pane-toggle:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.artifact-workspace-pane-toggle-active {
  border-color: color-mix(in srgb, var(--accent-info) 46%, var(--border-soft));
  background: #f6fbff;
  color: var(--accent-info-strong);
}
.artifact-workspace-pane-toggle:disabled {
  opacity: 0.45;
  cursor: default;
}
.artifact-workspace-version-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.artifact-workspace-version-select {
  height: 34px;
  max-width: 112px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 0 30px 0 11px;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
}
.artifact-workspace-version-select:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.artifact-workspace-version-status,
.artifact-workspace-version-error {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-xs);
  line-height: 15px;
}
.artifact-workspace-version-status {
  color: var(--text-secondary);
}
.artifact-workspace-version-error {
  color: var(--accent-danger);
}
.artifact-workspace-pane-row {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}
.artifact-workspace-list-pane {
  flex: 0 0 var(--artifact-list-pane-width, 294px);
  width: var(--artifact-list-pane-width, 294px);
  min-width: 0;
  min-height: 0;
  display: flex;
  overflow: hidden;
  border-right: 1px solid var(--border-panel);
  background: #f6f3ef;
  transition:
    flex-basis 180ms ease,
    width 180ms ease,
    border-color 180ms ease;
}
.artifact-workspace-list-pane-closed {
  flex-basis: 0;
  width: 0;
  border-right-color: transparent;
}
.artifact-workspace-list-pane-inner {
  width: var(--artifact-list-pane-width, 294px);
  flex: 0 0 var(--artifact-list-pane-width, 294px);
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.artifact-workspace-list-header {
  flex-shrink: 0;
  padding: 15px 14px 10px;
}
.artifact-workspace-list-header h2 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: 20px;
  font-weight: 650;
}
.artifact-workspace-list-header p {
  margin: 2px 0 0;
  font-size: var(--text-xs);
  line-height: 15px;
  color: var(--text-secondary);
}
.artifact-workspace-list-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 8px 14px;
}
.artifact-workspace-list-status,
.artifact-workspace-list-note {
  margin: 0;
  padding: 8px 8px;
  font-size: var(--text-xs);
  line-height: 16px;
}
.artifact-workspace-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
}
.artifact-workspace-sidebar-section h3 {
  margin: 0;
  padding: 0 8px 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  line-height: 15px;
  font-weight: 700;
  color: var(--text-secondary);
}
.artifact-workspace-sidebar-section-name,
.artifact-workspace-sidebar-section-link {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.artifact-workspace-sidebar-section-link {
  color: inherit;
  text-decoration: none;
}
.artifact-workspace-sidebar-shared-pill {
  margin-left: auto;
  padding: 2px 7px;
  font-size: 10px;
  line-height: 13px;
}
.artifact-workspace-sidebar-section-link:hover {
  color: var(--text-primary);
}
.artifact-workspace-sidebar-section-link:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
  border-radius: 4px;
}
.artifact-workspace-sidebar-section-active {
  position: relative;
}
.artifact-workspace-sidebar-section-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: var(--radius-pill);
  background: var(--accent-brand);
}
.artifact-workspace-sidebar-section-title-active,
.artifact-workspace-sidebar-section-title-active .artifact-workspace-sidebar-section-link {
  color: var(--text-primary);
}
.artifact-workspace-sidebar-empty {
  margin: 0;
  padding: 0 8px 4px;
  font-size: var(--text-xs);
  line-height: 15px;
  color: var(--text-muted);
}
.artifact-workspace-sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.artifact-workspace-sidebar-row {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}
.artifact-workspace-sidebar-row:hover {
  background: rgb(255 255 255 / 64%);
}
.artifact-workspace-sidebar-row:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.artifact-workspace-sidebar-row-active {
  background: #fff;
  box-shadow: 0 1px 2px rgb(31 28 24 / 5%);
}
.artifact-workspace-sidebar-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
}
.artifact-workspace-sidebar-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.artifact-workspace-sidebar-title,
.artifact-workspace-sidebar-subtitle {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.artifact-workspace-sidebar-title {
  font-size: var(--text-sm);
  line-height: 18px;
  color: var(--text-primary);
}
.artifact-workspace-sidebar-subtitle {
  font-size: 11px;
  line-height: 14px;
  color: var(--text-secondary);
}
.artifact-workspace-sidebar-status-slot {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  margin-left: auto;
}
.artifact-workspace-sidebar-spinner {
  width: 13px;
  height: 13px;
  display: inline-block;
  border-radius: 999px;
  border: 2px solid rgb(48 127 201 / 22%);
  border-top-color: var(--accent-info);
  animation: sidebar-task-spin 0.8s linear infinite;
}
.artifact-workspace-sidebar-unread {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 999px;
  background: var(--accent-info);
  box-shadow: 0 0 0 2px rgb(48 127 201 / 14%);
}
.artifact-workspace-sidebar-unread-error {
  background: var(--color-error);
  box-shadow: 0 0 0 2px rgb(220 38 38 / 14%);
}
.artifact-workspace-chat-pane {
  flex: 0 0 var(--artifact-chat-pane-width, min(38vw, var(--chat-panel-width-wide)));
  width: var(--artifact-chat-pane-width, min(38vw, var(--chat-panel-width-wide)));
  min-width: 360px;
  max-width: 760px;
  min-height: 0;
  display: flex;
  overflow: hidden;
  border-right: 1px solid var(--border-panel);
  background: var(--bg-card);
  transition:
    flex-basis 180ms ease,
    width 180ms ease,
    min-width 180ms ease,
    border-color 180ms ease;
}
.artifact-workspace-chat-pane-closed {
  flex-basis: 0;
  width: 0;
  min-width: 0;
  border-right-color: transparent;
}
.artifact-workspace-chat-pane-inner {
  width: var(--artifact-chat-pane-width, min(38vw, var(--chat-panel-width-wide)));
  flex: 0 0 var(--artifact-chat-pane-width, min(38vw, var(--chat-panel-width-wide)));
  min-height: 0;
  display: flex;
}
.artifact-workspace-resizing .artifact-workspace-list-pane,
.artifact-workspace-resizing .artifact-workspace-chat-pane {
  transition: none;
}
.artifact-workspace-resizing iframe {
  pointer-events: none;
}
.artifact-workspace-resize-handle {
  position: relative;
  z-index: 4;
  flex: 0 0 9px;
  width: 9px;
  margin-left: -5px;
  margin-right: -4px;
  min-height: 0;
  cursor: col-resize;
  background: transparent;
  outline: none;
}
.artifact-workspace-resize-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  width: 1px;
  background: transparent;
  transition: background 120ms ease, box-shadow 120ms ease;
}
.artifact-workspace-resize-handle:hover::before,
.artifact-workspace-resize-handle-active::before,
.artifact-workspace-resize-handle:focus-visible::before {
  background: color-mix(in srgb, var(--accent-info) 64%, var(--border-panel));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-info) 14%, transparent);
}
.artifact-workspace-chat-pane .chat-panel {
  flex: 1;
  width: 100%;
  border: 0;
  box-shadow: none;
}
.artifact-workspace-preview-pane {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}
.artifact-workspace-status,
.artifact-workspace-empty-state {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6);
}
.artifact-workspace-preview-pane > .artifact-runtime-host,
.artifact-workspace-preview-pane > .html-artifact-view,
.artifact-workspace-preview-pane > .static-site-artifact-view,
.artifact-workspace-preview-pane > .artifact-component-host {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.artifact-workspace-preview-pane .html-artifact-view {
  gap: 0;
}
.artifact-runtime-host > .html-artifact-view,
.artifact-runtime-host > .static-site-artifact-view,
.artifact-runtime-host > .artifact-component-host {
  width: 100%;
  flex: 1;
  min-height: 0;
}
.artifact-workspace-preview-pane > .markdown-viewer,
.artifact-workspace-preview-pane > .file-detail-view,
.artifact-workspace-preview-pane > .artifact-data-fallback,
.artifact-workspace-preview-pane > .artifact-runtime-fallback {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}
.artifact-runtime-host > .markdown-viewer,
.artifact-runtime-host > .file-detail-view,
.artifact-runtime-host > .artifact-data-fallback,
.artifact-runtime-host > .artifact-runtime-fallback {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.artifact-workspace-preview-pane .static-site-chrome {
  flex: none;
  border: 0;
  border-bottom: 1px solid var(--border-panel);
  border-radius: 0;
}
.artifact-workspace-preview-pane .html-artifact-frame-shell {
  flex: 1 1 0;
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.artifact-workspace-preview-pane .html-artifact-frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.artifact-workspace-empty-preview {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: #fbfbfa;
}
.artifact-workspace-empty-preview-copy {
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  color: var(--text-secondary);
}
.artifact-workspace-empty-preview-copy > span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text-secondary);
  background: #fff;
}
.artifact-workspace-empty-preview-copy h2 {
  margin: 6px 0 0;
  font-family: var(--font-ui);
  font-size: var(--text-lg);
  line-height: 23px;
  color: var(--text-primary);
}
.artifact-workspace-empty-preview-copy p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 19px;
}
.artifact-workspace-empty-state h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.25;
}
.artifact-page {
  gap: var(--space-4);
}
.artifact-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.artifact-breadcrumbs a {
  text-decoration: none;
}
.artifact-breadcrumbs a:hover {
  text-decoration: underline;
}
.artifact-header-card {
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-xl);
  background: var(--bg-card-soft);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}
.artifact-header-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.artifact-header-main h1 {
  font-size: var(--text-3xl);
  line-height: 1.23;
}
.artifact-header-main .muted {
  font-size: var(--text-md);
  line-height: 1.35;
}
.artifact-version-chip {
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-secondary);
  padding: 5px 10px;
  font-size: var(--text-xs);
  line-height: 14px;
  white-space: nowrap;
}
.artifact-overview-card {
  gap: var(--space-4);
}
.artifact-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--text-sm);
}
.artifact-meta-row span {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  background: var(--bg-input-soft);
  padding: 4px 10px;
  font-size: var(--text-sm);
  line-height: 16px;
}
.artifact-description {
  margin: 0;
  font-size: var(--text-md);
  line-height: 1.45;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.artifact-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--text-sm);
}
.artifact-links-row a {
  color: var(--accent-info-strong);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  line-height: 1.25;
}
.artifact-links-row a:hover {
  border-bottom-color: currentcolor;
}
.artifact-links-row a:focus {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.artifact-links-row a:focus:not(:focus-visible) {
  outline: none;
}
.artifact-links-row a:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.artifact-data-fallback {
  gap: var(--space-3);
}
.artifact-data-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.artifact-data-pre {
  margin: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-surface-subtle);
  padding: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.4;
  overflow: auto;
  max-height: 420px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.artifact-runtime-loading {
  gap: var(--space-2);
}
.artifact-runtime-host {
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.artifact-update-banner {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-info-soft);
  background: #eef6fa;
  color: #1c4658;
  box-shadow: inset 3px 0 0 var(--accent-info);
}
.artifact-update-banner-avatar {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  border: 1px solid var(--bg-card);
  background: var(--accent-info);
  color: var(--text-inverse);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xs);
  font-weight: 700;
  line-height: 1;
  object-fit: cover;
}
.artifact-update-banner-dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin: 0 2px;
  border-radius: var(--radius-full);
  background: var(--accent-info);
  box-shadow: 0 0 0 0 rgba(46, 122, 158, 0.45);
  animation: artifact-update-banner-pulse 2s ease-out infinite;
}
@keyframes artifact-update-banner-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 122, 158, 0.45);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(46, 122, 158, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 122, 158, 0);
  }
}
.artifact-update-banner-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-base);
  font-weight: 500;
}
.artifact-update-banner-actor {
  font-weight: 700;
}
.artifact-update-banner-action {
  flex: none;
  height: 28px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--accent-info);
  color: var(--text-inverse);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}
.artifact-update-banner-action:hover {
  background: #27697f;
}
.artifact-update-banner-action-icon {
  flex: none;
  width: 15px;
  height: 15px;
}
@media (prefers-reduced-motion: reduce) {
  .artifact-update-banner-dot {
    animation: none;
  }
}
.artifact-runtime-card {
  background: var(--bg-card);
}
.artifact-component-host {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.artifact-runtime-fallback {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.artifact-runtime-error-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: #fff6f3;
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.artifact-runtime-error-card h3 {
  margin: 0;
}
.html-artifact-view {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.static-site-chrome {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 8px;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-lg);
  background: var(--bg-surface-subtle);
}
.static-site-chrome-controls {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
}
.static-site-chrome-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}
.static-site-chrome-button:hover:not(:disabled) {
  background: rgba(18, 15, 12, 0.06);
  color: var(--text-primary);
}
.static-site-chrome-button:disabled {
  color: var(--text-muted);
  cursor: default;
}
.static-site-chrome-address {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 4px;
  cursor: default;
}
.static-site-chrome-address-icon {
  flex: none;
  display: inline-flex;
  color: var(--text-muted);
}
.static-site-chrome-address-path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  user-select: text;
}
.static-site-chrome-open {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--accent-info-strong);
  text-decoration: none;
}
.static-site-chrome-open:hover {
  background: rgba(18, 15, 12, 0.06);
}
.html-artifact-frame-shell {
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 0 rgba(18, 15, 12, 0.04);
}
.html-artifact-launch-card {
  align-items: flex-start;
  padding: 28px;
}
.html-artifact-launch-chip {
  margin-bottom: 4px;
}
.html-artifact-launch-card h2 {
  margin: 0;
}
.html-artifact-launch-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 680px;
}
.html-artifact-launch-copy p {
  margin: 0;
}
.html-artifact-launch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.html-artifact-frame {
  display: block;
  width: 100%;
  height: min(76vh, 920px);
  min-height: 640px;
  border: 0;
  background: #fff;
}
.markdown-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  padding: 0 var(--space-6) var(--space-6);
}
.markdown-doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  max-width: 800px;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-soft);
}
.markdown-doc-header-main {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  flex: 1;
}
.markdown-doc-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-card-soft);
  color: var(--text-secondary);
}
.markdown-doc-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.markdown-doc-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
}
.markdown-doc-info {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.artifact-more-wrap,
.file-action-more-wrap {
  position: relative;
}
.artifact-more-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
}
.artifact-more-icon-btn:hover {
  background: var(--bg-card-soft);
  color: var(--text-primary);
}
.artifact-more-icon-btn:focus-visible {
  outline: 2px solid var(--accent-brand);
  outline-offset: 2px;
}
.artifact-more-icon-btn:focus:not(:focus-visible) {
  outline: none;
}
.markdown-prose {
  width: 100%;
  max-width: 800px;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.7;
}
.markdown-prose-plain {
  display: flex;
  flex-direction: column;
}
.markdown-prose h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.markdown-prose h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin: 40px 0 12px;
}
.markdown-prose h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  margin: 32px 0 8px;
}
.markdown-prose h4 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 24px 0 8px;
}
.markdown-prose p {
  margin: 0 0 16px;
}
.markdown-prose hr {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 24px 0;
}
.markdown-prose ul,
.markdown-prose ol {
  margin: 0 0 16px;
  padding-left: 24px;
}
.markdown-prose li {
  margin: 6px 0;
}
.markdown-prose li::marker {
  color: var(--accent-brand);
}
.markdown-prose ul.contains-task-list,
.markdown-prose ol.contains-task-list {
  padding-left: 0;
}
.markdown-prose li.task-list-item {
  list-style: none;
}
.markdown-prose li.task-list-item::marker {
  content: "";
}
.markdown-task-row {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
}
.markdown-task-row-disabled {
  cursor: wait;
}
.markdown-task-checkbox {
  width: 16px;
  height: 16px;
  margin: calc((1.7em - 16px) / 2) 10px 0 0;
  cursor: pointer;
  flex: 0 0 auto;
}
.markdown-task-row-disabled .markdown-task-checkbox {
  cursor: wait;
}
.markdown-task-content {
  cursor: inherit;
}
.markdown-task-content a {
  cursor: pointer;
}
.markdown-task-feedback {
  margin: 8px 0 0;
}
.markdown-task-feedback-error {
  color: var(--color-error);
}
.markdown-prose strong {
  font-weight: 600;
}
.markdown-prose a {
  color: var(--accent-brand);
  text-decoration: none;
}
.markdown-prose a:hover {
  text-decoration: underline;
}
.markdown-prose blockquote {
  margin: 24px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--accent-brand);
  background: var(--bg-card-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
  font-style: italic;
}
.markdown-prose blockquote p {
  margin: 0;
}
.markdown-prose details {
  margin: 28px 0;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-md);
  background: var(--bg-card-soft);
  overflow: hidden;
}
.markdown-prose summary {
  cursor: pointer;
  padding: 14px 18px;
  color: var(--text-primary);
  background: var(--bg-surface-subtle);
  font-weight: 700;
  line-height: 1.35;
}
.markdown-prose summary:hover {
  background: var(--bg-card);
}
.markdown-prose summary:focus-visible {
  outline: 2px solid var(--accent-brand);
  outline-offset: -2px;
}
.markdown-prose details[open] summary {
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 16px;
}
.markdown-prose details > :not(summary) {
  margin-left: 18px;
  margin-right: 18px;
}
.markdown-prose details > :last-child {
  margin-bottom: 18px;
}
.markdown-prose pre {
  margin: 16px 0;
  padding: var(--space-3);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
}
.markdown-prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-surface-subtle);
  padding: 2px 5px;
  border-radius: 3px;
}
.markdown-prose pre code {
  background: transparent;
  padding: 0;
}
.markdown-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}
.markdown-prose thead th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-panel);
}
.markdown-prose tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
.markdown-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}
.markdown-plain-text {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 26px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.file-detail-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  padding-top: 64px;
}
.file-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.file-hero-icon {
  position: relative;
  width: 160px;
  height: 184px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f5f4f1;
  border: 1px solid #e8e6e3;
  border-radius: 16px;
  color: #9c9c9c;
}
.file-hero-icon > svg {
  position: relative;
  z-index: 1;
}
.file-hero-icon-corner {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 44px;
  height: 44px;
  background: #eceae7;
  border-left: 1px solid #e8e6e3;
  border-bottom: 1px solid #e8e6e3;
  border-top-right-radius: 16px;
  border-bottom-left-radius: 12px;
}
.file-ext-badge {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  padding: 5px 14px;
  background: #e8652e;
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.06em;
  border-radius: 5px;
}
.file-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.file-hero-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 34px;
  letter-spacing: -0.02em;
  color: #2c2c2c;
}
.file-hero-meta {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 18px;
  color: #8c8c8c;
}
.file-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  margin-top: 20px;
}
.file-action-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border: 1px solid #dedbd7;
  border-radius: 8px;
  background: #fff;
  color: #5c5c5c;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  cursor: pointer;
  text-decoration: none;
}
.file-action-btn:hover:not(:disabled) {
  background: #f5f4f1;
}
.file-action-btn:disabled {
  opacity: 1;
  cursor: default;
  color: #8c8c8c;
}
.file-action-primary {
  gap: 8px;
  padding-inline: 24px;
  background: #2c2c2c;
  color: #fff;
  border-color: #2c2c2c;
  font-family: var(--font-display);
  font-weight: 600;
}
.file-action-primary:hover {
  background: #1f1f1f;
  border-color: #1f1f1f;
}
.file-action-more {
  background: #f0efec;
}
.file-more-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 192px;
  background: #fff;
  border: 1px solid #eceae7;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgb(0 0 0 / 12%), 0 1px 4px rgb(0 0 0 / 6%);
  padding: 5px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.file-more-dropdown button,
.file-more-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #3d3d3d;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
  cursor: pointer;
  text-decoration: none;
  text-align: left;
}
.file-more-dropdown button:hover:not(:disabled),
.file-more-dropdown a:hover {
  background: #f5f4f1;
}
.file-more-dropdown button:disabled {
  opacity: 1;
  cursor: default;
  color: #8c8c8c;
}
.file-more-dropdown svg {
  flex-shrink: 0;
}
.file-more-dropdown hr {
  border: none;
  border-top: 1px solid #eceae7;
  margin: 3px 8px;
}
.file-more-danger {
  color: #c44a3f !important;
}
@media (max-width: 640px) {
  .markdown-doc-header {
    align-items: flex-start;
  }
  .project-brief-card {
    flex-direction: column;
    padding: 20px;
  }
  .project-brief-left {
    width: 100%;
  }
  .project-brief-divider {
    width: 100%;
    height: 1px;
  }
  .project-brief-header-button {
    width: 100%;
    justify-content: center;
  }
}
.file-details-table {
  width: min(480px, 100%);
  display: flex;
  flex-direction: column;
  margin-top: 40px;
}
.file-details-heading {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9c9c9c;
  padding-bottom: 14px;
  margin: 0;
}
.file-details-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid #eceae7;
  font-size: 13px;
  line-height: 16px;
}
.file-details-row:last-child {
  border-bottom: 1px solid #eceae7;
}
.file-details-label {
  color: #8c8c8c;
  flex-shrink: 0;
}
.file-details-value {
  text-align: right;
  min-width: 0;
  color: #2c2c2c;
  font-weight: 500;
}
.file-details-value-accent {
  color: inherit;
}
.file-details-value-muted {
  color: #9c9c9c;
  font-weight: 400;
}
.detail-card {
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.detail-card h2 {
  font-size: var(--text-2xl);
  line-height: 1.25;
}
.status-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 6px;
  border: 1px solid #e9dfd5;
  background: #f7f4ee;
  color: #845e3f;
  padding: 5px 10px;
  font-size: var(--text-xs);
  line-height: 14px;
  font-weight: 500;
}
.chat-panel {
  width: var(--chat-panel-width-narrow);
  flex-shrink: 0;
  height: 100%;
  min-height: 0;
  border-left: 1px solid var(--border-panel);
  background: var(--bg-card);
  box-shadow: rgb(0 0 0 / 3%) -4px 0 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel-wide {
  width: var(--chat-panel-width-wide);
}
.chat-panel-page {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  border-left: 0;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-2xl);
  box-shadow: none;
}
.chat-panel-top {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--border-panel);
  flex-shrink: 0;
}
.chat-panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}
.chat-panel-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.chat-panel-title-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.chat-panel-title-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chat-panel-swatch,
.chat-panel-artifact-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 5px;
}
.chat-panel-artifact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.chat-panel-header {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-panel-context {
  margin-top: 2px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-panel-header-meta {
  display: flex;
  align-items: center;
  min-width: 0;
  margin-top: 6px;
}
.chat-panel-viewing-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  padding: 3px 7px;
  border: 1px solid var(--border-panel);
  border-radius: 999px;
  background: var(--bg-surface-subtle);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-panel-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  flex-shrink: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 5px 10px;
}
.chat-panel-close:hover {
  background: var(--bg-surface-subtle);
}
.chat-panel-context-button,
.chat-message-context-button {
  border: 1px solid var(--border-panel);
  border-radius: 6px;
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1;
}
.chat-panel-context-button {
  min-height: 28px;
  padding: 6px 9px;
}
.chat-message-context-button {
  min-height: 24px;
  padding: 5px 8px;
}
.chat-panel-context-button:hover,
.chat-message-context-button:hover {
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
}
.chat-panel-context-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.chat-thread-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0 18px 12px;
}
.chat-thread-select-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-subtle);
  padding: 6px 12px;
  cursor: pointer;
  position: relative;
}
.chat-thread-select-pill-static {
  cursor: default;
  font-size: var(--text-sm);
  color: var(--text-primary);
}
.chat-thread-pill-icon {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.chat-thread-pill-chevron {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.chat-thread-select-pill select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-family: var(--font-ui);
  padding: 0;
  cursor: pointer;
  min-width: 0;
}
.chat-thread-select-pill select:focus-visible {
  outline: none;
}
.chat-thread-select-pill:focus-within {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.chat-thread-count-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  flex-shrink: 0;
}
.chat-thread-count {
  color: var(--text-muted);
}
.chat-thread-new-link {
  border: none;
  background: transparent;
  color: var(--accent-info);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  padding: 0 2px;
}
.chat-thread-new-link:disabled {
  color: var(--text-disabled);
  cursor: not-allowed;
}
.chat-input-form textarea:focus-visible,
.chat-input-form button:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.chat-context-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-panel);
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: transparent;
  border-radius: 0;
  border-top: none;
  border-left: none;
  border-right: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: auto;
  max-width: none;
  flex-shrink: 0;
}
.chat-knows-icon {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.chat-panel-top .muted,
.chat-panel-top .error-text {
  padding: 0 18px 8px;
}
.chat-panel-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.chat-message-list {
  border: 0;
  background: transparent;
  padding: var(--space-5) var(--space-5);
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.chat-thread-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding: 6px 0;
}
.chat-message-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 100%;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
}
.chat-message-meta {
  display: none;
}
.chat-message-row p {
  margin: 0;
  font-size: var(--text-md);
  line-height: 20px;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-message-actions {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 2px;
}
.chat-live-progress {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--accent-brand);
  min-height: 16px;
}
.chat-live-thinking-card {
  align-self: flex-start;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  max-width: 100%;
  border: 1px solid rgb(92 86 74 / 18%);
  border-radius: var(--radius-sm);
  background: #fafaf8;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.3;
  overflow: hidden;
}
.chat-live-thinking-card-expanded {
  width: min(520px, 100%);
}
.chat-live-thinking-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 7px 10px;
  cursor: pointer;
  outline: none;
}
.chat-live-thinking-summary:focus-visible {
  box-shadow: 0 0 0 2px rgb(208 106 45 / 28%);
}
.chat-live-thinking-label {
  white-space: nowrap;
}
.chat-live-thinking-count {
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  white-space: nowrap;
}
.chat-live-thinking-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: var(--text-tertiary);
  margin-left: auto;
  transition: transform 0.16s ease, color 0.16s ease;
  flex-shrink: 0;
}
.chat-live-thinking-summary:hover .chat-live-thinking-chevron {
  color: var(--text-secondary);
}
.chat-live-thinking-chevron-open {
  transform: rotate(90deg);
}
.chat-live-thinking-detail {
  border-top: 1px solid rgb(92 86 74 / 14%);
  padding: 8px 10px 10px;
}
.chat-live-thinking-pre {
  margin: 0;
  min-height: 18px;
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.45;
  color: var(--text-primary);
}
.chat-live-thinking-pre + .chat-live-thinking-pre {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgb(92 86 74 / 12%);
}
.chat-live-thinking-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-brand);
  box-shadow: 0 0 0 0 rgb(208 106 45 / 28%);
  animation: chat-live-thinking-pulse 1.15s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes chat-live-thinking-pulse {
  0%, 100% {
    opacity: 0.48;
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgb(208 106 45 / 26%);
  }
  50% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 5px rgb(208 106 45 / 0%);
  }
}
.chat-live-progress-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.chat-live-progress-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-brand);
  animation: chat-live-dot-pulse 1s ease-in-out infinite;
}
.chat-live-progress-dot:nth-child(2) {
  animation-delay: 0.15s;
}
.chat-live-progress-dot:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes chat-live-dot-pulse {
  0%, 80%, 100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-1px);
  }
}
.chat-streaming-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent-brand);
  border-radius: 1px;
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: chat-cursor-blink 1s ease-in-out infinite;
}
@keyframes chat-cursor-blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
.chat-card-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.chat-card {
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-sm);
  background: #fafaf8;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.chat-card-project-created {
  border-color: rgb(58 140 92 / 26%);
  background:
    linear-gradient(
      145deg,
      rgb(58 140 92 / 7%) 0%,
      #fafaf8 48%,
      #fff 100%);
  gap: var(--space-3);
}
.chat-card-background-task {
  border-color: rgb(54 102 149 / 24%);
  background:
    linear-gradient(
      145deg,
      rgb(54 102 149 / 8%) 0%,
      #fafaf8 46%,
      #fff 100%);
  gap: var(--space-3);
}
.chat-card-artifact-published {
  border-color: rgb(74 122 176 / 18%);
  background:
    linear-gradient(
      145deg,
      rgb(74 122 176 / 7%) 0%,
      #fafaf8 46%,
      #fff 100%);
  gap: var(--space-3);
}
.chat-card-agent-definition-proposal {
  border-color: rgb(54 102 149 / 24%);
  background:
    linear-gradient(
      145deg,
      rgb(54 102 149 / 6%) 0%,
      #fafaf8 44%,
      #fff 100%);
  gap: var(--space-3);
}
.chat-card-thinking {
  border-color: rgb(92 86 74 / 18%);
  background:
    linear-gradient(
      145deg,
      rgb(92 86 74 / 6%) 0%,
      #fafaf8 44%,
      #fff 100%);
  gap: 0;
}
.chat-message-compaction {
  justify-content: center;
}
.chat-compaction-card {
  width: min(100%, 560px);
  border: 1px solid rgb(76 120 108 / 22%);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(
      145deg,
      rgb(76 120 108 / 8%) 0%,
      #fbfbf8 52%,
      #fff 100%);
  color: var(--text-primary);
}
.chat-compaction-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  cursor: pointer;
  list-style: none;
}
.chat-compaction-summary::-webkit-details-marker {
  display: none;
}
.chat-compaction-icon {
  display: inline-flex;
  color: #3d7866;
  flex-shrink: 0;
}
.chat-compaction-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}
.chat-compaction-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary-strong);
}
.chat-compaction-meta {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-compaction-chevron {
  display: inline-flex;
  color: var(--text-tertiary);
  transition: transform 0.16s ease;
}
.chat-compaction-card[open] .chat-compaction-chevron {
  transform: rotate(180deg);
}
.chat-compaction-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid rgb(76 120 108 / 14%);
  padding: 10px 12px 12px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.chat-compaction-detail p {
  margin: 0;
  line-height: 1.45;
}
.chat-compaction-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.chat-compaction-section h4 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.chat-compaction-section ul {
  margin: 0;
  padding-left: 17px;
}
.chat-compaction-section li {
  margin: 2px 0;
  line-height: 1.4;
}
.chat-compaction-tech {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  margin: 0;
  border-top: 1px solid rgb(76 120 108 / 12%);
  padding-top: 9px;
}
.chat-compaction-tech div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px;
}
.chat-compaction-tech dt,
.chat-compaction-tech dd {
  margin: 0;
}
.chat-compaction-tech dt {
  color: var(--text-tertiary);
}
.chat-compaction-tech dd {
  overflow-wrap: anywhere;
  color: var(--text-secondary);
}
.chat-context-report-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
  background: rgb(30 30 30 / 18%);
}
.chat-context-report-drawer {
  width: min(720px, 92vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-left: 1px solid var(--border-panel);
  box-shadow: -12px 0 32px rgb(0 0 0 / 12%);
  color: var(--text-primary);
}
.chat-context-report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-panel);
}
.chat-context-report-title-block {
  min-width: 0;
}
.chat-context-report-title-block h3 {
  margin: 0;
  font-size: var(--text-lg);
  line-height: 1.25;
}
.chat-context-report-title-block p {
  margin: 3px 0 0;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-context-report-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}
.chat-context-report-close:hover {
  background: var(--bg-surface-subtle);
}
.chat-context-report-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-panel);
}
.chat-context-report-controls label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
}
.chat-context-report-controls select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border-panel);
  border-radius: 6px;
  background: #fff;
  color: var(--text-primary);
  font: inherit;
  font-weight: 500;
  padding: 7px 9px;
}
.chat-context-report-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--border-panel);
  border-radius: 6px;
  background: var(--bg-surface-subtle);
  padding: 2px;
}
.chat-context-report-tabs button {
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 6px 9px;
}
.chat-context-report-tabs .chat-context-report-tab-active {
  background: #fff;
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgb(0 0 0 / 8%);
}
.chat-context-report-muted,
.chat-context-report-error {
  margin: 0;
  padding: 12px 18px 0;
  font-size: var(--text-sm);
}
.chat-context-report-muted {
  color: var(--text-secondary);
}
.chat-context-report-error {
  color: var(--accent-error);
}
.chat-context-report-summary,
.chat-context-report-json {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.chat-context-report-summary {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 18px 22px;
}
.chat-context-report-json {
  margin: 0;
  padding: 16px 18px 22px;
  background: #111;
  color: #f5f5f1;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-context-report-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.chat-context-report-stats div {
  min-width: 0;
  border: 1px solid var(--border-panel);
  border-radius: 6px;
  background: #fafaf8;
  padding: 9px 10px;
}
.chat-context-report-stats dt {
  margin: 0 0 3px;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: 700;
}
.chat-context-report-stats dd {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}
.chat-context-report-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-context-report-section h4 {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.25;
}
.chat-context-report-section p,
.chat-context-report-section ul {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
.chat-context-report-section ul {
  padding-left: 18px;
}
.chat-context-report-table,
.chat-context-report-file-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-panel);
  border-radius: 6px;
  overflow: hidden;
}
.chat-context-report-row,
.chat-context-report-file {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(70px, 0.5fr) minmax(110px, 0.7fr);
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--border-panel);
  font-size: var(--text-xs);
}
.chat-context-report-file {
  grid-template-columns: minmax(0, 1fr) auto;
}
.chat-context-report-row:first-child,
.chat-context-report-file:first-child {
  border-top: 0;
}
.chat-context-report-row span,
.chat-context-report-file span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-context-report-row span:last-child,
.chat-context-report-file span:last-child {
  color: var(--text-secondary);
  text-align: right;
}
.chat-context-report-snapshot {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-context-report-snapshot-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: var(--text-sm);
}
.chat-context-report-snapshot-head span {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  white-space: nowrap;
}
@media (max-width: 720px) {
  .chat-context-report-controls {
    grid-template-columns: minmax(0, 1fr);
  }
  .chat-context-report-stats {
    grid-template-columns: minmax(0, 1fr);
  }
  .chat-context-report-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .chat-context-report-row span:last-child {
    text-align: left;
  }
}
.chat-card-route-head {
  display: flex;
  align-items: center;
}
.chat-card-route-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #296645;
  background: rgb(58 140 92 / 12%);
  border: 1px solid rgb(58 140 92 / 22%);
}
.chat-card-route-pill-info {
  color: #2f5f8c;
  background: rgb(54 102 149 / 12%);
  border-color: rgb(54 102 149 / 22%);
}
.chat-card-route-pill-success {
  color: #296645;
  background: rgb(58 140 92 / 12%);
  border-color: rgb(58 140 92 / 22%);
}
.chat-card-route-pill-error {
  color: #8c3a3a;
  background: rgb(176 74 74 / 12%);
  border-color: rgb(176 74 74 / 22%);
}
.chat-card-route-pill-artifact {
  color: #3d5f8f;
  background: rgb(74 122 176 / 12%);
  border-color: rgb(74 122 176 / 22%);
}
.chat-card-project-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-card-project-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 600;
}
.chat-card-project-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.chat-card-project-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary-strong);
}
.chat-card-project-desc {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.chat-card-artifact-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-card-artifact-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 600;
}
.chat-card-artifact-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.chat-card-artifact-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary-strong);
}
.chat-card-artifact-desc {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.chat-card-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid rgb(58 140 92 / 12%);
  padding-top: 12px;
}
.chat-card-task-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.chat-card-task-spinner-wrap {
  display: inline-flex;
  color: var(--accent-info);
  flex-shrink: 0;
}
.chat-card-task-check-wrap {
  display: inline-flex;
  color: #3a8c5c;
  flex-shrink: 0;
}
.chat-card-task-error-wrap {
  display: inline-flex;
  color: #b04a4a;
  flex-shrink: 0;
}
.card-task-spinner {
  animation: sidebar-task-spin 0.8s linear infinite;
}
.chat-card-task-title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}
.chat-card-task-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.chat-card-task-detail {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.chat-card-task-right {
  flex-shrink: 0;
}
.chat-card-task-row-standalone {
  border-top: 0;
  padding-top: 0;
}
.chat-card-task-status {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.chat-card-task-status-running {
  color: #2f5f8c;
}
.chat-card-task-status-completed {
  color: #296645;
}
.chat-card-task-status-failed {
  color: #8c3a3a;
}
.chat-card-task-note {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.chat-card-proposal-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-card-proposal-files {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-card-proposal-file {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-panel);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.chat-card-proposal-file-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}
.chat-card-proposal-file-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary-strong);
  flex-shrink: 0;
}
.chat-card-proposal-file-path {
  min-width: 0;
  flex: 1;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-card-proposal-file-chevron {
  flex-shrink: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.chat-card-proposal-diff {
  margin: 0;
  padding: 8px;
  border-top: 1px solid var(--border-panel);
  background: #f8f6f2;
  color: #4a3328;
  font-size: 11px;
  line-height: 1.45;
  overflow-x: auto;
  font-family: var(--font-mono);
}
.chat-card-proposal-diff-line {
  display: block;
  min-width: max-content;
  min-height: calc(1em * 1.45);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: pre;
}
.chat-card-proposal-diff-line + .chat-card-proposal-diff-line {
  margin-top: 2px;
}
.chat-card-proposal-diff-line-added {
  background: rgb(58 140 92 / 12%);
  color: #215338;
}
.chat-card-proposal-diff-line-removed {
  background: rgb(176 74 74 / 12%);
  color: #7c2d2d;
}
.chat-card-proposal-diff-line-meta {
  background: rgb(54 102 149 / 10%);
  color: #2f5f8c;
}
.chat-card-proposal-diff-line-context {
  color: #5a483c;
}
.chat-card-proposal-error {
  margin: 0;
}
.chat-card h4 {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary-strong);
}
.chat-card-thinking-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}
.chat-card-thinking-summary::-webkit-details-marker {
  display: none;
}
.chat-card-thinking-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.chat-card-thinking-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary-strong);
}
.chat-card-thinking-preview {
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--text-secondary);
}
.chat-card-thinking-count {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgb(92 86 74 / 9%);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}
.chat-card-thinking-detail {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-panel);
  background: rgb(255 255 255 / 82%);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow: auto;
}
.chat-card-blocks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chat-card-text {
  margin: 0;
}
.chat-card-text-muted {
  color: var(--text-secondary);
}
.chat-card-text-emphasis {
  font-weight: 600;
}
.chat-card-metric {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
}
.chat-card-metric span {
  color: var(--text-secondary);
}
.chat-card-metric strong {
  font-size: var(--text-md);
  color: var(--text-primary-strong);
}
.chat-card-metric em {
  color: var(--accent-info);
  font-style: normal;
  font-size: var(--text-xs);
}
.chat-card-callout {
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  border: 1px solid transparent;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-card-callout strong {
  font-size: var(--text-sm);
}
.chat-card-callout p {
  margin: 0;
}
.chat-card-callout-info {
  border-color: rgb(46 122 158 / 32%);
  background: rgb(46 122 158 / 9%);
}
.chat-card-callout-success {
  border-color: transparent;
  background: #3a8c5c0f;
  color: var(--color-tool-success);
}
.chat-card-callout-warning {
  border-color: rgb(217 119 6 / 30%);
  background: rgb(217 119 6 / 9%);
}
.chat-card-callout-error {
  border-color: rgb(220 38 38 / 30%);
  background: rgb(220 38 38 / 8%);
}
.chat-card-list {
  margin: 0;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-panel);
  border-radius: 8px;
}
.chat-card-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  line-height: 16px;
  color: var(--text-primary-strong);
}
.chat-card-list li::before {
  content: "";
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-bullet-accent);
}
.chat-card-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chat-card-action-row-artifact {
  border-top: 1px solid rgb(74 122 176 / 12%);
  padding-top: 12px;
}
.chat-card-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-panel);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-primary-strong);
  text-decoration: none;
  padding: 5px 10px;
  font-size: var(--text-xs);
  font-weight: 500;
  width: fit-content;
  cursor: pointer;
}
.chat-card-link-primary,
.chat-card-blocks .chat-card-link:first-of-type {
  background: var(--accent-info);
  border-color: var(--accent-info);
  color: #fff;
}
.chat-card-link-disabled {
  color: var(--text-muted);
  cursor: default;
  background: transparent;
}
.chat-message-user {
  align-self: flex-end;
  align-items: flex-end;
}
.chat-message-user > .chat-message-text {
  background: var(--bg-user-bubble);
  color: var(--text-user-bubble);
  border-radius: 14px 14px 4px 14px;
  padding: 10px 14px;
  max-width: 400px;
  width: fit-content;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-message-assistant {
  align-self: stretch;
  flex-direction: row;
  gap: 10px;
  align-items: flex-start;
}
.chat-message-assistant > .chat-assistant-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--accent-brand);
  margin-top: 0;
  position: relative;
}
.chat-message-assistant > .chat-assistant-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.chat-message-assistant > .chat-assistant-content > p {
  font-size: var(--text-md);
  line-height: 20px;
  color: var(--text-primary-strong);
}
.chat-message-markdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-primary-strong);
}
.chat-assistant-replay {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-message-markdown > * {
  margin: 0;
}
.chat-message-markdown p,
.chat-message-markdown li,
.chat-message-markdown blockquote {
  font-size: var(--text-md);
  line-height: 20px;
  word-break: break-word;
}
.chat-message-markdown p {
  white-space: pre-wrap;
}
.chat-message-markdown li > * + * {
  margin-top: 8px;
}
.chat-inline-thinking {
  align-self: flex-start;
  max-width: min(100%, 640px);
  border: 1px solid rgb(92 86 74 / 16%);
  border-radius: 10px;
  background:
    linear-gradient(
      145deg,
      rgb(92 86 74 / 5%) 0%,
      rgb(255 255 255 / 94%) 100%);
  overflow: hidden;
}
.chat-inline-thinking-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  padding: 7px 10px;
}
.chat-inline-thinking-summary::-webkit-details-marker {
  display: none;
}
.chat-inline-thinking-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5c564a;
}
.chat-inline-thinking-preview {
  min-width: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-inline-thinking-count {
  flex-shrink: 0;
  margin-left: auto;
  border-radius: 999px;
  padding: 2px 7px;
  background: rgb(92 86 74 / 8%);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.chat-inline-thinking-detail {
  margin: 0;
  padding: 0 10px 10px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.chat-message-markdown ul,
.chat-message-markdown ol {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-message-markdown h1,
.chat-message-markdown h2,
.chat-message-markdown h3,
.chat-message-markdown h4,
.chat-message-markdown h5,
.chat-message-markdown h6 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--text-primary-strong);
}
.chat-message-markdown h1 {
  font-size: var(--text-2xl);
}
.chat-message-markdown h2 {
  font-size: var(--text-xl);
}
.chat-message-markdown h3 {
  font-size: var(--text-lg);
}
.chat-message-markdown h4,
.chat-message-markdown h5,
.chat-message-markdown h6 {
  font-size: var(--text-md);
}
.chat-message-markdown details {
  align-self: stretch;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-sm);
  background: #fbfaf8;
  overflow: hidden;
}
.chat-message-markdown summary {
  cursor: pointer;
  padding: 8px 10px;
  background: #f4f3ef;
  color: var(--text-primary-strong);
  font-weight: 700;
  line-height: 20px;
}
.chat-message-markdown summary:hover {
  background: #eeece7;
}
.chat-message-markdown summary:focus-visible {
  outline: 2px solid var(--accent-info-strong);
  outline-offset: -2px;
}
.chat-message-markdown details[open] summary {
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 8px;
}
.chat-message-markdown details > :not(summary) {
  margin: 8px 10px;
}
.chat-message-markdown a {
  color: var(--accent-info-strong);
  text-underline-offset: 2px;
  word-break: break-word;
}
.chat-message-markdown a:hover {
  color: var(--accent-info);
}
.chat-message-markdown code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}
.chat-message-markdown :not(pre) > code {
  border: 1px solid var(--border-panel);
  border-radius: 6px;
  background: #f4f3f1;
  padding: 1px 6px;
}
.chat-message-markdown pre {
  margin: 0;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-sm);
  background: #f8f7f5;
  padding: 8px 10px;
  overflow-x: auto;
}
.chat-message-markdown pre code {
  font-size: var(--text-xs);
  line-height: 1.5;
}
.chat-message-markdown blockquote {
  margin: 0;
  border-left: 3px solid var(--border-soft);
  padding-left: 10px;
  color: var(--text-secondary);
}
.chat-message-system {
  align-self: stretch;
}
.chat-message-live .chat-assistant-icon::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 9px;
  border: 2px solid var(--avatar-ring-color);
  animation: chat-avatar-breathe 2s ease-in-out infinite;
  pointer-events: none;
}
.chat-message-live.chat-avatar-tool-active .chat-assistant-icon::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 12px;
  border: 2px solid var(--avatar-ring-color);
  animation: chat-avatar-breathe 2s ease-in-out infinite 0.3s;
  pointer-events: none;
}
@keyframes chat-avatar-breathe {
  0%, 100% {
    border-color: var(--avatar-ring-color);
  }
  50% {
    border-color: var(--avatar-ring-color-strong);
  }
}
.chat-message-live {
}
.chat-tool-activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 4px;
}
.chat-tool-step {
  display: flex;
  flex-direction: column;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-panel);
}
.chat-tool-step:last-child {
  border-bottom: none;
}
.chat-assistant-content > .chat-tool-activity-list:first-child > .chat-tool-step:first-child {
  padding-top: 0;
}
.chat-tool-step-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
}
.chat-tool-step-expandable .chat-tool-step-row {
  cursor: pointer;
}
.chat-tool-step-expandable .chat-tool-step-row:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.chat-tool-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.chat-tool-step-icon svg {
  width: 14px;
  height: 14px;
}
.chat-tool-step-icon-success {
  color: var(--color-tool-success);
}
.chat-tool-step-icon-active {
  color: var(--color-tool-active);
}
.chat-tool-step-spinner {
  animation: sidebar-task-spin 0.8s linear infinite;
}
.chat-tool-step-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary-strong);
  line-height: 1.3;
  white-space: nowrap;
  flex-shrink: 0;
}
.chat-tool-step-detail {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 auto;
}
.chat-tool-step-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  margin-left: auto;
  transition: transform 0.16s ease, color 0.16s ease;
}
.chat-tool-step-expandable .chat-tool-step-row:hover .chat-tool-step-chevron {
  color: var(--text-secondary);
}
.chat-tool-step-chevron-open {
  transform: rotate(90deg);
}
.chat-tool-step-json {
  margin: 4px 0 0 26px;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-subtle);
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.35;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 210px;
  overflow: auto;
}
.chat-tool-activity-toggle {
  appearance: none;
  border: none;
  background: transparent;
  padding: 8px 0 4px 26px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
}
.chat-tool-activity-toggle:hover {
  color: var(--text-primary);
}
.chat-tool-activity-toggle:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.chat-panel-composer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border-panel);
  padding: 14px 20px;
  flex-shrink: 0;
}
.chat-input-form {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
}
.chat-input-form.chat-input-form-dragging {
  outline: 1px dashed var(--accent-info);
  outline-offset: 4px;
  border-radius: var(--radius-md);
}
.chat-model-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.chat-model-select-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-sm);
  background: #f8f8f6;
  color: var(--text-secondary);
  padding: 5px 8px;
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1;
}
.chat-model-select-pill select {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  min-width: 0;
  max-width: 150px;
  padding: 0 12px 0 0;
  cursor: pointer;
}
.chat-model-select-pill select:disabled {
  color: var(--text-disabled);
  cursor: not-allowed;
}
.chat-model-select-pill .chat-thread-pill-chevron {
  margin-left: -12px;
  pointer-events: none;
}
.chat-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chat-attachment-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-md);
  background: #fff;
}
.chat-attachment-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-attachment-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-attachment-meta {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.chat-attachment-remove {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  font-size: var(--text-sm);
  line-height: 1;
  flex-shrink: 0;
}
.chat-attachment-remove:disabled {
  color: var(--text-disabled);
  cursor: not-allowed;
}
.chat-attach-button {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-md);
  background: #f8f8f6;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
}
.chat-attach-button:disabled {
  color: var(--text-disabled);
  cursor: not-allowed;
}
.chat-input-form textarea {
  flex: 1;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-md);
  background: #f8f8f6;
  padding: 10px 14px;
  font-size: var(--text-md);
  line-height: 18px;
  resize: none;
  min-height: 38px;
  max-height: 120px;
  overflow-y: hidden;
  font-family: var(--font-ui);
}
.chat-input-form.chat-input-form-dragging textarea {
  border-color: var(--accent-info);
  background: #eef7ff;
}
.chat-input-form textarea::placeholder {
  color: var(--text-placeholder-chat);
}
.chat-run-mode-toggle {
  display: none;
}
.chat-run-mode-toggle input {
  margin: 0;
}
.chat-send-button {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-md);
  background: var(--bg-user-bubble);
  color: var(--text-inverse);
  cursor: pointer;
  padding: 0;
}
.chat-send-button:disabled {
  background: #f8f8f6;
  border: 1px solid var(--border-panel);
  color: var(--text-disabled);
  cursor: not-allowed;
}
.chat-panel-link {
  color: var(--accent-info-strong);
  text-decoration: none;
}
.chat-panel-link:hover {
  text-decoration: underline;
}
.chat-panel-top .muted,
.chat-panel-top .error-text,
.chat-panel-composer .muted,
.chat-panel-composer .error-text {
  margin: 0;
  font-size: var(--text-xs);
}
.chat-message-list > .muted,
.chat-message-list > .error-text {
  margin: 0;
}
.chat-placeholder {
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  color: var(--text-secondary);
}
.muted {
  color: var(--text-secondary);
}
.error-text {
  color: var(--color-error);
}
@media (max-width: 1060px) {
  .shell-root {
    flex-direction: column;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
  }
  .shell-sidebar {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--border-sidebar);
    max-height: clamp(260px, 42vh, 360px);
    overflow-y: auto;
  }
  .shell-workspace {
    flex-direction: column;
    flex: 1;
    max-width: none;
  }
  .shell-main-artifacts {
    min-height: 0;
  }
  .chat-panel {
    width: 100%;
    border-left: 0;
    border-top: 1px solid var(--border-panel);
    box-shadow: none;
    overflow: hidden;
  }
  .chat-panel-top {
    padding-inline: var(--space-4);
  }
  .chat-message-list {
    padding: var(--space-3) var(--space-4);
  }
  .chat-panel-composer {
    padding-inline: var(--space-4);
  }
  .page-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }
  .shell-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .topbar-main {
    width: 100%;
  }
  .topbar-actions {
    width: 100%;
  }
  .topbar-metadata {
    display: none;
  }
  .topbar-search-input {
    flex: 1;
  }
  .topbar-search-input input {
    min-width: 0;
    width: 100%;
  }
  .project-task-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .project-header-actions {
    width: 100%;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .share-dialog-backdrop {
    justify-content: center;
    padding: 64px 16px 24px;
  }
  .artifact-header-card {
    flex-direction: column;
  }
  .html-artifact-launch-card {
    padding: 22px;
  }
  .html-artifact-launch-actions {
    width: 100%;
  }
  .html-artifact-frame {
    height: 68vh;
    min-height: 420px;
  }
  .file-detail-view {
    padding-top: 40px;
  }
  .file-hero-icon {
    width: 144px;
    height: 168px;
  }
  .file-details-table {
    width: 100%;
  }
  .project-artifact-card {
    min-width: 100%;
  }
  .recent-activity-row {
    padding: 10px 8px;
  }
  .home-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .home-header-spacer {
    display: none;
  }
  .home-header-search {
    width: 100%;
  }
  .home-header-search input {
    min-width: 0;
    width: 100%;
  }
  .home-header-chat {
    align-self: flex-start;
  }
  .home-widget-card[data-widget-size=wide],
  .home-widget-card[data-widget-size=main] {
    grid-column: auto;
  }
}
@media (max-width: 640px) {
  .page-scroll-artifact-workspace {
    overflow-y: auto;
  }
  .page-scroll-artifact-workspace .artifact-workspace {
    flex: 0 0 auto;
    min-height: auto;
    flex-direction: column;
  }
  .artifact-workspace-main {
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
  }
  .artifact-workspace-topbar {
    min-height: auto;
    align-items: stretch;
    flex-direction: column;
    padding: 12px;
  }
  .artifact-workspace-topbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .artifact-workspace-pane-row {
    flex: 0 0 auto;
    flex-direction: column;
    overflow: visible;
  }
  .artifact-workspace-resize-handle {
    display: none;
  }
  .artifact-workspace-list-pane {
    flex: 0 0 190px;
    width: 100%;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border-panel);
  }
  .artifact-workspace-list-pane-closed {
    flex-basis: 0;
    width: 100%;
    border-bottom-color: transparent;
  }
  .artifact-workspace-list-pane-inner {
    width: 100%;
    flex-basis: 100%;
  }
  .artifact-workspace-chat-pane {
    flex: 0 0 300px;
    width: 100%;
    min-width: 0;
    max-width: none;
    border-right: 0;
    border-bottom: 1px solid var(--border-panel);
  }
  .artifact-workspace-chat-pane-closed {
    flex-basis: 0;
    width: 100%;
    border-bottom-color: transparent;
  }
  .artifact-workspace-chat-pane-inner {
    width: 100%;
    flex-basis: 100%;
  }
  .artifact-workspace-preview-pane {
    min-height: 220px;
  }
}

/* packages/server/ui-src/mobile.css */
.mobile-shell {
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-ui);
}
.mobile-artifact-list {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: var(--bg-sidebar);
}
.mobile-artifact-list-header {
  flex: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 0;
}
.mobile-artifact-list-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 34px;
  color: var(--text-primary-strong);
}
.mobile-artifact-list-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 18px;
  white-space: nowrap;
}
.mobile-artifact-list-eyebrow {
  margin: 0 0 3px;
  color: var(--accent-brand);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}
.mobile-artifact-search {
  flex: none;
  display: block;
}
.mobile-artifact-search input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border-sidebar);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-primary);
  font: inherit;
  font-size: var(--text-md);
  padding: 0 14px;
  box-shadow: 0 1px 0 rgba(18, 15, 12, 0.03);
}
.mobile-artifact-search input:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.mobile-artifact-list-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 2px 0 8px;
}
.mobile-artifact-list-status,
.mobile-artifact-list-note {
  margin: 10px 2px;
  font-size: var(--text-sm);
  line-height: 19px;
}
.mobile-artifact-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 18px;
}
.mobile-artifact-section:first-child {
  margin-top: 4px;
}
.mobile-artifact-section h2 {
  margin: 0 2px;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: 16px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0;
}
.mobile-artifact-section-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mobile-artifact-row {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.74);
  color: inherit;
  text-decoration: none;
}
.mobile-artifact-row:active {
  background: #fff;
  border-color: var(--border-brand-soft);
}
.mobile-artifact-row:focus-visible {
  outline: 2px solid var(--accent-info);
  outline-offset: 2px;
}
.mobile-artifact-row-icon {
  width: 38px;
  height: 38px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: var(--text-md);
  font-weight: 800;
}
.mobile-artifact-row-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-artifact-row-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-md);
  line-height: 18px;
  font-weight: 700;
  color: var(--text-primary-strong);
}
.mobile-artifact-row-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-xs);
  line-height: 16px;
  color: var(--text-secondary);
}
.mobile-artifact-row-chevron {
  flex: none;
  color: var(--text-muted);
  font-size: var(--text-md);
  line-height: 1;
}
.mobile-artifact-view {
  position: relative;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-app);
}
.mobile-artifact-chrome {
  flex: none;
  min-height: 70px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: max(9px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 9px max(10px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--border-panel);
  background: rgba(250, 250, 250, 0.96);
  z-index: 8;
}
.mobile-artifact-chrome-back,
.mobile-compact-composer-send,
.mobile-compact-composer-close,
.mobile-compact-composer-restore {
  border: 0;
  cursor: pointer;
  font-family: var(--font-ui);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.mobile-artifact-chrome-back {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: rgba(18, 15, 12, 0.05);
  color: var(--text-secondary);
}
.mobile-artifact-chrome-back:active {
  background: rgba(18, 15, 12, 0.1);
}
.mobile-artifact-chrome-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.mobile-artifact-chrome-icon {
  width: 32px;
  height: 32px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 800;
}
.mobile-artifact-chrome-copy {
  min-width: 0;
}
.mobile-artifact-chrome-copy h1 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 21px;
  color: var(--text-primary-strong);
}
.mobile-artifact-chrome-copy p {
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: 16px;
}
.mobile-artifact-chrome-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.mobile-artifact-status,
.mobile-artifact-version-pill,
.mobile-artifact-open-link {
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-panel);
  background: #fff;
  color: var(--text-secondary);
  padding: 0 9px;
  font-size: var(--text-xs);
  line-height: 1;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.mobile-artifact-status {
  cursor: pointer;
  gap: 6px;
}
.mobile-artifact-status-working,
.mobile-artifact-status-refreshing {
  color: var(--color-warning);
  border-color: #d9770640;
  background: #fff8eb;
}
.mobile-artifact-status-spinner {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: mobile-artifact-status-spin 0.75s linear infinite;
}
.mobile-artifact-status-failed {
  color: var(--color-error);
  border-color: #dc262640;
  background: #fff1f0;
}
.mobile-artifact-status-updated {
  color: var(--color-success);
  border-color: #16a34a40;
  background: #effaf3;
}
@keyframes mobile-artifact-status-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.mobile-artifact-frame {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: #fff;
}
.mobile-artifact-frame > .html-artifact-view,
.mobile-artifact-frame > .static-site-artifact-view,
.mobile-artifact-frame > .artifact-component-host {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.mobile-artifact-frame .html-artifact-view {
  gap: 0;
}
.mobile-artifact-frame .static-site-chrome {
  flex: none;
  border: 0;
  border-bottom: 1px solid var(--border-panel);
  border-radius: 0;
}
.mobile-artifact-frame .html-artifact-frame-shell {
  flex: 1;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.mobile-artifact-frame .html-artifact-frame {
  height: 100%;
  min-height: 0;
}
.mobile-artifact-frame > .markdown-viewer,
.mobile-artifact-frame > .file-detail-view,
.mobile-artifact-frame > .artifact-data-fallback,
.mobile-artifact-frame > .artifact-runtime-fallback {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}
.mobile-artifact-frame .markdown-viewer,
.mobile-artifact-frame .file-detail-view,
.mobile-artifact-frame .artifact-data-fallback {
  padding: 18px 14px 92px;
}
.mobile-artifact-state,
.mobile-conversation-status {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.mobile-compact-composer {
  position: absolute;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 12;
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px 30px;
  align-items: center;
  gap: 7px;
  padding: 7px;
  border: 1px solid rgba(18, 15, 12, 0.08);
  border-radius: var(--radius-pill);
  background: #fff;
  box-shadow: 0 14px 32px rgba(18, 15, 12, 0.14);
}
.mobile-compact-composer-field {
  min-width: 0;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  font: inherit;
  font-size: var(--text-md);
  padding: 0 10px;
  cursor: text;
}
.mobile-compact-composer-send {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--bg-inverse);
  color: var(--text-inverse);
}
.mobile-compact-composer-send:active {
  opacity: 0.85;
}
.mobile-compact-composer-close {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
}
.mobile-compact-composer-restore {
  position: absolute;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 12;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-inverse);
  color: var(--text-inverse);
  box-shadow: 0 12px 26px rgba(18, 15, 12, 0.16);
}
.mobile-conversation-sheet {
  --mobile-conversation-sheet-top-gap: max(76px, env(safe-area-inset-top));
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
  padding: var(--mobile-conversation-sheet-top-gap) 0 0;
  background: transparent;
  pointer-events: auto;
}
.mobile-conversation-sheet-panel {
  position: relative;
  width: min(100%, 430px);
  max-width: 430px;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(18, 15, 12, 0.08);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background: #f6f1e7;
  box-shadow: 0 -18px 46px rgba(18, 15, 12, 0.16);
  pointer-events: auto;
  transform: translateY(0);
  animation: mobile-conversation-sheet-enter 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-conversation-sheet[data-state=closing] {
  pointer-events: none;
}
.mobile-conversation-sheet[data-state=closing] .mobile-conversation-sheet-panel {
  animation: mobile-conversation-sheet-exit 220ms cubic-bezier(0.32, 0, 0.67, 0) forwards;
}
.mobile-conversation-sheet-handle {
  display: none;
}
.mobile-conversation-sheet .chat-panel-mobile-sheet {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  border: 0;
  box-shadow: none;
  padding-top: 12px;
  background: transparent;
}
.mobile-conversation-sheet .chat-panel-top {
  border-bottom: 0;
  background: transparent;
}
.mobile-conversation-sheet .chat-panel-title-row {
  padding: 12px 18px 10px;
}
.mobile-conversation-sheet .chat-panel-header {
  font-size: var(--text-md);
  line-height: 18px;
}
.mobile-conversation-sheet .chat-panel-context,
.mobile-conversation-sheet .chat-panel-viewing-pill {
  font-size: var(--text-2xs);
}
.mobile-conversation-sheet .chat-panel-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(18, 15, 12, 0.05);
  color: var(--text-primary);
  padding: 0;
}
.mobile-conversation-sheet .chat-panel-close:hover {
  background: rgba(18, 15, 12, 0.08);
}
.mobile-conversation-sheet .chat-thread-controls {
  padding: 0 18px 10px;
}
.mobile-conversation-sheet .chat-panel-body {
  min-height: 0;
}
.mobile-conversation-sheet .chat-message-list {
  padding: 16px 18px 18px;
  gap: 16px;
}
.mobile-conversation-sheet .chat-panel-composer {
  padding: 10px 14px calc(max(12px, env(safe-area-inset-bottom)) + var(--mobile-keyboard-inset, 0px));
  background: #fffdf9;
}
.mobile-conversation-sheet .chat-model-controls {
  gap: 6px;
}
.mobile-conversation-sheet .chat-model-select-pill {
  min-height: 30px;
}
.mobile-conversation-sheet .chat-input-form {
  align-items: flex-end;
}
@keyframes mobile-conversation-sheet-enter {
  from {
    opacity: 0.98;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes mobile-conversation-sheet-exit {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0.98;
    transform: translateY(100%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-conversation-sheet-panel,
  .mobile-conversation-sheet[data-state=closing] .mobile-conversation-sheet-panel {
    animation: none;
  }
}
.mobile-sheet-close-fallback {
  margin-top: 10px;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-primary);
  padding: 8px 12px;
  font: inherit;
}
@media (min-width: 768px) {
  .mobile-shell {
    max-width: 430px;
    margin: 0 auto;
    border-left: 1px solid var(--border-panel);
    border-right: 1px solid var(--border-panel);
  }
}
