:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f4;
  color: #111827;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: #f5f5f4;
}

button,
input {
  font: inherit;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 1em;
}

.app-shell {
  height: 100vh;
  min-height: 100vh;
  display: flex;
  background: #ffffff;
  overflow: hidden;
}

.projects-sidebar,
.conversation-shell,
.artifact-shell,
.workspace-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.conversation-shell {
  width: auto;
  flex: 1 1 auto;
  transition: width 0.2s ease, flex-basis 0.2s ease, padding 0.2s ease;
  min-width: 0;
}

.conversation-shell.expanded {
  width: auto;
  flex: 1 1 auto;
}

.artifact-shell {
  width: min(630px, 57vw);
  flex: 0 0 min(630px, 57vw);
  padding: 8px 12px 12px 0;
  background: transparent;
  transition: width 0.2s ease, flex-basis 0.2s ease, padding 0.2s ease;
}

.projects-sidebar {
  width: 244px;
  flex: 0 0 244px;
  border-right: 1px solid #e5e7eb;
  background: #ffffff;
  overflow: hidden;
  position: relative;
  transition: width 0.2s ease;
}

.projects-sidebar.collapsed {
  width: 64px;
  flex-basis: 64px;
}

.projects-sidebar-top {
  padding: 12px 10px 88px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.projects-sidebar.collapsed .projects-sidebar-top {
  padding: 8px;
}

.projects-sidebar-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
}

.projects-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.new-project-button,
.collapse-button,
.rail-icon-button,
.settings-button,
.project-item {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.new-project-button {
  flex: 1;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-radius: 8px;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
}

.new-project-button:hover,
.collapse-button:hover,
.rail-icon-button:hover,
.settings-button:hover,
.project-item:hover {
  background: #f8fafc;
}

.collapse-button,
.rail-icon-button {
  width: 32px;
  height: 64px;
  border-radius: 8px;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rail-icon-button {
  width: 56px;
  height: 56px;
}

.sidebar-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  font-weight: 600;
}

.section-title {
  margin-top: 16px;
  margin-bottom: 12px;
  padding: 0 12px;
  color: #737373;
  font-size: 12px;
  font-weight: 500;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.project-row {
  position: relative;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 8px;
  text-align: left;
}

.project-row:hover {
  background: #fafafa;
}

.project-row.active {
  background: #f5f5f5;
  border-color: rgba(10, 10, 10, 0.16);
}

.project-row.project-row-new {
  animation: project-row-flash 1.8s ease;
}

.project-row.project-row-new,
.project-row.project-row-new.active {
  background: #eefbf3;
  border-color: rgba(34, 197, 94, 0.38);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.14);
}

.project-item {
  width: 100%;
  padding: 0 36px 0 0;
  border-radius: 0;
  text-align: left;
  border: 0;
}

.project-title-row {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 6px;
}

.project-title {
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-row.active .project-title {
  font-weight: 600;
}

.project-row.project-row-new .project-title {
  color: #166534;
  font-weight: 600;
}

.project-time {
  margin-top: 4px;
  color: #737373;
  font-size: 11px;
}

.project-row.project-row-new .project-time {
  color: #15803d;
}

.project-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
}

.project-menu-button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #737373;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.project-row:hover .project-menu-button,
.project-menu-button.open {
  opacity: 1;
  pointer-events: auto;
}

.project-menu-button .project-menu-icon {
  visibility: hidden;
}

.project-row:hover .project-menu-button .project-menu-icon,
.project-menu-button.open .project-menu-icon {
  visibility: visible;
}

.project-menu-button:hover,
.project-menu-button.open {
  border-color: #e5e5e5;
  background: rgba(255, 255, 255, 0.96);
  color: #0a0a0a;
}

@keyframes project-row-flash {
  0% {
    background: #dcfce7;
    border-color: rgba(34, 197, 94, 0.48);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.3);
  }
  35% {
    background: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.56);
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.08);
  }
  100% {
    background: #eefbf3;
    border-color: rgba(34, 197, 94, 0.38);
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.14);
  }
}

.project-menu-icon,
.project-menu-item-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}

.project-menu-item-icon svg {
  width: 16px;
  height: 16px;
}

.flag-red,
.flag-option-red {
  color: #ef4444;
}

.flag-blue,
.flag-option-blue {
  color: #3b82f6;
}

.flag-green,
.flag-option-green {
  color: #22c55e;
}

.flag-yellow,
.flag-option-yellow {
  color: #eab308;
}

.pin-gray {
  color: #9ca3af;
}

.project-menu-popover {
  position: absolute;
  top: 36px;
  right: 8px;
  z-index: 20;
  width: 176px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.06);
}

.project-flag-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.project-flag-option {
  width: 26px;
  height: 26px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #9ca3af;
}

.project-flag-option:hover {
  border-color: #d4d4d8;
  background: #f5f5f5;
}

.project-flag-option-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: currentColor;
}

.project-flag-option-cancel {
  width: 12px;
  height: 12px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.project-flag-option-none-dot {
  background: #e5e7eb;
}

.project-flag-option-slash {
  position: absolute;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-42deg);
}

.flag-option-none {
  color: #6b7280;
}

