/* Orchestral workbench — tokens 1:1 med mockup (oklch, burgunder hue ~20–30) */
:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: oklch(99% 0.003 90);
  --bg-alt: oklch(100% 0 0);
  --sidebar: oklch(97% 0.004 90);
  --editor: oklch(99% 0.003 90);
  --panel: oklch(98% 0.003 90);
  --border: oklch(90% 0.004 90);
  --text: oklch(18% 0.005 90);
  --muted: oklch(42% 0.006 90);
  --dim: oklch(58% 0.006 90);
  --accent: oklch(46% 0.15 20);
  --accent-soft: oklch(93% 0.05 20);
  --accent-hover: oklch(42% 0.16 20);
  --accent-text: oklch(99% 0.005 20);
  --accent-2: oklch(55% 0.12 240);
  --accent-2-soft: oklch(93% 0.03 240);
  --list-hover: oklch(95% 0.01 20);
  --list-active: oklch(92% 0.025 20);
  --input-bg: oklch(100% 0 0);
  --composer-bg: oklch(100% 0 0);
  --terminal-bg: oklch(99% 0.003 90);
  --success: #2f6b45;
  --error: #b42318;
  --send-fg: var(--accent-text);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Monaco, monospace;
  --sidebar-w: 246px;
  --right-w: 280px;
  --radius-sm: 7px;
  --radius-md: 9px;
  --radius-lg: 16px;
  --radius: var(--radius-md);
  --brand-glow: none;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: oklch(20% 0.006 90);
  --bg-alt: oklch(17% 0.006 90);
  --sidebar: oklch(15% 0.006 90);
  --editor: oklch(20% 0.006 90);
  --panel: oklch(17% 0.006 90);
  --border: oklch(30% 0.008 90);
  --text: oklch(93% 0.004 90);
  --muted: oklch(68% 0.006 90);
  --dim: oklch(50% 0.006 90);
  --accent: oklch(70% 0.15 20);
  --accent-soft: oklch(30% 0.07 20);
  --accent-hover: oklch(74% 0.15 20);
  --accent-text: oklch(15% 0.02 20);
  --accent-2: oklch(70% 0.12 240);
  --accent-2-soft: oklch(28% 0.05 240);
  --list-hover: oklch(24% 0.02 20);
  --list-active: oklch(28% 0.03 20);
  --input-bg: oklch(23% 0.006 90);
  --composer-bg: oklch(23% 0.006 90);
  --terminal-bg: oklch(15% 0.006 90);
  --success: #6ecf8e;
  --error: #f48771;
  --send-fg: var(--accent-text);
  --radius-sm: 7px;
  --radius-md: 9px;
  --radius-lg: 16px;
  --radius: var(--radius-md);
  --brand-glow: none;
}

