/**
 * themes.css — Named theme overrides (data-skin)
 *
 * Architecture: dark/light stay 100% untouched. Each named theme picks a
 * structural base via data-theme (dark|light) so it inherits all existing
 * dark/light rules, then layers color overrides keyed on data-skin here.
 *
 * IMPORTANT: this file must load AFTER base.css / components.css / pages.css
 * so :root[data-skin="…"] overrides win on equal specificity via source order.
 */

/* ─────────────────────────────────────────────────────────────────────────
   ASH & EMBER  (base: dark)
   ───────────────────────────────────────────────────────────────────────── */
:root[data-skin="gray"] {
  --native-color-scheme: dark;
  --bg: var(--skin-bg);
  --bg-soft: var(--skin-bg-soft);
  --panel: var(--skin-panel);
  --panel-2: var(--skin-panel-2);
  --line: var(--skin-line);
  --line-strong: var(--skin-line-strong);
  --text: var(--skin-text);
  --fg: var(--skin-text);
  --muted: var(--skin-muted);
  --brand: var(--theme-palette-orange);
  --brand-2: #c2410c;
  --ok: #4ade80;
  --warn: #fbbf24;
  --err: #f87171;
  --flame: var(--theme-palette-orange);
  --flame-mid: #fb923c;
  --flame-glow: color-mix(in srgb, var(--theme-palette-orange) 22%, transparent);
  --flame-border: color-mix(in srgb, var(--theme-palette-orange) 45%, transparent);
  --sidebar-bg: #171717;
  --sidebar-text: #f1eee8;
  --sidebar-muted: #aaa49a;
  --sidebar-icon-bg: rgba(255,255,255,.06);
  --sidebar-icon-border: rgba(255,255,255,.12);
  --sidebar-item-bg: rgba(255,255,255,.045);
  --sidebar-item-hover: color-mix(in srgb, var(--theme-palette-orange) 13%, transparent);
  --sidebar-active-bg: color-mix(in srgb, var(--theme-palette-orange) 18%, transparent);
  --sidebar-search-bg: #202020;
  --sidebar-seg-bg: #202020;
  --sidebar-seg-active: color-mix(in srgb, var(--theme-palette-orange) 16%, transparent);
  --composer-bg: rgba(23,23,23,.78);
  --composer-panel: rgba(61,61,61,.74);
  --composer-input: rgba(72,72,72,.84);
  --composer-border: rgba(255,255,255,.13);
  --composer-text: #f1eee8;
  --composer-muted: rgba(241,238,232,.58);
  --pm-orange: var(--theme-palette-orange);
  --pm-orange-hot: #c2410c;
  --pm-ember: #6b2f0e;
  --pm-gold: #fb923c;
}

:root[data-skin="gray"] body {
  background: var(--bg);
}
:root[data-skin="gray"] main {
  background: var(--bg);
}
:root[data-skin="gray"] .main-shell-wrap {
  background: #262626;
}

/* ─────────────────────────────────────────────────────────────────────────
   OLYMPIAN BLUE  (base: dark)
   ───────────────────────────────────────────────────────────────────────── */