.project-menu-item {
  width: 100%;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  text-align: left;
  color: #111827;
  font-size: 14px;
  line-height: 1.25;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-menu-item:hover {
  background: #f5f5f5;
}

.project-menu-item.danger {
  color: #b42318;
}

.project-menu-item.danger:hover {
  background: #fef3f2;
}

.project-rename-form {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-rename-label {
  font-size: 12px;
  color: #6b7280;
}

.project-rename-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
}

.project-rename-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.project-rename-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.project-rename-button {
  min-width: 56px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
}

.project-rename-button:hover {
  background: #f9fafb;
}

.project-rename-button.primary {
  border-color: #1d4ed8;
  background: #2563eb;
  color: #ffffff;
}

.project-rename-button.primary:hover {
  background: #1d4ed8;
}

.list-message {
  padding: 4px 6px;
  font-size: 12px;
}

.list-message.muted {
  color: #9ca3af;
}

.list-message.error {
  color: #dc2626;
  white-space: pre-wrap;
}

.projects-sidebar-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  border-top: 1px solid #e5e7eb;
  padding: 12px;
  background: #ffffff;
}

.settings-button {
  width: 100%;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  padding: 0 8px;
}

.settings-button.active {
  background: #f8fafc;
}

.settings-svg {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
}

.settings-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(6px);
}

.settings-modal {
  width: min(1040px, calc(100vw - 56px));
  max-height: calc(100vh - 56px);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.projects-sidebar.collapsed .projects-sidebar-bottom {
  padding: 8px;
}

.projects-sidebar.collapsed .settings-button {
  justify-content: center;
  padding: 0;
}

.projects-sidebar.collapsed .settings-button span:last-child {
  display: none;
}

.user-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.user-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 18px;
  border-bottom: 1px solid #eef2f7;
}

.user-panel-title-wrap {
  display: grid;
  gap: 6px;
}

.user-panel-kicker {
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
}

.user-panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-close-button {
  width: 34px;
  height: 34px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #6b7280;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.user-title {
  color: #111827;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

.user-meta {
  color: #737373;
  font-size: 13px;
  line-height: 1.5;
}

.user-feedback {
  margin: 16px 24px 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  border: 1px solid #e5e7eb;
}

.user-feedback-success {
  border-color: #c7ead8;
  color: #166534;
  background: #eefaf2;
}

.user-feedback-error {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fef2f2;
}

.settings-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 0;
  max-height: calc(100vh - 170px);
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 16px 24px;
  border-right: 1px solid #eef2f7;
  background: #fafbfc;
  overflow: auto;
}

.settings-nav-item {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.settings-nav-item:hover {
  background: #f3f4f6;
}

.settings-nav-item.active {
  border-color: #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
}

.settings-content {
  overflow: auto;
  padding: 20px 24px 24px;
}

.user-section {
  padding: 0;
  border-top: 0;
}

.user-section h3 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 600;
}

.settings-section-head {
  display: grid;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid #eef2f7;
}

.settings-subsection {
  display: grid;
  gap: 10px;
  padding: 20px 0;
}

.settings-subsection + .settings-subsection {
  border-top: 1px solid #f3f4f6;
}

.settings-subsection h4 {
  margin: 0;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
}

.user-hint {
  margin-bottom: 8px;
  color: #737373;
  font-size: 13px;
  line-height: 1.45;
}

.user-hint.compact {
  margin: 0;
}

.user-form {
  display: grid;
  gap: 10px;
}

.user-form.inline {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.user-form input,
.user-form select {
  width: 100%;
  height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0 12px;
  color: #111827;
  background: #ffffff;
}

.user-action {
  height: 40px;
  border-radius: 10px;
  padding: 0 14px;
  border: 0;
  cursor: pointer;
  background: #f8fafc;
  color: #111827;
}

.user-action.primary {
  background: #111827;
  color: #ffffff;
}

.user-action:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.user-action.ghost {
  background: transparent;
  color: #6b7280;
}

.user-action.full {
  width: 100%;
}

.model-provider-toggle {
  display: grid;
  gap: 10px;
}

.model-provider-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.model-provider-button.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.model-provider-meta {
  color: #737373;
  font-size: 11px;
}

.member-grid {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.member-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fafafa;
  color: #111827;
  font-size: 13px;
}

.member-name {
  min-width: 0;
}

.member-role {
  color: #737373;
  font-size: 11px;
}

.workspace-shell {
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: #ffffff;
}

.workspace-topbar {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.workspace-brand-row {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #111827;
}

.workspace-brand-main,
.workspace-brand-sub {
  font-size: 18px;
  font-weight: 700;
}

.workspace-brand-divider {
  width: 1px;
  height: 28px;
  background: #e5e7eb;
}

.workspace-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.workspace-content {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: 336px minmax(0, 1fr);
  gap: 24px;
  padding: 0 14px 16px;
}

.loading-shell {
  align-items: center;
  justify-content: center;
}

.workspace-brand,
.workspace-banner,
.conversation-card,
.panel {
  background: transparent;
}

.workspace-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 20px 0 10px 20px;
  border-bottom: none;
}

.brand-mainline {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  flex: 0 0 auto;
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #111827;
  padding-right: 13px;
  border-right: 1px solid #d1d5db;
}

.brand-copy-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  transform: translateY(-1px);
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.brand-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #111827;
}

.brand-subtitle {
  max-width: 100%;
  font-size: 12px;
  line-height: 1.2;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-title-caret {
  color: #9ca3af;
  font-size: 12px;
  line-height: 1;
}

.pane-toggle-button,
.artifact-close-button {
  border: 1px solid #dde1e7;
  background: #ffffff;
  color: #4b5563;
  cursor: pointer;
}

.pane-toggle-button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.workspace-brand-action {
  margin-left: auto;
}

.workspace-title,
.conversation-head h1,
.section-heading h2 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: #8b8f97;
}

.message-badge,
.message-ref {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #d9dadd;
  background: #ffffff;
  color: #4b5563;
}

.message-ref {
  border-color: #e2e4e8;
  background: #f8fafc;
  color: #6b7280;
}