[data-theme="orchestral"] {
  color-scheme: dark;
  --bg: #0d0d0f;
  --bg-alt: #16161c;
  --sidebar: #111114;
  --editor: #131318;
  --panel: #111114;
  --border: #2a2838;
  --border-glow: rgba(6, 182, 212, 0.35);
  --text: #e8eaef;
  --muted: #a1a8b8;
  --dim: #6b7280;
  --accent: #06b6d4;
  --accent-soft: rgba(6, 182, 212, 0.14);
  --accent-hover: #22d3ee;
  --accent-text: #0a0a0c;
  --accent-2: #8b5cf6;
  --accent-2-soft: rgba(139, 92, 246, 0.14);
  --accent-secondary: #8b5cf6;
  --accent-gold: #f59e0b;
  --accent-coral: #f43f5e;
  --list-hover: rgba(6, 182, 212, 0.06);
  --list-active: rgba(139, 92, 246, 0.14);
  --input-bg: #16161c;
  --composer-bg: #16161c;
  --terminal-bg: #08080a;
  --success: #34d399;
  --error: #fb7185;
  --send-fg: #0a0a0c;
  --ai-surface: linear-gradient(
    135deg,
    rgba(6, 182, 212, 0.1) 0%,
    rgba(139, 92, 246, 0.08) 45%,
    rgba(245, 158, 11, 0.06) 100%
  );
  --ai-border: linear-gradient(180deg, #06b6d4, #8b5cf6 55%, #f59e0b);
  --brand-gradient: linear-gradient(90deg, #22d3ee, #a78bfa, #fbbf24);
  --radius-sm: 7px;
  --radius-md: 9px;
  --radius-lg: 16px;
  --radius: var(--radius-md);
  --brand-glow: 0 0 16px rgba(6, 182, 212, 0.45);
  --spotlight: radial-gradient(ellipse 80% 50% at 20% 0%, rgba(6, 182, 212, 0.28), transparent 55%);
}

[data-theme="swiftie-debut"] {
  color-scheme: dark;
  --bg: #0f1a0c;
  --sidebar: #121f0e;
  --editor: #141a10;
  --panel: #121f0e;
  --border: #2d4a22;
  --text: #e8f5e0;
  --muted: #a8c898;
  --dim: #6a8a5a;
  --accent: #8db600;
  --accent-hover: #a4d41a;
  --list-hover: rgba(141, 182, 0, 0.1);
  --list-active: rgba(141, 182, 0, 0.2);
  --input-bg: #1a2814;
  --terminal-bg: #0a1208;
  --success: #8db600;
  --error: #e32636;
  --send-fg: #0f1a0c;
}

[data-theme="swiftie-fearless"] {
  color-scheme: dark;
  --bg: #1a1608;
  --sidebar: #1f1a0a;
  --editor: #221c0c;
  --panel: #1f1a0a;
  --border: #4a3d14;
  --text: #fff4d6;
  --muted: #d4c090;
  --dim: #9a8458;
  --accent: #c9a227;
  --accent-hover: #e0b83a;
  --list-hover: rgba(201, 162, 39, 0.12);
  --list-active: rgba(201, 162, 39, 0.22);
  --input-bg: #2a2410;
  --terminal-bg: #120f06;
  --success: #c9a227;
  --error: #e32636;
  --send-fg: #1a1608;
}

[data-theme="swiftie-speaknow"] {
  color-scheme: dark;
  --bg: #140a1c;
  --sidebar: #180e22;
  --editor: #1c1026;
  --panel: #180e22;
  --border: #3d2458;
  --text: #f0e0ff;
  --muted: #c4a8e0;
  --dim: #8868a8;
  --accent: #b57edc;
  --accent-hover: #c99aee;
  --list-hover: rgba(181, 126, 220, 0.12);
  --list-active: rgba(181, 126, 220, 0.22);
  --input-bg: #241430;
  --terminal-bg: #0c0610;
  --success: #b57edc;
  --error: #ff6b9d;
  --send-fg: #140a1c;
}

[data-theme="swiftie-red"] {
  color-scheme: dark;
  --bg: #1a0808;
  --sidebar: #200a0a;
  --editor: #240c0c;
  --panel: #200a0a;
  --border: #5c1818;
  --text: #ffe8e8;
  --muted: #e0a0a0;
  --dim: #a06060;
  --accent: #e32636;
  --accent-hover: #ff4050;
  --list-hover: rgba(227, 38, 54, 0.12);
  --list-active: rgba(227, 38, 54, 0.22);
  --input-bg: #301010;
  --terminal-bg: #100404;
  --success: #ff6b6b;
  --error: #ff4050;
  --send-fg: #fff;
}

[data-theme="swiftie-1989"] {
  color-scheme: dark;
  --bg: #0a1420;
  --sidebar: #0c1828;
  --editor: #0e1c30;
  --panel: #0c1828;
  --border: #1e3a5f;
  --text: #e8f6ff;
  --muted: #98c8e8;
  --dim: #5888a8;
  --accent: #89cff0;
  --accent-hover: #a8e0ff;
  --list-hover: rgba(137, 207, 240, 0.1);
  --list-active: rgba(137, 207, 240, 0.2);
  --input-bg: #142840;
  --terminal-bg: #060c14;
  --success: #89cff0;
  --error: #ff6b9d;
  --send-fg: #0a1420;
}

[data-theme="swiftie-reputation"] {
  color-scheme: dark;
  --bg: #0a0a0a;
  --sidebar: #0e0e0e;
  --editor: #121212;
  --panel: #0e0e0e;
  --border: #333018;
  --text: #e8e8e8;
  --muted: #a8a090;
  --dim: #686050;
  --accent: #c9b037;
  --accent-hover: #e0c850;
  --list-hover: rgba(201, 176, 55, 0.1);
  --list-active: rgba(201, 176, 55, 0.18);
  --input-bg: #1a1a1a;
  --terminal-bg: #050505;
  --success: #c9b037;
  --error: #e32636;
  --send-fg: #0a0a0a;
}

[data-theme="swiftie-lover"] {
  color-scheme: dark;
  --bg: #1a0a14;
  --sidebar: #200c18;
  --editor: #260e1c;
  --panel: #200c18;
  --border: #5c2048;
  --text: #ffe8f4;
  --muted: #f0a8c8;
  --dim: #a86888;
  --accent: #ff69b4;
  --accent-hover: #ff8cc8;
  --list-hover: rgba(255, 105, 180, 0.12);
  --list-active: rgba(255, 105, 180, 0.22);
  --input-bg: #301020;
  --terminal-bg: #100408;
  --success: #ff69b4;
  --error: #e32636;
  --send-fg: #1a0a14;
}

[data-theme="swiftie-folklore"] {
  color-scheme: dark;
  --bg: #141210;
  --sidebar: #181614;
  --editor: #1c1a18;
  --panel: #181614;
  --border: #3d3830;
  --text: #ebe4d8;
  --muted: #b8b0a4;
  --dim: #787068;
  --accent: #a89888;
  --accent-hover: #c0b0a0;
  --list-hover: rgba(168, 152, 136, 0.1);
  --list-active: rgba(168, 152, 136, 0.2);
  --input-bg: #242018;
  --terminal-bg: #0c0a08;
  --success: #a89888;
  --error: #c45c5c;
  --send-fg: #141210;
}

[data-theme="swiftie-evermore"] {
  color-scheme: dark;
  --bg: #120c08;
  --sidebar: #16100a;
  --editor: #1a140c;
  --panel: #16100a;
  --border: #3d2818;
  --text: #f0e4d8;
  --muted: #c4a888;
  --dim: #886848;
  --accent: #a0522d;
  --accent-hover: #c06840;
  --list-hover: rgba(160, 82, 45, 0.12);
  --list-active: rgba(160, 82, 45, 0.22);
  --input-bg: #281810;
  --terminal-bg: #0a0604;
  --success: #a0522d;
  --error: #8b3a3a;
  --send-fg: #f0e4d8;
}

[data-theme="swiftie-midnights"] {
  color-scheme: dark;
  --bg: #0a0a18;
  --sidebar: #0e0e20;
  --editor: #121228;
  --panel: #0e0e20;
  --border: #2a2848;
  --text: #e8e4ff;
  --muted: #a8a4d0;
  --dim: #686490;
  --accent: #9b8bb8;
  --accent-hover: #b8a8d4;
  --list-hover: rgba(155, 139, 184, 0.12);
  --list-active: rgba(155, 139, 184, 0.22);
  --input-bg: #181830;
  --terminal-bg: #060610;
  --success: #9b8bb8;
  --error: #e87890;
  --send-fg: #0a0a18;
}

[data-theme="swiftie-ttpd"] {
  color-scheme: dark;
  --bg: #121110;
  --sidebar: #161514;
  --editor: #1a1918;
  --panel: #161514;
  --border: #3a3530;
  --text: #f5f0e6;
  --muted: #c4b8a8;
  --dim: #888078;
  --accent: #c4b8a8;
  --accent-hover: #dcd0c0;
  --list-hover: rgba(196, 184, 168, 0.1);
  --list-active: rgba(196, 184, 168, 0.2);
  --input-bg: #222018;
  --terminal-bg: #0a0908;
  --success: #a89888;
  --error: #8b4040;
  --send-fg: #121110;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  display: flex;
  flex-direction: column;
}

.update-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 10px 16px;
  background: linear-gradient(90deg, #1a5c3a, #1f9d5c);
  color: #fff;
  border-bottom: 2px solid #157a47;
  flex-shrink: 0;
}

.update-banner.hidden {
  display: none !important;
}

.update-banner-text {
  margin: 0;
  flex: 1;
  min-width: 200px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.update-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.update-banner .btn.secondary {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.update-banner .btn.secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.workbench {
  display: grid;
  grid-template-columns: var(--sidebar-w) 4px 1fr 4px var(--right-w);
  flex: 1;
  min-height: 0;
}

.resize-v {
  cursor: col-resize;
  background: transparent;
  z-index: 2;
}

.resize-v:hover {
  background: var(--accent);
  opacity: 0.35;
}

/* —— Sidebars —— */
.sidebar {
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  border-color: var(--border);
  min-width: 180px;
  overflow: hidden;
}

.sidebar.left {
  border-right: 1px solid var(--border);
}

.sidebar.right {
  border-left: 1px solid var(--border);
  min-width: 240px;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--border);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  flex-shrink: 0;
  background: transparent;
  object-fit: contain;
}

.sidebar-actions {
  display: flex;
  gap: 4px;
}

.sidebar-actions .icon-btn {
  flex: 1;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
}

.icon-btn:hover {
  background: var(--list-hover);
}

.sidebar-section {
  padding: 6px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar-section.grow {
  flex: 1;
  min-height: 0;
}

.section-label {
  padding: 4px 14px 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.list-item {
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  border-left: 2px solid transparent;
}

.list-item:hover {
  background: var(--list-hover);
}

.list-item.active {
  background: var(--list-active);
  border-left-color: var(--accent);
}

.project-tree {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-bottom: 8px;
}

.sidebar-search-wrap {
  padding: 0 10px 8px;
}

.sidebar-search {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
}

.sidebar-search:focus {
  outline: none;
  border-color: var(--accent);
}

.project-group {
  margin-bottom: 2px;
}

.project-group.is-collapsed .project-chats,
.project-group.is-collapsed .nested-archive,
.project-group.is-collapsed .sidebar-show-all {
  display: none;
}

.project-header-row {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.project-chevron {
  flex-shrink: 0;
  width: 22px;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-chevron:hover {
  color: var(--text);
}

.project-header {
  display: block;
  flex: 1;
  min-width: 0;
  text-align: left;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
}

.sidebar-show-all {
  display: block;
  width: calc(100% - 12px);
  margin: 0 0 6px 12px;
  border: none;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  padding: 2px 8px;
}

.sidebar-show-all:hover {
  text-decoration: underline;
}

.project-chats {
  margin: 0;
  padding: 0 0 4px 10px;
  overflow: visible;
  flex: none;
}

.project-chats .list-item {
  font-size: 12px;
  padding: 5px 10px 5px 12px;
  border-left-width: 2px;
}

.project-chats.archived .list-item {
  opacity: 0.85;
}

.nested-archive {
  margin: 0 0 6px 14px;
  font-size: 11px;
}

.nested-archive summary {
  cursor: pointer;
  color: var(--muted);
  padding: 2px 0 4px;
  list-style: none;
}

.nested-archive summary::-webkit-details-marker {
  display: none;
}

.nested-archive summary::before {
  content: "▸ ";
}

.nested-archive[open] summary::before {
  content: "▾ ";
}

.project-group.is-active-project .project-header.active {
  border-left-color: var(--accent);
}

.sidebar-footer {
  margin-top: auto;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
}

.usage-widget {
  font-size: 11px;
}

.usage-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--muted);
}

.usage-title {
  font-weight: 600;
  color: var(--text);
}

.usage-detail {
  font-size: 10px;
  text-align: right;
  max-width: 62%;
}

.usage-subdetail {
  font-size: 9px;
  color: var(--dim);
  margin-bottom: 6px;
  line-height: 1.3;
}

.usage-track {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.usage-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* —— Center chat —— */
.center {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

.center-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.center-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  min-height: 40px;
}

.center-title {
  min-width: 0;
  flex: 1;
}

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

.breadcrumb {
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msg.system {
  align-self: center;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 12px;
  margin: 8px 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--sidebar) 80%, transparent);
}

.mode-chip {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--sidebar);
  color: var(--muted);
}

.mode-chip[data-mode="plan"] {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.mode-chip[data-mode="book"] {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 40%, var(--border));
}

.mode-chip[data-mode="froy"] {
  color: #2d8a5e;
  border-color: #b8dcc8;
  background: #e8f5ee;
}

.motor-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: 4px;
}

.motor-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-right: 2px;
}

.motor-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.motor-btn.active {
  background: var(--sidebar);
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.motor-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ensemble-meta {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

.media-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
  max-height: 50vh;
  overflow: auto;
}

.media-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
}

.media-card img,
.media-card video {
  max-width: 100%;
  border-radius: 4px;
}

.agent-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.agent-status.hidden {
  display: none;
}

.agent-status.is-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 1.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.turn-live {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
}

.turn-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse-dot 1.2s ease-in-out infinite;
}

.turn-live.is-done::before {
  animation: none;
  background: var(--success);
}

.turn-thinking {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--list-hover);
  border: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
}