:root[data-skin="blue"] {
  --native-color-scheme: dark;

  /* surfaces */
  --bg: var(--skin-bg);
  --bg-soft: var(--skin-bg-soft);
  --panel: var(--skin-panel);
  --panel-2: var(--skin-panel-2);
  --line: var(--skin-line);
  --line-strong: var(--skin-line-strong);

  /* text */
  --text: var(--skin-text);
  --fg: var(--skin-text);
  --muted: var(--skin-muted);

  /* brand / accent → electric blue */
  --brand: var(--theme-palette-blue);
  --brand-2: #1e5fd0;
  --ok: #4ade80;
  --warn: #fbbf24;
  --err: #f87171;

  /* flame accent (reused everywhere for glow/borders) → blue */
  --flame: var(--theme-palette-blue);
  --flame-mid: #6fb0ff;
  --flame-glow: rgba(80,150,255,0.24);
  --flame-border: rgba(61,139,255,0.48);

  /* sidebar tokens */
  --sidebar-bg: rgba(8,16,33,0.82);
  --sidebar-text: #dce7ff;
  --sidebar-muted: #8295bb;
  --sidebar-icon-bg: rgba(120,170,255,0.08);
  --sidebar-icon-border: rgba(120,170,255,0.14);
  --sidebar-item-bg: rgba(120,170,255,0.05);
  --sidebar-item-hover: rgba(61,139,255,0.14);
  --sidebar-active-bg: rgba(61,139,255,0.20);
  --sidebar-search-bg: rgba(120,170,255,0.07);
  --sidebar-seg-bg: rgba(120,170,255,0.07);
  --sidebar-seg-active: rgba(61,139,255,0.18);

  /* logs */
  --log-bg: #0d1c36;
  --log-text: #b6c8ea;
  --log-info: #7fb0ff;

  /* progress panel */
  --progress-bg: linear-gradient(180deg, #122444 0%, #0e1d39 100%);
  --progress-border: #213a63;
  --progress-header-text: #e6eeff;
  --progress-chevron: #9fb3d8;
  --progress-empty-border: rgba(33, 58, 99, 0.8);
  --progress-empty-text: #9fb3d8;
  --progress-empty-bg: rgba(18, 36, 68, 0.5);
  --progress-text-base: #e6eeff;
  --progress-text-active: #e6eeff;
  --progress-dot-pending-bg: #16294e;
  --progress-dot-pending-border: #213a63;
  --progress-dot-active-bg: #0b1830;
  --progress-dot-active-border: #2a4a7c;
  --progress-spinner-track: rgba(61, 139, 255, 0.22);
  --progress-spinner-head: var(--theme-palette-blue);
}

/* component-layer accent vars (embers / composer) */
:root[data-skin="blue"] {
  --pm-orange: var(--theme-palette-blue);
  --pm-orange-hot: #2f6fd0;
  --pm-ember: #14315e;
  --pm-gold: #6fb0ff;
  --composer-bg: rgba(8, 16, 33, 0.76);
  --composer-panel: rgba(18, 34, 64, 0.74);
  --composer-input: rgba(22, 41, 78, 0.84);
  --composer-border: rgba(120, 170, 255, 0.12);
  --composer-text: #e6eeff;
  --composer-muted: rgba(220, 231, 255, 0.55);
}

/* ── Structural backgrounds that hard-code dark greys ── */
:root[data-skin="blue"] body {
  background:
    radial-gradient(circle at top left, rgba(61,139,255,0.10), transparent 34%),
    radial-gradient(circle at bottom right, rgba(110,176,255,0.06), transparent 30%),
    var(--bg);
}
:root[data-skin="blue"] main { background: #07101f; }
:root[data-skin="blue"] .main-shell-wrap { background: #0a1426; }

/* ── Main chat background: darkened Olympian Blue art ── */
:root[data-skin="blue"] :is(#chat-view, .unified-agent-chat-shell, #prom-bot-main-surface, #prom-bot-group-host) {
  background:
    linear-gradient(rgba(6, 13, 30, 0.55), rgba(6, 13, 30, 0.62)),
    #07101f url('/assets/chat-main-background-blue.jpeg') center center / cover no-repeat;
}
:root[data-skin="blue"] .side-chat-main-pane,
:root[data-skin="blue"] .side-chat-pane {
  background:
    linear-gradient(rgba(6, 13, 30, 0.55), rgba(6, 13, 30, 0.62)),
    #07101f url('/assets/chat-main-background-blue.jpeg') center center / cover no-repeat;
}

/* Page views inherit the blue panel surface */
:root[data-skin="blue"] .page-view { background: var(--panel); }

/* ─────────────────────────────────────────────────────────────────────────
   OLYMPIAN BLUE — orange → blue refinements
   Recolors the hard-coded orange literals from base/components/pages for the
   blue skin only. data-skin selectors load last, so they win on equal
   specificity via source order. Intentionally left orange: the composer
   attach/send buttons and the whole Settings modal (contrast is good there).
   ───────────────────────────────────────────────────────────────────────── */

/* ── Sidebar + topbar: flat navy matching .sidebar-footer, blue glow/border ── */
:root[data-skin="blue"] .sidebar,
:root[data-skin="blue"] .topbar {
  --pm-glow: rgba(61,139,255,0.18);
  background: var(--sidebar-bg);
  border-color: rgba(120,170,255,0.12);
}
:root[data-skin="blue"] .sidebar { border-right-color: rgba(61,139,255,0.20); }

/* Recolor the spinning conic shell decorations orange → blue */
:root[data-skin="blue"] .sidebar::before,
:root[data-skin="blue"] .topbar::before {
  background:
    conic-gradient(
      from var(--pm-angle),
      transparent 0deg,
      color-mix(in srgb, var(--theme-palette-blue), transparent 88%) 52deg,
      color-mix(in srgb, #6fb0ff, transparent 92%) 95deg,
      transparent 150deg,
      color-mix(in srgb, #1e3a78, transparent 82%) 225deg,
      transparent 310deg,
      color-mix(in srgb, #2f6fd0, transparent 89%) 360deg
    );
}
:root[data-skin="blue"] .sidebar::after,
:root[data-skin="blue"] .topbar::after {
  background:
    conic-gradient(
      from var(--pm-angle),
      rgba(255,255,255,0.18),
      color-mix(in srgb, var(--theme-palette-blue), transparent 58%),
      rgba(255,255,255,0.04),
      color-mix(in srgb, #6fb0ff, transparent 70%),
      rgba(255,255,255,0.16)
    );
}
:root[data-skin="blue"] .sidebar:hover,
:root[data-skin="blue"] .topbar:hover,
:root[data-skin="blue"] .topbar:focus-within {
  --pm-glow: rgba(61,139,255,0.26);
  box-shadow:
    0 0 24px var(--pm-glow),
    inset 0 1px 0 rgba(255,255,255,0.10),
    inset 0 0 0 1px rgba(255,255,255,0.10);
}
:root[data-skin="blue"] .sidebar-footer { border-top-color: rgba(61,139,255,0.18); }
:root[data-skin="blue"] .more-popover-item:hover { border-color: rgba(61,139,255,0.30); }

/* ── Chat scrollbar orange → blue ── */
:root[data-skin="blue"] #chat-messages.chat-scroller-active {
  scrollbar-color: rgba(61,139,255,0.50) transparent;
}
:root[data-skin="blue"] #chat-messages.chat-scroller-active::-webkit-scrollbar-thumb {
  background-color: rgba(61,139,255,0.50);
}

/* ── Composer stays flat (no glow/border) on blue skin ── */
:root[data-skin="blue"] .chat-input-area,
:root[data-skin="blue"] .chat-input-area:hover,
:root[data-skin="blue"] .chat-input-area:focus-within {
  border: none;
  box-shadow: none;
}

/* ── Skills (right panel) orange → blue ── */
:root[data-skin="blue"] .skill-card-icon {
  background: rgba(61,139,255,0.12);
  border-color: rgba(61,139,255,0.28);
  color: #6fb0ff;
}
:root[data-skin="blue"] .skill-card.enabled .skill-card-icon {
  background: rgba(61,139,255,0.18);
  border-color: rgba(61,139,255,0.45);
}
:root[data-skin="blue"] .skill-pin-btn:hover { background: rgba(61,139,255,0.10); color: #6fb0ff; }
:root[data-skin="blue"] .skill-pin-btn.active { color: #6fb0ff; }
:root[data-skin="blue"] .skill-card.pinned {
  border-color: rgba(61,139,255,0.45);
  box-shadow: 0 0 0 1px rgba(61,139,255,0.15);
}
:root[data-skin="blue"] .skills-show-more-btn {
  background: rgba(61,139,255,0.12);
  border-color: rgba(61,139,255,0.30);
}
:root[data-skin="blue"] .skills-show-more-btn:hover {
  background: rgba(61,139,255,0.20);
  border-color: rgba(61,139,255,0.42);
}
:root[data-skin="blue"] .skill-hover-popover { border-color: rgba(61,139,255,0.28); }
:root[data-skin="blue"] .skill-hover-popover button:hover {
  border-color: rgba(61,139,255,0.55);
  background: rgba(61,139,255,0.18);
}

/* ─────────────────────────────────────────────────────────────────────────
   AETHER VIOLET  (base: dark)
   ───────────────────────────────────────────────────────────────────────── */
:root[data-skin="purple"] {
  --native-color-scheme: dark;

  /* surfaces */
  --bg: var(--skin-bg);
  --bg-soft: var(--skin-bg-soft);
  --panel: var(--skin-panel);
  --panel-2: var(--skin-panel-2);
  --line: var(--skin-line);
  --line-strong: var(--skin-line-strong);

  /* text */
  --text: var(--skin-text);
  --fg: var(--skin-text);
  --muted: var(--skin-muted);

  /* brand / accent → electric violet */
  --brand: var(--theme-palette-violet);
  --brand-2: #6d28d9;
  --ok: #4ade80;
  --warn: #fbbf24;
  --err: #f87171;

  /* flame accent (reused everywhere for glow/borders) → violet */
  --flame: var(--theme-palette-violet);
  --flame-mid: #b794ff;
  --flame-glow: rgba(150,90,255,0.26);
  --flame-border: rgba(139,92,246,0.48);

  /* sidebar tokens */
  --sidebar-bg: rgba(13,6,28,0.82);
  --sidebar-text: #e8ddff;
  --sidebar-muted: #9a86c2;
  --sidebar-icon-bg: rgba(170,120,255,0.08);
  --sidebar-icon-border: rgba(170,120,255,0.14);
  --sidebar-item-bg: rgba(170,120,255,0.05);
  --sidebar-item-hover: rgba(139,92,246,0.16);
  --sidebar-active-bg: rgba(139,92,246,0.22);
  --sidebar-search-bg: rgba(170,120,255,0.07);
  --sidebar-seg-bg: rgba(170,120,255,0.07);
  --sidebar-seg-active: rgba(139,92,246,0.20);

  /* logs */
  --log-bg: #160b2c;
  --log-text: #cbb8ee;
  --log-info: #b794ff;

  /* progress panel */
  --progress-bg: linear-gradient(180deg, #1e1138 0%, #170c2e 100%);
  --progress-border: #34215c;
  --progress-header-text: #f0e9ff;
  --progress-chevron: #b29fd6;
  --progress-empty-border: rgba(52, 33, 92, 0.8);
  --progress-empty-text: #b29fd6;
  --progress-empty-bg: rgba(30, 17, 56, 0.5);
  --progress-text-base: #f0e9ff;
  --progress-text-active: #f0e9ff;
  --progress-dot-pending-bg: #261545;
  --progress-dot-pending-border: #34215c;
  --progress-dot-active-bg: #140a28;
  --progress-dot-active-border: #432a78;
  --progress-spinner-track: rgba(139, 92, 246, 0.22);
  --progress-spinner-head: var(--theme-palette-violet);
}

/* component-layer accent vars (embers / composer) */
:root[data-skin="purple"] {
  --pm-orange: var(--theme-palette-violet);
  --pm-orange-hot: #6d28d9;
  --pm-ember: #2a1452;
  --pm-gold: #b794ff;
  --composer-bg: rgba(13, 6, 28, 0.76);
  --composer-panel: rgba(30, 17, 56, 0.74);
  --composer-input: rgba(38, 21, 69, 0.84);
  --composer-border: rgba(170, 120, 255, 0.12);
  --composer-text: #f0e9ff;
  --composer-muted: rgba(232, 221, 255, 0.55);
}

/* ── Structural backgrounds that hard-code dark greys ── */
:root[data-skin="purple"] body {
  background:
    radial-gradient(circle at top left, rgba(139,92,246,0.12), transparent 34%),
    radial-gradient(circle at bottom right, rgba(183,148,255,0.07), transparent 30%),
    var(--bg);
}
:root[data-skin="purple"] main { background: #0c0518; }
:root[data-skin="purple"] .main-shell-wrap { background: #110826; }

/* ── Main chat background: darkened Aether Violet art ── */
:root[data-skin="purple"] :is(#chat-view, .unified-agent-chat-shell, #prom-bot-main-surface, #prom-bot-group-host) {
  background:
    linear-gradient(rgba(10, 4, 24, 0.55), rgba(10, 4, 24, 0.62)),
    #0c0518 url('/assets/chat-main-background-purple.jpeg') center center / cover no-repeat;
}
:root[data-skin="purple"] .side-chat-main-pane,
:root[data-skin="purple"] .side-chat-pane {
  background:
    linear-gradient(rgba(10, 4, 24, 0.55), rgba(10, 4, 24, 0.62)),
    #0c0518 url('/assets/chat-main-background-purple.jpeg') center center / cover no-repeat;
}

/* Page views inherit the violet panel surface */
:root[data-skin="purple"] .page-view { background: var(--panel); }

/* ── Sidebar + topbar: flat deep-violet matching .sidebar-footer ── */
:root[data-skin="purple"] .sidebar,
:root[data-skin="purple"] .topbar {
  --pm-glow: rgba(139,92,246,0.18);
  background: var(--sidebar-bg);
  border-color: rgba(170,120,255,0.12);
}
:root[data-skin="purple"] .sidebar { border-right-color: rgba(139,92,246,0.20); }

/* Recolor the spinning conic shell decorations orange → violet */
:root[data-skin="purple"] .sidebar::before,
:root[data-skin="purple"] .topbar::before {
  background:
    conic-gradient(
      from var(--pm-angle),
      transparent 0deg,
      color-mix(in srgb, var(--theme-palette-violet), transparent 88%) 52deg,
      color-mix(in srgb, #b794ff, transparent 92%) 95deg,
      transparent 150deg,
      color-mix(in srgb, #3a1c6e, transparent 82%) 225deg,
      transparent 310deg,
      color-mix(in srgb, #6d28d9, transparent 89%) 360deg
    );
}
:root[data-skin="purple"] .sidebar::after,
:root[data-skin="purple"] .topbar::after {
  background:
    conic-gradient(
      from var(--pm-angle),
      rgba(255,255,255,0.18),
      color-mix(in srgb, var(--theme-palette-violet), transparent 58%),
      rgba(255,255,255,0.04),
      color-mix(in srgb, #b794ff, transparent 70%),
      rgba(255,255,255,0.16)
    );
}
:root[data-skin="purple"] .sidebar:hover,
:root[data-skin="purple"] .topbar:hover,
:root[data-skin="purple"] .topbar:focus-within {
  --pm-glow: rgba(139,92,246,0.26);
  box-shadow:
    0 0 24px var(--pm-glow),
    inset 0 1px 0 rgba(255,255,255,0.10),
    inset 0 0 0 1px rgba(255,255,255,0.10);
}
:root[data-skin="purple"] .sidebar-footer { border-top-color: rgba(139,92,246,0.18); }
:root[data-skin="purple"] .more-popover-item:hover { border-color: rgba(139,92,246,0.30); }

/* ── Chat scrollbar orange → violet ── */
:root[data-skin="purple"] #chat-messages.chat-scroller-active {
  scrollbar-color: rgba(139,92,246,0.50) transparent;
}
:root[data-skin="purple"] #chat-messages.chat-scroller-active::-webkit-scrollbar-thumb {
  background-color: rgba(139,92,246,0.50);
}

/* ── Composer stays flat (no glow/border) on purple skin ── */
:root[data-skin="purple"] .chat-input-area,
:root[data-skin="purple"] .chat-input-area:hover,
:root[data-skin="purple"] .chat-input-area:focus-within {
  border: none;
  box-shadow: none;
}

/* ── Skills (right panel) orange → violet ── */
:root[data-skin="purple"] .skill-card-icon {
  background: rgba(139,92,246,0.12);
  border-color: rgba(139,92,246,0.28);
  color: #b794ff;
}
:root[data-skin="purple"] .skill-card.enabled .skill-card-icon {
  background: rgba(139,92,246,0.18);
  border-color: rgba(139,92,246,0.45);
}
:root[data-skin="purple"] .skill-pin-btn:hover { background: rgba(139,92,246,0.10); color: #b794ff; }
:root[data-skin="purple"] .skill-pin-btn.active { color: #b794ff; }
:root[data-skin="purple"] .skill-card.pinned {
  border-color: rgba(139,92,246,0.45);
  box-shadow: 0 0 0 1px rgba(139,92,246,0.15);
}
:root[data-skin="purple"] .skills-show-more-btn {
  background: rgba(139,92,246,0.12);
  border-color: rgba(139,92,246,0.30);
}
:root[data-skin="purple"] .skills-show-more-btn:hover {
  background: rgba(139,92,246,0.20);
  border-color: rgba(139,92,246,0.42);
}
:root[data-skin="purple"] .skill-hover-popover { border-color: rgba(139,92,246,0.28); }
:root[data-skin="purple"] .skill-hover-popover button:hover {
  border-color: rgba(139,92,246,0.55);
  background: rgba(139,92,246,0.18);
}

/* ─────────────────────────────────────────────────────────────────────────
   Settings → Appearance theme picker (works on every theme via vars)
   ───────────────────────────────────────────────────────────────────────── */
#theme-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.theme-swatch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.theme-swatch:hover {
  border-color: var(--flame-border);
  box-shadow: 0 4px 16px var(--flame-glow);
}
.theme-swatch.is-active {
  border-color: var(--flame-border);
  box-shadow: 0 0 0 1px var(--flame-border), 0 4px 18px var(--flame-glow);
}



.theme-swatch-label {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
}
.theme-swatch-check {
  color: var(--flame);
  font-weight: 800;
  font-size: 14px;
}

/* ─────────────────────────────────────────────────────────────────────────
   PROMETHEUS ONE — desktop Light-slot replacement, sidebar pass one

   This intentionally targets data-skin="p1" rather than data-theme so the
   Default Dark, Olympian Blue, and Aether Violet desktop skins remain intact.
   Only the desktop left rail is reskinned in this pass.
   ───────────────────────────────────────────────────────────────────────── */
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar {
  --p1-void: #050505;
  --p1-black: #090909;
  --p1-obsidian: #12110f;
  --p1-graphite: #24211c;
  --p1-bronze: #6d5a2b;
  --p1-gold-muted: #a98a3b;
  --p1-gold: var(--theme-palette-gold);
  --p1-gold-light: #f0d98b;
  --p1-bone: #f2ebdd;
  --p1-bone-muted: #b9b0a0;
  --sidebar-bg: #050505;
  --sidebar-text: var(--p1-bone);
  --sidebar-muted: var(--p1-bone-muted);
  --sidebar-icon-bg: transparent;
  --sidebar-icon-border: rgba(214, 183, 94, .18);
  --sidebar-item-bg: rgba(18, 18, 17, .96);
  --sidebar-item-hover: rgba(214, 183, 94, .08);
  --sidebar-active-bg: rgba(214, 183, 94, .12);
  --sidebar-search-bg: rgba(16, 15, 13, .98);
  --sidebar-seg-bg: rgba(13, 13, 12, .98);
  --sidebar-seg-active: rgba(214, 183, 94, .13);
  color: var(--p1-bone);
  background:
    radial-gradient(115% 42% at 6% 4%, rgba(214, 183, 94, .065), transparent 62%),
    radial-gradient(80% 34% at 100% 76%, rgba(109, 90, 43, .05), transparent 72%),
    linear-gradient(180deg, #050505 0%, #080807 48%, #040404 100%);
  border-right-color: rgba(214, 183, 94, .18);
  box-shadow: 16px 0 42px rgba(0, 0, 0, .24);
}

:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar-fixed {
  gap: 10px;
  padding: 13px 11px 9px;
  border-bottom-color: rgba(214, 183, 94, .12);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar-top {
  min-height: 48px;
  padding: 0 2px;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .logo {
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: url("../assets/prometheus-one/p1-mark-ring.png") center / contain no-repeat;
  filter: none;
}

:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .logo img {
  opacity: 0;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .brand {
  gap: 9px;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .brand-title {
  color: var(--p1-bone);
  font-size: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 600;
  letter-spacing: 0;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .brand-title::before {
  content: "PROMETHEUS 1";
  font-size: 11px;
  letter-spacing: 2px;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .brand-sub {
  color: var(--p1-gold-muted);
  font-size: 0;
  font-weight: 700;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .brand-sub::before {
  content: "1 Program. Unlimited abilities.";
  font-size: 7px;
  letter-spacing: .1px;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .icon-btn {
  border-color: rgba(214, 183, 94, .30);
  background: linear-gradient(145deg, rgba(214, 183, 94, .08), rgba(255, 255, 255, .025));
  color: var(--p1-bone);
  box-shadow: inset 0 1px 0 rgba(240, 217, 139, .08), 0 7px 18px rgba(0, 0, 0, .28);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .icon-btn:hover {
  border-color: rgba(240, 217, 139, .56);
  background: rgba(214, 183, 94, .11);
  color: var(--p1-gold-light);
}

:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .new-chat {
  min-height: 0;
  gap: 8px;
  padding: 7px 10px;
  border-color: rgba(214, 183, 94, .70);
  border-radius: 10px;
  background:
    radial-gradient(90% 150% at 0% 50%, rgba(214, 183, 94, .13), transparent 54%),
    linear-gradient(180deg, rgba(24, 21, 15, .98), rgba(11, 11, 10, .98));
  color: var(--p1-bone);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(169, 138, 59, .10), 0 10px 24px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(240, 217, 139, .12);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .new-chat:hover {
  border-color: var(--p1-gold-light);
  background: rgba(214, 183, 94, .12);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .new-chat .nav-icon {
  width: 24px;
  height: 22px;
  padding-right: 8px;
  border: 0;
  border-right: 1px solid rgba(214, 183, 94, .24);
  border-radius: 0;
  background: transparent;
  color: var(--p1-gold-light);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .new-chat .nav-icon svg {
  display: none;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .new-chat .nav-icon::before {
  content: "✦";
  font: 17px/1 Georgia, 'Times New Roman', serif;
  text-shadow: 0 0 8px rgba(214, 183, 94, .35);
}

:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar-search {
  min-height: 38px;
  padding: 0 11px;
  border-color: rgba(109, 90, 43, .38);
  border-radius: 10px;
  background: var(--sidebar-search-bg);
  box-shadow: inset 0 1px 0 rgba(240, 217, 139, .035), 0 7px 18px rgba(0, 0, 0, .20);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar-search:focus-within {
  border-color: rgba(214, 183, 94, .60);
  box-shadow: 0 0 0 2px rgba(214, 183, 94, .08), 0 9px 22px rgba(0, 0, 0, .24);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar-search input {
  color: var(--p1-bone);
  font-weight: 600;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar-search input::placeholder,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar-search svg {
  color: rgba(185, 176, 160, .66);
}

:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar-scroll {
  gap: 11px;
  padding: 8px 11px 12px;
  scrollbar-color: rgba(169, 138, 59, .38) transparent;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(169, 138, 59, .38);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .nav-group {
  gap: 2px;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .nav-item {
  min-height: 0;
  gap: 8px;
  padding: 6px 8px;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--p1-bone);
  font-size: 12px;
  font-weight: 600;
  box-shadow: none;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .nav-item:hover {
  border-color: transparent;
  background: rgba(214, 183, 94, .08);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .nav-item.active {
  border-color: transparent;
  background: rgba(214, 183, 94, .14);
  box-shadow: none;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .nav-item .nav-icon {
  width: 22px;
  height: 22px;
  padding-right: 0;
  border: 1px solid rgba(214, 183, 94, .18);
  border-radius: 6px;
  background: rgba(214, 183, 94, .055);
  color: var(--p1-gold);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .nav-item .nav-icon svg {
  width: 12px;
  height: 12px;
  stroke-width: 1.7;
}

:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 3px 3px;
  color: var(--p1-gold-muted);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .section-title::after {
  content: "✦";
  flex: 1;
  overflow: hidden;
  color: var(--p1-gold);
  font-size: 10px;
  letter-spacing: 0;
  text-align: right;
  background: linear-gradient(90deg, rgba(109, 90, 43, .38), transparent 84%) left center / calc(100% - 18px) 1px no-repeat;
}

:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .seg-tabs {
  padding: 3px;
  gap: 3px;
  border-color: rgba(109, 90, 43, .30);
  border-radius: 9px;
  background: var(--sidebar-seg-bg);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .seg-btn {
  min-height: 0;
  padding: 4px 2px;
  color: var(--p1-bone-muted);
  border-radius: 6px;
  font-size: 10px;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .seg-btn:hover:not(.active) {
  background: rgba(214, 183, 94, .07);
  color: var(--p1-bone);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .seg-btn.active {
  border-color: rgba(214, 183, 94, .48);
  background: rgba(214, 183, 94, .13);
  color: var(--p1-gold-light);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .20);
}

:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar #jobs-list,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar #skills-list,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar #skills-search-results {
  padding: 0;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .session-list,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar #jobs-list,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar #channels-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .chat-session-item.job-item,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar #pinned-chats-list .job-item {
  min-height: 0;
  margin: 0;
  padding: 7px 30px 7px 8px;
  border: 1px solid rgba(109, 90, 43, .22);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(17, 17, 16, .97), rgba(9, 9, 9, .97));
  color: var(--p1-bone);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02), 0 5px 14px rgba(0, 0, 0, .14);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .chat-session-item.job-item:hover,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar #pinned-chats-list .job-item:hover {
  border-color: rgba(214, 183, 94, .42);
  background: rgba(214, 183, 94, .07);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .chat-session-item.job-item.active,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .chat-session-item.job-item.unread.active,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar #channels-list .chat-session-item.job-item.channel-chat-item.active {
  border-color: rgba(214, 183, 94, .64);
  background: linear-gradient(135deg, rgba(214, 183, 94, .13), rgba(12, 12, 11, .98) 60%);
  box-shadow: 0 0 0 1px rgba(214, 183, 94, .09), 0 7px 18px rgba(0, 0, 0, .20);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .chat-session-item.job-item.unread:not(.active),
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .chat-session-item.job-item.is-working {
  border-color: rgba(214, 183, 94, .44);
  background: rgba(214, 183, 94, .07);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .chat-session-item.job-item::before {
  background: linear-gradient(180deg, var(--p1-gold-light), var(--p1-gold-muted));
  inset: 7px auto 7px 0;
  width: 2px;
  padding: 0;
  border-radius: 999px;
  mask: none;
  -webkit-mask: none;
  opacity: .86;
  animation: none;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .chat-session-item .job-item-title {
  color: var(--p1-bone);
  font-size: 12.5px;
  font-weight: 650;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .chat-session-item .job-item-meta,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .chat-session-item .job-item-time,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .chat-session-item .job-item-meta :is(.badge, .badge-queued, .session-auto-badge) {
  color: rgba(185, 176, 160, .68) !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .chat-session-item :is(.session-working-badge, .session-unread-badge) {
  color: var(--p1-gold-light) !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .job-item-unread-dot {
  background: var(--p1-gold);
  box-shadow: 0 0 0 3px rgba(214, 183, 94, .11);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .chat-session-action-btn {
  color: rgba(185, 176, 160, .64);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .chat-pin-btn:hover,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .chat-pin-btn.active,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .chat-session-rename-btn:hover {
  color: var(--p1-gold-light);
  background: rgba(214, 183, 94, .10);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .sidebar-action {
  border-color: rgba(214, 183, 94, .30);
  background: rgba(214, 183, 94, .06);
  color: var(--p1-gold-light);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .sidebar-action:hover {
  background: rgba(214, 183, 94, .12);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .sessions-show-more-btn {
  color: var(--p1-gold-light) !important;
  border-color: rgba(214, 183, 94, .34) !important;
  background: rgba(214, 183, 94, .075) !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .sessions-show-more-btn:hover {
  color: var(--p1-bone) !important;
  border-color: rgba(240, 217, 139, .54) !important;
  background: rgba(214, 183, 94, .13) !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar-footer {
  padding-top: 8px;
  border-top-color: rgba(214, 183, 94, .14);
  background: linear-gradient(180deg, rgba(8, 8, 7, .96), #050505);
  box-shadow: 0 -12px 24px rgba(0, 0, 0, .18);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .more-popover {
  border-color: rgba(214, 183, 94, .34);
  background: #0b0b0a;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .48), 0 0 16px rgba(214, 183, 94, .09);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .more-popover-item:hover {
  border-color: rgba(214, 183, 94, .34);
  background: rgba(214, 183, 94, .08);
}

:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar.collapsed .logo {
  width: 38px;
  height: 38px;
}

/* ─────────────────────────────────────────────────────────────────────────
   PROMETHEUS ONE — desktop chat color pass

   Color-only overrides. Layout, message sizing, composer geometry, and the
   existing send/stop/voice iconography remain unchanged.
   ───────────────────────────────────────────────────────────────────────── */
:root[data-skin="p1"] body:not(.pm-mobile-active) main.main-shell,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view {
  --text: #f2ebdd;
  --muted: #aaa294;
  --panel: #0b0b0a;
  --panel-2: #141310;
  --line: rgba(214, 183, 94, .14);
  --line-strong: rgba(214, 183, 94, .28);
  --brand: var(--theme-palette-gold);
  --flame: var(--theme-palette-gold);
  --flame-border: rgba(214, 183, 94, .52);
  --flame-glow: rgba(214, 183, 94, .12);
  --pm-orange: var(--theme-palette-gold);
  --pm-orange-hot: #f0d98b;
  --pm-gold: var(--theme-palette-gold);
  --pm-ember: #6d5a2b;
  --composer-bg: rgba(12, 12, 11, .94);
  --composer-panel: rgba(22, 21, 18, .94);
  --composer-input: rgba(29, 28, 25, .94);
  --composer-border: rgba(214, 183, 94, .42);
  --composer-text: #f2ebdd;
  --composer-muted: rgba(242, 235, 221, .55);
  color: var(--text);
  background: #070707;
}

:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view {
  background:
    radial-gradient(90% 50% at 50% 100%, rgba(109, 90, 43, .055), transparent 70%),
    linear-gradient(180deg, #090909 0%, #060606 100%);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.side-chat-main-pane, .side-chat-pane, .unified-agent-chat-shell, #prom-bot-main-surface, #prom-bot-group-host) {
  background:
    radial-gradient(90% 50% at 50% 100%, rgba(109, 90, 43, .055), transparent 70%),
    linear-gradient(180deg, #090909 0%, #060606 100%) !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-messages.chat-scroller-active {
  scrollbar-color: rgba(214, 183, 94, .45) transparent;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-messages.chat-scroller-active::-webkit-scrollbar-thumb {
  background-color: rgba(214, 183, 94, .45);
}

:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-welcome,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-welcome h2,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .msg-content,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .markdown-body :is(h1, h2, h3, h4, strong),
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .live-turn-prose,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .live-turn-text,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .live-turn-md {
  color: var(--text);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-welcome-icon {
  width: 72px;
  height: 72px;
  background: url("../assets/prometheus-one/p1-mark-ring.png") center / contain no-repeat;
  filter: drop-shadow(0 0 14px rgba(214, 183, 94, .18));
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-welcome-icon img {
  opacity: 0 !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-pulse-card {
  border-color: color-mix(in srgb, var(--muted) 32%, transparent);
  background: rgba(13, 13, 12, .88);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .24);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-pulse-card:hover,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-pulse-card:focus-visible {
  border-color: color-mix(in srgb, var(--muted) 52%, transparent);
  background: rgba(214, 183, 94, .065);
  box-shadow: 0 16px 42px rgba(0, 0, 0, .32), 0 0 18px rgba(214, 183, 94, .08);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .markdown-body code {
  color: #f0dfb2;
  border-color: rgba(214, 183, 94, .18);
  background: rgba(214, 183, 94, .075);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .markdown-body pre {
  border-color: rgba(214, 183, 94, .16);
  background: rgba(0, 0, 0, .34);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .markdown-body pre code {
  color: #e8e1d4;
  background: none;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .markdown-body :is(th, td) {
  border-color: rgba(214, 183, 94, .18);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .markdown-body th {
  background: rgba(214, 183, 94, .075);
}

:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .msg.user .msg-body,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .msg.user.voice-worker-handoff .msg-body {
  color: #fff;
  border-color: transparent;
  background: #303032;
  box-shadow: 0 7px 20px rgba(0, 0, 0, .24);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .msg.user .msg-body::before,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .msg.user .msg-body::after {
  content: none;
  display: none;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .msg.user .msg-content,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .msg.user .markdown-body :is(h1, h2, h3, h4, strong) {
  color: #fff;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .msg:not(.user) .msg-body {
  color: var(--text);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .msg:not(.user) .msg-avatar {
  border-color: rgba(214, 183, 94, .34);
  background:
    url("../assets/prometheus-one/prometheus-avatar-column-gold.png") center / 24px 24px no-repeat,
    radial-gradient(circle, rgba(214, 183, 94, .10), rgba(10, 10, 9, .96) 72%);
  box-shadow: inset 0 1px 0 rgba(240, 217, 139, .08), 0 5px 14px rgba(0, 0, 0, .24);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .msg:not(.user) .msg-avatar img {
  opacity: 0 !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .assistant-work-timer,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .assistant-work-timer-chevron,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .voice-handoff-role {
  color: var(--t-accent);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .msg-action-btn {
  color: #8f887c;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .msg-action-btn:hover:not(:disabled) {
  color: #f0d98b;
  background: rgba(214, 183, 94, .09);
}

:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .live-turn-segment,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .live-turn-tool-group,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .tool-activity-entry {
  border-left-color: rgba(214, 183, 94, .52);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .tool-activity-entry[data-status="running"],
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .tool-activity-entry[data-status="preparing"],
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .live-turn-tool {
  border-left-color: var(--t-accent);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view :is(.tool-activity-kicker, .live-turn-segment > span) {
  color: #bda45d;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view :is(.tool-activity-label, .tool-activity-detail-row strong, .live-turn-tool-summary strong) {
  color: var(--text);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .tool-command-terminal {
  color: #e8e1d4;
  border-color: rgba(214, 183, 94, .22);
  background: #090908;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .tool-command-terminal > pre {
  color: #ddd6c9;
  border-top-color: rgba(214, 183, 94, .12);
  background: #060606;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .process-pill-btn {
  color: var(--t-accent);
  border-color: rgba(214, 183, 94, .28);
  background: rgba(214, 183, 94, .065);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .process-pill-btn:hover {
  color: #f2ebdd;
  border-color: rgba(240, 217, 139, .52);
  background: rgba(214, 183, 94, .12);
}

:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-input-area,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-input-area:hover,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-input-area:focus-within {
  color: var(--composer-text);
  border: none;
  background: var(--composer-bg);
  box-shadow: none;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-input-area::before,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-input-area::after {
  content: none !important;
  display: none !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view #chat-input {
  color: var(--composer-text);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view #chat-input:focus {
  border-color: rgba(214, 183, 94, .52);
  box-shadow: 0 0 0 3px rgba(214, 183, 94, .10), inset 0 1px 2px rgba(255, 255, 255, .06);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-input-area .chat-attach-btn,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-input-area .send-btn {
  color: #fff;
  background: conic-gradient(from var(--pm-angle), #6d5a2b, var(--t-accent), #f0d98b, #a98a3b, #6d5a2b);
  box-shadow: none;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-input-area .chat-attach-btn:hover,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-input-area .send-btn:hover {
  color: #fff;
  box-shadow: none;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-input-area .chat-voice-btn,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-input-area .chat-voice-btn:is(:hover, :focus-visible, .active, .recording, .silent) {
  color: #fff;
  background: transparent;
  box-shadow: none;
}
/* Dictation is a safety-critical state, so it deliberately wins over each
   desktop skin's neutral mic treatment. Mirrors the mobile recording red. */
body:not(.pm-mobile-active) #chat-view .chat-input-area #chat-voice-btn.recording {
  background: #d8473a !important;
  color: #fff !important;
  box-shadow: 0 0 0 4px rgba(216,71,58,.16) !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view :is(.chat-skill-trigger-pill, .queued-prompts-panel, .chat-file-staging, .chat-new-context-dock, .chat-new-context-popover) {
  color: var(--text);
  border-color: rgba(214, 183, 94, .28);
  background: rgba(12, 12, 11, .96);
}

/* ─────────────────────────────────────────────────────────────────────────
   PROMETHEUS ONE — complete desktop application color skin

   The repurposed desktop Light slot now uses the application's established
   dark-surface states and these P1 tokens. These rules intentionally change
   color, backgrounds, borders, and shadows only; existing page geometry is
   left alone.
   ───────────────────────────────────────────────────────────────────────── */
:root[data-skin="p1"] {
  --native-color-scheme: dark;
  --bg: #050505;
  --bg-soft: #0d0d0c;
  --panel: #0b0b0a;
  --panel-2: #151411;
  --line: rgba(214, 183, 94, .14);
  --line-strong: rgba(214, 183, 94, .27);
  --text: #f2ebdd;
  --fg: #f2ebdd;
  --muted: #aaa294;
  --brand: var(--theme-palette-gold);
  --brand-2: #9b7d32;
  --flame: var(--theme-palette-gold);
  --flame-mid: #f0d98b;
  --flame-glow: rgba(214, 183, 94, .14);
  --flame-border: rgba(214, 183, 94, .50);
  --pm-orange: var(--theme-palette-gold);
  --pm-orange-hot: #f0d98b;
  --pm-ember: #6d5a2b;
  --pm-gold: var(--theme-palette-gold);
  --composer-bg: rgba(12, 12, 11, .94);
  --composer-panel: rgba(22, 21, 18, .94);
  --composer-input: rgba(29, 28, 25, .94);
  --composer-border: rgba(214, 183, 94, .38);
  --composer-text: #f2ebdd;
  --composer-muted: rgba(242, 235, 221, .55);
  --log-bg: #080807;
  --log-text: #c7beaf;
  --log-info: #e1c972;
  --progress-bg: linear-gradient(180deg, #151411 0%, #0c0c0b 100%);
  --progress-border: rgba(214, 183, 94, .22);
  --progress-shadow: 0 10px 28px rgba(0, 0, 0, .38);
  --progress-header-text: #f2ebdd;
  --progress-chevron: #b9b0a0;
  --progress-empty-border: rgba(214, 183, 94, .20);
  --progress-empty-text: #aaa294;
  --progress-empty-bg: rgba(214, 183, 94, .045);
  --progress-text-base: #f2ebdd;
  --progress-text-pending: #aaa294;
  --progress-text-done: #aaa294;
  --progress-text-active: #f2ebdd;
  --progress-dot-pending-bg: #171613;
  --progress-dot-pending-text: #aaa294;
  --progress-dot-pending-border: rgba(214, 183, 94, .22);
  --progress-dot-done-bg: #a98a3b;
  --progress-dot-done-text: #fffaf0;
  --progress-dot-done-border: var(--t-accent);
  --progress-dot-active-bg: #0a0a09;
  --progress-dot-active-text: #f0d98b;
  --progress-dot-active-border: rgba(214, 183, 94, .48);
  --progress-spinner-track: rgba(214, 183, 94, .20);
  --progress-spinner-head: var(--t-accent);
  --shadow-sm: 0 3px 10px rgba(0, 0, 0, .28);
  --shadow-md: 0 12px 34px rgba(0, 0, 0, .42);
}

:root[data-skin="p1"] body:not(.pm-mobile-active) {
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(214, 183, 94, .055), transparent 34%),
    radial-gradient(circle at bottom right, rgba(109, 90, 43, .035), transparent 30%),
    #050505;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .main-shell-wrap {
  background: #080808;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .page-view,
:root[data-skin="p1"] body:not(.pm-mobile-active) #connector-view {
  color: var(--text);
  background: #090909 !important;
  border-color: var(--line) !important;
}

/* Shared header */
:root[data-skin="p1"] body:not(.pm-mobile-active) .topbar {
  --pm-glow: rgba(214, 183, 94, .16);
  color: var(--text);
  border-bottom-color: rgba(214, 183, 94, .18);
  background:
    radial-gradient(80% 180% at 8% 0%, rgba(214, 183, 94, .075), transparent 62%),
    linear-gradient(180deg, #0b0b0a, #070707);
  box-shadow: inset 0 1px 0 rgba(240, 217, 139, .06), 0 8px 24px rgba(0, 0, 0, .18);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .topbar::before {
  background: conic-gradient(from var(--pm-angle), transparent 0deg, rgba(214, 183, 94, .12) 62deg, rgba(240, 217, 139, .07) 102deg, transparent 156deg, rgba(109, 90, 43, .14) 232deg, transparent 315deg, rgba(214, 183, 94, .08) 360deg);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar::before {
  background: conic-gradient(from var(--pm-angle), transparent 0deg, rgba(214, 183, 94, .11) 62deg, rgba(240, 217, 139, .065) 102deg, transparent 156deg, rgba(109, 90, 43, .13) 232deg, transparent 315deg, rgba(214, 183, 94, .075) 360deg);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .topbar::after {
  background: conic-gradient(from var(--pm-angle), rgba(255, 255, 255, .13), rgba(214, 183, 94, .38), rgba(255, 255, 255, .025), rgba(240, 217, 139, .25), rgba(255, 255, 255, .11));
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar::after {
  background: conic-gradient(from var(--pm-angle), rgba(255, 255, 255, .12), rgba(214, 183, 94, .36), rgba(255, 255, 255, .022), rgba(240, 217, 139, .23), rgba(255, 255, 255, .10));
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .topbar:hover,
:root[data-skin="p1"] body:not(.pm-mobile-active) .topbar:focus-within {
  --pm-glow: rgba(214, 183, 94, .22);
  box-shadow: 0 0 24px var(--pm-glow), inset 0 1px 0 rgba(240, 217, 139, .09);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .page-title strong {
  color: var(--text);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .page-title span {
  color: var(--muted);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .topbar :is(.icon-btn, .panel-toggle-btn, .status-pill) {
  color: #c6bdad;
  border-color: rgba(214, 183, 94, .24);
  background: linear-gradient(145deg, rgba(214, 183, 94, .07), rgba(255, 255, 255, .025));
  box-shadow: inset 0 1px 0 rgba(240, 217, 139, .07), 0 7px 18px rgba(0, 0, 0, .26);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .topbar :is(.icon-btn, .panel-toggle-btn):hover,
:root[data-skin="p1"] body:not(.pm-mobile-active) .topbar .panel-toggle-btn.active {
  color: #fffaf0;
  border-color: rgba(240, 217, 139, .56);
  background: linear-gradient(145deg, rgba(214, 183, 94, .20), rgba(109, 90, 43, .16));
  box-shadow: 0 0 18px rgba(214, 183, 94, .13), inset 0 1px 0 rgba(240, 217, 139, .12);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .topbar #update-pill {
  color: #f0d98b !important;
  border-color: rgba(214, 183, 94, .42) !important;
  background: rgba(214, 183, 94, .10) !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .topbar #update-dropdown {
  color: var(--text) !important;
  border-color: rgba(214, 183, 94, .30) !important;
  background: #0d0d0c !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .topbar #update-progress-fill {
  background: linear-gradient(90deg, #8f712b, var(--t-accent), #f0d98b) !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .topbar #update-action-btn {
  color: #fffaf0 !important;
  border: 1px solid rgba(214, 183, 94, .48) !important;
  background: linear-gradient(145deg, var(--t-accent), #8f712b) !important;
}

/* Shared page surfaces, cards, tables, and form controls */
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.page-view, #connector-view, #settings-modal, .skill-modal, .hub-modal) :is(input, select, textarea) {
  color: var(--text) !important;
  border-color: var(--line) !important;
  background: #151411 !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.page-view, #connector-view, #settings-modal, .skill-modal, .hub-modal) :is(input, textarea)::placeholder {
  color: rgba(170, 162, 148, .70) !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.page-view, #connector-view, #settings-modal, .skill-modal, .hub-modal) :is(input, select, textarea):focus {
  border-color: rgba(214, 183, 94, .58) !important;
  box-shadow: 0 0 0 3px rgba(214, 183, 94, .09) !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.page-view, #connector-view, #settings-modal, .skill-modal, .hub-modal) [style*="background:#fff"],
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.page-view, #connector-view, #settings-modal, .skill-modal, .hub-modal) [style*="background: #fff"] {
  color: var(--text) !important;
  border-color: var(--line) !important;
  background: var(--panel-2) !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.page-view, #connector-view, #settings-modal) [style*="linear-gradient(180deg,#fff"],
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.page-view, #connector-view, #settings-modal) [style*="linear-gradient(180deg, #fff"] {
  color: var(--text) !important;
  border-color: var(--line) !important;
  background: linear-gradient(180deg, #171613, #0d0d0c) !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.page-view, #connector-view) :is(table, thead, tbody, tr, th, td) {
  border-color: var(--line) !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.page-view, #connector-view) thead tr,
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.page-view, #connector-view) th {
  color: #d8cfbf;
  background: rgba(214, 183, 94, .065) !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.page-view, #connector-view) tbody tr:hover {
  background: rgba(214, 183, 94, .045) !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.page-view, #connector-view) :is(.task-card, .approval-card, .progress-card, .artifact-card, .artifact-preview, .sys-card, .conn-card, .project-file-card, .channel-hub-card, .usage-provider-card) {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel-2);
}

/* Gold controls and toggles, preserving semantic success/error buttons */
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.page-view, #connector-view, #settings-modal, .right-panel) :is(.btn:not(.btn-red):not(.btn-green), .skill-search-btn, .skill-install-btn, .cv-btn-connect, .project-editor-save-btn, .memory-compose-submit) {
  color: #fffaf0;
  border-color: rgba(214, 183, 94, .48);
  background: linear-gradient(145deg, var(--t-accent), #8f712b);
  box-shadow: 0 7px 20px rgba(214, 183, 94, .18);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.page-view, #connector-view, #settings-modal, .right-panel) :is(.btn:not(.btn-red):not(.btn-green), .skill-search-btn, .skill-install-btn, .cv-btn-connect, .project-editor-save-btn, .memory-compose-submit):hover {
  color: #fff;
  border-color: #f0d98b;
  background: linear-gradient(145deg, #e1c972, #9b7d32);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .toggle-switch input:checked + .toggle-track {
  border-color: rgba(214, 183, 94, .62);
  background: rgba(214, 183, 94, .34);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .toggle-switch input:checked + .toggle-track::after {
  background: #f0d98b;
}

/* Approvals, audit, schedules, tasks, and shared information panels */
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.approval-card, #session-approvals-list .approval-card) {
  border-color: rgba(214, 183, 94, .28) !important;
  background: rgba(214, 183, 94, .065) !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.approval-action, .sys-v, .agent-log-entry-type) {
  color: #e1c972;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .approval-reason {
  color: #bbb1a1;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.info-row, .right-section, .project-editor-block, .project-sessions-list) {
  border-color: var(--line);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sys-meter {
  background: rgba(214, 183, 94, .10);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sys-meter > i {
  background: linear-gradient(90deg, #6d5a2b, var(--t-accent), #f0d98b);
}

/* Skills and Hub */
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.skill-card-icon, .skill-card.enabled .skill-card-icon) {
  color: #f0d98b;
  border-color: rgba(214, 183, 94, .38);
  background: rgba(214, 183, 94, .12);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.skill-pin-btn:hover, .skill-pin-btn.active) {
  color: #f0d98b;
  background: rgba(214, 183, 94, .10);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .skill-card.pinned {
  border-color: rgba(214, 183, 94, .48);
  box-shadow: 0 0 0 1px rgba(214, 183, 94, .12);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.skills-show-more-btn, .skill-hover-popover button:hover) {
  color: var(--text);
  border-color: rgba(214, 183, 94, .34);
  background: rgba(214, 183, 94, .11);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.skill-item-name, .skill-details h4, .skill-details .line code) {
  color: #e1c972;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.skill-details, .skill-modal-card, .hub-modal-card, .hub-providers-refresh) {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .hub-skill-badge.lifecycle:is([data-value="experimental"], [data-value="draft"]) {
  color: #e1c972;
  border-color: rgba(214, 183, 94, .40);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.hub-heat-cell, .hub-legend-cell)[data-level="1"] { background: rgba(109, 90, 43, .28); }
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.hub-heat-cell, .hub-legend-cell)[data-level="2"] { background: #6d5a2b; }
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.hub-heat-cell, .hub-legend-cell)[data-level="3"] { background: #a98a3b; }
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.hub-heat-cell, .hub-legend-cell)[data-level="4"] { background: var(--t-accent); }
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.hub-heat-cell, .hub-legend-cell)[data-level="5"] { background: #f0d98b; }

/* Projects, Memory, Teams, and Subagents */
:root[data-skin="p1"] body:not(.pm-mobile-active) .project-card.active-project {
  border-color: rgba(214, 183, 94, .52);
  background: rgba(214, 183, 94, .10);
  box-shadow: 0 0 0 1px rgba(214, 183, 94, .09);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .rp-tab.active {
  color: #f0d98b;
  border-bottom-color: var(--t-accent);
  background: rgba(214, 183, 94, .11);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.project-upload-zone:hover, .project-upload-zone.drag-over, .project-editor-textarea:focus) {
  color: #e1c972;
  border-color: rgba(214, 183, 94, .54);
  background: rgba(214, 183, 94, .055);
  box-shadow: 0 0 0 3px rgba(214, 183, 94, .08);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.memory-compose-dropzone, .memory-compose-file-picker) {
  color: #e1c972;
  border-color: rgba(214, 183, 94, .34);
  background: rgba(214, 183, 94, .065);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.memory-compose-file-remove, .memory-attachment-open, .memory-detail-chunk) {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel-2);
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .memory-detail-chunk {
  border-left-color: rgba(214, 183, 94, .52);
}

/* Settings and shared overlays */
:root[data-skin="p1"] body:not(.pm-mobile-active) #settings-modal > div,
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(#error-response-panel, .skill-modal-card, .hub-modal-card) {
  color: var(--text) !important;
  border-color: rgba(214, 183, 94, .22) !important;
  background: #0d0d0c !important;
  box-shadow: 0 20px 58px rgba(0, 0, 0, .52) !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #settings-modal [style*="linear-gradient(180deg,#fff"],
:root[data-skin="p1"] body:not(.pm-mobile-active) #settings-modal [style*="linear-gradient(180deg, #fff"] {
  background: linear-gradient(180deg, #171613, #0d0d0c) !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) #settings-modal code {
  color: #eadfac;
  border-color: rgba(214, 183, 94, .15);
  background: #080807 !important;
}

/* Chat-side workspace uses the same finished P1 shell. */
:root[data-skin="p1"] body:not(.pm-mobile-active) .right-panel {
  --text: #f2ebdd;
  --muted: #aaa294;
  --panel: #0b0b0a;
  --panel-2: #151411;
  --line: rgba(214, 183, 94, .14);
  --line-strong: rgba(214, 183, 94, .27);
  --brand: var(--theme-palette-gold);
  color: var(--text);
  border-left-color: rgba(214, 183, 94, .18);
  background: #090909;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .right-panel #right-panel-topbar {
  color: var(--muted);
  border-bottom-color: rgba(214, 183, 94, .16) !important;
  background: #0b0b0a !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .right-panel :is(.progress-card, .conn-tile, .channel-hub-card) {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel-2);
}

/* Decorative embers belong exclusively to the Default Dark/orange skin. */
:root[data-skin="p1"] body:not(.pm-mobile-active) #ember-canvas,
:root[data-skin="blue"] body:not(.pm-mobile-active) #ember-canvas,
:root[data-skin="purple"] body:not(.pm-mobile-active) #ember-canvas {
  display: none;
}

/* ── Olympian Blue + Aether Violet: Prometheus One gold chrome ─────────
   Preserve each skin's blue/violet surfaces and native accents. Only the
   legacy orange/amber UI chrome is normalized to the P1 metallic gold set. */
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) {
  --p1-shared-gold: var(--theme-palette-gold);
  --p1-shared-gold-light: #f0d98b;
  --p1-shared-gold-dark: #8f712b;
  --p1-shared-gold-soft: rgba(214, 183, 94, .12);
  --p1-shared-gold-line: rgba(214, 183, 94, .34);
  --p1-shared-gold-glow: rgba(214, 183, 94, .24);
}

/* Header and updater */
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .panel-toggle-btn.active {
  color: #fffaf0;
  border-color: rgba(240, 217, 139, .58);
  background: linear-gradient(145deg, var(--theme-palette-gold), #8f712b);
  box-shadow: 0 0 18px rgba(214, 183, 94, .22);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) #update-pill {
  color: var(--p1-shared-gold-light) !important;
  border-color: var(--p1-shared-gold-line) !important;
  background: var(--p1-shared-gold-soft) !important;
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) #update-dropdown {
  border-color: var(--p1-shared-gold-line) !important;
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) #update-progress-fill,
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) #update-action-btn {
  color: #fffaf0 !important;
  background: linear-gradient(145deg, var(--theme-palette-gold), #8f712b) !important;
}

/* Chat cards, message chrome, slash commands, and workflows */
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .chat-pulse-card {
  border-color: var(--line);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .chat-pulse-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 0 20px rgba(214, 183, 94, .12);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .msg.user .msg-bubble::after {
  border-color: rgba(214, 183, 94, .28);
  box-shadow: 0 0 14px rgba(214, 183, 94, .12), inset 0 1px 0 rgba(255,255,255,.04);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .msg.user .markdown-body blockquote {
  border-left-color: rgba(214, 183, 94, .52);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.chat-slash-command-popover, .chat-command-chip) {
  border-color: var(--p1-shared-gold-line);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.chat-slash-command-item:hover, .chat-slash-command-item.active, .chat-command-chip:hover) {
  color: var(--p1-shared-gold-light);
  border-color: rgba(214, 183, 94, .46);
  background: var(--p1-shared-gold-soft);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .chat-skill-suggestion-token {
  color: var(--p1-shared-gold-light);
}
/* Composer — keep the moving voice glyph itself white; recolor its metal shell. */
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .chat-input-area :is(.chat-attach-btn, .send-btn) {
  color: #fffdf7;
  border-color: rgba(240, 217, 139, .50);
  background: conic-gradient(from var(--pm-angle), #6d5a2b, var(--theme-palette-gold), #f0d98b, #a98a3b, #6d5a2b);
  box-shadow: none;
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .chat-input-area :is(.chat-attach-btn, .send-btn):hover {
  box-shadow: none;
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .chat-input-area :is(.send-btn, .voice-mode-btn) iconify-icon,
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .chat-input-area :is(.send-btn, .voice-mode-btn) svg {
  color: #fff !important;
}

/* Shared primary actions and tool/work state */
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.btn:not(.btn-red):not(.btn-green), .skill-search-btn, .skill-install-btn, .memory-action-btn--primary, .memory-compose-submit) {
  color: #fffaf0;
  border-color: rgba(240, 217, 139, .42);
  background: linear-gradient(145deg, var(--theme-palette-gold), #8f712b);
  box-shadow: 0 6px 20px rgba(143, 113, 43, .28);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.btn:not(.btn-red):not(.btn-green), .skill-search-btn, .skill-install-btn, .memory-action-btn--primary, .memory-compose-submit):hover {
  background: linear-gradient(145deg, #f0d98b, #a98a3b);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.assistant-work-timer, .live-turn-tool-group, .tool-activity-entry[data-status="running"], .tool-activity-entry[data-status="preparing"]) {
  color: var(--p1-shared-gold-light);
  border-color: var(--p1-shared-gold-line);
}

/* Memory, media, projects, and right-side workspace */
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.memory-compose-input:focus, .memory-compose-textarea:focus, .memory-compose-dropzone, .memory-compose-file-picker) {
  border-color: rgba(214, 183, 94, .50);
  box-shadow: 0 0 0 3px rgba(214, 183, 94, .08);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.memory-compose-dropzone, .memory-compose-file-picker) {
  color: var(--p1-shared-gold-light);
  background: rgba(214, 183, 94, .07);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .memory-detail-chunk {
  border-left-color: rgba(214, 183, 94, .52);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .project-card.active-project {
  box-shadow: 0 0 0 1px rgba(214, 183, 94, .10);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .right-panel #right-panel-topbar {
  border-bottom-color: rgba(214, 183, 94, .18) !important;
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) #connections-grid .conn-tile {
  border-color: rgba(214, 183, 94, .24);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) #session-approvals-badge {
  color: var(--p1-shared-gold-light) !important;
  border-color: var(--p1-shared-gold-line) !important;
  background: var(--p1-shared-gold-soft) !important;
}

/* Hub lifecycle badges and heat map */
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .hub-skill-badge.lifecycle:is([data-value="experimental"], [data-value="draft"]) {
  color: var(--p1-shared-gold-light);
  border-color: rgba(214, 183, 94, .42);
  background: rgba(214, 183, 94, .08);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.hub-heat-cell, .hub-legend-cell)[data-level="1"] { background: rgba(109, 90, 43, .30); }
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.hub-heat-cell, .hub-legend-cell)[data-level="2"] { background: #6d5a2b; }
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.hub-heat-cell, .hub-legend-cell)[data-level="3"] { background: #a98a3b; }
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.hub-heat-cell, .hub-legend-cell)[data-level="4"] { background: var(--theme-palette-gold); }
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.hub-heat-cell, .hub-legend-cell)[data-level="5"] { background: #f0d98b; }

/* Creative workspace controls. Canvas content colors remain user-controlled. */
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.ce-hdr-btn:active, .ce-text-preset-btn:hover, .ce-shape-preset-btn:hover, .ce-ctrl-btn:hover, .ce-export-menu[open] > summary, .creative-export-menu[open] > summary, .creative-export-menu-item:hover:not(:disabled)) {
  color: var(--p1-shared-gold-light);
  border-color: var(--p1-shared-gold-line);
  background: var(--p1-shared-gold-soft);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.ce-export-trigger-btn, .ce-export-btn, .creative-export-submit) {
  color: #fffaf0;
  border-color: rgba(240, 217, 139, .48);
  background: linear-gradient(135deg, var(--theme-palette-gold), #8f712b);
  box-shadow: 0 8px 22px rgba(143, 113, 43, .24);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.ce-tab--active, .creative-tab--active) {
  color: var(--p1-shared-gold-light);
  border-bottom-color: var(--p1-shared-gold);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.ce-filter-tile--active, .ce-prop-input:focus, .ce-prop-select:focus, .ce-assets-drop-zone--over, .ce-asset-card:hover) {
  border-color: rgba(214, 183, 94, .50);
  background-color: rgba(214, 183, 94, .08);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.ce-filter-intensity input[type="range"], .ce-prop-range, .creative-properties input[type="range"]) {
  accent-color: var(--p1-shared-gold);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.ce-resize-handle:hover, .creative-rp-resize-handle:hover, .ce-track-row__clip, .ce-track-row__clip:hover, .ce-track-row__clip--selected, .ce-timeline-playhead, .ce-range-fill, .creative-export-progress-fill) {
  border-color: rgba(214, 183, 94, .52);
  background: rgba(214, 183, 94, .34);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.ce-selection-handle, .ce-rotate-handle, .ce-assets-upload-btn, .ce-video-badge, .creative-job-badge--canceling) {
  color: var(--p1-shared-gold-light);
  border-color: var(--p1-shared-gold-line);
  background: var(--p1-shared-gold-soft);
}

/* A handful of controls are rendered with inline legacy-orange styles. */
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(#settings-modal, #update-dropdown, .right-panel, .creative-editor, .creative-workspace) [style*="color:#f97316"],
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(#settings-modal, #update-dropdown, .right-panel, .creative-editor, .creative-workspace) [style*="color: #f97316"],
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .sessions-show-more-btn {
  color: var(--p1-shared-gold-light) !important;
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .sessions-show-more-btn {
  border-color: var(--p1-shared-gold-line) !important;
  background: var(--p1-shared-gold-soft) !important;
}

/* P1 identity replaces the legacy flame artwork in every desktop skin. */
:root:is([data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .sidebar .logo {
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: url("../assets/prometheus-one/p1-mark-ring.png") center / contain no-repeat;
  filter: drop-shadow(0 0 12px rgba(214, 183, 94, .18));
}
:root:is([data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .sidebar .logo img {
  opacity: 0;
}
:root:is([data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .sidebar .brand-title {
  font-size: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 600;
}
:root:is([data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .sidebar .brand-title::before {
  content: "PROMETHEUS 1";
  color: var(--sidebar-text);
  font-size: 11px;
  letter-spacing: 2px;
}
:root:is([data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .sidebar .brand-sub {
  font-size: 0;
}
:root:is([data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .sidebar .brand-sub::before {
  content: "1 Program. Unlimited abilities.";
  color: var(--p1-shared-gold, var(--theme-palette-gold));
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .1px;
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .sidebar.collapsed .logo {
  width: 38px;
  height: 38px;
}
:root:is([data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) #chat-view .chat-welcome-icon {
  width: 72px;
  height: 72px;
  background: url("../assets/prometheus-one/p1-mark-ring.png") center / contain no-repeat;
  filter: drop-shadow(0 0 14px rgba(214, 183, 94, .20));
}
:root:is([data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) #chat-view .chat-welcome-icon img {
  opacity: 0 !important;
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) #chat-view .msg:not(.user) .msg-avatar {
  border-color: rgba(214, 183, 94, .36);
  background:
    url("../assets/prometheus-one/prometheus-avatar-column-gold.png") center / 24px 24px no-repeat,
    radial-gradient(circle, rgba(214, 183, 94, .10), rgba(10, 10, 9, .94) 72%);
  box-shadow: inset 0 1px 0 rgba(240, 217, 139, .09), 0 5px 14px rgba(0, 0, 0, .24);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) #chat-view .msg:not(.user) .msg-avatar img {
  opacity: 0 !important;
}

/* Header buttons inherit an orange hover from the dark structural base. */
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .topbar :is(.icon-btn, .panel-toggle-btn, .status-pill):is(:hover, :focus-visible),
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .topbar .panel-toggle-btn.active,
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .topbar :is(.icon-btn, .panel-toggle-btn)[aria-expanded="true"] {
  color: #fffaf0;
  border-color: rgba(240, 217, 139, .60) !important;
  background: linear-gradient(145deg, rgba(214, 183, 94, .20), rgba(109, 90, 43, .16));
  box-shadow: 0 0 18px rgba(214, 183, 94, .15), inset 0 1px 0 rgba(240, 217, 139, .13);
}

/* Right drawer edge plus hover/open control states use the same gold chrome. */
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .right-panel,
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .right-panel.open {
  border-left-color: rgba(214, 183, 94, .34);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .right-panel :is(.rp-resize-handle:hover, .rp-resize-handle.dragging) {
  background: rgba(214, 183, 94, .46);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .right-panel button:not(.btn-red):not(.danger):is(:hover, :focus-visible, .active, [aria-expanded="true"], [data-active="true"]),
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .right-panel :is(.conn-tile, .progress-card, .canvas-preview-device-btn):is(:hover, :focus-within, .active),
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .right-panel :is(.more-popover, details[open]) {
  border-color: rgba(240, 217, 139, .58) !important;
  box-shadow: 0 0 0 1px rgba(214, 183, 94, .08), 0 0 16px rgba(214, 183, 94, .10);
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .right-panel :is(#side-chats-toggle-btn.active, .canvas-mode-btn.active, .canvas-tab.active) {
  color: var(--p1-shared-gold-light) !important;
  border-color: rgba(240, 217, 139, .62) !important;
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .right-panel :is(input, select, textarea):is(:hover, :focus) {
  border-color: rgba(214, 183, 94, .52) !important;
  outline-color: rgba(214, 183, 94, .24);
}

/* ─────────────────────────────────────────────────────────────────────────
   DESKTOP SKIN PARITY

   Prometheus One keeps the same compact rail geometry as the other desktop
   skins. Its color treatment is intentionally preserved; only the spacing,
   icon chrome, and motion surface are shared here.
   ───────────────────────────────────────────────────────────────────────── */

/* The black/gold skin previously added extra rail padding and list width. */
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar-fixed {
  gap: 8px;
  padding: 10px 8px 6px;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar-top {
  min-height: 0;
  padding: 2px 4px;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .brand {
  gap: 8px;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .new-chat {
  min-height: 0;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar-search {
  min-height: 0;
  padding: 6px 10px;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar-scroll {
  gap: 8px;
  padding: 8px 8px 10px;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .seg-tabs {
  gap: 2px;
  padding: 2px;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .section-title {
  min-height: 27px;
  padding: 8px 6px 4px;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .session-list,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar #jobs-list,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar #skills-list,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar #skills-search-results,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar #channels-list {
  gap: 5px;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar #jobs-list {
  padding: 0 10px 10px 0;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar #skills-list,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar #skills-search-results,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar #channels-list {
  padding: 10px;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar :is(#jobs-list, #skills-list, #skills-search-results) {
  display: block;
  gap: normal;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar .chat-session-item.job-item,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar #pinned-chats-list .job-item {
  margin: 0 0 2px;
  border-radius: 8px;
}

/* Use the P1 icon tiles and star action consistently in every desktop skin. */
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .sidebar :is(.nav-item, .more-popover-item) .nav-icon {
  width: 22px;
  height: 22px;
  padding-right: 0;
  border: 1px solid rgba(214, 183, 94, .18);
  border-radius: 6px;
  background: rgba(214, 183, 94, .055);
  color: var(--theme-palette-gold);
}
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .sidebar :is(.nav-item, .more-popover-item) .nav-icon svg {
  width: 12px;
  height: 12px;
  stroke-width: 1.7;
}
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .sidebar .new-chat .nav-icon {
  width: 24px;
  height: 20px;
  padding-right: 8px;
  border: 0;
  border-right: 1px solid rgba(214, 183, 94, .24);
  border-radius: 0;
  background: transparent;
  color: #f0d98b;
}
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .sidebar .new-chat .nav-icon svg {
  display: none;
}
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .sidebar .new-chat .nav-icon::before {
  content: "✦";
  font: 17px/1 Georgia, 'Times New Roman', serif;
  text-shadow: 0 0 8px rgba(214, 183, 94, .35);
}

/* Remove the continuously rotating shell/composer glow. The action buttons
   keep their own liquid-metal animation, and the ember canvas is untouched. */
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.sidebar, .topbar, .chat-input-area)::before,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(.sidebar, .topbar, .chat-input-area)::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}

/* Prometheus One desktop shell: use the same flat black as its mobile shell.
   Cards and controls keep their own surfaces; only the page-level chrome is
   flattened so the workspace no longer reads as dark grey. */
:root[data-skin="p1"] body:not(.pm-mobile-active),
:root[data-skin="p1"] body:not(.pm-mobile-active) main.main-shell,
:root[data-skin="p1"] body:not(.pm-mobile-active) .main-shell-wrap,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view,
:root[data-skin="p1"] body:not(.pm-mobile-active) .page-view,
:root[data-skin="p1"] body:not(.pm-mobile-active) #connector-view,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar,
:root[data-skin="p1"] body:not(.pm-mobile-active) .topbar,
:root[data-skin="p1"] body:not(.pm-mobile-active) .sidebar-footer,
:root[data-skin="p1"] body:not(.pm-mobile-active) .right-panel,
:root[data-skin="p1"] body:not(.pm-mobile-active) #right-panel-topbar,
:root[data-skin="p1"] body:not(.pm-mobile-active) .right-panel #right-panel-topbar {
  background: #000 !important;
}

/* Desktop composer: keep the input open and move its controls into a compact
   Codex-style row. The row/agent wrappers stay in the DOM for the existing
   handlers; display:contents only lets the existing controls share this grid. */
body:not(.pm-mobile-active) #chat-view > .chat-input-area {
  display: grid;
  width: min(800px, calc(100% - 40px));
  grid-template-columns: 32px minmax(0, 1fr) auto 32px 32px;
  grid-template-areas:
    "staging staging staging staging staging"
    "input input input input input"
    "attach hint model voice send";
  align-items: center;
  column-gap: 10px;
  row-gap: 6px;
  padding: 11px 12px 10px;
  border: none;
  box-shadow: none;
}

body:not(.pm-mobile-active) #chat-view > .chat-input-area > .chat-composer-attachment-stack {
  grid-area: staging;
}

/* The connect-model notice has no grid area of its own; without this it is
   auto-placed into the 32px attach column and wraps one word per line. */
body:not(.pm-mobile-active) #chat-view > .chat-input-area > #connect-model-composer-cta {
  grid-column: 1 / -1;
  min-width: 0;
}

body:not(.pm-mobile-active) #chat-view > .chat-input-area > .chat-input-row,
body:not(.pm-mobile-active) #chat-view > .chat-input-area > .agent-toggle {
  display: contents;
}

body:not(.pm-mobile-active) #chat-view > .chat-input-area .chat-composer-input-wrap {
  grid-area: input;
  width: 100%;
  min-height: 44px;
  align-self: stretch;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body:not(.pm-mobile-active) #chat-view > .chat-input-area #chat-input {
  width: 100%;
  min-height: 44px;
  padding: 8px 2px 10px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body:not(.pm-mobile-active) #chat-view > .chat-input-area #chat-input:focus {
  border: 0 !important;
  box-shadow: none !important;
}

body:not(.pm-mobile-active) #chat-view > .chat-input-area .chat-composer-rich-preview {
  min-height: 44px;
  padding: 8px 2px 10px;
}

/* Secondary desktop chats use the main composer DOM so their controls and
   behavior stay in lockstep. Reapply the main desktop grid to that clone;
   the split-pane stylesheet owns its width and placement separately. */
body:not(.pm-mobile-active) .chat-input-area.canonical-secondary-desktop-composer {
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  bottom: 18px !important;
  transform: translateX(-50%) !important;
  width: min(var(--chat-content-max-width), calc(100% - var(--chat-content-inline-gutter) - var(--chat-content-inline-gutter))) !important;
  max-width: calc(100% - var(--chat-content-inline-gutter) - var(--chat-content-inline-gutter)) !important;
  margin: 0 !important;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto 32px 32px;
  grid-template-areas:
    "staging staging staging staging staging"
    "input input input input input"
    "attach hint model voice send";
  align-items: center;
  column-gap: 10px;
  row-gap: 6px;
  padding: 11px 12px 10px;
  border: none;
  box-shadow: none;
}

/* Final desktop alignment pass for the P1 shell. When the multi-chat strip is
   present it owns the top slot, so the normal page-title bar no longer pushes
   the tabs and the left-rail controls down by one extra row. The window
   actions remain overlaid in the same top-right position. */
@media (min-width: 901px) {
  body:not(.pm-mobile-active) .sidebar-fixed {
    gap: 5px !important;
    padding: 4px 8px 4px !important;
  }

  body:not(.pm-mobile-active) .sidebar-top {
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 4px !important;
  }

  /* Electron's topbar is a fixed native titlebar overlay. Keep that shared
     header intact when tabs appear; only the browser/PWA flow needs to
     collapse its in-flow page-title row to make room for the tab rail. */
  body:not(.pm-mobile-active):not(.electron-shell) .main-shell-wrap:has(> .topbar + .main-shell > .prom-multi-chat-tabs:not([hidden])) > .topbar {
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 16px !important;
    border-bottom: 0 !important;
    overflow: visible !important;
    z-index: 100 !important;
  }

  body:not(.pm-mobile-active):not(.electron-shell) .main-shell-wrap:has(> .topbar + .main-shell > .prom-multi-chat-tabs:not([hidden])) > .topbar > .topbar-left {
    display: none !important;
  }

  body:not(.pm-mobile-active):not(.electron-shell) .main-shell-wrap:has(> .topbar + .main-shell > .prom-multi-chat-tabs:not([hidden])) > .topbar > .topbar-right {
    position: absolute;
    top: 10px;
    right: 16px;
    z-index: 101;
  }

  body:not(.pm-mobile-active):not(.electron-shell) .main-shell-wrap:has(> .topbar + .main-shell > .prom-multi-chat-tabs:not([hidden])) .prom-multi-chat-tabs {
    padding-right: 270px;
  }

  /* Give the jump-to-message rail a real gutter instead of letting it sit on
     top of a full-width message column. */
  body:not(.pm-mobile-active):not(.side-chat-split-active) #chat-view {
    --chat-content-max-width: 720px;
    --chat-content-inline-gutter: clamp(56px, 7cqw, 88px);
    --chat-column-width: min(var(--chat-content-max-width), calc(100% - var(--chat-content-inline-gutter) - var(--chat-content-inline-gutter)));
  }

  body:not(.pm-mobile-active):not(.side-chat-split-active).right-canvas-open #chat-view {
    --chat-content-inline-gutter: clamp(48px, 6cqw, 72px);
    --chat-column-width: min(var(--chat-content-max-width), calc(100% - var(--chat-content-inline-gutter) - var(--chat-content-inline-gutter) - var(--chat-surface-gutter) - var(--chat-surface-gutter)));
  }

  body:not(.pm-mobile-active) :is(.side-chat-pane, .unified-agent-chat-shell, .canonical-secondary-desktop-composer) {
    --chat-content-max-width: 720px;
    --chat-content-inline-gutter: clamp(28px, 4cqw, 52px);
  }

  /* Tool activity stays readable through typography and spacing; the old
     color-coded vertical rails made the stream look like a nested panel. */
  body:not(.pm-mobile-active) :is(.live-turn-segment, .live-turn-tool-group, .tool-activity-entry, .live-turn-tool, .live-turn-think, .live-turn-preamble, .live-turn-result, .live-turn-error) {
    border-left-width: 0 !important;
    border-left-color: transparent !important;
  }
}

body:not(.pm-mobile-active) .chat-input-area.canonical-secondary-desktop-composer > .chat-composer-attachment-stack {
  grid-area: staging;
}

body:not(.pm-mobile-active) .chat-input-area.canonical-secondary-desktop-composer > .chat-input-row,
body:not(.pm-mobile-active) .chat-input-area.canonical-secondary-desktop-composer > .agent-toggle {
  display: contents;
}

body:not(.pm-mobile-active) .chat-input-area.canonical-secondary-desktop-composer .chat-composer-input-wrap {
  grid-area: input;
  width: 100%;
  min-height: 44px;
  align-self: stretch;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body:not(.pm-mobile-active) .chat-input-area.canonical-secondary-desktop-composer textarea.chat-textarea {
  width: 100%;
  min-height: 44px !important;
  padding: 5px 2px 9px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Named page shells have broad light-skin form rules with ID-level
   specificity. Keep the canonical textarea transparent there as well. */
body:not(.pm-mobile-active) :is(#subagent-unified-chat, #team-unified-chat-overlay, #prom-bot-group-host) .chat-input-area.canonical-secondary-desktop-composer textarea.chat-textarea {
  min-height: 44px !important;
  padding: 5px 2px 9px !important;
  background: transparent !important;
  box-shadow: none !important;
}

body:not(.pm-mobile-active) .chat-input-area.canonical-secondary-desktop-composer textarea.chat-textarea:focus {
  border: 0 !important;
  box-shadow: none !important;
}

body:not(.pm-mobile-active) .chat-input-area.canonical-secondary-desktop-composer .chat-composer-rich-preview {
  min-height: 44px;
  padding: 8px 2px 10px;
}

body:not(.pm-mobile-active) .chat-input-area.canonical-secondary-desktop-composer .chat-attach-btn {
  grid-area: attach;
}

body:not(.pm-mobile-active) .chat-input-area.canonical-secondary-desktop-composer .chat-hint {
  grid-area: hint;
  min-width: 0;
  width: auto;
  margin: 0 !important;
  display: flex;
  align-items: center;
}

body:not(.pm-mobile-active) .chat-input-area.canonical-secondary-desktop-composer .chat-model-switcher-wrap {
  grid-area: model;
  gap: 8px;
}

body:not(.pm-mobile-active) .chat-input-area.canonical-secondary-desktop-composer .chat-context-window-btn {
  order: -1;
}

body:not(.pm-mobile-active) .chat-input-area.canonical-secondary-desktop-composer .chat-voice-btn {
  grid-area: voice;
  position: relative;
  top: auto;
  right: auto;
  transform: none;
}

body:not(.pm-mobile-active) .chat-input-area.canonical-secondary-desktop-composer .send-btn {
  grid-area: send;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 8px;
}

body:not(.pm-mobile-active) .chat-input-area.canonical-secondary-desktop-composer .send-btn.voice-mode-btn {
  border-radius: 50%;
}

body:not(.pm-mobile-active) .chat-input-area.canonical-secondary-desktop-composer .send-btn.voice-mode-btn .send-voice-icon {
  width: 18px;
  height: 18px;
}

body:not(.pm-mobile-active) .chat-input-area.canonical-secondary-desktop-composer:hover,
body:not(.pm-mobile-active) .chat-input-area.canonical-secondary-desktop-composer:focus-within {
  box-shadow: none;
}

body:not(.pm-mobile-active) #chat-view > .chat-input-area .chat-attach-btn {
  grid-area: attach;
}

body:not(.pm-mobile-active) #chat-view > .chat-input-area .chat-hint {
  grid-area: hint;
  min-width: 0;
  width: auto;
  margin: 0 !important;
  display: flex;
  align-items: center;
}

body:not(.pm-mobile-active) #chat-view > .chat-input-area .chat-model-switcher-wrap {
  grid-area: model;
  gap: 8px;
}

/* The context gauge is kept in the same functional wrapper, but leads the
   model/reasoning selector visually. This also keeps its outside-click logic
   intact. */
body:not(.pm-mobile-active) #chat-view > .chat-input-area #chat-context-window-btn {
  order: -1;
}

body:not(.pm-mobile-active) #chat-view > .chat-input-area #chat-voice-btn {
  grid-area: voice;
  position: relative;
  top: auto;
  right: auto;
  transform: none;
}

body:not(.pm-mobile-active) #chat-view > .chat-input-area #send-btn {
  grid-area: send;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 8px;
}

body:not(.pm-mobile-active) #chat-view > .chat-input-area #send-btn.voice-mode-btn {
  border-radius: 50%;
}

body:not(.pm-mobile-active) #chat-view > .chat-input-area #send-btn.voice-mode-btn .send-voice-icon {
  width: 18px;
  height: 18px;
}

/* Keep the composer surface stable while it is hovered or focused. Individual
   controls retain their own interaction feedback below. */
body:not(.pm-mobile-active) #chat-view > .chat-input-area:hover,
body:not(.pm-mobile-active) #chat-view > .chat-input-area:focus-within {
  box-shadow: none;
}

:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view > .chat-input-area {
  border-color: rgba(214, 183, 94, .24);
  background: rgba(5, 5, 5, .86);
  box-shadow:
    0 12px 34px rgba(0, 0, 0, .30),
    inset 0 1px 0 rgba(240, 217, 139, .06);
}

:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view > .chat-input-area:hover,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view > .chat-input-area:focus-within {
  border-color: rgba(240, 217, 139, .42);
  box-shadow:
    0 12px 34px rgba(0, 0, 0, .30),
    inset 0 1px 0 rgba(240, 217, 139, .06);
}

/* Desktop Realtime voice: reuse the mobile orb's visual language while the
   input collapses to a clean control rail. The dock is mounted only while a
   Realtime session is starting or active. */
:root[data-skin="p1"] {
  --pm-voice-orb-light: #fff9e8;
  --pm-voice-orb-hot: #f0d98b;
  --pm-voice-orb-accent: var(--t-accent);
  --pm-voice-orb-deep: #6d5a2b;
  --pm-voice-orb-glow: #f0d98b;
  --pm-voice-orb-grid: rgba(214, 183, 94, .24);
}
:root[data-skin="dark"] {
  --pm-voice-orb-light: #fff6e6;
  --pm-voice-orb-hot: #ffd9a8;
  --pm-voice-orb-accent: #ea6a1f;
  --pm-voice-orb-deep: #7a3008;
  --pm-voice-orb-glow: #ffb578;
  --pm-voice-orb-grid: color-mix(in srgb, var(--t-accent) 20%, transparent);
}
:root[data-skin="blue"] {
  --pm-voice-orb-light: #eef7ff;
  --pm-voice-orb-hot: #9fd0ff;
  --pm-voice-orb-accent: var(--theme-palette-blue);
  --pm-voice-orb-deep: #12366f;
  --pm-voice-orb-glow: #65b0ff;
  --pm-voice-orb-grid: rgba(88, 166, 255, .28);
}
:root[data-skin="purple"] {
  --pm-voice-orb-light: #f7edff;
  --pm-voice-orb-hot: #c9a7ff;
  --pm-voice-orb-accent: var(--theme-palette-violet);
  --pm-voice-orb-deep: #3d1d73;
  --pm-voice-orb-glow: #b278ff;
  --pm-voice-orb-grid: rgba(187, 128, 255, .28);
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb-dock {
  position: absolute;
  z-index: 11;
  left: 50%;
  bottom: 84px;
  width: min(620px, calc(100% - 40px));
  height: min(220px, calc(100% - 126px));
  box-sizing: border-box;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  transform: translateX(-50%);
  pointer-events: none;
}

body:not(.pm-mobile-active) #chat-view.desktop-voice-mode .desktop-voice-orb-dock {
  display: flex;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb-transcript {
  width: min(100%, 620px);
  min-height: 24px;
  max-height: 72px;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0 0 8px;
  padding: 0 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.42;
  text-align: center;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .8);
  opacity: .82;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 84%, transparent 100%);
  transition: opacity 180ms ease, transform 180ms ease;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb-transcript.has-text {
  opacity: .98;
}

/* The desktop orb doubles as the voice-room control. Keep the room picker in
   the dock's own flow so chat messages never sit underneath it. */
body:not(.pm-mobile-active) #chat-view .desktop-voice-target-popover {
  width: min(430px, calc(100% - 24px));
  max-height: min(220px, calc(100% - 122px));
  box-sizing: border-box;
  overflow: auto;
  margin: 0 0 10px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--pm-voice-orb-accent) 46%, rgba(255, 255, 255, .16));
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface, #14151b) 94%, var(--pm-voice-orb-deep) 6%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .42), 0 0 32px color-mix(in srgb, var(--pm-voice-orb-glow) 12%, transparent);
  color: var(--text);
  pointer-events: auto;
  transform-origin: bottom center;
  animation: pm-desktop-voice-popover-in 150ms ease-out;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-popover[hidden] {
  display: none;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 3px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .01em;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-subtitle {
  margin-bottom: 11px;
  color: color-mix(in srgb, var(--text) 64%, transparent);
  font-size: 11px;
  line-height: 1.35;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-close {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface, #14151b) 70%, transparent);
  color: var(--text);
  cursor: pointer;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-list {
  display: grid;
  gap: 7px;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-option {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface, #14151b) 78%, transparent);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 130ms ease, background 130ms ease, transform 130ms ease;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-option:hover,
body:not(.pm-mobile-active) #chat-view .desktop-voice-target-option:focus-visible {
  border-color: color-mix(in srgb, var(--pm-voice-orb-accent) 56%, transparent);
  background: color-mix(in srgb, var(--pm-voice-orb-accent) 12%, var(--surface, #14151b));
  outline: none;
  transform: translateY(-1px);
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-option.is-active {
  border-color: color-mix(in srgb, var(--pm-voice-orb-accent) 64%, transparent);
  background: color-mix(in srgb, var(--pm-voice-orb-accent) 16%, var(--surface, #14151b));
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pm-voice-orb-accent) 72%, var(--text));
  box-shadow: 0 0 12px color-mix(in srgb, var(--pm-voice-orb-glow) 45%, transparent);
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-option.is-active .desktop-voice-target-dot {
  background: var(--pm-voice-orb-light);
  box-shadow: 0 0 14px var(--pm-voice-orb-glow);
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-copy {
  min-width: 0;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-option-copy {
  min-width: 0;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-name {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-option-copy strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-meta {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: color-mix(in srgb, var(--text) 58%, transparent);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-option-copy small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: color-mix(in srgb, var(--text) 58%, transparent);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-check {
  color: var(--pm-voice-orb-light);
  font-size: 13px;
  font-weight: 800;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 11px;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-room-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 11px;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-action {
  min-height: 29px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-room-primary,
body:not(.pm-mobile-active) #chat-view .desktop-voice-room-secondary {
  min-height: 29px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-room-primary {
  border-color: color-mix(in srgb, var(--pm-voice-orb-accent) 70%, transparent);
  background: color-mix(in srgb, var(--pm-voice-orb-accent) 18%, transparent);
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-action.primary {
  border-color: color-mix(in srgb, var(--pm-voice-orb-accent) 70%, transparent);
  background: color-mix(in srgb, var(--pm-voice-orb-accent) 18%, transparent);
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-action:hover,
body:not(.pm-mobile-active) #chat-view .desktop-voice-target-action:focus-visible {
  border-color: var(--pm-voice-orb-accent);
  outline: none;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-room-primary:hover,
body:not(.pm-mobile-active) #chat-view .desktop-voice-room-primary:focus-visible,
body:not(.pm-mobile-active) #chat-view .desktop-voice-room-secondary:hover,
body:not(.pm-mobile-active) #chat-view .desktop-voice-room-secondary:focus-visible {
  border-color: var(--pm-voice-orb-accent);
  outline: none;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-target-live {
  color: var(--pm-voice-orb-light);
  font-size: 10px;
  font-weight: 800;
}

body:not(.pm-mobile-active) #chat-view.desktop-voice-target-open .desktop-voice-orb-dock {
  height: min(430px, calc(100% - 118px));
}

@keyframes pm-desktop-voice-popover-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb-shell {
  position: relative;
  flex: 0 0 auto;
  width: min(18vw, 112px);
  height: min(18vw, 112px);
  min-width: 82px;
  min-height: 82px;
  max-width: 112px;
  max-height: 112px;
  overflow: visible;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: visible;
  isolation: isolate;
  perspective: 760px;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 12px 26px color-mix(in srgb, var(--pm-voice-orb-glow) 8%, transparent)) !important;
  animation: none !important;
  transform: translate3d(0, var(--pm-orb-lift, 0px), 0)
    scale(calc(1 + var(--pm-orb-audio, 0) * .045));
  transition: transform 42ms linear, filter 120ms ease;
  cursor: pointer;
  pointer-events: auto;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb-trigger:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--pm-voice-orb-light) 78%, transparent);
  outline-offset: 7px;
  border-radius: 50%;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb::before,
body:not(.pm-mobile-active) #chat-view .desktop-voice-orb::after {
  content: none !important;
  display: none !important;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-orb-svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: center;
  transform-style: preserve-3d;
  transform: scale(calc(1 + var(--pm-orb-audio, 0) * .075));
  filter:
    brightness(calc(1 + var(--pm-orb-audio, 0) * .22))
    saturate(calc(1 + var(--pm-orb-audio, 0) * .18))
    drop-shadow(0 0 calc(1px + var(--pm-orb-audio, 0) * 3px) color-mix(in srgb, var(--pm-voice-orb-glow) 10%, transparent));
  transition: transform 42ms linear, filter 42ms linear;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb-particles {
  position: absolute;
  z-index: 3;
  inset: -14%;
  width: 128%;
  height: 128%;
  display: block;
  pointer-events: none;
  mix-blend-mode: screen;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-orb-aura {
  opacity: calc(.18 + var(--pm-orb-audio, 0) * .22);
  transition: opacity 80ms linear;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-orb-grid-latitude {
  animation: pm-desktop-orb-latitude-breathe 4.8s ease-in-out infinite;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-orb-grid-longitude {
  transform-box: fill-box;
  transform-origin: center;
  transform: scaleX(var(--pm-orb-grid-squash, .88)) rotate(var(--pm-orb-grid-rotation, 0deg));
  transition: transform 80ms linear;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-orb-flow-a {
  animation: pm-desktop-orb-flow-drift 7s ease-in-out infinite alternate;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-orb-flow-b {
  animation: pm-desktop-orb-flow-drift 5.5s ease-in-out infinite alternate-reverse;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-orb-rim-light {
  opacity: calc(.48 + var(--pm-orb-audio, 0) * .34);
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb.pm-orb-sound-reactive .pm-wave-main,
body:not(.pm-mobile-active) #chat-view .desktop-voice-orb.pm-orb-sound-reactive .pm-wave-halo {
  stroke-width: calc(2.2px + var(--pm-orb-audio, 0) * 2.4px);
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb.listening {
  animation: none !important;
  filter: drop-shadow(0 10px 22px color-mix(in srgb, var(--pm-voice-orb-glow) 8%, transparent)) !important;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb.thinking {
  animation: none !important;
  filter: drop-shadow(0 10px 22px color-mix(in srgb, var(--pm-voice-orb-accent) 7%, transparent)) !important;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb.speaking {
  animation: none !important;
  filter: drop-shadow(0 12px 24px color-mix(in srgb, var(--pm-voice-orb-glow) 10%, transparent)) saturate(1.08) brightness(1.01) !important;
}

@keyframes pm-desktop-orb-breathe {
  0%, 100% { transform: translate3d(0, var(--pm-orb-lift, 0px), 0) scale(calc(1 + var(--pm-orb-audio, 0) * .045)); }
  50% { transform: translate3d(0, calc(var(--pm-orb-lift, 0px) - 2px), 0) scale(calc(1.025 + var(--pm-orb-audio, 0) * .055)); }
}
@keyframes pm-desktop-orb-latitude-breathe {
  0%, 100% { opacity: .62; }
  50% { opacity: .94; }
}
@keyframes pm-desktop-orb-flow-drift {
  from { transform: translate3d(-5px, 4px, 0); opacity: .55; }
  to { transform: translate3d(7px, -5px, 0); opacity: 1; }
}

/* Desktop voice uses the same published ThinkingOrb canvas and transition
   layers as mobile. The room picker still owns the button, while the actual
   particles come from thinking-orbs (thinking/listening/solving). */
body:not(.pm-mobile-active) #chat-view .desktop-voice-orb {
  transform: none;
  filter: none !important;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-thinking-orb-host {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
  overflow: visible;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-thinking-orb-transition {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform: scale(calc(1 + var(--pm-thinking-orb-audio, 0) * .05));
  transform-origin: center;
  transition: transform 48ms linear;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-thinking-orb-layer {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  opacity: 0;
  transform: scale(.94);
  transform-origin: center;
  mix-blend-mode: screen;
  filter:
    brightness(calc(1.04 + var(--pm-thinking-orb-audio, 0) * 2.15))
    saturate(calc(1 + var(--pm-thinking-orb-audio, 0) * .52))
    drop-shadow(0 0 calc(1px + var(--pm-thinking-orb-audio, 0) * 8px) color-mix(in srgb, var(--pm-voice-orb-light) 62%, transparent))
    drop-shadow(0 0 calc(4px + var(--pm-thinking-orb-audio, 0) * 18px) color-mix(in srgb, var(--pm-voice-orb-glow) 34%, transparent));
  transition: opacity 180ms ease, transform 180ms ease, filter 42ms linear;
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-thinking-orb-layer.is-current {
  opacity: 1;
  transform: scale(1);
}

body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-thinking-orb-layer.is-leaving {
  opacity: 0;
  transform: scale(1.04);
}

/* Leave enough air above the dock for transcript text. The existing bottom
   mask then lets older messages fade behind the orb as the conversation moves. */
body:not(.pm-mobile-active) #chat-view.desktop-voice-mode #chat-messages {
  padding-bottom: 260px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 270px), transparent calc(100% - 170px), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 270px), transparent calc(100% - 170px), transparent 100%);
}

body:not(.pm-mobile-active) #chat-view.desktop-voice-mode.desktop-voice-target-open #chat-messages {
  padding-bottom: 430px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 440px), transparent calc(100% - 260px), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 440px), transparent calc(100% - 260px), transparent 100%);
}

body:not(.pm-mobile-active) #chat-view.chat-empty.desktop-voice-mode {
  justify-content: flex-end;
  gap: 0;
  overflow: hidden;
  padding: 0 20px 82px;
}

body:not(.pm-mobile-active) #chat-view.chat-empty.desktop-voice-mode .chat-welcome {
  display: none;
}

body:not(.pm-mobile-active) #chat-view.desktop-voice-mode > .chat-input-area {
  grid-template-rows: 0 0 40px;
  grid-template-areas:
    "staging staging staging staging staging"
    "input input input input input"
    "attach hint model voice send";
  row-gap: 0;
  min-height: 66px;
  height: 66px;
  box-sizing: border-box;
  padding: 8px 12px;
}

/* User bubbles are intentionally flat in the grey, blue, and purple desktop
   skins. Prometheus messages and the black/gold skin retain their own chrome. */
:root:is([data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) #chat-view .msg.user .msg-body {
  border: 0 !important;
  box-shadow: none !important;
}
:root:is([data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) #chat-view .msg.user .msg-body::before,
:root:is([data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) #chat-view .msg.user .msg-body::after {
  content: none !important;
  display: none !important;
  animation: none !important;
  box-shadow: none !important;
}

/* Secondary desktop chats use the same composer surface as the main chat.
   Keep the user's bubble on that exact surface in the blue and purple skins,
   including team, group, direct-bot, and side-chat renderers. */
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(
  #chat-view,
  .side-chat-main-pane,
  .side-chat-pane,
  .unified-agent-chat-shell,
  #prom-bot-main-surface,
  #prom-bot-group-host
) .msg.user .msg-body {
  background: var(--composer-bg) !important;
  color: var(--text) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(
  #chat-view,
  .side-chat-main-pane,
  .side-chat-pane,
  .unified-agent-chat-shell,
  #prom-bot-main-surface,
  #prom-bot-group-host
) .msg.user .msg-body::before,
:root:is([data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) :is(
  #chat-view,
  .side-chat-main-pane,
  .side-chat-pane,
  .unified-agent-chat-shell,
  #prom-bot-main-surface,
  #prom-bot-group-host
) .msg.user .msg-body::after {
  content: none !important;
  display: none !important;
  animation: none !important;
  box-shadow: none !important;
}

body:not(.pm-mobile-active) #chat-view.chat-empty.desktop-voice-mode > .chat-input-area {
  position: absolute;
  bottom: 18px;
  left: 50%;
  width: min(800px, calc(100% - 40px));
  margin: 0;
  transform: translateX(-50%);
}

body:not(.pm-mobile-active) #chat-view.desktop-voice-mode > .chat-input-area .chat-composer-input-wrap,
body:not(.pm-mobile-active) #chat-view.desktop-voice-mode > .chat-input-area .chat-composer-rich-preview {
  min-height: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0;
  pointer-events: none;
}

body:not(.pm-mobile-active) #chat-view.desktop-voice-mode > .chat-input-area #chat-input {
  min-height: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
  opacity: 0;
  pointer-events: none;
}

body:not(.pm-mobile-active) #chat-view.desktop-voice-mode > .chat-input-area #send-btn,
body:not(.pm-mobile-active) #chat-view.desktop-voice-mode > .chat-input-area .chat-attach-btn,
body:not(.pm-mobile-active) #chat-view.desktop-voice-mode > .chat-input-area #chat-voice-btn {
  align-self: center;
}

/* Attachment and send/abort are quiet at rest. Their only outer glow is the
   short hover response, including the abort state. */
body:not(.pm-mobile-active) #chat-view > .chat-input-area :is(.chat-attach-btn, #send-btn) {
  animation: none !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28) !important;
}

body:not(.pm-mobile-active) #chat-view > .chat-input-area :is(.chat-attach-btn, #send-btn):hover {
  transform: translateY(-1px) scale(1.025);
  box-shadow:
    0 8px 18px color-mix(in srgb, var(--brand, var(--theme-palette-gold)) 26%, transparent),
    0 0 16px color-mix(in srgb, var(--brand, var(--theme-palette-gold)) 20%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .34) !important;
}

body:not(.pm-mobile-active) #chat-view > .chat-input-area #send-btn.realtime-voice-stop:not(:hover) {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28) !important;
}

body:not(.pm-mobile-active) #chat-view > .chat-input-area #send-btn.realtime-voice-stop:hover {
  box-shadow:
    0 8px 18px rgba(216, 71, 58, .24),
    0 0 16px rgba(216, 71, 58, .20),
    inset 0 1px 0 rgba(255, 255, 255, .34) !important;
}

@media (prefers-reduced-motion: reduce) {
  body:not(.pm-mobile-active) #chat-view .desktop-voice-orb,
  body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-orb-grid,
  body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-orb-flow-a,
  body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-orb-flow-b {
    animation: none !important;
  }
  body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-orb-grid-longitude,
  body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-orb-svg {
    transition: none;
  }
  body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-thinking-orb-transition,
  body:not(.pm-mobile-active) #chat-view .desktop-voice-orb .pm-thinking-orb-layer {
    transition: none !important;
  }
}

/* Project/right-rail skin parity. The base right panel historically forced a
   gray always-dark palette, so named themes never reached its surface. */
:root[data-skin="dark"] body:not(.pm-mobile-active) .right-panel,
:root[data-skin="p1"] body:not(.pm-mobile-active) .right-panel,
:root[data-skin="blue"] body:not(.pm-mobile-active) .right-panel,
:root[data-skin="purple"] body:not(.pm-mobile-active) .right-panel {
  border-left-color: var(--line-strong) !important;
}
:root[data-skin="dark"] body:not(.pm-mobile-active) .right-panel {
  --bg: #1a1a1a;
  --bg-soft: #222222;
  --panel: #2a2a2a;
  --panel-2: #313131;
  --line: rgba(255,255,255,.10);
  --line-strong: rgba(255,255,255,.16);
  --text: #e8e6e1;
  --muted: #9a9890;
  --brand: var(--theme-palette-orange);
  background: #1a1a1a !important;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) .right-panel {
  --bg: #000;
  --bg-soft: #080808;
  --panel: #0b0b0a;
  --panel-2: #151411;
  --line: rgba(214,183,94,.14);
  --line-strong: rgba(214,183,94,.28);
  --text: #f2ebdd;
  --muted: #aaa294;
  --brand: var(--theme-palette-gold);
  background: #000 !important;
}
:root[data-skin="blue"] body:not(.pm-mobile-active) .right-panel {
  --bg: #07101f;
  --bg-soft: #0c1730;
  --panel: #122444;
  --panel-2: #16294e;
  --line: rgba(120,170,255,.12);
  --line-strong: rgba(120,170,255,.22);
  --text: #dde8ff;
  --muted: #8da3c9;
  --brand: var(--theme-palette-blue);
  background: #07101f !important;
}
:root[data-skin="purple"] body:not(.pm-mobile-active) .right-panel {
  --bg: #0c0518;
  --bg-soft: #150a28;
  --panel: #1e1138;
  --panel-2: #261545;
  --line: rgba(170,120,255,.12);
  --line-strong: rgba(170,120,255,.22);
  --text: #e8ddff;
  --muted: #a892cf;
  --brand: var(--theme-palette-violet);
  background: #0c0518 !important;
}
:root:is([data-skin="dark"], [data-skin="p1"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .right-panel :is(#right-panel-topbar, .right-section, #project-session-section) {
  color: var(--text);
  background: var(--bg) !important;
  border-bottom-color: var(--line) !important;
}
:root:is([data-skin="dark"], [data-skin="p1"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .right-panel #right-panel-topbar {
  background: var(--panel) !important;
  border-bottom-color: var(--line) !important;
}
:root:is([data-skin="dark"], [data-skin="p1"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .right-panel :is(.project-editor-block, .project-context-card, .progress-card, .conn-tile, .channel-hub-card) {
  border-color: var(--line) !important;
  background: var(--panel-2) !important;
  color: var(--text);
}
:root:is([data-skin="dark"], [data-skin="p1"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .right-panel .project-editor-label {
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  background: var(--panel-2) !important;
  color: var(--muted);
}
:root:is([data-skin="dark"], [data-skin="p1"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .right-panel :is(.project-editor-textarea, #connections-search) {
  border-color: var(--line) !important;
  background: var(--panel) !important;
  color: var(--text) !important;
}
:root:is([data-skin="dark"], [data-skin="p1"], [data-skin="blue"], [data-skin="purple"]) body:not(.pm-mobile-active) .right-panel #process-log {
  background: var(--bg-soft) !important;
  border-color: var(--line) !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   Appearance preferences

   Background artwork and embers are deliberately opt-in. The preference is
   stored on the root so the CSS, canvas, and settings controls share one
   source of truth without changing the existing preset palette definitions.
   ───────────────────────────────────────────────────────────────────────── */
:root[data-background-visuals="off"] body:not(.pm-mobile-active) :is(#chat-view, .side-chat-main-pane, .side-chat-pane, .unified-agent-chat-shell, #prom-bot-main-surface, #prom-bot-group-host) {
  background: var(--bg) !important;
}

:root[data-background-visuals="off"][data-skin="p1"] body:not(.pm-mobile-active) :is(#chat-view, .side-chat-main-pane, .side-chat-pane, .unified-agent-chat-shell, #prom-bot-main-surface, #prom-bot-group-host) {
  background: #000 !important;
}

:root[data-background-visuals="off"] body:not(.pm-mobile-active) #ember-canvas {
  display: none !important;
  opacity: 0;
}

:root[data-background-visuals="on"] body:not(.pm-mobile-active) #ember-canvas {
  display: block !important;
  opacity: var(--pm-background-opacity, .82);
}

:root[data-background-visuals="on"][data-skin="p1"] body:not(.pm-mobile-active) :is(#chat-view, .side-chat-main-pane, .side-chat-pane, .unified-agent-chat-shell, #prom-bot-main-surface, #prom-bot-group-host) {
  background:
    linear-gradient(var(--pm-background-overlay), var(--pm-background-overlay)),
    #050505 url('/assets/chat-main-background-dark.png') center center / cover no-repeat !important;
}

:root[data-background-visuals="on"][data-skin="dark"] body:not(.pm-mobile-active) :is(#chat-view, .side-chat-main-pane, .side-chat-pane, .unified-agent-chat-shell, #prom-bot-main-surface, #prom-bot-group-host) {
  background:
    linear-gradient(var(--pm-background-overlay), var(--pm-background-overlay)),
    #1a1a1a url('/assets/chat-main-background-dark.png') center center / cover no-repeat !important;
}

:root[data-background-visuals="on"][data-skin="blue"] body:not(.pm-mobile-active) :is(#chat-view, .side-chat-main-pane, .side-chat-pane, .unified-agent-chat-shell, #prom-bot-main-surface, #prom-bot-group-host) {
  background:
    linear-gradient(var(--pm-background-overlay), var(--pm-background-overlay)),
    #07101f url('/assets/chat-main-background-blue.jpeg') center center / cover no-repeat !important;
}

:root[data-background-visuals="on"][data-skin="purple"] body:not(.pm-mobile-active) :is(#chat-view, .side-chat-main-pane, .side-chat-pane, .unified-agent-chat-shell, #prom-bot-main-surface, #prom-bot-group-host) {
  background:
    linear-gradient(var(--pm-background-overlay), var(--pm-background-overlay)),
    #0c0518 url('/assets/chat-main-background-purple.jpeg') center center / cover no-repeat !important;
}

:root[data-background-visuals="on"][data-skin-kind="palette"] body:not(.pm-mobile-active) :is(#chat-view, .side-chat-main-pane, .side-chat-pane, .unified-agent-chat-shell, #prom-bot-main-surface, #prom-bot-group-host) {
  background:
    linear-gradient(var(--pm-background-overlay), var(--pm-background-overlay)),
    var(--bg) url('/assets/chat-main-background-dark.png') center center / cover no-repeat !important;
}

/* Custom theme surface layer. The editor writes the shared design tokens so
   the rest of the desktop UI continues to use its normal component styles. */
:root[data-skin-kind="palette"] body:not(.pm-mobile-active) {
  background: var(--bg) !important;
  color: var(--text);
  font-family: var(--pm-custom-font, var(--t-font-ui));
}
:root[data-skin-kind="palette"] body:not(.pm-mobile-active) :is(main, .main-shell-wrap, .page-view) {
  background: var(--bg) !important;
}
:root[data-skin-kind="palette"] body:not(.pm-mobile-active) :is(.sidebar, .topbar) {
  background: var(--sidebar-bg) !important;
  border-color: var(--line) !important;
  color: var(--sidebar-text);
}
:root[data-skin-kind="palette"] body:not(.pm-mobile-active) :is(.sidebar, .topbar, .main-shell, .right-panel, #chat-view, #settings-modal) :is(button, input, textarea, select) {
  font-family: inherit;
}
:root[data-skin-kind="palette"] body:not(.pm-mobile-active) .right-panel {
  background: var(--bg) !important;
  border-left-color: var(--line-strong) !important;
}
:root[data-skin-kind="palette"] body:not(.pm-mobile-active) .right-panel :is(#right-panel-topbar, .right-section, #project-session-section) {
  background: var(--bg) !important;
  border-color: var(--line) !important;
  color: var(--text);
}
:root[data-skin-kind="palette"] body:not(.pm-mobile-active) .right-panel :is(.project-editor-block, .project-context-card, .progress-card, .conn-tile, .channel-hub-card) {
  background: var(--panel-2) !important;
  border-color: var(--line) !important;
  color: var(--text);
}
:root[data-skin-kind="palette"] body:not(.pm-mobile-active) .right-panel :is(.project-editor-textarea, #connections-search) {
  background: var(--panel) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   Opaque desktop chat surfaces

   The page background should read as the same solid surface as an unread
   session, while the composer should match the solid pinned-chat surface.
   Keep those two roles as explicit tokens so every skin stays internally
   consistent instead of compositing through the optional artwork layer.
   ───────────────────────────────────────────────────────────────────────── */
:root[data-skin="p1"] {
  --pm-brain-card-bg: #2b2b2b;
  --pm-chat-page-bg: var(--pm-brain-card-bg);
  --pm-unread-chat-bg: var(--pm-brain-card-bg);
  --pm-pinned-chat-bg: #121211;
}

:root[data-skin="dark"] {
  --pm-brain-card-bg: #2a2a2a;
  --pm-chat-page-bg: var(--pm-brain-card-bg);
  --pm-unread-chat-bg: var(--pm-brain-card-bg);
  --pm-pinned-chat-bg: #313131;
}

:root[data-skin="blue"] {
  --pm-chat-page-bg: #10284d;
  --pm-unread-chat-bg: #10284d;
  --pm-pinned-chat-bg: #17335f;
}

:root[data-skin="purple"] {
  --pm-chat-page-bg: #1c0e36;
  --pm-unread-chat-bg: #1c0e36;
  --pm-pinned-chat-bg: #2a1650;
}

:root[data-skin-kind="palette"] {
  --pm-chat-page-bg: color-mix(in srgb, var(--panel) 82%, var(--brand) 18%);
  --pm-unread-chat-bg: var(--pm-chat-page-bg);
  --pm-pinned-chat-bg: var(--panel-2);
}

:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"]) {
  --composer-bg: var(--pm-pinned-chat-bg);
  --composer-panel: var(--pm-pinned-chat-bg);
  --composer-input: var(--pm-pinned-chat-bg);
}

:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) :is(main.main-shell, #chat-view, .side-chat-main-pane, .side-chat-pane, .unified-agent-chat-shell, #prom-bot-main-surface, #prom-bot-group-host) {
  background: var(--pm-chat-page-bg) !important;
  background-image: none !important;
}

:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .chat-session-item.job-item.unread:not(.active),
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #jobs-list .chat-session-item.job-item.unread:not(.active),
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #channels-list .chat-session-item.job-item.unread:not(.active) {
  background: var(--pm-unread-chat-bg) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #pinned-chats-list .chat-session-item.job-item {
  background: var(--pm-pinned-chat-bg) !important;
  border-color: var(--line) !important;
  box-shadow: none !important;
}

:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .chat-input-area {
  background: var(--pm-pinned-chat-bg) !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18) !important;
}

:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .chat-input-area :is(.queued-prompts-panel, .chat-new-context-dock, .chat-new-context-popover) {
  background: var(--pm-pinned-chat-bg) !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-pulse-card {
  background: var(--pm-brain-card-bg) !important;
}

:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-pulse-card:hover,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .chat-pulse-card:focus-visible {
  background: color-mix(in srgb, var(--pm-brain-card-bg), var(--pm-orange) 4%) !important;
}

:root[data-skin="dark"] body:not(.pm-mobile-active) #chat-view .chat-pulse-card {
  background: var(--pm-brain-card-bg) !important;
}

:root[data-skin="dark"] body:not(.pm-mobile-active) #chat-view .chat-pulse-card:hover,
:root[data-skin="dark"] body:not(.pm-mobile-active) #chat-view .chat-pulse-card:focus-visible {
  background: color-mix(in srgb, var(--pm-brain-card-bg), var(--pm-orange) 4%) !important;
}

/* Final empty-chat polish: keep the orange skin's page surface identical to
   the brain cards, bring the composer into the same visual group, and keep
   header hover states free of the shell's broad glow. */
:root[data-skin="p1"] body:not(.pm-mobile-active) main.main-shell,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view.chat-empty,
:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view.chat-empty #chat-messages {
  background: var(--pm-brain-card-bg) !important;
  background-image: none !important;
}

:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view.chat-empty:not(.desktop-voice-mode) > .chat-input-area {
  transform: none !important;
}

:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .topbar:hover,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .topbar:focus-within {
  --pm-glow: transparent !important;
  box-shadow: none !important;
}

:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .topbar :is(.icon-btn, .panel-toggle-btn, .status-pill):is(:hover, :focus-visible) {
  box-shadow: none !important;
}

/* Theme the secondary navigation and studio shells from the same structural
   surface as the desktop header/sidebar. Buttons and content previews keep
   their own accent and artwork treatment. */
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) {
  --pm-studio-surface: var(--sidebar-bg);
}

:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .more-popover {
  background: var(--pm-studio-surface) !important;
  border-color: var(--line-strong) !important;
  box-shadow: var(--shadow-md) !important;
}

:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .more-popover-item:hover {
  background: var(--sidebar-item-hover) !important;
  border-color: var(--line-strong) !important;
}

:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .more-popover-item.active {
  background: var(--sidebar-active-bg) !important;
  border-color: var(--flame-border) !important;
}

:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .more-popover .nav-icon {
  background: var(--sidebar-icon-bg) !important;
  border-color: var(--sidebar-icon-border) !important;
  color: var(--brand) !important;
}

/* Code Canvas shell and editor surface. */
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-panel,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-panel > div:first-child,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-panel > div:nth-child(2),
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-panel > div:nth-child(2) > div:last-child,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-tabs,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-header-mode-rail,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-workspace-sidebar,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-workspace-header,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-workspace-actions,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-empty-state,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-file-browser,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-editor-wrap,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-preview-shell,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-preview-toolbar,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-preview-stage {
  background: var(--pm-studio-surface) !important;
  background-image: none !important;
}

:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-tabs .canvas-tab {
  background: transparent !important;
  color: var(--muted) !important;
  border-color: var(--line) !important;
}

:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-tabs .canvas-tab:hover,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-tabs .canvas-tab.active {
  background: var(--panel) !important;
  color: var(--text) !important;
}

:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-editor-wrap .CodeMirror,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-editor-wrap .CodeMirror-scroll,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-editor-wrap .CodeMirror-gutters {
  background: var(--pm-studio-surface) !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
}

:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-editor-wrap .CodeMirror-linenumber {
  color: var(--muted) !important;
}

/* Creative studio outer surfaces; the stage itself remains the artwork. */
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-creative-shell,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-creative-shell .creative-studio-toolbar,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-creative-shell .creative-studio-layout,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-creative-shell .creative-studio-library,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-creative-shell .creative-lib-nav,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-creative-shell .creative-lib-panel,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-creative-shell .creative-studio-center,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-creative-shell .creative-studio-properties,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-creative-shell .creative-lib-panel-header,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-creative-shell .creative-panel-header,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-creative-shell .creative-stage-wrap,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-creative-shell .creative-stage-viewport,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-creative-shell .creative-inspector-tabs,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-creative-shell .creative-timeline-shell,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-creative-shell .creative-timeline-header,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-creative-shell .creative-timeline-track-list {
  background: var(--pm-studio-surface) !important;
  background-image: none !important;
}

/* Browser workspace outer surfaces; the live page/frame remains untouched. */
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-browser-shell,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #canvas-browser-shell > div:first-child,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #browser-canvas-layout,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #browser-canvas-native-tabs,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #browser-canvas-live-card,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #browser-canvas-live-card > div:first-child,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #browser-canvas-empty,
:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #browser-canvas-side-col > div {
  background: var(--pm-studio-surface) !important;
  background-image: none !important;
  border-color: var(--line) !important;
}

:root:is([data-skin="p1"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #browser-canvas-frame-wrap {
  background: var(--pm-studio-surface) !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   SHARED PROMETHEUS ONE DESKTOP SHELL

   All desktop presets use one rail/chat structure. A preset is allowed to
   change its palette, but not the logo, typography, spacing, dividers, list
   geometry, or empty-chat composition. Ash & Ember used to fall through to
   the legacy shell; these final parity rules close that gap without touching
   the mobile document.
   ───────────────────────────────────────────────────────────────────────── */
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) {
  --pm-shell-gold: var(--theme-palette-gold);
  --pm-shell-gold-light: #f0d98b;
  --pm-shell-gold-muted: #a98a3b;
}

:root[data-skin="p1"] {
  --pm-shell-surface: #000;
  --pm-shell-accent: var(--t-accent);
  --pm-shell-accent-light: #f0d98b;
  --pm-shell-accent-muted: #a98a3b;
}

:root[data-skin="gray"] {
  --pm-shell-surface: #171717;
  --pm-shell-accent: var(--t-accent);
  --pm-shell-accent-light: #fb923c;
  --pm-shell-accent-muted: #c2410c;
  --p1-shared-gold: var(--theme-palette-orange);
  --p1-shared-gold-light: #fb923c;
  --p1-shared-gold-dark: #9a3412;
  --p1-shared-gold-soft: color-mix(in srgb, var(--t-accent) 12%, transparent);
  --p1-shared-gold-line: color-mix(in srgb, var(--t-accent) 34%, transparent);
  --p1-shared-gold-glow: color-mix(in srgb, var(--t-accent) 24%, transparent);
  --pm-brain-card-bg: #2e2e2e;
  --pm-chat-page-bg: #2e2e2e;
  --pm-unread-chat-bg: #2e2e2e;
  --pm-pinned-chat-bg: #484848;
  --pm-studio-surface: #171717;
}

:root[data-skin="dark"] {
  --pm-shell-surface: #1a1a1a;
  --pm-shell-accent: var(--t-accent);
  --pm-shell-accent-light: #fb923c;
  --pm-shell-accent-muted: #c2410c;
}

:root[data-skin="blue"] {
  --pm-shell-surface: #07101f;
  --pm-shell-accent: var(--theme-palette-blue);
  --pm-shell-accent-light: #8fc1ff;
  --pm-shell-accent-muted: #1e5fd0;
}

:root[data-skin="purple"] {
  --pm-shell-surface: #0c0518;
  --pm-shell-accent: var(--theme-palette-violet);
  --pm-shell-accent-light: #c4a5ff;
  --pm-shell-accent-muted: #6d3fd1;
}

:root[data-skin-kind="palette"] {
  --pm-shell-surface: var(--sidebar-bg);
  --pm-shell-accent: var(--brand);
  --pm-shell-accent-light: var(--brand);
  --pm-shell-accent-muted: var(--muted);
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar-fixed {
  gap: 8px;
  padding: 10px 8px 6px;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar-top {
  min-height: 0;
  padding: 2px 4px;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .brand {
  gap: 8px;
}

:root:is([data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .logo {
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: url("../assets/prometheus-one/p1-mark-ring.png") center / contain no-repeat;
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--pm-shell-accent) 24%, transparent));
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .logo img {
  opacity: 0;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar.collapsed .logo {
  width: 38px;
  height: 38px;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .brand-title {
  color: var(--sidebar-text);
  font-size: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 600;
  letter-spacing: 0;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .brand-title::before {
  content: "PROMETHEUS 1";
  color: var(--sidebar-text);
  font-size: 11px;
  letter-spacing: 2px;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .brand-sub {
  color: var(--pm-shell-accent-muted);
  font-size: 0;
  font-weight: 700;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .brand-sub::before {
  content: "1 Program. Unlimited abilities.";
  color: var(--pm-shell-accent-muted);
  font-size: 7px;
  letter-spacing: .1px;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar-search {
  min-height: 0;
  padding: 6px 10px;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar-scroll {
  gap: 8px;
  padding: 8px 8px 10px;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .seg-tabs {
  gap: 2px;
  padding: 2px;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .section-title {
  min-height: 27px;
  padding: 8px 6px 4px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--pm-shell-gold-muted);
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .section-title::after {
  content: "✦";
  flex: 1;
  overflow: hidden;
  color: var(--pm-shell-gold);
  font-size: 10px;
  letter-spacing: 0;
  text-align: right;
  background: linear-gradient(90deg, color-mix(in srgb, var(--pm-shell-gold-muted) 45%, transparent), transparent 84%) left center / calc(100% - 18px) 1px no-repeat;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .session-list,
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar #jobs-list,
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar #skills-list,
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar #skills-search-results,
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar #channels-list {
  gap: 5px;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar #jobs-list {
  padding: 0 10px 10px 0;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar #skills-list,
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar #skills-search-results,
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar #channels-list {
  padding: 10px;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(#jobs-list, #skills-list, #skills-search-results) {
  display: block;
  gap: normal;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .chat-session-item.job-item,
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar #pinned-chats-list .job-item {
  min-height: 0;
  margin: 0 0 2px;
  padding: 6px 26px 6px 8px;
  border-radius: 8px;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(.nav-item, .more-popover-item) .nav-icon {
  width: 22px;
  height: 22px;
  padding-right: 0;
  border: 1px solid color-mix(in srgb, var(--pm-shell-gold) 34%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--pm-shell-gold) 7%, transparent);
  color: var(--pm-shell-gold);
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(.nav-item, .more-popover-item) .nav-icon svg {
  width: 12px;
  height: 12px;
  stroke-width: 1.7;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .new-chat .nav-icon {
  width: 24px;
  height: 20px;
  padding-right: 8px;
  border: 0;
  border-right: 1px solid color-mix(in srgb, var(--pm-shell-gold) 48%, transparent);
  border-radius: 0;
  background: transparent;
  color: var(--pm-shell-gold-light);
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .new-chat .nav-icon svg {
  display: none;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .new-chat .nav-icon::before {
  content: "✦";
  font: 17px/1 Georgia, 'Times New Roman', serif;
  text-shadow: 0 0 8px color-mix(in srgb, var(--pm-shell-gold) 38%, transparent);
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) :is(.sidebar, .topbar, .chat-input-area)::before,
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) :is(.sidebar, .topbar, .chat-input-area)::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) :is(.sidebar, .topbar, .sidebar-footer) {
  background: var(--pm-shell-surface) !important;
  border-color: var(--line) !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) :is(main.main-shell, .main-shell-wrap, .page-view, #connector-view) {
  background: var(--bg) !important;
  background-image: none !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) :is(main.main-shell, #chat-view, .side-chat-main-pane, .side-chat-pane, .unified-agent-chat-shell, #prom-bot-main-surface, #prom-bot-group-host) {
  background: var(--pm-chat-page-bg) !important;
  background-image: none !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .chat-input-area {
  background: var(--pm-pinned-chat-bg) !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view.chat-empty:not(.desktop-voice-mode) > .chat-input-area {
  transform: none !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view .chat-welcome,
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view .chat-welcome h2,
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view .msg-content,
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view .markdown-body :is(h1, h2, h3, h4, strong) {
  color: var(--text);
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view .chat-welcome-icon {
  width: 72px;
  height: 72px;
  background: url("../assets/prometheus-one/p1-mark-ring.png") center / contain no-repeat;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--pm-shell-accent) 24%, transparent));
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view .chat-welcome-icon img,
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view .msg:not(.user) .msg-avatar img {
  opacity: 0 !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view .msg:not(.user) .msg-avatar {
  border-color: color-mix(in srgb, var(--pm-shell-accent) 36%, transparent);
  background:
    url("../assets/prometheus-one/prometheus-avatar-column-gold.png") center / 24px 24px no-repeat,
    radial-gradient(circle, color-mix(in srgb, var(--pm-shell-accent) 12%, transparent), var(--pm-shell-surface) 72%);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--pm-shell-accent-light) 10%, transparent), 0 5px 14px rgba(0, 0, 0, .24);
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view .chat-pulse-card {
  background: var(--pm-brain-card-bg) !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view .chat-pulse-card:hover,
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view .chat-pulse-card:focus-visible {
  background: color-mix(in srgb, var(--pm-brain-card-bg), var(--pm-shell-accent) 5%) !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .right-panel {
  background: var(--bg) !important;
  border-left-color: var(--line-strong) !important;
  color: var(--text);
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .right-panel :is(#right-panel-topbar, .right-section, #project-session-section) {
  background: var(--bg) !important;
  border-color: var(--line) !important;
  color: var(--text);
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .right-panel :is(.project-editor-block, .project-context-card, .progress-card, .conn-tile, .channel-hub-card) {
  background: var(--panel-2) !important;
  border-color: var(--line) !important;
  color: var(--text);
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .right-panel :is(.project-editor-textarea, #connections-search) {
  background: var(--panel) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #settings-modal :is(.settings-page-card, .settings-page-sidebar, .settings-page-main) {
  color: var(--text);
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #settings-modal .settings-page-sidebar {
  background: var(--pm-shell-surface) !important;
  border-right-color: var(--line-strong) !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #settings-modal .settings-page-main {
  background: var(--bg) !important;
}

:root[data-background-visuals="on"][data-skin="gray"] body:not(.pm-mobile-active) :is(#chat-view, .side-chat-main-pane, .side-chat-pane, .unified-agent-chat-shell, #prom-bot-main-surface, #prom-bot-group-host) {
  background:
    linear-gradient(var(--pm-background-overlay), var(--pm-background-overlay)),
    #2e2e2e url('/assets/chat-main-background-dark.png') center center / cover no-repeat !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   Final desktop shell alignment

   The left rail keeps the Prometheus One metallic-gold chrome on every
   preset. The source drawer follows the same 56px header rhythm as the main
   topbar, while its active tab uses the preset's own shell accent.
   ───────────────────────────────────────────────────────────────────────── */
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(.project-sidebar-row .project-card-icon, .project-chat-icon-line, .project-chat-folder) {
  color: var(--pm-shell-gold) !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar #pinned-chats-list .chat-pin-btn:is(:hover, .active) {
  color: var(--pm-shell-gold-light) !important;
  background: color-mix(in srgb, var(--pm-shell-gold) 10%, transparent) !important;
}

/* Pinned rows use the same flat treatment as ordinary session rows. */
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar #pinned-chats-list .job-item {
  border: 1px solid transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar #pinned-chats-list .job-item:hover {
  border-color: transparent !important;
  background: var(--sidebar-item-hover) !important;
  box-shadow: none !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar #pinned-chats-list .job-item:is(.active, .unread.active) {
  border-color: transparent !important;
  background: var(--sidebar-active-bg) !important;
  box-shadow: none !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar #pinned-chats-list .job-item.unread:not(.active):not(.is-working) {
  border-color: transparent !important;
  background: color-mix(in srgb, var(--sidebar-active-bg) 52%, transparent) !important;
  box-shadow: none !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar #pinned-chats-list .job-item.is-working {
  border-color: transparent !important;
  background: color-mix(in srgb, var(--sidebar-active-bg) 70%, transparent) !important;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--pm-orange), transparent 78%),
    0 0 14px color-mix(in srgb, var(--pm-orange), transparent 70%) !important;
}

/* Pinned chats, projects, and ordinary sessions share the exact same usable
   row width. Older theme blocks inset only #jobs-list on the right, which made
   the three neighboring sections visibly disagree. */
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(#pinned-chats-list, #sidebar-projects-list, #jobs-list) {
  width: 100%;
  box-sizing: border-box;
  padding-left: 0;
  padding-right: 0;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(#pinned-chats-list, #sidebar-projects-list, #jobs-list) > :is(.chat-session-item, .project-chat-group) {
  width: 100%;
  box-sizing: border-box;
}

/* Reserve the full timestamp footprint inside the title line. The row already
   owns the old action-button inset; constraining the title wrapper makes its
   ellipsis resolve before the idle time instead of underneath it. */
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .chat-session-item.job-item:not(.project-chat-row) .job-item-title-wrap {
  box-sizing: border-box;
  padding-right: 42px;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .chat-session-item.job-item.is-editing {
  padding-right: 82px;
}

/* The source drawer header is the same size and surface as the main topbar. */
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .right-panel .source-panel-topbar {
  height: 56px;
  min-height: 56px;
  background: var(--pm-shell-surface) !important;
  border-bottom-color: var(--line) !important;
  color: var(--text) !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .right-panel .source-panel-heading {
  color: var(--text) !important;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.02em;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .right-panel .source-panel-shell {
  color: var(--text);
  background: var(--bg) !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .right-panel .source-panel-tabs {
  border-bottom-color: var(--line) !important;
  background: var(--bg) !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .right-panel .source-panel-tab {
  color: var(--muted);
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .right-panel .source-panel-tab:hover {
  color: var(--text);
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .right-panel .source-panel-tab.is-active {
  color: var(--pm-shell-accent-light) !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .right-panel .source-panel-tab.is-active::after {
  background: var(--pm-shell-accent) !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   Desktop sidebar section rhythm

   Pinned Chats, Projects, and Sessions share the Prometheus One heading
   treatment on every desktop skin: label, divider, then the existing spark.
   The first two headings are buttons so their contents can collapse like the
   mobile drawer without changing the underlying session/project data.
   ───────────────────────────────────────────────────────────────────────── */
body:not(.pm-mobile-active) .sidebar:not(.collapsed) :is(.section-title, .sidebar-section-toggle) {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 27px;
  padding: 8px 6px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--pm-shell-gold-muted, var(--sidebar-muted));
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.2;
  text-align: left;
  text-transform: uppercase;
}

body:not(.pm-mobile-active) .sidebar:not(.collapsed) .section-title::after {
  content: "✦";
  flex: 1;
  overflow: hidden;
  color: var(--pm-shell-gold, var(--brand));
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-align: right;
  background: linear-gradient(90deg, color-mix(in srgb, var(--pm-shell-gold-muted, var(--muted)) 45%, transparent), transparent 84%) left center / calc(100% - 18px) 1px no-repeat;
}

body:not(.pm-mobile-active) .sidebar:not(.collapsed) .sidebar-section-toggle::after {
  content: none;
  display: none;
}

body:not(.pm-mobile-active) .sidebar:not(.collapsed) .sidebar-section-decoration {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 9px;
  min-width: 0;
  overflow: hidden;
}

body:not(.pm-mobile-active) .sidebar:not(.collapsed) .sidebar-section-decoration::before {
  content: "";
  flex: 1 1 auto;
  min-width: 0;
  height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--pm-shell-gold-muted, var(--muted)) 45%, transparent), transparent 84%);
}

body:not(.pm-mobile-active) .sidebar:not(.collapsed) .sidebar-section-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: var(--pm-shell-gold, var(--brand));
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  transition: transform 160ms ease;
}

body:not(.pm-mobile-active) .sidebar:not(.collapsed) .sidebar-section-toggle[aria-expanded="false"] .sidebar-section-icon {
  transform: rotate(-90deg);
}

/* Keep the message column and composer on one shared track. The extra gutter
   is applied inside the chat scroller when Canvas/browser shifts the center
   column left, so neither side can start flush against the shifted edge. */
body:not(.pm-mobile-active):not(.side-chat-split-active) #chat-view {
  --chat-surface-gutter: 0px;
  --chat-column-width: min(800px, calc(100% - 40px));
}

body:not(.pm-mobile-active):not(.side-chat-split-active).right-canvas-open #chat-view {
  --chat-surface-gutter: clamp(24px, 2.8vw, 44px);
  --chat-column-width: min(800px, calc(100% - 40px - var(--chat-surface-gutter) - var(--chat-surface-gutter)));
}

body:not(.pm-mobile-active):not(.side-chat-split-active) #chat-view > #chat-messages {
  box-sizing: border-box;
  padding-inline: var(--chat-surface-gutter);
}

body:not(.pm-mobile-active):not(.side-chat-split-active) #chat-view > #chat-messages:not(.side-chat-split-shell) .msg-shell,
body:not(.pm-mobile-active):not(.side-chat-split-active) #chat-view > .chat-input-area {
  width: var(--chat-column-width);
  max-width: 100%;
}

/* Canvas keeps the composer absolutely anchored to the bottom of the chat
   column. Reserve a matching vertical shelf in the message scroller so the
   last turn stays comfortably above it when the composer grows or wraps.
   This is intentionally limited to active conversations; the empty-chat
   Brain-card composition has its own flow layout. */
body:not(.pm-mobile-active).right-canvas-open #chat-view:not(.chat-empty) > #chat-messages {
  --chat-canvas-composer-clearance: var(--desktop-composer-clearance, clamp(212px, 24vh, 292px));
  padding-top: clamp(30px, 4vh, 44px);
  padding-bottom: var(--chat-canvas-composer-clearance);
  scroll-padding-bottom: var(--chat-canvas-composer-clearance);
  gap: clamp(30px, 3.2vh, 40px);
}

/* Keep the composer visually above the queued-prompt tab. The upper shadow is
   deliberately on the composer itself so it masks the queue's lower overlap. */
body:not(.pm-mobile-active) #chat-view > .chat-input-area {
  z-index: 12;
  box-shadow: 0 -12px 26px color-mix(in srgb, var(--pm-chat-page-bg, var(--bg)) 82%, transparent), 0 10px 24px rgba(0, 0, 0, .14) !important;
}

/* Prometheus One keeps the queue-masking shadow above the main composer, but
   drops the decorative outer halo from both main and side-chat composers. */
:root[data-skin="p1"] body:not(.pm-mobile-active) .chat-input-area {
  box-shadow: none !important;
}

:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view > .chat-input-area {
  box-shadow: 0 -12px 26px color-mix(in srgb, var(--pm-chat-page-bg, var(--bg)) 82%, transparent) !important;
}

:root[data-skin="p1"] body:not(.pm-mobile-active) #chat-view .background-spawn-lane {
  border-width: 0 !important;
  border-color: transparent !important;
}

/* Every desktop skin uses one heading ornament: label, divider, spark. The
   collapsible headings and the static Sessions heading already own a real
   ornament node, so suppress theme-generated pseudo sparks on those rows. */
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar:not(.collapsed) :is(.sidebar-section-toggle, .sidebar-section-static)::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar:not(.collapsed) .sidebar-section-decoration::before {
  content: "" !important;
  display: block !important;
  background: linear-gradient(90deg, color-mix(in srgb, var(--pm-shell-gold, var(--brand)) 58%, transparent), color-mix(in srgb, var(--pm-shell-gold, var(--brand)) 16%, transparent) 84%, transparent) !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar:not(.collapsed) .sidebar-section-icon {
  color: var(--pm-shell-gold, var(--brand)) !important;
}

/* The collapsed Pages row follows the same gold baseline and lets its label
   size the first grid column, keeping the rule centered between text/chevron. */
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar.pages-collapsed .sidebar-pages-toggle {
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  color: var(--pm-shell-gold-muted, var(--brand)) !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar.pages-collapsed .sidebar-pages-toggle::before {
  background: linear-gradient(90deg, color-mix(in srgb, var(--pm-shell-gold, var(--brand)) 58%, transparent), color-mix(in srgb, var(--pm-shell-gold, var(--brand)) 16%, transparent) 84%, transparent) !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar.pages-collapsed .sidebar-pages-toggle svg {
  color: var(--pm-shell-gold, var(--brand)) !important;
}

/* Page navigation stays semantically active for keyboard/screen-reader state,
   but the current page itself should not be painted like a selected chat. Keep
   hover/focus feedback available when the user is actually interacting. */
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(.nav-group > .nav-item, .nav-more-wrap > .nav-item, .more-popover-item).active:not(:hover):not(:focus-visible) {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* In the expanded desktop sidebar the Pages control remains the invisible
   click target that can collapse/reopen the section, while its orphan divider
   no longer reads as an extra tab above Chat. The divider remains visible in
   the collapsed state so Pages can still be reopened. */
@media (min-width: 901px) {
  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar:not(.pages-collapsed) .sidebar-pages-toggle::before {
    opacity: 0 !important;
  }
}

/* Source-panel utility actions are icon affordances, not framed controls. */
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) :is(#source-panel-refresh, .source-panel-canvas-btn, #sources-minimized-panel .sources-minimized-header .source-panel-icon-btn),
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) :is(#source-panel-refresh, .source-panel-canvas-btn, #sources-minimized-panel .sources-minimized-header .source-panel-icon-btn):is(:hover, :focus-visible) {
  border: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .source-panel-canvas-btn.browser-live {
  color: var(--muted) !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .source-panel-canvas-btn.browser-live:is(:hover, :focus-visible) {
  color: var(--text) !important;
}

/* Final desktop empty-chat geometry. The welcome node can briefly render
   before ChatPage applies the chat-empty class, so anchor this override to the
   actual welcome surface as well. This keeps the composer in the same content
   stack as the Brain cards instead of leaving a full-height flex spacer above
   it. */
@media (min-width: 901px) {
  body:not(.pm-mobile-active) #chat-view:has(> #chat-messages > #chat-welcome) {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    align-items: stretch !important;
    justify-content: center !important;
    padding: clamp(12px, 2.5vh, 28px) 20px clamp(12px, 2vh, 22px) !important;
    gap: 0 !important;
  }

  body:not(.pm-mobile-active) #chat-view:has(> #chat-messages > #chat-welcome) > #chat-messages {
    flex: 0 0 auto !important;
    min-height: auto !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 0 8px !important;
    overflow: visible !important;
    justify-content: flex-start !important;
  }

  body:not(.pm-mobile-active) #chat-view:has(> #chat-messages > #chat-welcome) > #chat-messages > #chat-welcome {
    height: auto !important;
    max-height: none !important;
    flex: 0 1 auto !important;
  }

  body:not(.pm-mobile-active) #chat-view:has(> #chat-messages > #chat-welcome) > .chat-input-area {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    flex: 0 0 auto !important;
    margin: 0 auto !important;
  }

  body:not(.pm-mobile-active) #chat-view .chat-pulse-card,
  body:not(.pm-mobile-active) #chat-view .chat-pulse-card:hover,
  body:not(.pm-mobile-active) #chat-view .chat-pulse-card:focus-visible,
  body:not(.pm-mobile-active) #chat-view .chat-new-context-dock,
  body:not(.pm-mobile-active) #chat-view .chat-new-context-popover {
    border: 0 !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }

  /* The cards are now a light prompt rail rather than separate panels. Keep
     the three prompts close enough to read as one Brain group. */
  body:not(.pm-mobile-active) #chat-view .chat-pulse-cards {
    gap: 4px !important;
    margin-top: 8px !important;
  }

  body:not(.pm-mobile-active) #chat-view .chat-pulse-card {
    min-height: 38px;
    padding: 7px 6px;
  }
}

/* Narrow desktop windows (<=900px, sidebar still open): the header controls
   had no sizing below the breakpoint, so search/priority collapsed to 4px and
   the icons stacked over each other. Give them the same fixed 30px chips. */
@media (max-width: 900px) {
  body:not(.pm-mobile-active) .sidebar-top-actions {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 2px;
  }

  body:not(.pm-mobile-active) .sidebar-top-actions > .sidebar-header-btn {
    position: relative;
    display: inline-grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    padding: 0;
    border: 0 !important;
    border-radius: 7px;
    background: transparent !important;
    color: var(--sidebar-muted, var(--muted));
    box-shadow: none !important;
  }

  body:not(.pm-mobile-active) .sidebar-top-actions > .sidebar-header-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* Desktop sidebar header + priority rail. Keep these controls quiet and
   aligned with the P1 mark; the sidebar itself is the only surface. */
@media (min-width: 901px) {
  body:not(.pm-mobile-active) .sidebar .brand-copy {
    display: none !important;
  }

  body:not(.pm-mobile-active) .sidebar-top {
    align-items: center;
  }

  body:not(.pm-mobile-active) .sidebar-top-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    min-width: 0;
  }

  body:not(.pm-mobile-active) .sidebar-header-btn {
    position: relative;
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    padding: 0;
    border: 0 !important;
    border-radius: 7px;
    background: transparent !important;
    color: var(--sidebar-muted, var(--muted));
    box-shadow: none !important;
    cursor: pointer;
  }

  body:not(.pm-mobile-active) .sidebar-header-btn svg {
    width: 16px;
    height: 16px;
  }

  body:not(.pm-mobile-active) .sidebar-header-btn:hover,
  body:not(.pm-mobile-active) .sidebar-header-btn:focus-visible,
  body:not(.pm-mobile-active) .sidebar-header-btn[aria-expanded="true"] {
    outline: none;
    background: var(--sidebar-item-hover) !important;
    color: var(--sidebar-text);
  }

  body:not(.pm-mobile-active) .sidebar-unread-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pm-shell-gold-light, var(--pm-gold, var(--brand)));
    box-shadow: 0 0 0 2px var(--sidebar-bg), 0 0 10px color-mix(in srgb, var(--pm-shell-gold-light, var(--brand)) 70%, transparent);
  }

  body:not(.pm-mobile-active) .sidebar-search[hidden],
  body:not(.pm-mobile-active) .sidebar-priority-panel[hidden] {
    display: none !important;
  }

  body:not(.pm-mobile-active) .sidebar-priority-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
  }

  body:not(.pm-mobile-active) .priority-section {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  body:not(.pm-mobile-active) .priority-section .section-title {
    flex: 0 0 auto;
  }

  body:not(.pm-mobile-active) .priority-section-list {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  body:not(.pm-mobile-active) .priority-section.is-collapsed .priority-section-list,
  body:not(.pm-mobile-active) .priority-project-group.is-collapsed .priority-project-children {
    display: none !important;
  }

  body:not(.pm-mobile-active) .priority-section-toggle {
    min-height: 27px;
  }

  body:not(.pm-mobile-active) .priority-empty {
    padding: 6px;
    color: var(--sidebar-muted, var(--muted));
    font-size: 10.5px;
  }

  body:not(.pm-mobile-active) .priority-chat-card {
    position: relative;
    min-width: 0;
    margin: 0 0 2px;
    padding: 8px 8px 7px;
    border: 0 !important;
    border-radius: 8px;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--sidebar-text, var(--text));
    cursor: pointer;
  }

  body:not(.pm-mobile-active) .priority-chat-card:hover,
  body:not(.pm-mobile-active) .priority-chat-card:focus-within,
  body:not(.pm-mobile-active) .priority-chat-card.active {
    outline: none;
    border: 0 !important;
    background: var(--sidebar-item-hover) !important;
    box-shadow: none !important;
  }

  body:not(.pm-mobile-active) .priority-chat-card.is-working::before,
  body:not(.pm-mobile-active) .priority-chat-card.unread::before {
    display: none !important;
  }

  body:not(.pm-mobile-active) .priority-chat-topline {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 22px;
  }

  body:not(.pm-mobile-active) .priority-chat-title-wrap {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
    gap: 5px;
    padding-right: 70px;
  }

  body:not(.pm-mobile-active) .priority-chat-card .imported-source-logo,
  body:not(.pm-mobile-active) .priority-chat-card .imported-source-logo-fallback {
    display: inline-block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
  }

  body:not(.pm-mobile-active) .priority-chat-provider-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    overflow: hidden;
    border-radius: 4px;
    object-fit: contain;
  }

  body:not(.pm-mobile-active) .priority-chat-provider-logo--fallback {
    border: 1px solid color-mix(in srgb, var(--sidebar-muted, var(--muted)) 68%, transparent);
    border-radius: 50%;
    color: var(--sidebar-muted, var(--muted));
  }

  body:not(.pm-mobile-active) .priority-chat-provider-logo--fallback::before {
    width: 5px;
    height: 5px;
    border: 1px solid currentColor;
    border-radius: 50%;
    box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 18%, transparent);
    content: '';
  }

  body:not(.pm-mobile-active) .priority-chat-provider-logo--prometheus {
    border-radius: 50%;
  }

  body:not(.pm-mobile-active) .priority-chat-provider-logo--openai,
  body:not(.pm-mobile-active) .priority-chat-provider-logo--xai {
    background: #fff;
    border-radius: 4px;
    padding: 2px;
  }

  body:not(.pm-mobile-active) .priority-chat-provider-logo[hidden] {
    display: none;
  }

  body:not(.pm-mobile-active) .priority-chat-title {
    min-width: 0;
    overflow: hidden;
    color: var(--sidebar-text, var(--text));
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:not(.pm-mobile-active) .priority-chat-time {
    position: absolute;
    top: 10px;
    right: 8px;
    max-width: 72px;
    overflow: hidden;
    color: var(--sidebar-muted, var(--muted));
    font-size: 10px;
    line-height: 1.2;
    pointer-events: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: opacity .12s ease;
  }

  body:not(.pm-mobile-active) .priority-chat-card:hover .priority-chat-time,
  body:not(.pm-mobile-active) .priority-chat-card:focus-within .priority-chat-time {
    opacity: 0;
  }

  body:not(.pm-mobile-active) .priority-chat-actions {
    position: absolute;
    top: 7px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
  }

  body:not(.pm-mobile-active) .priority-chat-card:hover .priority-chat-actions,
  body:not(.pm-mobile-active) .priority-chat-card:focus-within .priority-chat-actions {
    opacity: 1;
    pointer-events: auto;
  }

  body:not(.pm-mobile-active) .priority-chat-actions .chat-session-action-btn {
    position: static;
    flex: 0 0 22px;
    padding: 0;
  }

  body:not(.pm-mobile-active) .priority-chat-preview {
    display: -webkit-box;
    min-width: 0;
    margin-top: 3px;
    overflow: hidden;
    color: var(--sidebar-muted, var(--muted));
    font-size: 10.5px;
    line-height: 1.35;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  body:not(.pm-mobile-active) .priority-chat-meta {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 5px;
    margin-top: 4px;
    overflow: hidden;
    color: var(--sidebar-muted, var(--muted));
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
  }

  body:not(.pm-mobile-active) .priority-chat-project {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body:not(.pm-mobile-active) .priority-chat-project {
    display: inline-flex;
    align-items: center;
    gap: 3px;
  }

  body:not(.pm-mobile-active) .priority-chat-folder-icon {
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    color: var(--pm-shell-gold, var(--brand));
  }

  body:not(.pm-mobile-active) .priority-project-group {
    min-width: 0;
  }

  body:not(.pm-mobile-active) .priority-project-title {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 32px;
    margin: 0 0 2px;
    padding: 6px 62px 6px 7px;
    border: 0 !important;
    border-radius: 8px;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--sidebar-text, var(--text));
    cursor: pointer;
  }

  body:not(.pm-mobile-active) .priority-project-title:hover,
  body:not(.pm-mobile-active) .priority-project-title:focus-within {
    background: var(--sidebar-item-hover) !important;
  }

  body:not(.pm-mobile-active) .priority-project-title:focus-visible {
    outline: 1px solid color-mix(in srgb, var(--pm-shell-gold, var(--brand)) 48%, transparent);
    outline-offset: -2px;
  }

  body:not(.pm-mobile-active) .priority-project-title-name {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 4px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:not(.pm-mobile-active) .priority-project-title .project-chat-icon-line {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 2px;
    margin: 0;
    vertical-align: middle;
  }

  body:not(.pm-mobile-active) .priority-project-title .project-chat-folder,
  body:not(.pm-mobile-active) .priority-project-title .imported-source-logo,
  body:not(.pm-mobile-active) .priority-project-title .imported-source-logo-fallback {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
  }

  body:not(.pm-mobile-active) .priority-project-title.imported-project .priority-project-title-name {
    gap: 0;
  }

  body:not(.pm-mobile-active) .priority-project-title.imported-project .project-chat-icon-line {
    gap: 0;
    margin-right: -3px;
  }

  body:not(.pm-mobile-active) .priority-project-time {
    position: absolute;
    top: 9px;
    right: 8px;
    color: var(--sidebar-muted, var(--muted));
    font-size: 10px;
    transition: opacity .12s ease;
  }

  body:not(.pm-mobile-active) .priority-project-action {
    position: absolute;
    top: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0 !important;
    border-radius: 6px;
    background: transparent !important;
    color: var(--sidebar-muted, var(--muted));
    opacity: 0;
    pointer-events: none;
  }

  body:not(.pm-mobile-active) .priority-project-title .project-chat-new-btn { right: 31px; font-size: 16px; line-height: 1; }
  body:not(.pm-mobile-active) .priority-project-title .project-chat-pin-btn { right: 7px; }
  body:not(.pm-mobile-active) .priority-project-title:hover .priority-project-time,
  body:not(.pm-mobile-active) .priority-project-title:focus-within .priority-project-time { opacity: 0; }
  body:not(.pm-mobile-active) .priority-project-title:hover .priority-project-action,
  body:not(.pm-mobile-active) .priority-project-title:focus-within .priority-project-action {
    opacity: 1;
    pointer-events: auto;
  }

  body:not(.pm-mobile-active) .priority-project-action:hover,
  body:not(.pm-mobile-active) .priority-project-action.active {
    color: var(--pm-shell-gold-light, var(--brand));
    background: var(--sidebar-active-bg) !important;
  }

  body:not(.pm-mobile-active) .priority-project-children {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0 0 5px 12px;
    padding-left: 5px;
  }

  /* Desktop session/project surfaces are flat; hover color is the only row cue. */
  body:not(.pm-mobile-active) .sidebar :is(
    #jobs-list .job-item,
    #pinned-chats-list .job-item,
    #sidebar-projects-list .job-item,
    .project-card,
    .project-sidebar-group,
    .project-sidebar-row,
    .project-chat-group,
    .project-chat-row,
    .project-chat-children,
    .project-sessions-list,
    .priority-chat-card,
    .priority-project-title
  ) {
    border: 0 !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body:not(.pm-mobile-active) .sidebar :is(
    #jobs-list .job-item,
    #pinned-chats-list .job-item,
    #sidebar-projects-list .job-item,
    .project-card,
    .project-sidebar-row,
    .project-chat-row,
    .priority-chat-card,
    .priority-project-title
  ):is(:hover, :focus-visible, .active) {
    background: var(--sidebar-item-hover) !important;
  }

  /* Keep expandable project rows compact: the source marks are small sidebar
     glyphs, not cards. The title should follow them immediately. */
  body:not(.pm-mobile-active) #sidebar-projects-section .project-chat-row {
    min-height: 32px;
    padding: 6px 62px 6px 8px;
  }

  body:not(.pm-mobile-active) #sidebar-projects-section .project-chat-row .job-item-head,
  body:not(.pm-mobile-active) #sidebar-projects-section .project-chat-row .job-item-title-wrap {
    width: 100%;
    min-width: 0;
  }

  body:not(.pm-mobile-active) #sidebar-projects-section .project-chat-project-title {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 4px !important;
  }

  body:not(.pm-mobile-active) #sidebar-projects-section .project-chat-icon-line {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 2px !important;
    margin: 0 !important;
    vertical-align: middle;
  }

  body:not(.pm-mobile-active) #sidebar-projects-section .project-chat-folder,
  body:not(.pm-mobile-active) #sidebar-projects-section .project-chat-icon-line .imported-source-logo,
  body:not(.pm-mobile-active) #sidebar-projects-section .project-chat-icon-line .imported-source-logo-fallback {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
  }

  body:not(.pm-mobile-active) #sidebar-projects-section .project-chat-project-name {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 0 !important;
  }

  /* The imported child title used to inherit a full-width grid, which made
     the title look detached from its source logo. Keep the logo and title in
     one measured flex row instead. */
  body:not(.pm-mobile-active) #sidebar-projects-section .project-chat-children .project-chat-session-card {
    min-height: 34px;
    padding: 6px 62px 6px 8px;
  }

  body:not(.pm-mobile-active) #sidebar-projects-section .project-chat-children .project-chat-session-card .job-item-head,
  body:not(.pm-mobile-active) #sidebar-projects-section .project-chat-children .project-chat-session-card .job-item-title-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
  }

  body:not(.pm-mobile-active) #sidebar-projects-section .project-chat-children .project-chat-session-card .job-item-title-wrap {
    gap: 4px;
    padding-right: 0;
  }

  body:not(.pm-mobile-active) #sidebar-projects-section .project-chat-children .project-chat-session-card .imported-source-logo,
  body:not(.pm-mobile-active) #sidebar-projects-section .project-chat-children .project-chat-session-card .imported-source-logo-fallback {
    display: block;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
  }

  body:not(.pm-mobile-active) #sidebar-projects-section .project-chat-children .project-chat-session-card .job-item-title {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
  }

  body:not(.pm-mobile-active) .sidebar :is(
    #jobs-list .job-item.is-working::before,
    #jobs-list .job-item.unread::before,
    #pinned-chats-list .job-item.is-working::before,
    #pinned-chats-list .job-item.unread::before,
    #sidebar-projects-list .job-item.is-working::before,
    #sidebar-projects-list .job-item.unread::before
  ) {
    display: none !important;
  }

  body:not(.pm-mobile-active) .sidebar :is(.project-chat-children, .project-sessions-list, .project-sidebar-group .project-sessions-list) {
    border-left: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    background: transparent !important;
  }

  body:not(.pm-mobile-active) .sidebar .chat-session-item.is-editing .chat-settle-btn {
    right: 56px;
  }

  /* Pinned and expandable-project rows use smaller legacy action boxes, but
     their controls should share the same vertical center as normal chats. */
  body:not(.pm-mobile-active) .sidebar #pinned-chats-list .chat-session-action-btn {
    top: calc(50% + 2px);
    transform: translateY(-50%);
  }

  body:not(.pm-mobile-active) .sidebar #sidebar-projects-section .project-chat-new-btn,
  body:not(.pm-mobile-active) .sidebar #sidebar-projects-section .project-chat-pin-btn {
    top: 50%;
    transform: translateY(-50%);
  }

  /* The plus is text rather than an SVG, so remove its font leading and give
     it the same optical center as the adjacent star glyph. */
  body:not(.pm-mobile-active) .sidebar #sidebar-projects-section .project-chat-new-btn {
    line-height: 0;
    transform: translateY(calc(-50% + 1px));
  }
}

/* Prometheus One keeps the suggestion cards on their own graphite surface,
   but the chat canvas itself stays uniformly black. */
:root[data-skin="p1"] {
  --pm-chat-page-bg: #000;
}
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(main.main-shell, #chat-view, #chat-messages) {
  background: #000 !important;
  background-image: none !important;
}

/* Shared desktop chat/source context rail. Keep the active chat visible under
   the app chrome and give the Sources drawer the same compact rhythm. */
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) :is(.chat-context-header, .right-panel .source-panel-topbar) {
  box-sizing: border-box;
  height: 40px;
  min-height: 40px;
  flex: 0 0 40px;
  background: var(--pm-chat-page-bg, var(--bg)) !important;
  color: var(--text) !important;
  border: 0 !important;
  box-shadow: none !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .chat-context-header {
  display: flex;
  align-items: center;
  padding: 0 14px;
  overflow: hidden;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .chat-context-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-context-title {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: -.015em;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .chat-context-project {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .chat-context-project[hidden] {
  display: none !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .chat-context-project svg {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .chat-context-project-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .right-panel .source-panel-topbar {
  padding: 0 12px;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .right-panel .source-panel-heading {
  font-size: 12px;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) :is(.source-panel-icon-btn, .source-panel-close-btn) {
  width: 24px;
  height: 24px;
  border-radius: 7px;
}

/* The chat context rail replaces the browser-mode duplicate title in the
   app header; Electron already hides that title in its native chrome. */
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active).chat-mode-active .topbar .page-title {
  display: none;
}

/* Let the sidebar and app header read as one surface. The conversation gets
   the soft Codex-style corner while the left panel is open; when the panel is
   closed, the chat expands to the edge and stays square. */
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) :is(.sidebar, .topbar) {
  border-right-color: transparent !important;
  border-bottom-color: transparent !important;
  box-shadow: none !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) :is(.main-shell-wrap, .main-shell) {
  border-left: 0 !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar:not(.collapsed) ~ .workspace .main-shell-wrap {
  border-top-left-radius: 14px;
  overflow: hidden;
}

/* Final empty-chat polish: the selector is a back shelf for the composer,
   not a second foreground card. Inherit the actual rendered composer surface
   so skins cannot drift apart after a theme switch. */
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view .chat-input-area > .chat-new-context-dock {
  z-index: 0 !important;
  border: 0 !important;
  border-color: transparent !important;
  background: inherit !important;
  background-image: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view .chat-input-area > :is(.chat-input-row, .agent-toggle, .queued-prompts-panel, .chat-composer-attachment-stack, .chat-skill-trigger-pill) {
  z-index: 2 !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active).desktop-new-context-popover-open #chat-view .chat-input-area > .chat-new-context-dock {
  z-index: 20 !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view .chat-input-area .chat-new-context-popover {
  background: inherit !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: 0 18px 34px rgba(0, 0, 0, .24) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Brain cards are compact rounded surfaces again. They keep their separation
   through spacing and shadow rather than a visible outline. */
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) {
  --pm-brain-card-surface: var(--pm-brain-card-bg, var(--panel-2));
}

:root[data-skin="p1"] { --pm-brain-card-surface: #26251f; }
:root[data-skin="gray"] { --pm-brain-card-surface: #3a3a3a; }
:root[data-skin="dark"] { --pm-brain-card-surface: #333333; }
:root[data-skin="blue"] { --pm-brain-card-surface: #17335f; }
:root[data-skin="purple"] { --pm-brain-card-surface: #2a1650; }
:root[data-skin-kind="palette"] { --pm-brain-card-surface: var(--panel-2); }

@media (min-width: 901px) {
  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view:is(.chat-empty, :has(> #chat-messages > #chat-welcome)) .chat-welcome {
    width: min(780px, 100%) !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view:is(.chat-empty, :has(> #chat-messages > #chat-welcome)) .chat-pulse-cards {
    width: 100% !important;
    max-width: 780px !important;
    align-self: center;
    gap: 6px !important;
    margin-top: 9px !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view:is(.chat-empty, :has(> #chat-messages > #chat-welcome)) .chat-pulse-card,
  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view:is(.chat-empty, :has(> #chat-messages > #chat-welcome)) .chat-pulse-card:is(:hover, :focus-visible) {
    position: relative;
    min-height: 36px !important;
    box-sizing: border-box;
    justify-content: center !important;
    gap: 0 !important;
    padding: 6px 14px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--pm-brain-card-surface) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .035) !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view:is(.chat-empty, :has(> #chat-messages > #chat-welcome)) .chat-pulse-card-icon {
    position: absolute;
    left: 14px;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view:is(.chat-empty, :has(> #chat-messages > #chat-welcome)) .chat-pulse-card-body {
    flex: 0 1 auto;
    max-width: 100%;
    text-align: center;
    line-height: 1.22 !important;
  }
}

/* The minimized Sources peek belongs to the chat surface, not the titlebar. */
:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sources-minimized-panel {
  top: 50% !important;
  transform: translateX(calc(100% + 28px)) translateY(-50%) !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sources-minimized-panel.is-visible {
  transform: translateX(0) translateY(-50%) !important;
}

:root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sources-minimized-panel.is-closing {
  transform: translateX(calc(100% + 28px)) translateY(-50%) !important;
}

/* Keep the P1 empty canvas black all the way through the message surface. */
:root[data-skin="p1"] body:not(.pm-mobile-active) :is(.main-shell-wrap, main.main-shell, #chat-view, #chat-messages) {
  background: #000 !important;
  background-image: none !important;
}

/* Sidebar action alignment: ordinary chat rows are the canonical control
   geometry. Projects, pinned chats, and the priority rail use the same boxes,
   glyph sizes, right insets, and vertical centering. */
@media (min-width: 901px) {
  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(
    .chat-session-item:not(.project-chat-row) .chat-session-action-btn,
    #pinned-chats-list .chat-session-action-btn,
    .project-chat-row .project-chat-new-btn,
    .project-chat-row .project-chat-pin-btn,
    .project-sidebar-row .project-card-add-btn,
    .project-sidebar-row .project-card-pin-btn,
    .priority-project-title .project-chat-new-btn,
    .priority-project-title .project-chat-pin-btn
  ) {
    position: absolute !important;
    top: 50% !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    box-sizing: border-box;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: var(--sidebar-muted, var(--muted)) !important;
    line-height: 0 !important;
    transform: translateY(-50%) !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(
    .chat-session-item:not(.project-chat-row) .chat-session-action-btn svg,
    #pinned-chats-list .chat-session-action-btn svg,
    .project-chat-row .project-chat-pin-btn svg,
    .project-sidebar-row .project-card-pin-btn svg,
    .priority-project-title .project-chat-pin-btn svg
  ) {
    display: block;
    width: 13px !important;
    height: 13px !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(
    .chat-session-item:not(.project-chat-row) .chat-settle-btn,
    #pinned-chats-list .chat-settle-btn,
    .project-chat-row .project-chat-new-btn,
    .project-sidebar-row .project-card-add-btn,
    .priority-project-title .project-chat-new-btn
  ) {
    right: 34px !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(
    .chat-session-item:not(.project-chat-row) .chat-pin-btn,
    #pinned-chats-list .chat-pin-btn,
    .project-chat-row .project-chat-pin-btn,
    .project-sidebar-row .project-card-pin-btn,
    .priority-project-title .project-chat-pin-btn
  ) {
    right: 8px !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(
    .project-chat-new-btn,
    .project-card-add-btn
  ) {
    font: 600 14px/0 var(--t-font-ui) !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(
    .chat-session-item:not(.project-chat-row) .chat-session-action-btn:is(:hover, .active),
    #pinned-chats-list .chat-session-action-btn:is(:hover, .active),
    .project-chat-row :is(.project-chat-new-btn, .project-chat-pin-btn):is(:hover, .active),
    .project-sidebar-row :is(.project-card-add-btn, .project-card-pin-btn):is(:hover, .active),
    .priority-project-title :is(.project-chat-new-btn, .project-chat-pin-btn):is(:hover, .active)
  ) {
    background: color-mix(in srgb, var(--brand) 12%, transparent) !important;
    color: var(--brand) !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(
    #pinned-chats-list .job-item,
    #sidebar-projects-section .project-chat-row,
    #sidebar-projects-section .project-chat-children .project-chat-session-card,
    .project-sidebar-row
  ) {
    padding-right: 64px !important;
  }

  /* The priority chat card keeps its horizontal action group, but each
     control now uses the same 20px/13px treatment as the regular list. */
  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .priority-chat-actions {
    top: 8px !important;
    right: 6px !important;
    gap: 4px !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .priority-chat-actions .chat-session-action-btn {
    position: static !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    padding: 0 !important;
    transform: none !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .priority-chat-actions .chat-session-action-btn svg {
    display: block;
    width: 13px !important;
    height: 13px !important;
  }
}

/* Desktop chat state indicators. Keep unread/working sessions on their own
   transparent surface and restore the highlighted ring that the shared job
   row provides; only the outline changes, never the row fill. */
@media (min-width: 901px) {
  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(.chat-session-item.job-item, .project-chat-session-card) {
    isolation: isolate;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(.chat-session-item.job-item, .project-chat-session-card).is-working {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--pm-orange, var(--brand)) 22%, transparent),
      0 0 14px color-mix(in srgb, var(--pm-orange, var(--brand)) 30%, transparent) !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(.chat-session-item.job-item, .project-chat-session-card).unread:not(.is-working) {
    background: transparent !important;
    border-color: color-mix(in srgb, var(--brand) 62%, transparent) !important;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 20%, transparent) !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(.chat-session-item.job-item, .project-chat-session-card).is-working::before,
  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(.chat-session-item.job-item, .project-chat-session-card).unread:not(.is-working)::before {
    content: "" !important;
    display: block !important;
    position: absolute;
    inset: 0;
    padding: 1.5px;
    border-radius: inherit;
    z-index: 1;
    pointer-events: none;
    mask:
      linear-gradient(#000 0 0) content-box,
      linear-gradient(#000 0 0);
    mask-composite: exclude;
    -webkit-mask:
      linear-gradient(#000 0 0) content-box,
      linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(.chat-session-item.job-item, .project-chat-session-card).is-working::before {
    background: conic-gradient(
      from var(--pm-angle, 0deg),
      rgba(255,255,255,.30),
      color-mix(in srgb, var(--pm-orange, var(--brand)) 86%, transparent),
      rgba(255,255,255,.08),
      color-mix(in srgb, var(--pm-gold, var(--brand)) 64%, transparent),
      color-mix(in srgb, var(--pm-ember, var(--brand)) 72%, transparent),
      rgba(255,255,255,.26)
    );
    opacity: .95;
    animation: prometheus-liquid-spin 2.8s linear infinite;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar :is(.chat-session-item.job-item, .project-chat-session-card).unread:not(.is-working)::before {
    background: linear-gradient(135deg,
      color-mix(in srgb, var(--brand) 78%, transparent),
      color-mix(in srgb, var(--brand) 38%, transparent) 58%,
      color-mix(in srgb, var(--brand) 68%, transparent)
    );
    opacity: .92;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .session-unread-dot {
    display: inline-block;
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    margin: 0 7px 0 1px;
    border-radius: 50%;
    background: var(--brand) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent), 0 0 10px color-mix(in srgb, var(--brand) 44%, transparent);
  }

  /* Priority metadata carries the word label beside the message count, while
     regular rows use the compact left-side dot. */
  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .priority-chat-status {
    font-size: inherit;
    font-weight: 800;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .priority-chat-unread {
    color: var(--brand) !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .priority-chat-working {
    color: var(--pm-orange, var(--brand)) !important;
    text-transform: lowercase;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .priority-chat-card.is-working,
  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .priority-chat-card.unread:not(.is-working) {
    background: transparent !important;
    border-width: 1px !important;
    border-style: solid !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .priority-chat-card.is-working {
    border-color: transparent !important;
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--pm-orange, var(--brand)) 22%, transparent),
      0 0 14px color-mix(in srgb, var(--pm-orange, var(--brand)) 30%, transparent) !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .priority-chat-card.unread:not(.is-working) {
    border-color: color-mix(in srgb, var(--brand) 62%, transparent) !important;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 20%, transparent) !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .priority-chat-card.is-working::before,
  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .priority-chat-card.unread:not(.is-working)::before {
    content: "" !important;
    display: block !important;
    position: absolute;
    inset: 0;
    padding: 1.5px;
    border-radius: inherit;
    z-index: 1;
    pointer-events: none;
    mask:
      linear-gradient(#000 0 0) content-box,
      linear-gradient(#000 0 0);
    mask-composite: exclude;
    -webkit-mask:
      linear-gradient(#000 0 0) content-box,
      linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .priority-chat-card.is-working::before {
    background: conic-gradient(
      from var(--pm-angle, 0deg),
      rgba(255,255,255,.30),
      color-mix(in srgb, var(--pm-orange, var(--brand)) 86%, transparent),
      rgba(255,255,255,.08),
      color-mix(in srgb, var(--pm-gold, var(--brand)) 64%, transparent),
      color-mix(in srgb, var(--pm-ember, var(--brand)) 72%, transparent),
      rgba(255,255,255,.26)
    );
    opacity: .95;
    animation: prometheus-liquid-spin 2.8s linear infinite;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) .sidebar .priority-chat-card.unread:not(.is-working)::before {
    background: linear-gradient(135deg,
      color-mix(in srgb, var(--brand) 78%, transparent),
      color-mix(in srgb, var(--brand) 38%, transparent) 58%,
      color-mix(in srgb, var(--brand) 68%, transparent)
    );
    opacity: .92;
  }

  /* The selector dock remains a back shelf even while its menu is open. The
     menu keeps its own local stacking order without lifting the whole shelf
     over the composer. */
  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active).desktop-new-context-popover-open #chat-view .chat-input-area > .chat-new-context-dock {
    z-index: 0 !important;
  }

  /* Move only the empty-chat welcome group upward; the composer remains in
     its existing flow position. */
  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view:has(> #chat-messages > #chat-welcome) > #chat-messages > #chat-welcome {
    transform: translateY(clamp(-44px, -3.6vh, -14px)) !important;
  }

  /* Give the desktop composer the same breathing room as the reference UI,
     and keep the first line close to the upper-left rather than vertically
     centered in a short one-line box. */
  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view > .chat-input-area #chat-input {
    max-height: 300px !important;
    padding: 5px 2px 9px !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view > .chat-input-area .chat-composer-rich-preview {
    max-height: 300px !important;
    padding: 5px 2px 9px !important;
  }
}

/* Popover surfaces are intentionally borderless across desktop. Keep borders
   on their interactive rows and controls; this only removes the enclosing
   panel rim, including the project/desktop selector and model panels. */
body:not(.pm-mobile-active) :where(
  .chat-new-context-dock,
  .model-switcher-panel,
  .session-hover-preview,
  .session-hover-preview-options,
  [class$="-popover"],
  [class*="-popover "],
  [id$="-popover"],
  [id$="Popover"]
) {
  border-width: 0 !important;
  border-color: transparent !important;
}

/* Desktop empty-chat spacing and prompt-card sizing. Keep the quote and Brain
   rail visually above the composer, while leaving the composer in its normal
   flow position so its controls do not move. The cards stay compact but their
   copy is allowed to wrap instead of being clipped into a single line. */
@media (min-width: 901px) {
  body:not(.pm-mobile-active) #chat-view .chat-welcome:has(.chat-pulse-cards) > :is(p, .hint, .chat-pulse-cards) {
    position: relative;
    top: -28px;
  }

  body:not(.pm-mobile-active) #chat-view .chat-welcome:has(.chat-pulse-cards) .chat-pulse-cards {
    width: min(560px, calc(100% - 64px)) !important;
    max-width: 560px !important;
    gap: 5px !important;
    margin-top: 4px !important;
  }

  body:not(.pm-mobile-active) #chat-view .chat-welcome:has(.chat-pulse-cards) .chat-pulse-card,
  body:not(.pm-mobile-active) #chat-view .chat-welcome:has(.chat-pulse-cards) .chat-pulse-card:is(:hover, :focus-visible) {
    min-height: 30px !important;
    width: 100%;
    align-self: center;
    padding: 6px 42px !important;
    border-radius: 9px !important;
  }

  body:not(.pm-mobile-active) #chat-view .chat-welcome:has(.chat-pulse-cards) .chat-pulse-card-icon {
    left: 12px !important;
  }

  body:not(.pm-mobile-active) #chat-view .chat-welcome:has(.chat-pulse-cards) .chat-pulse-card-body {
    flex: 0 1 460px !important;
    width: min(460px, 100%) !important;
    max-width: 460px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
    line-height: 1.25 !important;
  }

  /* The selector is a back shelf. The foreground composer edge owns the
     overlap shadow so the shelf cannot visually sit on top of the composer. */
  body:not(.pm-mobile-active) #chat-view:has(> #chat-messages > #chat-welcome) > .chat-input-area {
    isolation: isolate;
  }

  /* Keep only a small tucked edge behind the composer. The earlier 34px
     overlap made the selector look like it was floating in front of the input. */
  body:not(.pm-mobile-active) #chat-view:has(> #chat-messages > #chat-welcome) > .chat-input-area > .chat-new-context-dock {
    bottom: calc(100% - 12px) !important;
    padding-bottom: 16px !important;
  }

  body:not(.pm-mobile-active).desktop-new-context-popover-open #chat-view:has(> #chat-messages > #chat-welcome) > .chat-input-area > .chat-new-context-dock {
    z-index: 0 !important;
  }

  /* The row wrappers use display: contents, so raise their real grid items
     explicitly. This keeps the composer controls and its edge in front of
     the recessed selector shelf while the shelf remains clickable above it. */
  body:not(.pm-mobile-active) #chat-view:has(> #chat-messages > #chat-welcome) > .chat-input-area > :is(.chat-input-row, .agent-toggle) > * {
    position: relative;
    z-index: 2 !important;
  }

  /* Do not paint a solid pseudo-element across the composer edge. The
     composer itself already owns the overlap shadow; a separate strip made
     the project selector look like a broken horizontal overlay. */
  body:not(.pm-mobile-active).desktop-new-context-popover-open #chat-view:has(> #chat-messages > #chat-welcome) > .chat-input-area::before {
    content: none !important;
    display: none !important;
  }

  /* Queue and project selection are intentionally just a shade darker than
     the composer so they read as the recessed layer in the same stack. */
  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"]) body:not(.pm-mobile-active) #chat-view .chat-input-area :is(.queued-prompts-panel, .chat-new-context-dock, .chat-new-context-popover) {
    background: color-mix(in srgb, var(--pm-pinned-chat-bg) 90%, #000 10%) !important;
    background-image: none !important;
  }
}

/* Keep all desktop project/model/reasoning popover shells borderless. Inner
   rows may still use separators or focus treatments where they are useful. */
body:not(.pm-mobile-active) :is(
  #chat-new-context-popover,
  #model-switcher-popover,
  [data-model-switcher-popover="1"],
  .model-switcher-panel,
  .model-switcher-detail,
  .subagent-reasoning-popover
) {
  border: 0 !important;
  border-color: transparent !important;
}

/* Final desktop empty-chat composition. The context selector is a sibling of
   the composer so it can genuinely sit beneath the composer's painted surface
   instead of competing inside the same background/stacking context. */
@media (min-width: 901px) {
  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"])
    body:not(.pm-mobile-active)
    #chat-view:has(> #chat-messages > #chat-welcome)
    > #chat-messages
    > #chat-welcome {
    transform: none !important;
    gap: 8px !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"])
    body:not(.pm-mobile-active)
    #chat-view:has(> #chat-messages > #chat-welcome)
    > #chat-messages
    > #chat-welcome:has(.chat-pulse-cards)
    > :is(p, .hint, .chat-pulse-cards) {
    position: static !important;
    top: auto !important;
    transform: none !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"])
    body:not(.pm-mobile-active)
    #chat-view:has(> #chat-messages > #chat-welcome)
    > #chat-messages
    > #chat-welcome
    > :is(h2, p, .hint) {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"])
    body:not(.pm-mobile-active)
    #chat-view:has(> #chat-messages > #chat-welcome)
    > #chat-messages
    > #chat-welcome
    > p {
    line-height: 1.35 !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"])
    body:not(.pm-mobile-active)
    #chat-view:has(> #chat-messages > #chat-welcome)
    > #chat-messages
    > #chat-welcome:has(.chat-pulse-cards)
    > .chat-pulse-cards {
    width: min(540px, calc(100% - 64px)) !important;
    max-width: 540px !important;
    gap: 6px !important;
    margin: 12px auto 22px !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"])
    body:not(.pm-mobile-active)
    #chat-view:has(> #chat-messages > #chat-welcome)
    > #chat-messages
    > #chat-welcome
    .chat-pulse-card {
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 7px 42px !important;
    border-radius: 9px !important;
  }

  :root:is([data-skin="p1"], [data-skin="gray"], [data-skin="dark"], [data-skin="blue"], [data-skin="purple"], [data-skin-kind="palette"])
    body:not(.pm-mobile-active)
    #chat-view:has(> #chat-messages > #chat-welcome)
    > #chat-messages
    > #chat-welcome
    .chat-pulse-card-body {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: 420px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    line-height: 1.25 !important;
  }

}

/* Quiet desktop sidebar controls. Keep the rail readable as a list: icons are
   glyphs rather than tiles, New chat only receives interaction feedback, and
   the labels/tabs use a tighter rhythm. This is scoped away from the mobile
   drawer, whose controls intentionally use different chrome. */
@media (min-width: 901px) {
  body:not(.pm-mobile-active) .sidebar-fixed {
    gap: 6px !important;
  }

  body:not(.pm-mobile-active) .sidebar-scroll {
    gap: 6px !important;
  }

  body:not(.pm-mobile-active) .sidebar .nav-group {
    gap: 0 !important;
  }

  body:not(.pm-mobile-active) .sidebar :is(.nav-item, .more-popover-item) {
    gap: 6px !important;
    padding: 5px 6px !important;
  }

  body:not(.pm-mobile-active) .sidebar .new-chat {
    gap: 6px !important;
    padding: 5px 6px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body:not(.pm-mobile-active) .sidebar .new-chat:is(:hover, :focus-visible) {
    border: 0 !important;
    background: var(--sidebar-item-hover) !important;
    box-shadow: none !important;
  }

  body:not(.pm-mobile-active) .sidebar .sidebar-header-btn[aria-expanded="true"] {
    background: transparent !important;
  }

  body:not(.pm-mobile-active) .sidebar .sidebar-header-btn[aria-expanded="true"]:is(:hover, :focus-visible) {
    background: var(--sidebar-item-hover) !important;
  }

  body:not(.pm-mobile-active) .sidebar :is(.nav-item, .more-popover-item, .new-chat) .nav-icon,
  body:not(.pm-mobile-active) .sidebar :is(.session-icon, .project-icon, .skill-icon-v2, .project-card-icon, .prom-bot-agent-avatar) {
    width: 18px !important;
    height: 18px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body:not(.pm-mobile-active) .sidebar :is(.nav-item, .more-popover-item, .new-chat) .nav-icon svg,
  body:not(.pm-mobile-active) .sidebar :is(.session-icon, .project-icon, .skill-icon-v2, .project-card-icon, .prom-bot-agent-avatar) svg {
    width: 15px !important;
    height: 15px !important;
  }

  body:not(.pm-mobile-active) .sidebar .new-chat .nav-icon svg {
    display: block !important;
  }

  body:not(.pm-mobile-active) .sidebar .new-chat .nav-icon::before {
    content: none !important;
    display: none !important;
  }

  body:not(.pm-mobile-active) .sidebar .seg-tabs {
    gap: 1px !important;
    padding: 1px !important;
  }

  body:not(.pm-mobile-active) .sidebar .seg-btn {
    padding: 3px 2px !important;
  }

  /* Prom Bot injects the roster search as a sibling of the list. Collapsing
     the section must hide both pieces, while the explicit hidden rule keeps
     the roster's flex declaration from winning the browser's semantics. */
  body:not(.pm-mobile-active) .sidebar #prom-bot-sidebar-section.is-collapsed > :not(.sidebar-section-toggle),
  body:not(.pm-mobile-active) .sidebar #prom-bot-subagents-list[hidden] {
    display: none !important;
  }

  body:not(.pm-mobile-active) .sidebar #prom-bot-sidebar-section .prom-bot-agent-row,
  body:not(.pm-mobile-active) .sidebar #prom-bot-sidebar-section .prom-bot-agent-row:is(:hover, :focus, .active, .unread, .is-working) {
    grid-template-columns: 18px minmax(0, 1fr) auto !important;
    gap: 6px !important;
    padding: 5px 4px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body:not(.pm-mobile-active) .sidebar #prom-bot-sidebar-section .prom-bot-agent-row::before {
    content: none !important;
    display: none !important;
    animation: none !important;
  }

  body:not(.pm-mobile-active) .sidebar #prom-bot-sidebar-section .prom-bot-agent-row:focus-visible {
    outline: 1px solid color-mix(in srgb, var(--pm-shell-gold, var(--brand)) 58%, transparent);
    outline-offset: -1px;
  }

  body:not(.pm-mobile-active) :is(#model-switcher-popover, [data-model-switcher-popover="1"]) .model-switcher-default { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
  body:not(.pm-mobile-active) :is(#model-switcher-popover, [data-model-switcher-popover="1"]) .model-switcher-default > small { color: var(--muted); font-size: 9px; font-weight: 550; line-height: 1.25; }
}

/* Keep the final P1 layout tokens later than the legacy width refinements in
   this file. The cascade must not widen the centered desktop track back to
   800px after the shared token is defined above. */
@media (min-width: 901px) {
  body:not(.pm-mobile-active):not(.side-chat-split-active) #chat-view {
    --chat-content-max-width: 720px !important;
    --chat-content-inline-gutter: clamp(56px, 7cqw, 88px) !important;
    --chat-column-width: min(var(--chat-content-max-width), calc(100% - var(--chat-content-inline-gutter) - var(--chat-content-inline-gutter))) !important;
  }

  body:not(.pm-mobile-active):not(.side-chat-split-active).right-canvas-open #chat-view {
    --chat-content-inline-gutter: clamp(48px, 6cqw, 72px) !important;
    --chat-column-width: min(var(--chat-content-max-width), calc(100% - var(--chat-content-inline-gutter) - var(--chat-content-inline-gutter) - var(--chat-surface-gutter) - var(--chat-surface-gutter))) !important;
  }

  body:not(.pm-mobile-active) :is(.live-turn-segment, .live-turn-tool-group, .tool-activity-entry, .live-turn-tool, .live-turn-think, .live-turn-preamble, .live-turn-result, .live-turn-error) {
    border-left-width: 0 !important;
    border-left-color: transparent !important;
  }
}

/* Palette presets (Ares, Kiln, Obsidian, ...): the composer's liquid-metal
   attach/send buttons follow the theme accent instead of the legacy ember
   gradient, so every preset only needs its registry palette. */
:root[data-skin-kind="palette"] .chat-input-area :is(.chat-attach-btn, .send-btn) {
  background: conic-gradient(
    from var(--pm-angle, 0deg),
    color-mix(in srgb, var(--t-accent) 62%, #000),
    var(--t-accent),
    color-mix(in srgb, var(--t-accent) 55%, #fff),
    color-mix(in srgb, var(--t-accent) 80%, #000),
    color-mix(in srgb, var(--t-accent) 62%, #000)
  );
  color: var(--t-text-on-accent);
  box-shadow: none;
}
:root[data-skin-kind="palette"] .chat-input-area .send-btn.voice-mode-btn {
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.38), transparent 34%),
    conic-gradient(
      from var(--pm-angle, 0deg),
      color-mix(in srgb, var(--t-accent) 62%, #000),
      var(--t-accent),
      color-mix(in srgb, var(--t-accent) 55%, #fff),
      color-mix(in srgb, var(--t-accent) 62%, #000)
    );
}
:root[data-skin-kind="palette"] .chat-input-area :is(.chat-attach-btn, .send-btn) :is(svg, iconify-icon) {
  color: var(--t-text-on-accent) !important;
}
/* Light presets: the white mic glyph disappears on bone/ivory/white composers. */
:root[data-skin-kind="palette"][data-tone="light"] .chat-input-area .chat-voice-btn:not(.recording):not(.voice-mode-active) {
  color: var(--t-muted);
}