.conversation-card {
  flex: 1;
  min-height: 0;
  --conversation-bottom-clearance: 200px;
  padding: 0 8px 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.conversation-card-empty {
  justify-content: flex-start;
  padding-bottom: 0;
}

.section-heading,
.system-context-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.conversation-feed {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px 0 calc(var(--conversation-bottom-clearance) + env(safe-area-inset-bottom, 0px));
  scroll-padding-bottom: calc(var(--conversation-bottom-clearance) + env(safe-area-inset-bottom, 0px));
}

.conversation-card-empty .conversation-feed {
  justify-content: flex-start;
  flex: 0 0 auto;
  overflow: visible;
  padding: 0;
}

.conversation-feed > * {
  width: min(100%, 860px);
  margin-left: auto;
  margin-right: auto;
}

.empty-project-hero {
  display: flex;
  justify-content: flex-start;
}

.empty-project-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.empty-project-action:hover {
  background: #1f2937;
}

.empty-project-action:disabled {
  cursor: default;
  opacity: 0.72;
}

.message-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.message-row-user {
  justify-content: flex-end;
  padding-right: 0;
}

.message-row-user-clarification-record {
  padding-right: 0;
}

.message-row-assistant {
  padding-left: 38px;
}

.system-turn-assistant-row {
  padding-left: 15px;
  line-height: 1.5;
}

.message-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: #111111;
  color: #ffffff;
  border: none;
}

.message-avatar-user {
  order: 2;
  background: #111111;
}

.message {
  max-width: min(100%, 288px);
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid #dddfe4;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.message-user {
  order: 1;
  position: relative;
  margin-top: 18px;
  padding: 11px 15px 12px;
  border-radius: 20px 20px 8px 20px;
  background: #e6f0ff;
  border-color: #cbdcfb;
  box-shadow: 0 6px 16px rgba(83, 124, 196, 0.08);
}