.turn-thinking-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dim);
  margin-bottom: 6px;
}

.turn-thinking.is-streaming .turn-thinking-body::after {
  content: "▍";
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

.turn-activity.is-live .activity-body {
  display: block;
}

.turn-activity.is-live .activity-summary {
  color: var(--text);
}

.header-actions {
  display: flex;
  gap: 8px;
}

.select-sm {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px 24px;
  overscroll-behavior: contain;
}

.welcome {
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.turn {
  margin-bottom: 24px;
}

.turn-user {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.turn-activity {
  margin-bottom: 8px;
}

.activity-summary {
  display: block;
  width: 100%;
  text-align: left;
  padding: 2px 0;
  border: none;
  background: none;
  color: var(--dim);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.activity-summary:hover {
  color: var(--muted);
}

.activity-body {
  padding-left: 8px;
  border-left: 1px solid var(--border);
  margin-top: 4px;
}

.activity-body[hidden] {
  display: none;
}

.activity-step {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--dim);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-step.is-running {
  color: var(--muted);
}

.activity-step.is-error {
  color: var(--error);
}

.turn-response {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.turn-media {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.chat-media-frame {
  position: relative;
  width: min(100%, 520px);
  border-radius: 14px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface, #1a1a1a) 88%, #2a3340);
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}

.chat-media-frame.is-failed {
  padding: 16px;
  background: color-mix(in srgb, var(--error) 8%, transparent);
  border-color: color-mix(in srgb, var(--error) 35%, transparent);
}

.chat-media-img,
.chat-media-video,
.md-body .md-img,
.md-body .chat-media-img {
  display: block;
  width: 100%;
  max-width: min(100%, 520px);
  height: auto;
  border-radius: 14px;
}

.chat-media-frame .chat-media-img,
.chat-media-frame .chat-media-video {
  border-radius: 0;
  max-width: none;
}

.chat-media-actions {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--surface, #1a1a1a) 92%, transparent);
}

.chat-media-download {
  font-size: 0.85rem;
  color: var(--accent, #6eb6ff);
  text-decoration: none;
}

.chat-media-download:hover {
  text-decoration: underline;
}

.media-card .chat-media-actions {
  margin-top: 8px;
  border-top: none;
  padding: 0;
  background: transparent;
}

.media-gen-stage {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: end stretch;
  padding: 16px;
  min-height: 220px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 10% 0%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 55%),
    radial-gradient(90% 70% at 90% 100%, color-mix(in srgb, #5ec8ff 22%, transparent), transparent 50%),
    linear-gradient(145deg, #141820, #1c2430 45%, #12161e);
}

.media-gen-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.media-gen-orb {
  position: absolute;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.55;
  animation: media-orb-drift 4.8s ease-in-out infinite;
}

.media-gen-orb-1 {
  left: -8%;
  top: 12%;
  background: #6ec8ff;
  animation-delay: 0s;
}

.media-gen-orb-2 {
  right: -6%;
  top: 28%;
  width: 36%;
  background: #ffb86b;
  animation-delay: -1.2s;
}

.media-gen-orb-3 {
  left: 28%;
  bottom: -18%;
  width: 48%;
  background: #8ef0c0;
  animation-delay: -2.1s;
}

.media-gen-orb-4 {
  left: 42%;
  top: -12%;
  width: 28%;
  background: #c4a1ff;
  animation-delay: -0.6s;
}

.media-gen-orb-5 {
  right: 18%;
  bottom: 8%;
  width: 22%;
  background: #ff8fab;
  animation-delay: -3s;
}

.media-gen-sweep {
  position: absolute;
  inset: -20% -40%;
  background: linear-gradient(
    105deg,
    transparent 35%,
    color-mix(in srgb, #fff 18%, transparent) 48%,
    transparent 62%
  );
  animation: media-sweep 2.4s ease-in-out infinite;
}

.media-gen-status {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #f4f7fb;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.media-gen-hint {
  position: relative;
  z-index: 1;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: color-mix(in srgb, #f4f7fb 72%, transparent);
  max-width: 90%;
}

.media-gen-error {
  margin: 0;
  font-size: 13px;
  color: var(--error);
  white-space: pre-wrap;
}

@keyframes media-orb-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  33% {
    transform: translate3d(8%, -6%, 0) scale(1.08);
  }
  66% {
    transform: translate3d(-6%, 8%, 0) scale(0.94);
  }
}

@keyframes media-sweep {
  0% {
    transform: translateX(-30%) rotate(8deg);
    opacity: 0.2;
  }
  50% {
    opacity: 0.55;
  }
  100% {
    transform: translateX(30%) rotate(8deg);
    opacity: 0.2;
  }
}

.turn-response.is-streaming::after {
  content: "▍";
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

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

.turn-error {
  color: var(--error);
  margin-top: 8px;
}

.turn-error-quota {
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--error) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--error) 35%, transparent);
}

.quota-banner {
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--error);
  background: color-mix(in srgb, var(--error) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--error) 35%, transparent);
}

.composer-input-wrap {
  position: relative;
  display: flex;
  flex: 1;
  gap: 8px;
  align-items: flex-end;
  min-width: 0;
}

.command-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  margin-bottom: 6px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 20;
}

.command-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}

.command-item:hover,
.command-item.active {
  background: var(--accent-soft, color-mix(in srgb, var(--accent) 12%, transparent));
}

.command-item strong {
  display: block;
  font-size: 13px;
}

.command-item span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.composer-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  z-index: 2;
}

.composer-shell {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.attachment-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 8px;
}

.attachment-strip.hidden {
  display: none;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
}

.attachment-chip img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.attachment-chip .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip button {
  border: none;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  padding: 0 2px;
  font-size: 14px;
  line-height: 1;
}

.attachment-chip button:hover {
  color: var(--error);
}

.attach-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.attach-btn:hover {
  border-color: var(--accent);
}

.turn-user-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.turn-user-attachments .att-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--text);
}

.composer-input-wrap textarea {
  flex: 1;
  min-width: 0;
}

.stop-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--error);
  border-radius: 8px;
  background: transparent;
  color: var(--error);
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

.stop-btn:hover {
  background: rgba(251, 113, 133, 0.12);
}

.composer-bar textarea {
  flex: 1;
  resize: none;
  min-height: 22px;
  max-height: 160px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--editor);
  color: var(--text);
  font: inherit;
  line-height: 1.45;
}

.composer-bar textarea:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

.send-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--send-fg);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.send-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.send-btn:not(:disabled):hover {
  background: var(--accent-hover);
}

/* —— Right panel —— */
.panel-tabs {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
  gap: 0;
}

.panel-tab {
  flex: 0 0 auto;
  min-width: 40px;
  padding: 10px 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  position: relative;
}

.panel-tab-icon {
  opacity: 0.85;
  font-size: 14px;
  line-height: 1;
}

.panel-tab-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.panel-tab-skill {
  margin-left: auto;
  border: 1px dashed var(--border);
  border-radius: 8px;
  margin: 4px 6px 4px auto;
  min-width: 36px;
  color: var(--dim);
}

.panel-tab-skill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.panel-tab-skill.is-active-skill {
  border-style: solid;
  border-color: var(--accent);
  color: var(--accent);
}

.workbench.workspace-chat {
  grid-template-columns: var(--sidebar-w) 4px 1fr 0 0;
}

.workbench.workspace-chat > .resize-v[data-resize="right"],
.workbench.workspace-chat > .sidebar.right {
  display: none;
}

.workbench.workspace-work.needs-project .sidebar.right::before {
  content: none;
}

.workspace-project-cta {
  padding: 20px 16px;
  text-align: center;
}

.workspace-project-cta p {
  margin: 0 0 12px;
  color: var(--muted);
}