.message-user-clarification-record {
  width: 100%;
  max-width: 100%;
  padding: 0;
  font-size: 13px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.message-user .message-body {
  margin-top: 0;
  color: #0f172a;
}

.message-assistant,
.message-system {
  max-width: min(100%, 860px);
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.message-system {
  max-width: min(100%, 860px);
}

.message-kind-system_step {
  background: transparent;
  border-style: none;
}

.message-kind-system_group {
  background: transparent;
  border-style: none;
}

.message-kind-system_feedback,
.message-kind-outcome {
  background: #ffffff;
}

.message-kind-outcome {
  border-color: #c7ead8;
}

.message-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.message-time,
.artifact-kind {
  color: #9ca3af;
  font-size: 12px;
}

.user-message-time {
  position: absolute;
  right: 2px;
  top: -18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.system-message-time {
  position: absolute;
  right: 0;
  top: -18px;
  opacity: 1;
  pointer-events: none;
}

.message-row-user:hover .user-message-time,
.message-row-user:focus-within .user-message-time {
  opacity: 1;
}

.message-body {
  margin-top: 10px;
  color: #111827;
}

.message-assistant,
.message-system {
  position: relative;
}

.message-assistant .message-body,
.message-system .message-body {
  margin-top: 0;
}

.message-foot {
  margin-top: 12px;
  flex-wrap: wrap;
}

.system-group-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
  padding-left: 10px;
}

.stable-system-stack {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.stable-system-block {
  display: grid;
  gap: 8px;
}

.system-turn-stack {
  gap: 14px;
}

.system-turn-process-running,
.system-turn-process-complete {
  --process-accent: #172439;
}

.system-turn-process-blocked {
  --process-accent: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

.system-turn-process-summary {
  background: #ffffff;
}

.system-turn-process-marker {
  padding-left: 14px;
}

.system-turn-process-retrying,
.system-turn-process-backtrack {
  --process-accent: #ea580c;
  border-color: #fed7aa;
  background: #fff7ed;
}

.system-turn-process-error {
  --process-accent: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

.stable-system-head {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
}

.process-inline {
  position: relative;
  display: grid;
  gap: 8px;
  padding-left: 14px;
  --process-inline-indent: 16px;
  --process-inline-rail-left: 18px;
}

.process-inline::before {
  content: "";
  position: absolute;
  left: var(--process-inline-rail-left);
  top: 26px;
  bottom: 0;
  width: 1px;
  background: var(--process-accent, #d1d5db);
  border-radius: 999px;
  pointer-events: none;
}

.process-inline-toggle,
.process-inline-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
}

.process-inline-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.process-inline-toggle ~ .process-inline-detail,
.process-inline-toggle ~ .process-inline-body,
.process-inline-heading ~ .process-inline-detail,
.process-inline-heading ~ .process-inline-body {
  padding-left: var(--process-inline-indent);
}

.process-inline-chevron {
  width: 7px;
  height: 7px;
  margin-left: 1px;
  border-right: 1.5px solid #9ca3af;
  border-bottom: 1.5px solid #9ca3af;
  transform: rotate(-45deg);
  transform-origin: center;
  transition: transform 0.16s ease;
  flex: 0 0 auto;
}

.process-inline-chevron.expanded {
  transform: rotate(45deg);
}

.status-running-spinner {
  display: inline-block;
  border: 2px solid #93c5fd;
  border-top-color: #1d4ed8;
  border-radius: 999px;
  animation: task-spin 0.9s linear infinite;
}

.process-inline-spinner {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
}

.process-inline-title {
  color: #111827;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 600;
}

.process-inline-status {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 500;
  white-space: nowrap;
}

.process-inline-status-running {
  color: #1d4ed8;
  background: #dbeafe;
}

.process-inline-status-complete {
  padding: 0;
  border-radius: 0;
  color: #6b7280;
  background: transparent;
  font-weight: 400;
}

.process-inline-status-blocked {
  color: #b91c1c;
  background: #fee2e2;
}

.process-inline-status-retrying,
.process-inline-status-backtrack {
  color: #c2410c;
  background: #ffedd5;
}

.process-inline-status-error {
  color: #b91c1c;
  background: #fee2e2;
}

.process-inline-detail {
  color: #4b5563;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.process-inline-detail-summary {
  color: #4b5563;
  font-size: 12px;
  line-height: 1.6;
}

.process-inline-body {
  display: grid;
  gap: 8px;
}

.process-inline-fields {
  margin-top: 0;
}

.process-inline-field {
  min-height: 24px;
  padding-left: 12px;
}

.clarification-process {
  display: block;
}

.clarification-process-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 400;
  cursor: pointer;
  list-style: none;
}

.clarification-process-summary::-webkit-details-marker {
  display: none;
}

.clarification-process-summary::before {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1.4px solid #9ca3af;
  border-bottom: 1.4px solid #9ca3af;
  transform: rotate(-45deg);
  transform-origin: center;
  margin-right: 2px;
  flex: 0 0 auto;
}

.clarification-process:not([open]) .clarification-process-summary::before {
  transform: rotate(-45deg);
}

.clarification-process[open] .clarification-process-summary::before {
  transform: rotate(45deg);
}

.clarification-process-body {
  margin-top: 8px;
}

.clarification-process-line {
  margin: 0;
}

.clarification-process-line + .clarification-process-line {
  margin-top: 4px;
}

.clarification-record {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #f3f4f6;
  color: #0f172a;
}

.clarification-record-collapsed {
  gap: 0;
}

.clarification-record-summary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.clarification-record-summary-main {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.clarification-record-chevron {
  width: 7px;
  height: 7px;
  margin-left: 1px;
  border-right: 1.5px solid #64748b;
  border-bottom: 1.5px solid #64748b;
  transform: rotate(-45deg);
  transform-origin: center;
  transition: transform 0.16s ease;
  flex: 0 0 auto;
}

.clarification-record-chevron.expanded {
  transform: rotate(45deg);
}

.clarification-record-summary-label {
  font: inherit;
  font-size: 1em;
  line-height: inherit;
  font-weight: 500;
  color: #475569;
}

.clarification-record-summary-meta {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 0.92em;
  line-height: 1.4;
  white-space: nowrap;
}

.clarification-record-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clarification-record-text {
  font: inherit;
  font-size: 1em;
  line-height: inherit;
  font-weight: inherit;
  color: inherit;
  white-space: pre-wrap;
  word-break: break-word;
}

.clarification-record-item-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clarification-record-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clarification-record-item-title {
  font: inherit;
  font-size: 0.95em;
  line-height: inherit;
  font-weight: 600;
  color: #334155;
}

.clarification-record-item-text {
  font-size: 0.95em;
}

.clarification-record-answer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clarification-record-answer {
  font: inherit;
  font-size: 1em;
  line-height: inherit;
  font-weight: inherit;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  word-break: break-word;
}

.clarification-record-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  color: #9ca3af;
  font: inherit;
  font-size: 0.92em;
  line-height: inherit;
  font-weight: 500;
}

.clarification-record-progress,
.clarification-record-question-title {
  font: inherit;
  color: inherit;
}

.workflow-panel-stable {
  margin-top: 0;
}

.runtime-stream-card {
  display: grid;
  gap: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  padding: 10px 12px;
}

.runtime-stream-card.collapsed {
  background: #ffffff;
}

.process-card-toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0 0 8px;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.process-card-toggle-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.process-card-toggle-state {
  flex: 0 0 auto;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 600;
}

.process-card-collapsed-summary {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.runtime-stream-summary {
  display: grid;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.runtime-stream-card.collapsed .runtime-stream-summary {
  padding-bottom: 0;
  border-bottom: 0;
}

.runtime-stream-process-body {
  display: grid;
  gap: 8px;
}

.runtime-stream-summary-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.runtime-stream-stage-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 700;
}

.runtime-stream-stage-label {
  color: #111827;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 600;
}

.runtime-stream-summary-title {
  color: #111827;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 600;
}

.runtime-stream-summary-text {
  color: #4b5563;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.runtime-stream-summary-text pre {
  margin: 0;
  white-space: pre-wrap;
  font: inherit;
}

.runtime-stream-process-detail {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.6;
}

.runtime-stream-process-fields {
  display: grid;
  gap: 8px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.runtime-stream-process-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.runtime-stream-process-field-label {
  color: #374151;
  font-size: 12px;
  line-height: 1.5;
}

.runtime-stream-process-field-status {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 600;
}

.runtime-stream-process-field-status-done {
  background: #dcfce7;
  color: #166534;
}

.runtime-stream-process-field-status-active {
  background: #dbeafe;
  color: #1d4ed8;
}

.runtime-stream-process-field-status-pending,
.runtime-stream-process-field-status-neutral {
  background: #f3f4f6;
  color: #4b5563;
}

.runtime-stream-group {
  display: grid;
  gap: 6px;
  padding: 8px 0;
}

.runtime-stream-group + .runtime-stream-group {
  border-top: 1px solid #e5e7eb;
}

.runtime-stream-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.runtime-stream-group-title {
  color: #111827;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 600;
}

.runtime-stream-group-meta {
  color: #6b7280;
  font-size: 11px;
  line-height: 1.4;
}

.runtime-stream-line {
  display: grid;
  gap: 4px;
  padding: 6px 0 0;
  color: #374151;
  font-size: 12px;
  line-height: 1.55;
}

.runtime-stream-line-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.runtime-stream-line-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 11px;
  line-height: 1.4;
}

.runtime-stream-line-text {
  white-space: pre-wrap;
}

.runtime-stream-line-checkpoint {
  color: #1f2937;
  font-weight: 500;
}

.runtime-stream-line-retry {
  color: #92400e;
}

.runtime-stream-line-error {
  color: #b91c1c;
}

.runtime-history-card {
  display: grid;
  gap: 10px;
}

.runtime-history-section {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 12px;
}

.runtime-history-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.runtime-history-section-main {
  display: grid;
  gap: 4px;
}

.runtime-history-section-stage {
  color: #111827;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
}

.runtime-history-section-summary {
  color: #4b5563;
  font-size: 12px;
  line-height: 1.6;
}

.runtime-history-toggle {
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}

.runtime-history-section-body {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}

.runtime-history-conclusion {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
}

.runtime-history-conclusion-normal {
  border-color: #e5e7eb;
}

.runtime-history-conclusion-warning {
  border-color: #fdba74;
  background: #fff7ed;
}

.runtime-history-conclusion-milestone {
  border-color: #86efac;
  background: #f0fdf4;
}

.runtime-history-conclusion-label {
  color: #6b7280;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 600;
}

.runtime-history-conclusion-text {
  color: #111827;
  font-size: 12px;
  line-height: 1.6;
}

.stage-conclusion-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 12px;
}

.stage-conclusion-card-normal {
  border-color: #e5e7eb;
}

.stage-conclusion-card-warning {
  border-color: #fdba74;
  background: #fff7ed;
}

.stage-conclusion-card-milestone {
  border-color: #86efac;
  background: #f0fdf4;
}

.stage-conclusion-stage {
  color: #6b7280;
  font-size: 11px;
  line-height: 1.4;
}

.stage-conclusion-message {
  margin-top: 4px;
  color: #111827;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 600;
}

.stage-conclusion-history {
  display: grid;
  gap: 6px;
}

.stage-conclusion-history-item {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
}

.stage-conclusion-history-stage {
  color: #374151;
  font-weight: 600;
}

.stage-conclusion-history-message {
  color: #6b7280;
}

.system-entry {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.system-entry-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 13px;
  line-height: 1;
}

.system-entry-main {
  min-width: 0;
  flex: 1;
}

.system-entry-title-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.system-entry-toggle {
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
}

.system-entry-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.system-entry-meta {
  font-size: 12px;
  color: #9ca3af;
}

.system-entry-body {
  margin-top: 4px;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.5;
}

.workflow-panel {
  margin-top: 8px;
}

.workflow-panel-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 12px;
}

.workflow-panel-head {
  font-size: 12px;
  line-height: 1.4;
  color: #6b7280;
}

.workflow-panel-steps {
  margin: 6px 0 0;
  padding-left: 0;
  list-style: none;
  color: #111827;
  font-size: 12px;
  line-height: 1.55;
}

.workflow-panel-step-title {
  margin: 2px 0;
}

.workflow-panel-step-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.workflow-panel-step-detail {
  margin: 4px 0 0 26px;
  font-size: 12px;
  line-height: 1.5;
  color: #6b7280;
  white-space: pre-wrap;
  word-break: break-word;
}

.workflow-panel-step-detail-blocked,
.workflow-panel-step-detail-failed,
.workflow-panel-step-detail-retrying {
  color: #991b1b;
}

.workflow-panel-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}

.workflow-panel-section-title {
  font-size: 12px;
  line-height: 1.45;
  color: #6b7280;
  font-weight: 600;
}

.workflow-panel-plan-summary {
  margin-top: 6px;
  color: #111827;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.workflow-panel-plan-meta {
  margin-top: 4px;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.5;
}

.workflow-panel-skill-card {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.workflow-panel-skill-card-current {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.workflow-panel-skill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.workflow-panel-skill-label {
  color: #111827;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 600;
}

.workflow-panel-skill-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  line-height: 1.4;
  color: #6b7280;
}

.workflow-panel-skill-status-spinner {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
}

.workflow-panel-skill-status-active,
.workflow-panel-skill-status-running {
  color: #1d4ed8;
}

.workflow-panel-skill-status-done,
.workflow-panel-skill-status-complete {
  color: #16a34a;
}

.workflow-panel-skill-status-blocked,
.workflow-panel-skill-status-failed,
.workflow-panel-skill-status-retrying {
  color: #b91c1c;
}

.workflow-panel-skill-reason,
.workflow-panel-skill-detail {
  margin-top: 6px;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.workflow-panel-skill-detail-blocked,
.workflow-panel-skill-detail-failed,
.workflow-panel-skill-detail-retrying {
  color: #991b1b;
}

.workflow-panel-step-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  border: none;
  color: #9ca3af;
  background: transparent;
}

.workflow-panel-step-icon-active {
  color: #1d4ed8;
}

.workflow-panel-running-spinner {
  width: 10px;
  height: 10px;
}

.workflow-panel-step-icon-done {
  color: #16a34a;
  font-weight: 700;
}

.workflow-panel-step-icon-pending {
  color: #9ca3af;
}

.workflow-panel-step-icon-blocked {
  color: #b91c1c;
}

.workflow-panel-step-icon-failed {
  color: #b91c1c;
  font-weight: 700;
}

.unified-skill-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.unified-skill-card-running {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.unified-skill-card-complete {
  border-color: #bbf7d0;
}

.unified-skill-card-blocked,
.unified-skill-card-failed,
.unified-skill-card-interrupted {
  border-color: #fecaca;
  background: #fff7f7;
}

.unified-skill-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.unified-skill-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.unified-skill-card-title {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
  color: #111827;
}

.unified-skill-card-kind {
  font-size: 11px;
  line-height: 1.4;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 2px 8px;
}

.unified-skill-card-status {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1.4;
}

.unified-skill-card-subtitle {
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
  line-height: 1.55;
}

.unified-skill-card-detail-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.unified-skill-card-detail {
  color: #1f2937;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.unified-skill-card-fields {
  margin-top: 10px;
}

.unified-skill-card-summary {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.unified-skill-card-summary.frozen .unified-skill-card-summary-label {
  color: #166534;
}

.unified-skill-card-summary-label {
  font-size: 11px;
  line-height: 1.4;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.unified-skill-card-summary-text {
  margin-top: 6px;
  color: #111827;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.unified-skill-card-foot {
  margin-top: 12px;
}

.unified-skill-inline .message-foot {
  margin-top: 0;
}

@keyframes task-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.workflow-panel-output {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  line-height: 1.58;
  white-space: pre-wrap;
}

.workflow-panel-output-intermediate {
  color: #6b7280;
}

.workflow-panel-output-final {
  color: #111827;
}

.workflow-entry-body {
  margin-top: 8px;
}

.workflow-entry-body-intermediate {
  color: #6b7280;
}

.workflow-entry-body-final {
  color: #111827;
}

.intake-processing-card {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

.intake-processing-line {
  color: #374151;
  font-size: 12px;
  line-height: 1.55;
}

.intake-processing-subline {
  margin-top: 4px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.55;
}

.intake-processing-fields {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.intake-processing-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  line-height: 1.5;
}

.intake-processing-field-name {
  color: #111827;
  font-weight: 600;
}

.intake-processing-field-status {
  color: #2563eb;
}

.intake-processing-field-mode {
  padding: 1px 6px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 11px;
}

.intake-processing-collapsed {
  margin-top: 8px;
  color: #111827;
}

.system-entry-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.artifact-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eefaf2;
  border: 1px solid #c7ead8;
  color: #1f7a4c;
  font-size: 11px;
}

.file-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-height: 44px;
  padding: 6px 10px 6px 10px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e6e8ec;
  color: #1f2937;
  font-size: 12px;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.file-badge-interactive {
  background: #ffffff;
  border-color: #e3e6eb;
}

.file-badge-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #eef2f7;
  color: #ffffff;
}

.file-badge-icon-label {
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

.file-badge-icon-pdf {
  background: #ef4444;
}

.file-badge-icon-doc {
  background: #2563eb;
}

.file-badge-icon-sheet {
  background: #16a34a;
}

.file-badge-icon-slide {
  background: #f97316;
}

.file-badge-icon-image {
  background: #8b5cf6;
}

.file-badge-icon-data {
  background: #64748b;
}

.file-badge-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
  color: #111827;
  font-size: 13px;
  line-height: 1.2;
}

.file-badge-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.file-badge-subtitle {
  color: #9ca3af;
  font-size: 11px;
  line-height: 1;
}

.file-badge-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: none;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0;
}

.message-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.message-artifact-chip {
  padding: 6px 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  color: #111111;
}

.message-pending {
  opacity: 0.75;
}

.message-upload-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  margin-left: 0;
}

.message-user .message-upload-badges {
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.suggestion-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestion-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.suggestion-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestion-group-title {
  color: #374151;
  font-size: 12px;
  font-weight: 600;
}

.suggestion-label {
  color: #4b5563;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  padding-left: 12px;
}

.conversation-composer-wrap {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  z-index: 3;
  background: transparent;
  padding: 22px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stage-decision-panel {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid #dbe4f3;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.stage-decision-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.stage-decision-panel-title {
  color: #111827;
  font-size: 13px;
  font-weight: 700;
}

.stage-decision-panel-stage {
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
}

.stage-decision-panel-message {
  color: #374151;
  font-size: 13px;
  line-height: 1.6;
}

.stage-decision-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.stage-decision-button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #d6dce5;
  background: #ffffff;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.stage-decision-button-primary {
  border-color: #2f6df6;
  background: #2f6df6;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(47, 109, 246, 0.24);
}

.stage-decision-button-secondary {
  background: #f8fafc;
}

.stage-decision-button:disabled {
  opacity: 0.56;
  cursor: default;
  box-shadow: none;
}

.stage-decision-panel-hint {
  margin-top: 8px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
}

.clarification-panel {
  width: min(100%, 860px);
  margin: 0;
  border: 1px solid #dbe4f3;
  border-radius: 20px;
  background: rgba(247, 250, 255, 0.98);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.clarification-panel-row {
  margin-top: -4px;
  padding-left: 0;
}

.clarification-panel-details {
  display: block;
}

.clarification-panel-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  color: #111827;
  font-size: 14px;
  font-weight: 400;
}

.clarification-panel-summary::-webkit-details-marker {
  display: none;
}

.clarification-panel-summary::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #6b7280;
  border-bottom: 1.5px solid #6b7280;
  transform: rotate(-45deg);
  transform-origin: center;
  flex: 0 0 auto;
}

.clarification-panel-details[open] .clarification-panel-summary::before {
  transform: rotate(45deg);
}

.clarification-panel-prompt {
  color: #1f2937;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.clarification-panel-lead {
  color: #1f2937;
}

.clarification-panel-lead pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.clarification-panel-help {
  margin-top: 6px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.6;
}

.clarification-panel-form {
  padding: 0 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.clarification-choice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clarification-choice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.5;
}

.clarification-text-input,
.clarification-textarea {
  width: 100%;
  border: 1px solid #d6dce5;
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  line-height: 1.5;
  outline: none;
}

.clarification-text-input {
  min-height: 42px;
  padding: 0 14px;
}

.clarification-textarea {
  min-height: 88px;
  padding: 12px 14px;
  resize: vertical;
}

.clarification-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.clarification-panel-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
}

.clarification-panel-progress {
  flex: 0 0 auto;
  color: #1d4ed8;
  font-weight: 600;
}

.clarification-panel-question-title {
  min-width: 0;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clarification-submit-button {
  border: 1px solid #2f6df6;
  border-radius: 999px;
  background: #2f6df6;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.clarification-submit-button {
  min-height: 36px;
  padding: 0 16px;
  box-shadow: 0 8px 18px rgba(47, 109, 246, 0.18);
}

.clarification-submit-button:disabled {
  opacity: 0.56;
  cursor: default;
  box-shadow: none;
}

.clarification-cancel-button {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #d6dce5;
  border-radius: 999px;
  background: #ffffff;
  color: #4b5563;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.clarification-cancel-button:disabled {
  opacity: 0.56;
  cursor: default;
}

.clarification-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 640px) {
  .clarification-panel-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .clarification-panel-meta {
    justify-content: space-between;
  }

  .clarification-panel-actions {
    justify-content: stretch;
  }

  .clarification-cancel-button,
  .clarification-submit-button {
    flex: 1 1 0;
  }
}

.conversation-card-empty .conversation-composer-wrap {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  padding: 12px 0 0;
}

.composer-guide {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 0 6px;
  color: #8b8f97;
  font-size: 12px;
  line-height: 1.6;
}

.composer-guide.first {
  color: #1f5f8b;
  font-weight: 500;
}

.suggestion-guide {
  padding-left: 12px;
  padding-right: 0;
  margin-bottom: 10px;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 400;
}

.conversation-card-empty .workspace-banner,
.conversation-card-empty .suggestion-block,
.conversation-card-empty .suggestion-row,
.conversation-card-empty .composer-bar {
  width: min(100%, 860px);
  margin-left: auto;
  margin-right: auto;
}

.conversation-card-empty .workspace-banner {
  padding-left: 2px;
  padding-right: 2px;
}

.composer-bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: min(100%, 860px);
  margin: 0 auto;
  min-height: 74px;
  padding: 12px 18px 14px;
  border: 1px solid #e6e8eb;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05), 0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

.composer-file-input {
  display: none;
}

.composer-selected-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  margin-bottom: 8px;
}

.composer-bar textarea {
  width: 100%;
  min-height: 24px;
  max-height: 180px;
  padding: 0 120px 0 2px;
  border: none;
  background: transparent;
  color: #111827;
  outline: none;
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  overflow-y: auto;
  field-sizing: content;
}

.composer-bar textarea::placeholder {
  color: #a8afb9;
}

.composer-actions {
  position: absolute;
  right: 16px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.composer-upload-button,
.composer-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.composer-upload-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
}

.composer-button-icon {
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

.composer-button-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.composer-button-icon-arrow {
  width: 20px;
  height: 20px;
  font-size: 20px;
  line-height: 1;
  transform: none;
}

.composer-upload-button.active {
  background: #eef4ff;
  color: #2f6df6;
}

.composer-submit {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: #d5deeb;
  color: #ffffff;
  box-shadow: none;
}

.composer-submit-interrupt {
  width: auto;
  min-width: 76px;
  padding: 0 14px;
  background: #e11d48;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(225, 29, 72, 0.24);
}

.composer-submit:not(:disabled) {
  background: #2f6df6;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(47, 109, 246, 0.28);
}

.composer-submit-interrupt:not(:disabled) {
  background: #e11d48;
  box-shadow: 0 8px 18px rgba(225, 29, 72, 0.24);
}

.composer-submit {
  cursor: pointer;
  padding: 0;
}

.composer-submit:disabled,
.composer-upload-button:disabled {
  cursor: default;
}

.composer-button-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
}

.composer-button-icon-stop {
  width: 12px;
  height: 12px;
  font-size: 12px;
}

.artifact-shell {
  min-height: 0;
}

.panel {
  padding: 0;
}

.artifact-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f5f5f4;
  border: 1px solid #e3e5e8;
  border-radius: 24px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  overflow-x: hidden;
  overflow-y: auto;
}

.artifact-groups {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  gap: 10px;
  padding: 6px 16px 12px;
  border-top: none;
  border-bottom: none;
}

.artifact-group-title {
  margin-bottom: 6px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
}

.artifact-group-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.artifact-literature-table {
  display: grid;
  gap: 8px;
}

.artifact-literature-header,
.artifact-literature-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(140px, 0.9fr) minmax(260px, 2fr) auto;
  gap: 10px;
  align-items: start;
}

.artifact-literature-header {
  padding: 0 4px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
}

.artifact-literature-row {
  padding: 10px 12px;
  border: 1px solid #e2e4e8;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.artifact-literature-cell {
  min-width: 0;
  color: #111827;
  font-size: 13px;
  line-height: 1.5;
}

.artifact-literature-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #111827;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
}

.artifact-literature-button.active {
  color: #2563eb;
}

.artifact-literature-meta,
.artifact-literature-detail {
  white-space: pre-wrap;
}

.artifact-literature-meta {
  color: #6b7280;
  font-size: 12px;
}

.artifact-literature-download {
  display: flex;
  justify-content: flex-end;
}

.artifact-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.artifact-button {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid #e2e4e8;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #6b7280;
  text-align: left;
  cursor: pointer;
}

.artifact-label-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.artifact-item-meta {
  color: #6b7280;
  font-size: 12px;
}