.sidebar-list-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px 8px;
}

.sidebar-list-tab {
  flex: 1;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius, 10px);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.sidebar-list-tab.active {
  background: var(--list-active);
  color: var(--text);
  border-color: var(--border);
}

.sidebar-list-create {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: var(--radius, 10px);
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.sidebar-list-create:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sidebar-search-wrap.is-disabled,
.sidebar-search:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.chat-work-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.chat-work-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.chat-work-btn.active {
  background: var(--accent);
  color: var(--send-fg);
}

.mode-chip.is-contextual {
  display: none;
}

.mode-chip.is-contextual[data-mode="plan"],
.mode-chip.is-contextual[data-mode="book"] {
  display: inline-flex;
}

.settings-tab-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

.settings-tab-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 8px 10px 4px;
}

.settings-help-embed {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.froy-activity-cards {
  display: none;
  gap: 8px;
  padding: 0 12px 10px;
  flex-wrap: wrap;
}

body.froy-mode .froy-activity-cards {
  display: flex;
}

.froy-activity-card {
  flex: 1 1 100px;
  min-width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 2px solid #9fd4b4;
  border-radius: 16px;
  background: #fff;
  color: #153d28;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.froy-activity-card:hover {
  border-color: #1f9d5c;
  background: #eef8f1;
}

.froy-activity-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.chattie-svg {
  width: 72px;
  height: 72px;
  display: block;
}

.chattie-svg.is-waving .chattie-arm-right {
  animation: chattie-wave 700ms ease-in-out 2 !important;
}

.chattie-svg.is-talking .chattie-mouth {
  animation: chattie-talk 160ms ease-in-out infinite alternate !important;
}

@keyframes chattie-wave {
  50% { transform: rotate(-24deg); }
}

@keyframes chattie-talk {
  from { transform: scaleY(1); }
  to { transform: scaleY(0.45); }
}

@media (prefers-reduced-motion: reduce) {
  .chattie-svg.is-waving .chattie-arm-right,
  .chattie-svg.is-talking .chattie-mouth {
    animation: none !important;
  }
}

.panel-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent, #3b82f6);
  color: transparent;
  font-size: 0;
}

.panel-tab:hover {
  color: var(--text);
}