.artifact-button.active {
  border-color: #d7dbe0;
  background: #f3f4f6;
  color: #111827;
}

.artifact-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #d7dbe0;
  background: #ffffff;
  color: #111827;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.artifact-viewer {
  flex: 0 0 auto;
  min-height: auto;
  overflow: visible;
  margin: 0 14px 14px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e4e7eb;
  color: #111827;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  font-size: 12px;
  line-height: 1.6;
}

.artifact-viewer-image {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: #f8fafc;
}

.artifact-image-preview {
  display: block;
  max-width: 100%;
  height: auto;
  background: #ffffff;
  border: 1px solid #e4e7eb;
  border-radius: 12px;
}

.artifact-viewer-markdown {
  background: #ffffff;
  color: #111827;
}

.artifact-viewer-markdown h1,
.artifact-viewer-markdown h2,
.artifact-viewer-markdown h3,
.artifact-viewer-markdown h4 {
  margin: 0 0 12px;
  color: #111827;
}

.artifact-viewer-markdown p,
.artifact-viewer-markdown ul,
.artifact-viewer-markdown ol,
.artifact-viewer-markdown blockquote,
.artifact-viewer-markdown table,
.artifact-viewer-markdown pre {
  margin: 0 0 14px;
}

.artifact-viewer-markdown ul,
.artifact-viewer-markdown ol {
  padding-left: 20px;
}

.artifact-viewer-markdown li + li {
  margin-top: 6px;
}

.artifact-viewer-markdown a {
  color: #2563eb;
  text-decoration: none;
}

.artifact-viewer-markdown a:hover {
  text-decoration: underline;
}

.artifact-viewer-markdown img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 14px auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.artifact-mermaid-block {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  overflow-x: auto;
}

.artifact-mermaid-block .mermaid {
  display: flex;
  justify-content: center;
}

.artifact-mermaid-block svg {
  max-width: 100%;
  height: auto;
}

.artifact-viewer-markdown table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.artifact-viewer-markdown th,
.artifact-viewer-markdown td {
  border: 1px solid #d1d5db;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.artifact-viewer-markdown th {
  background: #f3f4f6;
}

.artifact-viewer-markdown code {
  padding: 2px 5px;
  border-radius: 6px;
  background: #f3f4f6;
  font-size: 12px;
}

.artifact-viewer-markdown pre code {
  display: block;
  padding: 0;
  background: transparent;
}

.artifact-viewer-markdown blockquote {
  padding: 10px 14px;
  border-left: 3px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.suggestion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.qualification-assessment-text {
  margin-top: 8px;
  white-space: pre-wrap;
}

.suggestion-chip {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #4b5563;
  padding: 0 0 0 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  justify-content: flex-start;
  text-decoration: none;
}

.suggestion-chip:hover {
  text-decoration-line: underline;
  text-decoration-style: dashed;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.inline-feedback,
.empty-state {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #dde1e7;
  background: #ffffff;
  color: #4b5563;
}

.inline-feedback-compact {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.2;
}

.inline-feedback.inline-feedback-success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.inline-feedback.inline-feedback-workflow-ready {
  margin-top: 12px;
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.inline-feedback.inline-feedback-backtrack {
  margin-top: 12px;
  border-color: #fdba74;
  background: #fff7ed;
  color: #9a3412;
}

.inline-feedback.inline-feedback-guard {
  margin-top: 12px;
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.inline-feedback.inline-feedback-warning {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.inline-feedback.inline-feedback-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.artifact-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px 10px;
}

.artifact-panel-head-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.artifact-view-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 2px 4px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f8fafc;
}

.artifact-view-mode-button {
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 0 10px;
  cursor: pointer;
}

.artifact-view-mode-button.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.artifact-export-button {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dbe1e8;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font-size: 12px;
  font-weight: 600;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
}

.artifact-export-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.artifact-export-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.artifact-export-feedback {
  font-size: 12px;
}

.artifact-export-feedback.success {
  color: #15803d;
}

.artifact-export-feedback.error {
  color: #b91c1c;
}

.artifact-close-button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #dfe3e8;
  background: #ffffff;
  color: #6b7280;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.workspace-title-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 1180px) {
  .app-shell {
    flex-direction: column;
  }

  .projects-sidebar,
  .projects-sidebar.collapsed {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .artifact-shell {
    width: 100%;
    flex-basis: auto;
    padding: 0;
  }

  .workspace-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .workspace-banner,
  .conversation-card,
  .panel {
    border-radius: 18px;
  }

  .workspace-banner,
  .section-heading,
  .system-context-head {
    flex-direction: column;
  }

  .composer-bar {
    min-height: 86px;
  }

  .workspace-topbar {
    padding: 0 14px;
  }

  .workspace-brand-row {
    gap: 10px;
  }

  .workspace-brand-main,
  .workspace-brand-sub {
    font-size: 16px;
  }

  .message {
    max-width: 100%;
  }
}

.user-action-row,
.managed-user-password {
  display: flex;
  gap: 8px;
  align-items: center;
}

.user-action-row {
  margin-top: 4px;
  flex-wrap: wrap;
}

.managed-user-list {
  display: grid;
  gap: 12px;
  margin-top: 2px;
}

.managed-user-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fafafa;
}

.managed-user-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.managed-user-password input {
  flex: 1;
  min-width: 0;
}

.user-action.danger {
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 900px) {
  .settings-modal-backdrop {
    padding: 16px;
  }

  .settings-modal {
    width: min(100vw - 32px, 960px);
    max-height: calc(100vh - 32px);
  }

  .settings-layout {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 150px);
  }

  .settings-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 20px 0;
    border-right: 0;
    border-bottom: 1px solid #eef2f7;
    background: #ffffff;
  }

  .settings-nav-item {
    width: auto;
    min-width: 108px;
  }

  .settings-content {
    padding-top: 16px;
  }
}