.panel-tab.active {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.panel-empty {
  padding: 16px 14px;
  text-align: left;
}

.panel-empty-title {
  font-weight: 600;
  margin: 0 0 6px;
}

.panel-empty-inline {
  padding: 8px 4px;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  background: var(--panel, var(--bg));
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: auto;
}

.changed-files-banner {
  margin: 8px 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.changed-files-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.changed-files-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.changed-file-chip {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
}

.changed-file-chip:hover {
  border-color: var(--accent);
}

.run-stripe {
  font-size: 12px;
  color: var(--muted);
  padding: 2px 0 0;
}

.knowledge-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.knowledge-search-row .input-wide {
  flex: 1;
}

.knowledge-hit {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: transparent;
  color: inherit;
  border-radius: 8px;
  padding: 8px;
  margin: 0 0 8px;
  cursor: pointer;
}

.knowledge-hit:hover {
  border-color: var(--accent);
}

.knowledge-hit pre {
  white-space: pre-wrap;
  font-size: 11px;
  margin: 6px 0 0;
}

.media-compose {
  padding: 0 0 10px;
}

.media-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.media-card--pending {
  opacity: 0.85;
}

.terminal-toolbar {
  display: flex;
  gap: 6px;
  padding: 8px 10px 0;
}

.terminal-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.terminal-suggest code {
  font-size: 11px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.title-row {
  flex-wrap: wrap;
  gap: 6px;
}

.sidebar.right {
  display: flex;
  flex-direction: column;
}

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

.panel-body.hidden {
  display: none;
}

#panelFiles {
  display: grid;
  grid-template-rows: auto minmax(120px, 38%) 1fr;
}

.file-tree {
  overflow: auto;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.tree-node {
  user-select: none;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px calc(8px + var(--depth, 0) * 12px);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-row:hover {
  background: var(--list-hover);
}

.tree-row.open-file {
  color: var(--accent);
}

.tree-chevron {
  width: 12px;
  font-size: 9px;
  color: var(--dim);
  flex-shrink: 0;
}

.tree-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-download {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  padding: 0 4px;
  font-size: 12px;
  opacity: 0;
}

.tree-row:hover .tree-download {
  opacity: 1;
}

.tree-download:hover {
  color: var(--accent);
}

.editor-toolbar {
  display: flex;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.editor-toolbar.hidden {
  display: none;
}

.btn-sm {
  font-size: 12px;
  padding: 4px 10px;
}

.editor-area {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.tab-bar {
  display: flex;
  overflow-x: auto;
  background: var(--editor);
  border-bottom: 1px solid var(--border);
  min-height: 32px;
}

.editor-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.editor-tab.active {
  background: var(--bg);
  color: var(--text);
}

.editor-tab .close-tab {
  opacity: 0.5;
  font-size: 14px;
}

.editor-tab .close-tab:hover {
  opacity: 1;
}

.editor-view {
  flex: 1;
  margin: 0;
  padding: 12px;
  overflow: auto;
  background: var(--bg);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
}

.editor-view code {
  white-space: pre;
}

.terminal-wrap {
  flex: 1;
  padding: 4px;
  background: var(--terminal-bg);
  min-height: 200px;
}

.theme-switch {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  padding: 3px;
  background: var(--editor);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.theme-btn {
  flex: 1;
  padding: 5px 8px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.theme-btn:hover {
  color: var(--text);
}

.theme-btn.active {
  background: var(--list-active);
  color: var(--text);
  font-weight: 600;
}

.terminal-wrap .xterm {
  height: 100%;
}

.hidden {
  display: none !important;
}

/* —— Orchestral brand theme —— */
[data-theme="orchestral"] .workbench {
  background:
    radial-gradient(ellipse 70% 45% at 0% 0%, rgba(6, 182, 212, 0.09), transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 100%, rgba(245, 158, 11, 0.07), transparent 50%),
    radial-gradient(ellipse 40% 30% at 85% 15%, rgba(139, 92, 246, 0.06), transparent 45%),
    var(--bg);
}

[data-theme="orchestral"] .sidebar.left {
  border-right: 1px solid rgba(6, 182, 212, 0.2);
  box-shadow: inset -1px 0 0 rgba(139, 92, 246, 0.08);
}

[data-theme="orchestral"] .sidebar.right {
  border-left: 1px solid rgba(139, 92, 246, 0.2);
}

[data-theme="orchestral"] .brand-mini {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: 0.04em;
}

[data-theme="orchestral"] .section-label {
  color: var(--accent-gold);
  letter-spacing: 0.08em;
  font-weight: 600;
}

[data-theme="orchestral"] .list-item.active {
  background: var(--list-active);
  border-left: 2px solid var(--accent);
  padding-left: 6px;
  box-shadow: inset 0 0 24px rgba(6, 182, 212, 0.06);
}

[data-theme="orchestral"] .list-item:hover {
  background: var(--list-hover);
}

[data-theme="orchestral"] .theme-switch {
  border-color: rgba(6, 182, 212, 0.25);
  background: rgba(0, 0, 0, 0.25);
}

[data-theme="orchestral"] .theme-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(139, 92, 246, 0.2));
  color: #e0f2fe;
  box-shadow:
    0 0 0 1px rgba(6, 182, 212, 0.45),
    0 0 14px rgba(6, 182, 212, 0.2);
}

[data-theme="orchestral"] .theme-btn[data-theme="orchestral"].active {
  background: var(--brand-gradient);
  color: #0a0a0c;
  -webkit-text-fill-color: #0a0a0c;
  font-weight: 700;
}

[data-theme="orchestral"] .panel-tab.active {
  color: var(--accent-hover);
  box-shadow:
    inset 0 -2px 0 var(--accent),
    inset 0 -4px 0 var(--accent-secondary);
}

[data-theme="orchestral"] .icon-btn:hover {
  color: var(--accent-hover);
  background: rgba(6, 182, 212, 0.1);
}

[data-theme="orchestral"] .turn-live.is-live::before,
[data-theme="orchestral"] .agent-status.is-live::before {
  background: var(--brand-gradient);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

[data-theme="orchestral"] .turn-live.is-live,
[data-theme="orchestral"] .agent-status.is-live {
  color: #a5f3fc;
}

[data-theme="orchestral"] .turn-live.is-done::before {
  background: var(--accent-gold);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

[data-theme="orchestral"] .usage-fill {
  background: var(--brand-gradient);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.35);
}

[data-theme="orchestral"] .usage-title {
  color: var(--accent-hover);
}

[data-theme="orchestral"] .send-btn:not(:disabled) {
  background: var(--brand-gradient);
  color: var(--send-fg);
  box-shadow:
    0 0 0 1px rgba(6, 182, 212, 0.4),
    0 4px 16px rgba(139, 92, 246, 0.25);
}

[data-theme="orchestral"] .send-btn:not(:disabled):hover {
  filter: brightness(1.08);
  box-shadow:
    0 0 0 1px rgba(245, 158, 11, 0.5),
    0 4px 20px rgba(6, 182, 212, 0.35);
}

[data-theme="orchestral"] .composer-bar textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px rgba(6, 182, 212, 0.5),
    0 0 12px rgba(139, 92, 246, 0.15);
}

[data-theme="orchestral"] .resize-v:hover {
  background: var(--accent-gold);
  opacity: 0.55;
}

[data-theme="orchestral"] .turn-user {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

[data-theme="orchestral"] .turn-assistant .turn-response {
  position: relative;
  background: var(--ai-surface);
  border: 1px solid rgba(6, 182, 212, 0.22);
  border-radius: 4px 12px 12px 4px;
  padding: 14px 16px 14px 18px;
  margin: 4px 0 16px;
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.35),
    0 0 40px rgba(6, 182, 212, 0.06);
}

[data-theme="orchestral"] .turn-assistant .turn-response::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: var(--ai-border);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.45);
}

[data-theme="orchestral"] .turn-assistant .turn-response.is-streaming::after {
  color: var(--accent-gold);
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

[data-theme="orchestral"] .turn-assistant .md-body strong {
  color: #fcd34d;
  font-weight: 600;
}

[data-theme="orchestral"] .turn-assistant .md-body a {
  color: #67e8f9;
  text-decoration-color: rgba(6, 182, 212, 0.5);
}

[data-theme="orchestral"] .turn-assistant .md-body code {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #e9d5ff;
}

[data-theme="orchestral"] .turn-assistant .md-body h2,
[data-theme="orchestral"] .turn-assistant .md-body h3 {
  color: #a5f3fc;
}

[data-theme="orchestral"] .turn-thinking {
  border-left: 2px solid rgba(139, 92, 246, 0.5);
  padding-left: 10px;
}

[data-theme="orchestral"] .turn-thinking-label {
  color: var(--accent-secondary);
}

[data-theme="orchestral"] .activity-step.is-running {
  color: #c4b5fd;
}

.brand-mini {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 13px;
  line-height: 16px;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-item-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-item-actions {
  display: none;
  gap: 2px;
}

.chat-item:hover .chat-item-actions {
  display: inline-flex;
}

.chat-action {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 4px;
  font-size: 12px;
}

.chat-action:hover {
  color: var(--accent);
}

.archive-details {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}

.archive-details summary {
  cursor: pointer;
  padding: 4px 8px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  width: min(440px, 92vw);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.modal-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.modal-tab {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.modal-tab.active {
  border-color: var(--accent);
  color: var(--accent);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.settings-layout,
.docs-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  flex: 1;
  min-height: 0;
}

.settings-tabs,
.docs-nav {
  border-right: 1px solid var(--border);
  padding: 12px;
  overflow-y: auto;
}

.settings-tab,
.docs-nav-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  margin-bottom: 4px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.settings-tab.active,
.docs-nav-item.active {
  background: var(--list-active);
}

.settings-panels {
  padding: 20px;
  overflow-y: auto;
}

.mcp-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mcp-list-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
}

.mcp-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.mcp-list-summary {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
  word-break: break-word;
}

.mcp-list-config {
  margin: 8px 0 0;
  padding: 8px 10px;
  max-height: 140px;
  overflow: auto;
  font-size: 11px;
  line-height: 1.4;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-all;
}

.mcp-add-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mcp-type-fields.hidden {
  display: none !important;
}

.mcp-json {
  width: 100%;
  min-height: 120px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  resize: vertical;
  box-sizing: border-box;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.settings-panel h2 {
  margin-top: 0;
}

.input-wide {
  width: 100%;
  max-width: 420px;
  padding: 8px;
  margin: 6px 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
}

.check-grid,
.check-row {
  display: block;
  margin: 4px 0;
}

.btn {
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  font: inherit;
}

.btn.primary {
  background: var(--accent);
  color: var(--send-fg);
  border-color: var(--accent);
}

.btn.secondary {
  background: transparent;
  color: var(--text);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn.is-loading {
  pointer-events: none;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
  border: 2px solid color-mix(in srgb, currentColor 30%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.settings-status {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.settings-status.hidden {
  display: none;
}

.settings-status.is-success {
  color: var(--success);
}

.settings-status.is-error {
  color: var(--error);
}

.files-toolbar {
  padding: 8px 8px 4px;
  border-bottom: 1px solid var(--border);
}

.swiftie-card {
  max-width: 420px;
}

.swiftie-era-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  margin: 16px 0;
}

.swiftie-era-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.swiftie-era-btn:hover {
  border-color: var(--accent);
  background: var(--list-hover);
}

.swiftie-era-btn strong {
  font-size: 14px;
}

.swiftie-era-btn span {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

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

.hint {
  color: var(--muted);
  font-size: 12px;
}

.hint a {
  color: var(--accent);
}

.link-btn {
  border: none;
  background: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
}

.docs-body {
  padding: 24px 32px;
  overflow-y: auto;
}

.md-body h1,
.md-body h2,
.md-body h3 {
  margin: 1em 0 0.5em;
  line-height: 1.3;
}

.md-body h1 {
  font-size: 1.35em;
}

.md-body h2 {
  font-size: 1.15em;
}

.md-body p {
  margin: 0.6em 0;
  line-height: 1.55;
}

.md-body ul,
.md-body ol {
  margin: 0.5em 0 0.75em;
  padding-left: 1.4em;
}

.md-body li {
  margin: 0.25em 0;
}

.md-body strong {
  font-weight: 600;
}

.md-body code {
  background: var(--list-hover);
  padding: 2px 5px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.92em;
}

.md-body pre.md-pre {
  margin: 0.75em 0;
  padding: 10px 12px;
  background: var(--list-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-x: auto;
}

.md-body pre.md-pre code {
  background: none;
  padding: 0;
}

.md-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75em 0;
  font-size: 12px;
}

.md-body th,
.md-body td {
  border: 1px solid var(--border);
  padding: 6px 10px;
  text-align: left;
}

.md-body th {
  background: var(--list-hover);
  font-weight: 600;
}

.md-body a {
  color: var(--accent);
}

.md-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1em 0;
}

.turn-response.md-body {
  white-space: normal;
}

.plan-view {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  font-size: 13px;
}

.plan-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.plan-wait,
.plan-warn {
  color: var(--muted);
  padding: 12px 14px;
  margin: 0;
  line-height: 1.5;
}

.plan-warn {
  color: var(--error);
}

.plan-draft {
  padding: 0 14px 12px;
  opacity: 0.85;
  font-size: 12px;
}

.question-card {
  max-width: 480px;
}

.question-text {
  margin: 0 0 12px;
  line-height: 1.5;
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.question-opt {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.question-opt:hover,
.question-opt.selected {
  border-color: var(--accent);
  background: var(--list-hover);
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.additions-input {
  width: 100%;
  min-height: 120px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

/* Frøy vs standard — aldri vis begge */
.froy-only {
  display: none !important;
}

body.froy-mode .standard-only {
  display: none !important;
}

body.froy-mode .froy-only.froy-sidebar-actions,
body.froy-mode .froy-only.froy-composer-label,
body.froy-mode .froy-only.froy-speech-slot,
body.froy-mode .froy-only.froy-helper-dock {
  display: flex !important;
}

body.froy-mode .froy-only.froy-composer-label {
  display: block !important;
}

body.froy-mode .froy-only.froy-settings-btn {
  display: flex !important;
}

body.froy-mode .sidebar-actions .froy-only.froy-action-btn {
  display: flex !important;
  width: 100%;
}

body.froy-mode .sidebar-actions .froy-settings-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  border: 2px solid #9fd4b4;
  border-radius: 12px;
  background: #fff;
  color: #153d28;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}

body.froy-mode .sidebar-actions .froy-settings-btn:hover {
  background: #eef8f1;
  border-color: #1f9d5c;
}

body.froy-mode .sidebar-actions {
  flex-direction: column;
  gap: 8px;
  padding: 0 10px 12px;
}

[data-theme="froy"] {
  color-scheme: light;
  --bg: oklch(99% 0.01 148);
  --bg-alt: oklch(100% 0 0);
  --sidebar: oklch(94% 0.04 148);
  --editor: oklch(100% 0 0);
  --panel: oklch(96% 0.025 148);
  --border: oklch(82% 0.06 148);
  --text: oklch(22% 0.05 148);
  --muted: oklch(40% 0.05 148);
  --dim: oklch(52% 0.04 148);
  --accent: oklch(46% 0.15 148);
  --accent-soft: oklch(93% 0.05 148);
  --accent-hover: oklch(50% 0.15 148);
  --accent-text: oklch(99% 0.005 148);
  --accent-2: oklch(55% 0.12 240);
  --accent-2-soft: oklch(93% 0.03 240);
  --list-hover: oklch(90% 0.05 148);
  --list-active: oklch(86% 0.07 148);
  --input-bg: oklch(100% 0 0);
  --composer-bg: oklch(100% 0 0);
  --terminal-bg: oklch(97% 0.02 148);
  --success: oklch(46% 0.15 148);
  --error: #d64545;
  --send-fg: var(--accent-text);
  --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sidebar-w: 246px;
  --right-w: 280px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius: var(--radius-md);
  --brand-glow: none;
}

body.froy-mode {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  background: linear-gradient(180deg, #e8f8ef 0%, #fafef8 35%);
}

body.froy-mode .update-banner {
  background: linear-gradient(90deg, #157a47, #28b36a);
  border-bottom-color: #0f6b3f;
}

/* Skjul avansert UI — behold Filer («Mine ting») */
body.froy-mode .froy-hide-advanced,
body.froy-mode .froy-hide-tab,
body.froy-mode .turn-activity,
body.froy-mode .turn-thinking,
body.froy-mode .turn-live.is-done,
body.froy-mode .chat-action,
body.froy-mode .project-archive {
  display: none !important;
}

body.froy-mode .workbench.froy-layout.workspace-chat,
body.froy-mode .workbench.froy-layout.right-closed {
  grid-template-columns: minmax(200px, 246px) 4px minmax(0, 1fr) 0 0 !important;
}

body.froy-mode .workbench.froy-layout.workspace-chat > .resize-v[data-resize="right"],
body.froy-mode .workbench.froy-layout.workspace-chat > .sidebar.right,
body.froy-mode .workbench.froy-layout.right-closed > .resize-v[data-resize="right"],
body.froy-mode .workbench.froy-layout.right-closed > .sidebar.right {
  display: none !important;
}

body.froy-mode .workbench.froy-layout {
  grid-template-columns: minmax(200px, 246px) 4px minmax(0, 1fr) 4px minmax(240px, 280px) !important;
  grid-template-rows: 1fr;
}

body.froy-mode .workbench.froy-layout > .resize-v[data-resize="left"] {
  display: block !important;
  grid-column: 2;
  grid-row: 1;
}

body.froy-mode .workbench.froy-layout > .resize-v[data-resize="right"] {
  display: block !important;
  grid-column: 4;
  grid-row: 1;
}

body.froy-mode .workbench.froy-layout > .sidebar.right {
  display: flex !important;
  flex-direction: column;
  grid-column: 5;
  grid-row: 1;
  background: #e8f8ef;
  border-left: 2px solid #9fd4b4;
}

body.froy-mode .workbench.froy-layout > .sidebar.left {
  grid-column: 1;
  grid-row: 1;
}

body.froy-mode .workbench.froy-layout > .center {
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
}

body.froy-mode .panel-tabs {
  display: flex !important;
}

body.froy-mode .panel-tab[data-panel="files"] {
  display: inline-flex !important;
}

body.froy-mode .files-toolbar,
body.froy-mode .editor-area,
body.froy-mode .file-tree {
  display: block !important;
}

body.froy-mode .sidebar.left {
  background: #dff3e8;
  border-right: 2px solid #9fd4b4;
}

body.froy-mode .sidebar-top {
  flex-shrink: 0;
}

body.froy-mode .brand-row {
  padding: 12px 10px;
}

body.froy-mode .brand-mini {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f6b3f;
}

body.froy-mode .brand-logo {
  width: 28px;
  height: 28px;
  background: transparent;
}

body.froy-mode .froy-sidebar-actions {
  flex-direction: column;
  gap: 8px;
  padding: 0 10px 12px;
}

body.froy-mode .froy-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  background: #1f9d5c;
  color: #fff;
  box-shadow: 0 4px 0 #157a47;
}

body.froy-mode .froy-action-btn:hover {
  background: #28b36a;
}

body.froy-mode .froy-action-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #157a47;
}

body.froy-mode .sidebar-section {
  overflow: hidden;
}

body.froy-mode .project-tree {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(21, 122, 71, 0.35) transparent;
}

body.froy-mode .project-tree::-webkit-scrollbar {
  width: 6px;
  height: 0;
}

body.froy-mode .project-tree::-webkit-scrollbar-thumb {
  background: rgba(21, 122, 71, 0.35);
  border-radius: 6px;
}

body.froy-mode .project-tree::-webkit-scrollbar-track {
  background: transparent;
}

body.froy-mode .froy-chat-list {
  overflow: visible;
  flex: none;
}

body.froy-mode .sidebar-footer.froy-footer-hidden {
  display: none !important;
}

body.froy-mode .section-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #3d6b52;
  padding: 8px 14px 4px;
}

body.froy-mode .list-item {
  margin: 4px 8px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 12px;
}

body.froy-mode .list-item.active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(21, 122, 71, 0.15);
}

body.froy-mode .center {
  background: transparent;
}

body.froy-mode #experienceSwitch {
  display: inline-flex !important;
}

body.froy-mode .center-header {
  display: flex !important;
  padding: 8px 12px 4px;
}

body.froy-mode .breadcrumb {
  font-size: 1rem;
}
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 16px 0;
  padding: 14px 18px;
  background: #fff;
  border: 2px solid #9fd4b4;
  border-radius: 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #153d28;
  box-shadow: 0 4px 16px rgba(21, 122, 71, 0.08);
}

body.froy-mode .froy-top-emoji {
  font-size: 1.4rem;
}

body.froy-mode .center-body {
  padding: 8px 16px 0;
}

body.froy-mode .chat-scroll {
  padding: 8px 4px 16px;
}

body.froy-mode .welcome {
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
  padding: 2rem 1.5rem;
  color: #3d6b52;
  background: #fff;
  border-radius: 16px;
  border: 2px dashed #9fd4b4;
  margin: 1rem 0;
}

body.froy-mode .turn-froy-user {
  align-self: flex-end;
  max-width: 85%;
  margin: 10px 0 10px auto;
  padding: 14px 18px;
  background: #1f9d5c;
  color: #fff;
  border-radius: 18px 18px 4px 18px;
  font-size: 1.05rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(31, 157, 92, 0.25);
}

body.froy-mode .turn-froy {
  background: #fff;
  border: 2px solid #c8ead4;
  border-radius: 16px;
  padding: 16px;
  margin: 12px 0;
  box-shadow: 0 6px 20px rgba(21, 122, 71, 0.06);
}

body.froy-mode .turn-froy .turn-live {
  font-size: 1rem;
  font-weight: 700;
  color: #1f6b47;
  padding: 8px 12px;
  background: #e8f8ef;
  border-radius: 10px;
  margin-bottom: 10px;
}

body.froy-mode .turn-froy .turn-live.is-live::before {
  content: "⏳ ";
}

body.froy-mode .turn-froy .turn-response {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #153d28;
}

body.froy-mode .turn-froy .turn-response h1,
body.froy-mode .turn-froy .turn-response h2,
body.froy-mode .turn-froy .turn-response h3 {
  font-size: 1.15rem;
  margin-top: 0.75em;
}

body.froy-mode .turn-froy .turn-response code {
  font-size: 0.9em;
  background: #e8f8ef;
  padding: 2px 6px;
  border-radius: 6px;
}

body.froy-mode .composer-shell {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: end;
  gap: 8px 16px;
  width: 100%;
}

body.froy-mode .composer-bar {
  flex-direction: column;
  align-items: stretch;
  padding: 16px 20px 20px;
  overflow: visible;
}

body.froy-mode .composer-shell {
  overflow: visible;
}

body.froy-mode .froy-composer-label {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f6b3f;
  margin: 0 0 8px;
}

body.froy-mode .composer-input-wrap {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex: 1;
  min-width: 0;
  background: #f0faf4;
  border: 2px solid #9fd4b4;
  border-radius: 14px;
  padding: 10px 12px 10px 14px;
}

body.froy-mode .send-btn {
  min-width: 88px;
  font-weight: 800;
}

body.froy-mode #btnStop {
  min-width: 72px;
  font-size: 0.95rem;
  font-weight: 700;
}

body.froy-mode .froy-speech-slot {
  grid-column: 1 / -1;
  grid-row: 1;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0 0 0 4px;
  z-index: 1;
  pointer-events: none;
  display: flex;
  justify-content: flex-start;
}

body.froy-mode .froy-helper-dock {
  position: relative;
  grid-column: 1;
  grid-row: 2;
  flex: none;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  align-self: end;
}

body.froy-mode .froy-speech-bubble {
  position: relative;
  display: inline-block;
  max-width: min(520px, 100%);
  background: #fff;
  border: 2px solid #9fd4b4;
  border-radius: 16px 16px 16px 4px;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #153d28;
  line-height: 1.4;
  box-shadow: 0 8px 20px rgba(21, 122, 71, 0.12);
  opacity: 0;
  transform: translateY(8px) scale(0.95);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

body.froy-mode .froy-speech-bubble.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

body.froy-mode .froy-speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 32px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-right: 2px solid #9fd4b4;
  border-bottom: 2px solid #9fd4b4;
  transform: rotate(45deg);
}

body.froy-mode .froy-character-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

body.froy-mode .froy-character-btn:hover .froy-char {
  transform: translateY(-2px);
}

body.froy-mode .froy-char {
  position: relative;
  width: 88px;
  height: 108px;
  transition: transform 0.2s ease;
}

body.froy-mode .froy-char-hair {
  position: absolute;
  top: 0;
  left: 50%;
  margin-left: -34px;
  width: 68px;
  height: 36px;
  background: linear-gradient(180deg, #c4783a 0%, #a85f2a 100%);
  border-radius: 34px 34px 20px 20px;
  z-index: 2;
}

body.froy-mode .froy-char-head {
  position: absolute;
  top: 18px;
  left: 50%;
  margin-left: -32px;
  width: 64px;
  height: 64px;
  background: linear-gradient(180deg, #ffe8d4 0%, #f5d0b8 100%);
  border-radius: 50%;
  border: 2px solid #e8b896;
  z-index: 3;
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.04);
}

body.froy-mode .froy-char-face {
  position: relative;
  width: 100%;
  height: 100%;
}

body.froy-mode .froy-char-brow {
  position: absolute;
  top: 20px;
  width: 14px;
  height: 4px;
  background: #8b5a3c;
  border-radius: 4px;
}

body.froy-mode .froy-char-brow.left {
  left: 14px;
  transform: rotate(-8deg);
}

body.froy-mode .froy-char-brow.right {
  right: 14px;
  transform: rotate(8deg);
}

body.froy-mode .froy-char-eye {
  position: absolute;
  top: 26px;
  width: 11px;
  height: 13px;
  background: #1a3d28;
  border-radius: 50%;
  animation: froy-char-blink 5s infinite;
}

body.froy-mode .froy-char-eye.left {
  left: 16px;
}

body.froy-mode .froy-char-eye.right {
  right: 16px;
}

body.froy-mode .froy-char-eye::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  opacity: 0.9;
}

body.froy-mode .froy-char-cheek {
  position: absolute;
  top: 38px;
  width: 12px;
  height: 8px;
  background: #ffb8a8;
  border-radius: 50%;
  opacity: 0.65;
}

body.froy-mode .froy-char-cheek.left {
  left: 8px;
}

body.froy-mode .froy-char-cheek.right {
  right: 8px;
}

body.froy-mode .froy-char-mouth {
  position: absolute;
  bottom: 16px;
  left: 50%;
  margin-left: -12px;
  width: 24px;
  height: 12px;
  border: 3px solid #5c3d2e;
  border-top: none;
  border-radius: 0 0 20px 20px;
}

body.froy-mode .froy-char-torso {
  position: absolute;
  bottom: 0;
  left: 50%;
  margin-left: -30px;
  width: 60px;
  height: 42px;
  background: linear-gradient(180deg, #3cb371 0%, #1f9d5c 100%);
  border-radius: 12px 12px 8px 8px;
  z-index: 1;
  border: 2px solid #157a47;
}

body.froy-mode .froy-char-arm {
  position: absolute;
  bottom: 8px;
  width: 18px;
  height: 32px;
  background: linear-gradient(180deg, #ffe8d4, #f5d0b8);
  border-radius: 10px;
  border: 2px solid #e8b896;
  z-index: 0;
}

body.froy-mode .froy-char-arm.left {
  left: 4px;
  transform: rotate(18deg);
}

body.froy-mode .froy-char-arm.right {
  right: 4px;
  transform: rotate(-18deg);
}

body.froy-mode .froy-char-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: #0f6b3f;
}

@keyframes froy-char-blink {
  0%,
  48%,
  50%,
  100% {
    transform: scaleY(1);
  }
  49% {
    transform: scaleY(0.15);
  }
}

body.froy-mode .froy-helper-panel {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: min(320px, calc(100vw - 280px));
  max-height: min(380px, 50vh);
  display: flex;
  flex-direction: column;
  background: #fffdf8;
  border: 2px solid #9fd4b4;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(26, 61, 46, 0.18);
  overflow: hidden;
  z-index: 10;
}

body.froy-mode .sidebar-footer .froy-settings-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 20px);
  margin: 0 10px 10px;
  padding: 11px 14px;
  border: 2px solid #9fd4b4;
  border-radius: 12px;
  background: #fff;
  color: #153d28;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

body.froy-mode .sidebar-footer .froy-settings-btn:hover {
  background: #eef8f1;
  border-color: #1f9d5c;
}

body.froy-mode .composer-bar textarea {
  flex: 1;
  font-size: 1.1rem;
  min-height: 52px;
  max-height: 120px;
  border: none;
  background: transparent;
  resize: none;
  padding: 8px 0;
}

body.froy-mode .composer-bar textarea:focus {
  outline: none;
  box-shadow: none;
}

body.froy-mode .send-btn {
  min-width: 88px;
  height: 48px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  border: none;
}

body.froy-mode .send-btn:not(:disabled) {
  background: linear-gradient(180deg, #2ecc71, #1f9d5c);
  color: #fff;
  box-shadow: 0 4px 0 #157a47;
}

body.froy-mode .send-btn:not(:disabled):active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #157a47;
}

body.froy-mode #btnStop:not(.hidden) {
  min-width: 72px;
  height: 48px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  background: #ffe8e8;
  color: #c44d4d;
  border: 2px solid #f5b8b8;
}

body.froy-mode .breadcrumb {
  font-size: 1rem;
  font-weight: 700;
  color: #3d6b52;
}

body.froy-mode .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.1rem;
}

body.froy-mode .turn-error {
  font-size: 1rem;
  padding: 12px;
  border-radius: 10px;
  background: #fff0f0;
  border: 2px solid #f5b8b8;
}

.froy-settings-btn {
  display: none;
}

.froy-top-bar.hidden {
  display: none !important;
}

.settings-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

.switch-row {
  font-weight: 600;
  margin: 0.5rem 0;
}

.froy-helper-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #e8f5ee;
  border-bottom: 1px solid #b8dcc8;
}

.froy-helper-header strong {
  color: #1a3d2e;
}

.froy-helper-header .icon-btn {
  margin-left: auto;
}

.froy-helper-chat {
  flex: 1;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.froy-helper-msg {
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  max-width: 92%;
  font-size: 0.95em;
}

.froy-helper-msg--helper {
  align-self: flex-start;
  background: #e8f5ee;
  color: #1a3d2e;
}

.froy-helper-msg--you {
  align-self: flex-end;
  background: #d4efe0;
  color: #1a3d2e;
}

.froy-helper-suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 12px 8px;
  max-height: 140px;
  overflow: auto;
}

.froy-prompt-btn {
  text-align: left;
  border: 1px solid #b8dcc8;
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
  color: #1a3d2e;
}

.froy-prompt-btn:hover {
  background: #eef8f1;
  border-color: #2d8a5e;
}

.froy-prompt-btn strong {
  display: block;
  margin-bottom: 2px;
}

.froy-prompt-btn span {
  display: block;
  font-size: 0.88em;
  color: var(--muted);
}

.froy-helper-footer {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #b8dcc8;
  background: #f7fcf9;
}

.froy-helper-footer input {
  flex: 1;
  border: 1px solid #b8dcc8;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
}

.froy-intro {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(26, 61, 46, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.froy-intro-card {
  width: min(480px, 100%);
  background: #fffdf8;
  border: 2px solid #b8dcc8;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(26, 61, 46, 0.2);
}

.froy-intro-badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8f5ee;
  color: #2d8a5e;
  font-weight: 700;
  font-size: 0.85em;
}

.froy-intro-card h2 {
  margin: 0 0 10px;
  color: #1a3d2e;
}

.froy-intro-card p {
  margin: 0 0 12px;
}

.book-hint {
  margin: 10px 12px 6px;
  font-size: 12px;
}

.book-file-list {
  list-style: none;
  margin: 0;
  padding: 4px 8px 10px;
  border-bottom: 1px solid var(--border);
}

.book-file-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px;
}

.book-file-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}

.book-file-btn:hover {
  background: var(--list-hover);
}

.book-preview {
  flex: 1;
  overflow: auto;
  padding: 10px 12px;
  min-height: 120px;
}

.exp-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  vertical-align: middle;
}

.onboarding-card {
  max-width: 440px;
}

.onboarding-steps {
  margin: 1rem 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.onboarding-steps li {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}



.settings-help-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-help-list a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.settings-help-list a:hover {
  text-decoration: underline;
}

body.froy-mode .froy-character-btn {
  background: transparent;
  border: none;
  padding: 0;
}

body.froy-mode .chattie-host {
  display: block;
  width: 72px;
  height: 72px;
}

body.froy-mode .chattie-host img.chattie-fallback {
  width: 72px;
  height: 72px;
  display: block;
}


/* —— Mockup 1:1 chrome —— */
@keyframes eqbar {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  object-fit: contain;
  flex: none;
  background: transparent;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 16px 14px;
}

.brand-mini {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex: 1;
}

/* mockup brand-mark retired — use #brandLogo */

.eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 13px;
}

.eq-bars span {
  width: 2.5px;
  height: var(--h, 8px);
  background: var(--accent);
  border-radius: 1px;
  transform-origin: bottom;
  opacity: 0.35;
  animation: eqbar var(--dur, 1s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  animation-play-state: paused;
}

.eq-bars.is-live span {
  opacity: 1;
  animation-play-state: running;
}

.sidebar-actions-row {
  display: flex;
  gap: 6px;
  padding: 0 12px 14px;
}

.sidebar-primary-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 33px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.sidebar-primary-btn:hover {
  background: var(--accent-hover);
}

.sidebar-icon-btn {
  width: 33px;
  height: 33px;
  flex: none;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sidebar-icon-btn.sidebar-list-create {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.sidebar-list-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 0 12px 10px;
}

.seg {
  display: flex;
  gap: 3px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  flex: 1;
}

.seg-btn {
  flex: 1;
  padding: 5px 0;
  border-radius: 6px;
  border: none;
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--muted);
}

.seg-btn.active {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}

#motorSwitch .seg-btn.active,
.motor-switch .seg-btn.active {
  background: var(--accent-2);
  color: var(--bg);
}

#chatWorkSwitchHeader .seg-btn.active {
  background: var(--text);
  color: var(--bg);
}

.home-mode-switch .seg-btn,
#experienceSwitch .seg-btn,
#chatWorkSwitchHeader .seg-btn,
#motorSwitch .seg-btn {
  padding: 5px 13px;
  font-size: 12.5px;
  flex: 0 0 auto;
}

#experienceSwitch,
#chatWorkSwitchHeader,
#motorSwitch,
.home-mode-switch {
  flex: 0 0 auto;
}

.theme-switch .seg-btn {
  font-size: 11px;
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 10px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 2px 14px;
}

.sidebar-user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-2);
  flex: none;
}

.sidebar-user-name {
  font-size: 12.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-toggle-btn {
  margin-left: auto;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.panel-toggle-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.panel-toggle-btn.is-open {
  background: var(--list-active);
}

.title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  width: 100%;
}

.center-header {
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
}

.home-empty {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  gap: 26px;
}

.home-empty.hidden,
.chat-started.hidden {
  display: none !important;
}

.home-hero {
  text-align: center;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.home-greeting {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.home-subtitle {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}

.home-composer-card,
.composer-card {
  width: 100%;
  max-width: 600px;
  background: var(--composer-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 12px 12px 10px 16px;
}

.home-composer-card textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
}

.home-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.composer-ghost-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.composer-send-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: none;
  background: var(--border);
  color: var(--dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.composer-send-btn:not(:disabled) {
  background: var(--accent);
  color: var(--accent-text);
}

.home-suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 600px;
}

.home-suggestion-pill {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.home-mascot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.home-mascot.hidden {
  display: none !important;
}

.home-chattie-host {
  width: 74px;
  height: 74px;
}

.home-chattie-host svg,
.home-chattie-host img {
  width: 74px;
  height: 74px;
  display: block;
}

.home-mascot-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.froy-activity-cards {
  display: none;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 600px;
  padding: 0;
}

body.froy-mode .froy-activity-cards {
  display: flex;
}

.froy-activity-card {
  width: 126px;
  padding: 16px 10px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.froy-activity-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.workbench.right-closed {
  grid-template-columns: var(--sidebar-w) 4px 1fr 0 0;
}

.workbench.right-closed > .resize-v[data-resize="right"],
.workbench.right-closed > .sidebar.right {
  display: none;
}

.workbench.workspace-chat {
  /* Chat mode still allows toggle disabled; keep closed */
}

.panel-tabs {
  display: flex;
  gap: 2px;
  padding: 10px 8px 0;
  border-bottom: none;
}

.panel-tab {
  width: 34px;
  height: 30px;
  flex: 0 0 auto;
  min-width: 34px;
  padding: 0;
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent;
  box-shadow: none;
}

.panel-tab.active {
  box-shadow: none;
  border-bottom-color: var(--accent);
  color: var(--text);
}

.panel-tab-skill {
  margin: 0;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 8px 8px 0 0;
  opacity: 0.55;
}

.panel-tab-skill.is-active-skill {
  opacity: 1;
  border-style: none;
  border-bottom: 2px solid transparent;
}

.panel-tab-skill.is-active-skill.active {
  border-bottom-color: var(--accent);
}

.panel-tabs-rule {
  border-bottom: 1px solid var(--border);
  padding: 0 0 10px;
}

.composer-bar {
  padding: 10px 24px 20px;
  background: transparent;
  border-top: none;
}

.composer-bar .composer-input-wrap.composer-card {
  max-width: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.composer-bar .composer-input-wrap.composer-card textarea {
  border: none;
  background: transparent;
  box-shadow: none;
}

.composer-bar .send-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  padding: 0;
}

.sidebar.left {
  width: var(--sidebar-w);
}

.project-tree {
  padding: 0 8px 12px;
}

.list-item.chat-item,
.list-item.project-header {
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: 13px;
}

.list-item.active,
.list-item.chat-item.active {
  background: var(--list-active);
  font-weight: 600;
}

body.froy-mode .standard-only { display: none !important; }
body:not(.froy-mode) .froy-only { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .eq-bars span { animation: none !important; }
}

/* web: destructive confirm */
#confirmOk.danger,
.btn.danger {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
  box-shadow: none;
}
#confirmOk.danger:hover,
.btn.danger:hover {
  filter: brightness(1.08);
}
.file-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.35rem;
}
.file-row .file-name {
  flex: 1;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
  border-radius: 6px;
}
.file-row .file-name:hover {
  background: rgba(255, 255, 255, 0.06);
}
