:root {
  color-scheme: dark;
  --bg-top: #26161a;
  --bg-mid: #111828;
  --bg-bottom: #06070b;
  --desktop-bg-top: var(--bg-top);
  --desktop-bg-mid: var(--bg-mid);
  --desktop-bg-bottom: var(--bg-bottom);
  --desktop-glow-a: rgba(255, 180, 97, 0.12);
  --desktop-glow-b: rgba(255, 126, 95, 0.18);
  --desktop-grid-opacity: 0.04;
  --desktop-gradient: linear-gradient(180deg, var(--desktop-bg-top) 0%, var(--desktop-bg-mid) 44%, var(--desktop-bg-bottom) 100%);
  --desktop-widget-bg: rgba(8, 10, 17, 0.86);
  --desktop-widget-bg-secondary: rgba(8, 10, 17, 0.8);
  --panel-bg: rgba(16, 20, 33, 0.78);
  --panel-border: rgba(255, 255, 255, 0.12);
  --text-main: #f3efe7;
  --text-soft: rgba(243, 239, 231, 0.72);
  --text-dim: rgba(243, 239, 231, 0.52);
  --accent: #f7a24c;
  --accent-strong: #ffcf73;
  --ok: #7ec58a;
  --error: #ff7f7f;
  --advance-shell-bg:
    linear-gradient(145deg, rgba(12, 16, 28, 0.96), rgba(26, 22, 58, 0.92)),
    radial-gradient(circle at 18% 8%, rgba(125, 85, 255, 0.42), transparent 36%);
  --advance-surface: rgba(10, 13, 28, 0.72);
  --advance-surface-strong: rgba(16, 18, 42, 0.86);
  --advance-surface-muted: rgba(125, 85, 255, 0.12);
  --advance-input-bg: rgba(10, 13, 28, 0.88);
  --advance-text: #fff;
  --advance-text-soft: rgba(255, 255, 255, 0.72);
  --advance-text-muted: rgba(255, 255, 255, 0.56);
  --advance-hero-bg: linear-gradient(135deg, rgba(125, 85, 255, 0.2), rgba(143, 85, 240, 0.14));
  --advance-border: rgba(217, 220, 255, 0.24);
  --advance-border-soft: rgba(255, 255, 255, 0.12);
  --advance-close-bg: rgba(18, 18, 44, 0.92);
  --advance-close-bg-hover: rgba(42, 32, 82, 0.96);
  --advance-accent: #7d55ff;
  --advance-accent-2: #8f55f0;
  --advance-accent-3: #6c42e7;
  --advance-link: #d9dcff;
  --advance-info: #d9dcff;
  --advance-success: #8df0b1;
  --advance-warning: #ffd98a;
  --advance-danger: #ffb3c2;
  --shadow: 0 24px 50px rgba(0, 0, 0, 0.38);
  --composer-shell-height: 54px;
  --composer-input-height: 38px;
  --plugin-center-button-size: var(--composer-shell-height);
  --plugin-center-icon-size: 32px;
  --plugin-center-composer-gap: 12px;
  --widget-min-width: 260px;
  --widget-min-height: 180px;
}

body[data-theme="light"] {
  color-scheme: light;
  --bg-top: #fbf1e4;
  --bg-mid: #f6efe5;
  --bg-bottom: #ece5dc;
  --desktop-glow-a: rgba(243, 182, 108, 0.18);
  --desktop-glow-b: rgba(226, 166, 122, 0.14);
  --desktop-grid-opacity: 0.028;
  --desktop-widget-bg: rgba(255, 251, 245, 0.86);
  --desktop-widget-bg-secondary: rgba(250, 244, 237, 0.88);
  --panel-bg: rgba(255, 250, 244, 0.8);
  --panel-border: rgba(110, 84, 61, 0.1);
  --text-main: #312419;
  --text-soft: rgba(49, 36, 25, 0.72);
  --text-dim: rgba(49, 36, 25, 0.5);
  --accent: #da8752;
  --accent-strong: #9c5630;
  --ok: #3b8c65;
  --error: #b85757;
  --advance-shell-bg:
    linear-gradient(145deg, #fbf9ff, #f3efff),
    radial-gradient(circle at 18% 8%, rgba(125, 85, 255, 0.16), transparent 38%);
  --advance-surface: rgba(255, 255, 255, 0.78);
  --advance-surface-strong: rgba(248, 246, 255, 0.9);
  --advance-surface-muted: rgba(125, 85, 255, 0.08);
  --advance-input-bg: rgba(255, 255, 255, 0.92);
  --advance-text: #1e1240;
  --advance-text-soft: #4d3c72;
  --advance-text-muted: #6d5a8d;
  --advance-hero-bg: linear-gradient(135deg, rgba(125, 85, 255, 0.15), rgba(255, 255, 255, 0.82));
  --advance-border: rgba(89, 62, 170, 0.16);
  --advance-border-soft: rgba(89, 62, 170, 0.14);
  --advance-close-bg: rgba(255, 255, 255, 0.92);
  --advance-close-bg-hover: rgba(248, 246, 255, 0.98);
  --advance-accent: #7d55ff;
  --advance-accent-2: #8f55f0;
  --advance-accent-3: #6c42e7;
  --advance-link: #5b3fd3;
  --advance-info: #5b3fd3;
  --advance-success: #1f8a5b;
  --advance-warning: #8a5a11;
  --advance-danger: #a94765;
  --shadow: 0 20px 42px rgba(98, 74, 52, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  overflow: hidden;
  font-family: "Bahnschrift", "Microsoft YaHei UI", "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top, var(--desktop-glow-a), transparent 30%),
    radial-gradient(circle at 20% 20%, var(--desktop-glow-b), transparent 20%),
    var(--desktop-gradient);
}

body.is-auth-locked .hud,
body.is-auth-locked .composer-toolbar,
body.is-auth-locked .plugin-center-btn,
body.is-auth-locked .supervisor-contract-admin-btn,
body.is-auth-locked .desktop-app-grid,
body.is-auth-locked .desktop-pager,
body.is-auth-locked .supervisor-dock,
body.is-auth-locked .assistant-chat-dock,
body.is-auth-locked .knowledge-base-dock,
body.is-auth-locked .social-dock-shell,
body.is-auth-locked .voice-entry-btn,
body.is-auth-locked .composer {
  opacity: 0;
  pointer-events: none;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.desktop {
  position: relative;
  min-height: 100vh;
  overflow: visible;
  isolation: isolate;
  background:
    radial-gradient(circle at top, var(--desktop-glow-a), transparent 30%),
    radial-gradient(circle at 20% 20%, var(--desktop-glow-b), transparent 20%),
    var(--desktop-gradient);
  transition:
    filter 720ms ease,
    transform 720ms ease,
    opacity 720ms ease;
}

.desktop.is-panning,
.desktop.is-panning * {
  cursor: grabbing !important;
}

.runtime-branch-badge {
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 72;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(280px, calc(100vw - 28px));
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-bg) 88%, transparent);
  color: var(--text-main);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
  pointer-events: none;
  user-select: none;
  backdrop-filter: blur(14px);
}

.runtime-branch-badge-label {
  flex: 0 0 auto;
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 700;
}

.runtime-branch-badge-name {
  min-width: 0;
  overflow: hidden;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-branch-badge[data-status="error"] .runtime-branch-badge-name {
  color: var(--error);
}

.desktop-image-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  pointer-events: none;
  transform: scale(1);
  transform-origin: center;
  will-change: opacity, filter, transform;
  transition:
    opacity 320ms ease,
    filter 320ms ease,
    transform 320ms ease;
}

.desktop-app-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(auto-fill, 106px);
  grid-auto-columns: 88px;
  align-content: start;
  justify-content: start;
  gap: 18px 14px;
  padding: 64px 232px 156px 24px;
  overflow: auto;
  pointer-events: none;
  contain: layout paint style;
}

.desktop-app-grid::-webkit-scrollbar {
  width: 10px;
}

.desktop-app-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.desktop-scene-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: visible;
  transform-origin: top left;
  pointer-events: none;
}

.desktop.is-workflow-focus-active .desktop-scene-layer {
  z-index: 91;
}

.desktop.is-workflow-focus-active .desktop-app-grid {
  z-index: 92;
}

.desktop.is-workflow-focus-entering .desktop-scene-layer {
  transition: transform 420ms cubic-bezier(0.22, 0.82, 0.28, 1);
  will-change: transform;
}

.desktop.is-workflow-focus-panning .desktop-scene-layer {
  transition: none;
}

.desktop-app-icon {
  position: relative;
  display: grid;
  gap: 8px;
  justify-items: center;
  width: 88px;
  padding: 6px 4px;
  border-radius: 18px;
  background: transparent;
  color: var(--text-main);
  text-align: center;
  isolation: isolate;
  transition:
    color 180ms ease;
  pointer-events: auto;
  contain: layout paint;
  content-visibility: auto;
  contain-intrinsic-size: 88px 106px;
}

.desktop-app-icon::before,
.desktop-app-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    filter 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.desktop-app-icon::before {
  display: none;
}

.desktop-app-icon::after {
  display: none;
}

.desktop-app-icon:hover {
  color: #fff8ef;
}

.desktop-app-icon:focus-visible {
  outline: 2px solid rgba(247, 162, 76, 0.4);
  outline-offset: 2px;
}

.desktop-app-icon-face {
  position: relative;
  width: 68px;
  height: 68px;
  overflow: hidden;
  isolation: isolate;
  border-radius: 18px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  box-shadow: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    filter 180ms ease;
}

.desktop-app-icon-face::before {
  display: none;
}

.desktop-app-icon-image {
  position: absolute;
  inset: 0;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  object-fit: contain;
  object-position: center;
  margin: 1px;
  padding: 0;
  box-sizing: border-box;
  border-radius: inherit;
  z-index: 1;
  opacity: 0;
  transition: opacity 180ms ease;
}

.desktop-app-icon[data-tone="official"] .desktop-app-icon-face {
  background: rgba(42, 33, 22, 0.34);
}

.desktop-app-icon[data-tone="market"] .desktop-app-icon-face {
  background: none;
}

.desktop-app-icon[data-tone="variant"] .desktop-app-icon-face {
  background: none;
}

.desktop-app-icon-glyph {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff3e3;
  position: relative;
  z-index: 3;
  transition: opacity 180ms ease;
}

.desktop-app-icon-face[data-has-image="true"] .desktop-app-icon-image {
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 1;
}

.desktop-app-icon-face[data-has-image="true"] {
  border: 0;
  background: none;
  box-shadow: none;
}

.desktop-app-icon-face[data-has-image="true"] .desktop-app-icon-glyph {
  opacity: 0;
}

.desktop-app-icon-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.94);
  background: #ff5353;
  box-shadow: 0 4px 10px rgba(255, 83, 83, 0.18);
}

.desktop-app-icon-label {
  width: 100%;
  color: rgba(245, 248, 252, 0.92);
  font-size: 0.74rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 180ms ease, opacity 180ms ease;
}

.workflow-desktop-entry-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  box-sizing: border-box;
  padding: 24px 232px 156px 24px;
  overflow: auto;
  pointer-events: none;
  contain: layout paint style;
}

.workflow-desktop-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 112px);
  grid-auto-rows: max-content;
  align-content: start;
  justify-content: start;
  gap: 20px 16px;
  min-height: 100%;
}

.workflow-desktop-icon {
  pointer-events: auto;
  width: 112px;
  align-self: start;
}

.workflow-desktop-icon .desktop-app-icon-label {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  overflow: visible;
}

.workflow-desktop-collection-icon .workflow-desktop-icon-meta {
  color: rgba(219, 228, 242, 0.68);
  font-size: 0.68rem;
  line-height: 1;
  margin-top: -2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-desktop-icon[data-tone="compound-workflow"] .desktop-app-icon-face {
  overflow: visible;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.28), transparent 40%),
    linear-gradient(145deg, #5a48ff 0%, #278df2 62%, #19d6e8 100%);
  color: #ffffff;
  box-shadow:
    0 12px 24px rgba(37, 99, 235, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.24) inset;
}

.workflow-desktop-icon[data-tone="compound-workflow"] .desktop-app-icon-face::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -4px;
  z-index: 4;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(15, 18, 29, 0.96);
  border-radius: 999px;
  background: #22c55e;
}

.workflow-desktop-icon .compound-flow-icon-svg {
  position: relative;
  z-index: 3;
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 7px 12px rgba(28, 100, 242, 0.24));
}

.workflow-desktop-icon.is-new .desktop-app-icon-face {
  animation: workflow-desktop-icon-pop 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes workflow-desktop-icon-pop {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.92);
  }
  64% {
    opacity: 1;
    transform: translateY(1px) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.desktop-app-icon:hover .desktop-app-icon-face,
.desktop-app-icon:focus-visible .desktop-app-icon-face {
  transform: translateY(-2px);
  box-shadow: none;
}

.desktop-app-icon:hover::before,
.desktop-app-icon:focus-visible::before {
  display: none;
}

.desktop-app-icon:hover::after,
.desktop-app-icon:focus-visible::after {
  display: none;
}

.desktop-app-icon:active .desktop-app-icon-face {
  transform: translateY(0);
}

.desktop-app-icon:hover .desktop-app-icon-label,
.desktop-app-icon:focus-visible .desktop-app-icon-label {
  color: rgba(255, 248, 236, 0.96);
}

.desktop-app-grid[data-view-mode="categories"] {
  grid-template-rows: repeat(auto-fill, 128px);
  grid-auto-columns: 96px;
}

.desktop-app-category-folder {
  gap: 6px;
  width: 96px;
  padding: 8px 4px 6px;
}

.desktop-app-category-folder-face {
  position: relative;
  width: 74px;
  height: 74px;
  padding: 9px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    rgba(12, 17, 28, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 10px 24px rgba(0, 0, 0, 0.1);
}

.desktop-app-category-folder-preview-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.desktop-app-category-folder-preview {
  position: relative;
  min-width: 0;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
}

.desktop-app-category-folder-preview.is-placeholder {
  background: rgba(255, 255, 255, 0.018);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.desktop-app-category-folder-preview-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

.desktop-app-category-folder-preview[data-has-image="true"] {
  background: transparent;
}

.desktop-app-category-folder-preview[data-has-image="true"] .desktop-app-category-folder-preview-glyph {
  opacity: 0;
}

.desktop-app-category-folder-preview-glyph {
  font-size: 0.66rem;
  font-weight: 800;
  color: rgba(255, 244, 230, 0.9);
  letter-spacing: 0.04em;
}

.desktop-app-category-folder-meta {
  width: 100%;
  color: rgba(223, 231, 243, 0.72);
  font-size: 0.62rem;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

.desktop-app-category-folder-count {
  position: absolute;
  right: -3px;
  bottom: -3px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 20, 30, 0.92);
  color: rgba(255, 248, 238, 0.94);
  font-size: 0.62rem;
  font-weight: 700;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 6px 16px rgba(0, 0, 0, 0.2);
}

.desktop-app-category-overlay {
  position: fixed;
  inset: 0;
  z-index: 120000;
  pointer-events: auto;
}

.desktop-app-category-overlay-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 12, 20, 0.16);
  backdrop-filter: blur(12px);
}

.desktop-app-category-overlay-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(584px, calc(100% - 80px));
  max-height: min(76vh, calc(100% - 80px));
  transform: translate(-50%, -50%);
  padding: 18px 18px 20px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(17, 23, 37, 0.62), rgba(10, 14, 24, 0.56)),
    rgba(10, 14, 24, 0.48);
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.desktop-app-category-overlay-card[data-scrollable="true"] {
  padding-bottom: 14px;
}

.desktop-app-category-overlay-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.desktop-app-category-overlay-copy {
  min-width: 0;
}

.desktop-app-category-overlay-title {
  margin: 0;
  color: rgba(248, 250, 255, 0.98);
  font-size: 1.08rem;
  font-weight: 800;
}

.desktop-app-category-overlay-meta {
  margin: 4px 0 0;
  color: rgba(214, 223, 236, 0.7);
  font-size: 0.78rem;
}

.desktop-app-category-overlay-close {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  color: rgba(248, 250, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.desktop-app-category-overlay-grid {
  --desktop-category-overlay-icon-width: 88px;
  --desktop-category-overlay-row-height: 112px;
  --desktop-category-overlay-gap-x: 14px;
  --desktop-category-overlay-gap-y: 18px;
  display: grid;
  grid-template-columns: repeat(5, var(--desktop-category-overlay-icon-width));
  grid-auto-rows: var(--desktop-category-overlay-row-height);
  justify-content: center;
  align-items: start;
  gap: var(--desktop-category-overlay-gap-y) var(--desktop-category-overlay-gap-x);
  max-height: calc(
    var(--desktop-category-overlay-row-height) * 3 + var(--desktop-category-overlay-gap-y) * 2 + 6px
  );
  padding: 4px 14px 2px 4px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: rgba(217, 220, 255, 0.58) rgba(255, 255, 255, 0.08);
}

.desktop-app-category-overlay-grid[data-scrollable="true"] {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.desktop-app-category-overlay-icon {
  width: var(--desktop-category-overlay-icon-width);
  min-height: var(--desktop-category-overlay-row-height);
  align-content: start;
}

.desktop-app-category-overlay-grid::-webkit-scrollbar {
  width: 12px;
}

.desktop-app-category-overlay-grid::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.desktop-app-category-overlay-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 3px solid rgba(10, 14, 24, 0.54);
  background: rgba(217, 220, 255, 0.7);
}

body[data-theme="light"] .desktop-app-category-folder-face {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(247, 249, 253, 0.42)),
    rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 14px 24px rgba(41, 68, 88, 0.08);
}

body[data-theme="light"] .desktop-app-category-folder-preview {
  background: rgba(36, 49, 63, 0.035);
}

body[data-theme="light"] .desktop-app-category-folder-preview.is-placeholder {
  background: rgba(36, 49, 63, 0.016);
}

body[data-theme="light"] .desktop-app-category-folder-preview-glyph {
  color: rgba(123, 70, 18, 0.84);
}

body[data-theme="light"] .desktop-app-category-folder-meta {
  color: rgba(55, 73, 88, 0.68);
}

body[data-theme="light"] .desktop-app-category-folder-count {
  background: rgba(255, 255, 255, 0.96);
  color: rgba(34, 48, 63, 0.9);
  box-shadow:
    0 0 0 1px rgba(33, 50, 68, 0.1),
    0 10px 20px rgba(70, 98, 121, 0.12);
}

body[data-theme="light"] .desktop-app-category-overlay-backdrop {
  background: rgba(230, 238, 246, 0.18);
}

body[data-theme="light"] .desktop-app-category-overlay-card {
  border-color: rgba(35, 52, 67, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(248, 250, 253, 0.58)),
    rgba(255, 255, 255, 0.5);
  box-shadow:
    0 22px 64px rgba(55, 80, 98, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

body[data-theme="light"] .desktop-app-category-overlay-title {
  color: rgba(18, 31, 44, 0.96);
}

body[data-theme="light"] .desktop-app-category-overlay-meta {
  color: rgba(58, 77, 93, 0.72);
}

body[data-theme="light"] .desktop-app-category-overlay-close {
  color: rgba(18, 31, 44, 0.88);
  background: rgba(35, 52, 67, 0.06);
  border-color: rgba(35, 52, 67, 0.1);
}

body[data-theme="light"] .desktop-app-category-overlay-grid {
  scrollbar-color: rgba(108, 91, 181, 0.55) rgba(108, 91, 181, 0.08);
}

body[data-theme="light"] .desktop-app-category-overlay-grid[data-scrollable="true"] {
  border-right-color: rgba(91, 109, 139, 0.14);
}

body[data-theme="light"] .desktop-app-category-overlay-grid::-webkit-scrollbar-track {
  background: rgba(108, 91, 181, 0.08);
}

body[data-theme="light"] .desktop-app-category-overlay-grid::-webkit-scrollbar-thumb {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(108, 91, 181, 0.54);
}

body[data-theme="light"] .desktop-app-grid::-webkit-scrollbar-thumb {
  background: rgba(27, 42, 54, 0.12);
}

body[data-theme="light"] .desktop-app-icon:hover {
  color: #12253d;
}

body[data-theme="light"] .desktop-app-icon::before {
  display: none;
}

body[data-theme="light"] .desktop-app-icon::after {
  display: none;
}

body[data-theme="light"] .desktop-app-icon-face {
  border: 0;
  background: none;
  box-shadow: none;
}

body[data-theme="light"] .desktop-app-icon[data-tone="official"] .desktop-app-icon-face {
  background: rgba(255, 250, 244, 0.42);
}

body[data-theme="light"] .desktop-app-icon[data-tone="market"] .desktop-app-icon-face {
  background: none;
}

body[data-theme="light"] .desktop-app-icon[data-tone="variant"] .desktop-app-icon-face {
  background: none;
}

body[data-theme="light"] .desktop-app-icon-glyph {
  color: #8a4f18;
}

body[data-theme="light"] .desktop-app-icon-label {
  color: #24374d;
}

body[data-theme="light"] .desktop-app-icon:hover .desktop-app-icon-face,
body[data-theme="light"] .desktop-app-icon:focus-visible .desktop-app-icon-face {
  box-shadow: none;
}

body[data-theme="light"] .desktop-app-icon:hover::before,
body[data-theme="light"] .desktop-app-icon:focus-visible::before {
  display: none;
}

body[data-theme="light"] .desktop-app-icon:hover::after,
body[data-theme="light"] .desktop-app-icon:focus-visible::after {
  display: none;
}

body[data-theme="light"] .desktop-app-icon:hover .desktop-app-icon-label,
body[data-theme="light"] .desktop-app-icon:focus-visible .desktop-app-icon-label {
  color: #142b45;
}

body[data-theme="light"] .desktop-app-icon-badge {
  border-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 10px rgba(255, 83, 83, 0.14);
}

.desktop:fullscreen {
  width: 100vw;
  height: 100vh;
}

.desktop:fullscreen::backdrop {
  background:
    radial-gradient(circle at top, var(--desktop-glow-a), transparent 30%),
    radial-gradient(circle at 20% 20%, var(--desktop-glow-b), transparent 20%),
    var(--desktop-gradient);
}

.hud {
  position: fixed;
  z-index: 60;
  padding: 24px;
  pointer-events: none;
}

.hud > * {
  pointer-events: auto;
}

.hud-left {
  left: 50%;
  top: auto;
  bottom: 140px;
  z-index: 61;
  padding: 0;
  transform: translateX(-50%);
}

.hud-right {
  right: 0;
  top: 0;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  position: relative;
}

.desktop-zoom-indicator {
  min-width: 78px;
  height: 40px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: color-mix(in srgb, var(--panel-bg) 88%, transparent);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.desktop-zoom-input {
  width: 40px;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: 0;
  text-align: center;
}

.desktop-zoom-input::-webkit-outer-spin-button,
.desktop-zoom-input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.desktop-zoom-input[type="number"] {
  appearance: textfield;
}

.desktop-zoom-input:focus {
  color: var(--accent-strong);
}

.desktop-zoom-unit {
  flex: 0 0 auto;
}

.hud-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.account-menu-shell {
  position: relative;
}

.account-menu-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
}

.account-menu-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 209, 138, 0.92), rgba(247, 162, 76, 0.92));
  color: #1d2430;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 85;
  width: min(340px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(24, 28, 38, 0.98), rgba(17, 20, 28, 0.96)),
    rgba(17, 20, 28, 0.96);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.account-menu-header {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.account-menu-level-hero {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.account-menu-level-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-menu-level-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.account-menu-level-badge span {
  color: var(--text-dim);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-menu-level-badge strong {
  font-size: 1.55rem;
  line-height: 1;
}

.account-vip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 220, 140, 0.3);
  background: linear-gradient(135deg, rgba(255, 204, 96, 0.22), rgba(255, 135, 61, 0.28));
  color: #ffe1a1;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: inset 0 0 0 1px rgba(255, 240, 208, 0.08);
}

.account-menu-level-progress {
  display: grid;
  gap: 6px;
}

.account-menu-level-progress-bar {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.account-menu-level-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 211, 117, 0.96), rgba(123, 194, 255, 0.96));
  transition: width 160ms ease;
}

.account-menu-level-progress small {
  color: var(--text-soft);
  font-size: 0.78rem;
}

.account-menu-level-meta {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.5;
}

.account-menu-eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.account-menu-title {
  margin: 0;
  font-size: 1.1rem;
}

.account-menu-section {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.account-menu-section:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.account-menu-section-title {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.account-menu-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.account-menu-field {
  display: grid;
  gap: 7px;
}

.account-menu-field span {
  color: var(--text-dim);
  font-size: 0.84rem;
}

.account-menu-value {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  word-break: break-word;
}

.account-menu-field input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font: inherit;
}

.account-menu-field input[readonly] {
  color: var(--text-soft);
}

.account-menu-inline {
  display: flex;
  gap: 10px;
  align-items: end;
}

.account-menu-field-grow {
  flex: 1;
}

.account-menu-stat {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.account-menu-stat span {
  color: var(--text-dim);
  font-size: 0.78rem;
}

.account-menu-stat strong {
  font-size: 1rem;
}

.account-menu-balance-card {
  display: grid;
  gap: 7px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.account-menu-balance-card span {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.account-menu-balance-card strong {
  font-size: 1.28rem;
}

.account-menu-inline-stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.account-menu-inline-stat .account-menu-balance-card {
  height: 100%;
}

.account-recharge-btn {
  min-width: 92px;
  padding: 0 18px;
  border-radius: 16px;
  align-self: stretch;
}

.account-menu-message {
  min-height: 22px;
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.account-menu-message.is-error {
  color: var(--error);
}

.account-menu-message.is-success {
  color: var(--ok);
}

.account-password-modal-card {
  width: min(420px, calc(100vw - 32px));
}

.account-password-modal-fields {
  display: grid;
  gap: 12px;
}

.account-password-modal-message {
  min-height: 22px;
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.account-password-modal-message.is-error {
  color: var(--error);
}

.account-password-modal-message.is-success {
  color: var(--ok);
}

.account-vip-modal-card {
  width: min(720px, calc(100vw - 32px));
}

.account-vip-modal-list {
  display: grid;
  gap: 10px;
  max-height: min(62vh, 640px);
  overflow-y: auto;
  padding-right: 4px;
}

.account-vip-tier {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.account-vip-tier.is-current {
  border-color: rgba(255, 220, 140, 0.34);
  background: linear-gradient(135deg, rgba(255, 204, 96, 0.14), rgba(255, 135, 61, 0.12));
}

.account-vip-tier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.account-vip-tier-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-vip-tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 218, 123, 0.16);
  color: #ffd680;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.account-vip-tier-name {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
}

.account-vip-tier-threshold {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.account-vip-tier-copy {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

body[data-theme="light"] .account-menu-panel {
  border-color: rgba(56, 79, 110, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 253, 0.96)),
    rgba(245, 248, 252, 0.96);
  box-shadow: 0 18px 40px rgba(43, 61, 86, 0.16);
}

body[data-theme="light"] .account-menu-avatar {
  color: #17304f;
}

body[data-theme="light"] .account-menu-level-hero,
body[data-theme="light"] .account-menu-section {
  border-top-color: rgba(56, 79, 110, 0.1);
}

body[data-theme="light"] .account-menu-level-hero,
body[data-theme="light"] .account-menu-balance-card,
body[data-theme="light"] .account-menu-stat,
body[data-theme="light"] .account-menu-value {
  background: rgba(245, 248, 252, 0.92);
  border-color: rgba(56, 79, 110, 0.08);
}

body[data-theme="light"] .account-vip-badge {
  border-color: rgba(217, 154, 51, 0.26);
  background: linear-gradient(135deg, rgba(255, 218, 142, 0.9), rgba(245, 171, 97, 0.92));
  color: #6d3a00;
}

body[data-theme="light"] .account-vip-modal-card,
body[data-theme="light"] .account-vip-tier {
  border-color: rgba(56, 79, 110, 0.12);
  background: rgba(245, 248, 252, 0.96);
}

body[data-theme="light"] .account-vip-tier.is-current {
  background: linear-gradient(135deg, rgba(255, 229, 176, 0.9), rgba(255, 241, 214, 0.92));
}

body[data-theme="light"] .account-vip-tier-badge {
  background: rgba(245, 171, 97, 0.14);
  color: #a35500;
}

body[data-theme="light"] .account-menu-field input {
  border-color: rgba(56, 79, 110, 0.14);
  background: rgba(255, 255, 255, 0.94);
  color: #1f2d3d;
}

body[data-theme="light"] .account-password-modal-card {
  border-color: rgba(56, 79, 110, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 253, 0.96)),
    rgba(245, 248, 252, 0.96);
  box-shadow: 0 18px 40px rgba(43, 61, 86, 0.16);
}

.minimized-dock {
  position: fixed;
  left: 24px;
  bottom: 88px;
  right: auto;
  top: auto;
  width: auto;
  max-width: min(560px, calc(100vw - 48px));
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
  z-index: 83;
}

.minimized-dock-header {
  display: none;
}

.minimized-dock-list {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  max-width: min(560px, calc(100vw - 48px));
  min-height: 48px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.minimized-dock-list::-webkit-scrollbar {
  display: none;
}

.minimized-dock-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  width: 50px;
  min-width: 50px;
  min-height: 50px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(10, 12, 20, 0.82);
  color: var(--text-main);
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.minimized-dock-item::before,
.minimized-dock-item::after {
  display: none;
}

.minimized-dock-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 207, 115, 0.14);
  border-color: rgba(247, 162, 76, 0.28);
  box-shadow: 0 14px 22px rgba(0, 0, 0, 0.18);
}

.minimized-dock-item:focus-visible {
  outline: 2px solid rgba(247, 162, 76, 0.35);
  outline-offset: 2px;
}

.minimized-dock-item.is-workflow {
  border-color: rgba(247, 162, 76, 0.22);
}

.minimized-dock-item[data-tooltip]:hover::before,
.minimized-dock-item[data-tooltip]:hover::after {
  opacity: 1;
}

.minimized-dock-item[data-tooltip]:hover::after,
.minimized-dock-item[data-tooltip]:focus-visible::after {
  opacity: 0.92;
}

.minimized-dock-item[data-tooltip]:hover::before,
.minimized-dock-item[data-tooltip]:focus-visible::before {
  opacity: 0.98;
}

.minimized-dock-item[data-tooltip]:hover,
.minimized-dock-item[data-tooltip]:focus-visible {
  overflow: visible;
}

.minimized-dock-item-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  right: auto;
  width: 180px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--panel-border) 64%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel-bg) 88%, transparent);
  color: var(--text-main);
  font-size: 0.76rem;
  line-height: 1.45;
  white-space: pre-line;
  opacity: 0;
  transform: translateX(-50%) translateY(6px) scale(0.96);
  pointer-events: none;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.minimized-dock-item:hover .minimized-dock-item-tooltip,
.minimized-dock-item:focus-visible .minimized-dock-item-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

body[data-theme="light"] .minimized-dock-item-tooltip {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(48, 84, 121, 0.16);
}

body[data-theme="light"] .minimized-dock-item {
  background: transparent;
  border-color: rgba(27, 42, 54, 0.1);
  box-shadow: none;
}

body[data-theme="light"] .minimized-dock-item.is-workflow {
  border-color: rgba(175, 120, 20, 0.18);
}

body[data-theme="light"] .minimized-dock-item:hover {
  background: rgba(210, 169, 88, 0.08);
  border-color: rgba(175, 120, 20, 0.24);
  box-shadow: none;
}

.minimized-dock-item-face {
  position: relative;
  width: 34px;
  height: 34px;
  isolation: isolate;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: visible;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 194, 129, 0.28), rgba(255, 142, 97, 0.16)),
    rgba(15, 18, 29, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.minimized-dock-item-face::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 247, 228, 0.92), rgba(255, 214, 136, 0.84), rgba(255, 250, 240, 0.62));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.92;
  z-index: 2;
}

.minimized-dock-item-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 16, 0.94);
  color: #f7f1e5;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 6px 14px rgba(0, 0, 0, 0.22);
  z-index: 2;
}

.minimized-dock-item-status-badge {
  position: absolute;
  top: -9px;
  right: -10px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255, 86, 86, 0.98), rgba(212, 34, 34, 0.96));
  color: #fff6f6;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 8px 18px rgba(131, 18, 18, 0.32);
  z-index: 3;
}

.minimized-dock-item-status-badge.is-dot {
  top: -6px;
  right: -6px;
  min-width: 12px;
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 86, 86, 0.98), rgba(212, 34, 34, 0.96));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 12px rgba(212, 34, 34, 0.28);
}


.minimized-dock-item.is-working .minimized-dock-item-face {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(255, 191, 92, 0.18),
    0 0 18px rgba(255, 170, 64, 0.18);
}

.minimized-dock-item-face[data-activity="running"],
.minimized-dock-item-face[data-activity="cancelling"] {
  animation: minimized-dock-working-pulse 1.8s ease-in-out infinite;
}

.minimized-dock-item-face[data-activity="cancelling"] .minimized-dock-item-status-badge {
  background: linear-gradient(180deg, rgba(255, 170, 86, 0.98), rgba(221, 108, 28, 0.96));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 8px 18px rgba(160, 86, 12, 0.28);
}

@keyframes minimized-dock-working-pulse {
  0%,
  100% {
    transform: scale(1);
    filter: saturate(1);
  }
  50% {
    transform: scale(1.04);
    filter: saturate(1.1);
  }
}

.minimized-dock-item-face[data-tone="official"] {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 208, 124, 0.32), rgba(255, 160, 88, 0.18)),
    rgba(15, 18, 29, 0.72);
}

.minimized-dock-item-face[data-tone="market"] {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(132, 206, 255, 0.3), rgba(88, 136, 255, 0.16)),
    rgba(15, 18, 29, 0.72);
}

.minimized-dock-item-face[data-tone="market"]::before {
  background: linear-gradient(135deg, rgba(233, 247, 255, 0.94), rgba(156, 223, 255, 0.86), rgba(242, 249, 255, 0.68));
}

.minimized-dock-item-face[data-tone="variant"] {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(184, 148, 255, 0.3), rgba(113, 100, 226, 0.16)),
    rgba(15, 18, 29, 0.72);
}

.minimized-dock-item-face[data-tone="variant"]::before {
  background: linear-gradient(135deg, rgba(245, 235, 255, 0.94), rgba(207, 184, 255, 0.86), rgba(251, 245, 255, 0.68));
}

.minimized-dock-item-face[data-tone="compound-workflow"] {
  overflow: visible;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.24), transparent 38%),
    linear-gradient(145deg, #5a48ff 0%, #278df2 62%, #19d6e8 100%);
  box-shadow:
    0 10px 22px rgba(37, 99, 235, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  color: #ffffff;
}

.minimized-dock-item-face[data-tone="compound-workflow"]::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(191, 242, 255, 0.8), rgba(255, 255, 255, 0.54));
}

.minimized-dock-item-face[data-tone="compound-workflow"]::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -4px;
  z-index: 4;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(15, 18, 29, 0.96);
  border-radius: 999px;
  background: #22c55e;
}

.minimized-dock-item-image {
  position: absolute;
  inset: 0;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  object-fit: contain;
  object-position: center;
  margin: 1px;
  padding: 0;
  box-sizing: border-box;
  border-radius: inherit;
  z-index: 1;
  opacity: 0;
  transition: opacity 180ms ease;
}

.minimized-dock-item-static-image {
  position: absolute;
  inset: 0;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  object-fit: contain;
  object-position: center;
  margin: 1px;
  padding: 0;
  box-sizing: border-box;
  border-radius: inherit;
  z-index: 1;
}

.minimized-dock-item-glyph {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff3e3;
  position: relative;
  z-index: 3;
  transition: opacity 180ms ease;
}

.minimized-dock-item-face[data-has-image="true"] .minimized-dock-item-image {
  opacity: 1;
}

.minimized-dock-item-face[data-has-image="true"] {
  background: transparent;
  box-shadow: none;
}

.minimized-dock-item.is-working .minimized-dock-item-face[data-has-image="true"] {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 176, 74, 0.16), rgba(255, 176, 74, 0) 72%);
  box-shadow:
    0 0 0 1px rgba(255, 194, 92, 0.28),
    0 0 18px rgba(255, 168, 52, 0.28),
    0 0 30px rgba(255, 120, 48, 0.18);
}

.minimized-dock-item-face[data-has-image="true"][data-activity="running"],
.minimized-dock-item-face[data-has-image="true"][data-activity="cancelling"] {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 176, 74, 0.16), rgba(255, 176, 74, 0) 72%);
}

.minimized-dock-item-face[data-has-image="true"] .minimized-dock-item-glyph {
  opacity: 0;
}

.minimized-dock-item-workflow-icon {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  color: #fff3e3;
  position: relative;
  z-index: 3;
}

.minimized-dock-item-compound-flow-icon {
  position: relative;
  z-index: 3;
  width: 28px;
  height: 28px;
}

.minimized-dock-item-face[data-activity="running"] .minimized-dock-item-static-image,
.minimized-dock-item-face[data-activity="cancelling"] .minimized-dock-item-static-image {
  filter:
    drop-shadow(0 0 8px rgba(255, 173, 58, 0.22))
    saturate(1.06);
}

body[data-theme="light"] .minimized-dock-item-face {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.58), transparent 44%),
    linear-gradient(180deg, rgba(255, 228, 191, 0.98), rgba(252, 244, 233, 0.94)),
    rgba(255, 255, 255, 0.94);
}

body[data-theme="light"] .minimized-dock-item-face[data-tone="market"] {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.58), transparent 44%),
    linear-gradient(180deg, rgba(204, 230, 255, 0.98), rgba(239, 246, 255, 0.94)),
    rgba(255, 255, 255, 0.94);
}

body[data-theme="light"] .minimized-dock-item-face[data-tone="variant"] {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.58), transparent 44%),
    linear-gradient(180deg, rgba(232, 216, 255, 0.98), rgba(246, 239, 255, 0.94)),
    rgba(255, 255, 255, 0.94);
}

body[data-theme="light"] .minimized-dock-item-face[data-tone="compound-workflow"] {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.24), transparent 38%),
    linear-gradient(145deg, #5a48ff 0%, #278df2 62%, #19d6e8 100%);
  box-shadow:
    0 10px 22px rgba(37, 99, 235, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  color: #ffffff;
}

body[data-theme="light"] .minimized-dock-item-glyph,
body[data-theme="light"] .minimized-dock-item-workflow-icon {
  color: #8a4f18;
}

body[data-theme="light"] .minimized-dock-item-badge {
  background: rgba(20, 26, 36, 0.92);
  color: #fff9f0;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.36),
    0 6px 14px rgba(61, 85, 104, 0.18);
}

body[data-theme="light"] .minimized-dock-item-status-badge {
  box-shadow:
    0 0 0 1px rgba(27, 42, 54, 0.1),
    0 8px 18px rgba(131, 18, 18, 0.18);
}


.composer-toolbar,
.composer,
.voice-entry-btn,
.plugin-center-btn {
  display: none !important;
}

.supervisor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 81;
  display: block;
  border: 0;
  background:
    radial-gradient(circle at 50% 86%, rgba(104, 66, 255, 0.18), transparent 36%),
    rgba(6, 8, 14, 0.46);
  backdrop-filter: blur(12px) saturate(1.06);
  -webkit-backdrop-filter: blur(12px) saturate(1.06);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.supervisor-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.supervisor-backdrop[hidden] {
  display: none;
}

.supervisor-dock {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 82;
  pointer-events: none;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 12px;
  --supervisor-ring-anchor-x: 0px;
}

.supervisor-button {
  position: relative;
  display: block;
  width: 122px;
  min-width: 122px;
  min-height: 122px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  pointer-events: auto;
  border-radius: 34px;
  overflow: visible;
  transition:
    height 260ms cubic-bezier(0.22, 0.82, 0.28, 1),
    width 260ms cubic-bezier(0.22, 0.82, 0.28, 1),
    min-height 260ms cubic-bezier(0.22, 0.82, 0.28, 1),
    border-radius 260ms cubic-bezier(0.22, 0.82, 0.28, 1),
    background 220ms ease,
    box-shadow 220ms ease;
}

.supervisor-composer {
  position: relative;
  width: min(620px, calc(100vw - 32px));
  min-height: 178px;
  padding: 24px 58px 62px 28px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(244, 240, 255, 0.88)),
    radial-gradient(circle at 82% 24%, rgba(135, 88, 255, 0.18), transparent 42%);
  box-shadow:
    0 26px 72px rgba(15, 10, 32, 0.28),
    0 0 0 1px rgba(91, 61, 196, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  transform-origin: 50% 100%;
  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(0.22, 0.82, 0.28, 1);
}

.supervisor-dock.is-composer-open .supervisor-composer {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.supervisor-composer-input {
  width: 100%;
  min-height: 104px;
  resize: none;
  border: 0;
  outline: none;
  background: transparent;
  color: #4b24c8;
  font: inherit;
  font-size: 21px;
  line-height: 1.46;
  font-weight: 500;
}

.supervisor-composer-input::placeholder {
  color: rgba(75, 36, 200, 0.44);
}

.supervisor-dock > .supervisor-prompt-spotlight {
  width: min(420px, calc(100vw - 48px));
  margin: 0;
  padding: 8px;
  border-color: rgba(91, 61, 196, 0.12);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(244, 240, 255, 0.82));
  box-shadow:
    0 14px 36px rgba(15, 10, 32, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  pointer-events: auto;
}

.supervisor-dock > .supervisor-prompt-spotlight .supervisor-prompt-spotlight-heading {
  color: rgba(75, 36, 200, 0.58);
}

.supervisor-dock > .supervisor-prompt-spotlight .supervisor-prompt-spotlight-item {
  border-color: rgba(91, 61, 196, 0.12);
  background: rgba(255, 255, 255, 0.58);
  color: #4b24c8;
}

.supervisor-dock > .supervisor-prompt-spotlight .supervisor-prompt-spotlight-item:hover,
.supervisor-dock > .supervisor-prompt-spotlight .supervisor-prompt-spotlight-item:focus-visible {
  border-color: rgba(91, 61, 196, 0.22);
  background: rgba(255, 255, 255, 0.84);
}

.supervisor-dock > .supervisor-prompt-spotlight .supervisor-prompt-spotlight-icon {
  background: rgba(91, 61, 196, 0.1);
  color: #4b24c8;
}

.supervisor-dock > .supervisor-prompt-spotlight .supervisor-prompt-spotlight-title {
  color: #4b24c8;
}

.supervisor-dock > .supervisor-semantic-action {
  width: min(520px, calc(100vw - 48px));
}

.supervisor-composer-actions {
  position: absolute;
  left: 24px;
  right: 58px;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.supervisor-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(91, 61, 196, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

.supervisor-advance-switch {
  border-color: rgba(17, 114, 89, 0.16);
}

.supervisor-advance-switch .supervisor-mode-button {
  color: rgba(20, 99, 83, 0.72);
}

.supervisor-advance-switch .supervisor-mode-button.is-active {
  background: linear-gradient(135deg, rgba(18, 121, 96, 0.94), rgba(45, 143, 180, 0.88));
  color: #fff;
  box-shadow: 0 8px 18px rgba(18, 121, 96, 0.16);
}

.supervisor-mode-button {
  min-height: 28px;
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(75, 36, 200, 0.62);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.supervisor-mode-button.is-active {
  background: linear-gradient(135deg, rgba(75, 36, 200, 0.92), rgba(90, 116, 255, 0.88));
  color: #fff;
  box-shadow: 0 8px 18px rgba(75, 36, 200, 0.18);
}

.supervisor-send-button {
  position: absolute;
  right: 58px;
  bottom: 62px;
  min-width: 68px;
  min-height: 36px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(75, 36, 200, 0.94), rgba(90, 116, 255, 0.9));
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(75, 36, 200, 0.22);
}

.supervisor-send-button[hidden] {
  display: none;
}

.supervisor-history-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(91, 61, 196, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  color: rgba(75, 36, 200, 0.78);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.supervisor-history-button:hover,
.supervisor-history-button:focus-visible,
.supervisor-history-button[aria-expanded="true"] {
  border-color: rgba(91, 61, 196, 0.28);
  background: rgba(255, 255, 255, 0.78);
  color: #4b24c8;
  outline: none;
  transform: translateY(-1px);
}

.supervisor-history-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.supervisor-prompt-history-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 12;
  width: min(300px, calc(100vw - 72px));
  max-height: 244px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(91, 61, 196, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 245, 255, 0.94));
  box-shadow:
    0 18px 42px rgba(28, 20, 70, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.supervisor-prompt-history-popover[hidden] {
  display: none;
}

.supervisor-prompt-history-title {
  padding: 2px 4px 8px;
  color: rgba(38, 28, 76, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.supervisor-prompt-history-list {
  display: grid;
  gap: 6px;
  max-height: 190px;
  overflow-y: auto;
  padding-right: 2px;
}

.supervisor-prompt-history-item {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(91, 61, 196, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
  color: rgba(38, 28, 76, 0.86);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.supervisor-prompt-history-item:hover,
.supervisor-prompt-history-item:focus-visible {
  border-color: rgba(91, 61, 196, 0.26);
  background: rgba(255, 255, 255, 0.92);
  color: #4b24c8;
  outline: none;
}

.supervisor-prompt-history-item span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.supervisor-prompt-history-empty {
  padding: 12px 8px 10px;
  color: rgba(75, 36, 200, 0.48);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.supervisor-guided-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  margin: 0 0 14px;
}

.supervisor-guided-panel[hidden] {
  display: none;
}

.supervisor-dock.is-guided-mode .supervisor-composer {
  width: min(720px, calc(100vw - 32px));
  min-height: 600px;
  padding: 18px 24px 116px;
  overflow: hidden;
  z-index: 4;
}

.supervisor-dock.is-guided-mode .supervisor-composer-input {
  position: absolute;
  left: 24px;
  right: 116px;
  bottom: 58px;
  width: auto;
  min-height: 54px;
  max-height: 92px;
  padding: 10px 0;
  font-size: 15px;
  line-height: 1.45;
}

.supervisor-dock.is-guided-mode .supervisor-send-button {
  right: 24px;
  bottom: 68px;
  z-index: 6;
}

.supervisor-dock.is-guided-mode.is-composer-open .supervisor-button {
  width: 92px;
  height: 72px;
  min-height: 72px;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.supervisor-dock.is-guided-mode.is-composer-open .supervisor-ring-shell {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.58);
}

.supervisor-dock.is-guided-mode.is-composer-open {
  --supervisor-ring-anchor-x: 0px;
}

.supervisor-dock.is-guided-mode.is-composer-open .supervisor-button:hover .supervisor-ring-shell,
.supervisor-dock.is-guided-mode.is-composer-open .supervisor-button:focus-visible .supervisor-ring-shell {
  transform: translate(-50%, -50%) scale(0.58);
}

.supervisor-dock.is-guided-mode .supervisor-generate-label {
  display: none;
}

.supervisor-dock.is-guided-mode .supervisor-guided-panel:not([hidden]) {
  height: 430px;
  max-height: 430px;
  overflow: hidden;
}

.supervisor-guided-flow {
  flex: 0 0 auto;
  padding: 12px;
  border: 1px solid rgba(91, 61, 196, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(239, 242, 255, 0.58)),
    radial-gradient(circle at 92% 8%, rgba(90, 116, 255, 0.16), transparent 36%);
  box-shadow: 0 14px 32px rgba(40, 28, 80, 0.1);
}

.supervisor-guided-flow-title {
  color: rgba(38, 28, 76, 0.82);
  font-size: 13px;
  font-weight: 950;
}

.supervisor-guided-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.supervisor-guided-step {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 170px;
  padding: 7px 9px;
  border: 1px solid rgba(91, 61, 196, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: rgba(50, 34, 118, 0.64);
}

.supervisor-guided-step span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(75, 36, 200, 0.1);
  color: rgba(75, 36, 200, 0.76);
  font-size: 11px;
  font-weight: 950;
}

.supervisor-guided-step strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supervisor-guided-step.is-current {
  border-color: rgba(90, 116, 255, 0.34);
  color: rgba(38, 28, 76, 0.88);
  box-shadow: 0 0 0 3px rgba(90, 116, 255, 0.1);
}

.supervisor-guided-step.is-confirmed {
  background: linear-gradient(135deg, rgba(75, 36, 200, 0.9), rgba(90, 116, 255, 0.84));
  color: #fff;
}

.supervisor-guided-step.is-confirmed span {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.supervisor-guided-step-edge {
  flex: 0 0 18px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(75, 36, 200, 0.28), rgba(90, 116, 255, 0.18));
}

.supervisor-guided-messages {
  display: grid;
  flex: 1 1 auto;
  gap: 11px;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 2px 6px 2px 0;
}

.supervisor-guided-message {
  display: flex;
  justify-content: flex-start;
}

.supervisor-guided-message.is-user {
  justify-content: flex-end;
}

.supervisor-guided-bubble {
  max-width: 86%;
  padding: 10px 12px;
  border: 1px solid rgba(91, 61, 196, 0.12);
  border-radius: 16px 16px 16px 6px;
  background: rgba(255, 255, 255, 0.64);
  color: rgba(38, 28, 76, 0.82);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.55;
  white-space: pre-wrap;
}

.supervisor-guided-message.is-user .supervisor-guided-bubble {
  border-radius: 16px 16px 6px 16px;
  background: linear-gradient(135deg, rgba(75, 36, 200, 0.92), rgba(90, 116, 255, 0.86));
  color: #fff;
}

.supervisor-guided-candidates {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-height: 168px;
  overflow-y: auto;
}

.supervisor-guided-candidate {
  min-height: 72px;
  padding: 10px;
  border: 1px solid rgba(91, 61, 196, 0.14);
  border-radius: 15px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.78), rgba(239, 242, 255, 0.62)),
    radial-gradient(circle at 88% 10%, rgba(90, 116, 255, 0.14), transparent 34%);
  color: rgba(40, 28, 80, 0.88);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.supervisor-guided-candidate span,
.supervisor-guided-candidate small {
  display: block;
}

.supervisor-guided-candidate span {
  font-size: 12px;
  font-weight: 950;
}

.supervisor-guided-candidate small {
  margin-top: 6px;
  color: rgba(50, 34, 118, 0.58);
  font-size: 11px;
  font-weight: 740;
  line-height: 1.35;
}

.supervisor-guided-candidate.is-create {
  background: linear-gradient(135deg, rgba(75, 36, 200, 0.9), rgba(90, 116, 255, 0.86));
  color: #fff;
}

.supervisor-guided-candidate.is-create small {
  color: rgba(255, 255, 255, 0.76);
}

.supervisor-guided-inline-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.supervisor-guided-inline-actions button {
  flex: 1 1 150px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(75, 36, 200, 0.94), rgba(90, 116, 255, 0.9));
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.supervisor-composer-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(32, 28, 42, 0.06);
  color: rgba(30, 28, 38, 0.72);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.supervisor-composer-close:hover,
.supervisor-composer-close:focus-visible {
  background: rgba(32, 28, 42, 0.11);
  color: rgba(16, 15, 22, 0.92);
  outline: none;
}

.supervisor-generate-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 64px;
  color: #ffffff;
  font-size: 30px;
  font-weight: 760;
  line-height: 1;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.22, 0.82, 0.28, 1);
}

.supervisor-dock.is-composer-open .supervisor-button {
  width: min(620px, calc(100vw - 32px));
  height: 78px;
  min-height: 78px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, #7d55ff 0%, #8f55f0 48%, #6c42e7 100%);
  box-shadow:
    0 20px 54px rgba(81, 42, 189, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.supervisor-dock.is-generate-exiting .supervisor-button,
.supervisor-dock.is-generating .supervisor-button {
  background: transparent;
  box-shadow: none;
}

.supervisor-dock.is-generate-exiting .supervisor-button {
  transform: scaleX(0.34) scaleY(0.82);
  opacity: 0.18;
}

.supervisor-dock.is-generating .supervisor-button {
  pointer-events: none;
}

.supervisor-dock.is-composer-open .supervisor-ring-shell {
  position: absolute;
  left: calc(50% - 80px);
  top: 57%;
  opacity: 1;
  transform: translate(-50%, -50%) scale(0.72);
  filter:
    drop-shadow(0 6px 10px rgba(255, 255, 255, 0.18))
    drop-shadow(0 12px 20px rgba(36, 20, 82, 0.2));
}

.supervisor-dock.is-composer-open {
  --supervisor-ring-anchor-x: -80px;
}

.supervisor-dock.is-composer-open .supervisor-button:hover .supervisor-ring-shell,
.supervisor-dock.is-composer-open .supervisor-button:focus-visible .supervisor-ring-shell {
  animation: none;
  transform: translate(-50%, -50%) scale(0.72);
}

.supervisor-dock.is-composer-open .supervisor-generate-label {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.supervisor-dock.is-generate-exiting .supervisor-generate-label,
.supervisor-dock.is-generating .supervisor-generate-label {
  opacity: 0;
  transform: translateY(-6px) scale(0.9);
}

.supervisor-dock.is-generate-exiting .supervisor-ring-shell,
.supervisor-dock.is-generating .supervisor-ring-shell {
  opacity: 1;
  transform: translate(-50%, -50%) scale(0.72);
}

.supervisor-dock.is-composer-open .supervisor-state-pill {
  display: none;
}

.supervisor-progress-panel {
  position: absolute;
  left: calc(50% + var(--supervisor-ring-anchor-x, 0px));
  bottom: calc(100% + 16px);
  width: min(280px, calc(100vw - 32px));
  padding: 14px 15px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(12, 16, 28, 0.9), rgba(26, 22, 58, 0.86)),
    radial-gradient(circle at 16% 18%, rgba(114, 93, 255, 0.42), transparent 38%);
  box-shadow:
    0 18px 48px rgba(20, 15, 58, 0.34),
    0 0 0 1px rgba(132, 106, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #ffffff;
  pointer-events: auto;
  opacity: 0;
  transform: translate(-50%, 14px) scale(0.88);
  transform-origin: 50% 100%;
  transition:
    opacity 180ms ease,
    transform 260ms cubic-bezier(0.2, 0.9, 0.22, 1.18);
  overflow: visible;
}

.supervisor-progress-panel::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 16px;
  height: 16px;
  background: rgba(15, 17, 35, 0.94);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateX(-50%) rotate(45deg);
}

.supervisor-progress-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      110deg,
      transparent 0%,
      transparent 36%,
      rgba(255, 255, 255, 0.12) 50%,
      transparent 64%,
      transparent 100%
    );
  background-size: 220% 100%;
  background-position: 140% 0;
  opacity: 0.68;
  animation: supervisorProgressSweep 2.8s ease-in-out infinite;
  pointer-events: none;
  border-radius: inherit;
  will-change: background-position;
}

.supervisor-dock.is-progressing .supervisor-progress-panel:not([hidden]) {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.supervisor-dock.is-progressing .supervisor-state-pill {
  display: none;
}

.supervisor-progress-heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  z-index: 1;
}

.supervisor-progress-bubble {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  color: #ffffff;
  gap: 8px;
  font-size: 15px;
  font-weight: 780;
  letter-spacing: 0.01em;
  white-space: nowrap;
  z-index: 2;
}

.supervisor-progress-bubble::before {
  content: "";
  width: 11px;
  height: 11px;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: supervisorProgressSpinner 820ms linear infinite;
}

.supervisor-progress-bubble::after {
  content: none;
}

.supervisor-progress-percent {
  font-size: 15px;
  font-weight: 760;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
}

.supervisor-progress-cancel {
  min-width: 48px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.supervisor-progress-cancel:hover,
.supervisor-progress-cancel:focus-visible {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.supervisor-progress-cancel:disabled {
  cursor: default;
  opacity: 0.58;
}

.supervisor-progress-message {
  position: relative;
  z-index: 1;
  min-height: 28px;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  line-height: 1.35;
}

.supervisor-progress-track {
  position: relative;
  z-index: 1;
  height: 10px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(6, 9, 22, 0.62);
  box-shadow:
    inset 0 1px 4px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.supervisor-progress-bar {
  display: block;
  width: var(--supervisor-progress, 8%);
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #ffffff 0%, #d9dcff 42%, #8a73ff 100%);
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.84),
    0 0 34px rgba(117, 90, 255, 0.72);
  transition: width 360ms cubic-bezier(0.22, 0.82, 0.28, 1);
}

.supervisor-state-pill {
  position: absolute;
  left: calc(100% - 18px);
  top: calc(50% + 2px);
  min-width: 88px;
  max-width: 168px;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--panel-border) 54%, transparent);
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--panel-bg) 86%, rgba(255, 255, 255, 0.2)),
      color-mix(in srgb, var(--panel-bg) 68%, transparent)
    );
  box-shadow:
    0 12px 24px rgba(7, 12, 20, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transform: translate(10px, -50%) scale(0.96);
  transform-origin: 0 50%;
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.22, 0.82, 0.28, 1);
}

.supervisor-state-pill-track {
  display: inline-block;
  min-width: 0;
  padding-right: 0;
  will-change: transform;
}

.supervisor-state-pill.is-marquee {
  text-align: left;
}

.supervisor-state-pill.is-marquee .supervisor-state-pill-track {
  padding-right: 22px;
  animation: supervisorStatePillMarquee var(--supervisor-pill-scroll-duration, 8s)
    linear infinite alternate;
}

.supervisor-state-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      115deg,
      transparent 12%,
      rgba(255, 255, 255, 0.04) 34%,
      rgba(255, 255, 255, 0.34) 50%,
      rgba(255, 255, 255, 0.08) 66%,
      transparent 86%
    );
  transform: translateX(-150%);
  opacity: 0;
  pointer-events: none;
}

.supervisor-state-pill::after {
  content: "...";
  display: inline-block;
  width: 0;
  overflow: hidden;
  vertical-align: baseline;
  animation: supervisorThinkingDots 1.25s steps(4, end) infinite;
}

.supervisor-state-pill.is-marquee::after {
  content: "";
  animation: none;
}

.supervisor-state-pill[hidden] {
  display: block;
  visibility: hidden;
  pointer-events: none;
}

.supervisor-dock[data-state="thinking"] .supervisor-state-pill:not([hidden]) {
  opacity: 1;
  transform: translate(0, -50%) scale(1);
}

.supervisor-dock[data-state="thinking"] .supervisor-state-pill:not([hidden])::before {
  opacity: 1;
  animation: supervisorStatePillShimmer 1.9s linear infinite;
}

.supervisor-ring-shell {
  position: relative;
  width: 122px;
  aspect-ratio: 1;
  display: block;
  transform: translateY(12px);
  transform-origin: 50% 50%;
  filter:
    drop-shadow(0 16px 24px rgba(13, 19, 30, 0.14))
    drop-shadow(0 34px 52px rgba(0, 0, 0, 0.24));
  isolation: isolate;
  will-change: transform, filter;
}

.supervisor-ring-shell::before {
  content: "";
  position: absolute;
  inset: 14% 10% 6%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 48% 46%, color-mix(in srgb, var(--accent-strong) 34%, transparent) 0%, transparent 56%),
    conic-gradient(
      from 210deg,
      transparent 0deg,
      color-mix(in srgb, var(--accent-strong) 32%, transparent) 68deg,
      transparent 150deg,
      color-mix(in srgb, var(--accent-soft) 22%, transparent) 228deg,
      transparent 360deg
    ),
    radial-gradient(circle at 50% 88%, rgba(255, 255, 255, 0.18), transparent 44%);
  opacity: 0.88;
  filter: blur(22px);
  transform-origin: 50% 50%;
  pointer-events: none;
}

.supervisor-ring-shell::after {
  content: "";
  position: absolute;
  inset: 18% 18% 18%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 32%, rgba(255, 255, 255, 0.44), transparent 30%),
    radial-gradient(circle at 68% 66%, color-mix(in srgb, var(--accent-soft) 24%, transparent) 0%, transparent 44%);
  opacity: 0.56;
  filter: blur(12px);
  pointer-events: none;
}

.supervisor-ring-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  transform-origin: 50% 50%;
  animation: none;
  will-change: auto;
}

.supervisor-button:hover .supervisor-ring-shell,
.supervisor-button:focus-visible .supervisor-ring-shell {
  animation: supervisorShellHoverPulse 620ms cubic-bezier(0.22, 0.82, 0.28, 1) 1;
}

.supervisor-button:focus-visible {
  outline: none;
}

.supervisor-button:focus-visible .supervisor-ring-shell {
  filter:
    drop-shadow(0 0 0 color-mix(in srgb, var(--accent-strong) 40%, transparent))
    drop-shadow(0 16px 24px rgba(13, 19, 30, 0.14))
    drop-shadow(0 34px 52px rgba(0, 0, 0, 0.24));
}

.desktop-pager {
  position: fixed;
  right: 76px;
  bottom: 28px;
  z-index: 82;
  min-width: 168px;
  max-width: min(236px, calc(100vw - 128px));
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--panel-border) 48%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel-bg) 38%, transparent);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0.86;
}

@media (max-width: 1120px) {
  .supervisor-dock {
    left: 50%;
    right: auto;
    bottom: 28px;
    transform: translateX(-50%);
  }

  .supervisor-ring-shell {
    width: 108px;
  }

  .supervisor-dock.is-composer-open .supervisor-button {
    height: 68px;
    min-height: 68px;
    border-radius: 20px;
  }

  .supervisor-composer {
    min-height: 154px;
    padding: 20px 52px 56px 22px;
    border-radius: 22px;
  }

  .supervisor-composer-input {
    min-height: 88px;
    font-size: 18px;
  }

  .supervisor-composer-actions {
    left: 20px;
    right: 52px;
    bottom: 16px;
  }

  .supervisor-semantic-action {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .supervisor-semantic-action-buttons {
    justify-content: flex-end;
  }

  .supervisor-generate-label {
    font-size: 25px;
    padding-left: 56px;
  }

  .supervisor-dock.is-composer-open .supervisor-ring-shell {
    left: calc(50% - 68px);
    top: 57%;
    transform: translate(-50%, -50%) scale(0.6);
  }

  .supervisor-dock.is-composer-open {
    --supervisor-ring-anchor-x: -68px;
  }

  .supervisor-dock.is-guided-mode.is-composer-open {
    --supervisor-ring-anchor-x: 0px;
  }

  .supervisor-dock.is-composer-open .supervisor-button:hover .supervisor-ring-shell,
  .supervisor-dock.is-composer-open .supervisor-button:focus-visible .supervisor-ring-shell {
    transform: translate(-50%, -50%) scale(0.6);
  }

  .supervisor-progress-panel {
    left: calc(50% + var(--supervisor-ring-anchor-x, 0px));
    bottom: calc(100% + 12px);
    width: min(300px, calc(100vw - 28px));
    padding: 12px 14px;
    border-radius: 18px;
    transform: translate(-50%, 14px) scale(0.88);
    transform-origin: 50% 100%;
  }

  .supervisor-dock.is-progressing .supervisor-progress-panel:not([hidden]) {
    transform: translate(-50%, 0) scale(1);
  }

  .supervisor-progress-bubble {
    font-size: 15px;
  }

  .supervisor-progress-percent {
    font-size: 15px;
  }

  .supervisor-progress-message {
    font-size: 12px;
  }

  .desktop-pager {
    right: 24px;
    bottom: 82px;
    max-width: min(220px, calc(100vw - 48px));
  }
}

body[data-theme="light"] .supervisor-ring-shell {
  filter:
    drop-shadow(0 6px 10px rgba(32, 38, 49, 0.16))
    drop-shadow(0 14px 18px rgba(24, 29, 38, 0.2));
}

body[data-theme="light"] .supervisor-backdrop {
  background:
    radial-gradient(circle at 50% 86%, rgba(104, 66, 255, 0.14), transparent 36%),
    rgba(255, 255, 255, 0.52);
}

body[data-theme="light"] .supervisor-ring-shell::before {
  background:
    radial-gradient(circle at 46% 44%, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.26) 30%, transparent 60%),
    conic-gradient(
      from 210deg,
      rgba(255, 255, 255, 0) 0deg,
      rgba(236, 242, 250, 0.58) 72deg,
      rgba(255, 255, 255, 0) 158deg,
      rgba(226, 234, 244, 0.42) 248deg,
      rgba(255, 255, 255, 0) 360deg
    ),
    radial-gradient(circle at 50% 86%, rgba(255, 255, 255, 0.66), transparent 44%);
  opacity: 1;
}

body[data-theme="light"] .supervisor-ring-shell::after {
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.95), transparent 34%),
    radial-gradient(circle at 66% 68%, rgba(223, 231, 243, 0.46) 0%, transparent 44%),
    radial-gradient(circle at 52% 56%, rgba(244, 247, 252, 0.54) 0%, transparent 46%);
  opacity: 0.92;
}

@keyframes supervisorStatePillShimmer {
  0% {
    transform: translateX(-150%);
  }

  100% {
    transform: translateX(150%);
  }
}

@keyframes supervisorProgressSweep {
  0%,
  42% {
    background-position: 140% 0;
  }

  100% {
    background-position: -40% 0;
  }
}

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

@keyframes supervisorStatePillMarquee {
  0%,
  12% {
    transform: translateX(0);
  }

  88%,
  100% {
    transform: translateX(calc(var(--supervisor-pill-scroll-distance, 0px) * -1));
  }
}

@keyframes supervisorThinkingDots {
  0% {
    width: 0;
  }

  100% {
    width: 3ch;
  }
}

@keyframes supervisorShellDrift {
  0%,
  100% {
    transform: rotate(0deg) scale(0.98);
  }

  50% {
    transform: rotate(18deg) scale(1.03);
  }
}

@keyframes supervisorShellShimmer {
  0% {
    transform: rotate(0deg) scale(0.94);
    opacity: 0.38;
  }

  50% {
    transform: rotate(180deg) scale(1.02);
    opacity: 0.58;
  }

  100% {
    transform: rotate(360deg) scale(0.94);
    opacity: 0.38;
  }
}

@keyframes supervisorShellHoverPulse {
  0% {
    transform: translateY(12px) scale(1);
  }

  34% {
    transform: translateY(12px) scale(1.12);
  }

  56% {
    transform: translateY(12px) scale(1.035);
  }

  100% {
    transform: translateY(12px) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .supervisor-ring-svg {
    animation: none;
  }
}

.desktop-pager-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.desktop-select-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.desktop-select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  color: rgba(243, 239, 231, 0.42);
  pointer-events: none;
}

.desktop-select {
  width: 100%;
  min-height: 30px;
  padding: 0 34px 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(243, 239, 231, 0.72);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.desktop-select:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(243, 239, 231, 0.84);
}

.desktop-select:focus {
  border-color: rgba(247, 162, 76, 0.16);
  background: rgba(247, 162, 76, 0.05);
}

.desktop-pager-add {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(247, 162, 76, 0.1);
  background: rgba(247, 162, 76, 0.045);
  color: var(--text-dim);
}

body[data-theme="light"] .desktop-pager {
  background: rgba(255, 255, 255, 0.38);
  border-color: rgba(27, 42, 54, 0.07);
}

body[data-theme="light"] .desktop-select-wrap::after {
  color: rgba(27, 42, 54, 0.42);
}

body[data-theme="light"] .desktop-select,
body[data-theme="light"] .desktop-pager-add {
  border-color: rgba(27, 42, 54, 0.08);
  color: rgba(27, 42, 54, 0.62);
}

body[data-theme="light"] .desktop-select {
  background: rgba(255, 255, 255, 0.28);
}

body[data-theme="light"] .desktop-select:hover {
  background: rgba(255, 255, 255, 0.4);
  color: rgba(27, 42, 54, 0.78);
}

body[data-theme="light"] .desktop-select:focus,
body[data-theme="light"] .desktop-pager-add {
  background: rgba(247, 162, 76, 0.08);
}

.panel,
.widget,
.composer,
.fullscreen-btn,
.theme-btn,
.mobile-connect-btn,
.skills-menu-btn,
.auth-card {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.status-panel {
  width: min(340px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  background: var(--panel-bg);
  box-shadow: var(--shadow);
}

.eyebrow,
.widget-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--accent-strong);
  text-transform: uppercase;
}

.status-panel h1,
.auth-card h2 {
  margin: 10px 0 8px;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.status-copy,
.auth-copy {
  margin: 0 0 16px;
  color: var(--text-soft);
  line-height: 1.5;
}

.account-row,
.action-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.ghost-btn {
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  font-size: 0.98rem;
  line-height: 1;
}

.mini-field,
.auth-field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.mini-field span,
.auth-field span {
  color: var(--text-dim);
  font-size: 0.88rem;
}

.mini-field input,
.auth-field input,
.auth-field select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 9px 11px;
  color: var(--text-main);
}

body[data-theme="light"] .mini-field input,
body[data-theme="light"] .auth-field input,
body[data-theme="light"] .auth-field select {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.account-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.account-option {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 18px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.account-option.is-active {
  background: rgba(247, 162, 76, 0.18);
  border-color: rgba(247, 162, 76, 0.32);
}

.account-option-other .account-option-avatar {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
}

.account-option-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(247, 162, 76, 0.18);
  color: var(--accent-strong);
  font-weight: 700;
}

.account-option-copy {
  min-width: 0;
}

.account-option-name {
  display: block;
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.account-option-meta {
  display: block;
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 0.84rem;
}

.account-picker-empty {
  color: var(--text-dim);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.connection-status {
  min-height: 24px;
  color: var(--text-soft);
  font-size: 0.94rem;
}

.connection-status.is-error,
.auth-message.is-error {
  color: var(--error);
}

.connection-status.is-success,
.auth-message.is-success {
  color: var(--ok);
}

.fullscreen-btn,
.theme-btn,
.mobile-connect-btn {
  min-height: 40px;
  width: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 999px;
  color: var(--text-main);
  background: rgba(247, 162, 76, 0.18);
  border: 1px solid rgba(247, 162, 76, 0.3);
  box-shadow: var(--shadow);
}

.theme-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="light"] .fullscreen-btn,
body[data-theme="light"] .theme-btn,
body[data-theme="light"] .mobile-connect-btn {
  color: #17212b;
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(27, 42, 54, 0.16);
}

.widget-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
}

.workflow-window-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  overflow: visible;
  pointer-events: none;
}

.workflow-window {
  position: absolute;
  min-width: 360px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(18, 22, 32, 0.68), rgba(10, 13, 21, 0.42)),
    rgba(10, 13, 21, 0.34);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  pointer-events: none;
  overflow: hidden;
}

.workflow-window::before {
  content: "";
  position: absolute;
  inset: 44px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 16% 12%, rgba(247, 162, 76, 0.12), transparent 32%),
    rgba(255, 255, 255, 0.025);
  pointer-events: none;
}

.workflow-window-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 7px 8px 7px 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(9, 12, 19, 0.72);
  pointer-events: auto;
  cursor: grab;
  user-select: none;
}

.workflow-window.is-dragging .workflow-window-header {
  cursor: grabbing;
}

.workflow-window-title-input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-main);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0;
  outline: none;
}

.workflow-window-title-input:hover,
.workflow-window-title-input:focus {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.workflow-window-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.workflow-window-action {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1;
}

.workflow-window-action:hover {
  background: rgba(247, 162, 76, 0.16);
  border-color: rgba(247, 162, 76, 0.3);
}

.workflow-window-close:hover {
  background: rgba(255, 117, 117, 0.18);
  border-color: rgba(255, 117, 117, 0.36);
  color: #fff4f4;
}

body[data-theme="light"] .workflow-window {
  border-color: rgba(48, 84, 121, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(242, 247, 252, 0.5)),
    rgba(255, 255, 255, 0.34);
  box-shadow:
    0 22px 50px rgba(61, 85, 104, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

body[data-theme="light"] .workflow-window::before {
  border-top-color: rgba(48, 84, 121, 0.1);
  background:
    radial-gradient(circle at 16% 12%, rgba(210, 150, 70, 0.1), transparent 32%),
    rgba(255, 255, 255, 0.12);
}

body[data-theme="light"] .workflow-window-header {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 252, 0.72)),
    rgba(255, 255, 255, 0.74);
}

body[data-theme="light"] .workflow-window-title-input {
  color: #18324b;
}

body[data-theme="light"] .workflow-window-title-input:hover,
body[data-theme="light"] .workflow-window-title-input:focus {
  border-color: rgba(48, 84, 121, 0.14);
  background: rgba(255, 255, 255, 0.66);
}

body[data-theme="light"] .workflow-window-action {
  border-color: rgba(48, 84, 121, 0.14);
  background: rgba(255, 255, 255, 0.66);
  color: #18324b;
}

.workflow-focus-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  isolation: isolate;
}

.workflow-focus-topbar {
  position: absolute;
  top: 22px;
  left: 50%;
  display: grid;
  grid-template-columns: minmax(240px, 560px) 42px;
  align-items: center;
  gap: 12px;
  width: min(720px, calc(100% - 32px));
  transform: translateX(-50%);
  pointer-events: auto;
  animation: workflow-focus-control-in 380ms cubic-bezier(0.22, 0.82, 0.28, 1) both;
}

.workflow-focus-title-shell {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px 8px 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.93), rgba(244, 240, 255, 0.82)),
    radial-gradient(circle at 86% 24%, rgba(135, 88, 255, 0.18), transparent 42%);
  box-shadow:
    0 24px 68px rgba(15, 10, 32, 0.28),
    0 0 0 1px rgba(91, 61, 196, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  overflow: hidden;
}

.workflow-focus-area-label {
  position: absolute;
  top: 30px;
  left: 24px;
  z-index: 3;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(75, 36, 200, 0.74);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: 0 14px 34px rgba(15, 10, 32, 0.16);
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  pointer-events: none;
  animation: workflow-focus-label-in 360ms cubic-bezier(0.22, 0.82, 0.28, 1) both;
}

.workflow-focus-title-shell::before {
  content: "";
  position: absolute;
  inset: -38% auto auto 8%;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 48% 46%, rgba(91, 61, 196, 0.22), transparent 58%),
    conic-gradient(from 210deg, transparent, rgba(90, 116, 255, 0.2), transparent 62%);
  filter: blur(24px);
  opacity: 0.78;
  pointer-events: none;
}

.workflow-focus-title-orb,
.workflow-focus-merge-orb {
  position: relative;
  display: inline-block;
  width: 24px;
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.96), transparent 34%),
    radial-gradient(circle at 62% 68%, rgba(90, 116, 255, 0.88), transparent 48%),
    linear-gradient(135deg, rgba(75, 36, 200, 0.96), rgba(90, 116, 255, 0.86));
  box-shadow:
    0 10px 24px rgba(75, 36, 200, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.38) inset;
}

.workflow-focus-title-orb::after,
.workflow-focus-merge-orb::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.68);
}

.workflow-focus-title-input {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #4b24c8;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
  outline: none;
  pointer-events: auto;
  user-select: text;
  cursor: text;
}

.workflow-focus-title-input:focus {
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(91, 61, 196, 0.18);
}

.workflow-focus-exit-btn {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(244, 240, 255, 0.84)),
    rgba(255, 255, 255, 0.72);
  color: #4b24c8;
  box-shadow:
    0 18px 44px rgba(15, 10, 32, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

.workflow-focus-exit-btn:hover {
  border-color: rgba(91, 61, 196, 0.24);
  background: linear-gradient(135deg, rgba(75, 36, 200, 0.94), rgba(90, 116, 255, 0.9));
  color: #ffffff;
  box-shadow:
    0 18px 44px rgba(75, 36, 200, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.workflow-focus-bottombar {
  position: absolute;
  left: 24px;
  right: 28px;
  bottom: 28px;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  pointer-events: none;
  animation: workflow-focus-bottom-control-in 420ms cubic-bezier(0.22, 0.82, 0.28, 1) both;
}

.workflow-focus-status {
  grid-column: 1;
  justify-self: center;
  max-width: min(520px, calc(100vw - 40px));
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(18, 24, 38, 0.86);
  color: rgba(248, 250, 252, 0.92);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.workflow-focus-overlay.is-primary-hidden .workflow-focus-status {
  grid-column: 1 / -1;
}

.workflow-focus-status.is-loading {
  border-color: rgba(103, 232, 249, 0.32);
  color: #cffafe;
}

.workflow-focus-status.is-success {
  border-color: rgba(74, 222, 128, 0.34);
  color: #dcfce7;
}

.workflow-focus-status.is-warning {
  border-color: rgba(250, 204, 21, 0.34);
  color: #fef9c3;
}

.workflow-focus-status.is-error {
  border-color: rgba(248, 113, 113, 0.42);
  color: #fee2e2;
}

.workflow-focus-merge-btn {
  position: relative;
  grid-column: 2;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 18px 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(244, 240, 255, 0.86)),
    radial-gradient(circle at 86% 24%, rgba(135, 88, 255, 0.2), transparent 44%);
  color: #4b24c8;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow:
    0 24px 62px rgba(15, 10, 32, 0.28),
    0 0 0 1px rgba(91, 61, 196, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  cursor: pointer;
  pointer-events: auto;
  overflow: hidden;
  transition:
    transform 220ms cubic-bezier(0.22, 0.82, 0.28, 1),
    box-shadow 220ms ease,
    background 220ms ease,
    color 220ms ease;
}

.workflow-focus-merge-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(75, 36, 200, 0.94), rgba(90, 116, 255, 0.9));
  color: #ffffff;
  box-shadow:
    0 28px 72px rgba(75, 36, 200, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.22) inset;
}

.workflow-focus-merge-btn.is-loading,
.workflow-focus-merge-btn[aria-disabled="true"] {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.workflow-focus-merge-btn:hover .workflow-focus-merge-orb {
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.98), transparent 34%),
    radial-gradient(circle at 62% 68%, rgba(255, 255, 255, 0.52), transparent 48%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.14));
}

.desktop.is-workflow-focus-active::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(6, 8, 14, 0.38);
  backdrop-filter: blur(12px) saturate(1.06);
  -webkit-backdrop-filter: blur(12px) saturate(1.06);
  pointer-events: auto;
  animation: workflow-focus-backdrop-in 420ms cubic-bezier(0.22, 0.82, 0.28, 1) both;
}

.desktop.is-workflow-focus-active .hud,
.desktop.is-workflow-focus-active .minimized-dock,
.desktop.is-workflow-focus-active .assistant-chat-dock,
.desktop.is-workflow-focus-active .knowledge-base-dock,
.desktop.is-workflow-focus-active .social-dock-shell,
.desktop.is-workflow-focus-active .supervisor-backdrop,
.desktop.is-workflow-focus-active .supervisor-dock,
.desktop.is-workflow-focus-active .shared-desktop-banner {
  pointer-events: none;
}

.desktop.is-workflow-focus-active .desktop-app-icon {
  pointer-events: auto;
}

.desktop.is-workflow-focus-active .assistant-chat-dock *,
.desktop.is-workflow-focus-active .knowledge-base-dock *,
.desktop.is-workflow-focus-active .social-dock-shell *,
.desktop.is-workflow-focus-active .supervisor-dock * {
  pointer-events: none;
}

.desktop.is-workflow-focus-connecting::after {
  opacity: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.desktop.is-workflow-focus-active .widget.is-workflow-focus-target {
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 0 2px rgba(255, 255, 255, 0.12),
    0 28px 86px rgba(15, 10, 32, 0.42);
  transition:
    box-shadow 420ms cubic-bezier(0.22, 0.82, 0.28, 1),
    opacity 420ms ease,
    filter 420ms ease,
    border-color 420ms ease;
}

.desktop.is-workflow-focus-active .widget.is-workflow-focus-target::before {
  opacity: 0;
  background: transparent;
  filter: none;
  transition:
    opacity 420ms ease,
    filter 420ms ease,
    background 420ms ease;
}

.desktop.is-workflow-focus-active .widget.is-workflow-focus-background {
  opacity: 0.2;
  filter: blur(5px) saturate(0.52) contrast(0.78);
  pointer-events: none;
  transition:
    opacity 420ms ease,
    filter 420ms ease,
    box-shadow 420ms ease;
}

.desktop.is-workflow-focus-active .widget.is-workflow-focus-background::before {
  opacity: 0;
  background: transparent;
  filter: none;
}

.desktop.is-workflow-focus-active.is-workflow-focus-connecting .widget.is-workflow-focus-background {
  opacity: 1;
  filter: none;
  pointer-events: auto;
}

.desktop.is-workflow-focus-panning {
  cursor: grabbing;
}

@keyframes workflow-focus-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes workflow-focus-control-in {
  from {
    opacity: 0;
    transform: translate(-50%, -12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes workflow-focus-label-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes workflow-focus-bottom-control-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .workflow-focus-area-label,
  .workflow-focus-topbar,
  .workflow-focus-bottombar,
  .desktop.is-workflow-focus-active::after {
    animation: none;
  }

  .desktop.is-workflow-focus-active .widget.is-workflow-focus-target,
  .desktop.is-workflow-focus-active .widget.is-workflow-focus-background,
  .desktop.is-workflow-focus-entering .desktop-scene-layer,
  .desktop.is-workflow-focus-active .connection-path,
  .desktop.is-workflow-focus-active .connection-path-flow {
    transition: none;
  }
}

body[data-theme="light"] .workflow-focus-title-shell {
  border-color: rgba(255, 255, 255, 0.74);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 240, 255, 0.86)),
    radial-gradient(circle at 86% 24%, rgba(135, 88, 255, 0.16), transparent 42%);
  box-shadow:
    0 24px 68px rgba(61, 85, 104, 0.2),
    0 0 0 1px rgba(91, 61, 196, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body[data-theme="light"] .workflow-focus-title-input {
  color: #4b24c8;
}

body[data-theme="light"] .workflow-focus-area-label {
  border-color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(61, 85, 104, 0.14);
}

body[data-theme="light"] .workflow-focus-exit-btn {
  border-color: rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 240, 255, 0.86)),
    rgba(255, 255, 255, 0.86);
  color: #4b24c8;
}

body[data-theme="light"] .workflow-focus-merge-btn {
  color: #4b24c8;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 240, 255, 0.86)),
    radial-gradient(circle at 86% 24%, rgba(135, 88, 255, 0.18), transparent 44%);
  box-shadow:
    0 24px 62px rgba(61, 85, 104, 0.2),
    0 0 0 1px rgba(91, 61, 196, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body[data-theme="light"] .workflow-focus-status {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: #172033;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
}

body[data-theme="light"] .workflow-focus-status.is-loading {
  border-color: rgba(8, 145, 178, 0.28);
  color: #0e7490;
}

body[data-theme="light"] .workflow-focus-status.is-success {
  border-color: rgba(22, 163, 74, 0.3);
  color: #15803d;
}

body[data-theme="light"] .workflow-focus-status.is-warning {
  border-color: rgba(202, 138, 4, 0.32);
  color: #a16207;
}

body[data-theme="light"] .workflow-focus-status.is-error {
  border-color: rgba(220, 38, 38, 0.32);
  color: #b91c1c;
}

body[data-theme="light"] .desktop.is-workflow-focus-active::after {
  background: rgba(238, 243, 250, 0.42);
}

.connection-layer {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
  transform-origin: top left;
}

.connection-edge {
  opacity: 1;
  transition: opacity 180ms ease;
}

.connection-layer.is-connection-selected .connection-edge:not(.is-selected):not(.is-hovered):not(.is-active),
.connection-layer.is-connection-hovering .connection-edge:not(.is-hovered):not(.is-selected):not(.is-active),
.connection-layer.is-connection-active .connection-edge:not(.is-active):not(.is-selected):not(.is-hovered) {
  opacity: 0.48;
}

.connection-path {
  fill: none;
  stroke: rgba(139, 108, 255, 0.9);
  stroke-width: 5.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(139, 108, 255, 0.2));
  pointer-events: none;
}

.connection-path.is-curved {
  stroke: rgba(196, 168, 255, 0.94);
  filter:
    drop-shadow(0 0 8px rgba(196, 168, 255, 0.22))
    drop-shadow(0 0 16px rgba(139, 108, 255, 0.12));
}

.connection-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 18;
  pointer-events: stroke;
}

.connection-endpoint {
  r: 4px;
  fill: rgba(216, 204, 255, 0.92);
  stroke: rgba(8, 10, 17, 0.72);
  stroke-width: 2;
  filter: drop-shadow(0 0 10px rgba(139, 108, 255, 0.24));
  opacity: 0.9;
  pointer-events: none;
  transition:
    filter 180ms ease,
    opacity 180ms ease,
    r 180ms ease,
    stroke-width 180ms ease;
}

.connection-endpoint.is-source {
  fill: #8b6cff;
}

.connection-endpoint.is-target {
  fill: #67e8f9;
  filter: drop-shadow(0 0 10px rgba(103, 232, 249, 0.24));
}

.connection-path.is-compound-merge-hidden,
.connection-path-flow.is-compound-merge-hidden,
.connection-endpoint.is-compound-merge-hidden,
.connection-edge.is-compound-merge-hidden {
  opacity: 0;
  filter: none;
  transition:
    opacity 90ms ease,
    filter 90ms ease;
}

.connection-hit.is-compound-merge-hidden {
  pointer-events: none;
}

.connection-path.is-selected {
  stroke: rgba(244, 240, 255, 0.98);
  stroke-width: 6.6;
  filter:
    drop-shadow(0 0 10px rgba(196, 168, 255, 0.5))
    drop-shadow(0 0 24px rgba(139, 108, 255, 0.32));
}

.connection-path.is-curved.is-selected {
  stroke: rgba(247, 244, 255, 0.99);
  filter:
    drop-shadow(0 0 10px rgba(218, 210, 255, 0.48))
    drop-shadow(0 0 24px rgba(159, 124, 255, 0.3));
}

.connection-path.is-hovered,
.connection-edge:hover .connection-path {
  stroke-width: 6.2;
  filter:
    drop-shadow(0 0 10px rgba(196, 168, 255, 0.42))
    drop-shadow(0 0 22px rgba(103, 232, 249, 0.18));
}

.connection-path.is-active {
  stroke-width: 6;
  filter:
    drop-shadow(0 0 10px rgba(196, 168, 255, 0.36))
    drop-shadow(0 0 22px rgba(103, 232, 249, 0.2));
}

.connection-path-flow {
  fill: none;
  stroke: rgba(227, 216, 255, 0.84);
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: none;
  animation: none;
  filter: none;
  opacity: 0.72;
  pointer-events: none;
}

.connection-path-flow.is-curved {
  stroke: rgba(238, 232, 255, 0.86);
  stroke-width: 2.45;
}

.connection-path-flow.is-selected {
  stroke: rgba(203, 188, 255, 0.99);
  stroke-width: 3.65;
  stroke-dasharray: none;
  animation: none;
  opacity: 0.98;
  filter:
    drop-shadow(0 0 8px rgba(203, 188, 255, 0.34))
    drop-shadow(0 0 16px rgba(139, 108, 255, 0.2));
}

.connection-path-flow.is-curved.is-selected {
  stroke: rgba(218, 210, 255, 0.99);
  stroke-width: 3.75;
  filter:
    drop-shadow(0 0 8px rgba(218, 210, 255, 0.34))
    drop-shadow(0 0 16px rgba(159, 124, 255, 0.2));
}

.connection-path-flow.is-hovered,
.connection-edge:hover .connection-path-flow {
  stroke-width: 4.25;
  stroke-dasharray: 10 8;
  animation: connection-flow 680ms linear infinite;
  opacity: 1;
  filter:
    drop-shadow(0 0 10px rgba(238, 232, 255, 0.42))
    drop-shadow(0 0 20px rgba(103, 232, 249, 0.26));
}

.connection-path-flow.is-curved.is-hovered,
.connection-edge:hover .connection-path-flow.is-curved {
  stroke-width: 4.35;
  stroke-dasharray: 11 8;
}

.connection-path-flow.is-active {
  stroke-width: 3.4;
  stroke-dasharray: 7 13;
  animation: connection-flow 980ms linear infinite;
  opacity: 1;
  filter:
    drop-shadow(0 0 8px rgba(218, 210, 255, 0.32))
    drop-shadow(0 0 16px rgba(103, 232, 249, 0.2));
}

.connection-endpoint.is-selected,
.connection-endpoint.is-hovered,
.connection-edge:hover .connection-endpoint,
.connection-endpoint.is-active {
  r: 5.6px;
  opacity: 1;
  stroke-width: 2.5;
}

.connection-endpoint.is-selected,
.connection-endpoint.is-hovered,
.connection-edge:hover .connection-endpoint.is-source,
.connection-endpoint.is-active.is-source {
  filter:
    drop-shadow(0 0 10px rgba(196, 168, 255, 0.48))
    drop-shadow(0 0 22px rgba(139, 108, 255, 0.28));
}

.connection-edge:hover .connection-endpoint.is-target,
.connection-endpoint.is-selected.is-target,
.connection-endpoint.is-hovered.is-target,
.connection-endpoint.is-active.is-target {
  filter:
    drop-shadow(0 0 10px rgba(103, 232, 249, 0.5))
    drop-shadow(0 0 22px rgba(103, 232, 249, 0.24));
}

.connection-path.is-newly-created {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: connection-created-draw 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.connection-path-flow.is-newly-created {
  animation: connection-created-flow-reveal 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.connection-endpoint.is-newly-created {
  animation: connection-endpoint-pop 680ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.desktop.is-widget-dragging .connection-path,
.desktop.is-widget-dragging .connection-path-flow,
.desktop.is-widget-dragging .connection-endpoint {
  animation: none !important;
  animation-play-state: paused;
  filter: none !important;
}

.desktop.is-widget-dragging .connection-hit {
  pointer-events: none !important;
}

.desktop.is-widget-dragging .connection-edge {
  opacity: 1 !important;
  transition: none !important;
}

.desktop.is-pointer-moving .connection-hit {
  pointer-events: none !important;
}

.desktop.is-pointer-moving .connection-edge {
  transition: none !important;
}

.desktop.is-pointer-moving .connection-edge:hover .connection-path,
.desktop.is-pointer-moving .connection-path.is-hovered,
.desktop.is-pointer-moving .connection-path.is-active {
  filter: none !important;
}

.desktop.is-pointer-moving .connection-edge:hover .connection-path-flow,
.desktop.is-pointer-moving .connection-path-flow.is-hovered,
.desktop.is-pointer-moving .connection-path-flow.is-active {
  animation: none !important;
  filter: none !important;
}

.desktop.is-pointer-moving .connection-edge:hover .connection-endpoint,
.desktop.is-pointer-moving .connection-endpoint.is-hovered,
.desktop.is-pointer-moving .connection-endpoint.is-active {
  filter: none !important;
}

.desktop.is-widget-dragging .connection-edge:hover .connection-path,
.desktop.is-widget-dragging .connection-path.is-hovered,
.desktop.is-widget-dragging .connection-path.is-active {
  filter: none !important;
}

.desktop.is-widget-dragging .connection-edge:hover .connection-path-flow,
.desktop.is-widget-dragging .connection-path-flow.is-hovered,
.desktop.is-widget-dragging .connection-path-flow.is-active {
  animation: none !important;
  filter: none !important;
}

.desktop.is-widget-dragging .connection-edge:hover .connection-endpoint,
.desktop.is-widget-dragging .connection-endpoint.is-hovered,
.desktop.is-widget-dragging .connection-endpoint.is-active {
  filter: none !important;
}

.connection-path.is-preview {
  stroke: rgba(152, 202, 239, 0.52);
  stroke-width: 3.6;
  stroke-dasharray: 9 10;
  opacity: 0.78;
}

.connection-path.is-invalid {
  stroke: rgba(236, 143, 143, 0.7);
  filter: drop-shadow(0 0 6px rgba(255, 122, 122, 0.12));
}

.desktop.is-workflow-focus-active .connection-path.is-workflow-focus-target {
  stroke-width: 6.4;
  opacity: 1;
  filter:
    drop-shadow(0 0 10px rgba(196, 168, 255, 0.34))
    drop-shadow(0 0 24px rgba(103, 232, 249, 0.18));
  transition:
    opacity 420ms ease,
    stroke-width 420ms cubic-bezier(0.22, 0.82, 0.28, 1),
    filter 420ms ease;
}

.desktop.is-workflow-focus-active .connection-path-flow.is-workflow-focus-target {
  opacity: 1;
  stroke-width: 3.7;
  transition:
    opacity 420ms ease,
    stroke-width 420ms cubic-bezier(0.22, 0.82, 0.28, 1);
}

.desktop.is-workflow-focus-active .connection-path.is-workflow-focus-background,
.desktop.is-workflow-focus-active .connection-path-flow.is-workflow-focus-background,
.desktop.is-workflow-focus-active .connection-endpoint.is-workflow-focus-background {
  opacity: 0.12;
  filter: none;
  transition:
    opacity 420ms ease,
    filter 420ms ease;
}

.desktop.is-workflow-focus-active .connection-hit.is-workflow-focus-background {
  pointer-events: none;
}

.desktop.is-workflow-focus-active.is-workflow-focus-connecting .connection-path.is-workflow-focus-background,
.desktop.is-workflow-focus-active.is-workflow-focus-connecting .connection-path-flow.is-workflow-focus-background {
  opacity: 1;
}

.desktop.is-workflow-focus-active.is-workflow-focus-connecting .connection-hit.is-workflow-focus-background {
  pointer-events: stroke;
}

.desktop.is-workflow-focus-active .connection-path.is-compound-merge-hidden,
.desktop.is-workflow-focus-active .connection-path-flow.is-compound-merge-hidden,
.desktop.is-workflow-focus-active .connection-endpoint.is-compound-merge-hidden,
.desktop.is-workflow-focus-active .connection-edge.is-compound-merge-hidden,
.desktop.is-workflow-focus-active.is-workflow-focus-connecting .connection-path.is-compound-merge-hidden,
.desktop.is-workflow-focus-active.is-workflow-focus-connecting .connection-path-flow.is-compound-merge-hidden,
.desktop.is-workflow-focus-active.is-workflow-focus-connecting .connection-endpoint.is-compound-merge-hidden,
.desktop.is-workflow-focus-active.is-workflow-focus-connecting .connection-edge.is-compound-merge-hidden,
.connection-path.is-compound-merge-hidden,
.connection-path-flow.is-compound-merge-hidden,
.connection-endpoint.is-compound-merge-hidden,
.connection-edge.is-compound-merge-hidden {
  opacity: 0 !important;
  filter: none !important;
}

.desktop.is-workflow-focus-active .connection-hit.is-compound-merge-hidden,
.desktop.is-workflow-focus-active.is-workflow-focus-connecting .connection-hit.is-compound-merge-hidden,
.connection-hit.is-compound-merge-hidden,
.connection-hit.is-compound-restore-reveal {
  pointer-events: none !important;
}

.connection-path.is-compound-restore-reveal {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: compound-connection-assemble 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.connection-path-flow.is-compound-restore-reveal {
  opacity: 0;
  animation: compound-connection-flow-reveal 680ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes compound-connection-assemble {
  0% {
    opacity: 0;
    stroke-dashoffset: 1;
    filter: none;
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

@keyframes compound-connection-flow-reveal {
  0%,
  52% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes connection-created-draw {
  0% {
    opacity: 0;
    stroke-dashoffset: 1;
    filter: none;
  }
  28% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

@keyframes connection-created-flow-reveal {
  0%,
  42% {
    opacity: 0;
  }
  100% {
    opacity: 0.82;
  }
}

@keyframes connection-endpoint-pop {
  0% {
    opacity: 0;
    r: 1px;
  }
  42% {
    opacity: 1;
    r: 6.4px;
  }
  100% {
    opacity: 0.9;
    r: 4px;
  }
}

@keyframes connection-flow {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -42;
  }
}

@media (prefers-reduced-motion: reduce) {
  .connection-path.is-newly-created,
  .connection-path-flow.is-newly-created,
  .connection-path-flow.is-hovered,
  .connection-edge:hover .connection-path-flow,
  .connection-path-flow.is-active,
  .connection-endpoint.is-newly-created,
  .connection-endpoint.is-active,
  .widget-port.is-connection-active .widget-port-dot {
    animation: none !important;
  }
}

.widget {
  position: absolute;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: var(--widget-min-width);
  min-height: var(--widget-min-height);
  border-radius: 26px;
  border: 1px solid var(--panel-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    var(--desktop-widget-bg);
  box-shadow: var(--shadow);
  overflow: visible;
  pointer-events: auto;
  isolation: isolate;
}

.widget::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 205, 132, 0.24), transparent 70%);
  filter: blur(12px);
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 180ms ease;
  pointer-events: none;
  z-index: -1;
}

.widget.is-chat-widget {
  grid-template-rows: auto 1fr auto;
  transition: height 180ms ease;
}

body[data-theme="light"] .widget {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72)),
    var(--desktop-widget-bg-secondary);
}

.widget.is-pending {
  border-color: rgba(247, 162, 76, 0.32);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 186, 102, 0.14),
    0 0 22px rgba(255, 176, 84, 0.18);
  animation: widget-pending-breathe 2.1s ease-in-out infinite;
}

.widget.is-pending::before {
  opacity: 1;
  animation: widget-pending-aura 2.1s ease-in-out infinite;
}

.widget.is-shared-locked {
  border-color: rgba(255, 184, 112, 0.4);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 184, 112, 0.16),
    0 0 26px rgba(255, 176, 98, 0.14);
}

.widget.is-shared-locked .widget-header {
  background:
    linear-gradient(
      112deg,
      rgba(255, 185, 112, 0.06) 0%,
      rgba(255, 220, 178, 0.18) 48%,
      rgba(255, 185, 112, 0.04) 100%
    );
}

.widget.is-shared-locked .resize-handle,
.widget.is-shared-locked .widget-focus-btn,
.widget.is-shared-locked .widget-edit-btn,
.widget.is-shared-locked .widget-collapse-btn,
.widget.is-shared-locked .widget-delete-btn {
  opacity: 0.72;
}

.widget.is-shared-viewed {
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(143, 212, 158, 0.14),
    0 0 20px rgba(143, 212, 158, 0.08);
}

.widget.is-shared-editing {
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 207, 115, 0.18),
    0 0 24px rgba(255, 176, 98, 0.14);
}

.widget-collab-pill {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 180px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(143, 212, 158, 0.18);
  background: rgba(143, 212, 158, 0.08);
  color: #d9f5df;
  font-size: 0.68rem;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.widget-collab-pill.is-editing {
  border-color: rgba(255, 207, 115, 0.24);
  background: rgba(255, 207, 115, 0.1);
  color: #ffe5be;
}

.widget.is-pending .widget-header {
  background:
    linear-gradient(
      112deg,
      transparent 0%,
      rgba(255, 205, 132, 0.02) 28%,
      rgba(255, 222, 177, 0.18) 48%,
      rgba(255, 205, 132, 0.05) 58%,
      transparent 80%
    );
  background-size: 220% 100%;
  animation: widget-pending-sheen 3.4s linear infinite;
}

.widget.is-workflow-locked .widget-port {
  cursor: not-allowed;
}

.widget.is-workflow-locked .widget-delete-btn:disabled {
  opacity: 0.36;
}

body[data-theme="light"] .widget.is-pending {
  border-color: rgba(214, 124, 32, 0.42);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(224, 140, 49, 0.14),
    0 0 20px rgba(226, 153, 69, 0.16);
}

body[data-theme="light"] .widget.is-pending::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(227, 152, 62, 0.18), transparent 72%);
}

body[data-theme="light"] .widget.is-shared-locked {
  border-color: rgba(214, 124, 32, 0.34);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(224, 140, 49, 0.12),
    0 0 22px rgba(226, 153, 69, 0.12);
}

@keyframes widget-pending-breathe {
  0%,
  100% {
    box-shadow:
      var(--shadow),
      0 0 0 1px rgba(255, 186, 102, 0.12),
      0 0 18px rgba(255, 176, 84, 0.14);
  }
  50% {
    box-shadow:
      var(--shadow),
      0 0 0 1px rgba(255, 196, 123, 0.2),
      0 0 30px rgba(255, 182, 92, 0.28);
  }
}

@keyframes widget-pending-aura {
  0%,
  100% {
    opacity: 0.48;
    transform: scale(0.985);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.02);
  }
}

@keyframes widget-pending-sheen {
  from {
    background-position: 160% 0;
  }
  to {
    background-position: -80% 0;
  }
}

.widget.is-plugin-center-widget {
  --pc-panel: rgba(255, 248, 239, 0.94);
  --pc-panel-strong: rgba(255, 255, 255, 0.98);
  --pc-card: rgba(255, 255, 255, 0.9);
  --pc-card-alt: rgba(248, 239, 226, 0.9);
  --pc-border: rgba(40, 48, 60, 0.12);
  --pc-text-main: #1b2430;
  --pc-text-soft: rgba(27, 36, 48, 0.72);
  --pc-text-faint: rgba(27, 36, 48, 0.56);
  --pc-tab: rgba(235, 225, 210, 0.72);
  --pc-tab-active: rgba(255, 255, 255, 0.96);
  --pc-status: rgba(236, 228, 216, 0.88);
  --pc-launch: rgba(255, 255, 255, 0.94);
  --pc-shadow: 0 20px 40px rgba(23, 26, 33, 0.14);
  background: var(--pc-panel);
  border-color: var(--pc-border);
  box-shadow: var(--pc-shadow);
}

body[data-theme="light"] .widget.is-plugin-center-widget {
  --pc-panel: rgba(255, 251, 246, 0.96);
  --pc-panel-strong: rgba(255, 255, 255, 0.985);
  --pc-card: rgba(255, 255, 255, 0.9);
  --pc-card-alt: rgba(245, 239, 230, 0.88);
  --pc-border: rgba(45, 60, 81, 0.12);
  --pc-text-main: #182534;
  --pc-text-soft: rgba(24, 37, 52, 0.72);
  --pc-text-faint: rgba(24, 37, 52, 0.56);
  --pc-tab: rgba(234, 226, 214, 0.78);
  --pc-tab-active: rgba(255, 255, 255, 0.98);
  --pc-status: rgba(236, 228, 216, 0.86);
  --pc-launch: rgba(255, 255, 255, 0.94);
  --pc-shadow: 0 22px 42px rgba(43, 61, 86, 0.14);
}

body[data-theme="dark"] .widget.is-plugin-center-widget {
  --pc-panel: rgba(15, 20, 29, 0.94);
  --pc-panel-strong: rgba(22, 29, 40, 0.98);
  --pc-card: rgba(24, 32, 44, 0.9);
  --pc-card-alt: rgba(19, 26, 36, 0.9);
  --pc-border: rgba(255, 255, 255, 0.08);
  --pc-text-main: #f2ede6;
  --pc-text-soft: rgba(242, 237, 230, 0.74);
  --pc-text-faint: rgba(242, 237, 230, 0.56);
  --pc-tab: rgba(255, 255, 255, 0.05);
  --pc-tab-active: rgba(255, 255, 255, 0.1);
  --pc-status: rgba(255, 255, 255, 0.08);
  --pc-launch: rgba(255, 255, 255, 0.08);
  --pc-shadow: 0 24px 48px rgba(5, 8, 12, 0.34);
}

.widget.is-plugin-center-widget .widget-header {
  background: color-mix(in srgb, var(--pc-panel-strong) 84%, transparent);
  border-bottom-color: var(--pc-border);
}

.widget.is-plugin-center-widget .widget-title,
.widget.is-plugin-center-widget .widget-kicker {
  color: var(--pc-text-main);
}

.widget.is-plugin-center-widget .widget-focus-btn,
.widget.is-plugin-center-widget .widget-collapse-btn,
.widget.is-plugin-center-widget .widget-delete-btn {
  border: 1px solid var(--pc-border);
  background: var(--pc-tab);
  color: var(--pc-text-main);
}

.widget.is-plugin-center-widget .widget-delete-btn {
  background: rgba(199, 82, 82, 0.14);
}

.widget.is-plugin-center-widget .widget-body {
  background: color-mix(in srgb, var(--pc-panel) 92%, transparent);
  color: var(--pc-text-soft);
}

.widget-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background-clip: padding-box;
  cursor: grab;
  user-select: none;
}

.widget:not(.is-header-collapsed) .widget-header {
  position: relative;
  overflow: hidden;
  clip-path: inset(0 round 26px 26px 0 0);
}

.widget-header:active {
  cursor: grabbing;
}

.widget-meta {
  min-width: 0;
}

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

.widget-title-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 0;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 194, 129, 0.28), rgba(255, 142, 97, 0.16)),
    rgba(15, 18, 29, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 8px 16px rgba(0, 0, 0, 0.14);
  color: #fff3e3;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.widget-title-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.45px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 247, 228, 0.92), rgba(255, 214, 136, 0.84), rgba(255, 250, 240, 0.62));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.92;
  z-index: 2;
}

.widget-title-icon-image {
  position: absolute;
  inset: 0;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  object-fit: contain;
  object-position: center;
  margin: 1px;
  padding: 0;
  box-sizing: border-box;
  border-radius: inherit;
  z-index: 1;
  opacity: 0;
  transition: opacity 180ms ease;
}

.widget-title-icon-glyph {
  position: relative;
  z-index: 3;
  transition: opacity 180ms ease;
}

.widget-title-icon[data-has-image="true"] .widget-title-icon-image {
  opacity: 1;
}

.widget-title-icon[data-has-image="true"] {
  background: transparent;
  box-shadow: none;
}

.widget-title-icon[data-has-image="true"] .widget-title-icon-glyph {
  opacity: 0;
}

.widget-title-icon[data-tone="official"] {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 208, 124, 0.32), rgba(255, 160, 88, 0.18)),
    rgba(15, 18, 29, 0.72);
}

.widget-title-icon[data-tone="market"] {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(132, 206, 255, 0.3), rgba(88, 136, 255, 0.16)),
    rgba(15, 18, 29, 0.72);
}

.widget-title-icon[data-tone="market"]::before {
  background: linear-gradient(135deg, rgba(233, 247, 255, 0.94), rgba(156, 223, 255, 0.86), rgba(242, 249, 255, 0.68));
}

.widget-title-icon[data-tone="variant"] {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(184, 148, 255, 0.3), rgba(113, 100, 226, 0.16)),
    rgba(15, 18, 29, 0.72);
}

.widget-title-icon[data-tone="variant"]::before {
  background: linear-gradient(135deg, rgba(245, 235, 255, 0.94), rgba(207, 184, 255, 0.86), rgba(251, 245, 255, 0.68));
}

.widget-title-icon[data-tone="compound-workflow"] {
  overflow: visible;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.24), transparent 38%),
    linear-gradient(145deg, #5a48ff 0%, #278df2 62%, #19d6e8 100%);
  box-shadow:
    0 10px 22px rgba(37, 99, 235, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  color: #dff9ff;
}

.widget-title-icon[data-tone="compound-workflow"]::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(191, 242, 255, 0.8), rgba(255, 255, 255, 0.54));
}

.widget-title-icon[data-tone="compound-workflow"]::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -4px;
  z-index: 4;
  width: 9px;
  height: 9px;
  border: 2px solid rgba(15, 18, 29, 0.96);
  border-radius: 999px;
  background: #22c55e;
}

.widget-title-icon[data-tone="compound-workflow"] .compound-flow-icon-svg {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 7px 12px rgba(28, 100, 242, 0.24));
}

.widget-title {
  margin: 0;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.widget-kicker:empty {
  display: none;
}

.widget-name-shell {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(100% + 8px);
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.widget-name-input {
  width: 100%;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 12, 20, 0.94);
  color: var(--text-main);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.widget-name-input::placeholder {
  color: var(--text-dim);
}

.widget-name-input:focus {
  outline: none;
  border-color: rgba(247, 162, 76, 0.5);
  box-shadow:
    0 0 0 3px rgba(247, 162, 76, 0.16),
    0 12px 24px rgba(0, 0, 0, 0.18);
}

body[data-theme="light"] .widget-name-input {
  border-color: rgba(74, 104, 146, 0.2);
  background: rgba(255, 255, 255, 0.98);
  color: #1f2d3d;
  box-shadow: 0 10px 22px rgba(43, 61, 86, 0.12);
}

body[data-theme="light"] .widget-name-input::placeholder {
  color: rgba(31, 45, 61, 0.46);
}

body[data-theme="light"] .widget-name-input:focus {
  border-color: rgba(76, 132, 226, 0.42);
  box-shadow:
    0 0 0 3px rgba(76, 132, 226, 0.14),
    0 10px 22px rgba(43, 61, 86, 0.14);
}

.widget-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.widget-focus-btn,
.widget-edit-btn,
.widget-interface-btn,
.compound-workflow-focus-mode-btn,
.widget-collapse-btn,
.widget-delete-btn {
  flex: none;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.widget-focus-btn {
  min-width: 40px;
  border: 1px solid rgba(247, 162, 76, 0.28);
  background:
    linear-gradient(180deg, rgba(247, 162, 76, 0.24), rgba(191, 112, 32, 0.14)),
    rgba(255, 255, 255, 0.06);
  color: #ffe3bf;
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 214, 0.18),
    0 10px 20px rgba(0, 0, 0, 0.16);
}

.widget-focus-btn:hover {
  background:
    linear-gradient(180deg, rgba(247, 162, 76, 0.32), rgba(191, 112, 32, 0.2)),
    rgba(255, 255, 255, 0.08);
  border-color: rgba(247, 162, 76, 0.4);
  color: #fff1da;
}

.widget-focus-btn svg {
  filter: drop-shadow(0 1px 6px rgba(247, 162, 76, 0.18));
}

.compound-workflow-focus-mode-btn {
  min-width: 40px;
  border: 1px solid rgba(103, 232, 249, 0.26);
  background:
    linear-gradient(180deg, rgba(103, 232, 249, 0.18), rgba(34, 211, 238, 0.08)),
    rgba(255, 255, 255, 0.06);
  color: #d5fbff;
  box-shadow:
    inset 0 1px 0 rgba(220, 252, 255, 0.16),
    0 10px 20px rgba(0, 0, 0, 0.14);
}

.compound-workflow-focus-mode-btn:hover,
.compound-workflow-focus-mode-btn:focus-visible,
.compound-workflow-focus-mode-btn.is-active {
  border-color: rgba(103, 232, 249, 0.44);
  background:
    linear-gradient(180deg, rgba(103, 232, 249, 0.28), rgba(34, 211, 238, 0.14)),
    rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.compound-workflow-focus-mode-btn svg {
  filter: drop-shadow(0 1px 6px rgba(34, 211, 238, 0.2));
}

.widget-delete-btn {
  background: rgba(255, 127, 127, 0.12);
}

.widget-delete-btn.is-shared-disabled,
.widget-delete-btn:disabled {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  opacity: 0.64;
}

.widget-edit-btn {
  background: rgba(122, 183, 255, 0.14);
  color: #d6e8ff;
  border: 1px solid rgba(122, 183, 255, 0.22);
}

.widget-edit-btn:hover {
  background: rgba(122, 183, 255, 0.2);
}

body[data-theme="light"] .widget-edit-btn {
  background: rgba(76, 132, 226, 0.14);
  border: 1px solid rgba(67, 121, 214, 0.28);
  color: #2756a4;
}

body[data-theme="light"] .widget-edit-btn:hover {
  background: rgba(76, 132, 226, 0.22);
  color: #1f4a92;
}

body[data-theme="light"] .widget-focus-btn {
  border-color: rgba(205, 133, 51, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 233, 204, 0.94), rgba(255, 244, 228, 0.98)),
    rgba(255, 255, 255, 0.92);
  color: #9a5413;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 10px 20px rgba(181, 122, 59, 0.14);
}

body[data-theme="light"] .widget-focus-btn:hover {
  border-color: rgba(205, 133, 51, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 225, 186, 0.98), rgba(255, 238, 214, 1)),
    rgba(255, 255, 255, 0.96);
  color: #7d420b;
}

body[data-theme="light"] .compound-workflow-focus-mode-btn {
  border-color: rgba(15, 23, 42, 0.92);
  background:
    linear-gradient(180deg, #1f2937, #0f172a),
    #0f172a;
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 22px rgba(15, 23, 42, 0.26);
}

body[data-theme="light"] .compound-workflow-focus-mode-btn:hover,
body[data-theme="light"] .compound-workflow-focus-mode-btn:focus-visible,
body[data-theme="light"] .compound-workflow-focus-mode-btn.is-active {
  border-color: rgba(30, 64, 175, 0.98);
  background:
    linear-gradient(180deg, #2563eb, #1e40af),
    #1e40af;
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 12px 26px rgba(30, 64, 175, 0.32);
}

body[data-theme="light"] .compound-workflow-focus-mode-btn svg {
  filter: drop-shadow(0 1px 4px rgba(15, 23, 42, 0.28));
}

.widget-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(126, 197, 138, 0.14);
  color: var(--ok);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.widget-badge.is-error {
  background: rgba(255, 127, 127, 0.14);
  color: var(--error);
}

.widget-body {
  position: relative;
  padding: 18px;
  overflow: auto;
  color: var(--text-soft);
  line-height: 1.6;
}

.widget.is-chat-widget .widget-body,
.widget.is-plugin-center-widget .widget-body {
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  background-clip: padding-box;
  clip-path: inset(0 round 0 0 26px 26px);
}

.widget.is-plugin-widget .widget-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.widget.is-chat-widget .widget-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding-bottom: 12px;
}

.widget.is-note-widget .widget-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.widget.is-plugin-generation-widget .widget-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}

.widget.is-plugin-creator-widget .widget-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.widget-body.has-loading-overlay {
  overflow: hidden;
}

.note-widget-editor {
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  min-height: 0;
  height: 100%;
}

.note-widget-input {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  line-height: 1.65;
  resize: none;
  outline: none;
  overflow: auto;
}

.note-widget-input::placeholder {
  color: var(--text-soft);
}

.widget.is-chat-widget .widget-body section + section {
  margin-top: 0;
}

.widget-port-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.widget.is-collapsed {
  height: auto !important;
}

.widget.is-collapsed .widget-body,
.widget.is-collapsed .chat-widget-statusbar,
.widget.is-collapsed .resize-handle {
  display: none;
}

.widget.is-header-collapsed {
  min-width: 0 !important;
  min-height: 0 !important;
  width: fit-content !important;
  max-width: min(360px, calc(100vw - 32px)) !important;
  height: auto !important;
  grid-template-rows: auto;
  border-radius: 18px;
}

.widget.is-header-collapsed[data-header-collapse-density="single"] {
  min-height: 42px !important;
}

.widget.is-header-collapsed[data-header-collapse-density="multi"] {
  min-height: 64px !important;
}

.widget.is-header-collapsed[data-header-collapse-inputs="multi"] {
  max-width: min(420px, calc(100vw - 32px)) !important;
}

.widget.is-header-collapsed[data-header-collapse-inputs="multi"][data-header-collapse-density="single"] {
  min-height: 54px !important;
}

.widget.is-header-collapsed[data-header-collapse-inputs="multi"][data-header-collapse-density="multi"] {
  min-height: 72px !important;
}

.widget.is-header-collapsed .widget-body,
.widget.is-header-collapsed .chat-widget-statusbar,
.widget.is-header-collapsed .resize-handle {
  display: none;
}

.widget.is-header-collapsed .widget-header {
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: inherit;
  border-bottom: 0;
  background-clip: padding-box;
  clip-path: inset(0 round 18px);
}

.widget.is-header-collapsed .widget-meta {
  flex: 1;
}

.widget.is-header-collapsed .widget-kicker,
.widget.is-header-collapsed .widget-badge,
.widget.is-header-collapsed .widget-edit-btn,
.widget.is-header-collapsed .widget-collapse-btn,
.widget.is-header-collapsed .widget-delete-btn,
.widget.is-header-collapsed .widget-actions > :not(.widget-focus-btn) {
  display: none !important;
}

.widget.is-header-collapsed .widget-actions {
  flex: none;
  flex-wrap: nowrap;
  gap: 0;
}

.widget.is-header-collapsed .widget-title {
  margin: 0;
  font-size: 0.9rem;
}

.widget.is-header-collapsed .widget-name-shell {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.widget.is-compound-workflow-widget.is-header-collapsed {
  max-width: min(240px, calc(100vw - 32px)) !important;
  border-radius: 18px;
}

.widget.is-compound-workflow-widget.is-header-collapsed .widget-header {
  min-height: 42px;
  gap: 8px;
  padding: 8px 10px;
  border-radius: inherit;
}

.widget.is-compound-workflow-widget.is-header-collapsed .widget-meta {
  flex: 0 1 auto;
  max-width: 150px;
}

.widget.is-compound-workflow-widget.is-header-collapsed .widget-title {
  max-width: 150px;
}

.widget.is-compound-workflow-widget.is-header-collapsed .widget-title-icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  border-radius: 7px;
}

.widget.is-compound-workflow-widget.is-header-collapsed .widget-name-shell {
  display: none;
}

.widget.is-compound-workflow-widget:not(.is-header-collapsed) .widget-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}

.widget.is-compound-workflow-widget:not(.is-header-collapsed) .widget-meta {
  grid-column: 2;
  justify-self: center;
  min-width: 0;
  text-align: center;
}

.widget.is-compound-workflow-widget:not(.is-header-collapsed) .widget-title-row {
  justify-content: center;
}

.widget.is-compound-workflow-widget:not(.is-header-collapsed) .widget-actions {
  grid-column: 3;
  justify-self: end;
}

.widget.is-header-collapsed:hover,
.widget.is-header-collapsed.is-front-widget {
  --collapsed-shell-border: rgba(213, 229, 255, 0.24);
  --collapsed-shell-bg:
    linear-gradient(180deg, rgba(248, 251, 255, 0.2), rgba(214, 226, 255, 0.08)),
    rgba(153, 180, 229, 0.12);
  --collapsed-shell-shadow: rgba(5, 12, 24, 0.34);
  --collapsed-inner-border: rgba(196, 229, 255, 0.28);
  --collapsed-inner-bg:
    linear-gradient(180deg, rgba(10, 25, 69, 0.96), rgba(8, 18, 53, 0.92)),
    rgba(8, 18, 53, 0.94);
  --collapsed-inner-shadow: rgba(4, 10, 24, 0.4);
  --collapsed-glow-left: rgba(194, 129, 255, 0.58);
  --collapsed-glow-mid: rgba(89, 170, 255, 0.54);
  --collapsed-glow-right: rgba(88, 240, 255, 0.72);
  border-radius: 24px;
  border-color: rgba(210, 236, 255, 0.34);
  background: var(--collapsed-shell-bg);
  box-shadow:
    0 26px 52px rgba(4, 10, 22, 0.42),
    0 0 0 1px rgba(212, 237, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.widget.is-header-collapsed:hover::before,
.widget.is-header-collapsed.is-front-widget::before {
  inset: -8px -10px -14px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 84%, var(--collapsed-glow-left), transparent 38%),
    radial-gradient(circle at 52% 96%, var(--collapsed-glow-mid), transparent 34%),
    radial-gradient(circle at 82% 88%, var(--collapsed-glow-right), transparent 34%);
  opacity: 0.96;
  filter: blur(20px);
  transform: scale(1.02);
  z-index: -2;
}

.widget.is-header-collapsed:hover::after,
.widget.is-header-collapsed.is-front-widget::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  pointer-events: none;
  z-index: 0;
}

.widget.is-header-collapsed:hover .widget-header,
.widget.is-header-collapsed.is-front-widget .widget-header {
  margin: 6px;
  padding: 10px 12px;
  position: relative;
  z-index: 1;
  border: 1px solid var(--collapsed-inner-border);
  border-radius: 18px;
  background: var(--collapsed-inner-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    0 20px 34px rgba(4, 10, 24, 0.46);
}

.widget.is-header-collapsed:hover .widget-header::after,
.widget.is-header-collapsed.is-front-widget .widget-header::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -2px;
  height: 12px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      var(--collapsed-glow-left) 10%,
      var(--collapsed-glow-mid) 46%,
      var(--collapsed-glow-right) 82%,
      transparent 100%
    );
  filter: blur(7px);
  opacity: 1;
  pointer-events: none;
}

.widget.is-header-collapsed:hover .widget-actions,
.widget.is-header-collapsed.is-front-widget .widget-actions {
  position: relative;
  z-index: 1;
}

body[data-theme="light"] .widget.is-header-collapsed {
  border-color: rgba(59, 81, 112, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(244, 248, 253, 0.95)),
    rgba(241, 246, 252, 0.96);
  color: #1f2d3d;
  box-shadow:
    0 14px 28px rgba(43, 61, 86, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.6);
}

body[data-theme="light"] .widget.is-header-collapsed .widget-header {
  border-bottom-color: rgba(67, 96, 132, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(236, 242, 249, 0.72));
}

body[data-theme="light"] .widget.is-header-collapsed .widget-title,
body[data-theme="light"] .widget.is-header-collapsed .widget-kicker,
body[data-theme="light"] .widget.is-header-collapsed .widget-meta {
  color: #1f2d3d;
}

body[data-theme="light"] .widget.is-header-collapsed .widget-focus-btn {
  border-color: rgba(205, 133, 51, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 228, 193, 0.94), rgba(255, 241, 222, 0.98)),
    rgba(255, 255, 255, 0.96);
  color: #8a4a10;
}

body[data-theme="light"] .widget.is-header-collapsed:hover,
body[data-theme="light"] .widget.is-header-collapsed.is-front-widget {
  --collapsed-shell-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 244, 252, 0.92)),
    rgba(242, 247, 253, 0.94);
  --collapsed-shell-shadow: rgba(43, 61, 86, 0.18);
  --collapsed-inner-border: rgba(115, 170, 255, 0.2);
  --collapsed-inner-bg:
    linear-gradient(180deg, rgba(17, 34, 86, 0.98), rgba(9, 21, 63, 0.94)),
    rgba(9, 21, 63, 0.96);
  --collapsed-inner-shadow: rgba(43, 61, 86, 0.22);
  --collapsed-glow-left: rgba(173, 117, 255, 0.46);
  --collapsed-glow-mid: rgba(74, 162, 255, 0.44);
  --collapsed-glow-right: rgba(69, 230, 255, 0.6);
  color: #eff6ff;
  box-shadow:
    0 18px 34px var(--collapsed-shell-shadow),
    0 0 0 1px rgba(255, 255, 255, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body[data-theme="light"] .widget.is-header-collapsed:hover::after,
body[data-theme="light"] .widget.is-header-collapsed.is-front-widget::after {
  border-color: rgba(255, 255, 255, 0.88);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.1));
}

body[data-theme="light"] .widget.is-header-collapsed:hover .widget-title,
body[data-theme="light"] .widget.is-header-collapsed:hover .widget-kicker,
body[data-theme="light"] .widget.is-header-collapsed:hover .widget-meta,
body[data-theme="light"] .widget.is-header-collapsed.is-front-widget .widget-title,
body[data-theme="light"] .widget.is-header-collapsed.is-front-widget .widget-kicker,
body[data-theme="light"] .widget.is-header-collapsed.is-front-widget .widget-meta {
  color: #10233c;
}

body[data-theme="light"] .widget.is-header-collapsed:hover .widget-focus-btn,
body[data-theme="light"] .widget.is-header-collapsed.is-front-widget .widget-focus-btn {
  border-color: rgba(177, 215, 255, 0.36);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(182, 223, 255, 0.14)),
    rgba(255, 255, 255, 0.1);
  color: #123257;
}

.widget.is-header-collapsed:hover .widget-title,
.widget.is-header-collapsed.is-front-widget .widget-title {
  color: #f7fbff;
  text-shadow: 0 1px 10px rgba(134, 199, 255, 0.16);
}

body[data-theme="light"] .widget.is-header-collapsed:hover .widget-title,
body[data-theme="light"] .widget.is-header-collapsed.is-front-widget .widget-title {
  color: #10233c;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.24);
}

.widget.is-header-collapsed:hover .widget-title-icon,
.widget.is-header-collapsed.is-front-widget .widget-title-icon {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 10px 18px rgba(5, 12, 26, 0.26);
}

.widget.is-header-collapsed:hover .widget-kicker,
.widget.is-header-collapsed:hover .widget-meta,
.widget.is-header-collapsed.is-front-widget .widget-kicker,
.widget.is-header-collapsed.is-front-widget .widget-meta {
  color: rgba(223, 236, 255, 0.82);
}

body[data-theme="light"] .widget.is-header-collapsed:hover .widget-kicker,
body[data-theme="light"] .widget.is-header-collapsed:hover .widget-meta,
body[data-theme="light"] .widget.is-header-collapsed.is-front-widget .widget-kicker,
body[data-theme="light"] .widget.is-header-collapsed.is-front-widget .widget-meta {
  color: rgba(16, 35, 60, 0.82);
}

.widget.is-header-collapsed:hover .widget-focus-btn,
.widget.is-header-collapsed.is-front-widget .widget-focus-btn {
  border-color: rgba(188, 234, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(158, 210, 255, 0.06)),
    rgba(255, 255, 255, 0.06);
  color: #f6fcff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 18px rgba(4, 12, 26, 0.24);
}

.widget.is-header-collapsed:hover .widget-focus-btn:hover,
.widget.is-header-collapsed.is-front-widget .widget-focus-btn:hover {
  border-color: rgba(196, 239, 255, 0.4);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(120, 217, 255, 0.12)),
    rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Strong, shared selected state for expanded window cards. */
.widget[data-front-widget="true"]:not(.is-header-collapsed) {
  outline: 2px solid rgba(156, 223, 255, 0.42);
  outline-offset: 2px;
  border-color: rgba(173, 223, 255, 0.34) !important;
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(173, 223, 255, 0.24),
    0 0 0 8px rgba(92, 198, 255, 0.08),
    0 18px 42px rgba(3, 10, 22, 0.34),
    0 0 36px rgba(92, 198, 255, 0.18) !important;
}

.widget[data-front-widget="true"]:not(.is-header-collapsed)::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(121, 214, 255, 0.32), transparent 72%);
  filter: blur(18px);
  opacity: 1;
  transform: scale(1.024);
}

.desktop.is-widget-dragging .widget.is-front-widget:not(.is-header-collapsed),
.desktop.is-widget-dragging .widget[data-front-widget="true"]:not(.is-header-collapsed) {
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  will-change: transform;
}

.desktop.is-widget-dragging .widget.is-front-widget:not(.is-header-collapsed)::before,
.desktop.is-widget-dragging .widget[data-front-widget="true"]:not(.is-header-collapsed)::before,
.desktop.is-widget-dragging .widget.is-front-widget:not(.is-header-collapsed)::after,
.desktop.is-widget-dragging .widget[data-front-widget="true"]:not(.is-header-collapsed)::after,
.desktop.is-widget-dragging .widget.is-front-widget:not(.is-header-collapsed) .widget-header,
.desktop.is-widget-dragging .widget[data-front-widget="true"]:not(.is-header-collapsed) .widget-header,
.desktop.is-widget-dragging .widget.is-front-widget:not(.is-header-collapsed) .widget-header::before,
.desktop.is-widget-dragging .widget[data-front-widget="true"]:not(.is-header-collapsed) .widget-header::before,
.desktop.is-widget-dragging .widget.is-front-widget:not(.is-header-collapsed) .widget-header::after,
.desktop.is-widget-dragging .widget[data-front-widget="true"]:not(.is-header-collapsed) .widget-header::after {
  box-shadow: none !important;
  filter: none !important;
}

.desktop.is-widget-dragging .widget.is-front-widget:not(.is-header-collapsed)::before,
.desktop.is-widget-dragging .widget[data-front-widget="true"]:not(.is-header-collapsed)::before,
.desktop.is-widget-dragging .widget.is-front-widget:not(.is-header-collapsed)::after,
.desktop.is-widget-dragging .widget[data-front-widget="true"]:not(.is-header-collapsed)::after {
  opacity: 0 !important;
  background: transparent !important;
}

.desktop.is-widget-dragging .widget.is-header-collapsed.is-front-widget,
.desktop.is-widget-dragging .widget.is-header-collapsed[data-front-widget="true"] {
  box-shadow:
    0 12px 24px rgba(4, 10, 22, 0.24),
    0 0 0 1px rgba(212, 237, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
  filter: none !important;
  will-change: transform;
}

.desktop.is-widget-dragging .widget.is-header-collapsed.is-front-widget::before,
.desktop.is-widget-dragging .widget.is-header-collapsed[data-front-widget="true"]::before {
  inset: -2px;
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(194, 129, 255, 0.18), rgba(89, 170, 255, 0.16), rgba(88, 240, 255, 0.18));
  opacity: 0.45 !important;
  filter: none !important;
  transform: none;
}

.desktop.is-widget-dragging .widget.is-header-collapsed.is-front-widget::after,
.desktop.is-widget-dragging .widget.is-header-collapsed[data-front-widget="true"]::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  box-shadow: none !important;
  filter: none !important;
}

.desktop.is-widget-dragging .widget.is-header-collapsed.is-front-widget .widget-header,
.desktop.is-widget-dragging .widget.is-header-collapsed[data-front-widget="true"] .widget-header {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04) !important;
  filter: none !important;
}

.desktop.is-widget-dragging .widget.is-header-collapsed.is-front-widget .widget-header::after,
.desktop.is-widget-dragging .widget.is-header-collapsed[data-front-widget="true"] .widget-header::after {
  bottom: 0;
  height: 2px;
  opacity: 0.38;
  filter: none !important;
}

body[data-theme="light"] .desktop.is-widget-dragging .widget.is-header-collapsed.is-front-widget,
body[data-theme="light"] .desktop.is-widget-dragging .widget.is-header-collapsed[data-front-widget="true"] {
  box-shadow:
    0 10px 22px rgba(43, 61, 86, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.76) !important;
}

body[data-theme="light"] .desktop.is-widget-dragging .widget.is-header-collapsed.is-front-widget::before,
body[data-theme="light"] .desktop.is-widget-dragging .widget.is-header-collapsed[data-front-widget="true"]::before {
  background:
    linear-gradient(90deg, rgba(173, 117, 255, 0.16), rgba(74, 162, 255, 0.14), rgba(69, 230, 255, 0.18));
  opacity: 0.5 !important;
}

.desktop.is-pointer-moving .widget.is-header-collapsed:hover,
.desktop.is-pointer-moving .widget.is-header-collapsed.is-front-widget {
  box-shadow:
    0 12px 24px rgba(4, 10, 22, 0.24),
    0 0 0 1px rgba(212, 237, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
  filter: none !important;
}

.desktop.is-pointer-moving .widget.is-header-collapsed:hover::before,
.desktop.is-pointer-moving .widget.is-header-collapsed.is-front-widget::before {
  inset: -2px;
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(194, 129, 255, 0.16), rgba(89, 170, 255, 0.14), rgba(88, 240, 255, 0.16));
  opacity: 0.4 !important;
  filter: none !important;
  transform: none;
}

.desktop.is-pointer-moving .widget.is-header-collapsed:hover::after,
.desktop.is-pointer-moving .widget.is-header-collapsed.is-front-widget::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  box-shadow: none !important;
  filter: none !important;
}

.desktop.is-pointer-moving .widget.is-header-collapsed:hover .widget-header,
.desktop.is-pointer-moving .widget.is-header-collapsed.is-front-widget .widget-header {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04) !important;
  filter: none !important;
}

.desktop.is-pointer-moving .widget.is-header-collapsed:hover .widget-header::after,
.desktop.is-pointer-moving .widget.is-header-collapsed.is-front-widget .widget-header::after {
  bottom: 0;
  height: 2px;
  opacity: 0.34;
  filter: none !important;
}

body[data-theme="light"] .desktop.is-pointer-moving .widget.is-header-collapsed:hover,
body[data-theme="light"] .desktop.is-pointer-moving .widget.is-header-collapsed.is-front-widget {
  box-shadow:
    0 10px 22px rgba(43, 61, 86, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.76) !important;
}

body[data-theme="light"] .desktop.is-pointer-moving .widget.is-header-collapsed:hover::before,
body[data-theme="light"] .desktop.is-pointer-moving .widget.is-header-collapsed.is-front-widget::before {
  background:
    linear-gradient(90deg, rgba(173, 117, 255, 0.14), rgba(74, 162, 255, 0.12), rgba(69, 230, 255, 0.16));
  opacity: 0.44 !important;
}

.widget[data-front-widget="true"]:not(.is-header-collapsed) .widget-header {
  position: relative;
  background:
    linear-gradient(
      112deg,
      rgba(115, 203, 255, 0.1) 0%,
      rgba(201, 240, 255, 0.22) 48%,
      rgba(115, 203, 255, 0.08) 100%
    ) !important;
  border-bottom-color: rgba(173, 223, 255, 0.2) !important;
}

.widget[data-front-widget="true"]:not(.is-header-collapsed) .widget-header::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: -1px;
  height: 3px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      rgba(160, 122, 255, 0.12) 0%,
      rgba(121, 214, 255, 0.92) 36%,
      rgba(96, 241, 255, 0.96) 68%,
      rgba(255, 255, 255, 0.24) 100%
    );
  box-shadow:
    0 0 12px rgba(96, 241, 255, 0.24),
    0 0 24px rgba(121, 214, 255, 0.14);
  pointer-events: none;
}

.widget[data-front-widget="true"]:not(.is-header-collapsed) .widget-title {
  color: #f8fcff !important;
}

.widget[data-front-widget="true"]:not(.is-header-collapsed) .widget-kicker,
.widget[data-front-widget="true"]:not(.is-header-collapsed) .widget-meta {
  color: rgba(232, 243, 255, 0.8) !important;
}

body[data-theme="light"] .widget[data-front-widget="true"]:not(.is-header-collapsed) {
  outline-color: rgba(255, 255, 255, 0.56);
  border-color: rgba(188, 208, 229, 0.24) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(248, 252, 255, 0.5)),
    rgba(255, 255, 255, 0.42);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 255, 255, 0.3),
    0 0 0 8px rgba(244, 249, 255, 0.12),
    0 16px 34px rgba(61, 85, 104, 0.12),
    0 0 22px rgba(226, 239, 255, 0.16) !important;
}

body[data-theme="light"] .widget[data-front-widget="true"]:not(.is-header-collapsed)::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(234, 243, 253, 0.24), transparent 72%);
}

body[data-theme="light"] .widget[data-front-widget="true"]:not(.is-header-collapsed) .widget-header {
  background:
    linear-gradient(
      112deg,
      rgba(255, 255, 255, 0.62) 0%,
      rgba(248, 252, 255, 0.94) 48%,
      rgba(234, 242, 250, 0.5) 100%
    ) !important;
  border-bottom-color: rgba(193, 212, 232, 0.22) !important;
}

body[data-theme="light"] .widget[data-front-widget="true"]:not(.is-header-collapsed) .widget-header::before {
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.12) 0%,
      rgba(166, 196, 255, 0.48) 34%,
      rgba(143, 226, 255, 0.64) 66%,
      rgba(255, 255, 255, 0.3) 100%
    );
  box-shadow:
    0 0 10px rgba(166, 196, 255, 0.1),
    0 0 18px rgba(143, 226, 255, 0.1);
}

body[data-theme="light"] .widget[data-front-widget="true"]:not(.is-header-collapsed) .widget-title {
  color: #18324b !important;
}

body[data-theme="light"] .widget[data-front-widget="true"]:not(.is-header-collapsed) .widget-kicker,
body[data-theme="light"] .widget[data-front-widget="true"]:not(.is-header-collapsed) .widget-meta {
  color: rgba(24, 50, 75, 0.66) !important;
}

.desktop.is-workflow-focus-active .widget.is-workflow-focus-target {
  outline: 0 !important;
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 255, 255, 0.24),
    0 0 0 3px rgba(98, 226, 255, 0.14),
    0 28px 86px rgba(15, 10, 32, 0.44),
    0 0 34px rgba(98, 226, 255, 0.12) !important;
}

.desktop.is-workflow-focus-active .widget.is-workflow-focus-background {
  outline: 0 !important;
  box-shadow: none !important;
}

.desktop.is-workflow-focus-active .widget.is-workflow-focus-target::before,
.desktop.is-workflow-focus-active .widget.is-workflow-focus-background::before,
.desktop.is-workflow-focus-active .widget.is-workflow-focus-background::after {
  opacity: 0 !important;
  background: transparent !important;
  filter: none !important;
  box-shadow: none !important;
}

.widget.is-plugin-center-widget[data-front-widget="true"]:not(.is-header-collapsed) {
  --pc-border: rgba(173, 223, 255, 0.18);
  --pc-panel: rgba(18, 24, 34, 0.92);
  --pc-panel-strong: rgba(25, 33, 45, 0.98);
  --pc-card: rgba(28, 37, 51, 0.84);
  --pc-card-alt: rgba(23, 31, 43, 0.8);
  --pc-tab: rgba(92, 198, 255, 0.1);
  --pc-tab-active: rgba(255, 255, 255, 0.12);
  --pc-text-main: #f8fcff;
  --pc-text-soft: rgba(232, 243, 255, 0.8);
  --pc-text-faint: rgba(232, 243, 255, 0.62);
}

body[data-theme="light"] .widget.is-plugin-center-widget[data-front-widget="true"]:not(.is-header-collapsed) {
  --pc-border: rgba(193, 212, 232, 0.22);
  --pc-panel: rgba(248, 252, 255, 0.9);
  --pc-panel-strong: rgba(255, 255, 255, 0.98);
  --pc-card: rgba(255, 255, 255, 0.84);
  --pc-card-alt: rgba(241, 247, 252, 0.8);
  --pc-tab: rgba(232, 241, 250, 0.56);
  --pc-tab-active: rgba(255, 255, 255, 0.99);
  --pc-text-main: #18324b;
  --pc-text-soft: rgba(24, 50, 75, 0.7);
  --pc-text-faint: rgba(24, 50, 75, 0.54);
}

.widget.is-plugin-center-widget[data-front-widget="true"]:not(.is-header-collapsed) .widget-body {
  background: color-mix(in srgb, var(--pc-panel) 94%, transparent);
  color: var(--pc-text-soft);
}

.widget.is-plugin-center-widget[data-front-widget="true"]:not(.is-header-collapsed) .widget-focus-btn,
.widget.is-plugin-center-widget[data-front-widget="true"]:not(.is-header-collapsed) .widget-collapse-btn,
.widget.is-plugin-center-widget[data-front-widget="true"]:not(.is-header-collapsed) .widget-delete-btn {
  border-color: var(--pc-border);
  background: var(--pc-tab);
  color: var(--pc-text-main);
}

.widget-body section + section {
  margin-top: 18px;
}

.label {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.content-block {
  margin: 0;
  white-space: pre-line;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.plugin-status {
  display: grid;
  gap: 12px;
  align-content: center;
  justify-items: start;
  min-height: 100%;
}

.plugin-status.is-error .plugin-loader {
  display: none;
}

.plugin-loader {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: plugin-spin 0.9s linear infinite;
}

.plugin-status-title {
  margin: 0;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
}

.plugin-status-copy {
  margin: 0;
  color: var(--text-soft);
}

.widget-port {
  position: absolute;
  display: block;
  width: 28px;
  height: 28px;
  transform: translateY(-50%);
  padding: 0;
  background: transparent;
  color: var(--text-soft);
  pointer-events: auto;
  transition: transform 140ms ease, filter 140ms ease;
}

.widget-port::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 2px solid transparent;
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}

.widget-port.is-disabled {
  filter: saturate(0.2) brightness(0.9);
}

.widget-port:hover,
.widget-port:focus-visible,
.widget-port.is-valid-target,
.widget-port.is-invalid-target,
.widget-port.is-connected-feedback {
  transform: translateY(-50%) scale(1.14);
}

.widget-port.is-left {
  left: -18px;
}

.widget-port.is-right {
  right: -18px;
}

.widget-port-info {
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  z-index: 8;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 12, 20, 0.88);
  opacity: 0;
  white-space: nowrap;
  transform: translateX(-6px);
  translate: 0 -50%;
  transition: opacity 140ms ease, transform 140ms ease;
  pointer-events: none;
}

.widget-port-enable-hint {
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  z-index: 8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(38, 44, 56, 0.96);
  color: rgba(243, 239, 231, 0.92);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-6px);
  translate: 0 -50%;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.widget-port.is-right .widget-port-info {
  left: auto;
  right: calc(100% + 10px);
  transform: translateX(6px);
}

.widget-port.is-right .widget-port-enable-hint {
  left: auto;
  right: calc(100% + 10px);
  transform: translateX(6px);
}

.widget-port-label {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  color: var(--text-main);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.widget-port-meta {
  display: inline-flex;
  align-items: center;
  color: rgba(230, 238, 246, 0.58);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.widget-port-dot {
  position: absolute;
  inset: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 10, 17, 0.98);
  box-shadow: 0 0 0 4px rgba(8, 10, 17, 0.58);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
  overflow: visible;
}

.widget-port.is-connecting {
  filter: brightness(1.12);
}

.widget-port.is-connecting .widget-port-dot {
  transform: scale(1.08);
}

.widget-port.is-draft-active .widget-port-dot {
  transform: scale(1.06);
}

.widget-port.is-draft-compatible .widget-port-dot {
  box-shadow:
    0 0 0 4px rgba(8, 10, 17, 0.58),
    0 0 0 8px rgba(109, 182, 255, 0.1),
    0 0 18px rgba(109, 182, 255, 0.24);
  filter: brightness(1.06);
}

.widget-port.is-draft-compatible .widget-port-dot::after,
.widget-port.is-valid-target .widget-port-dot::after,
.widget-port.is-invalid-target .widget-port-dot::after,
.widget-port:hover .widget-port-dot::after,
.widget-port:focus-visible .widget-port-dot::after {
  animation: widget-port-core-pulse 900ms ease-in-out infinite;
}

.widget-port.is-valid-target .widget-port-dot {
  box-shadow:
    0 0 0 4px rgba(8, 10, 17, 0.58),
    0 0 0 8px rgba(122, 209, 146, 0.12),
    0 0 20px rgba(122, 209, 146, 0.3);
  animation: widget-port-pulse 720ms ease-in-out infinite;
}

.widget-port.is-invalid-target .widget-port-dot {
  box-shadow:
    0 0 0 4px rgba(8, 10, 17, 0.58),
    0 0 0 8px rgba(255, 122, 122, 0.12),
    0 0 20px rgba(255, 122, 122, 0.26);
  animation: widget-port-pulse 720ms ease-in-out infinite;
}

.widget-port.is-draft-compatible::after,
.widget-port:hover::after,
.widget-port:focus-visible::after {
  border-color: rgba(109, 182, 255, 0.42);
  opacity: 1;
  animation: widget-port-ring-pulse 900ms ease-in-out infinite;
}

.widget-port.is-valid-target::after {
  border-color: rgba(122, 209, 146, 0.54);
  opacity: 1;
  animation: widget-port-ring-pulse 720ms ease-in-out infinite;
}

.widget-port.is-invalid-target::after {
  border-color: rgba(255, 122, 122, 0.5);
  opacity: 1;
  animation: widget-port-ring-pulse 720ms ease-in-out infinite;
}

.widget-port.is-connected-feedback::after {
  border-color: rgba(255, 189, 92, 0.72);
  opacity: 1;
  animation: widget-port-success-burst 720ms ease-out 1;
}

.widget-port.is-connected-feedback .widget-port-dot {
  box-shadow:
    0 0 0 4px rgba(8, 10, 17, 0.58),
    0 0 0 8px rgba(255, 189, 92, 0.18),
    0 0 24px rgba(255, 189, 92, 0.4);
  animation: widget-port-success-core 720ms ease-out 1;
}

.widget-port-dot::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  background: #6db6ff;
}

.widget-port.is-input.is-multiple .widget-port-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 5px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: #6db6ff;
}

.widget-port.is-input.is-multiple .widget-port-dot::after {
  inset: auto;
  top: 50%;
  right: 5px;
  width: 7px;
  height: 7px;
  transform: translateY(-50%);
}

.widget-port.is-input .widget-port-dot {
  border-color: rgba(109, 182, 255, 0.56);
  box-shadow:
    0 0 0 4px rgba(8, 10, 17, 0.58),
    0 0 18px rgba(109, 182, 255, 0.28);
}

.widget-port.is-output .widget-port-dot {
  border-color: rgba(139, 108, 255, 0.62);
  box-shadow:
    0 0 0 4px rgba(8, 10, 17, 0.58),
    0 0 18px rgba(139, 108, 255, 0.3);
}

.widget-port.is-output .widget-port-dot::after {
  background: #8b6cff;
}

.widget-port.is-disabled .widget-port-dot {
  border-color: rgba(166, 172, 182, 0.36);
  background: rgba(28, 31, 39, 0.94);
  box-shadow:
    0 0 0 4px rgba(8, 10, 17, 0.4),
    0 0 12px rgba(116, 123, 138, 0.12);
}

.widget-port.is-disabled .widget-port-dot::after,
.widget-port.is-disabled.is-input.is-multiple .widget-port-dot::before {
  background: rgba(162, 170, 182, 0.64);
}

.widget-port.is-connected .widget-port-dot {
  transform: scale(1.04);
}

.widget-port.is-connected.is-input .widget-port-dot {
  box-shadow:
    0 0 0 4px rgba(8, 10, 17, 0.58),
    0 0 0 8px rgba(109, 182, 255, 0.12),
    0 0 22px rgba(109, 182, 255, 0.24);
}

.widget-port.is-connected.is-output .widget-port-dot {
  box-shadow:
    0 0 0 4px rgba(8, 10, 17, 0.58),
    0 0 0 8px rgba(139, 108, 255, 0.12),
    0 0 22px rgba(139, 108, 255, 0.28);
}

.widget-port.is-connection-hovered .widget-port-dot,
.widget-port.is-connection-selected .widget-port-dot,
.widget-port.is-connection-active .widget-port-dot {
  transform: scale(1.12);
}

.widget-port.is-connection-hovered.is-output .widget-port-dot,
.widget-port.is-connection-selected.is-output .widget-port-dot,
.widget-port.is-connection-active.is-output .widget-port-dot {
  border-color: rgba(196, 168, 255, 0.72);
  box-shadow:
    0 0 0 4px rgba(8, 10, 17, 0.58),
    0 0 0 8px rgba(139, 108, 255, 0.14),
    0 0 26px rgba(139, 108, 255, 0.36);
}

.widget-port.is-connection-hovered.is-input .widget-port-dot,
.widget-port.is-connection-selected.is-input .widget-port-dot,
.widget-port.is-connection-active.is-input .widget-port-dot {
  border-color: rgba(103, 232, 249, 0.74);
  box-shadow:
    0 0 0 4px rgba(8, 10, 17, 0.58),
    0 0 0 8px rgba(103, 232, 249, 0.12),
    0 0 26px rgba(103, 232, 249, 0.34);
}

.widget-port.is-connection-active .widget-port-dot {
  animation: widget-port-pulse 900ms ease-in-out infinite;
}

.widget-port:hover .widget-port-info,
.widget-port:focus-visible .widget-port-info {
  opacity: 1;
  transform: translateX(0);
}

.widget-port:hover .widget-port-dot,
.widget-port:focus-visible .widget-port-dot {
  animation: widget-port-pulse 900ms ease-in-out infinite;
}

.widget-port.is-disabled:hover .widget-port-info,
.widget-port.is-disabled:focus-visible .widget-port-info {
  opacity: 0;
}

.widget-port.is-compound-workflow-port.is-disabled:hover .widget-port-info,
.widget-port.is-compound-workflow-port.is-disabled:focus-visible .widget-port-info {
  opacity: 1;
  transform: translateX(0);
}

.widget-port.is-disabled:hover .widget-port-enable-hint,
.widget-port.is-disabled:focus-visible .widget-port-enable-hint {
  opacity: 1;
  transform: translateX(0);
}

.widget-port.is-compound-workflow-port:hover .widget-port-enable-hint,
.widget-port.is-compound-workflow-port:focus-visible .widget-port-enable-hint,
.widget-port.is-compound-workflow-port.is-disabled:hover .widget-port-enable-hint,
.widget-port.is-compound-workflow-port.is-disabled:focus-visible .widget-port-enable-hint {
  opacity: 0;
}

.widget-port:focus-visible {
  outline: none;
}

.desktop.is-widget-dragging .widget-port {
  pointer-events: none !important;
  transition: none !important;
}

.desktop.is-widget-dragging .widget-port,
.desktop.is-widget-dragging .widget-port:hover,
.desktop.is-widget-dragging .widget-port:focus-visible {
  filter: none !important;
  transform: translateY(-50%) !important;
}

.desktop.is-widget-dragging .widget-port::after,
.desktop.is-widget-dragging .widget-port .widget-port-dot,
.desktop.is-widget-dragging .widget-port .widget-port-dot::after,
.desktop.is-widget-dragging .widget-port .widget-port-dot::before {
  animation: none !important;
  filter: none !important;
  transition: none !important;
}

.desktop.is-widget-dragging .widget-port:hover .widget-port-info,
.desktop.is-widget-dragging .widget-port:focus-visible .widget-port-info,
.desktop.is-widget-dragging .widget-port:hover .widget-port-enable-hint,
.desktop.is-widget-dragging .widget-port:focus-visible .widget-port-enable-hint {
  opacity: 0 !important;
  transform: translateX(-6px) !important;
}

.desktop.is-widget-dragging .widget-port.is-right:hover .widget-port-info,
.desktop.is-widget-dragging .widget-port.is-right:focus-visible .widget-port-info,
.desktop.is-widget-dragging .widget-port.is-right:hover .widget-port-enable-hint,
.desktop.is-widget-dragging .widget-port.is-right:focus-visible .widget-port-enable-hint {
  transform: translateX(6px) !important;
}

.desktop.is-pointer-moving .widget-port {
  transition: none !important;
}

.desktop.is-pointer-moving .widget-port,
.desktop.is-pointer-moving .widget-port:hover,
.desktop.is-pointer-moving .widget-port:focus-visible {
  filter: none !important;
  transform: translateY(-50%) !important;
}

.desktop.is-pointer-moving .widget-port::after,
.desktop.is-pointer-moving .widget-port .widget-port-dot,
.desktop.is-pointer-moving .widget-port .widget-port-dot::after,
.desktop.is-pointer-moving .widget-port .widget-port-dot::before {
  animation: none !important;
  filter: none !important;
  transition: none !important;
}

.desktop.is-pointer-moving .widget-port:hover .widget-port-info,
.desktop.is-pointer-moving .widget-port:focus-visible .widget-port-info,
.desktop.is-pointer-moving .widget-port:hover .widget-port-enable-hint,
.desktop.is-pointer-moving .widget-port:focus-visible .widget-port-enable-hint {
  opacity: 0 !important;
  transform: translateX(-6px) !important;
}

.desktop.is-pointer-moving .widget-port.is-right:hover .widget-port-info,
.desktop.is-pointer-moving .widget-port.is-right:focus-visible .widget-port-info,
.desktop.is-pointer-moving .widget-port.is-right:hover .widget-port-enable-hint,
.desktop.is-pointer-moving .widget-port.is-right:focus-visible .widget-port-enable-hint {
  transform: translateX(6px) !important;
}

@keyframes widget-port-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18);
  }
}

@keyframes widget-port-ring-pulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.16);
    opacity: 1;
  }
}

@keyframes widget-port-core-pulse {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.16);
    filter: brightness(1.18);
  }
}

@keyframes widget-port-success-burst {
  0% {
    transform: scale(0.9);
    opacity: 0.1;
  }
  35% {
    transform: scale(1.34);
    opacity: 1;
  }
  100% {
    transform: scale(1.48);
    opacity: 0;
  }
}

@keyframes widget-port-success-core {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  35% {
    transform: scale(1.22);
    filter: brightness(1.28);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.plugin-center {
  display: grid;
  gap: 14px;
  min-height: 0;
  padding: 4px 0 0;
  color: var(--pc-text-main);
}

.plugin-center-hero {
  display: grid;
  gap: 8px;
}

.plugin-center-market-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.plugin-center-mine-bar {
  justify-content: flex-start;
}

.plugin-center-market-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.plugin-center-market-pill {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--pc-border);
  background: color-mix(in srgb, var(--pc-card-alt) 80%, transparent);
  color: var(--pc-text-soft);
  font-weight: 600;
  font-size: 0.82rem;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.plugin-center-market-pill.is-active {
  background: var(--pc-tab-active);
  color: var(--pc-text-main);
  transform: translateY(-1px);
}

.plugin-center-market-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--pc-border);
  background: color-mix(in srgb, var(--pc-panel-strong) 72%, transparent);
  color: var(--pc-text-soft);
  font-size: 0.84rem;
  font-weight: 600;
}

.plugin-center-market-select {
  min-width: 120px;
  border: none;
  background: transparent;
  color: var(--pc-text-main);
  font: inherit;
  outline: none;
}

.plugin-center-market-select option {
  color: #151821;
}

.plugin-center-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--pc-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--pc-panel-strong) 82%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.plugin-center-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  min-width: 0;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--pc-text-faint);
  font-weight: 700;
  letter-spacing: 0.04em;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.plugin-center-tab svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.plugin-center-tab span {
  white-space: nowrap;
  font-size: 0.86rem;
}

.plugin-center-tab.is-active {
  border-color: var(--pc-border);
  background: var(--pc-tab-active);
  color: var(--pc-text-main);
  box-shadow: 0 10px 22px rgba(16, 18, 25, 0.1);
  transform: translateY(-1px);
}

.plugin-center-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 12px;
  align-items: start;
}

.plugin-center-empty {
  display: grid;
  gap: 6px;
  min-height: 170px;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed var(--pc-border);
  background: var(--pc-card-alt);
  box-shadow: var(--pc-shadow);
}

.plugin-center-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--pc-border);
  background: var(--pc-card);
  box-shadow: var(--pc-shadow);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.plugin-center-card:nth-child(even) {
  background: color-mix(in srgb, var(--pc-card-alt) 78%, var(--pc-card));
}

.plugin-center-workflow-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid var(--pc-border);
  background: color-mix(in srgb, var(--pc-card-alt) 74%, transparent);
  box-shadow: var(--pc-shadow);
}

.plugin-center-workflow-pager-summary {
  color: var(--pc-text-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

.plugin-center-workflow-pager-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.plugin-center-workflow-pager-button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--pc-accent) 22%, var(--pc-border));
  background: color-mix(in srgb, var(--pc-card) 74%, transparent);
  color: var(--pc-text-main);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.plugin-center-workflow-pager-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--pc-accent) 38%, var(--pc-border));
  background: color-mix(in srgb, var(--pc-card-alt) 82%, transparent);
}

.plugin-center-workflow-pager-button:disabled {
  opacity: 0.42;
  cursor: default;
}

.plugin-center-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--pc-accent) 24%, var(--pc-border));
  box-shadow: 0 20px 48px rgba(10, 12, 18, 0.14);
}

.plugin-center-card:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--pc-accent) 36%, var(--pc-border));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--pc-accent) 44%, transparent),
    0 20px 48px rgba(10, 12, 18, 0.16);
}

.plugin-center-card-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 15px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.2), transparent 58%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 12px 28px rgba(10, 12, 18, 0.14);
}

.plugin-center-card-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.8px;
  border-radius: inherit;
  background:
    linear-gradient(145deg, rgba(255, 238, 214, 0.94), rgba(255, 217, 151, 0.58)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

.plugin-center-card-icon[data-tone="market"]::before {
  background:
    linear-gradient(145deg, rgba(207, 242, 255, 0.94), rgba(131, 194, 255, 0.56)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02));
}

.plugin-center-card-icon[data-tone="variant"]::before {
  background:
    linear-gradient(145deg, rgba(239, 226, 255, 0.94), rgba(187, 145, 255, 0.54)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02));
}

.plugin-center-card-icon[data-tone="personal"]::before {
  background:
    linear-gradient(145deg, rgba(214, 255, 230, 0.94), rgba(129, 228, 173, 0.54)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02));
}

.plugin-center-card-icon[data-tone="workflow"]::before {
  background:
    linear-gradient(145deg, rgba(255, 232, 195, 0.94), rgba(255, 182, 88, 0.54)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02));
}

.plugin-center-card-icon-image,
.plugin-center-card-icon-glyph,
.plugin-center-card-workflow-icon {
  position: relative;
}

.plugin-center-card-icon-image {
  z-index: 1;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  object-fit: contain;
  object-position: center;
  margin: 1px;
  padding: 0;
  box-sizing: border-box;
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0;
  transition: opacity 180ms ease;
}

.plugin-center-card-icon-glyph {
  z-index: 3;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--pc-text-main) 80%, white);
  transition: opacity 180ms ease;
}

.plugin-center-card-icon[data-has-image="true"] .plugin-center-card-icon-image {
  opacity: 1;
}

.plugin-center-card-icon[data-has-image="true"] {
  background: transparent;
  box-shadow: none;
}

.plugin-center-card-icon[data-has-image="true"] .plugin-center-card-icon-glyph {
  opacity: 0;
}

.plugin-center-card-workflow-icon {
  z-index: 3;
  width: 28px;
  height: 28px;
  stroke: color-mix(in srgb, var(--pc-accent) 78%, white);
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plugin-center-card-workflow-image {
  position: relative;
  z-index: 1;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  object-fit: contain;
  object-position: center;
  margin: 1px;
  padding: 0;
  box-sizing: border-box;
  border-radius: 13px;
}

.plugin-center-card-content {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.plugin-center-card-header {
  display: grid;
  gap: 5px;
  align-content: start;
}

.plugin-center-card-kicker {
  margin: 0;
  color: var(--pc-text-faint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plugin-center-card-title-block {
  display: grid;
  gap: 4px;
}

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

.plugin-center-card-title {
  margin: 0;
  color: var(--pc-text-main);
  font-size: 0.96rem;
  line-height: 1.25;
}

.plugin-center-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pc-accent) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--pc-accent) 36%, transparent);
  color: var(--pc-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.plugin-image-auto-saver-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.plugin-image-auto-saver-tab.is-active {
  background: rgba(247, 162, 76, 0.16);
  border-color: rgba(247, 162, 76, 0.34);
  color: var(--accent);
}

.plugin-image-auto-saver-select {
  width: 100%;
  appearance: none;
}

.plugin-excel-reader-root {
  display: grid;
  align-content: start;
  flex: 1 1 auto;
  gap: 12px;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.plugin-excel-reader-section .plugin-ui-section-body {
  gap: 12px;
}

.plugin-excel-reader-runtime-grid,
.plugin-excel-reader-config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.55fr);
  gap: 10px;
  align-items: end;
}

.plugin-excel-reader-source {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.55fr) auto;
  gap: 10px;
  align-items: end;
}

.plugin-excel-reader-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.plugin-excel-reader-file-meta {
  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.45;
}

.plugin-excel-reader-statusbar {
  display: inline-flex;
  max-width: 100%;
  width: fit-content;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.35;
}

.plugin-excel-reader-statusbar.is-success {
  border-color: rgba(54, 211, 153, 0.28);
  background: rgba(54, 211, 153, 0.1);
  color: #b6f4d7;
}

.plugin-excel-reader-statusbar.is-warning {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.1);
  color: #fde7a3;
}

.plugin-excel-reader-statusbar.is-error {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
}

body[data-theme="light"] .plugin-excel-reader-statusbar {
  border-color: rgba(108, 66, 231, 0.16);
  background: rgba(248, 246, 255, 0.9);
  color: #57427d;
}

body[data-theme="light"] .plugin-excel-reader-statusbar.is-success {
  border-color: rgba(21, 128, 61, 0.2);
  background: rgba(220, 252, 231, 0.9);
  color: #166534;
}

body[data-theme="light"] .plugin-excel-reader-statusbar.is-warning {
  border-color: rgba(180, 83, 9, 0.2);
  background: rgba(254, 243, 199, 0.9);
  color: #92400e;
}

body[data-theme="light"] .plugin-excel-reader-statusbar.is-error {
  border-color: rgba(185, 28, 28, 0.2);
  background: rgba(254, 226, 226, 0.9);
  color: #991b1b;
}

.plugin-excel-reader-select {
  width: 100%;
  appearance: none;
}

.plugin-excel-reader-config-grid {
  align-items: start;
}

.plugin-excel-reader-table-preview {
  display: grid;
  gap: 8px;
  min-height: 180px;
}

.plugin-excel-reader-sheet-wrap {
  max-height: 260px;
  overflow: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.plugin-excel-reader-full-table-wrap {
  max-height: 420px;
  border-radius: 12px;
}

.plugin-excel-reader-sheet {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--text-main);
  font-size: 0.8rem;
}

.plugin-excel-reader-sheet th,
.plugin-excel-reader-sheet td {
  height: 32px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.plugin-excel-reader-sheet th {
  width: 42px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-weight: 700;
  text-align: center;
  position: sticky;
  z-index: 1;
}

.plugin-excel-reader-sheet thead th {
  top: 0;
}

.plugin-excel-reader-sheet tbody th {
  left: 0;
}

.plugin-excel-reader-sheet-corner {
  left: 0;
  z-index: 2;
}

.plugin-excel-reader-sheet td {
  min-width: 96px;
  background: rgba(255, 255, 255, 0.025);
}

.plugin-excel-reader-sheet td.is-current {
  background: rgba(122, 183, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(122, 183, 255, 0.52);
}

.plugin-excel-reader-full-table thead th {
  background: rgba(124, 92, 255, 0.15);
  color: var(--text-main);
}

.plugin-excel-reader-full-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.04);
}

.plugin-excel-reader-table-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.82rem;
  text-align: center;
}

.plugin-excel-reader-preview-note {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.76rem;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .plugin-excel-reader-source,
  .plugin-excel-reader-runtime-grid,
  .plugin-excel-reader-config-grid {
    grid-template-columns: 1fr;
  }

  .plugin-excel-reader-actions {
    justify-content: flex-start;
  }
}

.plugin-center-card-copy {
  margin: 0;
  color: var(--pc-text-soft);
  line-height: 1.45;
  font-size: 0.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.plugin-center-card-source {
  margin: 0;
  color: var(--pc-text-faint);
  font-size: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.plugin-center-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.plugin-center-card-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pc-panel-strong) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--pc-border) 86%, transparent);
  color: var(--pc-text-soft);
  font-size: 0.72rem;
  font-weight: 600;
}

.plugin-center-card-footer {
  display: grid;
  align-content: space-between;
  gap: 8px;
  justify-items: end;
}

.plugin-center-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.plugin-center-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--pc-status);
  color: var(--pc-text-soft);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.plugin-center-status.is-active {
  background: rgba(126, 197, 138, 0.14);
  color: var(--ok);
}

.plugin-center-detail-hint {
  display: none;
}

.supervisor-placeholder-detail {
  display: grid;
  gap: 14px;
  min-height: 100%;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--pc-border);
  background: color-mix(in srgb, var(--pc-card) 86%, transparent);
  color: var(--pc-text-main);
}

.supervisor-placeholder-detail-header {
  display: grid;
  gap: 6px;
}

.supervisor-placeholder-detail-eyebrow {
  color: var(--pc-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.supervisor-placeholder-detail-title {
  color: var(--pc-text-main);
  font-size: 1rem;
  font-weight: 800;
}

.supervisor-placeholder-detail-description {
  margin: 0;
  color: var(--pc-text-soft);
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.supervisor-placeholder-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.supervisor-placeholder-detail-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--pc-border);
  background: color-mix(in srgb, var(--pc-card-alt) 72%, transparent);
}

.supervisor-placeholder-detail-field.is-wide {
  grid-column: 1 / -1;
}

.supervisor-placeholder-detail-field.is-error {
  border-color: rgba(181, 71, 71, 0.32);
  background: rgba(199, 82, 82, 0.12);
}

.supervisor-placeholder-detail-field span {
  color: var(--pc-text-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.supervisor-placeholder-detail-field p {
  margin: 0;
  color: var(--pc-text-main);
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.supervisor-placeholder-detail.is-generating {
  border-color: color-mix(in srgb, var(--pc-accent) 42%, var(--pc-border));
}

.supervisor-placeholder-detail.is-failed {
  border-color: rgba(181, 71, 71, 0.34);
}

.supervisor-placeholder-start-btn {
  justify-self: start;
}

.plugin-center-launch {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--pc-border);
  background: var(--pc-launch);
  color: var(--pc-text-main);
  font-weight: 600;
  font-size: 0.8rem;
}

.plugin-center-primary-action {
  min-width: 72px;
}

.plugin-center-launch:hover,
.plugin-center-publish:hover,
.plugin-center-edit:hover,
.plugin-center-delete:hover,
.plugin-center-tab:hover,
.plugin-center-market-pill:hover {
  filter: brightness(1.03);
}

.plugin-center-tab:hover {
  color: var(--pc-text-main);
  background: color-mix(in srgb, var(--pc-tab-active) 64%, transparent);
}

.plugin-center-publish {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--pc-border);
  background: color-mix(in srgb, var(--pc-launch) 78%, var(--pc-card));
  color: var(--pc-text-main);
  font-weight: 600;
  font-size: 0.8rem;
}

.plugin-center-edit {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--pc-border);
  background: color-mix(in srgb, var(--pc-launch) 66%, var(--pc-card-alt));
  color: var(--pc-text-main);
  font-weight: 600;
  font-size: 0.8rem;
}

.plugin-center-delete {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(181, 71, 71, 0.24);
  background: rgba(199, 82, 82, 0.14);
  color: #9c3131;
  font-weight: 600;
  font-size: 0.8rem;
}

.plugin-center-launch:disabled,
.plugin-center-publish:disabled,
.plugin-center-edit:disabled,
.plugin-center-delete:disabled {
  opacity: 0.46;
  cursor: default;
  filter: none;
}

@media (max-width: 1180px) {
  .plugin-center-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .plugin-center-card-footer {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-items: stretch;
  }

  .plugin-center-detail-hint {
    display: none;
  }
}

@media (max-width: 760px) {
  .plugin-center-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .plugin-center-card {
    grid-template-columns: 1fr;
  }

  .plugin-center-card-icon {
    width: 68px;
    height: 68px;
  }

  .plugin-center-card-footer {
    grid-column: auto;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .plugin-center-actions {
    justify-content: flex-start;
  }
}


.plugin-ui-section {
  display: grid;
  gap: 8px;
}

.plugin-ui-section-title,
.plugin-ui-empty-title {
  margin: 0;
  color: var(--text-main);
  font-size: 0.94rem;
  font-weight: 700;
}

.plugin-ui-section-copy,
.plugin-ui-empty-copy {
  margin: 0;
  color: var(--text-soft);
}

.plugin-ui-section-body {
  display: grid;
  gap: 10px;
}

.plugin-ui-action-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.plugin-ui-action-bar.is-center {
  justify-content: center;
}

.plugin-ui-action-bar.is-end {
  justify-content: flex-end;
}

.plugin-ui-stack {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 12px;
}

.plugin-ui-stack.is-compact {
  gap: 8px;
}

.plugin-ui-stack.is-loose {
  gap: 16px;
}

.plugin-ui-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.plugin-ui-field-label {
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
}

.plugin-ui-field-hint {
  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.45;
}

.plugin-ui-field-body {
  min-width: 0;
  min-height: 0;
}

.internal-browser-plugin {
  flex: 1;
  min-height: 0;
}

.internal-browser-toolbar-section {
  flex: none;
}

.internal-browser-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.internal-browser-url-field {
  min-width: 0;
}

.internal-browser-url-input {
  width: 100%;
}

.internal-browser-actions {
  flex-wrap: nowrap;
}

.internal-browser-frame-section {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.internal-browser-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0;
  background: #fff;
}

body[data-theme="light"] .internal-browser-frame-section {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(27, 42, 54, 0.1);
}

.plugin-ui-input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  outline: none;
  font: inherit;
}

.plugin-ui-input::placeholder {
  color: var(--text-soft);
}

.plugin-ui-textarea {
  min-height: 120px;
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  resize: vertical;
  background: transparent;
  color: var(--text-main);
  font: inherit;
}

.plugin-ui-textarea::placeholder {
  color: var(--text-soft);
}

.plugin-ui-status,
.plugin-ui-empty {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
}

.plugin-ui-status.is-success {
  border-color: rgba(126, 197, 138, 0.18);
  background: rgba(126, 197, 138, 0.08);
  color: var(--ok);
}

.plugin-ui-status.is-error {
  border-color: rgba(255, 127, 127, 0.18);
  background: rgba(255, 127, 127, 0.08);
  color: #ffb4b4;
}

.plugin-ui-status.is-warning {
  border-color: rgba(255, 193, 94, 0.18);
  background: rgba(255, 193, 94, 0.08);
  color: #ffd898;
}

.plugin-ui-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-size: 0.82rem;
}

.plugin-ui-badge.is-success {
  border-color: rgba(126, 197, 138, 0.18);
  background: rgba(126, 197, 138, 0.08);
  color: #ccefd3;
}

.plugin-ui-badge.is-warning {
  border-color: rgba(255, 193, 94, 0.18);
  background: rgba(255, 193, 94, 0.08);
  color: #ffd898;
}

.plugin-ui-badge.is-accent {
  border-color: rgba(122, 183, 255, 0.2);
  background: rgba(122, 183, 255, 0.12);
  color: #d5e8ff;
}

.plugin-ui-button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-size: 0.82rem;
}

.plugin-ui-button.is-primary {
  border-color: rgba(122, 183, 255, 0.2);
  background: rgba(122, 183, 255, 0.14);
  color: #d6e8ff;
}

.plugin-ui-button.is-danger {
  border-color: rgba(255, 127, 127, 0.18);
  background: rgba(255, 127, 127, 0.1);
  color: #ffbcbc;
}

.plugin-ui-button:disabled {
  opacity: 0.56;
  cursor: default;
}

.plugin-ui-code {
  margin: 0;
  min-height: 0;
  max-height: 220px;
  overflow: auto;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
  font: 12px/1.55 Consolas, "Cascadia Mono", monospace;
}

.plugin-ui-metric {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.plugin-ui-metric-label {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.8rem;
}

.plugin-ui-metric-value {
  margin: 0;
  text-align: center;
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  color: var(--text-main);
}

.plugin-ui-metric.is-success {
  border-color: rgba(126, 197, 138, 0.16);
  background: rgba(126, 197, 138, 0.08);
}

.plugin-ui-metric.is-warning {
  border-color: rgba(255, 193, 94, 0.18);
  background: rgba(255, 193, 94, 0.08);
}

.plugin-ui-metric.is-warning .plugin-ui-metric-value {
  color: #ffb4b4;
}

.plugin-ui-metric.is-accent {
  border-color: rgba(122, 183, 255, 0.18);
  background: rgba(122, 183, 255, 0.08);
}

.loop-node-progress {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.loop-node-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.loop-node-progress-label,
.loop-node-progress-value {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.loop-node-progress-value {
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.loop-node-progress-meta {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.4;
}

.loop-node-progress-track {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.loop-node-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(122, 183, 255, 0.75), rgba(126, 197, 138, 0.92));
  transition: width 180ms ease;
}

.interface-settings {
  display: grid;
  gap: 14px;
}

.interface-settings-title {
  margin: 0;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
}

.interface-settings-copy {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.interface-settings-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.interface-settings-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-size: 0.82rem;
}

.interface-settings-toggle {
  justify-self: start;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.notepad-plugin {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
  gap: 12px;
}

.notepad-plugin-toolbar {
  flex: none;
}

.plugin-quick-launch {
  position: absolute;
  z-index: 168;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.plugin-quick-launch-frame {
  position: relative;
  display: inline-flex;
}

.plugin-quick-launch-frame::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 50%, rgba(58, 188, 255, 0.28), transparent 54%),
    radial-gradient(circle at 50% 50%, rgba(92, 216, 255, 0.22), transparent 68%),
    radial-gradient(circle at 50% 86%, rgba(106, 196, 255, 0.16), transparent 54%);
  filter: blur(16px);
  opacity: 0.96;
  pointer-events: none;
  animation: plugin-quick-launch-blue-flicker 2.8s ease-in-out infinite;
}

.plugin-quick-launch-icon {
  position: relative;
  width: 78px;
  height: 78px;
  padding: 0;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.34), transparent 40%),
    radial-gradient(circle at 76% 82%, rgba(98, 210, 255, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(185, 221, 255, 0.08)),
    rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -10px 28px rgba(120, 178, 255, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 18px 34px rgba(0, 0, 0, 0.18),
    0 0 24px rgba(122, 204, 255, 0.14),
    0 0 36px rgba(50, 182, 255, 0.2);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.plugin-quick-launch-icon::before,
.plugin-quick-launch-icon::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.plugin-quick-launch-icon::before {
  inset: 1.5px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01)),
    radial-gradient(circle at 72% 84%, rgba(91, 205, 255, 0.04), transparent 42%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -6px 12px rgba(71, 132, 214, 0.03);
}

.plugin-quick-launch-icon::after {
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(136deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.08) 26%, transparent 44%),
    linear-gradient(320deg, rgba(146, 224, 255, 0.16) 0%, transparent 34%);
  mix-blend-mode: screen;
  opacity: 0.95;
}

.plugin-quick-launch-icon:hover {
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.42), transparent 42%),
    radial-gradient(circle at 76% 82%, rgba(110, 219, 255, 0.22), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(188, 226, 255, 0.12)),
    rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.plugin-quick-launch-icon-liquid {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -18%;
  height: 44%;
  border-radius: 52% 48% 42% 42% / 24% 24% 80% 80%;
  background:
    linear-gradient(180deg, rgba(159, 222, 255, 0.92), rgba(63, 158, 239, 0.48)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 58%);
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transform-origin: 50% 60%;
  pointer-events: none;
}

.plugin-quick-launch-icon.is-creating .plugin-quick-launch-icon-liquid,
.plugin-quick-launch-icon.is-cancelling .plugin-quick-launch-icon-liquid {
  opacity: 0.95;
  animation: plugin-liquid-rise 3.2s ease-in-out infinite;
}

.plugin-quick-launch-icon.is-cancelling .plugin-quick-launch-icon-liquid {
  filter: saturate(0.4) brightness(0.95);
}

.plugin-quick-launch-icon.is-creating {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(159, 222, 255, 0.16),
    0 18px 34px rgba(0, 0, 0, 0.22),
    0 0 28px rgba(89, 177, 255, 0.28);
}

.plugin-quick-launch-icon.is-complete {
  border-color: rgba(255, 183, 112, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(255, 194, 129, 0.16),
    0 18px 34px rgba(0, 0, 0, 0.22),
    0 0 26px rgba(255, 150, 76, 0.26);
}

.plugin-quick-launch-icon.is-error {
  border-color: rgba(255, 126, 126, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 0 1px rgba(255, 126, 126, 0.16),
    0 18px 34px rgba(0, 0, 0, 0.22),
    0 0 24px rgba(255, 98, 98, 0.2);
}

.plugin-quick-launch-icon-glyph {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter:
    drop-shadow(0 9px 10px rgba(8, 18, 36, 0.22))
    drop-shadow(0 2px 2px rgba(8, 18, 36, 0.14))
    drop-shadow(0 0 18px rgba(86, 210, 255, 0.18));
}

.plugin-quick-launch-icon-glyph svg {
  width: 100%;
  height: 100%;
}

.plugin-quick-launch-tool-svg {
  overflow: visible;
  transform: rotate(-10deg) scale(1.02);
}

.plugin-quick-launch-tool-core {
  fill: rgba(74, 206, 255, 0.08);
  stroke: rgba(156, 232, 255, 0.18);
  stroke-width: 6;
}

.plugin-quick-launch-tool-shape {
  fill: rgba(255, 255, 255, 0.98);
  filter:
    drop-shadow(0 5px 6px rgba(4, 16, 30, 0.18))
    drop-shadow(0 0 8px rgba(112, 219, 255, 0.1));
}

.plugin-quick-launch-icon:hover .plugin-quick-launch-tool-svg {
  transform: rotate(-8deg) scale(1.05);
}

.plugin-quick-launch-icon.is-creating .plugin-quick-launch-tool-core,
.plugin-quick-launch-icon.is-cancelling .plugin-quick-launch-tool-core {
  fill: rgba(96, 220, 255, 0.2);
  stroke: rgba(174, 240, 255, 0.42);
}

.plugin-quick-launch-icon.is-complete .plugin-quick-launch-tool-core {
  fill: rgba(255, 197, 87, 0.18);
  stroke: rgba(255, 226, 157, 0.4);
}

.plugin-quick-launch-icon.is-complete .plugin-quick-launch-tool-shape {
  fill: rgba(255, 251, 236, 0.98);
}

.plugin-quick-launch-icon.is-error .plugin-quick-launch-tool-core {
  fill: rgba(255, 133, 133, 0.16);
  stroke: rgba(255, 180, 180, 0.34);
}

.plugin-quick-launch-icon.is-error .plugin-quick-launch-tool-shape {
  fill: rgba(255, 244, 244, 0.96);
}

.plugin-quick-launch-label {
  color: rgba(245, 248, 252, 0.88);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  line-height: 1.25;
  max-width: 92px;
  text-align: center;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  user-select: none;
}

.plugin-quick-launch-status-dot {
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: 3;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.94);
  background: #ff4b4b;
  box-shadow:
    0 0 0 6px rgba(255, 75, 75, 0.16),
    0 10px 22px rgba(255, 75, 75, 0.38);
}

.plugin-quick-launch-panel {
  position: absolute;
  z-index: 169;
  min-width: 420px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(28, 34, 46, 0.76), rgba(16, 20, 29, 0.72)),
    rgba(12, 15, 23, 0.6);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.26),
    0 10px 24px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

.plugin-quick-launch-input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 12, 18, 0.42);
  color: var(--text-main);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.plugin-quick-launch-input::placeholder {
  color: rgba(236, 241, 248, 0.52);
}

.plugin-quick-launch-input:focus {
  outline: none;
  border-color: rgba(247, 162, 76, 0.46);
  box-shadow:
    0 0 0 3px rgba(247, 162, 76, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.plugin-quick-launch-confirm {
  flex: none;
  height: 46px;
  min-width: 74px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(247, 162, 76, 0.22);
  background:
    linear-gradient(180deg, rgba(247, 162, 76, 0.28), rgba(191, 112, 32, 0.22)),
    rgba(255, 255, 255, 0.08);
  color: #fff3e3;
}

.plugin-quick-launch-confirm:hover {
  background:
    linear-gradient(180deg, rgba(247, 162, 76, 0.36), rgba(191, 112, 32, 0.28)),
    rgba(255, 255, 255, 0.12);
}

.plugin-creator {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
  height: 100%;
  overflow: hidden;
}

.plugin-creator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
}

.plugin-creator.is-modify-single .plugin-creator-layout {
  grid-template-columns: minmax(0, 1fr);
}

.plugin-creator-editor {
  min-height: 0;
  display: flex;
}

.plugin-creator-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plugin-creator-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.plugin-creator-text-action {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-weight: 700;
  white-space: nowrap;
}

.plugin-creator-text-action:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
}

.plugin-creator-text-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.plugin-creator-title {
  margin: 0;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
}

.plugin-creator-copy,
.plugin-creator-preview-hint,
.plugin-creator-hint,
.plugin-creator-status {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.plugin-creator-preview-hint {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(247, 162, 76, 0.24);
  background: rgba(247, 162, 76, 0.1);
  color: #ffe0b6;
}

.plugin-creator-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plugin-creator-template {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.82rem;
}

.plugin-creator-template.is-active {
  border-color: rgba(122, 183, 255, 0.2);
  background: rgba(122, 183, 255, 0.12);
  color: #cfe2ff;
}

.plugin-creator-debug {
  margin: 0;
  min-height: 0;
  max-height: 220px;
  overflow: auto;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
  font: 12px/1.55 Consolas, "Cascadia Mono", monospace;
}

.plugin-creator-followups {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.plugin-creator-followups-title,
.plugin-creator-followups-copy,
.plugin-creator-followups-summary {
  margin: 0;
}

.plugin-creator-followups-title {
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 700;
}

.plugin-creator-followups-copy,
.plugin-creator-followups-summary {
  color: var(--text-soft);
  line-height: 1.5;
}

.plugin-creator-followups-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plugin-creator-followup-option {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.plugin-creator-followup-option input {
  margin: 2px 0 0;
}

.plugin-creator-followup-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plugin-creator-followup-copy strong {
  color: var(--text-main);
  font-size: 0.92rem;
}

.plugin-creator-followup-copy small {
  color: var(--text-soft);
  line-height: 1.45;
}

.plugin-creator-followups-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.plugin-creator-edit-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.plugin-creator-edit-tools-title,
.plugin-creator-edit-tools-copy,
.plugin-creator-edit-tools-summary,
.plugin-creator-edit-tools-region {
  margin: 0;
}

.plugin-creator-edit-tools-title {
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 700;
}

.plugin-creator-edit-tools-copy,
.plugin-creator-edit-tools-summary,
.plugin-creator-edit-tools-region {
  color: var(--text-soft);
  line-height: 1.5;
  font-size: 0.84rem;
}

.plugin-creator-scope-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plugin-creator-scope-option {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.82rem;
}

.plugin-creator-scope-option.is-active {
  border-color: rgba(122, 183, 255, 0.28);
  background: rgba(122, 183, 255, 0.16);
  color: #d7e8ff;
}

.plugin-creator-region-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plugin-creator-hero {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.plugin-creator-textarea {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-main);
  line-height: 1.6;
  resize: none;
  outline: none;
  box-shadow: none;
  font: inherit;
}

.plugin-creator.is-modify-single .plugin-creator-textarea {
  min-height: 220px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.plugin-creator.is-modify-single .plugin-creator-textarea:read-only {
  color: var(--text-soft);
  border-color: rgba(122, 183, 255, 0.22);
  background: rgba(122, 183, 255, 0.06);
}

.plugin-creator-status {
  min-height: 24px;
}

.plugin-creator-stream,
.plugin-generation-stream {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(149, 226, 184, 0.2);
  border-radius: 12px;
  background: rgba(149, 226, 184, 0.07);
  box-sizing: border-box;
}

.plugin-creator-stream[hidden],
.plugin-generation-stream[hidden] {
  display: none;
}

.plugin-creator-stream-header,
.plugin-generation-stream-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.plugin-creator-stream-title,
.plugin-creator-stream-meta,
.plugin-generation-stream-title,
.plugin-generation-stream-meta {
  margin: 0;
}

.plugin-creator-stream-title,
.plugin-generation-stream-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(209, 247, 224, 0.96);
  font-size: 0.82rem;
  font-weight: 800;
}

.plugin-creator-stream-title::before,
.plugin-generation-stream-title::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(149, 226, 184, 0.94);
  box-shadow: 0 0 0 5px rgba(149, 226, 184, 0.1);
}

.plugin-creator-stream[data-state="waiting"] .plugin-creator-stream-title::before,
.plugin-generation-stream[data-state="waiting"] .plugin-generation-stream-title::before {
  background: rgba(247, 198, 120, 0.95);
  box-shadow: 0 0 0 5px rgba(247, 198, 120, 0.1);
}

.plugin-creator-stream-meta,
.plugin-generation-stream-meta {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--text-dim);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: right;
}

.plugin-creator-stream-body,
.plugin-generation-stream-body {
  min-height: 54px;
  max-height: 150px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-main);
  font: 12px/1.55 Consolas, "Cascadia Mono", monospace;
}

.plugin-creator-stream[data-state="live"] .plugin-creator-stream-body::after,
.plugin-generation-stream[data-state="live"] .plugin-generation-stream-body::after {
  content: "▌";
  display: inline-block;
  margin-left: 2px;
  color: rgba(149, 226, 184, 0.96);
  animation: plugin-stream-caret 900ms steps(2, start) infinite;
}

@keyframes plugin-stream-caret {
  50% {
    opacity: 0;
  }
}

.plugin-creator-run {
  flex: 0 0 auto;
}

.plugin-creator-plan {
  flex: 0 0 auto;
}

.plugin-creator-apply {
  flex: 0 0 auto;
  opacity: 0.55;
}

.plugin-creator-apply.is-ready {
  opacity: 1;
  border-color: rgba(126, 197, 138, 0.24);
  background: rgba(126, 197, 138, 0.12);
  color: #c8f1d0;
}

.widget.is-plugin-region-picking {
  outline: 2px solid rgba(122, 183, 255, 0.5);
  outline-offset: 4px;
}

.plugin-region-pick-candidate {
  cursor: crosshair !important;
  transition:
    outline-color 120ms ease,
    background-color 120ms ease,
    box-shadow 120ms ease;
}

.plugin-region-pick-candidate.is-hovered {
  outline: 2px solid rgba(122, 183, 255, 0.78);
  outline-offset: 2px;
  background: rgba(122, 183, 255, 0.08) !important;
  box-shadow: 0 0 0 4px rgba(122, 183, 255, 0.12);
}

@media (max-width: 900px) {
  .plugin-creator-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.system-settings {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

.system-settings-title {
  margin: 0;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
}

.system-settings-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.system-settings-tab {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-weight: 600;
}

.system-settings-tab.is-active {
  background: rgba(126, 197, 138, 0.16);
  border-color: rgba(126, 197, 138, 0.32);
  color: var(--text-main);
}

.system-settings-panel {
  display: grid;
  gap: 12px;
}

.system-settings-copy,
.system-settings-status {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.system-settings-fields {
  display: grid;
  gap: 12px;
}

.system-settings-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.system-settings-group-title {
  margin: 0;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 700;
}

.system-settings-group-copy {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
  font-size: 0.9rem;
}

.system-settings-field {
  display: grid;
  gap: 6px;
}

.system-settings-field span {
  color: var(--text-dim);
  font-size: 0.88rem;
}

.system-settings-input {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  padding: 0 12px;
  color: var(--text-main);
  outline: none;
}

.system-settings-select {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  padding: 0 12px;
  color: var(--text-main);
  outline: none;
}

.system-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.system-settings-provider-header,
.system-settings-provider-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.system-settings-provider-list,
.system-settings-provider-fields {
  display: grid;
  gap: 12px;
}

.system-settings-provider-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.system-settings-provider-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.system-settings-provider-title,
.system-settings-provider-interface,
.system-settings-provider-empty {
  margin: 0;
}

.system-settings-provider-title {
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 600;
}

.provider-management-settings {
  overflow: auto;
  padding-right: 2px;
}

.provider-management-binding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.provider-management-settings .system-settings-provider-card > label {
  color: var(--text-soft);
  font-size: 0.86rem;
}

.provider-management-settings input[type="checkbox"] {
  margin-right: 7px;
}

.system-settings-provider-interface,
.system-settings-provider-empty {
  color: var(--text-dim);
  font-size: 0.84rem;
}

.system-settings-status {
  min-height: 24px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.system-settings-actions .ghost-btn:disabled,
.system-settings-actions .auth-submit:disabled {
  opacity: 0.46;
  cursor: default;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
}

.desktop-style {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

.desktop-style-title {
  margin: 0;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
}

.desktop-style-copy,
.desktop-style-status {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.desktop-style-fields {
  display: grid;
  gap: 12px;
}

.desktop-style-image-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.desktop-style-image-meta {
  margin: -2px 0 0;
  color: var(--text-dim);
  font-size: 0.84rem;
  line-height: 1.45;
}

.desktop-style-field {
  display: grid;
  gap: 7px;
}

.desktop-style-field span {
  color: var(--text-dim);
  font-size: 0.88rem;
}

.desktop-style-select {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  padding: 0 12px;
  color: var(--text-main);
  outline: none;
}

.desktop-style-range-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.desktop-style-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.desktop-style-toggle {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.desktop-style-toggle-label {
  color: var(--text-main);
  font-size: 0.9rem;
}

.desktop-style-range {
  width: 100%;
  accent-color: var(--accent);
}

.desktop-style-value {
  min-width: 44px;
  color: var(--text-main);
  font-size: 0.84rem;
  text-align: right;
}

.chat-widget-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 0 12px;
  align-items: flex-end;
}

.chat-widget-thread {
  display: grid;
  gap: 8px;
}

.chat-widget-statusbar {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 16px 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 26px;
  border-bottom-right-radius: 26px;
  overflow: hidden;
  background-clip: padding-box;
  clip-path: inset(0 round 0 0 26px 26px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
}

.chat-widget-statusbar::before {
  content: "";
  width: 9px;
  height: 9px;
  margin-right: 10px;
  border-radius: 999px;
  background: rgba(160, 169, 182, 0.85);
  box-shadow: 0 0 0 1px rgba(160, 169, 182, 0.18);
  flex: none;
}

.chat-widget-statusbar-label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(231, 235, 241, 0.76);
}

.chat-widget-statusbar[data-tone="working"] {
  background:
    linear-gradient(180deg, rgba(255, 192, 96, 0.08), rgba(255, 255, 255, 0.02));
}

.chat-widget-statusbar[data-tone="working"]::before {
  background: rgba(255, 193, 87, 0.98);
  box-shadow:
    0 0 0 1px rgba(255, 193, 87, 0.22),
    0 0 12px rgba(255, 181, 70, 0.42);
  animation: chat-status-pulse 1.6s ease-in-out infinite;
}

.chat-widget-statusbar[data-tone="working"] .chat-widget-statusbar-label {
  color: rgba(255, 224, 177, 0.94);
}

.chat-widget-statusbar[data-tone="done"]::before {
  background: rgba(96, 214, 157, 0.92);
  box-shadow:
    0 0 0 1px rgba(96, 214, 157, 0.18),
    0 0 10px rgba(96, 214, 157, 0.25);
}

.chat-widget-statusbar[data-tone="done"] .chat-widget-statusbar-label {
  color: rgba(181, 245, 213, 0.9);
}

.chat-widget-statusbar[data-tone="error"] {
  background:
    linear-gradient(180deg, rgba(255, 128, 128, 0.08), rgba(255, 255, 255, 0.02));
}

.chat-widget-statusbar[data-tone="error"]::before {
  background: rgba(255, 114, 114, 0.94);
  box-shadow:
    0 0 0 1px rgba(255, 114, 114, 0.2),
    0 0 10px rgba(255, 114, 114, 0.24);
}

.chat-widget-statusbar[data-tone="error"] .chat-widget-statusbar-label {
  color: rgba(255, 201, 201, 0.94);
}

@keyframes chat-status-pulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.82;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.chat-widget-response {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  line-height: 1.65;
  white-space: pre-wrap;
}

.chat-widget-image-gallery {
  display: grid;
  gap: 12px;
}

.chat-widget-image-card {
  margin: 0;
  display: grid;
  gap: 8px;
}

.chat-widget-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  object-fit: contain;
  cursor: zoom-in;
}

.chat-widget-image-caption {
  color: var(--text-soft);
  font-size: 0.76rem;
  line-height: 1.45;
}

.chat-widget-image-actions {
  display: flex;
  justify-content: flex-end;
}

.chat-widget-audio-list {
  display: grid;
  gap: 10px;
}

.chat-widget-audio-card {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-widget-audio {
  width: 100%;
  min-height: 38px;
}

.chat-widget-video {
  display: block;
  width: 100%;
  max-height: 360px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.chat-widget-audio-caption {
  color: var(--text-soft);
  font-size: 0.76rem;
  line-height: 1.35;
}

.chat-widget-image-download {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(247, 162, 76, 0.14);
  color: var(--text-main);
  font: inherit;
  cursor: pointer;
}

.chat-widget-image-download:disabled {
  opacity: 0.58;
  cursor: default;
}

.chat-widget-composer {
  display: grid;
  gap: 8px;
}

.chat-widget-composer.is-context {
  gap: 6px;
}

.sound-dialog-controls {
  display: grid;
  gap: 8px;
}

.sound-dialog-controls-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.sound-dialog-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--text-soft);
  font-size: 0.72rem;
}

.sound-dialog-field-wide {
  grid-column: 1 / -1;
}

.sound-dialog-select,
.sound-dialog-instructions {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(8, 12, 20, 0.42);
  color: var(--text-main);
  font: inherit;
  outline: none;
}

.sound-dialog-select {
  min-height: 34px;
  padding: 6px 8px;
}

.sound-dialog-instructions {
  min-height: 56px;
  max-height: 96px;
  padding: 8px 10px;
  line-height: 1.45;
  resize: vertical;
}

.chat-widget-model-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: min(220px, 100%);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
}

.chat-widget-model-label {
  flex: 0 0 auto;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chat-widget-model-select {
  width: 100%;
  min-width: 0;
  max-width: 140px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  outline: none;
}

.chat-widget-model-select option {
  color: #151821;
}

.chat-widget-composer-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.chat-widget-composer-body.is-readonly {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  padding: 12px 14px;
}

.chat-widget-input {
  width: 100%;
  min-height: 28px;
  max-height: 96px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  line-height: 1.5;
  resize: none;
  outline: none;
}

.chat-widget-input.is-readonly {
  min-height: 52px;
  max-height: 140px;
  color: var(--text-soft);
  cursor: default;
}

.chat-widget-input::placeholder {
  color: var(--text-soft);
}

.chat-widget-run {
  width: 36px;
  min-width: 36px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(247, 162, 76, 0.14);
  color: var(--text-main);
}

.chat-widget-run svg {
  width: 16px;
  height: 16px;
}

.chat-widget-run.is-pending svg {
  animation: plugin-spin 0.9s linear infinite;
}

.chat-widget-run:disabled {
  opacity: 0.54;
  cursor: default;
}

body[data-theme="light"] .chat-widget-run {
  border-color: rgba(27, 42, 54, 0.18);
  background: rgba(247, 162, 76, 0.18);
  color: #17212b;
}

body[data-theme="light"] .chat-widget-input {
  background: transparent;
  color: var(--text-main);
}

body[data-theme="light"] .chat-widget-response,
body[data-theme="light"] .chat-widget-composer-body,
body[data-theme="light"] .chat-widget-audio-card,
body[data-theme="light"] .sound-dialog-controls-grid {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(27, 42, 54, 0.08);
}

body[data-theme="light"] .sound-dialog-select,
body[data-theme="light"] .sound-dialog-instructions {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(27, 42, 54, 0.1);
  color: var(--text-main);
}

body[data-theme="light"] .chat-widget-model-picker {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(27, 42, 54, 0.08);
}

body[data-theme="light"] .chat-widget-statusbar {
  border-top-color: rgba(27, 42, 54, 0.08);
  background:
    linear-gradient(180deg, rgba(248, 250, 253, 0.98), rgba(242, 246, 250, 0.94));
}

body[data-theme="light"] .chat-widget-statusbar-label {
  color: rgba(48, 61, 78, 0.72);
}

body[data-theme="light"] .chat-widget-image {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.78);
}

body[data-theme="light"] .chat-widget-image-download {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(247, 162, 76, 0.2);
  color: #17212b;
}

body[data-theme="light"] .plugin-quick-launch {
}

body[data-theme="light"] .plugin-quick-launch-label {
  color: #24374d;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.28);
}

body[data-theme="light"] .plugin-quick-launch-icon {
  border-color: rgba(146, 182, 218, 0.28);
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.84), transparent 42%),
    radial-gradient(circle at 76% 82%, rgba(132, 212, 255, 0.24), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(230, 242, 255, 0.66)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 -10px 22px rgba(130, 186, 255, 0.08),
    0 0 0 1px rgba(146, 182, 218, 0.18),
    0 16px 30px rgba(54, 72, 96, 0.16),
    0 0 24px rgba(137, 205, 255, 0.18),
    0 0 34px rgba(76, 190, 255, 0.22);
}

body[data-theme="light"] .plugin-quick-launch-frame::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(72, 186, 255, 0.22), transparent 54%),
    radial-gradient(circle at 50% 50%, rgba(110, 220, 255, 0.16), transparent 68%),
    radial-gradient(circle at 50% 86%, rgba(158, 208, 255, 0.1), transparent 54%);
}

body[data-theme="light"] .plugin-quick-launch-icon::before {
  border-color: rgba(255, 255, 255, 0.56);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at 72% 84%, rgba(91, 205, 255, 0.06), transparent 42%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -6px 12px rgba(71, 132, 214, 0.04);
}

body[data-theme="light"] .plugin-quick-launch-icon::after {
  background:
    linear-gradient(136deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.18) 26%, transparent 44%),
    linear-gradient(320deg, rgba(146, 224, 255, 0.18) 0%, transparent 34%);
}

body[data-theme="light"] .plugin-quick-launch-icon-liquid {
  background:
    linear-gradient(180deg, rgba(120, 209, 255, 0.78), rgba(58, 142, 220, 0.34)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.24), transparent 58%);
}

body[data-theme="light"] .plugin-quick-launch-icon.is-complete {
  border-color: rgba(146, 182, 218, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 0 0 1px rgba(146, 182, 218, 0.12),
    0 14px 28px rgba(54, 72, 96, 0.16),
    0 0 24px rgba(137, 205, 255, 0.2);
}

body[data-theme="light"] .plugin-quick-launch-icon.is-error {
  border-color: rgba(218, 102, 102, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 0 0 1px rgba(218, 102, 102, 0.12),
    0 14px 28px rgba(54, 72, 96, 0.16),
    0 0 24px rgba(255, 102, 102, 0.14);
}

body[data-theme="light"] .plugin-quick-launch-status-dot {
  border-color: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 0 0 4px rgba(255, 75, 75, 0.12),
    0 6px 14px rgba(255, 75, 75, 0.22);
}

body[data-theme="light"] .plugin-quick-launch-panel {
  border-color: rgba(84, 112, 148, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(237, 244, 251, 0.86)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    0 22px 48px rgba(54, 72, 96, 0.14),
    0 10px 24px rgba(54, 72, 96, 0.1);
}

body[data-theme="light"] .plugin-quick-launch-input {
  border-color: rgba(84, 112, 148, 0.14);
  background: rgba(255, 255, 255, 0.94);
  color: #1f2d3d;
}

body[data-theme="light"] .plugin-quick-launch-input::placeholder {
  color: rgba(31, 45, 61, 0.46);
}

body[data-theme="light"] .plugin-quick-launch-confirm {
  border-color: rgba(214, 145, 64, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 224, 184, 0.98), rgba(255, 240, 219, 0.98)),
    rgba(255, 255, 255, 0.92);
  color: #8c4c10;
}

body[data-theme="light"] .plugin-creator-textarea {
  color: var(--text-main);
}

body[data-theme="light"] .plugin-creator-template {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(20, 24, 33, 0.7);
}

body[data-theme="light"] .plugin-creator-template.is-active {
  border-color: rgba(67, 121, 214, 0.18);
  background: rgba(76, 132, 226, 0.1);
  color: #315fa8;
}

body[data-theme="light"] .plugin-creator-debug {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.7);
}

body[data-theme="light"] .plugin-creator-edit-tools {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.7);
}

body[data-theme="light"] .plugin-creator-followups {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.7);
}

body[data-theme="light"] .plugin-creator-scope-option,
body[data-theme="light"] .plugin-creator-followup-option {
  background: rgba(27, 42, 54, 0.03);
}

body[data-theme="light"] .plugin-creator-scope-option {
  border-color: rgba(27, 42, 54, 0.12);
  color: rgba(20, 24, 33, 0.7);
}

body[data-theme="light"] .plugin-creator-scope-option.is-active {
  border-color: rgba(67, 121, 214, 0.18);
  background: rgba(76, 132, 226, 0.1);
  color: #315fa8;
}

body[data-theme="light"] .plugin-creator-submit {
  border-color: rgba(27, 42, 54, 0.16);
  background: rgba(247, 162, 76, 0.18);
  color: #17212b;
}

body[data-theme="light"] .plugin-creator-apply.is-ready {
  border-color: rgba(84, 150, 96, 0.2);
  background: rgba(84, 150, 96, 0.1);
  color: #356d41;
}

body[data-theme="light"] .system-settings-input {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .system-settings-tab {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(27, 42, 54, 0.72);
}

body[data-theme="light"] .system-settings-tab.is-active {
  background: rgba(84, 150, 96, 0.14);
  border-color: rgba(84, 150, 96, 0.24);
  color: #21452a;
}

body[data-theme="light"] .system-settings-select {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .system-settings-group,
body[data-theme="light"] .system-settings-provider-card {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .desktop-style-select {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .system-settings-actions .ghost-btn:disabled,
body[data-theme="light"] .system-settings-actions .auth-submit:disabled {
  background: rgba(27, 42, 54, 0.05);
  border-color: rgba(27, 42, 54, 0.08);
  color: rgba(27, 42, 54, 0.4);
}

.notepad-plugin-textarea {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--text-main);
  line-height: 1.6;
  resize: none;
  outline: none;
  box-shadow: none;
  font: inherit;
  overflow: auto;
}

body[data-theme="light"] .plugin-loader {
  border-color: rgba(27, 42, 54, 0.14);
  border-top-color: var(--accent-strong);
}

body[data-theme="light"] .widget-port-info {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.92);
}

body[data-theme="light"] .widget-port-label {
  color: var(--text-main);
}

body[data-theme="light"] .widget-port-meta {
  color: rgba(27, 42, 54, 0.54);
}

body[data-theme="light"] .widget-port-dot {
  border-color: rgba(27, 42, 54, 0.18);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .widget-port.is-input .widget-port-dot {
  border-color: rgba(64, 133, 214, 0.48);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.72),
    0 0 16px rgba(109, 182, 255, 0.18);
}

body[data-theme="light"] .widget-port.is-output .widget-port-dot {
  border-color: rgba(124, 92, 255, 0.56);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.72),
    0 0 16px rgba(124, 92, 255, 0.2);
}

body[data-theme="light"] .widget-port.is-connection-hovered.is-output .widget-port-dot,
body[data-theme="light"] .widget-port.is-connection-selected.is-output .widget-port-dot,
body[data-theme="light"] .widget-port.is-connection-active.is-output .widget-port-dot {
  border-color: rgba(124, 92, 255, 0.68);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.76),
    0 0 0 8px rgba(124, 92, 255, 0.12),
    0 0 24px rgba(104, 76, 255, 0.28);
}

body[data-theme="light"] .widget-port.is-connection-hovered.is-input .widget-port-dot,
body[data-theme="light"] .widget-port.is-connection-selected.is-input .widget-port-dot,
body[data-theme="light"] .widget-port.is-connection-active.is-input .widget-port-dot {
  border-color: rgba(6, 182, 212, 0.64);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.76),
    0 0 0 8px rgba(6, 182, 212, 0.12),
    0 0 24px rgba(6, 145, 178, 0.24);
}

body[data-theme="light"] .connection-path {
  stroke: rgba(104, 76, 255, 0.88);
  filter:
    drop-shadow(0 0 6px rgba(104, 76, 255, 0.2))
    drop-shadow(0 0 14px rgba(124, 92, 255, 0.12));
}

body[data-theme="light"] .connection-path.is-curved {
  stroke: rgba(159, 124, 255, 0.86);
  filter:
    drop-shadow(0 0 7px rgba(159, 124, 255, 0.2))
    drop-shadow(0 0 14px rgba(104, 76, 255, 0.1));
}

body[data-theme="light"] .connection-path.is-selected {
  stroke: rgba(90, 60, 255, 0.98);
  filter:
    drop-shadow(0 0 8px rgba(124, 92, 255, 0.32))
    drop-shadow(0 0 16px rgba(104, 76, 255, 0.18));
}

body[data-theme="light"] .connection-path.is-curved.is-selected {
  stroke: rgba(104, 76, 255, 0.96);
  filter:
    drop-shadow(0 0 8px rgba(159, 124, 255, 0.3))
    drop-shadow(0 0 16px rgba(104, 76, 255, 0.16));
}

body[data-theme="light"] .connection-path-flow {
  stroke: rgba(177, 139, 255, 0.8);
  filter: none;
}

body[data-theme="light"] .connection-path-flow.is-curved {
  stroke: rgba(196, 168, 255, 0.8);
  filter: none;
}

body[data-theme="light"] .connection-path-flow.is-selected {
  stroke: rgba(124, 92, 255, 0.98);
  filter:
    drop-shadow(0 0 7px rgba(124, 92, 255, 0.28))
    drop-shadow(0 0 14px rgba(104, 76, 255, 0.16));
}

body[data-theme="light"] .connection-path-flow.is-curved.is-selected {
  stroke: rgba(139, 108, 255, 0.96);
  filter:
    drop-shadow(0 0 7px rgba(159, 124, 255, 0.28))
    drop-shadow(0 0 14px rgba(104, 76, 255, 0.16));
}

body[data-theme="light"] .connection-endpoint {
  stroke: rgba(255, 255, 255, 0.86);
}

body[data-theme="light"] .connection-endpoint.is-source {
  fill: #684cff;
  filter: drop-shadow(0 0 9px rgba(104, 76, 255, 0.28));
}

body[data-theme="light"] .connection-endpoint.is-target {
  fill: #06b6d4;
  filter: drop-shadow(0 0 9px rgba(6, 182, 212, 0.24));
}

body[data-theme="light"] .connection-endpoint.is-selected.is-source,
body[data-theme="light"] .connection-endpoint.is-hovered.is-source,
body[data-theme="light"] .connection-edge:hover .connection-endpoint.is-source,
body[data-theme="light"] .connection-endpoint.is-active.is-source {
  filter:
    drop-shadow(0 0 9px rgba(124, 92, 255, 0.34))
    drop-shadow(0 0 18px rgba(104, 76, 255, 0.18));
}

body[data-theme="light"] .connection-endpoint.is-selected.is-target,
body[data-theme="light"] .connection-endpoint.is-hovered.is-target,
body[data-theme="light"] .connection-edge:hover .connection-endpoint.is-target,
body[data-theme="light"] .connection-endpoint.is-active.is-target {
  filter:
    drop-shadow(0 0 9px rgba(6, 182, 212, 0.34))
    drop-shadow(0 0 18px rgba(6, 145, 178, 0.16));
}

body[data-theme="light"] .connection-path.is-invalid {
  stroke: rgba(212, 106, 106, 0.54);
  filter: drop-shadow(0 0 5px rgba(212, 74, 74, 0.08));
}

body[data-theme="light"] .plugin-ui-badge,
body[data-theme="light"] .plugin-ui-button {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-main);
}

body[data-theme="light"] .plugin-ui-badge.is-success {
  border-color: rgba(77, 156, 94, 0.16);
  background: rgba(100, 179, 117, 0.1);
  color: #275a34;
}

body[data-theme="light"] .plugin-ui-badge.is-warning {
  border-color: rgba(184, 144, 56, 0.18);
  background: rgba(240, 197, 90, 0.12);
  color: #7b5a11;
}

body[data-theme="light"] .plugin-ui-badge.is-accent,
body[data-theme="light"] .plugin-ui-button.is-primary {
  border-color: rgba(67, 121, 214, 0.18);
  background: rgba(76, 132, 226, 0.1);
  color: #315fa8;
}

body[data-theme="light"] .plugin-ui-button.is-danger {
  border-color: rgba(178, 74, 74, 0.18);
  background: rgba(217, 92, 92, 0.1);
  color: #8b3030;
}

body[data-theme="light"] .plugin-ui-code {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-main);
}

body[data-theme="light"] .plugin-ui-input {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-main);
}

body[data-theme="light"] .plugin-ui-metric {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .plugin-ui-metric.is-success {
  border-color: rgba(77, 156, 94, 0.14);
  background: rgba(100, 179, 117, 0.1);
}

body[data-theme="light"] .plugin-ui-metric.is-warning {
  border-color: rgba(184, 144, 56, 0.18);
  background: rgba(240, 197, 90, 0.12);
}

body[data-theme="light"] .plugin-ui-metric.is-warning .plugin-ui-metric-value {
  color: #b13f3f;
}

body[data-theme="light"] .plugin-ui-metric.is-accent {
  border-color: rgba(67, 121, 214, 0.18);
  background: rgba(76, 132, 226, 0.1);
}

body[data-theme="light"] .loop-node-progress {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .loop-node-progress-track {
  background: rgba(27, 42, 54, 0.08);
}

body[data-theme="light"] .notepad-plugin-textarea {
  background: transparent;
  color: var(--text-main);
}


body[data-theme="light"] .plugin-ui-status,
body[data-theme="light"] .plugin-ui-empty {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(20, 24, 33, 0.68);
}

body[data-theme="light"] .interface-settings-chip,
body[data-theme="light"] .interface-settings-toggle {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-main);
}

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

.resize-handle {
  position: absolute;
  width: 40px;
  height: 40px;
  right: 0;
  bottom: 0;
  z-index: 4;
  cursor: nwse-resize;
  touch-action: none;
}

.resize-handle::before,
.resize-handle::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  pointer-events: none;
}

.resize-handle::before {
  width: 18px;
  height: 2px;
  transform: rotate(-45deg);
  transform-origin: right bottom;
}

.resize-handle::after {
  width: 11px;
  height: 2px;
  transform: rotate(-45deg);
  transform-origin: right bottom;
  right: 13px;
  bottom: 13px;
}

body[data-theme="light"] .resize-handle::before,
body[data-theme="light"] .resize-handle::after {
  background: rgba(23, 33, 43, 0.78);
}

.composer {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(320px, 42vw) auto;
  gap: 10px;
  align-items: end;
  width: min(760px, calc(100vw - 32px));
  min-height: var(--composer-shell-height);
  padding: 8px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 12, 20, 0.86);
  box-shadow: var(--shadow);
}

body[data-theme="light"] .composer {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.76);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  pointer-events: none;
}

.composer-toolbar {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: min(760px, calc(100vw - 32px));
}


.toolbar-model-picker {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.toolbar-model-select {
  max-width: min(320px, calc(100vw - 220px));
  min-width: 168px;
  height: 34px;
  padding: 0 32px 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 207, 115, 0.24);
  background: rgba(255, 207, 115, 0.12);
  color: var(--text-main);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
}

.toolbar-model-select option {
  background: #16202a;
  color: #f3efe7;
}

.toolbar-model-select:disabled {
  opacity: 0.72;
}

body[data-theme="light"] .toolbar-model-select {
  border-color: rgba(175, 120, 20, 0.24);
  background: rgba(210, 169, 88, 0.14);
  color: var(--text-main);
  color-scheme: light;
}

body[data-theme="light"] .toolbar-model-select option {
  background: #ffffff;
  color: #17212b;
}

.tool-btn {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(243, 239, 231, 0.72);
}

.tool-btn:hover {
  border-color: rgba(255, 207, 115, 0.42);
  background: rgba(255, 207, 115, 0.12);
  color: var(--text-main);
}

.tool-btn.is-active {
  border-color: rgba(255, 207, 115, 0.4);
  background: rgba(255, 207, 115, 0.18);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 207, 115, 0.12);
}

body[data-theme="light"] .tool-btn {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(27, 42, 54, 0.04);
  color: rgba(27, 42, 54, 0.62);
}

body[data-theme="light"] .tool-btn:hover {
  border-color: rgba(175, 120, 20, 0.26);
  background: rgba(210, 169, 88, 0.14);
  color: #1b2a36;
}

body[data-theme="light"] .tool-btn.is-active {
  border-color: rgba(175, 120, 20, 0.26);
  background: rgba(210, 169, 88, 0.18);
  color: #8c5a00;
  box-shadow: inset 0 0 0 1px rgba(175, 120, 20, 0.08);
}

.composer-field {
  display: block;
}

.assistant-chat-dock {
  position: fixed;
  left: 84px;
  bottom: 24px;
  z-index: 83;
  isolation: isolate;
}

.assistant-chat-toggle {
  position: relative;
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 12, 20, 0.88);
  color: var(--text-main);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.assistant-chat-toggle:hover,
.assistant-chat-dock.is-open .assistant-chat-toggle {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.assistant-chat-toggle-icon,
.assistant-chat-toggle-icon svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.assistant-chat-toggle-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.knowledge-base-dock {
  position: fixed;
  left: 144px;
  bottom: 24px;
  z-index: 83;
  isolation: isolate;
}

.knowledge-base-toggle {
  position: relative;
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 12, 20, 0.88);
  color: var(--text-main);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.knowledge-base-toggle:hover,
.knowledge-base-toggle.is-loading {
  border-color: rgba(139, 214, 255, 0.42);
  background: rgba(139, 214, 255, 0.14);
  color: #a6e4ff;
}

.knowledge-base-dock.is-running .knowledge-base-toggle {
  border-color: rgba(139, 214, 255, 0.32);
  background:
    linear-gradient(180deg, rgba(139, 214, 255, 0.2), rgba(10, 12, 20, 0.9)),
    rgba(10, 12, 20, 0.9);
  color: #c9f1ff;
}

.knowledge-base-dock.is-open .knowledge-base-toggle {
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(139, 214, 255, 0.18) inset;
}

.knowledge-base-dock.is-tucked .knowledge-base-toggle {
  background:
    linear-gradient(180deg, rgba(255, 207, 115, 0.18), rgba(10, 12, 20, 0.9)),
    rgba(10, 12, 20, 0.9);
  color: #ffe3a3;
}

.knowledge-base-dock.is-running .knowledge-base-toggle::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #58f0ff;
  box-shadow: 0 0 0 3px rgba(88, 240, 255, 0.16);
}

.knowledge-base-dock.is-tucked .knowledge-base-toggle::after {
  content: none;
  display: none;
  box-shadow: none;
}

.assistant-chat-dock.is-running .assistant-chat-toggle,
.social-dock-shell.is-running .social-dock-toggle {
  border-color: rgba(255, 207, 115, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 207, 115, 0.18), rgba(10, 12, 20, 0.9)),
    rgba(10, 12, 20, 0.9);
  color: #ffe3a3;
}

.assistant-chat-dock.is-open .assistant-chat-toggle,
.social-dock-shell.is-open .social-dock-toggle {
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(255, 207, 115, 0.16) inset;
}

.assistant-chat-dock.is-tucked .assistant-chat-toggle,
.social-dock-shell.is-tucked .social-dock-toggle {
  background:
    linear-gradient(180deg, rgba(255, 207, 115, 0.14), rgba(10, 12, 20, 0.88)),
    rgba(10, 12, 20, 0.88);
  color: #ffd98a;
}

.assistant-chat-dock.is-running .assistant-chat-toggle::after,
.social-dock-shell.is-running .social-dock-toggle::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ffcf73;
  box-shadow: 0 0 0 3px rgba(255, 207, 115, 0.16);
}

.assistant-chat-dock.is-open .assistant-chat-toggle::after,
.social-dock-shell.is-open .social-dock-toggle::after {
  background: #58f0ff;
  box-shadow: 0 0 0 3px rgba(88, 240, 255, 0.15);
}

.assistant-chat-dock.is-tucked .assistant-chat-toggle::after,
.social-dock-shell.is-tucked .social-dock-toggle::after {
  content: none;
  display: none;
  box-shadow: none;
}

.knowledge-base-toggle.is-loading {
  cursor: progress;
}

.knowledge-base-toggle-icon,
.knowledge-base-toggle-icon svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.knowledge-base-toggle-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.widget.is-dock-managed-widget .widget-focus-btn,
.widget.is-knowledge-base-dock-widget .widget-focus-btn {
  display: none;
}

.assistant-chat-panel {
  position: fixed;
  z-index: auto;
  top: clamp(64px, 9vh, 104px);
  left: clamp(24px, 12vw, 240px);
  width: min(76vw, calc(100vw - 48px));
  min-width: min(760px, calc(100vw - 48px));
  height: min(76vh, calc(100vh - 96px));
  min-height: min(520px, calc(100vh - 96px));
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 72px);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.045), transparent 32%),
    linear-gradient(180deg, rgba(25, 30, 42, 0.98), rgba(10, 14, 22, 0.98)),
    rgba(9, 12, 19, 0.96);
  box-shadow:
    0 32px 76px rgba(0, 0, 0, 0.34),
    0 14px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  overflow: hidden;
  resize: both;
}

.assistant-chat-panel.is-dragging {
  user-select: none;
  box-shadow:
    0 34px 84px rgba(0, 0, 0, 0.38),
    0 16px 34px rgba(0, 0, 0, 0.26);
}

.assistant-chat-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.055), transparent 24%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

.assistant-chat-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    transparent;
  cursor: grab;
  touch-action: none;
}

.assistant-chat-panel.is-dragging .assistant-chat-header {
  cursor: grabbing;
}

.assistant-chat-header button,
.assistant-chat-header input,
.assistant-chat-header select,
.assistant-chat-header textarea,
.assistant-chat-header a {
  cursor: auto;
}

.assistant-chat-title-wrap,
.assistant-chat-main-title-wrap,
.assistant-chat-session-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.assistant-chat-title,
.assistant-chat-main-title,
.assistant-chat-sidebar-title {
  color: var(--text-main);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.25;
}

.assistant-chat-subtitle,
.assistant-chat-main-meta,
.assistant-chat-session span,
.assistant-chat-session small,
.assistant-chat-message-role {
  color: var(--text-soft);
  font-size: 0.74rem;
  line-height: 1.35;
}

.assistant-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.assistant-chat-header-btn,
.assistant-chat-new-btn,
.assistant-chat-tool-btn,
.assistant-chat-send-btn {
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.assistant-chat-header-btn:hover,
.assistant-chat-new-btn:hover,
.assistant-chat-tool-btn:hover,
.assistant-chat-send-btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.assistant-chat-header-btn svg,
.assistant-chat-new-btn svg,
.assistant-chat-tool-btn svg,
.assistant-chat-send-btn svg {
  width: 15px;
  height: 15px;
  display: block;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.assistant-chat-body {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  height: calc(100% - 68px);
  min-height: 0;
}

.assistant-chat-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 12px 10px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.02);
}

.assistant-chat-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.assistant-chat-session-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding: 0 2px 8px;
}

.assistant-chat-session {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.assistant-chat-session:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
}

.assistant-chat-session.is-active {
  border-color: rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
}

.assistant-chat-session strong,
.assistant-chat-session span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-chat-session strong {
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 850;
}

.assistant-chat-session small {
  white-space: nowrap;
}

.assistant-chat-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
}

.assistant-chat-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 0 2px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.assistant-chat-view-tabs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background: rgba(8, 12, 24, 0.38);
}

.assistant-chat-view-tab {
  min-width: 52px;
  height: 28px;
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(216, 231, 242, 0.66);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
}

.assistant-chat-view-tab:hover,
.assistant-chat-view-tab:focus-visible {
  color: rgba(244, 249, 253, 0.94);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.assistant-chat-view-tab.is-active {
  color: #08090b;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(255, 255, 255, 0.12);
}

.assistant-chat-status {
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(244, 249, 253, 0.82);
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.assistant-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 2px 2px 4px;
}

.assistant-chat-assets {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  min-height: 0;
}

.assistant-chat-assets[hidden] {
  display: none;
}

.assistant-chat-assets-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 32px;
  padding: 0 2px;
}

.assistant-chat-assets-summary {
  min-width: 0;
  overflow: hidden;
  color: rgba(216, 231, 242, 0.66);
  font-size: 0.72rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-chat-asset-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background: rgba(8, 12, 24, 0.38);
}

.assistant-chat-asset-zoom-btn,
.assistant-chat-asset-zoom-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  min-height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(216, 231, 242, 0.72);
  cursor: pointer;
}

.assistant-chat-asset-zoom-btn {
  width: 26px;
  min-width: 26px;
  padding: 0;
}

.assistant-chat-asset-zoom-value {
  min-width: 48px;
  padding: 0 8px;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 900;
}

.assistant-chat-asset-zoom-btn:hover,
.assistant-chat-asset-zoom-btn:focus-visible,
.assistant-chat-asset-zoom-value:hover,
.assistant-chat-asset-zoom-value:focus-visible {
  color: rgba(244, 249, 253, 0.94);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.assistant-chat-asset-zoom-btn svg,
.assistant-chat-session-asset .workflow-asset-action-btn svg,
.assistant-chat-asset-detail-modal .workflow-asset-detail-close svg {
  width: 15px;
  height: 15px;
  display: block;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.assistant-chat-assets-viewport {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
}

.assistant-chat-assets-empty {
  margin: 12px;
  min-height: 160px;
  color: rgba(71, 85, 105, 0.62);
}

.assistant-chat-assets .workflow-asset-stage {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

.assistant-chat-session-asset .workflow-asset-title {
  white-space: nowrap;
}

.assistant-chat-message {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  align-self: flex-start;
  gap: 9px;
  max-width: min(720px, 94%);
}

.assistant-chat-message.is-user {
  align-self: flex-end;
  grid-template-columns: minmax(0, 1fr) 38px;
}

.assistant-chat-message.is-user .assistant-chat-message-avatar {
  grid-column: 2;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.assistant-chat-message.is-user .assistant-chat-message-body {
  grid-column: 1;
  grid-row: 1;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
}

.assistant-chat-message.is-pending .assistant-chat-message-body {
  opacity: 0.86;
}

.assistant-chat-message.is-error .assistant-chat-message-body {
  border-color: rgba(255, 127, 127, 0.26);
  background: rgba(255, 127, 127, 0.1);
}

.assistant-chat-message-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(244, 249, 253, 0.92);
  font-size: 0.74rem;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(24, 20, 43, 0.16);
}

.assistant-chat-message-body {
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  justify-self: start;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.assistant-chat-message-content {
  max-width: 100%;
  margin: 0;
  color: rgba(244, 249, 253, 0.92);
  font-size: 0.86rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: normal;
}

.assistant-chat-message.is-user .assistant-chat-message-content {
  white-space: pre-wrap;
}

.assistant-chat-message-content.is-streaming-text {
  white-space: pre-wrap;
}

.assistant-chat-thinking {
  max-width: 100%;
  margin: 0;
  color: rgba(221, 231, 241, 0.86);
  font-size: 0.78rem;
  line-height: 1.45;
}

.assistant-chat-thinking-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  cursor: pointer;
  color: rgba(226, 236, 246, 0.88);
  list-style: none;
}

.assistant-chat-thinking-summary::-webkit-details-marker {
  display: none;
}

.assistant-chat-thinking-label {
  font-weight: 760;
}

.assistant-chat-thinking-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.82);
  vertical-align: 0.08em;
}

.assistant-chat-thinking[data-streaming="true"] .assistant-chat-thinking-label::after {
  content: "...";
}

.assistant-chat-thinking-hint {
  color: rgba(202, 215, 228, 0.66);
  font-size: 0.72rem;
  font-weight: 650;
}

.assistant-chat-thinking-body {
  max-width: 100%;
  max-height: 240px;
  margin: 6px 0 2px;
  padding-left: 10px;
  border-left: 2px solid rgba(125, 211, 252, 0.38);
  overflow: auto;
  color: rgba(221, 231, 241, 0.82);
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.assistant-chat-message.is-user .assistant-chat-message-body {
  justify-self: end;
}

.assistant-chat-markdown {
  display: block;
  width: 100%;
  min-width: 0;
}

.assistant-chat-markdown h1,
.assistant-chat-markdown h2,
.assistant-chat-markdown h3,
.assistant-chat-markdown h4,
.assistant-chat-markdown h5,
.assistant-chat-markdown h6 {
  margin: 0 0 0.52em;
  color: rgba(248, 252, 255, 0.96);
  font-weight: 850;
  line-height: 1.25;
}

.assistant-chat-markdown h1 {
  font-size: 1.18rem;
}

.assistant-chat-markdown h2 {
  font-size: 1.05rem;
}

.assistant-chat-markdown h3,
.assistant-chat-markdown h4,
.assistant-chat-markdown h5,
.assistant-chat-markdown h6 {
  font-size: 0.94rem;
}

.assistant-chat-markdown p,
.assistant-chat-markdown ul,
.assistant-chat-markdown ol,
.assistant-chat-markdown blockquote,
.assistant-chat-markdown pre,
.assistant-chat-markdown table {
  margin: 0 0 0.72em;
}

.assistant-chat-markdown p:last-child,
.assistant-chat-markdown ul:last-child,
.assistant-chat-markdown ol:last-child,
.assistant-chat-markdown blockquote:last-child,
.assistant-chat-markdown pre:last-child,
.assistant-chat-markdown table:last-child {
  margin-bottom: 0;
}

.assistant-chat-markdown ul,
.assistant-chat-markdown ol {
  padding-left: 1.25em;
}

.assistant-chat-markdown li {
  margin: 0.16em 0;
}

.assistant-chat-markdown blockquote {
  padding: 0.62em 0.78em;
  border-left: 3px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(230, 242, 250, 0.86);
}

.assistant-chat-markdown code {
  padding: 0.08em 0.3em;
  border-radius: 5px;
  background: rgba(10, 14, 28, 0.58);
  color: #f8fafc;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.assistant-chat-markdown pre {
  max-width: 100%;
  padding: 0.85em 0.95em;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(6, 10, 22, 0.86);
  color: rgba(232, 244, 252, 0.96);
}

.assistant-chat-markdown pre code {
  display: block;
  padding: 0;
  background: transparent;
  color: inherit;
  white-space: pre;
}

.assistant-chat-markdown a {
  color: #ffffff;
  font-weight: 760;
  text-decoration: none;
}

.assistant-chat-markdown a:hover,
.assistant-chat-markdown a:focus-visible {
  text-decoration: underline;
}

.assistant-chat-markdown table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  font-size: 0.86em;
}

.assistant-chat-markdown th,
.assistant-chat-markdown td {
  padding: 0.52em 0.6em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  vertical-align: top;
}

.assistant-chat-markdown th {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(248, 252, 255, 0.96);
  font-weight: 850;
}

.assistant-chat-markdown tr:last-child td {
  border-bottom: 0;
}

.assistant-chat-markdown hr {
  height: 1px;
  margin: 0.9em 0;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
}

.assistant-chat-search-results {
  width: min(560px, 100%);
  max-width: 100%;
  display: grid;
  gap: 9px;
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(3, 7, 18, 0.28);
  color: rgba(244, 249, 253, 0.9);
}

.assistant-chat-search-header,
.assistant-chat-search-query {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.assistant-chat-search-title {
  color: rgba(248, 252, 255, 0.96);
  font-size: 0.76rem;
  font-weight: 850;
}

.assistant-chat-search-summary,
.assistant-chat-search-query small,
.assistant-chat-search-item small,
.assistant-chat-search-empty {
  color: rgba(216, 231, 242, 0.64);
  font-size: 0.72rem;
  line-height: 1.35;
}

.assistant-chat-search-group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.assistant-chat-search-query span {
  min-width: 0;
  overflow: hidden;
  color: rgba(232, 244, 252, 0.86);
  font-size: 0.74rem;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-chat-search-query small {
  flex: 0 0 auto;
  max-width: 46%;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-chat-search-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 1.2em;
}

.assistant-chat-search-item {
  min-width: 0;
  padding-left: 0.1em;
}

.assistant-chat-search-item a,
.assistant-chat-search-item-title {
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
}

.assistant-chat-search-item a:hover,
.assistant-chat-search-item a:focus-visible {
  text-decoration: underline;
}

.assistant-chat-search-item small,
.assistant-chat-search-item p {
  display: block;
  margin: 2px 0 0;
}

.assistant-chat-search-item p {
  color: rgba(230, 242, 250, 0.72);
  font-size: 0.73rem;
  line-height: 1.42;
}

.assistant-chat-search-empty {
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.assistant-chat-action-card {
  width: min(480px, 100%);
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(244, 249, 253, 0.94);
}

.assistant-chat-action-card-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.assistant-chat-action-card-eyebrow {
  color: rgba(226, 232, 240, 0.62);
  font-size: 0.68rem;
  font-weight: 900;
}

.assistant-chat-action-card-title {
  overflow: hidden;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-chat-action-card-desc {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.74rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.assistant-chat-action-card-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

.assistant-chat-action-card-primary {
  min-height: 34px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(75, 36, 200, 0.94), rgba(90, 116, 255, 0.9));
  color: #ffffff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 10px 20px rgba(75, 36, 200, 0.18);
}

.assistant-chat-action-card-primary:hover,
.assistant-chat-action-card-primary:focus-visible {
  background: linear-gradient(135deg, rgba(75, 36, 200, 0.98), rgba(90, 116, 255, 0.94));
  transform: translateY(-1px);
}

.assistant-chat-action-card.is-invoked {
  opacity: 0.72;
}

.assistant-chat-action-card-primary:disabled,
.assistant-chat-action-card-primary[aria-disabled="true"] {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(226, 232, 240, 0.56);
  box-shadow: none;
  cursor: default;
  transform: none;
}

.assistant-chat-asset-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
}

.assistant-chat-asset {
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background: rgba(8, 12, 24, 0.42);
}

.assistant-chat-asset.is-image {
  width: var(--assistant-chat-asset-width, fit-content);
}

.assistant-chat-asset.is-pending {
  width: min(420px, 100%);
  min-width: min(280px, 100%);
  border-color: rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(148, 163, 184, 0.08)),
    rgba(8, 12, 24, 0.5);
}

.assistant-chat-asset-placeholder {
  position: relative;
  min-height: 220px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 28px 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.16), transparent 38%),
    rgba(3, 7, 18, 0.58);
  text-align: center;
}

.assistant-chat-asset-shimmer {
  position: absolute;
  inset: -40%;
  background:
    linear-gradient(
      115deg,
      transparent 35%,
      rgba(255, 255, 255, 0.18) 45%,
      rgba(255, 255, 255, 0.42) 50%,
      rgba(148, 163, 184, 0.16) 56%,
      transparent 66%
    );
  transform: translateX(-35%) rotate(8deg);
  animation: assistant-chat-asset-shimmer 1.55s linear infinite;
}

.assistant-chat-asset-placeholder strong,
.assistant-chat-asset-placeholder small {
  position: relative;
  z-index: 1;
}

.assistant-chat-asset-placeholder strong {
  color: rgba(248, 252, 255, 0.96);
  font-size: 0.9rem;
  font-weight: 850;
}

.assistant-chat-asset-placeholder small {
  color: rgba(216, 231, 242, 0.68);
  font-size: 0.76rem;
  font-weight: 700;
}

.assistant-chat-asset img,
.assistant-chat-asset video {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: rgba(3, 7, 18, 0.58);
}

.assistant-chat-asset-preview {
  display: block;
  width: fit-content;
  max-width: 100%;
}

.assistant-chat-asset audio {
  display: block;
  width: min(360px, 100%);
  padding: 8px;
}

.assistant-chat-asset figcaption {
  max-width: 100%;
  padding: 8px 10px;
  overflow: hidden;
  font-size: 0.76rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-chat-asset.is-image figcaption {
  width: var(--assistant-chat-asset-width, auto);
}

.assistant-chat-asset a,
.assistant-chat-asset-caption-text {
  color: #ffffff;
  font-weight: 760;
  text-decoration: none;
}

.assistant-chat-asset a:hover,
.assistant-chat-asset a:focus-visible {
  text-decoration: underline;
}

@keyframes assistant-chat-asset-shimmer {
  0% {
    transform: translateX(-42%) rotate(8deg);
  }
  100% {
    transform: translateX(42%) rotate(8deg);
  }
}

.assistant-chat-composer {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.assistant-chat-input {
  width: 100%;
  min-height: 78px;
  max-height: 160px;
  padding: 0;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: rgba(244, 249, 253, 0.94);
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.5;
}

.assistant-chat-input::placeholder {
  color: rgba(216, 231, 242, 0.44);
}

.assistant-chat-attachments-draft {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 112px;
  overflow: auto;
  padding-top: 2px;
}

.assistant-chat-attachments-draft[hidden] {
  display: none;
}

.assistant-chat-attachment-chip {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  min-width: min(220px, 100%);
  max-width: 100%;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(244, 249, 253, 0.92);
}

.assistant-chat-attachment-chip.is-uploading {
  display: inline-flex;
  min-width: 0;
  padding: 7px 10px;
  color: rgba(244, 249, 253, 0.92);
}

.assistant-chat-attachment-preview {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.32);
  color: rgba(244, 249, 253, 0.92);
  font-size: 0.78rem;
  font-weight: 700;
}

.assistant-chat-attachment-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.assistant-chat-attachment-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

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

.assistant-chat-attachment-copy strong {
  font-size: 0.78rem;
  font-weight: 650;
}

.assistant-chat-attachment-copy small {
  color: rgba(216, 231, 242, 0.56);
  font-size: 0.68rem;
}

.assistant-chat-attachment-remove {
  width: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: rgba(216, 231, 242, 0.62);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.assistant-chat-attachment-remove:hover,
.assistant-chat-attachment-remove:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
}

.assistant-chat-attachment-remove svg {
  width: 13px;
  height: 13px;
  display: block;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.assistant-chat-drive-picker {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.assistant-chat-drive-picker-hint {
  margin: 0;
  color: rgba(216, 231, 242, 0.68);
  font-size: 0.8rem;
  line-height: 1.45;
}

.assistant-chat-drive-picker-list {
  display: grid;
  gap: 8px;
  max-height: min(54vh, 440px);
  overflow: auto;
  padding-right: 4px;
}

.assistant-chat-drive-asset-option {
  display: grid;
  grid-template-columns: 18px 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(244, 249, 253, 0.92);
  cursor: pointer;
}

.assistant-chat-drive-asset-option:hover,
.assistant-chat-drive-asset-option:focus-within {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.assistant-chat-drive-asset-option.is-disabled {
  opacity: 0.62;
  cursor: default;
}

.assistant-chat-drive-asset-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #ffffff;
}

.assistant-chat-drive-asset-preview {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.34);
  color: rgba(244, 249, 253, 0.92);
  font-size: 0.8rem;
  font-weight: 760;
}

.assistant-chat-drive-asset-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.assistant-chat-drive-asset-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.assistant-chat-drive-asset-copy strong,
.assistant-chat-drive-asset-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-chat-drive-asset-copy strong {
  color: rgba(244, 249, 253, 0.94);
  font-size: 0.84rem;
  font-weight: 700;
}

.assistant-chat-drive-asset-copy small {
  color: rgba(216, 231, 242, 0.58);
  font-size: 0.72rem;
}

.assistant-chat-drive-picker-empty {
  padding: 18px 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(216, 231, 242, 0.62);
  font-size: 0.84rem;
  text-align: center;
}

.assistant-chat-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.assistant-chat-send-btn {
  border-color: #ffffff;
  background: #ffffff;
  color: #050607;
  box-shadow: 0 10px 22px rgba(255, 255, 255, 0.12);
}

.assistant-chat-send-btn:hover:not(:disabled) {
  border-color: #f8fafc;
  background: #e5e7eb;
  color: #050607;
}

.assistant-chat-send-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

body[data-theme="light"] .assistant-chat-toggle,
body[data-theme="light"] .knowledge-base-toggle,
body[data-theme="light"] .assistant-chat-panel {
  border-color: rgba(67, 96, 132, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 253, 0.94)),
    rgba(255, 255, 255, 0.94);
  color: #172033;
  box-shadow: 0 24px 60px rgba(87, 101, 125, 0.18);
}

body[data-theme="light"] .knowledge-base-toggle:hover,
body[data-theme="light"] .knowledge-base-toggle.is-loading {
  border-color: rgba(67, 96, 132, 0.2);
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

body[data-theme="light"] .knowledge-base-dock.is-running .knowledge-base-toggle {
  border-color: rgba(37, 99, 235, 0.2);
  background:
    linear-gradient(180deg, rgba(219, 234, 254, 0.98), rgba(255, 255, 255, 0.96)),
    rgba(255, 255, 255, 0.96);
  color: #1d4ed8;
}

body[data-theme="light"] .knowledge-base-dock.is-tucked .knowledge-base-toggle {
  border-color: rgba(180, 83, 9, 0.18);
  background:
    linear-gradient(180deg, rgba(254, 243, 199, 0.98), rgba(255, 255, 255, 0.96)),
    rgba(255, 255, 255, 0.96);
  color: #92400e;
}

body[data-theme="light"] .knowledge-base-dock.is-running .knowledge-base-toggle::after {
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

body[data-theme="light"] .knowledge-base-dock.is-tucked .knowledge-base-toggle::after {
  content: none;
  display: none;
  box-shadow: none;
}

body[data-theme="light"] .assistant-chat-dock.is-running .assistant-chat-toggle,
body[data-theme="light"] .social-dock-shell.is-running .social-dock-toggle {
  border-color: rgba(180, 83, 9, 0.18);
  background:
    linear-gradient(180deg, rgba(254, 243, 199, 0.98), rgba(255, 255, 255, 0.96)),
    rgba(255, 255, 255, 0.96);
  color: #92400e;
}

body[data-theme="light"] .assistant-chat-dock.is-open .assistant-chat-toggle,
body[data-theme="light"] .social-dock-shell.is-open .social-dock-toggle {
  border-color: rgba(37, 99, 235, 0.2);
  background:
    linear-gradient(180deg, rgba(219, 234, 254, 0.98), rgba(255, 255, 255, 0.96)),
    rgba(255, 255, 255, 0.96);
  color: #1d4ed8;
}

body[data-theme="light"] .assistant-chat-dock.is-running .assistant-chat-toggle::after,
body[data-theme="light"] .social-dock-shell.is-running .social-dock-toggle::after {
  background: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.14);
}

body[data-theme="light"] .assistant-chat-dock.is-open .assistant-chat-toggle::after,
body[data-theme="light"] .social-dock-shell.is-open .social-dock-toggle::after {
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

body[data-theme="light"] .assistant-chat-panel::before {
  background:
    linear-gradient(140deg, rgba(15, 23, 42, 0.04), transparent 26%),
    linear-gradient(180deg, transparent, rgba(67, 96, 132, 0.04));
}

body[data-theme="light"] .assistant-chat-header,
body[data-theme="light"] .assistant-chat-main-header,
body[data-theme="light"] .assistant-chat-sidebar,
body[data-theme="light"] .assistant-chat-composer,
body[data-theme="light"] .assistant-chat-message-body,
body[data-theme="light"] .assistant-chat-session {
  border-color: rgba(67, 96, 132, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .assistant-chat-view-tabs,
body[data-theme="light"] .assistant-chat-asset-zoom-controls {
  border-color: rgba(67, 96, 132, 0.14);
  background: rgba(241, 245, 249, 0.82);
}

body[data-theme="light"] .assistant-chat-view-tab,
body[data-theme="light"] .assistant-chat-asset-zoom-btn,
body[data-theme="light"] .assistant-chat-asset-zoom-value,
body[data-theme="light"] .assistant-chat-assets-summary {
  color: rgba(67, 96, 132, 0.72);
}

body[data-theme="light"] .assistant-chat-view-tab:hover,
body[data-theme="light"] .assistant-chat-view-tab:focus-visible,
body[data-theme="light"] .assistant-chat-asset-zoom-btn:hover,
body[data-theme="light"] .assistant-chat-asset-zoom-btn:focus-visible,
body[data-theme="light"] .assistant-chat-asset-zoom-value:hover,
body[data-theme="light"] .assistant-chat-asset-zoom-value:focus-visible {
  color: #172033;
  background: rgba(226, 232, 240, 0.82);
}

body[data-theme="light"] .assistant-chat-view-tab.is-active {
  color: #ffffff;
  background: #111827;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

body[data-theme="light"] .assistant-chat-assets-viewport {
  border-color: rgba(67, 96, 132, 0.14);
}

body[data-theme="light"] .assistant-chat-title,
body[data-theme="light"] .assistant-chat-main-title,
body[data-theme="light"] .assistant-chat-sidebar-title,
body[data-theme="light"] .assistant-chat-session strong,
body[data-theme="light"] .assistant-chat-message-content,
body[data-theme="light"] .assistant-chat-input {
  color: #172033;
}

body[data-theme="light"] .assistant-chat-thinking,
body[data-theme="light"] .assistant-chat-thinking-summary,
body[data-theme="light"] .assistant-chat-thinking-body {
  color: #475569;
}

body[data-theme="light"] .assistant-chat-thinking-hint {
  color: #64748b;
}

body[data-theme="light"] .assistant-chat-thinking-label::before {
  background: #0284c7;
}

body[data-theme="light"] .assistant-chat-thinking-body {
  border-left-color: rgba(2, 132, 199, 0.32);
}

body[data-theme="light"] .assistant-chat-attachment-chip {
  border-color: rgba(67, 96, 132, 0.12);
  background: rgba(241, 245, 249, 0.78);
  color: #172033;
}

body[data-theme="light"] .assistant-chat-attachment-chip.is-uploading {
  color: #0f172a;
}

body[data-theme="light"] .assistant-chat-attachment-preview {
  background: rgba(226, 232, 240, 0.95);
  color: #0f172a;
}

body[data-theme="light"] .assistant-chat-send-btn {
  border-color: #0f172a;
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

body[data-theme="light"] .assistant-chat-send-btn:hover:not(:disabled) {
  border-color: #000000;
  background: #000000;
  color: #ffffff;
}

body[data-theme="light"] .assistant-chat-attachment-copy small {
  color: rgba(67, 96, 132, 0.66);
}

body[data-theme="light"] .assistant-chat-attachment-remove {
  color: rgba(67, 96, 132, 0.66);
}

body[data-theme="light"] .assistant-chat-attachment-remove:hover,
body[data-theme="light"] .assistant-chat-attachment-remove:focus-visible {
  color: #0f172a;
  background: rgba(203, 213, 225, 0.72);
}

body[data-theme="light"] .assistant-chat-drive-picker-hint,
body[data-theme="light"] .assistant-chat-drive-asset-copy small,
body[data-theme="light"] .assistant-chat-drive-picker-empty {
  color: rgba(67, 96, 132, 0.66);
}

body[data-theme="light"] .assistant-chat-drive-asset-option {
  border-color: rgba(67, 96, 132, 0.12);
  background: rgba(241, 245, 249, 0.78);
  color: #172033;
}

body[data-theme="light"] .assistant-chat-drive-asset-option:hover,
body[data-theme="light"] .assistant-chat-drive-asset-option:focus-within {
  border-color: rgba(67, 96, 132, 0.2);
  background: rgba(255, 255, 255, 0.92);
}

body[data-theme="light"] .assistant-chat-drive-asset-preview {
  background: rgba(226, 232, 240, 0.95);
  color: #0f172a;
}

body[data-theme="light"] .assistant-chat-drive-asset-copy strong {
  color: #172033;
}

body[data-theme="light"] .assistant-chat-drive-picker-empty {
  border-color: rgba(67, 96, 132, 0.18);
}

body[data-theme="light"] .assistant-chat-markdown h1,
body[data-theme="light"] .assistant-chat-markdown h2,
body[data-theme="light"] .assistant-chat-markdown h3,
body[data-theme="light"] .assistant-chat-markdown h4,
body[data-theme="light"] .assistant-chat-markdown h5,
body[data-theme="light"] .assistant-chat-markdown h6 {
  color: #0f172a;
}

body[data-theme="light"] .assistant-chat-markdown blockquote {
  border-left-color: rgba(15, 23, 42, 0.34);
  background: rgba(15, 23, 42, 0.06);
  color: rgba(30, 41, 59, 0.86);
}

body[data-theme="light"] .assistant-chat-markdown code {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

body[data-theme="light"] .assistant-chat-markdown pre {
  border-color: rgba(15, 23, 42, 0.16);
  background: #0f172a;
  color: #e2e8f0;
}

body[data-theme="light"] .assistant-chat-markdown pre code {
  background: transparent;
  color: #e2e8f0;
}

body[data-theme="light"] .assistant-chat-markdown a {
  color: #0f172a;
}

body[data-theme="light"] .assistant-chat-markdown table {
  border-color: rgba(15, 23, 42, 0.16);
}

body[data-theme="light"] .assistant-chat-markdown th,
body[data-theme="light"] .assistant-chat-markdown td {
  border-bottom-color: rgba(15, 23, 42, 0.12);
}

body[data-theme="light"] .assistant-chat-markdown th {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

body[data-theme="light"] .assistant-chat-search-results {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(248, 250, 252, 0.86);
  color: #172033;
}

body[data-theme="light"] .assistant-chat-search-title,
body[data-theme="light"] .assistant-chat-search-item a,
body[data-theme="light"] .assistant-chat-search-item-title {
  color: #0f172a;
}

body[data-theme="light"] .assistant-chat-search-query span {
  color: rgba(15, 23, 42, 0.84);
}

body[data-theme="light"] .assistant-chat-search-summary,
body[data-theme="light"] .assistant-chat-search-query small,
body[data-theme="light"] .assistant-chat-search-item small,
body[data-theme="light"] .assistant-chat-search-empty {
  color: rgba(67, 96, 132, 0.68);
}

body[data-theme="light"] .assistant-chat-search-item p {
  color: rgba(30, 41, 59, 0.72);
}

body[data-theme="light"] .assistant-chat-search-empty {
  background: rgba(15, 23, 42, 0.05);
}

body[data-theme="light"] .assistant-chat-action-card {
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.88);
  color: #0f172a;
}

body[data-theme="light"] .assistant-chat-action-card-eyebrow {
  color: rgba(15, 23, 42, 0.58);
}

body[data-theme="light"] .assistant-chat-action-card-title {
  color: #0f172a;
}

body[data-theme="light"] .assistant-chat-action-card-desc {
  color: rgba(30, 41, 59, 0.7);
}

body[data-theme="light"] .assistant-chat-action-card-primary {
  background: linear-gradient(135deg, rgba(75, 36, 200, 0.94), rgba(90, 116, 255, 0.9));
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(75, 36, 200, 0.18);
}

body[data-theme="light"] .assistant-chat-action-card-primary:hover,
body[data-theme="light"] .assistant-chat-action-card-primary:focus-visible {
  background: linear-gradient(135deg, rgba(75, 36, 200, 0.98), rgba(90, 116, 255, 0.94));
}

body[data-theme="light"] .assistant-chat-action-card-primary:disabled,
body[data-theme="light"] .assistant-chat-action-card-primary[aria-disabled="true"] {
  background: rgba(15, 23, 42, 0.08);
  color: rgba(30, 41, 59, 0.52);
  box-shadow: none;
}

body[data-theme="light"] .assistant-chat-asset {
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.76);
}

body[data-theme="light"] .assistant-chat-asset.is-pending {
  border-color: rgba(15, 23, 42, 0.18);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.06), rgba(148, 163, 184, 0.12)),
    rgba(255, 255, 255, 0.82);
}

body[data-theme="light"] .assistant-chat-asset img,
body[data-theme="light"] .assistant-chat-asset video {
  background: rgba(226, 232, 240, 0.58);
}

body[data-theme="light"] .assistant-chat-asset-placeholder {
  background:
    radial-gradient(circle at 50% 35%, rgba(15, 23, 42, 0.1), transparent 38%),
    rgba(241, 245, 249, 0.84);
}

body[data-theme="light"] .assistant-chat-asset-placeholder strong {
  color: #0f172a;
}

body[data-theme="light"] .assistant-chat-asset-placeholder small {
  color: #64748b;
}

body[data-theme="light"] .assistant-chat-asset a,
body[data-theme="light"] .assistant-chat-asset-caption-text {
  color: #0f172a;
}

body[data-theme="light"] .assistant-chat-subtitle,
body[data-theme="light"] .assistant-chat-main-meta,
body[data-theme="light"] .assistant-chat-session span,
body[data-theme="light"] .assistant-chat-session small,
body[data-theme="light"] .assistant-chat-message-role,
body[data-theme="light"] .assistant-chat-input::placeholder {
  color: rgba(67, 96, 132, 0.62);
}

body[data-theme="light"] .assistant-chat-session.is-active {
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(15, 23, 42, 0.06);
}

body[data-theme="light"] .assistant-chat-message.is-user .assistant-chat-message-body {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.06);
}

body[data-theme="light"] .assistant-chat-message-avatar {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(241, 245, 249, 0.92);
  color: #0f172a;
}

body[data-theme="light"] .assistant-chat-message.is-user .assistant-chat-message-avatar {
  border-color: #0f172a;
  background: #0f172a;
  color: #ffffff;
}

@media (min-width: 761px) and (max-width: 1024px) {
  .assistant-chat-panel {
    left: 10vw;
    width: min(80vw, calc(100vw - 48px));
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .knowledge-base-dock {
    left: 134px;
    bottom: 16px;
  }

  .assistant-chat-dock {
    left: 78px;
    bottom: 16px;
  }

  .assistant-chat-panel {
    top: 72px;
    left: 16px;
    bottom: auto;
    min-width: 0;
    width: calc(100vw - 32px);
    height: min(680px, calc(100vh - 136px));
    min-height: 0;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 104px);
    border-radius: 22px;
  }

  .assistant-chat-body {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .assistant-chat-main-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .assistant-chat-view-tabs {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .assistant-chat-assets-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .assistant-chat-sidebar {
    padding: 10px 8px;
  }

  .assistant-chat-session {
    padding: 10px;
  }
}

.social-dock-shell {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 83;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  isolation: isolate;
}

.shared-desktop-banner {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 96;
  min-width: 320px;
  max-width: min(520px, calc(100vw - 48px));
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
    rgba(12, 15, 21, 0.76);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.shared-desktop-banner-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-strong);
  background: rgba(255, 207, 115, 0.12);
  border: 1px solid rgba(255, 207, 115, 0.18);
}

.shared-desktop-banner-icon svg {
  width: 15px;
  height: 15px;
  display: block;
}

.shared-desktop-banner-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.shared-desktop-banner-title {
  color: var(--text-main);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.shared-desktop-banner-meta {
  color: var(--text-soft);
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shared-desktop-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shared-desktop-banner-exit {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.shared-desktop-banner-exit svg {
  width: 14px;
  height: 14px;
  display: block;
}

.shared-desktop-banner-exit:hover {
  border-color: rgba(255, 207, 115, 0.24);
  background: rgba(255, 207, 115, 0.08);
  color: var(--accent-strong);
}

.shared-desktop-banner.is-owner .shared-desktop-banner-icon {
  color: #26140a;
  background: linear-gradient(135deg, rgba(255, 207, 115, 0.96), rgba(255, 155, 103, 0.88));
  border-color: rgba(255, 207, 115, 0.3);
}

.social-dock-shell.is-dragging {
  user-select: none;
}

.social-dock-toggle {
  position: relative;
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 12, 20, 0.88);
  color: var(--text-main);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.social-dock-toggle:hover {
  border-color: rgba(255, 207, 115, 0.42);
  background: rgba(255, 207, 115, 0.14);
  color: var(--accent);
}

.social-dock-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-dock-toggle-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.social-dock-toggle-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ff9662 0%, #ffcf73 100%);
  color: #26140a;
  font-size: 0.68rem;
  font-weight: 700;
}

.social-dock-panel {
  position: relative;
  width: min(760px, calc(100vw - 48px));
  min-width: 640px;
  min-height: 600px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 96px);
  height: min(660px, calc(100vh - 104px));
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top left, rgba(255, 207, 115, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(25, 30, 42, 0.97), rgba(11, 15, 23, 0.97)),
    rgba(9, 12, 19, 0.96);
  box-shadow:
    0 32px 76px rgba(0, 0, 0, 0.34),
    0 14px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  overflow: hidden;
  resize: both;
}

.social-dock-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.06), transparent 22%),
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
}

.social-dock-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
  user-select: none;
  touch-action: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    transparent;
}

.social-dock-shell.is-dragging .social-dock-header {
  cursor: grabbing;
}

.social-dock-title-wrap,
.social-dock-conversation-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.social-dock-title,
.social-dock-conversation-title {
  color: var(--text-main);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.3;
}

.social-dock-subtitle,
.social-dock-conversation-copy,
.social-dock-friend-preview,
.social-dock-friend-time,
.social-dock-request-card span,
.social-dock-list-empty,
.social-dock-empty span,
.social-dock-message-meta,
.social-dock-attachment {
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.social-dock-inline-meta {
  color: var(--text-dim);
  font-size: 0.72rem;
  line-height: 1.4;
}

.social-dock-header-actions,
.social-dock-share-bar,
.social-dock-conversation-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.social-dock-header-actions {
  gap: 6px;
}

.social-dock-conversation-actions {
  gap: 10px;
}

.social-dock-header-btn,
.social-dock-share-btn,
.social-dock-inline-btn,
.social-dock-sidebar-add-btn {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-main);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.social-dock-header-btn:hover,
.social-dock-share-btn:hover,
.social-dock-inline-btn:hover,
.social-dock-sidebar-add-btn:hover {
  border-color: rgba(255, 207, 115, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.social-dock-header-btn.icon-btn,
.social-dock-share-btn.icon-btn,
.social-dock-send-btn.icon-btn,
.social-dock-sidebar-add-btn.icon-btn {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  justify-content: center;
}

.social-dock-header-btn.icon-btn svg,
.social-dock-share-btn.icon-btn svg,
.social-dock-send-btn.icon-btn svg,
.social-dock-sidebar-add-btn.icon-btn svg {
  width: 15px;
  height: 15px;
  display: block;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.social-dock-inline-btn.is-primary {
  border-color: rgba(255, 207, 115, 0.24);
  background: rgba(255, 207, 115, 0.14);
  color: var(--accent-strong);
}

.social-dock-inline-btn.is-success {
  border-color: rgba(126, 197, 138, 0.28);
  background: rgba(126, 197, 138, 0.14);
  color: #9be0a8;
}

.social-dock-inline-btn:disabled {
  cursor: default;
  opacity: 0.88;
}

.social-dock-body {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 0;
  height: calc(100% - 67px);
}

.social-dock-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
  padding: 12px 10px 10px;
}

.social-dock-sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding-top: 4px;
}

.social-dock-sidebar-add-btn {
  border-color: rgba(255, 207, 115, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 207, 115, 0.18), rgba(255, 207, 115, 0.08)),
    rgba(255, 207, 115, 0.12);
  color: var(--accent-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(24, 14, 3, 0.16);
}

.social-dock-sidebar-add-btn:hover {
  border-color: rgba(255, 207, 115, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 207, 115, 0.22), rgba(255, 207, 115, 0.1)),
    rgba(255, 207, 115, 0.14);
}

.social-dock-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.social-dock-overview-card {
  padding: 10px 10px 9px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 3px;
}

.social-dock-overview-card strong {
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.1;
}

.social-dock-overview-card span {
  color: var(--text-dim);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.social-dock-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.social-dock-toolbar {
  display: grid;
  gap: 10px;
}

.social-dock-search-shell {
  display: block;
}

.social-dock-search-input {
  width: 100%;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font: inherit;
  font-size: 0.8rem;
  outline: none;
}

.social-dock-search-input::placeholder {
  color: var(--text-dim);
}

.social-dock-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.social-dock-filter {
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
}

.social-dock-filter.is-active {
  border-color: rgba(255, 207, 115, 0.24);
  background: rgba(255, 207, 115, 0.12);
  color: var(--accent-strong);
}

.social-dock-tab {
  position: relative;
  min-height: 34px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.social-dock-tab svg {
  width: 16px;
  height: 16px;
  display: block;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.social-dock-tab::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  transform: translateX(-50%);
  transition: background 180ms ease, opacity 180ms ease;
  opacity: 0;
}

.social-dock-tab.is-active {
  border-color: rgba(255, 207, 115, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 207, 115, 0.24), rgba(255, 207, 115, 0.08)),
    rgba(255, 207, 115, 0.14);
  color: var(--accent-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 18px rgba(24, 14, 3, 0.14);
  transform: translateY(-1px);
}

.social-dock-tab.is-active::after {
  background: currentColor;
  opacity: 1;
}

.social-dock-tab-badge,
.social-dock-friend-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 207, 115, 0.22);
  color: var(--accent-strong);
  font-size: 0.64rem;
  font-weight: 700;
}

.social-dock-tab-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  margin-left: 0;
}

.social-dock-list,
.social-dock-content,
.social-dock-messages {
  min-height: 0;
}

.social-dock-list {
  flex: 1 1 auto;
  overflow: auto;
  padding: 0 2px 8px;
}

.social-dock-friend-item,
.social-dock-request-card,
.social-dock-list-empty {
  width: 100%;
  margin-bottom: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.social-dock-session-card,
.social-dock-shared-invite {
  position: relative;
  overflow: hidden;
}

.social-dock-session-card::before,
.social-dock-shared-invite::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(255, 207, 115, 0.9), rgba(126, 197, 138, 0.7));
  opacity: 0.9;
}

.social-dock-session-card.is-active-session {
  border-color: rgba(255, 207, 115, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 207, 115, 0.15), rgba(255, 207, 115, 0.05)),
    rgba(255, 207, 115, 0.08);
}

.social-dock-friend-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  text-align: left;
  color: inherit;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.social-dock-friend-item:hover,
.social-dock-request-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
}

.social-dock-friend-item.is-active {
  border-color: rgba(255, 207, 115, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 207, 115, 0.16), rgba(255, 207, 115, 0.05)),
    rgba(255, 207, 115, 0.09);
  transform: translateY(-1px);
}

.social-dock-friend-item.has-unread {
  border-color: rgba(255, 207, 115, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(255, 207, 115, 0.05);
}

.social-dock-friend-copy,
.social-dock-request-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.social-dock-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.social-dock-request-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.social-dock-identity-badge {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #26140a;
  font-size: 0.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffcf73 0%, #ff9b67 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 10px 20px rgba(0, 0, 0, 0.16);
}

.social-dock-identity-badge.is-online {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 0 0 1px rgba(126, 197, 138, 0.24),
    0 10px 20px rgba(0, 0, 0, 0.16);
}

.social-dock-identity-badge.is-offline {
  filter: grayscale(1) saturate(0.18) contrast(0.95);
  opacity: 0.82;
}

.social-dock-identity-badge.is-shared {
  background: linear-gradient(135deg, #ffcf73 0%, #8fd49e 100%);
}

.social-dock-friend-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.social-dock-friend-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.social-dock-friend-title-wrap {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.social-dock-friend-tail {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.social-dock-friend-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.social-dock-presence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.7rem;
  white-space: nowrap;
}

.social-dock-presence::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.social-dock-presence.is-online {
  color: #9be0a8;
}

.social-dock-presence.is-online::before {
  background: #7ec58a;
  box-shadow: 0 0 0 3px rgba(126, 197, 138, 0.14);
}

.social-dock-presence.is-offline {
  color: var(--text-dim);
}

.social-dock-presence.is-offline::before {
  background: rgba(255, 255, 255, 0.18);
}

.social-dock-content {
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0)),
    transparent;
}

.social-dock-conversation-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.social-dock-status-pill {
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.social-dock-status-pill.is-accent {
  border-color: rgba(255, 207, 115, 0.22);
  background: rgba(255, 207, 115, 0.1);
  color: var(--accent-strong);
}

.social-dock-messages {
  flex: 1 1 auto;
  overflow: auto;
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.social-dock-message {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.social-dock-message.is-mine {
  justify-content: flex-end;
}

.social-dock-message-body {
  min-width: 0;
  display: flex;
}

.social-dock-message-bubble {
  width: min(388px, 100%);
  padding: 10px 12px 11px;
  border-radius: 18px 18px 18px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.028);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.social-dock-message.is-mine .social-dock-message-bubble {
  border-radius: 18px 18px 12px 18px;
  border-color: rgba(255, 207, 115, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 207, 115, 0.16), rgba(255, 207, 115, 0.05)),
    rgba(255, 207, 115, 0.085);
  box-shadow: 0 12px 24px rgba(32, 20, 6, 0.12);
}

.social-dock-identity-badge.is-message {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 11px;
  font-size: 0.7rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.12);
}

.social-dock-identity-badge.is-self {
  background: linear-gradient(135deg, #ffd890 0%, #ffb87c 100%);
}

.social-dock-message-meta {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.social-dock-message-text {
  margin-top: 5px;
  color: var(--text-main);
  font-size: 0.74rem;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

.social-dock-attachment {
  margin-top: 8px;
  font-size: 0.72rem;
}

.social-dock-attachment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.social-dock-attachment-image-link {
  display: block;
  margin-top: 8px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.08);
  cursor: zoom-in;
}

.social-dock-attachment-image {
  display: block;
  width: auto;
  max-width: min(320px, 100%);
  max-height: 240px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
}

.social-dock-attachment-image.is-loading {
  min-width: min(220px, 100%);
  min-height: 132px;
}

.social-dock-attachment-image.is-error {
  min-width: min(220px, 100%);
  min-height: 132px;
  opacity: 0.6;
}

.social-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 140001;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(8, 10, 14, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.workflow-import-overlay {
  position: fixed;
  inset: 0;
  z-index: 3400;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at top, rgba(255, 176, 84, 0.14), transparent 42%),
    rgba(8, 10, 14, 0.76);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.workflow-import-overlay-panel {
  width: min(460px, calc(100vw - 40px));
  padding: 28px 28px 24px;
  border-radius: 28px;
  border: 1px solid rgba(255, 210, 136, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02)),
    rgba(14, 17, 22, 0.82);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.workflow-import-overlay-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 208, 132, 0.8);
}

.workflow-import-overlay-title {
  margin: 10px 0 0;
  font-size: 1.28rem;
  line-height: 1.15;
  color: var(--text-main);
}

.workflow-import-overlay-message {
  margin: 10px 0 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-subtle);
}

.workflow-import-overlay-progress {
  position: relative;
  margin-top: 20px;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.workflow-import-overlay-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb45a 0%, #ffd990 50%, #fff0c5 100%);
  box-shadow: 0 0 22px rgba(255, 180, 90, 0.32);
  transition: width 220ms ease;
}

.workflow-import-overlay-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 18%, rgba(255, 255, 255, 0.2) 46%, transparent 74%);
  transform: translateX(-100%);
  animation: workflow-import-overlay-shimmer 1.6s linear infinite;
}

.workflow-import-overlay-progress-label {
  margin-top: 12px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 222, 180, 0.88);
}

body.has-workflow-import-overlay {
  overflow: hidden;
}

@keyframes workflow-import-overlay-shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

.social-image-lightbox-panel {
  position: relative;
  width: min(88vw, 1100px);
  max-height: calc(100vh - 56px);
  padding: 16px 16px 14px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
    rgba(17, 20, 27, 0.92);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
  display: grid;
  gap: 10px;
}

.social-image-lightbox-image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 132px);
  border-radius: 18px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.22);
}

.social-image-lightbox-image.is-error {
  min-height: 220px;
  opacity: 0.65;
}

.social-image-lightbox-caption {
  min-height: 18px;
  color: var(--text-soft);
  font-size: 0.74rem;
}

.social-image-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(9, 11, 15, 0.5);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-image-lightbox-close svg {
  width: 14px;
  height: 14px;
  display: block;
}

.social-image-lightbox-close:hover {
  border-color: rgba(255, 207, 115, 0.28);
  color: var(--accent-strong);
}

.social-dock-empty {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
}

.social-dock-empty strong,
.social-dock-list-empty,
.social-dock-request-card strong {
  color: var(--text-main);
}

.social-dock-list-empty {
  display: grid;
  gap: 6px;
}

.social-dock-list-empty span {
  color: var(--text-soft);
}

.social-dock-section-label {
  padding: 2px 4px 8px;
  display: grid;
  gap: 3px;
}

.social-dock-section-label strong {
  color: var(--text-main);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.social-dock-section-label span {
  color: var(--text-dim);
  font-size: 0.7rem;
}

.social-dock-composer {
  margin: 0 16px 16px;
  padding: 0;
}

.social-dock-composer-shell {
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 20px;
  padding: 10px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.014)),
    rgba(255, 255, 255, 0.018);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 8px 18px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.social-dock-share-bar {
  flex-wrap: wrap;
  gap: 6px;
}

.social-dock-composer-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.social-dock-composer-input {
  width: 100%;
  min-height: 84px;
  padding: 6px 2px 4px;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: var(--text-main);
  font-size: 0.74rem;
  resize: none;
  outline: none;
}

.social-dock-send-btn {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent) 0%, #ffcf73 100%);
  color: #221207;
  font-weight: 700;
  transition:
    opacity 160ms ease,
    filter 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.social-dock-send-btn.is-disabled,
.social-dock-send-btn:disabled {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  box-shadow: none;
  filter: saturate(0.3);
}

.social-dock-message-bubble .social-dock-inline-btn {
  min-height: 26px;
  padding: 0 9px;
  border-radius: 10px;
  font-size: 0.7rem;
}

.social-dock-send-btn:disabled:hover {
  transform: none;
}

body[data-theme="light"] .social-dock-toggle,
body[data-theme="light"] .social-dock-panel {
  border-color: rgba(27, 42, 54, 0.12);
}

body[data-theme="light"] .shared-desktop-banner {
  border-color: rgba(27, 42, 54, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.62)),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 40px rgba(27, 42, 54, 0.12);
}

body[data-theme="light"] .shared-desktop-banner-exit {
  border-color: rgba(27, 42, 54, 0.1);
  background: rgba(27, 42, 54, 0.03);
}

body[data-theme="light"] .social-dock-toggle {
  background: rgba(255, 255, 255, 0.82);
  color: #1b2a36;
}

body[data-theme="light"] .social-dock-panel {
  background:
    radial-gradient(circle at top left, rgba(210, 169, 88, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 245, 249, 0.96)),
    rgba(255, 255, 255, 0.96);
}

body[data-theme="light"] .social-dock-sidebar,
body[data-theme="light"] .social-dock-friend-item,
body[data-theme="light"] .social-dock-request-card,
body[data-theme="light"] .social-dock-list-empty,
body[data-theme="light"] .social-dock-message-bubble,
body[data-theme="light"] .social-dock-composer-shell,
body[data-theme="light"] .social-dock-composer-input,
body[data-theme="light"] .social-dock-search-input,
body[data-theme="light"] .social-dock-header-btn,
body[data-theme="light"] .social-dock-share-btn,
body[data-theme="light"] .social-dock-inline-btn,
body[data-theme="light"] .social-dock-sidebar-add-btn,
body[data-theme="light"] .social-dock-tab,
body[data-theme="light"] .social-dock-filter,
body[data-theme="light"] .social-dock-overview-card,
body[data-theme="light"] .social-dock-status-pill {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(27, 42, 54, 0.04);
}

body[data-theme="light"] .social-dock-session-card.is-active-session {
  border-color: rgba(175, 120, 20, 0.2);
  background: rgba(210, 169, 88, 0.12);
}

body[data-theme="light"] .social-dock-inline-btn.is-success {
  border-color: rgba(77, 156, 94, 0.2);
  background: rgba(100, 179, 117, 0.12);
  color: #2f7040;
}

body[data-theme="light"] .social-dock-sidebar-add-btn {
  border-color: rgba(175, 120, 20, 0.22);
  background: rgba(210, 169, 88, 0.14);
  color: #8a5a06;
}

body[data-theme="light"] .social-dock-search-input::placeholder,
body[data-theme="light"] .social-dock-section-label span,
body[data-theme="light"] .social-dock-overview-card span {
  color: rgba(27, 42, 54, 0.58);
}

.plugin-center-btn {
  position: fixed;
  left: calc(
    50% - min(380px, calc(50vw - 16px)) - var(--plugin-center-button-size) -
      var(--plugin-center-composer-gap)
  );
  bottom: 28px;
  z-index: 81;
  width: var(--plugin-center-button-size);
  height: var(--plugin-center-button-size);
  min-width: var(--plugin-center-button-size);
  min-height: var(--plugin-center-button-size);
  padding: 0;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(243, 239, 231, 0.72);
}

.plugin-center-btn:hover {
  border-color: rgba(255, 207, 115, 0.42);
  background: rgba(255, 207, 115, 0.12);
  color: var(--text-main);
}

.supervisor-contract-admin-btn {
  left: calc(
    50% - min(380px, calc(50vw - 16px)) - var(--plugin-center-button-size) * 2 -
      var(--plugin-center-composer-gap) - 10px
  );
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f8e7c7;
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 236, 180, 0.32), transparent 42%),
    linear-gradient(135deg, rgba(192, 95, 44, 0.72), rgba(30, 117, 103, 0.68));
  font-weight: 900;
  letter-spacing: -0.08em;
}

.supervisor-contract-admin-btn:hover {
  color: #fffaf0;
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 236, 180, 0.42), transparent 42%),
    linear-gradient(135deg, rgba(217, 111, 54, 0.88), rgba(30, 117, 103, 0.82));
}

body[data-theme="light"] .plugin-center-btn {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(27, 42, 54, 0.04);
  color: rgba(27, 42, 54, 0.62);
}

body[data-theme="light"] .plugin-center-btn:hover {
  border-color: rgba(175, 120, 20, 0.26);
  background: rgba(210, 169, 88, 0.14);
  color: #1b2a36;
}

.composer-field input {
  width: 100%;
  height: var(--composer-input-height);
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-main);
  line-height: var(--composer-input-height);
}

body[data-theme="light"] .composer-field input {
  color: var(--text-main);
}

.composer-field input::placeholder {
  color: rgba(243, 239, 231, 0.4);
}

body[data-theme="light"] .composer-field input::placeholder {
  color: rgba(27, 42, 54, 0.38);
}

.composer-actions {
  display: flex;
  gap: 10px;
}

.voice-entry-btn {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 82;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 12, 20, 0.88);
  color: var(--text-main);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.voice-entry-btn:hover {
  border-color: rgba(255, 207, 115, 0.42);
  background: rgba(255, 207, 115, 0.14);
  color: var(--accent);
}

body[data-theme="light"] .voice-entry-btn {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: #1b2a36;
}

body[data-theme="light"] .voice-entry-btn:hover {
  border-color: rgba(175, 120, 20, 0.26);
  background: rgba(210, 169, 88, 0.16);
  color: #8c5a00;
}

.send-btn,
.auth-submit {
  min-height: 38px;
  min-width: 96px;
  padding: 0 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, #ffcf73 100%);
  color: #221207;
  font-weight: 700;
}

.send-btn:disabled,
.auth-submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 10, 18, 0.18);
  backdrop-filter: blur(24px) saturate(1.08);
  -webkit-backdrop-filter: blur(24px) saturate(1.08);
}

.auth-screen.is-hidden,
.auth-screen[hidden] {
  display: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.desktop-boot-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 118;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(98, 226, 255, 0.12), transparent 34%),
    rgba(6, 8, 14, 0.48);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: opacity 220ms ease, backdrop-filter 220ms ease, -webkit-backdrop-filter 220ms ease;
}

.desktop-boot-loading-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(22px) saturate(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.08);
}

.desktop-boot-loading-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  width: min(440px, calc(100vw - 44px));
  min-height: 136px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(20, 25, 36, 0.92), rgba(12, 15, 24, 0.9)),
    rgba(10, 13, 22, 0.92);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.desktop-boot-loading-ring {
  position: relative;
  width: 72px;
  aspect-ratio: 1;
  border-radius: 999px;
}

.desktop-boot-loading-ring span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid transparent;
  border-top-color: rgba(98, 226, 255, 0.95);
  border-right-color: rgba(247, 162, 76, 0.54);
  animation: desktop-boot-loading-spin 1.2s linear infinite;
}

.desktop-boot-loading-ring span:nth-child(2) {
  inset: 10px;
  border-top-color: rgba(255, 255, 255, 0.86);
  border-right-color: rgba(98, 226, 255, 0.46);
  animation-duration: 1.6s;
  animation-direction: reverse;
}

.desktop-boot-loading-ring span:nth-child(3) {
  inset: 26px;
  border-color: rgba(98, 226, 255, 0.18);
  background: rgba(98, 226, 255, 0.18);
  animation: desktop-boot-loading-pulse 1.3s ease-in-out infinite;
}

.desktop-boot-loading-copy {
  min-width: 0;
}

.desktop-boot-loading-eyebrow {
  margin: 0 0 6px;
  color: rgba(98, 226, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.desktop-boot-loading-copy h2 {
  margin: 0;
  color: var(--text-main);
  font-size: 1.18rem;
  line-height: 1.25;
}

.desktop-boot-loading-message {
  margin: 8px 0 0;
  color: rgba(216, 231, 242, 0.7);
  font-size: 0.9rem;
  line-height: 1.5;
}

body.has-desktop-boot-loading .hud,
body.has-desktop-boot-loading .composer,
body.has-desktop-boot-loading .composer-toolbar,
body.has-desktop-boot-loading .plugin-center-btn,
body.has-desktop-boot-loading .knowledge-base-dock,
body.has-desktop-boot-loading .social-dock-shell,
body.has-desktop-boot-loading .voice-entry-btn,
body.has-desktop-boot-loading .context-menu {
  pointer-events: none;
}

@keyframes desktop-boot-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes desktop-boot-loading-pulse {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.82);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

body[data-theme="light"] .desktop-boot-loading-overlay {
  background:
    radial-gradient(circle at 50% 42%, rgba(35, 128, 164, 0.13), transparent 34%),
    rgba(238, 243, 250, 0.56);
}

body[data-theme="light"] .desktop-boot-loading-card {
  border-color: rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(236, 244, 248, 0.9)),
    rgba(255, 255, 255, 0.9);
  box-shadow:
    0 28px 90px rgba(61, 85, 104, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body[data-theme="light"] .desktop-boot-loading-copy h2 {
  color: #18324b;
}

body[data-theme="light"] .desktop-boot-loading-message {
  color: rgba(24, 50, 75, 0.62);
}

.plugin-generation-loading-overlay {
  position: absolute;
  inset: -2px;
  z-index: 72;
  box-sizing: border-box;
  border-radius: 0 0 26px 26px;
  display: grid;
  place-items: stretch center;
  padding: 18px 24px 20px;
  background:
    radial-gradient(circle at 50% 42%, rgba(98, 226, 255, 0.16), transparent 38%),
    #070a12;
}

.plugin-generation.has-loading-overlay > :not(.plugin-generation-loading-overlay),
.plugin-creator.has-loading-overlay > :not(.plugin-generation-loading-overlay),
.widget-body.has-loading-overlay > :not(.plugin-generation-loading-overlay) {
  visibility: hidden;
}

.plugin-generation-loading-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto minmax(230px, 1fr) auto;
  column-gap: 14px;
  row-gap: 12px;
  width: min(620px, 100%);
  height: 100%;
  align-items: center;
  justify-items: stretch;
  align-content: stretch;
  text-align: left;
  border-radius: 20px;
}

.plugin-generation-loading-card .desktop-boot-loading-ring {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  width: 50px;
  margin-top: 0;
}

.plugin-generation-loading-copy {
  display: flex;
  min-width: 0;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  grid-column: 2;
  grid-row: 1;
}

.plugin-generation-loading-copy .desktop-boot-loading-eyebrow {
  margin-bottom: 2px;
  font-size: 0.62rem;
}

.plugin-generation-loading-copy h2 {
  font-size: 0.9rem;
  line-height: 1.18;
}

.plugin-generation-loading-copy .desktop-boot-loading-message {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 0.72rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plugin-generation-loading-copy .desktop-boot-loading-eyebrow,
.plugin-generation-loading-copy .desktop-boot-loading-message,
.plugin-generation-loading-copy h2 {
  text-align: left;
}

.plugin-generation-loading-status-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 240px);
  align-items: center;
  gap: 10px;
  width: 100%;
}

.plugin-generation-loading-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
}

.plugin-generation-loading-progress-track {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.plugin-generation-loading-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(98, 226, 255, 0.95), rgba(247, 162, 76, 0.88));
  box-shadow: 0 0 24px rgba(98, 226, 255, 0.32);
  transition: width 260ms ease;
}

.plugin-generation-loading-progress-label {
  min-width: 0;
  margin: 0;
  color: rgba(232, 244, 255, 0.82);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.plugin-generation-loading-game {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: stretch;
  position: relative;
  width: 100%;
  min-height: 230px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(98, 226, 255, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(98, 226, 255, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(98, 226, 255, 0.07) 1px, transparent 1px),
    radial-gradient(circle at 18% 24%, rgba(247, 162, 76, 0.16), transparent 22%),
    rgba(255, 255, 255, 0.035);
  background-size: 28px 28px, 28px 28px, auto, auto;
}

.plugin-generation-mini-game-intro {
  position: relative;
  z-index: 1;
  grid-row: 1 / -1;
  align-self: stretch;
  display: block;
  box-sizing: border-box;
  min-height: 0;
  padding: 12px;
  text-align: center;
}

.plugin-generation-mini-game-intro-actions {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(360px, calc(100% - 32px));
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.plugin-generation-mini-game-start,
.plugin-generation-mini-game-reset {
  min-height: 34px;
  border: 1px solid rgba(98, 226, 255, 0.28);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(98, 226, 255, 0.18), rgba(155, 124, 255, 0.18));
  color: rgba(232, 244, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.plugin-generation-mini-game-start {
  min-width: 118px;
  padding: 0 18px;
  pointer-events: auto;
}

.plugin-generation-mini-game-reset {
  min-width: 58px;
  padding: 0 12px;
  font-size: 0.72rem;
}

.plugin-generation-mini-game-start:hover,
.plugin-generation-mini-game-reset:hover {
  border-color: rgba(247, 162, 76, 0.42);
  background: linear-gradient(135deg, rgba(247, 162, 76, 0.2), rgba(98, 226, 255, 0.16));
}

.plugin-generation-mini-game-hint {
  max-width: 360px;
  margin: 0;
  color: rgba(216, 231, 242, 0.7);
  font-size: 0.74rem;
  line-height: 1.5;
  text-shadow: none;
}

.plugin-generation-mini-game-demo {
  position: absolute;
  inset: 12px;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(98, 226, 255, 0.12);
  border-radius: 14px;
  background: rgba(4, 8, 14, 0.18);
}

.plugin-generation-mini-game-demo::before,
.plugin-generation-mini-game-demo::after {
  content: "";
  position: absolute;
  inset: auto 24px 42px 24px;
  height: 1px;
  background: rgba(98, 226, 255, 0.18);
}

.plugin-generation-mini-game-demo::after {
  inset: 30px 50px auto;
  background: rgba(247, 162, 76, 0.18);
}

.plugin-generation-loading-game-piece,
.plugin-generation-loading-game-target,
.plugin-generation-loading-game-paddle {
  position: absolute;
  display: block;
}

.plugin-generation-loading-game-piece {
  left: 18%;
  top: 42%;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(135deg, #62e2ff, #9b7cff);
  box-shadow: 0 0 22px rgba(98, 226, 255, 0.44);
  animation: plugin-generation-game-piece 3.8s ease-in-out infinite;
}

.plugin-generation-loading-game-target {
  right: 18%;
  top: 26%;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(247, 162, 76, 0.54);
  border-radius: 12px;
  transform: rotate(8deg);
  box-shadow: inset 0 0 18px rgba(247, 162, 76, 0.1);
}

.plugin-generation-loading-game-paddle {
  left: 50%;
  bottom: 20px;
  width: 86px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  transform: translateX(-50%);
  animation: plugin-generation-game-paddle 3.8s ease-in-out infinite;
}

@keyframes plugin-generation-game-piece {
  0%,
  100% { transform: translate(0, 0) rotate(0deg); }
  35% { transform: translate(170px, -42px) rotate(96deg); }
  62% { transform: translate(104px, 50px) rotate(170deg); }
}

@keyframes plugin-generation-game-paddle {
  0%,
  100% { transform: translateX(-72px); }
  55% { transform: translateX(42px); }
}

.plugin-generation-mini-game-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 0;
}

.plugin-generation-mini-game-title,
.plugin-generation-mini-game-meta,
.plugin-generation-mini-game-status {
  margin: 0;
}

.plugin-generation-mini-game-title {
  color: rgba(232, 244, 255, 0.9);
  font-size: 0.82rem;
  font-weight: 900;
}

.plugin-generation-mini-game-meta {
  color: rgba(216, 231, 242, 0.56);
  font-size: 0.7rem;
  font-weight: 700;
}

.plugin-generation-minesweeper-board {
  --minesweeper-size: 8;
  position: relative;
  z-index: 1;
  align-self: center;
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(var(--minesweeper-size), minmax(0, 1fr));
  gap: 4px;
  width: min(100%, 360px);
  max-height: min(100%, 360px);
  aspect-ratio: 1;
  padding: 10px;
  border: 1px solid rgba(98, 226, 255, 0.16);
  border-radius: 14px;
  background: rgba(4, 8, 14, 0.28);
}

.plugin-generation-minesweeper-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(232, 244, 255, 0.86);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.plugin-generation-minesweeper-cell:hover {
  background: rgba(98, 226, 255, 0.16);
}

.plugin-generation-minesweeper-cell[data-state="revealed"] {
  border-color: rgba(98, 226, 255, 0.1);
  background: rgba(4, 8, 14, 0.42);
  cursor: default;
}

.plugin-generation-minesweeper-cell[data-state="flagged"] {
  border-color: rgba(247, 162, 76, 0.36);
  background: rgba(247, 162, 76, 0.14);
  color: #ffcf73;
}

.plugin-generation-minesweeper-cell[data-mine="true"] {
  border-color: rgba(255, 127, 127, 0.42);
  background: rgba(255, 127, 127, 0.18);
  color: #ff9b9b;
}

.plugin-generation-minesweeper-cell[data-count="1"] { color: #62e2ff; }
.plugin-generation-minesweeper-cell[data-count="2"] { color: #7ec58a; }
.plugin-generation-minesweeper-cell[data-count="3"] { color: #ffcf73; }
.plugin-generation-minesweeper-cell[data-count="4"],
.plugin-generation-minesweeper-cell[data-count="5"],
.plugin-generation-minesweeper-cell[data-count="6"],
.plugin-generation-minesweeper-cell[data-count="7"],
.plugin-generation-minesweeper-cell[data-count="8"] { color: #c8a7ff; }

.plugin-generation-mini-game-status {
  position: relative;
  z-index: 1;
  padding: 0 12px 10px;
  color: rgba(216, 231, 242, 0.62);
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
}

.plugin-generation-mini-game-status[data-state="won"] {
  color: rgba(126, 197, 138, 0.9);
}

.plugin-generation-mini-game-status[data-state="lost"] {
  color: rgba(255, 127, 127, 0.88);
}

.plugin-generation-game-2048 {
  position: relative;
  z-index: 1;
  align-self: stretch;
  justify-self: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(100%, 480px);
  min-height: 0;
  padding: 10px 12px;
}

.plugin-generation-game-2048-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  width: min(100%, 280px);
  aspect-ratio: 1;
  padding: 8px;
  border: 1px solid rgba(98, 226, 255, 0.16);
  border-radius: 14px;
  background: rgba(4, 8, 14, 0.28);
}

.plugin-generation-game-2048-tile {
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(232, 244, 255, 0.9);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1;
}

.plugin-generation-game-2048-tile[data-value="0"] { background: rgba(255, 255, 255, 0.05); }
.plugin-generation-game-2048-tile[data-value="2"] { background: rgba(98, 226, 255, 0.16); }
.plugin-generation-game-2048-tile[data-value="4"] { background: rgba(126, 197, 138, 0.18); }
.plugin-generation-game-2048-tile[data-value="8"] { background: rgba(247, 162, 76, 0.2); }
.plugin-generation-game-2048-tile[data-value="16"] { background: rgba(255, 207, 115, 0.22); }
.plugin-generation-game-2048-tile[data-value="32"] { background: rgba(255, 127, 127, 0.22); }
.plugin-generation-game-2048-tile[data-value="64"] { background: rgba(155, 124, 255, 0.24); }
.plugin-generation-game-2048-tile:not([data-value="0"]):not([data-value="2"]):not([data-value="4"]):not([data-value="8"]):not([data-value="16"]):not([data-value="32"]):not([data-value="64"]) {
  background: linear-gradient(135deg, rgba(98, 226, 255, 0.28), rgba(247, 162, 76, 0.28));
}

.plugin-generation-game-2048-controls {
  display: grid;
  grid-template-columns: repeat(3, 34px);
  grid-template-rows: repeat(3, 34px);
  gap: 5px;
}

.plugin-generation-game-2048-control {
  display: grid;
  place-items: center;
  min-width: 0;
  border: 1px solid rgba(98, 226, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(232, 244, 255, 0.88);
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
}

.plugin-generation-game-2048-control:hover {
  background: rgba(98, 226, 255, 0.16);
}

.plugin-generation-game-2048-control:nth-child(1) {
  grid-column: 2;
  grid-row: 1;
}

.plugin-generation-game-2048-control:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}

.plugin-generation-game-2048-control:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.plugin-generation-game-2048-control:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}

.plugin-generation-snake {
  position: relative;
  z-index: 1;
  align-self: stretch;
  justify-self: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(100%, 500px);
  min-height: 0;
  padding: 10px 12px;
}

.plugin-generation-snake-grid {
  --snake-size: 12;
  display: grid;
  grid-template-columns: repeat(var(--snake-size), minmax(0, 1fr));
  gap: 3px;
  width: min(100%, 300px);
  aspect-ratio: 1;
  padding: 8px;
  border: 1px solid rgba(98, 226, 255, 0.16);
  border-radius: 14px;
  background: rgba(4, 8, 14, 0.28);
}

.plugin-generation-snake-cell {
  display: block;
  min-width: 0;
  aspect-ratio: 1;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
}

.plugin-generation-snake-cell[data-state="head"] {
  background: linear-gradient(135deg, #62e2ff, #9b7cff);
  box-shadow: 0 0 14px rgba(98, 226, 255, 0.34);
}

.plugin-generation-snake-cell[data-state="body"] {
  background: rgba(98, 226, 255, 0.42);
}

.plugin-generation-snake-cell[data-state="food"] {
  border-radius: 999px;
  background: #ffcf73;
  box-shadow: 0 0 14px rgba(247, 162, 76, 0.36);
}

.plugin-generation-breakout {
  position: relative;
  z-index: 1;
  align-self: stretch;
  justify-self: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(100%, 500px);
  min-height: 0;
  padding: 10px 12px;
}

.plugin-generation-breakout-stage {
  position: relative;
  width: min(100%, 330px);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(98, 226, 255, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(98, 226, 255, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(98, 226, 255, 0.06) 1px, transparent 1px),
    rgba(4, 8, 14, 0.28);
  background-size: 22px 22px;
}

.plugin-generation-breakout-brick,
.plugin-generation-breakout-ball,
.plugin-generation-breakout-paddle {
  position: absolute;
  display: block;
}

.plugin-generation-breakout-brick {
  border-radius: 5px;
  background: rgba(98, 226, 255, 0.34);
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.08);
}

.plugin-generation-breakout-brick[data-row="1"] {
  background: rgba(155, 124, 255, 0.38);
}

.plugin-generation-breakout-brick[data-row="2"] {
  background: rgba(247, 162, 76, 0.36);
}

.plugin-generation-breakout-ball {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #ffcf73;
  box-shadow: 0 0 18px rgba(247, 162, 76, 0.46);
  transform: translate(-50%, -50%);
}

.plugin-generation-breakout-paddle {
  top: 86%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #62e2ff, #9b7cff);
  box-shadow: 0 0 18px rgba(98, 226, 255, 0.3);
  transform: translateX(-50%);
}

.plugin-generation-breakout-controls {
  display: grid;
  grid-template-columns: repeat(2, 38px);
  gap: 7px;
}

.plugin-generation-breakout-control {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 38px;
  border: 1px solid rgba(98, 226, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(232, 244, 255, 0.88);
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

.plugin-generation-breakout-control:hover {
  background: rgba(98, 226, 255, 0.16);
}

.plugin-generation-loading-details {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.plugin-generation-loading-details[hidden],
.plugin-generation-loading-stream[hidden],
.plugin-generation-loading-cancel[hidden],
.plugin-generation-mini-game-intro[hidden],
.plugin-generation-mini-game-header[hidden],
.plugin-generation-minesweeper-board[hidden],
.plugin-generation-game-2048[hidden],
.plugin-generation-snake[hidden],
.plugin-generation-breakout[hidden],
.plugin-generation-mini-game-status[hidden] {
  display: none !important;
}

.plugin-generation-loading-details p {
  margin: 0;
  color: rgba(216, 231, 242, 0.72);
  font-size: 0.78rem;
  line-height: 1.45;
}

.plugin-generation-loading-stream {
  max-height: 132px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 10px 12px;
  border: 1px solid rgba(98, 226, 255, 0.16);
  border-radius: 14px;
  background: rgba(4, 8, 14, 0.42);
  color: rgba(216, 231, 242, 0.68);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  line-height: 1.45;
}

.plugin-generation-loading-cancel {
  grid-column: 1 / -1;
  grid-row: 3;
  justify-self: center;
  align-self: center;
  min-height: 38px;
  min-width: 112px;
  margin-top: 4px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(232, 244, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.plugin-generation-loading-cancel:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}

.plugin-generation-loading-cancel:disabled {
  cursor: default;
  opacity: 0.48;
}

body[data-theme="light"] .plugin-generation-loading-progress-track {
  background: rgba(24, 50, 75, 0.12);
}

body[data-theme="light"] .plugin-generation-loading-overlay {
  background:
    radial-gradient(circle at 50% 42%, rgba(35, 128, 164, 0.16), transparent 38%),
    #eef3fa;
}

body[data-theme="light"] .plugin-generation-loading-progress-label {
  color: rgba(24, 50, 75, 0.72);
}

body[data-theme="light"] .plugin-generation-loading-details {
  border-color: rgba(24, 50, 75, 0.1);
  background: rgba(255, 255, 255, 0.56);
}

body[data-theme="light"] .plugin-generation-loading-game {
  border-color: rgba(35, 128, 164, 0.14);
  background:
    linear-gradient(90deg, rgba(35, 128, 164, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(35, 128, 164, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 18% 24%, rgba(139, 93, 246, 0.12), transparent 22%),
    rgba(255, 255, 255, 0.56);
  background-size: 28px 28px, 28px 28px, auto, auto;
}

body[data-theme="light"] .plugin-generation-mini-game-start,
body[data-theme="light"] .plugin-generation-mini-game-reset {
  border-color: rgba(35, 128, 164, 0.2);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(24, 50, 75, 0.76);
}

body[data-theme="light"] .plugin-generation-mini-game-hint,
body[data-theme="light"] .plugin-generation-mini-game-meta,
body[data-theme="light"] .plugin-generation-mini-game-status {
  color: rgba(24, 50, 75, 0.62);
}

body[data-theme="light"] .plugin-generation-mini-game-title {
  color: rgba(24, 50, 75, 0.82);
}

body[data-theme="light"] .plugin-generation-mini-game-demo {
  border-color: rgba(35, 128, 164, 0.12);
  background: rgba(255, 255, 255, 0.42);
}

body[data-theme="light"] .plugin-generation-loading-game-paddle {
  background: rgba(24, 50, 75, 0.58);
}

body[data-theme="light"] .plugin-generation-minesweeper-board {
  border-color: rgba(35, 128, 164, 0.14);
  background: rgba(255, 255, 255, 0.44);
}

body[data-theme="light"] .plugin-generation-minesweeper-cell {
  border-color: rgba(24, 50, 75, 0.12);
  background: rgba(255, 255, 255, 0.68);
  color: rgba(24, 50, 75, 0.78);
}

body[data-theme="light"] .plugin-generation-minesweeper-cell[data-state="revealed"] {
  background: rgba(238, 243, 250, 0.72);
}

body[data-theme="light"] .plugin-generation-game-2048-grid {
  border-color: rgba(35, 128, 164, 0.14);
  background: rgba(255, 255, 255, 0.44);
}

body[data-theme="light"] .plugin-generation-game-2048-tile {
  color: rgba(24, 50, 75, 0.82);
}

body[data-theme="light"] .plugin-generation-game-2048-tile[data-value="0"] {
  background: rgba(24, 50, 75, 0.06);
}

body[data-theme="light"] .plugin-generation-game-2048-control {
  border-color: rgba(24, 50, 75, 0.12);
  background: rgba(255, 255, 255, 0.68);
  color: rgba(24, 50, 75, 0.78);
}

body[data-theme="light"] .plugin-generation-snake-grid {
  border-color: rgba(35, 128, 164, 0.14);
  background: rgba(255, 255, 255, 0.44);
}

body[data-theme="light"] .plugin-generation-snake-cell {
  background: rgba(24, 50, 75, 0.06);
}

body[data-theme="light"] .plugin-generation-snake-cell[data-state="body"] {
  background: rgba(35, 128, 164, 0.32);
}

body[data-theme="light"] .plugin-generation-breakout-stage {
  border-color: rgba(35, 128, 164, 0.14);
  background:
    linear-gradient(90deg, rgba(35, 128, 164, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(35, 128, 164, 0.08) 1px, transparent 1px),
    rgba(255, 255, 255, 0.44);
  background-size: 22px 22px;
}

body[data-theme="light"] .plugin-generation-breakout-control {
  border-color: rgba(24, 50, 75, 0.12);
  background: rgba(255, 255, 255, 0.68);
  color: rgba(24, 50, 75, 0.78);
}

body[data-theme="light"] .plugin-generation-loading-details p,
body[data-theme="light"] .plugin-generation-loading-stream {
  color: rgba(24, 50, 75, 0.68);
}

body[data-theme="light"] .plugin-generation-loading-stream {
  border-color: rgba(35, 128, 164, 0.16);
  background: rgba(238, 243, 250, 0.62);
}

body[data-theme="light"] .plugin-generation-loading-cancel {
  border-color: rgba(24, 50, 75, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(24, 50, 75, 0.72);
}

@media (max-width: 560px) {
  .plugin-generation-loading-card {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 10px;
  }

  .plugin-generation-loading-status-row {
    grid-template-columns: minmax(0, 1fr) minmax(120px, 150px);
    gap: 8px;
  }

  .plugin-generation-loading-progress {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .plugin-generation-loading-progress-label {
    min-width: 0;
    text-align: left;
  }

  .plugin-generation-game-2048,
  .plugin-generation-snake,
  .plugin-generation-breakout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .plugin-generation-game-2048-grid,
  .plugin-generation-snake-grid,
  .plugin-generation-breakout-stage {
    width: min(100%, 210px);
  }

  .plugin-generation-game-2048-controls {
    grid-template-columns: repeat(4, 34px);
    grid-template-rows: 34px;
  }

  .plugin-generation-game-2048-control:nth-child(1),
  .plugin-generation-game-2048-control:nth-child(2),
  .plugin-generation-game-2048-control:nth-child(3),
  .plugin-generation-game-2048-control:nth-child(4) {
    grid-row: 1;
  }

  .plugin-generation-game-2048-control:nth-child(1) { grid-column: 1; }
  .plugin-generation-game-2048-control:nth-child(2) { grid-column: 2; }
  .plugin-generation-game-2048-control:nth-child(3) { grid-column: 3; }
  .plugin-generation-game-2048-control:nth-child(4) { grid-column: 4; }
}

body.has-modal .hud,
body.has-modal .composer,
body.has-modal .composer-toolbar,
body.has-modal .plugin-center-btn,
body.has-modal .knowledge-base-dock,
body.has-modal .social-dock-shell,
body.has-modal .voice-entry-btn,
body.has-modal .context-menu {
  pointer-events: none;
}

body.has-modal .desktop-image-layer {
  opacity: 0.74;
}

.auth-stack {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.plugin-center-btn-image {
  width: var(--plugin-center-icon-size);
  height: var(--plugin-center-icon-size);
  object-fit: contain;
  object-position: center;
  display: block;
}

.auth-boot-card {
  display: none;
  text-align: center;
}

.auth-form-card {
  display: block;
}

.auth-form {
  display: flex;
  flex-direction: column;
}

.auth-screen.is-booting .auth-boot-card {
  display: block;
}

.auth-screen.is-booting .auth-form-card {
  display: none;
}

.auth-logo {
  width: min(144px, 38vw);
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.18));
  user-select: none;
}

.auth-card {
  width: min(460px, calc(100vw - 32px));
  padding: 22px;
  border-radius: 28px;
  border: 1px solid var(--panel-border);
  background: color-mix(in srgb, var(--panel-bg) 88%, transparent);
  box-shadow: var(--shadow);
}

.auth-switch-row {
  display: flex;
  gap: 8px;
}

.auth-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.auth-action-row .auth-switch-row {
  flex-shrink: 0;
}

.auth-switch-row .ghost-btn {
  min-height: 42px;
}

.auth-message {
  min-height: 24px;
  margin-bottom: 10px;
  color: var(--text-soft);
}

.auth-boot-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 12px 0 10px;
}

.auth-boot-indicator span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 72%, white 18%);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 10%, transparent);
  animation: auth-boot-pulse 1.4s ease-in-out infinite;
}

.auth-boot-indicator span:nth-child(2) {
  animation-delay: 0.16s;
}

.auth-boot-indicator span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes auth-boot-pulse {
  0%,
  100% {
    transform: translateY(0) scale(0.92);
    opacity: 0.48;
  }

  50% {
    transform: translateY(-2px) scale(1);
    opacity: 1;
  }
}

.context-menu {
  position: fixed;
  z-index: 130000;
  min-width: 180px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(28, 34, 46, 0.96), rgba(16, 20, 29, 0.96)),
    rgba(12, 15, 23, 0.96);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.34),
    0 10px 22px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 140000;
  display: grid;
  place-items: center;
  padding: 24px;
  overscroll-behavior: contain;
}

.app-modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(7, 10, 18, 0.2);
  backdrop-filter: blur(20px) saturate(0.95);
  -webkit-backdrop-filter: blur(20px) saturate(0.95);
  transition:
    background 760ms ease,
    backdrop-filter 760ms ease,
    -webkit-backdrop-filter 760ms ease;
}

.app-modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 22px;
  border-radius: 26px;
  border: 1px solid var(--panel-border);
  background: color-mix(in srgb, var(--panel-bg) 90%, transparent);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}

.app-modal[data-mode="publish"] .app-modal-card {
  width: min(680px, calc(100vw - 32px));
}

.app-modal-eyebrow {
  margin: 0 0 8px;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  color: var(--accent-strong);
  text-transform: uppercase;
}

.app-modal-title {
  margin: 0 0 8px;
  font-size: 1.45rem;
}

.app-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 0 18px;
  max-height: min(52vh, 560px);
  color: var(--text-soft);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
  padding-right: 6px;
}

.app-modal-body.has-sections {
  white-space: normal;
}

.app-modal-body.has-custom-body {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  max-height: min(68vh, 680px);
  overflow: hidden;
  padding-right: 0;
  white-space: normal;
}

.app-modal-body-text {
  white-space: pre-wrap;
}

.app-modal-body-sections {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.app-modal-section {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.app-modal-section-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
}

.app-modal-section-title {
  font-weight: 700;
  color: var(--text-main);
}

.app-modal-section-meta {
  color: var(--text-soft);
  font-size: 0.8rem;
  white-space: nowrap;
}

.app-modal-section-caret {
  color: var(--accent-strong);
  transition: transform 180ms ease;
}

.app-modal-section[data-collapsed="false"] .app-modal-section-caret {
  transform: rotate(180deg);
}

.app-modal-section-content {
  padding: 0 14px 14px;
  color: var(--text-soft);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.app-modal-choice-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 320px;
  min-height: 0;
  margin-bottom: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.app-modal-publish-field {
  display: grid;
  gap: 0;
  margin-bottom: 18px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.app-modal-publish-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
}

.app-modal-publish-field select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  padding: 11px 13px;
  color: var(--text-main);
  font: inherit;
  color-scheme: dark;
}

.app-modal-publish-field select option {
  background: #151821;
  color: var(--text-main);
}

.app-modal-publish-hint {
  margin: -4px 0 0;
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.app-modal-choice-option {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.app-modal-choice-option input {
  margin: 0;
}

.app-modal-choice-icon {
  position: relative;
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.app-modal-choice-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(145deg, rgba(255, 224, 153, 0.88), rgba(255, 248, 220, 0.45));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.9;
  pointer-events: none;
}

.app-modal-choice-icon-image {
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  margin: 2px;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}

.app-modal-choice-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.app-modal-choice-copy strong {
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.35;
}

.app-modal-choice-copy small {
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

.app-modal-field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.app-modal-field span {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.app-modal-field input,
.app-modal-field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  padding: 11px 13px;
  color: var(--text-main);
  font: inherit;
}

.app-modal-field textarea {
  min-height: 108px;
  resize: vertical;
}

.supervisor-prompt-spotlight {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.supervisor-prompt-spotlight[hidden] {
  display: none;
}

.supervisor-prompt-spotlight-heading {
  color: var(--text-dim);
  font-size: 0.76rem;
  font-weight: 700;
}

.supervisor-prompt-spotlight-list {
  display: grid;
  gap: 6px;
  min-width: 0;
  max-height: 204px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
}

.supervisor-prompt-spotlight-list::-webkit-scrollbar {
  width: 4px;
}

.supervisor-prompt-spotlight-list::-webkit-scrollbar-track {
  background: transparent;
}

.supervisor-prompt-spotlight-list::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.supervisor-prompt-spotlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-main);
  padding: 10px 12px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.supervisor-prompt-spotlight-item:hover,
.supervisor-prompt-spotlight-item:focus-visible {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.09);
  outline: none;
}

.supervisor-prompt-spotlight-icon {
  position: relative;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 850;
}

.supervisor-dock > .supervisor-prompt-spotlight .supervisor-prompt-spotlight-icon[data-supervisor-builtin-tool],
.supervisor-prompt-spotlight-icon[data-supervisor-builtin-tool] {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 56%),
    var(--supervisor-builtin-accent, #4b24c8);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.supervisor-prompt-spotlight-icon-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
}

.supervisor-prompt-spotlight-icon[data-has-image="true"] .supervisor-prompt-spotlight-icon-image {
  opacity: 1;
}

.supervisor-prompt-spotlight-icon[data-has-image="true"] .supervisor-prompt-spotlight-icon-glyph {
  opacity: 0;
}

.supervisor-prompt-spotlight-icon-glyph {
  position: relative;
  z-index: 1;
}

.supervisor-prompt-spotlight-body {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
}

.supervisor-prompt-spotlight-title-row {
  display: flex;
  max-width: 100%;
  align-items: center;
  gap: 8px;
}

.supervisor-prompt-spotlight-title {
  min-width: 0;
  overflow: hidden;
  color: var(--text-main);
  font-size: 0.96rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supervisor-prompt-spotlight-description {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--text-dim, rgba(255, 255, 255, 0.55));
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supervisor-prompt-spotlight-badge {
  flex-shrink: 0;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.66rem;
  font-weight: 800;
}

.supervisor-prompt-spotlight-badge.is-builtin {
  color: #7dd3fc;
  background: rgba(125, 211, 252, 0.12);
}

.supervisor-prompt-spotlight-badge.is-official {
  color: #f7a24c;
  background: rgba(247, 162, 76, 0.12);
}

.supervisor-prompt-spotlight-badge.is-local {
  color: #7ec58a;
  background: rgba(126, 197, 138, 0.12);
}

.supervisor-prompt-spotlight-badge.is-market {
  color: #8fb0ff;
  background: rgba(143, 176, 255, 0.12);
}

.supervisor-semantic-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 12px 12px 14px;
  border: 1px solid rgba(91, 61, 196, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(244, 240, 255, 0.88));
  box-shadow:
    0 18px 42px rgba(15, 10, 32, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  color: #4b24c8;
  pointer-events: auto;
}

.supervisor-semantic-action[hidden] {
  display: none;
}

.supervisor-semantic-action-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
  text-align: left;
}

.supervisor-semantic-action-eyebrow {
  color: rgba(75, 36, 200, 0.58);
  font-size: 0.68rem;
  font-weight: 900;
}

.supervisor-semantic-action-title {
  overflow: hidden;
  color: #4b24c8;
  font-size: 0.94rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supervisor-semantic-action-desc {
  overflow: hidden;
  color: rgba(75, 36, 200, 0.62);
  font-size: 0.78rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supervisor-semantic-action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.supervisor-semantic-action-primary {
  min-height: 34px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(75, 36, 200, 0.94), rgba(90, 116, 255, 0.9));
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 10px 20px rgba(75, 36, 200, 0.18);
}

.supervisor-semantic-action-primary:hover,
.supervisor-semantic-action-primary:focus-visible {
  transform: translateY(-1px);
}

.supervisor-semantic-action-dismiss {
  display: grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(75, 36, 200, 0.08);
  color: rgba(75, 36, 200, 0.72);
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

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

.app-modal-actions .ghost-btn {
  min-height: 40px;
  padding: 0 16px;
}

.app-modal-actions .auth-submit {
  min-width: 88px;
  min-height: 40px;
}

.app-modal[data-hide-actions="true"] .app-modal-actions {
  display: none;
}

.app-modal-close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-bg) 92%, transparent);
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.app-modal-close-button:hover,
.app-modal-close-button:focus-visible {
  border-color: var(--accent-strong);
  background: color-mix(in srgb, var(--panel-bg) 98%, transparent);
  outline: none;
}

.app-modal-close-confirm {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(8, 10, 20, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.app-modal-close-confirm-card {
  width: min(360px, 100%);
  padding: 18px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel-bg) 96%, transparent);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.28);
}

.app-modal-close-confirm-title {
  margin: 0 0 8px;
  color: var(--text-main);
  font-size: 1.02rem;
  line-height: 1.35;
}

.app-modal-close-confirm-body {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.app-modal-close-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.app-modal[data-variant="supervisor-advance-preview"] .app-modal-card {
  padding: 14px;
  border-color: var(--advance-border);
  border-radius: 18px;
  background: var(--advance-shell-bg);
  box-shadow:
    0 28px 70px rgba(20, 15, 58, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body[data-theme="light"] .app-modal[data-variant="supervisor-advance-preview"] .app-modal-card {
  box-shadow:
    0 28px 70px rgba(74, 55, 139, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.app-modal[data-variant="supervisor-advance-preview"] .app-modal-body.has-custom-body {
  height: 100%;
  margin-bottom: 0;
  max-height: none;
  padding-right: 0;
}

.app-modal[data-variant="supervisor-advance-preview"] .app-modal-eyebrow {
  display: none;
}

.app-modal[data-variant="supervisor-advance-preview"] .app-modal-title {
  margin-bottom: 8px;
  padding-right: 48px;
  color: var(--advance-text);
  font-size: 1rem;
}

.app-modal[data-variant="supervisor-advance-preview"] .app-modal-close-button {
  top: 12px;
  right: 12px;
  border-color: var(--advance-border-soft);
  background: var(--advance-close-bg);
  color: var(--advance-text);
}

.app-modal[data-variant="supervisor-advance-preview"] .app-modal-close-button:hover,
.app-modal[data-variant="supervisor-advance-preview"] .app-modal-close-button:focus-visible {
  border-color: var(--advance-border);
  background: var(--advance-close-bg-hover);
  color: var(--advance-link);
}

.supervisor-advance-preview {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  max-height: 100%;
  min-height: 0;
  min-width: 0;
}

.supervisor-advance-preview-text {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
  border: 1px solid var(--advance-border-soft);
  border-radius: 14px;
  background: var(--advance-surface);
  color: var(--advance-text);
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.supervisor-advance-visual {
  display: grid;
  gap: 10px;
  padding: 12px 12px 78px;
  white-space: normal;
}

.supervisor-advance-hero {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--advance-border);
  border-radius: 10px;
  background: var(--advance-hero-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.12);
}

.supervisor-advance-eyebrow {
  color: var(--advance-link);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.supervisor-advance-title {
  margin: 0;
  color: var(--advance-text);
  font-size: 1rem;
  line-height: 1.35;
}

.supervisor-advance-subtitle {
  margin: 0;
  color: var(--advance-text-soft);
  font-size: 0.82rem;
}

.supervisor-advance-statusbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--advance-border-soft);
  border-radius: 10px;
  background: var(--advance-surface-muted);
}

.supervisor-advance-chip-row,
.supervisor-advance-node-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.supervisor-advance-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  max-width: 100%;
  padding: 4px 9px;
  border: 1px solid var(--advance-border-soft);
  border-radius: 999px;
  background: var(--advance-surface-muted);
  color: var(--advance-text);
  font-size: 0.78rem;
  line-height: 1.25;
}

.supervisor-advance-chip[data-tone="success"] {
  border-color: rgba(74, 222, 128, 0.28);
  background: rgba(22, 163, 74, 0.12);
  color: var(--advance-success);
}

.supervisor-advance-chip[data-tone="info"] {
  border-color: rgba(125, 85, 255, 0.34);
  background: rgba(125, 85, 255, 0.14);
  color: var(--advance-info);
}

.supervisor-advance-chip[data-tone="warning"] {
  border-color: rgba(251, 191, 36, 0.32);
  background: rgba(245, 158, 11, 0.13);
  color: var(--advance-warning);
}

.supervisor-advance-chip[data-tone="danger"] {
  border-color: rgba(248, 113, 113, 0.32);
  background: rgba(239, 68, 68, 0.12);
  color: var(--advance-danger);
}

.supervisor-advance-meta {
  display: grid;
  gap: 4px;
  color: var(--advance-text-soft);
  font-size: 0.8rem;
}

.supervisor-advance-section {
  display: grid;
  gap: 10px;
}

.supervisor-advance-section-title,
.supervisor-advance-panel-title {
  margin: 0;
  color: var(--advance-text);
  font-size: 0.9rem;
  line-height: 1.35;
}

.supervisor-advance-choice-list {
  display: grid;
  gap: 8px;
}

.supervisor-advance-choice {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--advance-border-soft);
  border-radius: 10px;
  background: var(--advance-surface-strong);
  color: var(--advance-text);
  cursor: pointer;
}

.supervisor-advance-choice:hover {
  border-color: var(--advance-border);
  background: var(--advance-surface-muted);
}

.supervisor-advance-choice input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--advance-link);
}

.supervisor-advance-choice-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.supervisor-advance-choice-text strong {
  color: var(--advance-text);
  font-size: 0.88rem;
  line-height: 1.35;
}

.supervisor-advance-choice-text small {
  color: var(--advance-text-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.supervisor-advance-choice-custom {
  align-items: flex-start;
}

.supervisor-advance-custom-block {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px dashed var(--advance-border-soft);
  border-radius: 10px;
  background: var(--advance-surface-muted);
}

.supervisor-advance-custom-input {
  width: 100%;
  min-height: 58px;
  resize: vertical;
  padding: 9px 10px;
  border: 1px solid var(--advance-border-soft);
  border-radius: 8px;
  background: var(--advance-surface);
  color: var(--advance-text);
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.45;
  outline: none;
}

.supervisor-advance-custom-input::placeholder {
  color: var(--advance-text-muted);
}

.supervisor-advance-custom-input:focus {
  border-color: var(--advance-border);
  box-shadow: 0 0 0 3px rgba(125, 85, 255, 0.2);
}

.supervisor-advance-flow {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.supervisor-advance-flow-item {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.supervisor-advance-flow-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 34px;
  bottom: -10px;
  left: 16px;
  width: 2px;
  border-radius: 999px;
  background: var(--advance-border-soft);
}

.supervisor-advance-step-index {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--advance-border);
  border-radius: 999px;
  background: var(--advance-surface-strong);
  color: var(--advance-link);
  font-size: 0.82rem;
  font-weight: 700;
}

.supervisor-advance-node-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--advance-border-soft);
  border-radius: 10px;
  background: var(--advance-surface-strong);
}

.supervisor-advance-node-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.supervisor-advance-node-title {
  margin: 0;
  min-width: 0;
  color: var(--advance-text);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.32;
}

.supervisor-advance-node-desc {
  margin: 0;
  color: var(--advance-text-soft);
  font-size: 0.8rem;
  line-height: 1.45;
}

.supervisor-advance-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.supervisor-advance-field {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid var(--advance-border-soft);
  border-radius: 8px;
  background: color-mix(in srgb, var(--advance-surface-muted) 72%, transparent);
  opacity: 0.72;
}

.supervisor-advance-field-label {
  color: var(--advance-text-muted);
  font-size: 0.72rem;
}

.supervisor-advance-field-value {
  color: var(--advance-text-soft);
  font-size: 0.74rem;
  line-height: 1.35;
}

.supervisor-advance-alignment-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--advance-text-soft);
  font-size: 0.8rem;
}

.supervisor-advance-alignment-path {
  color: var(--advance-link);
  font-weight: 700;
}

.supervisor-advance-candidate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.supervisor-advance-candidate-pool {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--advance-border-soft);
  border-radius: 8px;
  background: var(--advance-surface-muted);
}

.supervisor-advance-candidate-pool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.supervisor-advance-candidate-pool-title {
  color: var(--advance-text);
  font-size: 0.76rem;
  font-weight: 700;
}

.supervisor-advance-candidate-pool-count {
  flex: 0 0 auto;
  color: var(--advance-text-muted);
  font-size: 0.72rem;
}

.supervisor-advance-candidate-list {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.supervisor-advance-candidate-item,
.supervisor-advance-candidate-empty,
.supervisor-advance-candidate-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  color: var(--advance-text-soft);
  font-size: 0.74rem;
  line-height: 1.35;
}

.supervisor-advance-candidate-item[data-selected="true"] {
  color: var(--advance-link);
  font-weight: 700;
}

.supervisor-advance-candidate-item[data-reference="true"] {
  color: var(--advance-text-muted);
}

.supervisor-advance-candidate-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.supervisor-advance-candidate-status {
  flex: 0 0 auto;
  color: var(--advance-text-muted);
  font-size: 0.7rem;
}

.supervisor-advance-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.supervisor-advance-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--advance-border-soft);
  border-radius: 10px;
  background: var(--advance-surface-strong);
}

.supervisor-advance-expert-card {
  border-color: color-mix(in srgb, var(--advance-link) 34%, var(--advance-border-soft));
  background: color-mix(in srgb, var(--advance-surface-strong) 82%, var(--advance-link) 18%);
}

.supervisor-advance-expert-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.supervisor-advance-expert-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.supervisor-advance-expert-eyebrow {
  color: var(--advance-link);
  font-size: 0.72rem;
  font-weight: 820;
}

.supervisor-advance-expert-status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid var(--advance-border-soft);
  border-radius: 999px;
  color: var(--advance-text-soft);
  background: var(--advance-surface-muted);
  font-size: 0.72rem;
  font-weight: 760;
}

.supervisor-advance-expert-desc {
  margin: 0;
  color: var(--advance-text-soft);
  font-size: 0.8rem;
  line-height: 1.45;
}

.supervisor-advance-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.supervisor-advance-list-item {
  display: grid;
  gap: 3px;
  padding-left: 9px;
  border-left: 3px solid rgba(148, 163, 184, 0.26);
}

.supervisor-advance-list-item[data-tone="success"] {
  border-left-color: rgba(74, 222, 128, 0.72);
}

.supervisor-advance-list-item[data-tone="info"] {
  border-left-color: rgba(56, 189, 248, 0.72);
}

.supervisor-advance-list-item[data-tone="warning"] {
  border-left-color: rgba(251, 191, 36, 0.78);
}

.supervisor-advance-list-item[data-tone="danger"] {
  border-left-color: rgba(248, 113, 113, 0.78);
}

.supervisor-advance-list-title {
  color: var(--advance-text);
  font-size: 0.82rem;
  line-height: 1.35;
}

.supervisor-advance-list-detail {
  color: var(--advance-text-soft);
  font-size: 0.76rem;
  line-height: 1.35;
}

.supervisor-advance-empty {
  padding: 12px;
  border: 1px dashed var(--advance-border-soft);
  border-radius: 10px;
  color: var(--advance-text-soft);
}

.supervisor-advance-footnote {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--advance-border-soft);
  border-radius: 10px;
  background: var(--advance-surface-muted);
  color: var(--advance-text-soft);
  font-size: 0.78rem;
}

.supervisor-advance-footnote p {
  margin: 0;
}

.supervisor-advance-revision {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 6px;
  border: 1px solid var(--advance-border-soft);
  border-radius: 999px;
  background: var(--advance-input-bg);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px) saturate(1.05);
  -webkit-backdrop-filter: blur(16px) saturate(1.05);
}

body[data-theme="light"] .supervisor-advance-revision {
  box-shadow:
    0 18px 42px rgba(74, 55, 139, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.supervisor-advance-revision textarea {
  width: 100%;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  resize: none;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  padding: 8px 12px;
  color: var(--advance-text);
  font: inherit;
  line-height: 1.4;
  outline: none;
}

.supervisor-advance-revision textarea::placeholder {
  color: var(--advance-text-muted);
}

.supervisor-advance-phase-status {
  min-width: 0;
  padding: 0 10px 0 12px;
  color: var(--advance-text-soft);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supervisor-advance-revision-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.supervisor-advance-revision .auth-submit,
.supervisor-advance-next-button,
.supervisor-advance-return-button {
  min-width: 64px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.supervisor-advance-revision .auth-submit,
.supervisor-advance-next-button {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, var(--advance-accent) 0%, var(--advance-accent-2) 48%, var(--advance-accent-3) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(81, 42, 189, 0.22);
}

body[data-theme="light"] .supervisor-advance-revision .auth-submit,
body[data-theme="light"] .supervisor-advance-next-button {
  box-shadow: 0 8px 20px rgba(81, 42, 189, 0.18);
}

.supervisor-advance-return-button {
  border: 1px solid var(--advance-border-soft);
  background: var(--advance-surface-muted);
  color: var(--advance-link);
}

.supervisor-advance-next-button:hover,
.supervisor-advance-next-button:focus-visible,
.supervisor-advance-return-button:hover,
.supervisor-advance-return-button:focus-visible {
  outline: none;
  filter: brightness(1.04);
}

.supervisor-advance-preview[data-phase="match"] .supervisor-advance-revision {
  border-radius: 18px;
}

.supervisor-advance-revision-status {
  display: none;
}

.supervisor-advance-revision-status[data-tone="error"] {
  color: var(--danger, #ff8b8b);
}

.supervisor-advance-revision-status[data-tone="success"] {
  color: var(--success, #7fdca7);
}

@media (max-width: 720px) {
  .supervisor-advance-visual {
    padding: 12px 10px 78px;
  }

  .supervisor-advance-revision {
    right: 10px;
    bottom: 10px;
    left: 10px;
  }

  .supervisor-advance-phase-status {
    font-size: 0.76rem;
  }

  .supervisor-advance-revision-actions {
    gap: 6px;
  }

  .supervisor-advance-revision .auth-submit,
  .supervisor-advance-next-button,
  .supervisor-advance-return-button {
    min-width: 56px;
    padding: 0 12px;
  }

  .supervisor-advance-node-head {
    display: grid;
  }

  .supervisor-advance-fields,
  .supervisor-advance-candidate-grid,
  .supervisor-advance-panel-grid {
    grid-template-columns: 1fr;
  }
}

.plugin-admin-workbench {
  position: fixed;
  inset: 0;
  z-index: 140000;
  display: grid;
  padding: 8px;
  background: rgba(7, 10, 18, 0.34);
  backdrop-filter: blur(18px) saturate(0.96);
  -webkit-backdrop-filter: blur(18px) saturate(0.96);
  color: var(--text-main);
  box-sizing: border-box;
}

.plugin-admin-workbench[hidden] {
  display: none;
}

.plugin-admin-shell {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(27, 31, 42, 0.96), rgba(17, 20, 28, 0.96)),
    rgba(17, 20, 28, 0.96);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  box-sizing: border-box;
}

.plugin-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.plugin-admin-title-group {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.plugin-admin-eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.plugin-admin-title {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.25;
}

.plugin-admin-meta {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.86rem;
}

.plugin-admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.plugin-admin-action,
.plugin-admin-close {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
}

.plugin-admin-action.is-primary {
  border-color: rgba(133, 205, 255, 0.3);
  background: rgba(133, 205, 255, 0.14);
  color: #d9f1ff;
}

.plugin-admin-action.is-danger {
  border-color: rgba(255, 115, 115, 0.32);
  background: rgba(255, 115, 115, 0.13);
  color: #ffd8d8;
}

.plugin-admin-action.is-active {
  border-color: rgba(255, 222, 150, 0.44);
  background: rgba(255, 222, 150, 0.16);
  color: #fff1c4;
}

.plugin-admin-close {
  width: 40px;
  padding: 0;
}

.plugin-admin-layout {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 12px;
}

.plugin-admin-sidebar,
.plugin-admin-detail {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.plugin-admin-sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.plugin-admin-filter {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.plugin-admin-filter input {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-main);
  font: inherit;
  padding: 0 12px;
}

.plugin-admin-filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.plugin-admin-filter-tab {
  min-height: 32px;
  border-radius: 10px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.plugin-admin-filter-tab.is-active {
  color: #17212d;
  background: linear-gradient(135deg, rgba(255, 222, 150, 0.94), rgba(133, 205, 255, 0.9));
  border-color: rgba(255, 255, 255, 0.18);
}

.plugin-admin-list {
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
}

.plugin-admin-list-item {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 10px;
  margin: 0 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.plugin-admin-list-item.is-active {
  border-color: rgba(134, 202, 255, 0.76);
  background: rgba(134, 202, 255, 0.16);
  box-shadow: inset 4px 0 0 rgba(96, 178, 255, 0.92), 0 0 0 1px rgba(96, 178, 255, 0.12);
}

.plugin-admin-list-item:focus-visible {
  outline: 2px solid rgba(134, 202, 255, 0.78);
  outline-offset: 2px;
}

.plugin-admin-list-title {
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.plugin-admin-list-subtitle,
.plugin-admin-list-meta,
.plugin-admin-empty {
  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.plugin-admin-list-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.plugin-admin-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 760;
  line-height: 1;
}

.plugin-admin-chip.is-market {
  color: #061b2a;
  border-color: rgba(166, 224, 255, 0.56);
  background: #a6e0ff;
}

.plugin-admin-chip.is-pending {
  color: #251703;
  border-color: rgba(255, 218, 137, 0.62);
  background: #ffda89;
}

.plugin-admin-chip.is-delisted {
  color: #311010;
  border-color: rgba(255, 181, 181, 0.6);
  background: #ffb5b5;
}

.plugin-admin-chip.is-quality-good {
  color: #082216;
  border-color: rgba(163, 239, 193, 0.6);
  background: #a3efc1;
}

.plugin-admin-chip.is-quality-ok {
  color: #061b2a;
  border-color: rgba(190, 229, 255, 0.62);
  background: #bee5ff;
}

.plugin-admin-chip.is-quality-warn {
  color: #251703;
  border-color: rgba(255, 224, 138, 0.64);
  background: #ffe08a;
}

.plugin-admin-chip.is-quality-bad {
  color: #311010;
  border-color: rgba(255, 180, 180, 0.64);
  background: #ffb4b4;
}

.plugin-admin-chip.is-knowledge-ready {
  color: #082216;
  border-color: rgba(163, 239, 193, 0.6);
  background: #a3efc1;
}

.plugin-admin-chip.is-knowledge-stale,
.plugin-admin-chip.is-knowledge-no-embedding {
  color: #251703;
  border-color: rgba(255, 224, 138, 0.64);
  background: #ffe08a;
}

.plugin-admin-chip.is-knowledge-missing,
.plugin-admin-chip.is-knowledge-unavailable,
.plugin-admin-chip.is-knowledge-unknown {
  color: #311010;
  border-color: rgba(255, 180, 180, 0.64);
  background: #ffb4b4;
}

.plugin-admin-detail {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.plugin-admin-detail.has-guideline {
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.plugin-admin-detail-head {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.plugin-admin-detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plugin-admin-detail-title {
  min-width: 0;
  flex: 1 1 auto;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.plugin-admin-detail-copy {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.86rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.plugin-admin-detail-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.plugin-admin-detail-title-side {
  flex: 0 1 auto;
  min-width: min(420px, 48%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.plugin-admin-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.plugin-admin-identity {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.032);
}

.plugin-admin-identity-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.plugin-admin-identity-title {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 760;
}

.plugin-admin-identity-note {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.72rem;
  line-height: 1.4;
  text-align: right;
}

.plugin-admin-identity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 6px;
}

.plugin-admin-identity-item {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(7, 10, 18, 0.18);
}

.plugin-admin-identity-item span {
  color: var(--text-soft);
  font-size: 0.66rem;
  line-height: 1.25;
}

.plugin-admin-identity-item strong {
  min-width: 0;
  color: var(--text-main);
  font-size: 0.72rem;
  font-weight: 720;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plugin-admin-guideline {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 16, 26, 0.28);
  overflow: hidden;
}

.plugin-admin-guideline-split {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.8fr);
  overflow: hidden;
  background: rgba(7, 10, 18, 0.3);
}

.plugin-admin-guideline-head,
.plugin-admin-guideline-group-head,
.plugin-admin-guideline-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.plugin-admin-guideline-title {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 760;
}

.plugin-admin-guideline-meta,
.plugin-admin-guideline-summary,
.plugin-admin-guideline-empty,
.plugin-admin-guideline-group p,
.plugin-admin-guideline-field p,
.plugin-admin-guideline-field li {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.plugin-admin-guideline-empty.is-error {
  color: #ffc4c4;
}

.plugin-admin-guideline-groups {
  min-height: 0;
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.plugin-admin-guideline-group {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.plugin-admin-guideline-group-head strong,
.plugin-admin-guideline-field-head strong {
  min-width: 0;
  color: var(--text-main);
  font-size: 0.82rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.plugin-admin-guideline-group-head span,
.plugin-admin-guideline-field-head span {
  flex: 0 0 auto;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 740;
}

.plugin-admin-guideline-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.plugin-admin-guideline-field {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 9px;
  border-radius: 9px;
  background: rgba(7, 10, 18, 0.2);
}

.plugin-admin-guideline-field ul {
  margin: 0;
  padding-left: 18px;
}

.plugin-admin-quality {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(0, 1.45fr);
  grid-template-areas:
    "head sections"
    "summary issues";
  gap: 5px 10px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.026);
}

.plugin-admin-quality-head {
  grid-area: head;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.plugin-admin-quality-title {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 760;
}

.plugin-admin-quality-score {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.72rem;
  font-weight: 760;
}

.plugin-admin-quality-score.is-quality-good {
  color: #c8f4d7;
  background: rgba(78, 190, 124, 0.15);
}

.plugin-admin-quality-score.is-quality-ok {
  color: #d7ecff;
  background: rgba(96, 174, 232, 0.14);
}

.plugin-admin-quality-score.is-quality-warn {
  color: #ffe6ad;
  background: rgba(255, 190, 91, 0.15);
}

.plugin-admin-quality-score.is-quality-bad {
  color: #ffc4c4;
  background: rgba(255, 115, 115, 0.13);
}

.plugin-admin-quality-summary,
.plugin-admin-quality-empty,
.plugin-admin-quality-issue,
.plugin-admin-quality-more,
.plugin-admin-quality-recommendation {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.7rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.plugin-admin-quality-summary {
  grid-area: summary;
}

.plugin-admin-quality-sections {
  grid-area: sections;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.plugin-admin-quality-section {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 160px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-soft);
  font-size: 0.68rem;
}

.plugin-admin-quality-section span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plugin-admin-quality-section span:last-child {
  flex: 0 0 auto;
  color: var(--text-main);
  font-weight: 760;
}

.plugin-admin-quality-issues {
  grid-area: issues;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 8px;
  overflow: hidden;
}

.plugin-admin-quality-issue {
  padding-left: 10px;
  border-left: 2px solid rgba(255, 255, 255, 0.16);
}

.plugin-admin-quality-issue.is-critical,
.plugin-admin-quality-issue.is-warning {
  color: #ffd9bd;
  border-left-color: rgba(255, 190, 91, 0.5);
}

.plugin-admin-quality-issue.is-critical {
  color: #ffc4c4;
  border-left-color: rgba(255, 115, 115, 0.55);
}

.plugin-admin-quality-recommendation {
  color: #d7ecff;
}

.plugin-admin-quality-more {
  color: var(--text-soft);
  opacity: 0.78;
}

.plugin-admin-knowledge {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(130px, 0.32fr) minmax(0, 1fr);
  gap: 6px 12px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.022);
}

.plugin-admin-knowledge-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.plugin-admin-knowledge-title {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 760;
}

.plugin-admin-knowledge-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.72rem;
  font-weight: 760;
}

.plugin-admin-knowledge-badge.is-knowledge-ready {
  color: #c8f4d7;
  background: rgba(78, 190, 124, 0.15);
}

.plugin-admin-knowledge-badge.is-knowledge-stale,
.plugin-admin-knowledge-badge.is-knowledge-no-embedding {
  color: #ffe6ad;
  background: rgba(255, 190, 91, 0.15);
}

.plugin-admin-knowledge-badge.is-knowledge-missing,
.plugin-admin-knowledge-badge.is-knowledge-unavailable,
.plugin-admin-knowledge-badge.is-knowledge-unknown {
  color: #ffc4c4;
  background: rgba(255, 115, 115, 0.13);
}

.plugin-admin-knowledge-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.plugin-admin-knowledge-item {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.plugin-admin-knowledge-item span {
  color: var(--text-soft);
  font-size: 0.66rem;
  line-height: 1.25;
}

.plugin-admin-knowledge-item strong {
  min-width: 0;
  color: var(--text-main);
  font-size: 0.7rem;
  font-weight: 720;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plugin-admin-knowledge-reasons {
  grid-column: 2;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 8px;
}

.plugin-admin-knowledge-reasons p {
  margin: 0;
  padding-left: 10px;
  border-left: 2px solid rgba(255, 190, 91, 0.5);
  color: #ffd9bd;
  font-size: 0.7rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.plugin-admin-editor {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: rgba(7, 10, 18, 0.34);
}

.plugin-admin-editor-toolbar {
  min-width: 0;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.plugin-admin-editor-title {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 750;
}

.plugin-admin-schema,
.plugin-admin-schema-editor {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 16px;
  border: 0;
  color: #dce9f7;
  font: 0.82rem/1.55 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  overflow: auto;
  white-space: pre;
  background: transparent;
}

.plugin-admin-schema-editor {
  width: 100%;
  height: 100%;
  resize: none;
  outline: none;
}

.plugin-admin-schema-editor:disabled {
  opacity: 0.72;
  cursor: default;
}

body[data-theme="light"] .plugin-admin-shell {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(27, 42, 54, 0.12);
}

body[data-theme="light"] .plugin-admin-sidebar,
body[data-theme="light"] .plugin-admin-detail,
body[data-theme="light"] .plugin-admin-list-item,
body[data-theme="light"] .plugin-admin-filter input {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(27, 42, 54, 0.035);
}

body[data-theme="light"] .plugin-admin-list-item.is-active {
  border-color: rgba(37, 99, 235, 0.58);
  background: #eaf4ff;
  box-shadow: inset 4px 0 0 #2563eb, 0 0 0 1px rgba(37, 99, 235, 0.1);
}

body[data-theme="light"] .plugin-admin-list-item.is-active .plugin-admin-list-title {
  color: #123b7a;
}

body[data-theme="light"] .plugin-admin-schema {
  color: #17212d;
  background: #ffffff;
}

body[data-theme="light"] .plugin-admin-editor {
  background: #ffffff;
}

body[data-theme="light"] .plugin-admin-editor-toolbar {
  border-color: rgba(27, 42, 54, 0.1);
  background: #f8fafc;
}

body[data-theme="light"] .plugin-admin-quality {
  border-color: rgba(27, 42, 54, 0.1);
  background: rgba(27, 42, 54, 0.026);
}

body[data-theme="light"] .plugin-admin-knowledge {
  border-color: rgba(27, 42, 54, 0.1);
  background: rgba(27, 42, 54, 0.022);
}

body[data-theme="light"] .plugin-admin-knowledge-item {
  background: rgba(255, 255, 255, 0.62);
}

body[data-theme="light"] .plugin-admin-knowledge-badge.is-knowledge-ready {
  color: #17643b;
  background: rgba(56, 161, 105, 0.12);
}

body[data-theme="light"] .plugin-admin-knowledge-badge.is-knowledge-stale,
body[data-theme="light"] .plugin-admin-knowledge-badge.is-knowledge-no-embedding {
  color: #7a5314;
  background: rgba(159, 111, 27, 0.1);
}

body[data-theme="light"] .plugin-admin-knowledge-badge.is-knowledge-missing,
body[data-theme="light"] .plugin-admin-knowledge-badge.is-knowledge-unavailable,
body[data-theme="light"] .plugin-admin-knowledge-badge.is-knowledge-unknown {
  color: #8c3131;
  background: rgba(192, 73, 73, 0.1);
}

body[data-theme="light"] .plugin-admin-knowledge-reasons p {
  color: #8c4d16;
}

body[data-theme="light"] .plugin-admin-identity {
  border-color: rgba(27, 42, 54, 0.1);
  background: rgba(27, 42, 54, 0.026);
}

body[data-theme="light"] .plugin-admin-identity-item {
  border-color: rgba(27, 42, 54, 0.1);
  background: rgba(255, 255, 255, 0.58);
}

body[data-theme="light"] .plugin-admin-guideline {
  border-color: rgba(27, 42, 54, 0.1);
  background: #ffffff;
}

body[data-theme="light"] .plugin-admin-guideline-split {
  background: #ffffff;
}

body[data-theme="light"] .plugin-admin-guideline-group,
body[data-theme="light"] .plugin-admin-guideline-field {
  border-color: rgba(27, 42, 54, 0.12);
  background: #ffffff;
}

body[data-theme="light"] .plugin-admin-quality-issue.is-critical,
body[data-theme="light"] .plugin-admin-quality-issue.is-warning {
  color: #8c4d16;
}

body[data-theme="light"] .plugin-admin-quality-issue.is-critical {
  color: #8c3131;
}

body[data-theme="light"] .plugin-admin-quality-recommendation {
  color: #20547d;
}

body[data-theme="light"] .plugin-admin-quality-section {
  background: rgba(27, 42, 54, 0.055);
}

body[data-theme="light"] .plugin-admin-schema-editor {
  color: #17212d;
  background: #ffffff;
}

body[data-theme="light"] .plugin-admin-action.is-primary {
  border-color: rgba(46, 129, 196, 0.22);
  background: rgba(46, 129, 196, 0.1);
  color: #20547d;
}

body[data-theme="light"] .plugin-admin-action.is-danger {
  border-color: rgba(192, 73, 73, 0.22);
  background: rgba(192, 73, 73, 0.1);
  color: #8c3131;
}

body[data-theme="light"] .plugin-admin-action.is-active {
  border-color: rgba(159, 111, 27, 0.24);
  background: rgba(159, 111, 27, 0.1);
  color: #7a5314;
}

@media (max-width: 820px) {
  .plugin-admin-workbench {
    padding: 6px;
  }

  .plugin-admin-shell {
    height: 100%;
    padding: 10px;
  }

  .plugin-admin-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(190px, 32vh) minmax(0, 1fr);
  }

  .plugin-admin-header {
    align-items: flex-start;
  }

  .plugin-admin-detail-title-row,
  .plugin-admin-detail-title-side {
    display: grid;
    min-width: 0;
    width: 100%;
    justify-content: stretch;
  }

  .plugin-admin-detail-meta,
  .plugin-admin-detail-actions {
    justify-content: flex-start;
  }

  .plugin-admin-quality {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "summary"
      "sections"
      "issues";
  }

  .plugin-admin-quality-issues {
    grid-template-columns: 1fr;
  }

  .plugin-admin-knowledge {
    grid-template-columns: 1fr;
  }

  .plugin-admin-knowledge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plugin-admin-knowledge-reasons {
    grid-column: 1;
    grid-template-columns: 1fr;
  }

  .plugin-admin-identity-head {
    display: grid;
  }

  .plugin-admin-identity-note {
    text-align: left;
  }

  .plugin-admin-identity-grid {
    grid-template-columns: 1fr;
  }

  .plugin-admin-guideline-head,
  .plugin-admin-guideline-group-head,
  .plugin-admin-guideline-field-head {
    display: grid;
  }

  .plugin-admin-guideline-fields {
    grid-template-columns: 1fr;
  }

  .plugin-admin-guideline-split {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(220px, 42vh);
  }

  .plugin-admin-guideline {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}

.advance-lab-workbench {
  position: fixed;
  inset: 0;
  z-index: 140100;
  display: grid;
  padding: 8px;
  background: rgba(7, 10, 18, 0.34);
  backdrop-filter: blur(18px) saturate(0.96);
  -webkit-backdrop-filter: blur(18px) saturate(0.96);
  color: var(--text-main);
  box-sizing: border-box;
}

.advance-lab-workbench[hidden] {
  display: none;
}

.advance-lab-shell {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  height: 100%;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(27, 31, 42, 0.96), rgba(17, 20, 28, 0.96)),
    rgba(17, 20, 28, 0.96);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  box-sizing: border-box;
}

.advance-lab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.advance-lab-title-group {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.advance-lab-eyebrow {
  margin: 0;
  color: #9bd7ff;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.advance-lab-title {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.25;
}

.advance-lab-meta {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.86rem;
}

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

.advance-lab-action,
.advance-lab-close {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
}

.advance-lab-action.is-primary {
  border-color: rgba(133, 205, 255, 0.3);
  background: rgba(133, 205, 255, 0.14);
  color: #d9f1ff;
}

.advance-lab-close {
  width: 40px;
  padding: 0;
}

.advance-lab-layout {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 12px;
}

.advance-lab-control,
.advance-lab-main {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.advance-lab-control {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 14px;
}

.advance-lab-field {
  min-width: 0;
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 760;
}

.advance-lab-field textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  outline: none;
  background: rgba(7, 10, 18, 0.42);
  color: var(--text-main);
  font: 0.9rem/1.5 inherit;
  box-sizing: border-box;
}

.advance-lab-field textarea:focus {
  border-color: rgba(133, 205, 255, 0.38);
  box-shadow: 0 0 0 3px rgba(133, 205, 255, 0.1);
}

.advance-lab-field.is-compact {
  gap: 6px;
  font-size: 0.76rem;
}

.advance-lab-field.is-compact textarea {
  min-height: 72px;
  padding: 9px 10px;
  font-size: 0.82rem;
}

.advance-lab-phase-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.advance-lab-phase {
  min-width: 0;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-weight: 760;
  cursor: pointer;
}

.advance-lab-phase.is-active {
  border-color: rgba(133, 205, 255, 0.38);
  background: rgba(133, 205, 255, 0.13);
  color: #d9f1ff;
}

.advance-lab-hint {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.5;
  opacity: 0.82;
}

.advance-lab-status-line {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.advance-lab-status-line span {
  display: block;
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-size: 0.74rem;
  line-height: 1.35;
}

.advance-lab-main {
  display: grid;
  overflow: auto;
}

.advance-lab-flow {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
}

.advance-lab-step {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.advance-lab-step-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.advance-lab-step-head h3,
.advance-lab-subtitle,
.advance-lab-question h4,
.advance-lab-explain h4 {
  margin: 0;
  color: var(--text-main);
  font-size: 0.98rem;
  line-height: 1.35;
}

.advance-lab-step-head p,
.advance-lab-explain p {
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.5;
}

.advance-lab-step-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.advance-lab-question-list,
.advance-lab-structured,
.advance-lab-candidates-panel {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.advance-lab-question {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(7, 10, 18, 0.2);
}

.advance-lab-option-list {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.advance-lab-choice {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: flex-start;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.advance-lab-choice input {
  margin-top: 3px;
}

.advance-lab-choice span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.advance-lab-choice strong {
  color: var(--text-main);
  font-size: 0.82rem;
  line-height: 1.35;
}

.advance-lab-choice small {
  color: var(--text-soft);
  font-size: 0.72rem;
  line-height: 1.4;
}

.advance-lab-explain-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.advance-lab-explain {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(7, 10, 18, 0.18);
}

.advance-lab-subtitle {
  margin-top: 4px;
}

.advance-lab-result {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
}

.advance-lab-summary {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.advance-lab-summary-chips,
.advance-lab-score-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.advance-lab-summary-chips span,
.advance-lab-score-pill,
.advance-lab-node-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 780;
}

.advance-lab-score-pill {
  min-height: 22px;
}

.advance-lab-score-pill.is-negative {
  color: #ffc4c4;
  background: rgba(255, 115, 115, 0.13);
}

.advance-lab-score-pill.is-warning {
  color: #ffe3ae;
  background: rgba(255, 190, 92, 0.14);
}

.advance-lab-summary-text {
  margin: 0;
  color: var(--text-main);
  font-size: 0.9rem;
  line-height: 1.5;
}

.advance-lab-node-list {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.advance-lab-node,
.advance-lab-candidate-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(7, 10, 18, 0.22);
}

.advance-lab-node-head,
.advance-lab-candidate-head,
.advance-lab-section-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.advance-lab-node h4,
.advance-lab-candidate-card h5,
.advance-lab-section-head h5 {
  margin: 0;
  color: var(--text-main);
  font-size: 0.96rem;
  line-height: 1.35;
}

.advance-lab-section-head h5 {
  font-size: 0.86rem;
}

.advance-lab-node p,
.advance-lab-candidate-card p,
.advance-lab-section-head span {
  margin: 2px 0 0;
  color: var(--text-soft);
  font-size: 0.74rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.advance-lab-node-fields,
.advance-lab-candidate-details {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.advance-lab-kv {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
}

.advance-lab-kv span {
  color: var(--text-soft);
  font-size: 0.66rem;
  font-weight: 760;
  text-transform: none;
}

.advance-lab-kv strong {
  min-width: 0;
  color: var(--text-main);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.advance-lab-candidate-list {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.advance-lab-candidate-card.is-selected {
  border-color: rgba(133, 205, 255, 0.45);
  background: rgba(133, 205, 255, 0.08);
  box-shadow: inset 4px 0 0 rgba(133, 205, 255, 0.72);
}

.advance-lab-candidate-card.is-rejected {
  border-color: rgba(255, 142, 142, 0.22);
  background: rgba(255, 115, 115, 0.055);
  box-shadow: inset 4px 0 0 rgba(255, 142, 142, 0.32);
}

.advance-lab-candidate-list.is-rejected-list {
  opacity: 0.96;
}

.advance-lab-main-score {
  flex: 0 0 auto;
  min-width: 58px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(133, 205, 255, 0.12);
  color: #d9f1ff;
  font-size: 0.78rem;
  font-weight: 820;
  text-align: center;
}

.advance-lab-empty,
.advance-lab-error {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.86rem;
  line-height: 1.5;
}

.advance-lab-error {
  color: #ffc4c4;
  background: rgba(255, 115, 115, 0.13);
}

.advance-lab-raw {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(7, 10, 18, 0.28);
  overflow: hidden;
}

.advance-lab-raw summary {
  padding: 10px 12px;
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 780;
  cursor: pointer;
}

.advance-lab-raw pre {
  max-height: 420px;
  margin: 0;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #dce9f7;
  font: 0.76rem/1.5 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  overflow: auto;
}

body[data-theme="light"] .advance-lab-shell {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(27, 42, 54, 0.12);
}

body[data-theme="light"] .advance-lab-eyebrow {
  color: #20547d;
}

body[data-theme="light"] .advance-lab-control,
body[data-theme="light"] .advance-lab-main,
body[data-theme="light"] .advance-lab-step,
body[data-theme="light"] .advance-lab-summary,
body[data-theme="light"] .advance-lab-node,
body[data-theme="light"] .advance-lab-question,
body[data-theme="light"] .advance-lab-choice,
body[data-theme="light"] .advance-lab-explain,
body[data-theme="light"] .advance-lab-candidate-card,
body[data-theme="light"] .advance-lab-raw {
  border-color: rgba(27, 42, 54, 0.12);
  background: #ffffff;
}

body[data-theme="light"] .advance-lab-field textarea {
  border-color: rgba(27, 42, 54, 0.14);
  background: #ffffff;
  color: #17212d;
}

body[data-theme="light"] .advance-lab-phase {
  border-color: rgba(27, 42, 54, 0.12);
  background: #f8fafc;
  color: #425466;
}

body[data-theme="light"] .advance-lab-phase.is-active {
  border-color: rgba(46, 129, 196, 0.28);
  background: rgba(46, 129, 196, 0.1);
  color: #20547d;
}

body[data-theme="light"] .advance-lab-summary-chips span,
body[data-theme="light"] .advance-lab-score-pill,
body[data-theme="light"] .advance-lab-node-status,
body[data-theme="light"] .advance-lab-kv,
body[data-theme="light"] .advance-lab-status-line span,
body[data-theme="light"] .advance-lab-empty {
  background: rgba(27, 42, 54, 0.055);
}

body[data-theme="light"] .advance-lab-candidate-card.is-selected {
  border-color: rgba(37, 99, 235, 0.56);
  background: #eaf4ff;
  box-shadow: inset 4px 0 0 #2563eb;
}

body[data-theme="light"] .advance-lab-main-score,
body[data-theme="light"] .advance-lab-action.is-primary {
  border-color: rgba(46, 129, 196, 0.22);
  background: rgba(46, 129, 196, 0.1);
  color: #20547d;
}

body[data-theme="light"] .advance-lab-error,
body[data-theme="light"] .advance-lab-score-pill.is-negative {
  color: #8c3131;
  background: rgba(192, 73, 73, 0.1);
}

body[data-theme="light"] .advance-lab-raw pre {
  color: #17212d;
  background: #ffffff;
}

@media (max-width: 920px) {
  .advance-lab-workbench {
    padding: 6px;
  }

  .advance-lab-shell {
    padding: 10px;
  }

  .advance-lab-header {
    align-items: flex-start;
  }

  .advance-lab-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .advance-lab-control {
    gap: 10px;
  }

  .advance-lab-field textarea {
    min-height: 130px;
  }

  .advance-lab-node-fields,
  .advance-lab-candidate-details {
    grid-template-columns: 1fr;
  }
}

.plugin-generation {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  min-height: 0;
  height: 100%;
  width: 100%;
  text-align: left;
  padding: 8px 10px 10px;
  box-sizing: border-box;
  overflow: hidden;
}

.plugin-generation.is-awaiting-prompt {
  justify-content: center;
  padding: 14px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 22% 18%, rgba(96, 165, 250, 0.22), transparent 34%),
    radial-gradient(circle at 78% 82%, rgba(168, 85, 247, 0.2), transparent 38%),
    linear-gradient(145deg, rgba(8, 13, 28, 0.9), rgba(15, 21, 38, 0.72));
}

.plugin-generation-start {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(134, 191, 255, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(20, 30, 54, 0.82), rgba(9, 13, 26, 0.9)),
    rgba(9, 13, 26, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 44px rgba(88, 151, 255, 0.08),
    0 28px 72px rgba(0, 0, 0, 0.24);
  isolation: isolate;
}

.plugin-generation-start::before,
.plugin-generation-start::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(2px);
  z-index: -1;
}

.plugin-generation-start::before {
  width: 210px;
  height: 210px;
  left: -74px;
  top: -70px;
  background: radial-gradient(circle, rgba(73, 139, 255, 0.24), transparent 68%);
}

.plugin-generation-start::after {
  right: -58px;
  bottom: -78px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(175, 89, 255, 0.2), transparent 66%);
}

.plugin-generation-start-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.plugin-generation-start-title {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.plugin-generation-start-eyebrow,
.plugin-generation-start-name,
.plugin-generation-start-hint {
  margin: 0;
}

.plugin-generation-start-eyebrow {
  color: rgba(140, 194, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.plugin-generation-start-name {
  color: rgba(247, 250, 255, 0.98);
  font-size: 1.28rem;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.plugin-generation-start-hint {
  max-width: 360px;
  color: rgba(220, 230, 246, 0.6);
  font-size: 0.82rem;
  line-height: 1.5;
}

.plugin-generation-start-close {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(239, 245, 255, 0.86);
  font-size: 1.2rem;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.plugin-generation-start-close:hover {
  border-color: rgba(134, 191, 255, 0.28);
  background: rgba(134, 191, 255, 0.12);
  color: #fff;
}

.plugin-generation-start-input {
  width: 100%;
  min-height: 124px;
  padding: 18px 20px;
  border: 1px solid rgba(134, 191, 255, 0.2);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(4, 9, 22, 0.7), rgba(10, 16, 31, 0.58)),
    rgba(4, 9, 22, 0.62);
  color: rgba(247, 250, 255, 0.96);
  font: inherit;
  line-height: 1.6;
  outline: none;
  resize: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 18px 42px rgba(0, 0, 0, 0.18);
}

.plugin-generation-start-input::placeholder {
  color: rgba(222, 232, 248, 0.38);
}

.plugin-generation-start-input:focus {
  border-color: rgba(98, 179, 255, 0.56);
  box-shadow:
    0 0 0 4px rgba(65, 135, 255, 0.14),
    0 0 34px rgba(94, 169, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.plugin-generation-start-actions {
  display: flex;
  justify-content: center;
}

.plugin-generation-start-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 154px;
  min-height: 46px;
  padding: 0 24px;
  border: 1px solid rgba(111, 184, 255, 0.36);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(92, 190, 255, 0.42), rgba(77, 111, 255, 0.28)),
    rgba(255, 255, 255, 0.08);
  color: rgba(247, 251, 255, 0.98);
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 14px 34px rgba(58, 137, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.plugin-generation-start-button:hover {
  transform: translateY(-1px);
  border-color: rgba(139, 204, 255, 0.5);
  background:
    linear-gradient(180deg, rgba(112, 204, 255, 0.5), rgba(93, 127, 255, 0.34)),
    rgba(255, 255, 255, 0.1);
}

.plugin-generation-start-button:disabled,
.plugin-generation-start-close:disabled,
.plugin-generation-start-input:disabled {
  cursor: default;
  opacity: 0.58;
}

body[data-theme="light"] .plugin-generation.is-awaiting-prompt {
  background:
    radial-gradient(circle at 22% 18%, rgba(56, 130, 246, 0.16), transparent 34%),
    radial-gradient(circle at 78% 82%, rgba(147, 51, 234, 0.13), transparent 38%),
    linear-gradient(145deg, rgba(233, 242, 255, 0.92), rgba(246, 248, 253, 0.78));
}

body[data-theme="light"] .plugin-generation-start {
  border-color: rgba(69, 126, 214, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(233, 240, 252, 0.88)),
    rgba(255, 255, 255, 0.78);
}

body[data-theme="light"] .plugin-generation-start-name {
  color: #14213a;
}

body[data-theme="light"] .plugin-generation-start-hint {
  color: rgba(32, 45, 68, 0.6);
}

body[data-theme="light"] .plugin-generation-start-input {
  border-color: rgba(69, 126, 214, 0.2);
  background: rgba(255, 255, 255, 0.7);
  color: #172033;
}

body[data-theme="light"] .plugin-generation-start-input::placeholder {
  color: rgba(32, 45, 68, 0.42);
}

body[data-theme="light"] .widget.is-quick-plugin-generation {
  border-color: rgba(255, 255, 255, 0.56);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 248, 244, 0.96)),
    rgba(255, 255, 255, 0.96);
  box-shadow:
    0 26px 72px rgba(15, 10, 32, 0.24),
    0 0 0 1px rgba(91, 61, 196, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body[data-theme="light"] .widget.is-quick-plugin-generation .widget-header {
  border-bottom-color: rgba(91, 61, 196, 0.08);
  background: rgba(255, 255, 255, 0.22);
}

body[data-theme="light"] .plugin-generation.is-quick-launch-flow.is-awaiting-prompt {
  background: rgba(255, 255, 255, 0.96);
}

body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-start {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 248, 244, 0.96)),
    rgba(255, 255, 255, 0.96);
}

body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-start::before {
  background: radial-gradient(circle, rgba(255, 238, 205, 0.42), transparent 66%);
}

body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-start-input {
  color: #2a241b;
}

body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-start-input::placeholder {
  color: rgba(74, 63, 47, 0.42);
}

body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-title {
  color: rgba(75, 36, 200, 0.56);
}

body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-title.is-elapsed {
  color: #6c42e7;
}

body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-name {
  color: #4b24c8;
}

body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-progress-panel,
body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-confirmation,
body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-failure {
  border-color: rgba(91, 61, 196, 0.12);
  background: rgba(255, 255, 255, 0.5);
  color: rgba(55, 38, 120, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-copy,
body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-meta,
body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-progress-label {
  color: rgba(55, 38, 120, 0.72);
}

body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-progress-meter {
  background: rgba(91, 61, 196, 0.08);
}

body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-progress-track {
  background: rgba(91, 61, 196, 0.12);
}

body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-progress-percent {
  color: rgba(75, 36, 200, 0.7);
}

body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-progress-stage {
  border-color: rgba(91, 61, 196, 0.12);
  background: rgba(91, 61, 196, 0.06);
  color: rgba(75, 36, 200, 0.42);
}

body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-progress-stage[data-state="active"] {
  border-color: rgba(125, 85, 255, 0.32);
  background: rgba(125, 85, 255, 0.14);
  color: #4b24c8;
}

body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-progress-stage[data-state="done"] {
  border-color: rgba(125, 85, 255, 0.22);
  background: rgba(125, 85, 255, 0.1);
  color: rgba(75, 36, 200, 0.78);
}

body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-details-toggle {
  border-color: rgba(91, 61, 196, 0.14);
  background: rgba(91, 61, 196, 0.06);
  color: rgba(75, 36, 200, 0.58);
}

body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-details-toggle:hover:not(:disabled),
body[data-theme="light"] .plugin-generation.is-quick-launch-flow .plugin-generation-details-toggle[data-state="open"] {
  border-color: rgba(91, 61, 196, 0.26);
  background: rgba(91, 61, 196, 0.12);
  color: #4b24c8;
}

.widget.is-quick-plugin-generation {
  border-color: var(--panel-border);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(28, 32, 42, 0.98), rgba(18, 22, 30, 0.96)),
    rgba(18, 22, 30, 0.96);
  box-shadow:
    0 26px 72px rgba(15, 10, 32, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.widget.is-quick-plugin-generation .widget-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: transparent;
}

.widget.is-quick-plugin-generation .widget-body {
  overflow: hidden;
  padding: 0;
}

.widget.is-plugin-generation-awaiting-prompt {
  min-height: 0;
}

.widget.is-plugin-generation-awaiting-prompt .widget-body {
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  min-height: 0;
}

.plugin-generation.is-quick-launch-flow {
  padding: 16px 18px 18px;
  color: #4b24c8;
}

.plugin-generation.is-quick-launch-flow.is-awaiting-prompt {
  padding: 0;
  border-radius: 0 0 28px 28px;
  background: rgba(18, 22, 30, 0.96);
}

.plugin-generation.is-awaiting-prompt > :not(.plugin-generation-start) {
  display: none !important;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-start {
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  gap: 14px;
  padding: 18px 24px 16px;
  border: 0;
  border-radius: 0 0 28px 28px;
  background:
    linear-gradient(180deg, rgba(28, 32, 42, 0.98), rgba(18, 22, 30, 0.96)),
    rgba(18, 22, 30, 0.96);
  box-shadow: none;
  justify-content: flex-start;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-start::before {
  width: 240px;
  height: 240px;
  left: auto;
  right: -98px;
  top: -118px;
  background: radial-gradient(circle, rgba(255, 207, 115, 0.14), transparent 66%);
}

.plugin-generation.is-quick-launch-flow .plugin-generation-start::after {
  width: 210px;
  height: 210px;
  right: auto;
  left: -96px;
  bottom: -108px;
  background: radial-gradient(circle, rgba(255, 207, 115, 0.18), transparent 64%);
}

.plugin-generation.is-quick-launch-flow .plugin-generation-start-eyebrow {
  display: none;
  color: rgba(75, 36, 200, 0.54);
  letter-spacing: 0.16em;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-start-name {
  display: none;
  color: #4b24c8;
  font-size: 1.32rem;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-start-hint {
  display: none;
  color: rgba(75, 36, 200, 0.56);
}

.plugin-generation.is-quick-launch-flow .plugin-generation-start-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: 0;
  background: rgba(32, 28, 42, 0.06);
  color: rgba(30, 28, 38, 0.72);
  box-shadow: none;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-start-close:hover {
  background: rgba(32, 28, 42, 0.11);
  color: rgba(16, 15, 22, 0.92);
}

.plugin-generation.is-quick-launch-flow .plugin-generation-start-input {
  flex: 1 1 auto;
  min-height: 0;
  padding: 2px 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(246, 241, 230, 0.92);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.46;
  box-shadow: none;
  overflow: auto;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-start-input::placeholder {
  color: rgba(246, 241, 230, 0.42);
}

.plugin-generation.is-quick-launch-flow .plugin-generation-start-input:focus {
  box-shadow: none;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-start-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 8px;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-start-button {
  min-width: 154px;
  min-height: 42px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #7d55ff 0%, #8f55f0 48%, #6c42e7 100%);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-transform: none;
  box-shadow:
    0 18px 42px rgba(81, 42, 189, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.plugin-generation.is-quick-launch-flow .plugin-generation-start-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #8965ff 0%, #985ff7 48%, #754bed 100%);
}

.plugin-generation.is-quick-launch-flow .plugin-generation-orb {
  display: none;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-hero {
  gap: 0;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-hero-content {
  padding: 12px 14px 0;
  gap: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-title {
  color: rgba(246, 241, 230, 0.56);
  font-size: 0.78rem;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-title.is-elapsed {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  color: rgba(255, 207, 115, 0.86);
  font-size: 0.78rem;
  white-space: nowrap;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-top-cancel {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  align-self: start;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-name {
  grid-column: 1;
  color: rgba(255, 250, 240, 0.94);
  font-size: 1rem;
  line-height: 1.25;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-title:not(.is-elapsed) {
  grid-column: 1;
  grid-row: 1;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-progress-panel {
  grid-column: 1 / -1;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-progress-panel,
.plugin-generation.is-quick-launch-flow .plugin-generation-confirmation,
.plugin-generation.is-quick-launch-flow .plugin-generation-failure {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(246, 241, 230, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.plugin-generation.is-quick-launch-flow .plugin-generation-progress-panel {
  margin-top: 2px;
  gap: 7px;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-actions[hidden],
.plugin-generation.is-quick-launch-flow .plugin-generation-actions-row[hidden],
.plugin-generation.is-quick-launch-flow .plugin-generation-confirmation[hidden] {
  display: none;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-copy,
.plugin-generation.is-quick-launch-flow .plugin-generation-meta,
.plugin-generation.is-quick-launch-flow .plugin-generation-progress-label {
  color: rgba(246, 241, 230, 0.72);
}

.plugin-generation.is-quick-launch-flow .plugin-generation-progress-meter {
  background: rgba(255, 255, 255, 0.06);
}

.plugin-generation.is-quick-launch-flow .plugin-generation-progress-track {
  background: rgba(255, 255, 255, 0.1);
}

.plugin-generation.is-quick-launch-flow .plugin-generation-progress-fill {
  background: linear-gradient(90deg, #7d55ff 0%, #ffcf73 100%);
}

.plugin-generation.is-quick-launch-flow .plugin-generation-progress-percent {
  color: rgba(255, 207, 115, 0.84);
}

.plugin-generation.is-quick-launch-flow .plugin-generation-progress-stage {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(246, 241, 230, 0.42);
}

.plugin-generation.is-quick-launch-flow .plugin-generation-progress-stage[data-state="active"] {
  border-color: rgba(255, 207, 115, 0.28);
  background: rgba(255, 207, 115, 0.1);
  color: rgba(255, 229, 179, 0.96);
}

.plugin-generation.is-quick-launch-flow .plugin-generation-progress-stage[data-state="done"] {
  border-color: rgba(149, 226, 184, 0.2);
  background: rgba(149, 226, 184, 0.08);
  color: rgba(180, 240, 205, 0.86);
}

.plugin-generation.is-quick-launch-flow .plugin-generation-details-toggle {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(246, 241, 230, 0.58);
}

.plugin-generation.is-quick-launch-flow .plugin-generation-details-toggle:hover:not(:disabled),
.plugin-generation.is-quick-launch-flow .plugin-generation-details-toggle[data-state="open"] {
  border-color: rgba(255, 207, 115, 0.26);
  background: rgba(255, 207, 115, 0.1);
  color: rgba(255, 229, 179, 0.96);
}

.plugin-generation.is-quick-launch-flow .plugin-generation-top-cancel {
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(190, 81, 81, 0.16);
  border-radius: 999px;
  background: rgba(190, 81, 81, 0.06);
  color: rgba(158, 54, 54, 0.82);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-top-cancel:hover:not(:disabled) {
  border-color: rgba(190, 81, 81, 0.28);
  background: rgba(190, 81, 81, 0.12);
  color: #8f2f2f;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-top-cancel[hidden] {
  display: none;
}

.plugin-generation.is-quick-launch-flow .plugin-generation-status-details {
  border-top-color: rgba(91, 61, 196, 0.1);
}

.plugin-generation-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.plugin-generation-hero-content {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.plugin-generation-orb {
  position: relative;
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(122, 183, 255, 0.18);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.12), transparent 40%),
    rgba(122, 183, 255, 0.08);
  box-shadow:
    inset 0 9px 18px rgba(255, 255, 255, 0.07),
    0 12px 24px rgba(0, 0, 0, 0.2);
  transform: translate3d(0, 0, 0);
  animation: plugin-orb-float 2.8s ease-in-out infinite;
  will-change: transform;
  backface-visibility: hidden;
  contain: paint;
  isolation: isolate;
}

.plugin-generation-orb-progress {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: conic-gradient(
    from 0deg,
    rgba(147, 201, 255, 0.92),
    rgba(93, 161, 244, 0.76),
    rgba(255, 255, 255, 0.12),
    rgba(147, 201, 255, 0.92)
  );
  box-shadow: inset 0 0 0 1px rgba(122, 183, 255, 0.12);
  animation: plugin-orb-ring-spin 4.2s linear infinite;
}

.plugin-generation-orb-progress::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.12), transparent 40%),
    rgba(10, 16, 28, 0.86);
}

.plugin-generation-orb-progress[data-state="failed"] {
  background: conic-gradient(
    from 0deg,
    rgba(255, 120, 120, 0.96),
    rgba(230, 92, 92, 0.78),
    rgba(255, 255, 255, 0.12),
    rgba(255, 120, 120, 0.96)
  );
  animation: none;
}

.plugin-generation-orb-progress[data-state="idle"] {
  background: conic-gradient(
    from 0deg,
    rgba(149, 226, 184, 0.96),
    rgba(92, 194, 139, 0.8),
    rgba(255, 255, 255, 0.12),
    rgba(149, 226, 184, 0.96)
  );
  animation: none;
}

.plugin-generation-orb-progress-value {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: rgba(245, 250, 255, 0.96);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}

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

.plugin-generation-glow {
  position: absolute;
  inset: 11%;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.22), transparent 62%);
  opacity: 0.82;
  animation: plugin-orb-pulse 2.4s ease-in-out infinite;
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.plugin-generation-liquid {
  position: absolute;
  left: -9%;
  right: -9%;
  bottom: -11%;
  height: 61%;
  border-radius: 50% 50% 44% 44% / 20% 20% 80% 80%;
  background:
    linear-gradient(180deg, rgba(147, 201, 255, 0.8), rgba(66, 132, 233, 0.46)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14), transparent 54%);
  transform: translate3d(0, 0, 0);
  transform-origin: 50% 60%;
  animation: plugin-liquid-rise 3.2s ease-in-out infinite;
  will-change: transform;
  backface-visibility: hidden;
}

.plugin-generation-liquid.is-secondary {
  left: -5%;
  right: -5%;
  bottom: -15%;
  height: 56%;
  opacity: 0.22;
  background:
    linear-gradient(180deg, rgba(113, 176, 244, 0.58), rgba(54, 111, 211, 0.3)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent 56%);
  animation-duration: 4.1s;
  animation-delay: -0.9s;
}

.plugin-generation-title,
.plugin-generation-name,
.plugin-generation-copy {
  margin: 0;
}

.plugin-generation-title {
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 700;
  max-width: 100%;
  line-height: 1.3;
  letter-spacing: 0.03em;
  color: var(--text-dim);
}

.plugin-generation-title.is-elapsed {
  font-size: 1.02rem;
  font-weight: 800;
  color: rgba(147, 201, 255, 0.96);
}

.plugin-generation-name {
  color: var(--text-main);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.3;
  max-width: none;
  overflow-wrap: anywhere;
}

.plugin-generation-copy {
  color: var(--text-soft);
  line-height: 1.45;
  max-width: none;
  overflow-wrap: anywhere;
}

.plugin-generation-status-panel,
.plugin-generation-progress-panel {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(122, 183, 255, 0.12);
  box-sizing: border-box;
}

.plugin-generation-copy.is-detail {
  color: var(--text-main);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.45;
}

.plugin-generation-copy.is-model {
  color: rgba(147, 201, 255, 0.94);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
}

.plugin-generation-copy.is-activity {
  color: rgba(147, 201, 255, 0.92);
  font-size: 0.88rem;
  line-height: 1.45;
}

.plugin-generation-meta {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.4;
  max-width: none;
  overflow-wrap: anywhere;
}

.plugin-generation-progress-label {
  margin: 0;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  max-width: none;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.plugin-generation-progress-meter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px;
  border-radius: 999px;
  background: rgba(122, 183, 255, 0.06);
  box-sizing: border-box;
}

.plugin-generation-status-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  width: 100%;
}

.plugin-generation-status-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  padding-top: 6px;
  border-top: 1px solid rgba(122, 183, 255, 0.1);
}

.plugin-generation-status-details[hidden] {
  display: none;
}

.plugin-generation-details-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  padding: 0;
  border: 1px solid rgba(122, 183, 255, 0.18);
  border-radius: 999px;
  background: rgba(122, 183, 255, 0.08);
  color: rgba(147, 201, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
}

.plugin-generation-details-toggle:hover:not(:disabled),
.plugin-generation-details-toggle[data-state="open"] {
  border-color: rgba(147, 201, 255, 0.32);
  background: rgba(122, 183, 255, 0.14);
  color: var(--text-main);
}

.plugin-generation-details-toggle:disabled,
.plugin-generation-details-toggle[data-state="empty"] {
  cursor: default;
  opacity: 0.42;
  filter: grayscale(0.5);
}

.plugin-generation-progress-track {
  position: relative;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(122, 183, 255, 0.12);
}

.plugin-generation-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  min-width: 8px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(147, 201, 255, 0.95), rgba(93, 161, 244, 0.86));
  box-shadow: 0 0 18px rgba(93, 161, 244, 0.28);
  transition: width 320ms cubic-bezier(0.22, 0.82, 0.28, 1);
}

.plugin-generation-progress-fill[data-state="failed"] {
  background: linear-gradient(90deg, rgba(255, 120, 120, 0.94), rgba(230, 92, 92, 0.86));
  box-shadow: 0 0 16px rgba(230, 92, 92, 0.24);
}

.plugin-generation-progress-fill[data-state="done"] {
  background: linear-gradient(90deg, rgba(149, 226, 184, 0.96), rgba(92, 194, 139, 0.88));
  box-shadow: 0 0 16px rgba(92, 194, 139, 0.22);
}

.plugin-generation-progress-percent {
  min-width: 42px;
  margin: 0;
  color: rgba(147, 201, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: right;
}

.plugin-generation-progress-stages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

.plugin-generation-progress-stage {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(122, 183, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.plugin-generation-progress-stage::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.42;
}

.plugin-generation-progress-stage[data-state="active"] {
  border-color: rgba(147, 201, 255, 0.28);
  background: rgba(122, 183, 255, 0.1);
  color: rgba(147, 201, 255, 0.96);
}

.plugin-generation-progress-stage[data-state="active"]::before {
  opacity: 1;
  box-shadow: 0 0 0 5px rgba(147, 201, 255, 0.1);
}

.plugin-generation-progress-stage[data-state="done"] {
  border-color: rgba(149, 226, 184, 0.22);
  background: rgba(149, 226, 184, 0.08);
  color: rgba(149, 226, 184, 0.9);
}

.plugin-generation-confirmation {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(122, 183, 255, 0.14);
  box-sizing: border-box;
}

.plugin-generation-confirmation[hidden] {
  display: none;
}

.plugin-generation-confirmation-eyebrow,
.plugin-generation-confirmation-title,
.plugin-generation-confirmation-body {
  margin: 0;
}

.plugin-generation-confirmation-eyebrow {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.plugin-generation-confirmation-title {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

.plugin-generation-confirmation-body {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.plugin-generation-confirmation-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.plugin-generation-confirmation-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(122, 183, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  box-sizing: border-box;
}

.plugin-generation-confirmation-option input {
  margin-top: 2px;
}

.plugin-generation-confirmation-option-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.plugin-generation-confirmation-option-copy strong {
  color: var(--text-main);
  font-size: 0.9rem;
  line-height: 1.35;
}

.plugin-generation-confirmation-option-copy small {
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.4;
}

.plugin-generation-confirmation-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding-top: 2px;
}

.plugin-generation-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  padding-top: 2px;
}

.plugin-generation-actions-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.plugin-generation-actions-row:empty {
  display: none;
}

.plugin-generation-actions-row.is-secondary {
  justify-content: center;
}

.plugin-generation-actions-row.is-primary {
  justify-content: center;
}

.plugin-generation-structure-btn {
  min-height: 36px;
  width: auto;
  min-width: 132px;
  max-width: 100%;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(122, 183, 255, 0.28);
  background: rgba(122, 183, 255, 0.08);
  color: var(--text-main);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plugin-generation-actions-row.is-primary .plugin-generation-structure-btn {
  min-width: 188px;
}

.plugin-generation-structure-btn:hover {
  border-color: rgba(122, 183, 255, 0.46);
  background: rgba(122, 183, 255, 0.14);
}

.plugin-generation-structure-btn.is-primary {
  background: linear-gradient(135deg, rgba(122, 183, 255, 0.22), rgba(66, 132, 233, 0.18));
  border-color: rgba(122, 183, 255, 0.42);
}

.plugin-generation-structure-btn[hidden] {
  display: none;
}

.plugin-generation-failure {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(42, 32, 32, 0.6);
  border: 1px solid rgba(197, 126, 126, 0.2);
}

.plugin-generation-failure[hidden] {
  display: none;
}

.plugin-generation-failure-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #c57e7e;
  margin: 0 0 4px 0;
}

.plugin-generation-failure-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 12px 0;
}

.plugin-generation-failure-body {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.plugin-generation-failure-body p {
  margin: 0 0 4px 0;
  padding: 6px 10px;
  background: rgba(126, 97, 97, 0.1);
  border-radius: 6px;
  word-break: break-word;
}

.plugin-generation-failure-body p.plugin-path,
.plugin-generation-failure-body p.plugin-id {
  background: rgba(126, 97, 126, 0.15);
  font-family: monospace;
  font-size: 12px;
}

.plugin-generation-failure-details,
.plugin-generation-failure-files,
.plugin-generation-failure-validation {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(197, 126, 126, 0.15);
}

.plugin-generation-failure-details h4,
.plugin-generation-failure-files h4,
.plugin-generation-failure-validation h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 8px 0;
}

.plugin-generation-failure-details ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.plugin-generation-failure-details li {
  margin-bottom: 4px;
}

.plugin-generation-failure-files .file-item {
  margin-bottom: 12px;
}

.plugin-generation-failure-files h4 {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 4px 0;
}

.plugin-generation-failure-files pre {
  margin: 0;
  padding: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  font-size: 11px;
  font-family: monospace;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 150px;
}

.plugin-generation-failure-validation .has-errors {
  color: #c57e7e;
  font-weight: 600;
}

.plugin-generation-failure-validation .has-warnings {
  color: #c5a77e;
  font-weight: 600;
}

.plugin-generation-failure-validation ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.plugin-generation-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 170;
  min-width: 220px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(126, 197, 138, 0.18);
  background:
    linear-gradient(180deg, rgba(25, 32, 42, 0.96), rgba(14, 18, 26, 0.96)),
    rgba(14, 18, 26, 0.96);
  color: var(--text-main);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
  transform: translate(-50%, 16px);
  opacity: 0;
  transition:
    transform 260ms ease,
    opacity 260ms ease;
  pointer-events: none;
  text-align: center;
}

.plugin-generation-toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.plugin-generation-toast[data-type="error"] {
  border-color: rgba(219, 98, 98, 0.18);
}

body[data-theme="light"] .app-modal-card {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(27, 42, 54, 0.1);
}

body[data-theme="light"] .app-modal-choice-option {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(27, 42, 54, 0.04);
}

body[data-theme="light"] .app-modal-field input,
body[data-theme="light"] .app-modal-field textarea,
body[data-theme="light"] .app-modal-publish-field select {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.8);
  color-scheme: light;
}

body[data-theme="light"] .supervisor-prompt-spotlight {
  border-color: rgba(27, 42, 54, 0.1);
  background: rgba(27, 42, 54, 0.035);
}

body[data-theme="light"] .supervisor-prompt-spotlight-item {
  border-color: rgba(27, 42, 54, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .supervisor-prompt-spotlight-item:hover,
body[data-theme="light"] .supervisor-prompt-spotlight-item:focus-visible {
  border-color: rgba(27, 42, 54, 0.2);
  background: rgba(255, 255, 255, 0.92);
}

body[data-theme="light"] .supervisor-prompt-spotlight-description {
  color: rgba(27, 42, 54, 0.56);
}

body[data-theme="light"] .app-modal-publish-field select option {
  background: #ffffff;
  color: #1b2a36;
}

@media (max-width: 720px) {
  .app-modal-publish-grid {
    grid-template-columns: 1fr;
  }
}

body[data-theme="light"] .plugin-generation-orb {
  border-color: rgba(66, 132, 233, 0.18);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.3), transparent 42%),
    rgba(66, 132, 233, 0.08);
}

body[data-theme="light"] .plugin-generation-progress {
  background: rgba(27, 42, 54, 0.08);
}

body[data-theme="light"] .plugin-generation-structure-btn {
  border-color: rgba(47, 108, 171, 0.28);
  background: rgba(47, 108, 171, 0.08);
  color: #1b2a36;
}

body[data-theme="light"] .plugin-generation-structure-btn:hover {
  border-color: rgba(47, 108, 171, 0.42);
  background: rgba(47, 108, 171, 0.14);
}

body[data-theme="light"] .plugin-generation-toast {
  border-color: rgba(84, 150, 96, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: #17212b;
  box-shadow: 0 18px 38px rgba(17, 31, 51, 0.14);
}

body[data-theme="light"] .plugin-generation-toast[data-type="error"] {
  border-color: rgba(190, 81, 81, 0.18);
}

@keyframes plugin-orb-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(0.99);
  }
  50% {
    transform: translate3d(0, -4px, 0) scale(1.025);
  }
}

@keyframes plugin-liquid-rise {
  0% {
    transform: translate3d(-6.5%, 3.4%, 0) rotate(0deg);
  }
  25% {
    transform: translate3d(-2.2%, 2.1%, 0) rotate(0.9deg);
  }
  50% {
    transform: translate3d(5.8%, -1.6%, 0) rotate(1.9deg);
  }
  75% {
    transform: translate3d(2.1%, -3.1%, 0) rotate(0.8deg);
  }
  100% {
    transform: translate3d(-6.5%, 3.4%, 0) rotate(0deg);
  }
}

@keyframes plugin-orb-pulse {
  0%,
  100% {
    opacity: 0.64;
    transform: translate3d(0, 0, 0) scale(0.96);
  }
  50% {
    opacity: 0.96;
    transform: translate3d(0, 0, 0) scale(1.08);
  }
}

@keyframes plugin-quick-launch-blue-flicker {
  0%,
  100% {
    opacity: 0.92;
    transform: translate3d(0, 0, 0) scale(0.985);
    filter: blur(16px) saturate(1.04);
  }
  20% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(17px) saturate(1.08);
  }
  48% {
    opacity: 0.9;
    transform: translate3d(0, 0, 0) scale(0.992);
    filter: blur(15px) saturate(1.02);
  }
  54% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1.01);
    filter: blur(17px) saturate(1.12);
  }
  60% {
    opacity: 0.88;
    transform: translate3d(0, 0, 0) scale(0.99);
    filter: blur(15px) saturate(1);
  }
  74% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1.006);
    filter: blur(16px) saturate(1.08);
  }
}

@keyframes plugin-quick-launch-wave-flow {
  0% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -72;
  }
}

@keyframes plugin-quick-launch-wave-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scaleX(1);
    opacity: 0.92;
  }
  25% {
    transform: translate3d(1.5px, -1px, 0) scaleX(1.02);
    opacity: 1;
  }
  50% {
    transform: translate3d(-1.5px, 1.2px, 0) scaleX(0.985);
    opacity: 0.9;
  }
  75% {
    transform: translate3d(1px, -0.8px, 0) scaleX(1.015);
    opacity: 0.98;
  }
}

.context-menu[hidden] {
  display: none;
}

#contextCreatePluginButton {
  order: -20;
}

#contextSystemSettingsButton {
  order: -19;
}

#contextMenuDivider {
  order: -18;
}

.context-menu-divider {
  height: 1px;
  margin: 6px 6px 8px;
  background: rgba(255, 255, 255, 0.1);
}

.context-menu-divider[hidden] {
  display: none;
}

.context-menu-item {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: rgba(240, 246, 255, 0.92);
  background: transparent;
}

.context-menu-submenu-group {
  position: relative;
  width: 100%;
}

.context-menu-submenu-group::after {
  content: "";
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: 100%;
  width: 0;
}

.context-menu-submenu-group.is-open::after,
.context-menu-submenu-group:hover::after {
  width: 8px;
}

.context-menu-submenu-group.is-open > .context-menu-submenu-trigger,
.context-menu-submenu-group:hover > .context-menu-submenu-trigger {
  background: rgba(255, 255, 255, 0.08);
}

.context-menu-submenu-trigger {
  position: relative;
}

.context-menu-caret {
  flex: 0 0 auto;
  color: rgba(240, 246, 255, 0.46);
  font-size: 17px;
  line-height: 1;
}

.context-submenu-panel {
  position: absolute;
  top: 0;
  left: calc(100% + 2px);
  z-index: 1;
  min-width: 190px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(28, 34, 46, 0.96), rgba(16, 20, 29, 0.96)),
    rgba(12, 15, 23, 0.96);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.34),
    0 10px 22px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.context-menu-submenu-group.is-submenu-left .context-submenu-panel {
  left: auto;
  right: calc(100% + 2px);
}

.context-menu-submenu-group.is-submenu-left::after {
  left: auto;
  right: 100%;
}

.context-menu-submenu-group.is-submenu-up .context-submenu-panel {
  top: auto;
  bottom: 0;
}

.context-submenu-panel[hidden] {
  display: none;
}

.context-menu-section-label {
  padding: 8px 14px 4px;
  color: rgba(240, 246, 255, 0.52);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.context-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.context-menu-item:disabled {
  cursor: default;
  opacity: 0.56;
}

.context-menu-item:disabled:hover {
  background: transparent;
}

.context-menu-icon {
  flex: 0 0 18px;
  width: 18px;
  text-align: center;
  font-size: 15px;
  line-height: 1;
}

.context-menu-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  margin: 0 auto;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.context-menu-label {
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.context-menu-item.danger {
  color: #ff9d9d;
}

.context-menu-item.danger:hover {
  background: rgba(255, 122, 122, 0.12);
}

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

@media (max-width: 860px) {
  body {
    overflow: auto;
  }

  .desktop-app-grid {
    grid-template-rows: repeat(auto-fill, 98px);
    grid-auto-columns: 78px;
    gap: 14px 10px;
    padding: 58px 18px 152px 18px;
  }

  .workflow-desktop-entry-layer {
    padding: 18px 18px 152px 18px;
  }

  .workflow-desktop-entry-grid {
    grid-template-columns: repeat(auto-fill, 96px);
    grid-auto-rows: max-content;
    gap: 16px 12px;
  }

  .desktop-app-icon {
    width: 78px;
  }

  .workflow-desktop-icon {
    width: 96px;
  }

  .desktop-app-icon-face {
    width: 60px;
    height: 60px;
    border-radius: 18px;
  }

  .desktop-app-category-folder {
    width: 84px;
  }

  .desktop-app-category-folder-face {
    width: 64px;
    height: 64px;
    padding: 8px;
    border-radius: 20px;
  }

  .desktop-app-category-overlay-card {
    width: calc(100% - 32px);
    max-height: calc(100% - 40px);
    padding: 12px;
    border-radius: 24px;
  }

  .desktop-app-category-overlay-header {
    margin-bottom: 12px;
  }

  .desktop-app-category-overlay-grid {
    --desktop-category-overlay-icon-width: 56px;
    --desktop-category-overlay-row-height: 92px;
    --desktop-category-overlay-gap-x: 6px;
    --desktop-category-overlay-gap-y: 10px;
    padding: 2px;
  }

  .desktop-app-category-overlay-icon .desktop-app-icon-face {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .desktop-app-category-overlay-icon .desktop-app-icon-label {
    font-size: 0.62rem;
    line-height: 1.18;
  }

  .desktop-pager {
    right: 74px;
    bottom: 28px;
    min-width: 132px;
    max-width: min(220px, calc(100vw - 104px));
  }

  .hud {
    position: absolute;
    padding: 16px;
  }

  .hud-left {
    left: 50%;
    right: auto;
    bottom: 108px;
    padding: 0;
    transform: translateX(-50%);
  }

  .status-panel {
    width: min(100vw - 32px, 100%);
  }

  .widget {
    max-width: calc(100vw - 24px);
  }

  .widget-actions {
    justify-content: flex-start;
  }

  .composer {
    grid-template-columns: 1fr;
    bottom: 14px;
  }

  .plugin-center-btn {
    left: 14px;
    bottom: 14px;
  }

  .social-dock-shell {
    left: 14px;
    bottom: 14px;
  }

  .minimized-dock {
    left: 14px;
    bottom: 78px;
    max-width: calc(100vw - 28px);
  }

  .minimized-dock-list {
    max-width: calc(100vw - 28px);
  }

  .shared-desktop-banner {
    top: 12px;
    min-width: 0;
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
  }

  .social-dock-panel {
    width: min(calc(100vw - 28px), 760px);
    min-width: 0;
    min-height: 540px;
    height: min(82vh, 700px);
  }

  .social-dock-body {
    grid-template-columns: 1fr;
  }

  .social-dock-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .social-dock-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .social-dock-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .social-dock-list {
    max-height: 240px;
  }

  .social-dock-conversation-header {
    flex-direction: column;
    align-items: stretch;
  }

  .social-dock-conversation-actions {
    justify-content: space-between;
  }

  .social-dock-composer-footer {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .minimized-dock {
    top: auto;
    right: auto;
    left: 14px;
    bottom: 78px;
    width: auto;
    max-width: calc(100vw - 28px);
    max-height: none;
  }

  .minimized-dock-list {
    max-width: calc(100vw - 28px);
    max-height: none;
    padding-left: 0;
    overflow-x: auto;
    overflow-y: visible;
  }

  .minimized-dock-item-tooltip {
    display: none;
  }

  .composer-toolbar {
    bottom: 72px;
  }

  .toolbar-model-picker {
    max-width: calc(100vw - 104px);
  }

  .toolbar-model-select {
    max-width: calc(100vw - 104px);
    min-width: 0;
    width: min(280px, calc(100vw - 104px));
  }

  .voice-entry-btn {
    right: 14px;
    bottom: 14px;
  }

  .composer-actions {
    width: 100%;
  }

  .send-btn {
    flex: 1;
  }
}
.skills-menu-shell {
  position: relative;
}

.mobile-connect-shell {
  position: relative;
}

.mobile-connect-btn {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.mobile-connect-btn:hover,
.mobile-connect-btn[aria-expanded="true"] {
  border-color: rgba(247, 162, 76, 0.32);
  background: rgba(247, 162, 76, 0.18);
}

.mobile-connect-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 85;
  width: min(340px, calc(100vw - 32px));
  padding: 18px;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(18, 22, 31, 0.96), rgba(11, 13, 20, 0.96)),
    var(--panel-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.mobile-connect-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.mobile-connect-eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-connect-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.mobile-connect-state {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(247, 162, 76, 0.24);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(247, 162, 76, 0.1);
  font-size: 0.74rem;
  font-weight: 800;
}

.mobile-connect-qr {
  display: grid;
  place-items: center;
  width: 196px;
  height: 196px;
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.mobile-connect-qr:empty::before {
  content: "";
  width: 86px;
  height: 86px;
  border: 3px solid rgba(17, 24, 39, 0.16);
  border-top-color: rgba(17, 24, 39, 0.58);
  border-radius: 999px;
  animation: mobile-connect-spin 850ms linear infinite;
}

.mobile-connect-qr-svg {
  display: block;
  width: 176px;
  height: 176px;
}

.mobile-connect-qr-fallback {
  display: grid;
  place-items: center;
  width: 176px;
  height: 176px;
  padding: 18px;
  color: #1f2937;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.45;
}

.mobile-connect-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -2px 0 12px;
}

.mobile-connect-choices[hidden] {
  display: none;
}

.mobile-connect-choice {
  flex: 1 1 72px;
  min-width: 0;
  min-height: 32px;
  padding: 0 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.mobile-connect-choice[aria-pressed="true"] {
  border-color: rgba(247, 162, 76, 0.36);
  color: var(--accent);
  background: rgba(247, 162, 76, 0.14);
}

.mobile-connect-field {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.mobile-connect-field[hidden],
#mobileConnectCopyButton[hidden] {
  display: none;
}

.mobile-connect-field span {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.mobile-connect-field input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.07);
}

.mobile-connect-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-connect-actions .ghost-btn {
  flex: 1;
  min-height: 34px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 700;
}

.mobile-connect-actions #mobileConnectRefreshButton {
  flex: 0 1 148px;
  margin: 0 auto;
}

.mobile-connect-status {
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.5;
}

.mobile-connect-status[data-tone="success"] {
  color: var(--ok);
}

.mobile-connect-status[data-tone="warning"] {
  color: #f7c76d;
}

.mobile-connect-status[data-tone="error"] {
  color: var(--danger);
}

body[data-theme="light"] .mobile-connect-panel {
  border-color: rgba(56, 79, 110, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 253, 0.96)),
    rgba(245, 248, 252, 0.96);
  box-shadow: 0 18px 40px rgba(43, 61, 86, 0.16);
}

body[data-theme="light"] .mobile-connect-field input {
  border-color: rgba(27, 42, 54, 0.14);
  background: rgba(255, 255, 255, 0.74);
}

body[data-theme="light"] .mobile-connect-choice {
  border-color: rgba(27, 42, 54, 0.14);
  color: rgba(51, 65, 85, 0.78);
  background: rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .mobile-connect-choice[aria-pressed="true"] {
  border-color: rgba(217, 119, 6, 0.34);
  color: #b45309;
  background: rgba(251, 191, 36, 0.18);
}

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

.skills-menu-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.skills-menu-btn svg {
  width: 20px;
  height: 20px;
}

body[data-theme="light"] .skills-menu-btn {
  color: #17212b;
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(27, 42, 54, 0.16);
}

.skills-menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 85;
  width: min(420px, calc(100vw - 32px));
  max-height: min(80vh, 640px);
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(24, 28, 38, 0.98), rgba(17, 20, 28, 0.96)),
    rgba(17, 20, 28, 0.96);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.skills-panel-header {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.skills-panel-title {
  margin: 0;
  font-size: 1.1rem;
}

.skills-tabs {
  display: flex;
  gap: 6px;
}

.skills-tab {
  flex: 1;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.skills-tab.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.14);
}

.skills-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.skills-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
  min-width: 0;
}

.skills-item-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.skills-item-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
  max-width: calc(100% - 100px);
  overflow: hidden;
}

.skills-item-name {
  font-weight: 600;
  font-size: 0.92rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
}

.skills-item-desc {
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.5;
}

.skills-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.skills-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  transition: background 150ms ease;
}

.skills-toggle[data-enabled="true"] {
  background: var(--accent-strong, #6cb3ff);
}

.skills-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  transition: transform 150ms ease;
}

.skills-toggle[data-enabled="true"]::after {
  transform: translateX(18px);
}

.skills-edit-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  border: none;
}

.skills-edit-btn:hover {
  background: rgba(108, 179, 255, 0.15);
  color: var(--accent-strong, #6cb3ff);
}

.skills-delete-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  border: none;
}

.skills-delete-btn:hover {
  background: rgba(255, 100, 100, 0.15);
  color: #ff7a7a;
}

.skills-add-form {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.skills-section-title {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.skills-field {
  display: grid;
  gap: 6px;
}

.skills-field span {
  color: var(--text-dim);
  font-size: 0.84rem;
}

.skills-field input,
.skills-field textarea,
.skills-select {
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.skills-field textarea {
  padding: 8px 12px;
  resize: vertical;
}

.skills-select {
  appearance: auto;
  cursor: pointer;
}

.skills-actions {
  display: flex;
  justify-content: flex-end;
}

.skills-message {
  min-height: 20px;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.skills-message.is-error {
  color: var(--error);
}

.skills-message.is-success {
  color: var(--ok);
}

.skills-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.88rem;
}

body[data-theme="light"] .skills-menu-panel {
  border-color: rgba(56, 79, 110, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 253, 0.96)),
    rgba(245, 248, 252, 0.96);
  box-shadow: 0 18px 40px rgba(43, 61, 86, 0.16);
}

body[data-theme="light"] .skills-tab {
  border-color: rgba(56, 79, 110, 0.14);
  background: rgba(255, 255, 255, 0.7);
  color: #5a6e82;
}

body[data-theme="light"] .skills-tab.is-active {
  background: rgba(255, 255, 255, 0.94);
  color: #1f2d3d;
  border-color: rgba(56, 79, 110, 0.22);
}

body[data-theme="light"] .skills-item {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(56, 79, 110, 0.1);
}

body[data-theme="light"] .skills-field input,
body[data-theme="light"] .skills-field textarea,
body[data-theme="light"] .skills-select {
  border-color: rgba(56, 79, 110, 0.14);
  background: rgba(255, 255, 255, 0.94);
  color: #1f2d3d;
}

.skills-mcp-config {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skills-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-dim);
  min-width: 0;
  overflow: hidden;
  max-width: 100%;
}

.skills-item-id {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skills-item-config {
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-top: 4px;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}

body[data-theme="light"] .skills-item-meta {
  color: #8899aa;
}

body[data-theme="light"] .skills-item-config {
  color: #667788;
}

/* Skill command badges */
.skills-command-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  max-width: 100%;
  min-width: 0;
}

.skills-command-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-ghost, rgba(139, 92, 246, 0.12));
  color: var(--accent, #8b5cf6);
  font-size: 0.75rem;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  cursor: default;
}

body[data-theme="light"] .skills-command-badge {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}

/* Skill detail panel */
.skills-detail-panel {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--surface-raised, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
  box-sizing: border-box;
  min-width: 0;
}

body[data-theme="light"] .skills-detail-panel {
  background: #f8f9fb;
  border-color: #e8eaed;
}

.skills-detail-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-soft, #8899aa);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.skills-detail-command {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
}

.skills-detail-command:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.skills-detail-cmd-name {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.8rem;
  color: var(--accent, #8b5cf6);
  font-weight: 600;
  margin-right: 8px;
}

.skills-detail-cmd-desc {
  font-size: 0.78rem;
  color: var(--text-soft, #8899aa);
}

.skills-detail-params {
  margin-top: 4px;
  padding-left: 8px;
}

.skills-detail-param {
  font-size: 0.72rem;
  color: var(--text-soft, #8899aa);
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  overflow-wrap: break-word;
}

/* Skill env form */
.skills-env-form {
  margin-top: 4px;
}

.skills-env-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.skills-env-label {
  font-size: 0.78rem;
  color: var(--text-soft, #8899aa);
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  min-width: 120px;
  flex-shrink: 0;
}

.skills-env-input {
  flex: 1;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  background: var(--surface, #1a1a2e);
  color: var(--text, #e0e0e0);
  font-size: 0.78rem;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  box-sizing: border-box;
  min-width: 0;
}

body[data-theme="light"] .skills-env-input {
  background: #ffffff;
  border-color: #dde2e7;
  color: #1a1a2e;
}

.skills-env-save-btn {
  margin-top: 6px;
  padding: 4px 12px;
  border-radius: 4px;
  border: none;
  background: var(--accent, #8b5cf6);
  color: #fff;
  font-size: 0.75rem;
  cursor: pointer;
}

.skills-env-save-btn:hover {
  opacity: 0.9;
}

/* ─── Skills Install Toggle / Drawer ─── */
.skills-install-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  background: var(--surface-raised, #1e1e32);
  color: var(--text-primary, #e8e8f0);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 150ms ease;
  box-sizing: border-box;
}

.skills-install-toggle:hover {
  background: var(--surface-hover, rgba(255, 255, 255, 0.06));
}

.skills-install-toggle-label {
  font-weight: 600;
}

.skills-install-toggle-hint {
  font-size: 0.75rem;
  opacity: 0.5;
  margin-left: auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skills-install-toggle-icon {
  font-size: 0.7rem;
  opacity: 0.6;
  transition: transform 150ms ease;
}

.skills-install-drawer {
  padding-top: 10px;
}

/* ─── Skills Search Row ─── */
.skills-search-row {
  padding: 8px 16px;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.skills-search-input {
  width: 100%;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  background: var(--surface-lowered, #12121f);
  color: var(--text-primary, #e8e8f0);
  font-size: 0.85rem;
  outline: none;
  box-sizing: border-box;
}

.skills-search-input::placeholder {
  color: var(--text-secondary, rgba(255, 255, 255, 0.35));
}

.skills-search-input:focus {
  border-color: var(--accent, #8b5cf6);
}

/* ─── Skills CLI Install Area ─── */
.skills-install-area {
  padding: 12px 16px 8px;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.skills-install-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.skills-install-hint {
  font-size: 0.7rem;
  opacity: 0.5;
}

.skills-cli-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.skills-cli-prompt {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.85rem;
  color: var(--accent, #8b5cf6);
  opacity: 0.8;
  user-select: none;
}

.skills-cli-input {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  background: var(--surface-lowered, #12121f);
  color: var(--text-primary, #e8e8f0);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.8rem;
  outline: none;
  box-sizing: border-box;
}

.skills-cli-input::placeholder {
  color: var(--text-secondary, rgba(255, 255, 255, 0.35));
}

.skills-cli-input:focus {
  border-color: var(--accent, #8b5cf6);
}

.skills-cli-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  background: var(--surface-raised, #1e1e32);
  color: var(--text-primary, #e8e8f0);
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}

.skills-cli-btn:hover {
  background: var(--surface-hover, rgba(255, 255, 255, 0.06));
}

.skills-cli-btn.primary {
  background: var(--accent, #8b5cf6);
  color: #fff;
  border-color: transparent;
}

.skills-cli-btn.primary:hover {
  opacity: 0.9;
}

.skills-cli-btn:disabled,
.skills-cli-btn.primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.skills-install-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 4px;
  font-size: 0.8rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.55));
}

.skills-progress-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  border-top-color: var(--accent, #8b5cf6);
  border-radius: 50%;
  animation: skills-spin 0.8s linear infinite;
}

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

/* ─── Discover Results ─── */
.skills-discover-results {
  max-height: 280px;
  overflow-y: auto;
  margin-top: 8px;
}

.skills-discover-header {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.7;
  margin-bottom: 6px;
}

.skills-discover-card {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-lowered, #12121f);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
  margin-bottom: 6px;
}

.skills-discover-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.skills-discover-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary, #e8e8f0);
}

.skills-discover-version {
  font-size: 0.7rem;
  opacity: 0.5;
  background: var(--surface-raised, #1e1e32);
  padding: 1px 6px;
  border-radius: 4px;
}

.skills-discover-desc {
  font-size: 0.75rem;
  opacity: 0.65;
  line-height: 1.4;
  margin-bottom: 6px;
}

.skills-discover-commands {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.skills-discover-cmd {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--surface-raised, #1e1e32);
  color: var(--accent, #8b5cf6);
}

.skills-discover-env {
  font-size: 0.7rem;
  opacity: 0.5;
}

.skills-discover-error {
  font-size: 0.72rem;
  color: #ef4444;
  margin-top: 4px;
}

.skills-source-badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--accent, #8b5cf6);
  color: #fff;
  opacity: 0.8;
  margin-right: 6px;
  vertical-align: middle;
}

body[data-theme="light"] .skills-install-progress {
  color: #8899aa;
}

body[data-theme="light"] .skills-progress-spinner {
  border-color: rgba(0, 0, 0, 0.1);
  border-top-color: var(--accent, #8b5cf6);
}

body[data-theme="light"] .skills-discover-card {
  background: #f8f9fb;
  border-color: rgba(0, 0, 0, 0.06);
}

body[data-theme="light"] .skills-discover-cmd {
  background: #eef0f5;
}

body[data-theme="light"] .skills-cli-input {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #1a1a2e;
}

body[data-theme="light"] .skills-cli-btn {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #1a1a2e;
}

body[data-theme="light"] .skills-install-toggle {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(56, 79, 110, 0.14);
  color: #1f2d3d;
}

body[data-theme="light"] .skills-install-toggle:hover {
  background: rgba(255, 255, 255, 0.94);
}

body[data-theme="light"] .skills-search-row {
  border-top-color: rgba(56, 79, 110, 0.1);
}

body[data-theme="light"] .skills-search-input {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #1a1a2e;
}

body[data-theme="light"] .skills-search-input::placeholder {
  color: #8899aa;
}

body[data-theme="light"] .skills-install-area {
  border-top-color: rgba(56, 79, 110, 0.1);
}

body[data-theme="light"] .skills-token-row {
  border-top-color: rgba(56, 79, 110, 0.1);
}

body[data-theme="light"] .skills-token-label {
  color: #5a6e82;
}

/* ─── GitHub Token Row ─── */
.skills-token-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
}

.skills-token-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  font-size: 0.75rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.5));
}

.skills-token-input {
  flex: 1;
  min-width: 0;
  background: var(--surface-lowered, #12121f);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.75rem;
  color: var(--text-primary, #e2e2e8);
  outline: none;
  box-sizing: border-box;
}

.skills-token-input:focus {
  border-color: var(--accent, #8b5cf6);
}

.skills-token-status {
  font-size: 0.7rem;
  color: var(--success, #22c55e);
  min-width: 48px;
  text-align: right;
}

.skills-token-status.is-error {
  color: var(--danger, #ef4444);
}

body[data-theme="light"] .skills-token-input {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #1a1a2e;
}

.slash-command-dropdown {
  background: var(--surface-raised, #1e1e32);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  max-height: 240px;
  overflow-y: auto;
  min-width: 320px;
  padding: 4px 0;
}

body[data-theme="light"] .slash-command-dropdown {
  background: #ffffff;
  border-color: #e8eaed;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.slash-command-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.1s;
}

.slash-command-item.is-selected,
.slash-command-item:hover {
  background: var(--accent-ghost, rgba(139, 92, 246, 0.12));
}

body[data-theme="light"] .slash-command-item.is-selected,
body[data-theme="light"] .slash-command-item:hover {
  background: rgba(139, 92, 246, 0.08);
}

.slash-command-name {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-weight: 600;
  color: var(--accent, #8b5cf6);
  flex-shrink: 0;
  min-width: 100px;
}

.slash-command-desc {
  color: var(--text-secondary, #a7a7b8);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Final workflow-focus visual priority: keep depth only on selected workflow nodes. */
.desktop.is-workflow-focus-active .desktop-scene-layer .widget.is-workflow-focus-target,
.desktop.is-workflow-focus-active .desktop-scene-layer .widget.is-workflow-focus-target.is-front-widget,
.desktop.is-workflow-focus-active .desktop-scene-layer .widget.is-workflow-focus-target[data-front-widget="true"],
.desktop.is-workflow-focus-active .desktop-scene-layer .widget.is-workflow-focus-target:hover {
  outline: 0 !important;
  box-shadow:
    0 14px 30px rgba(4, 10, 22, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.16) !important;
}

.desktop.is-workflow-focus-active .desktop-scene-layer .widget.is-workflow-focus-target::before {
  opacity: 0 !important;
  background: transparent !important;
  filter: none !important;
  box-shadow: none !important;
}

.desktop.is-workflow-focus-active .desktop-scene-layer .widget.is-workflow-focus-target.is-header-collapsed .widget-header {
  box-shadow: none !important;
}

.desktop.is-workflow-focus-active .desktop-scene-layer .widget.is-workflow-focus-background,
.desktop.is-workflow-focus-active .desktop-scene-layer .widget.is-workflow-focus-background.is-front-widget,
.desktop.is-workflow-focus-active .desktop-scene-layer .widget.is-workflow-focus-background[data-front-widget="true"],
.desktop.is-workflow-focus-active .desktop-scene-layer .widget.is-workflow-focus-background:hover {
  outline: 0 !important;
  box-shadow: none !important;
}

.desktop.is-workflow-focus-active .desktop-scene-layer .widget.is-workflow-focus-background::before,
.desktop.is-workflow-focus-active .desktop-scene-layer .widget.is-workflow-focus-background::after,
.desktop.is-workflow-focus-active .desktop-scene-layer .widget.is-workflow-focus-background .widget-header,
.desktop.is-workflow-focus-active .desktop-scene-layer .widget.is-workflow-focus-background .widget-header::before,
.desktop.is-workflow-focus-active .desktop-scene-layer .widget.is-workflow-focus-background .widget-header::after {
  opacity: 0 !important;
  background: transparent !important;
  filter: none !important;
  box-shadow: none !important;
}

.widget.is-compound-workflow-widget {
  border-radius: 22px;
  border-color: rgba(98, 226, 255, 0.22);
  background:
    linear-gradient(145deg, rgba(18, 24, 34, 0.94), rgba(32, 34, 47, 0.92)),
    rgba(10, 13, 22, 0.94);
}

.widget.is-workflow-waterfall-chat-widget {
  grid-template-rows: auto 1fr;
  border-radius: 22px;
}

.widget.is-workflow-waterfall-chat-widget .widget-body,
.widget.is-compound-workflow-widget .widget-body {
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.workflow-collection-entry {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 89;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  pointer-events: auto;
}

.workflow-collection-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(16, 18, 24, 0.88);
  color: #f8fafc;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.workflow-collection-trigger:hover,
.workflow-collection-trigger:focus-visible,
.workflow-collection-entry.is-expanded .workflow-collection-trigger {
  border-color: rgba(103, 232, 249, 0.38);
  background: rgba(20, 25, 35, 0.94);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.34),
    0 0 0 4px rgba(34, 211, 238, 0.1);
  transform: translateY(-1px);
}

.workflow-collection-trigger:active {
  transform: translateY(0) scale(0.98);
}

.workflow-collection-entry.is-adding .workflow-collection-trigger {
  animation: workflow-collection-stretch 720ms cubic-bezier(0.16, 1, 0.3, 1);
  border-color: rgba(103, 232, 249, 0.52);
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.28),
    0 0 0 5px rgba(34, 211, 238, 0.14);
}

.workflow-collection-trigger-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  color: #ffffff;
  filter: drop-shadow(0 7px 16px rgba(36, 120, 255, 0.3));
}

.workflow-collection-trigger-icon svg {
  width: 24px;
  height: 24px;
}

.workflow-collection-trigger-icon::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -2px;
  width: 9px;
  height: 9px;
  border: 2px solid rgba(16, 18, 24, 0.96);
  border-radius: 999px;
  background: #22c55e;
}

.workflow-collection-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  width: min(480px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 88px));
  margin-top: 0;
  padding: 16px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(244, 249, 255, 0.78), rgba(221, 231, 246, 0.58)),
    rgba(18, 24, 39, 0.52);
  box-shadow:
    0 30px 84px rgba(12, 18, 32, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.22) inset;
  backdrop-filter: blur(26px) saturate(1.18);
  -webkit-backdrop-filter: blur(26px) saturate(1.18);
  transform-origin: top center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px) scale(0.96);
  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.workflow-collection-entry.is-expanded .workflow-collection-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.workflow-collection-list {
  display: grid;
  gap: 10px;
}

.workflow-collection-item {
  position: relative;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.22);
  color: #111827;
  cursor: pointer;
  animation: workflow-collection-row-in 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.workflow-collection-item:nth-child(2) {
  animation-delay: 24ms;
}

.workflow-collection-item:nth-child(3) {
  animation-delay: 48ms;
}

.workflow-collection-item:nth-child(4) {
  animation-delay: 72ms;
}

.workflow-collection-item:nth-child(n + 5) {
  animation-delay: 96ms;
}

.workflow-collection-item:hover {
  border-color: rgba(103, 232, 249, 0.54);
  background: rgba(189, 246, 255, 0.32);
  box-shadow:
    0 18px 42px rgba(34, 211, 238, 0.22),
    0 0 0 1px rgba(141, 247, 255, 0.38) inset;
  transform: translateY(-1px);
}

.workflow-collection-item:active {
  transform: translateY(0) scale(0.98);
}

.workflow-collection-item.is-new {
  animation: workflow-collection-item-enter 520ms cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(34, 211, 238, 0.14);
}

.workflow-collection-item-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.28), transparent 40%),
    linear-gradient(145deg, #5a48ff 0%, #278df2 62%, #19d6e8 100%);
  color: #ffffff;
  box-shadow:
    0 12px 24px rgba(37, 99, 235, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.24) inset;
  overflow: visible;
}

.workflow-collection-item-icon svg {
  width: 34px;
  height: 34px;
}

.workflow-collection-item-body {
  min-width: 0;
}

.workflow-collection-item-body strong,
.workflow-collection-item-body span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-collection-item-body strong {
  color: #101827;
  font-size: 15px;
  font-weight: 900;
}

.workflow-collection-item-body span {
  margin-top: 2px;
  color: rgba(30, 41, 59, 0.66);
  font-size: 12px;
  font-weight: 750;
}

.workflow-collection-item-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(238, 246, 255, 0.96);
  border-radius: 999px;
  background: #22c55e;
}

.workflow-collection-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fecaca;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.workflow-collection-item:hover .workflow-collection-delete-btn,
.workflow-collection-item:focus-visible .workflow-collection-delete-btn,
.workflow-collection-delete-btn:focus-visible {
  opacity: 1;
}

.workflow-collection-delete-btn:hover,
.workflow-collection-delete-btn:focus-visible {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.92);
  color: #ffffff;
  transform: scale(1.06);
}

.workflow-collection-delete-btn:active {
  transform: scale(0.96);
}

.workflow-collection-empty {
  padding: 22px 16px;
  color: rgba(248, 250, 252, 0.7);
  text-align: center;
  font-size: 13px;
}

body[data-theme="light"] .workflow-collection-trigger,
body[data-theme="light"] .workflow-collection-panel {
  border-color: rgba(15, 23, 42, 0.12);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(228, 236, 248, 0.66)),
    rgba(255, 255, 255, 0.78);
  color: #0f172a;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
}

body[data-theme="light"] .workflow-collection-trigger:hover,
body[data-theme="light"] .workflow-collection-trigger:focus-visible,
body[data-theme="light"] .workflow-collection-entry.is-expanded .workflow-collection-trigger {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 20px 52px rgba(15, 23, 42, 0.18),
    0 0 0 4px rgba(37, 99, 235, 0.08);
}

body[data-theme="light"] .workflow-collection-trigger-icon {
  color: #1d4ed8;
  filter: drop-shadow(0 5px 12px rgba(37, 99, 235, 0.22));
}

body[data-theme="light"] .workflow-collection-trigger-icon::after {
  border-color: rgba(255, 255, 255, 0.96);
}

body[data-theme="light"] .workflow-collection-item {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.5);
}

body[data-theme="light"] .workflow-collection-item:hover {
  background: rgba(203, 248, 255, 0.42);
}

body[data-theme="light"] .workflow-collection-item-icon {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.28), transparent 40%),
    linear-gradient(145deg, #5a48ff 0%, #278df2 62%, #19d6e8 100%);
}

body[data-theme="light"] .workflow-collection-item-icon::after {
  border-color: rgba(255, 255, 255, 0.96);
}

body[data-theme="light"] .workflow-collection-item-body span {
  color: rgba(15, 23, 42, 0.62);
}

body[data-theme="light"] .workflow-collection-delete-btn {
  background: rgba(255, 255, 255, 0.86);
  color: #b91c1c;
}

body[data-theme="light"] .workflow-collection-empty {
  color: rgba(15, 23, 42, 0.62);
}

@keyframes workflow-collection-stretch {
  0% {
    transform: scaleX(1);
  }
  34% {
    transform: scaleX(1.18);
  }
  64% {
    transform: scaleX(0.98);
  }
  100% {
    transform: scaleX(1);
  }
}

@keyframes workflow-collection-item-enter {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes workflow-collection-panel-in {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes workflow-collection-row-in {
  0% {
    opacity: 0;
    transform: translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.compound-workflow-card {
  display: grid;
  align-content: center;
  width: 100%;
  min-height: 100%;
}

.compound-workflow-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.compound-workflow-stats > div {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 88px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.compound-workflow-stats strong {
  color: #f4fbff;
  font-size: 1.72rem;
  line-height: 1;
}

.compound-workflow-stats span {
  color: rgba(216, 231, 242, 0.68);
  font-size: 0.76rem;
  font-weight: 800;
}

.waterfall-chat {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  min-height: 0;
}

.waterfall-chat-steps,
.waterfall-chat-main {
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.waterfall-chat-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  overflow: auto;
}

.waterfall-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 8px;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(228, 237, 246, 0.72);
  text-align: left;
  cursor: pointer;
}

.waterfall-step.is-active {
  border-color: rgba(98, 226, 255, 0.34);
  background: rgba(98, 226, 255, 0.1);
  color: #f5fbff;
}

.waterfall-step.is-stale {
  border-color: rgba(255, 184, 77, 0.34);
  background: rgba(255, 184, 77, 0.1);
  color: #fff8ea;
}

.waterfall-step.is-failed {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(248, 113, 113, 0.1);
  color: #fff1f2;
}

.waterfall-step-number {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(98, 226, 255, 0.12);
  color: #9aefff;
  font-size: 0.72rem;
  font-weight: 900;
}

.waterfall-step-number.widget-title-icon {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 0;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 194, 129, 0.28), rgba(255, 142, 97, 0.16)),
    rgba(15, 18, 29, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 8px 16px rgba(0, 0, 0, 0.14);
}

.waterfall-step-number.widget-title-icon[data-has-image="true"] {
  background: transparent;
  box-shadow: none;
}

.waterfall-step-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 2px;
}

.waterfall-step-title {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waterfall-step-remark {
  min-width: 0;
  overflow: hidden;
  color: rgba(216, 231, 242, 0.52);
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waterfall-step-status {
  color: rgba(216, 231, 242, 0.52);
  font-size: 0.7rem;
  font-weight: 800;
}

.waterfall-chat-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  padding: 10px;
}

.waterfall-chat-conversations {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.waterfall-chat-conversation-tabs {
  display: flex;
  flex: 1 1 auto;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 1px;
}

.waterfall-chat-conversation-tab {
  flex: 0 0 auto;
  max-width: 180px;
  height: 30px;
  min-width: 72px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(230, 238, 248, 0.7);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.waterfall-chat-conversation-tab.is-active {
  border-color: rgba(124, 92, 255, 0.48);
  background: rgba(124, 92, 255, 0.18);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(124, 92, 255, 0.18);
}

.waterfall-chat-conversation-tab:disabled,
.waterfall-chat-conversation-action:disabled {
  opacity: 0.48;
  cursor: default;
}

.waterfall-chat-conversation-action {
  display: grid;
  place-items: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  color: #eff8ff;
}

.waterfall-chat-conversation-action.is-confirming-delete {
  border-color: rgba(220, 38, 38, 0.72);
  background: rgba(220, 38, 38, 0.86);
  color: #ffffff;
}

.waterfall-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.waterfall-message-history-notice {
  align-self: center;
  max-width: min(520px, 92%);
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.42);
  color: rgba(226, 232, 240, 0.78);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.waterfall-message {
  display: grid;
  gap: 5px;
  max-width: 86%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.waterfall-message-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.waterfall-message.has-assistant-avatar {
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  max-width: min(900px, 94%);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.waterfall-message-avatar-shell {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  overflow: visible;
}

.waterfall-message-avatar {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  object-fit: cover;
  box-shadow: 0 10px 22px rgba(24, 20, 43, 0.16);
}

.waterfall-message-avatar-shell .waterfall-message-avatar {
  width: 100%;
  height: 100%;
}

.compound-workflow-assistant-mood::after {
  content: attr(data-assistant-mood-icon);
  position: absolute;
  top: -10px;
  right: -8px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 2px;
  border: 1px solid rgba(124, 92, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 18px rgba(24, 20, 43, 0.16);
  font-size: 0.82rem;
  line-height: 1;
  pointer-events: none;
  transform-origin: 55% 95%;
  animation: assistantMoodPop 2.8s ease-in-out infinite;
}

.compound-workflow-assistant-mood[data-assistant-mood="thinking"]::after {
  animation-duration: 2.15s;
}

.compound-workflow-assistant-mood[data-assistant-mood="running"]::after {
  animation-duration: 1.65s;
}

.compound-workflow-assistant-mood[data-assistant-mood="waiting"]::after {
  animation-duration: 3.15s;
}

.compound-workflow-assistant-mood[data-assistant-mood="idle"]::after {
  animation-duration: 4.4s;
}

@keyframes assistantMoodPop {
  0%,
  42%,
  100% {
    opacity: 0;
    transform: translateY(5px) scale(0.72);
  }
  8%,
  26% {
    opacity: 1;
    transform: translateY(-2px) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .compound-workflow-assistant-mood::after {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .waterfall-message.is-interpreting .waterfall-message-content::before {
    animation: none;
    background-position: 50% 0, 0 0;
    opacity: 0.54;
  }

  .waterfall-message.is-interpreting .waterfall-message-body::after,
  .waterfall-message.is-streaming .waterfall-message-content::after {
    animation: none;
  }
}

.waterfall-message.has-assistant-avatar .waterfall-message-body {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.waterfall-message.is-interpreting .waterfall-message-body {
  position: relative;
  overflow: hidden;
}

.waterfall-message.is-interpreting .waterfall-message-body::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 34%,
    rgba(98, 226, 255, 0.2) 46%,
    rgba(124, 92, 255, 0.16) 54%,
    transparent 68%
  );
  background-size: 240% 100%;
  opacity: 0.78;
  pointer-events: none;
  animation: waterfall-message-sheen 2.1s ease-in-out infinite;
}

.waterfall-message.is-user {
  align-self: flex-end;
  background: rgba(98, 226, 255, 0.12);
}

.waterfall-message-role {
  color: rgba(216, 231, 242, 0.54);
  font-size: 0.68rem;
  font-weight: 900;
}

.waterfall-message-role.is-workflow-speaker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.waterfall-message-role.is-workflow-speaker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--workflow-speaker-color, #7c5cff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--workflow-speaker-color, #7c5cff) 18%, transparent);
}

.waterfall-message-avatar-shell[data-workflow-speaker] .waterfall-message-avatar {
  border-color: color-mix(in srgb, var(--workflow-speaker-color, #7c5cff) 52%, rgba(255, 255, 255, 0.22));
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--workflow-speaker-color, #7c5cff) 14%, transparent),
    0 10px 22px rgba(24, 20, 43, 0.16);
}

.waterfall-message-content {
  margin: 0;
  color: rgba(244, 249, 253, 0.92);
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.waterfall-message-content.is-markdown,
.chat-widget-response.is-markdown {
  white-space: normal;
}

.waterfall-message-content.is-markdown .workflow-asset-markdown-document,
.chat-widget-response.is-markdown .workflow-asset-markdown-document {
  overflow-x: auto;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.waterfall-message-content.is-markdown .workflow-asset-markdown-document h1,
.waterfall-message-content.is-markdown .workflow-asset-markdown-document h2,
.waterfall-message-content.is-markdown .workflow-asset-markdown-document h3,
.waterfall-message-content.is-markdown .workflow-asset-markdown-document h4,
.waterfall-message-content.is-markdown .workflow-asset-markdown-document h5,
.waterfall-message-content.is-markdown .workflow-asset-markdown-document h6,
.waterfall-message-content.is-markdown .workflow-asset-markdown-document th,
.waterfall-message-content.is-markdown .workflow-asset-markdown-document blockquote,
.chat-widget-response.is-markdown .workflow-asset-markdown-document h1,
.chat-widget-response.is-markdown .workflow-asset-markdown-document h2,
.chat-widget-response.is-markdown .workflow-asset-markdown-document h3,
.chat-widget-response.is-markdown .workflow-asset-markdown-document h4,
.chat-widget-response.is-markdown .workflow-asset-markdown-document h5,
.chat-widget-response.is-markdown .workflow-asset-markdown-document h6,
.chat-widget-response.is-markdown .workflow-asset-markdown-document th,
.chat-widget-response.is-markdown .workflow-asset-markdown-document blockquote {
  color: inherit;
}

.waterfall-message-content.is-markdown .workflow-asset-markdown-document h1,
.chat-widget-response.is-markdown .workflow-asset-markdown-document h1 {
  font-size: 1.16em;
}

.waterfall-message-content.is-markdown .workflow-asset-markdown-document h2,
.chat-widget-response.is-markdown .workflow-asset-markdown-document h2 {
  font-size: 1.1em;
}

.waterfall-message-content.is-markdown .workflow-asset-markdown-document h3,
.waterfall-message-content.is-markdown .workflow-asset-markdown-document h4,
.waterfall-message-content.is-markdown .workflow-asset-markdown-document h5,
.waterfall-message-content.is-markdown .workflow-asset-markdown-document h6,
.chat-widget-response.is-markdown .workflow-asset-markdown-document h3,
.chat-widget-response.is-markdown .workflow-asset-markdown-document h4,
.chat-widget-response.is-markdown .workflow-asset-markdown-document h5,
.chat-widget-response.is-markdown .workflow-asset-markdown-document h6 {
  font-size: 1.04em;
}

.waterfall-message-content.is-markdown .workflow-asset-markdown-document code,
.chat-widget-response.is-markdown .workflow-asset-markdown-document code {
  background: color-mix(in srgb, currentColor 14%, transparent);
  color: inherit;
}

.waterfall-message-content.is-markdown .workflow-asset-markdown-document pre code,
.chat-widget-response.is-markdown .workflow-asset-markdown-document pre code {
  background: transparent;
  color: inherit;
}

.waterfall-message.is-interpreting .waterfall-message-content::before {
  content: "";
  display: block;
  width: min(240px, 72%);
  height: 6px;
  margin: 0 0 7px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(124, 92, 255, 0.22), rgba(98, 226, 255, 0.34), transparent),
    rgba(124, 92, 255, 0.05);
  background-size: 220% 100%, 100% 100%;
  filter: blur(0.2px);
  opacity: 0.82;
  animation: waterfall-interpreting-flow 1.75s ease-in-out infinite;
}

.waterfall-message.is-streaming .waterfall-message-content::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 3px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.62;
  vertical-align: -0.14em;
  animation: waterfall-stream-caret 0.9s ease-in-out infinite;
}

@keyframes waterfall-message-sheen {
  0% {
    background-position: 140% 0;
    opacity: 0.18;
  }
  45% {
    opacity: 0.72;
  }
  100% {
    background-position: -140% 0;
    opacity: 0.18;
  }
}

@keyframes waterfall-interpreting-flow {
  0% {
    background-position: 120% 0, 0 0;
    opacity: 0.36;
  }
  42% {
    opacity: 0.9;
  }
  100% {
    background-position: -120% 0, 0 0;
    opacity: 0.36;
  }
}

@keyframes waterfall-stream-caret {
  0%,
  100% {
    opacity: 0.25;
  }
  42% {
    opacity: 0.78;
  }
}

.waterfall-message-image-gallery {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  max-width: min(540px, 100%);
  gap: 10px;
}

.waterfall-message-image-gallery .chat-widget-image-card {
  gap: 6px;
}

.waterfall-message-image-gallery .chat-widget-image {
  aspect-ratio: 1 / 1;
  height: auto;
  min-height: 132px;
  object-fit: cover;
  border-radius: 14px;
}

.waterfall-message-image-gallery .chat-widget-image-caption {
  font-size: 0.72rem;
}

.waterfall-message-image-gallery .chat-widget-image-download {
  padding: 6px 10px;
  font-size: 0.72rem;
}

.workflow-entry-card {
  display: grid;
  gap: 12px;
  width: min(980px, 100%);
  margin: 0 auto 10px;
  padding: 16px;
  border: 1px solid rgba(124, 92, 255, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  color: #18142b;
  box-shadow: 0 16px 36px rgba(24, 20, 43, 0.1);
}

.workflow-entry-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

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

.workflow-entry-card-eyebrow {
  color: rgba(124, 92, 255, 0.86);
  font-size: 0.72rem;
  font-weight: 900;
}

.workflow-entry-card-title {
  color: #18142b;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.25;
}

.workflow-entry-card-summary {
  margin: 0;
  color: rgba(24, 20, 43, 0.68);
  font-size: 0.82rem;
  line-height: 1.5;
}

.workflow-entry-node-list {
  display: grid;
  gap: 8px;
}

.workflow-entry-node {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid rgba(24, 20, 43, 0.08);
  border-radius: 16px;
  background: rgba(247, 248, 253, 0.9);
}

.workflow-entry-node-icon.widget-title-icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 10px;
}

.workflow-entry-node-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workflow-entry-node-name {
  min-width: 0;
  overflow: hidden;
  color: #18142b;
  font-size: 0.84rem;
  font-weight: 950;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-entry-node-remark {
  min-width: 0;
  overflow: hidden;
  color: rgba(24, 20, 43, 0.58);
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-entry-node-remark.is-empty {
  color: rgba(24, 20, 43, 0.34);
}

.workflow-entry-card-body {
  display: grid;
  gap: 10px;
}

.workflow-entry-field {
  display: grid;
  gap: 6px;
}

.workflow-entry-field > span,
.workflow-entry-attachment-copy > span {
  color: rgba(24, 20, 43, 0.62);
  font-size: 0.78rem;
  font-weight: 900;
}

.workflow-entry-textarea {
  width: 100%;
  min-height: 86px;
  padding: 10px 12px;
  border: 1px solid rgba(24, 20, 43, 0.1);
  border-radius: 16px;
  background: rgba(247, 248, 253, 0.96);
  color: #18142b;
  font: inherit;
  font-size: 0.86rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

.workflow-entry-textarea:focus {
  border-color: rgba(124, 92, 255, 0.34);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.1);
}

.workflow-entry-attachment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(24, 20, 43, 0.08);
  border-radius: 16px;
  background: rgba(247, 248, 253, 0.9);
}

.workflow-entry-attachment-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workflow-entry-attachment-copy > small {
  color: rgba(24, 20, 43, 0.46);
  font-size: 0.72rem;
}

.workflow-entry-attach {
  display: grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c5cff, #b18bff);
  color: #ffffff;
  font-size: 1.22rem;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(124, 92, 255, 0.22);
  cursor: pointer;
}

.workflow-entry-example {
  justify-self: start;
  max-width: 100%;
  padding: 7px 10px;
  overflow: hidden;
  border: 1px solid rgba(124, 92, 255, 0.14);
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.07);
  color: #5f45db;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.workflow-entry-card-actions {
  display: flex;
  justify-content: flex-end;
}

.workflow-entry-submit {
  min-height: 36px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c5cff, #b18bff 48%, #ff7cf7);
  color: #ffffff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(124, 92, 255, 0.24);
  cursor: pointer;
}

.waterfall-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.waterfall-attachment-list[hidden] {
  display: none;
}

.waterfall-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(237, 246, 252, 0.86);
  font-size: 0.72rem;
}

.waterfall-attachment-chip.has-preview {
  width: min(420px, 100%);
  align-items: stretch;
  flex-direction: column;
  border-radius: 12px;
  padding: 8px;
}

.waterfall-attachment-chip-header {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.waterfall-attachment-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waterfall-attachment-chip small {
  color: rgba(216, 231, 242, 0.52);
  font-size: 0.66rem;
  white-space: nowrap;
}

.waterfall-attachment-preview {
  max-height: 180px;
  overflow: auto;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
}

.waterfall-attachment-preview pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: inherit;
  font-size: 0.72rem;
  line-height: 1.48;
}

.waterfall-attachment-preview .workflow-asset-markdown-document {
  font-size: 0.72rem;
}

.waterfall-attachment-feedback {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: min(460px, 100%);
  padding: 0 11px;
  border: 1px solid rgba(124, 92, 255, 0.18);
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.08);
  color: #5b3fd7;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waterfall-attachment-feedback[data-tone="warning"] {
  border-color: rgba(202, 138, 4, 0.24);
  background: rgba(250, 204, 21, 0.12);
  color: #9a5f05;
}

.waterfall-attachment-feedback[data-tone="success"] {
  border-color: rgba(34, 197, 94, 0.22);
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
}

.waterfall-attachment-remove {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(244, 249, 253, 0.86);
  font-size: 0.78rem;
  line-height: 1;
}

.waterfall-chat-composer {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 38px;
  align-items: end;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: rgba(8, 11, 18, 0.54);
}

.workflow-composer-pending-actions {
  display: grid;
  gap: 8px;
}

.workflow-composer-pending-actions[hidden] {
  display: none;
}

.workflow-composer-pending-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  color: rgba(216, 231, 242, 0.72);
  font-size: 0.74rem;
  font-weight: 850;
}

.workflow-composer-pending-header span {
  flex: 0 0 auto;
  color: rgba(125, 211, 252, 0.92);
  text-transform: uppercase;
  letter-spacing: 0;
}

.workflow-composer-pending-header strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waterfall-chat-attach-btn,
.waterfall-chat-send-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: #eff8ff;
}

.waterfall-chat-attach-btn {
  font-size: 1.25rem;
  font-weight: 700;
}

.waterfall-chat-send-btn:disabled {
  opacity: 0.42;
  cursor: default;
}

.waterfall-chat-input {
  width: 100%;
  min-height: 34px;
  max-height: 96px;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.45;
  outline: none;
  resize: vertical;
}

.waterfall-chat-input::placeholder {
  color: rgba(216, 231, 242, 0.45);
}

.compound-workflow-animation-layer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
}

.compound-workflow-merge-ghost,
.compound-workflow-restore-ghost {
  position: fixed !important;
  margin: 0 !important;
  pointer-events: none !important;
  transform-origin: center;
  overflow: hidden;
}

.compound-workflow-merge-ghost {
  opacity: 0.86;
  transition:
    transform 520ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 520ms ease,
    filter 520ms ease;
}

.compound-workflow-merge-ghost.is-running {
  opacity: 0;
  filter: blur(9px) saturate(0.65);
  transform: translate(var(--compound-merge-x), var(--compound-merge-y)) scale(0.18);
}

.compound-workflow-restore-ghost {
  opacity: 0;
  filter: blur(8px);
  transition:
    transform 420ms cubic-bezier(0.22, 0.82, 0.28, 1),
    opacity 420ms ease,
    filter 420ms ease;
}

.compound-workflow-restore-ghost.is-running {
  opacity: 0.32;
  filter: blur(0);
  transform:
    translate(var(--compound-restore-x), var(--compound-restore-y))
    scale(var(--compound-restore-scale-x), var(--compound-restore-scale-y));
}

.widget.is-compound-source-hidden {
  opacity: 0.04 !important;
  filter: blur(5px) saturate(0.6) !important;
  transition:
    opacity 170ms ease,
    filter 170ms ease;
}

.widget.is-compound-restored-hidden {
  opacity: 0 !important;
  transform: scale(0.94);
  pointer-events: none !important;
}

.widget.is-compound-widget-entering {
  opacity: 0;
  transform: translateY(12px) scale(0.92);
  pointer-events: none !important;
}

.widget.is-compound-widget-entering.is-running {
  animation: compound-workflow-pop 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.widget.is-compound-flow-shine::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  border-radius: inherit;
  pointer-events: none;
  clip-path: inset(0 round 26px);
  background:
    linear-gradient(
      115deg,
      transparent 0%,
      transparent 30%,
      rgba(255, 255, 255, 0.08) 40%,
      rgba(154, 229, 255, 0.42) 48%,
      rgba(255, 223, 171, 0.52) 52%,
      rgba(255, 255, 255, 0.1) 60%,
      transparent 72%,
      transparent 100%
    );
  mix-blend-mode: screen;
  transform: translateX(-130%);
  animation: compound-flow-shine 920ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body[data-theme="light"] .widget.is-compound-flow-shine::after {
  background:
    linear-gradient(
      115deg,
      transparent 0%,
      transparent 30%,
      rgba(255, 255, 255, 0.18) 40%,
      rgba(89, 186, 231, 0.28) 48%,
      rgba(247, 162, 76, 0.28) 52%,
      rgba(255, 255, 255, 0.22) 60%,
      transparent 72%,
      transparent 100%
    );
}

.widget.is-compound-flow-shine {
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(98, 226, 255, 0.18),
    0 20px 58px rgba(98, 226, 255, 0.12);
}

@keyframes compound-workflow-pop {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.9);
    filter: blur(8px) saturate(0.7);
  }
  54% {
    opacity: 1;
    transform: translateY(-2px) scale(1.018);
    filter: blur(0) saturate(1.08);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0) saturate(1);
  }
}

@keyframes compound-flow-shine {
  0% {
    opacity: 0;
    transform: translateX(-130%);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(130%);
  }
}

.widget.is-compound-chat-attention {
  animation: compound-chat-attention 720ms cubic-bezier(0.22, 0.82, 0.28, 1);
}

@keyframes compound-chat-attention {
  0% {
    transform: translateY(8px) scale(0.98);
    box-shadow: var(--shadow);
  }
  45% {
    transform: translateY(-3px) scale(1.01);
    box-shadow:
      var(--shadow),
      0 0 0 1px rgba(98, 226, 255, 0.24),
      0 20px 60px rgba(98, 226, 255, 0.16);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: var(--shadow);
  }
}

@media (max-width: 720px) {
  .waterfall-chat {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .waterfall-chat-steps {
    flex-direction: row;
    overflow-x: auto;
  }

  .waterfall-step {
    min-width: 154px;
  }
}

body[data-theme="light"] .widget.is-compound-workflow-widget,
body[data-theme="light"] .widget.is-workflow-waterfall-chat-widget {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(238, 245, 248, 0.9)),
    var(--desktop-widget-bg-secondary);
}

body[data-theme="light"] .compound-workflow-stats > div,
body[data-theme="light"] .waterfall-chat-steps,
body[data-theme="light"] .waterfall-chat-main,
body[data-theme="light"] .waterfall-step,
body[data-theme="light"] .waterfall-message,
body[data-theme="light"] .waterfall-chat-composer {
  border-color: rgba(29, 58, 82, 0.11);
  background: rgba(255, 255, 255, 0.66);
}

body[data-theme="light"] .waterfall-chat-conversation-tab,
body[data-theme="light"] .waterfall-chat-conversation-action {
  border-color: rgba(29, 58, 82, 0.12);
  background: rgba(255, 255, 255, 0.74);
  color: rgba(24, 50, 75, 0.72);
}

body[data-theme="light"] .waterfall-chat-conversation-tab.is-active {
  border-color: rgba(124, 92, 255, 0.34);
  background: rgba(124, 92, 255, 0.12);
  color: #18324b;
  box-shadow: 0 8px 18px rgba(124, 92, 255, 0.12);
}

body[data-theme="light"] .waterfall-message-history-notice {
  border-color: rgba(30, 64, 104, 0.14);
  background: rgba(248, 250, 252, 0.86);
  color: rgba(24, 50, 75, 0.64);
}

body[data-theme="light"] .compound-workflow-stats strong,
body[data-theme="light"] .waterfall-message-content {
  color: #18324b;
}

body[data-theme="light"] .waterfall-message.is-interpreting .waterfall-message-content::before {
  background:
    linear-gradient(90deg, transparent, rgba(124, 92, 255, 0.2), rgba(6, 182, 212, 0.28), transparent),
    rgba(35, 128, 164, 0.06);
  opacity: 0.72;
}

body[data-theme="light"] .waterfall-message.is-interpreting .waterfall-message-body::after {
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(124, 92, 255, 0.06) 32%,
    rgba(6, 182, 212, 0.14) 47%,
    rgba(124, 92, 255, 0.1) 58%,
    transparent 70%
  );
}

body[data-theme="light"] .compound-workflow-stats span,
body[data-theme="light"] .waterfall-step-status,
body[data-theme="light"] .waterfall-message-role,
body[data-theme="light"] .waterfall-chat-input::placeholder {
  color: rgba(24, 50, 75, 0.56);
}

body[data-theme="light"] .waterfall-step {
  border-color: rgba(30, 64, 104, 0.16);
  background: rgba(248, 250, 252, 0.94);
  color: #18324b;
}

body[data-theme="light"] .waterfall-step-title {
  color: #0f172a;
}

body[data-theme="light"] .waterfall-step-remark,
body[data-theme="light"] .waterfall-step-status {
  color: rgba(51, 65, 85, 0.74);
}

body[data-theme="light"] .waterfall-step-number {
  background: rgba(14, 116, 144, 0.12);
  color: #155e75;
}

body[data-theme="light"] .waterfall-step.is-active {
  border-color: rgba(14, 116, 144, 0.34);
  background: rgba(224, 242, 254, 0.92);
  color: #0f172a;
}

body[data-theme="light"] .waterfall-step.is-active .waterfall-step-number {
  background: rgba(14, 116, 144, 0.18);
  color: #0e7490;
}

body[data-theme="light"] .waterfall-step.is-stale {
  border-color: rgba(180, 83, 9, 0.32);
  background: rgba(255, 247, 237, 0.94);
  color: #3f2a12;
}

body[data-theme="light"] .waterfall-step.is-stale .waterfall-step-number {
  background: rgba(180, 83, 9, 0.14);
  color: #92400e;
}

body[data-theme="light"] .waterfall-step.is-failed {
  border-color: rgba(185, 28, 28, 0.3);
  background: rgba(254, 242, 242, 0.94);
  color: #3b1111;
}

body[data-theme="light"] .waterfall-step.is-failed .waterfall-step-number {
  background: rgba(185, 28, 28, 0.12);
  color: #991b1b;
}

body[data-theme="light"] .waterfall-chat-attach-btn,
body[data-theme="light"] .waterfall-chat-send-btn,
body[data-theme="light"] .waterfall-attachment-chip,
body[data-theme="light"] .waterfall-attachment-remove {
  border-color: rgba(29, 58, 82, 0.12);
  background: rgba(255, 255, 255, 0.74);
  color: #18324b;
}

/* Compound workflow window: plugin stack + waterfall chat. */
.widget.is-compound-workflow-widget:not(.is-collapsed):not(.is-header-collapsed) {
  min-width: 760px;
  min-height: 560px;
}

.widget.is-compound-workflow-widget {
  border-color: rgba(177, 139, 255, 0.34);
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 0%, rgba(124, 92, 255, 0.28), transparent 34%),
    radial-gradient(circle at 92% 18%, rgba(126, 230, 255, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(13, 10, 23, 0.98), rgba(24, 20, 43, 0.96));
  box-shadow:
    0 34px 96px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 42px rgba(124, 92, 255, 0.16);
}

.widget.is-compound-workflow-widget .widget-header {
  min-height: 58px;
  border-bottom-color: rgba(177, 139, 255, 0.14);
  background:
    linear-gradient(90deg, rgba(124, 92, 255, 0.1), rgba(255, 124, 247, 0.06), transparent);
}

.widget.is-compound-workflow-widget .widget-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 20px;
}

.widget.is-compound-workflow-widget.is-header-collapsed .widget-body,
.widget.is-compound-workflow-widget.is-header-collapsed .resize-handle {
  display: none !important;
}

.widget.is-compound-workflow-widget.is-header-collapsed .widget-port-layer {
  display: block;
  z-index: 4;
}

.widget.is-compound-workflow-widget.is-header-collapsed .widget-port {
  z-index: 5;
}

.widget.is-compound-workflow-widget .widget-port-info {
  gap: 4px;
  min-width: 168px;
  max-width: 260px;
  padding: 9px 12px;
  border-radius: 14px;
  border-color: rgba(210, 236, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(10, 25, 69, 0.96), rgba(8, 18, 53, 0.92)),
    rgba(8, 18, 53, 0.94);
  box-shadow:
    0 14px 28px rgba(4, 10, 24, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  white-space: normal;
}

.widget.is-compound-workflow-widget .widget-port-label {
  color: #f7fbff;
  font-size: 0.78rem;
  font-weight: 900;
}

.widget.is-compound-workflow-widget .widget-port-meta {
  color: rgba(223, 236, 255, 0.74);
  font-size: 0.68rem;
  line-height: 1.35;
  white-space: normal;
}

body[data-theme="light"] .widget.is-compound-workflow-widget .widget-port-info {
  border-color: rgba(115, 170, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 244, 252, 0.94)),
    rgba(242, 247, 253, 0.96);
  box-shadow:
    0 14px 28px rgba(43, 61, 86, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body[data-theme="light"] .widget.is-compound-workflow-widget .widget-port-label {
  color: #10233c;
}

body[data-theme="light"] .widget.is-compound-workflow-widget .widget-port-meta {
  color: rgba(16, 35, 60, 0.72);
}

.compound-workflow-shell {
  position: relative;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: clamp(320px, 24%, 420px) minmax(0, 1fr);
  gap: 22px;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.compound-workflow-shell.is-onboarding-mode {
  grid-template-columns: minmax(0, 1fr);
}

.compound-workflow-shell.is-onboarding-mode .compound-workflow-left {
  display: none;
}

.compound-workflow-left,
.compound-workflow-chat {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(177, 139, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(24, 20, 43, 0.7);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

.compound-workflow-left {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 18px;
  padding: 20px 16px;
  border-radius: 28px;
  border-color: rgba(99, 64, 223, 0.38);
  background: linear-gradient(135deg, #7d55ff 0%, #8f55f0 48%, #6c42e7 100%);
  box-shadow:
    0 20px 54px rgba(81, 42, 189, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.compound-workflow-left-header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 2px 10px;
  padding: 0 6px 4px;
}

.compound-workflow-main-icon {
  position: relative;
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.28), transparent 40%),
    linear-gradient(145deg, #5a48ff 0%, #278df2 62%, #19d6e8 100%);
  color: #ffffff;
  box-shadow:
    0 16px 32px rgba(33, 105, 243, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.22) inset;
}

.compound-workflow-main-icon svg {
  width: 42px;
  height: 42px;
}

.compound-workflow-main-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 11px;
  height: 11px;
  border: 2px solid rgba(125, 85, 255, 0.96);
  border-radius: 999px;
  background: #22c55e;
}

.compound-workflow-left-header h3,
.compound-workflow-chat-header h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0;
}

.compound-workflow-left-header p,
.compound-workflow-chat-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 750;
}

.compound-workflow-runtime-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.compound-workflow-runtime-line > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-workflow-runtime-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  color: rgba(223, 236, 255, 0.82);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.compound-workflow-runtime-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.9);
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.16);
}

.compound-workflow-runtime-badge[data-runtime-status="langgraph"],
.compound-workflow-runtime-badge[data-runtime-status="langgraph-executor"],
.compound-workflow-runtime-badge[data-runtime-status="langgraph-executor-ready"] {
  color: rgba(125, 211, 252, 0.92);
}

.compound-workflow-runtime-badge[data-runtime-status="langgraph"]::before,
.compound-workflow-runtime-badge[data-runtime-status="langgraph-executor"]::before,
.compound-workflow-runtime-badge[data-runtime-status="langgraph-executor-ready"]::before {
  background: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.18), 0 0 12px rgba(56, 189, 248, 0.28);
}

.compound-workflow-runtime-badge[data-runtime-status="shadow"],
.compound-workflow-runtime-badge[data-runtime-status="langgraph-preview"] {
  color: rgba(196, 181, 253, 0.92);
}

.compound-workflow-runtime-badge[data-runtime-status="shadow"]::before,
.compound-workflow-runtime-badge[data-runtime-status="langgraph-preview"]::before {
  background: #a78bfa;
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.18);
}

.compound-workflow-runtime-badge[data-runtime-status="fallback"] {
  color: rgba(253, 186, 116, 0.94);
}

.compound-workflow-runtime-badge[data-runtime-status="fallback"]::before {
  background: #fb923c;
  box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.2);
}

.compound-workflow-runtime-badge[data-runtime-status="legacy"] {
  color: rgba(203, 213, 225, 0.78);
}

.compound-workflow-runtime-actions {
  grid-column: 3;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: center;
  justify-self: end;
}

.compound-workflow-runtime-diagnostics-btn,
.compound-workflow-contract-diagnostics-btn {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: none;
}

.compound-workflow-runtime-diagnostics-btn:hover,
.compound-workflow-runtime-diagnostics-btn:focus-visible,
.compound-workflow-runtime-diagnostics-btn[aria-expanded="true"],
.compound-workflow-contract-diagnostics-btn:hover,
.compound-workflow-contract-diagnostics-btn:focus-visible,
.compound-workflow-contract-diagnostics-btn[aria-expanded="true"] {
  border-color: rgba(125, 211, 252, 0.52);
  background: rgba(14, 165, 233, 0.18);
  color: #ffffff;
}

.compound-workflow-contract-diagnostics-btn.is-failed,
.compound-workflow-contract-diagnostics-btn[data-contract-status="failed"] {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(127, 29, 29, 0.22);
  color: #fee2e2;
}

.compound-workflow-contract-diagnostics-btn.is-failed:hover,
.compound-workflow-contract-diagnostics-btn.is-failed:focus-visible,
.compound-workflow-contract-diagnostics-btn.is-failed[aria-expanded="true"] {
  border-color: rgba(248, 113, 113, 0.62);
  background: rgba(185, 28, 28, 0.3);
  color: #ffffff;
}

.compound-workflow-runtime-diagnostics {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: -6px 2px 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(19, 16, 55, 0.22);
  color: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.compound-workflow-contract-diagnostics[data-contract-status="failed"] {
  border-color: rgba(248, 113, 113, 0.26);
  background: rgba(69, 10, 10, 0.2);
}

.compound-workflow-runtime-diagnostics[hidden] {
  display: none !important;
}

.compound-workflow-runtime-diagnostics-header {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.compound-workflow-runtime-diagnostics-header strong {
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.compound-workflow-runtime-diagnostics-header span {
  min-width: 0;
  overflow: hidden;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.67rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-workflow-runtime-diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.compound-workflow-runtime-diagnostics-row {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.compound-workflow-runtime-diagnostics-row span:first-child {
  color: rgba(203, 213, 225, 0.58);
  font-size: 0.62rem;
  font-weight: 800;
}

.compound-workflow-runtime-diagnostics-row span:last-child {
  min-width: 0;
  overflow: hidden;
  color: rgba(248, 250, 252, 0.9);
  font-size: 0.7rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-workflow-runtime-diagnostics-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 112px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.compound-workflow-runtime-diagnostics-list li {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  min-width: 0;
  padding: 6px 7px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.22);
}

.compound-workflow-runtime-diagnostics-list li[data-level="warning"] {
  background: rgba(251, 146, 60, 0.14);
}

.compound-workflow-runtime-diagnostics-list li[data-level="error"] {
  background: rgba(248, 113, 113, 0.14);
}

.compound-workflow-runtime-diagnostics-list strong,
.compound-workflow-runtime-diagnostics-list span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.66rem;
  line-height: 1.3;
}

.compound-workflow-runtime-diagnostics-list strong {
  color: rgba(226, 232, 240, 0.84);
}

.compound-workflow-runtime-diagnostics-list span {
  color: rgba(248, 250, 252, 0.86);
}

.compound-workflow-contract-failure-row {
  border-color: rgba(248, 113, 113, 0.24);
}

.compound-workflow-contract-failure-row .compound-workflow-executor-shadow-copy {
  gap: 4px;
}

.compound-workflow-contract-error-list {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.compound-workflow-contract-error-list code {
  min-width: 0;
  padding: 3px 5px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.28);
  color: rgba(254, 226, 226, 0.9);
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

.compound-workflow-contract-empty {
  margin: 0;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.67rem;
  font-weight: 750;
  line-height: 1.45;
}

.compound-workflow-executor-shadow {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.compound-workflow-executor-shadow-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 184px;
  overflow: auto;
}

.compound-workflow-executor-shadow-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) minmax(54px, auto);
  gap: 7px;
  align-items: center;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.24);
}

.compound-workflow-executor-shadow-row[data-status="mismatch"],
.compound-workflow-executor-shadow-row[data-status="failed"] {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(127, 29, 29, 0.2);
}

.compound-workflow-executor-shadow-row[data-status="blocked"],
.compound-workflow-executor-shadow-row[data-status="waiting_input"],
.compound-workflow-executor-shadow-row[data-status="waiting_for_user"],
.compound-workflow-executor-shadow-row[data-status="retry_scheduled"] {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(120, 53, 15, 0.18);
}

.compound-workflow-executor-shadow-row[data-status="completed"],
.compound-workflow-executor-shadow-row[data-status="succeeded"],
.compound-workflow-executor-shadow-row[data-status="reused"] {
  border-color: rgba(45, 212, 191, 0.16);
}

.compound-workflow-executor-shadow-row[data-status="focused"] {
  border-color: rgba(45, 212, 191, 0.34);
  background: rgba(20, 184, 166, 0.13);
}

.compound-workflow-executor-shadow-row[data-status="running"],
.compound-workflow-executor-shadow-row[data-status="queued"] {
  border-color: rgba(125, 211, 252, 0.18);
}

.compound-workflow-executor-shadow-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(248, 250, 252, 0.9);
  font-size: 0.65rem;
  font-weight: 900;
}

.compound-workflow-executor-shadow-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.compound-workflow-executor-shadow-title,
.compound-workflow-executor-shadow-meta,
.compound-workflow-executor-shadow-badge {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-workflow-executor-shadow-title {
  color: rgba(248, 250, 252, 0.92);
  font-size: 0.68rem;
  font-weight: 850;
}

.compound-workflow-executor-shadow-meta {
  color: rgba(203, 213, 225, 0.68);
  font-size: 0.62rem;
  font-weight: 700;
}

.compound-workflow-executor-shadow-badge {
  justify-self: end;
  max-width: 82px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(226, 232, 240, 0.88);
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.compound-workflow-workspace-object-actions {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.compound-workflow-workspace-object-actions .compound-workflow-executor-shadow-badge {
  max-width: 76px;
}

.compound-workflow-workspace-object-actions .compound-workflow-run-observation-action {
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
}

.compound-workflow-run-observation-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.compound-workflow-run-observation-action {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 250, 252, 0.86);
}

.compound-workflow-run-observation-action:hover,
.compound-workflow-run-observation-action:focus-visible {
  border-color: rgba(45, 212, 191, 0.36);
  background: rgba(20, 184, 166, 0.14);
  color: #ffffff;
}

.compound-workflow-run-observation-action:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.compound-workflow-expert-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(210, 239, 255, 0.16);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.28);
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.compound-workflow-expert-card.is-profile-link {
  cursor: pointer;
}

.compound-workflow-expert-card.is-profile-link:hover,
.compound-workflow-expert-card.is-profile-link:focus-visible {
  border-color: rgba(45, 212, 191, 0.34);
  background: rgba(20, 184, 166, 0.1);
  outline: none;
}

.compound-workflow-expert-hero {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.compound-workflow-expert-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid rgba(94, 234, 212, 0.26);
  border-radius: 8px;
  background: rgba(13, 148, 136, 0.2);
  color: #ccfbf1;
  font-size: 0.74rem;
  font-weight: 900;
}

.compound-workflow-expert-copy {
  min-width: 0;
}

.compound-workflow-expert-eyebrow,
.compound-workflow-expert-subtitle,
.compound-workflow-expert-status,
.compound-workflow-expert-capabilities-meta {
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0;
}

.compound-workflow-expert-title {
  margin: 1px 0;
  overflow: hidden;
  color: #f8fafc;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-workflow-expert-subtitle,
.compound-workflow-expert-description {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compound-workflow-expert-description {
  display: -webkit-box;
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.compound-workflow-expert-actions,
.compound-workflow-expert-editor-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.compound-workflow-expert-action,
.compound-workflow-expert-save,
.compound-workflow-expert-cancel {
  width: auto;
  min-width: 32px;
  height: 30px;
  min-height: 30px;
  padding: 0 8px;
  border-color: rgba(210, 239, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 0.68rem;
  font-weight: 850;
}

.compound-workflow-expert-action svg,
.compound-workflow-expert-save svg,
.compound-workflow-expert-cancel svg {
  width: 14px;
  height: 14px;
}

.compound-workflow-expert-action.is-loading {
  color: #99f6e4;
}

.compound-workflow-expert-tags,
.compound-workflow-expert-capability-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.compound-workflow-expert-tags span,
.compound-workflow-expert-capability-list span {
  max-width: 100%;
  padding: 3px 7px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.24);
  color: rgba(226, 232, 240, 0.8);
  font-size: 0.65rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-workflow-expert-methods {
  display: grid;
  gap: 4px;
  max-height: 92px;
  margin: 0;
  padding-left: 16px;
  overflow: auto;
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.68rem;
  line-height: 1.35;
}

.compound-workflow-expert-editor {
  display: grid;
  gap: 7px;
  padding-top: 4px;
}

.compound-workflow-expert-editor[hidden] {
  display: none;
}

.compound-workflow-expert-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: rgba(203, 213, 225, 0.78);
  font-size: 0.66rem;
  font-weight: 850;
}

.compound-workflow-expert-input {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.28);
  color: #f8fafc;
  font: inherit;
  font-size: 0.72rem;
  line-height: 1.35;
  outline: none;
  resize: vertical;
}

.compound-workflow-expert-input:focus {
  border-color: rgba(45, 212, 191, 0.58);
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.14);
}

.compound-workflow-expert-status {
  margin: 0;
}

.compound-workflow-expert-status[hidden] {
  display: none;
}

.compound-workflow-expert-instruction {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: end;
}

.compound-workflow-expert-apply,
.compound-workflow-expert-memory-refresh,
.compound-workflow-expert-memory-action {
  min-width: 30px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(210, 239, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 0.64rem;
  font-weight: 850;
}

.compound-workflow-expert-card.is-generating {
  border-color: rgba(45, 212, 191, 0.32);
}

.compound-workflow-expert-profile-body {
  display: grid;
  gap: 12px;
  min-width: 0;
  color: #0f172a;
}

.compound-workflow-expert-host {
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background: #ffffff;
}

.compound-workflow-expert-host[hidden] {
  display: none !important;
}

.compound-workflow-expert-page {
  display: grid;
  align-content: start;
  gap: 14px;
  width: min(780px, 100%);
  min-width: 0;
}

.compound-workflow-expert-page-header {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(20, 184, 166, 0.06)), #ffffff;
}

.compound-workflow-expert-page-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  min-width: 64px;
  height: 64px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 999px;
  background: radial-gradient(circle at 30% 25%, #ffffff, #ede9fe 42%, #7c3aed);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 950;
  box-shadow: 0 18px 32px rgba(124, 58, 237, 0.18);
}

.compound-workflow-expert-page-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.compound-workflow-expert-page-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.compound-workflow-expert-page-eyebrow,
.compound-workflow-expert-page-description {
  margin: 0;
}

.compound-workflow-expert-page-eyebrow {
  color: #6d28d9;
  font-size: 0.72rem;
  font-weight: 900;
}

.compound-workflow-expert-page-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
}

.compound-workflow-expert-regenerate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: #5b21b6;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.compound-workflow-expert-regenerate:hover:not(:disabled),
.compound-workflow-expert-regenerate:focus-visible {
  border-color: rgba(124, 58, 237, 0.34);
  background: #ffffff;
  color: #4c1d95;
}

.compound-workflow-expert-regenerate:disabled {
  cursor: wait;
  opacity: 0.62;
}

.compound-workflow-expert-regenerate svg {
  width: 15px;
  height: 15px;
}

.compound-workflow-expert-regenerate.is-loading svg {
  animation: compoundWorkflowSpin 0.9s linear infinite;
}

.compound-workflow-expert-page-title {
  margin: 0;
  color: #0f172a;
  font-size: 1.28rem;
  font-weight: 950;
  line-height: 1.2;
}

.compound-workflow-expert-page-description {
  color: rgba(51, 65, 85, 0.78);
  font-size: 0.88rem;
  line-height: 1.5;
}

.compound-workflow-expert-page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compound-workflow-expert-page-meta span {
  padding: 4px 8px;
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: rgba(76, 29, 149, 0.78);
  font-size: 0.72rem;
  font-weight: 850;
}

.compound-workflow-expert-profile-summary {
  margin: 0;
  color: rgba(15, 23, 42, 0.78);
  font-size: 0.9rem;
  line-height: 1.55;
}

.compound-workflow-expert-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compound-workflow-expert-profile-meta span {
  padding: 4px 8px;
  border: 1px solid rgba(71, 85, 105, 0.14);
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.9);
  color: rgba(51, 65, 85, 0.78);
  font-size: 0.72rem;
  font-weight: 850;
}

.compound-workflow-expert-profile-section {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(71, 85, 105, 0.12);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.78);
}

.compound-workflow-expert-profile-section h4 {
  margin: 0;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 900;
}

.compound-workflow-expert-profile-section ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.compound-workflow-expert-profile-section li,
.compound-workflow-expert-profile-empty {
  margin: 0;
  color: rgba(30, 41, 59, 0.78);
  font-size: 0.78rem;
  line-height: 1.45;
}

.compound-workflow-expert-profile-source {
  padding: 0;
  overflow: hidden;
}

.compound-workflow-expert-profile-source-header {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 10px 10px 0;
}

.compound-workflow-expert-profile-source-header span {
  min-width: 0;
  overflow: hidden;
  color: rgba(71, 85, 105, 0.72);
  font-size: 0.72rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-workflow-expert-profile-source pre {
  max-height: 360px;
  margin: 0;
  overflow: auto;
  padding: 10px;
  border-top: 1px solid rgba(71, 85, 105, 0.12);
  background: #0f172a;
  color: #dbeafe;
  font-size: 0.72rem;
  line-height: 1.55;
  white-space: pre;
}

.compound-workflow-expert-profile-source code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.compound-workflow-expert-memory-panel {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(210, 239, 255, 0.14);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.22);
  color: #f8fafc;
}

.compound-workflow-expert-memory-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.compound-workflow-expert-memory-header strong {
  min-width: 0;
  overflow: hidden;
  color: rgba(248, 250, 252, 0.94);
  font-size: 0.74rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-workflow-expert-memory-meta,
.compound-workflow-expert-memory-empty {
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.64rem;
  font-weight: 750;
}

.compound-workflow-expert-memory-list {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.compound-workflow-expert-memory-empty {
  margin: 0;
}

.compound-workflow-expert-memory-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.2);
}

.compound-workflow-expert-memory-item[data-memory-status="candidate"] {
  border-color: rgba(251, 191, 36, 0.24);
  background: rgba(120, 53, 15, 0.16);
}

.compound-workflow-expert-memory-item[data-memory-status="active"] {
  border-color: rgba(45, 212, 191, 0.22);
  background: rgba(20, 83, 45, 0.16);
}

.compound-workflow-expert-memory-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.compound-workflow-expert-memory-body strong {
  overflow: hidden;
  color: rgba(248, 250, 252, 0.9);
  font-size: 0.68rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-workflow-expert-memory-body span {
  overflow: hidden;
  color: rgba(203, 213, 225, 0.68);
  font-size: 0.6rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-workflow-expert-memory-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.compound-workflow-expert-memory-action {
  min-width: 0;
  min-height: 24px;
  padding: 0 6px;
}

.compound-workflow-expert-capabilities {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 8px 0 4px;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.92);
}

.compound-workflow-expert-capabilities-header {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.compound-workflow-expert-capabilities-header strong {
  color: #172033;
  font-size: 0.74rem;
  font-weight: 900;
}

.compound-workflow-expert-capabilities .compound-workflow-expert-capability-list {
  max-height: 58px;
  overflow: hidden;
}

.compound-workflow-expert-capabilities .compound-workflow-expert-capability-list span {
  border-color: rgba(14, 116, 144, 0.14);
  background: rgba(236, 253, 245, 0.8);
  color: #115e59;
}

.compound-workflow-plugin-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 2px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: auto;
}

.compound-workflow-left-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 4px 0;
}

body[data-theme="light"] .compound-workflow-plugin-stack.waterfall-chat-steps {
  border: 0;
  background: transparent;
}

.compound-workflow-plugin-stack .waterfall-step {
  --compound-pill-shell-bg:
    linear-gradient(180deg, rgba(248, 251, 255, 0.16), rgba(214, 226, 255, 0.06)),
    rgba(49, 38, 112, 0.36);
  --compound-pill-inner-bg:
    linear-gradient(180deg, rgba(17, 34, 86, 0.98), rgba(9, 21, 63, 0.94)),
    rgba(9, 21, 63, 0.96);
  --compound-pill-border: rgba(115, 170, 255, 0.16);
  --compound-pill-active: rgba(126, 230, 255, 0);
  position: relative;
  grid-template-columns: 32px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 8px 8px 8px 10px;
  border-color: transparent;
  border-radius: 24px;
  background: var(--compound-pill-shell-bg);
  color: #10233c;
  box-shadow:
    0 14px 26px rgba(23, 14, 73, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.compound-workflow-plugin-stack .waterfall-step::after {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 0;
  border: 1px solid var(--compound-pill-border);
  border-radius: 18px;
  background:
    linear-gradient(90deg, var(--compound-pill-active), transparent 42%),
    var(--compound-pill-inner-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    0 12px 22px rgba(43, 61, 86, 0.16);
  pointer-events: none;
}

.compound-workflow-plugin-stack .waterfall-step.is-active {
  --compound-pill-border: rgba(126, 230, 255, 0.46);
  --compound-pill-active: rgba(126, 230, 255, 0.22);
  border-color: transparent;
  background: var(--compound-pill-shell-bg);
  box-shadow:
    0 18px 36px rgba(23, 14, 73, 0.3),
    0 0 0 1px rgba(126, 230, 255, 0.24),
    0 0 22px rgba(126, 230, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.compound-workflow-plugin-stack .waterfall-step.is-active::before {
  content: none;
}

body[data-theme="light"] .compound-workflow-plugin-stack .waterfall-step,
body[data-theme="light"] .compound-workflow-plugin-stack .waterfall-step.is-active {
  border-color: transparent;
  background: var(--compound-pill-shell-bg);
  color: #f7fbff;
}

.compound-workflow-plugin-stack .waterfall-step-number {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 7px;
  color: #fff3e3;
  font-size: 0.72rem;
  z-index: 1;
}

.compound-workflow-plugin-stack .waterfall-step-copy {
  position: relative;
  z-index: 1;
}

.compound-workflow-plugin-stack .waterfall-step-number.widget-title-icon[data-has-image="true"] {
  background: transparent;
  box-shadow: none;
}

.compound-workflow-plugin-stack .waterfall-step-title {
  color: #f7fbff;
  font-size: 0.78rem;
  font-weight: 850;
  text-shadow: 0 1px 10px rgba(134, 199, 255, 0.16);
}

.compound-workflow-plugin-stack .waterfall-step-remark {
  color: rgba(223, 236, 255, 0.72);
  font-size: 0.64rem;
  font-weight: 760;
}

.compound-workflow-plugin-stack .waterfall-step-status {
  display: none;
  color: rgba(237, 234, 247, 0.52);
}

.compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill {
  display: block;
  min-height: 0;
  padding: 4px;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.2), rgba(214, 226, 255, 0.08)),
    rgba(153, 180, 229, 0.12);
  box-shadow:
    0 18px 34px rgba(5, 12, 24, 0.28),
    0 0 0 1px rgba(212, 237, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill::after {
  content: none;
}

.compound-plugin-pill-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 6px 6px 9px;
  border: 1px solid rgba(196, 229, 255, 0.28);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(10, 25, 69, 0.96), rgba(8, 18, 53, 0.92)),
    rgba(8, 18, 53, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    0 16px 28px rgba(4, 10, 24, 0.38);
}

.compound-plugin-pill-header::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 7px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(194, 129, 255, 0.48) 10%,
      rgba(89, 170, 255, 0.42) 46%,
      rgba(88, 240, 255, 0.58) 82%,
      transparent 100%
    );
  filter: blur(7px);
  opacity: 0.7;
  pointer-events: none;
}

.compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill.is-active {
  box-shadow:
    0 22px 44px rgba(5, 12, 24, 0.42),
    0 0 0 1px rgba(126, 230, 255, 0.48),
    0 0 0 7px rgba(126, 230, 255, 0.2),
    0 0 38px rgba(126, 230, 255, 0.36),
    0 0 18px rgba(177, 139, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill.is-stale {
  box-shadow:
    0 18px 34px rgba(5, 12, 24, 0.36),
    0 0 0 1px rgba(255, 184, 77, 0.38),
    0 0 22px rgba(255, 184, 77, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill.is-stale .compound-plugin-pill-header {
  border-color: rgba(255, 184, 77, 0.62);
}

.compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill.is-failed {
  box-shadow:
    0 18px 34px rgba(5, 12, 24, 0.36),
    0 0 0 1px rgba(248, 113, 113, 0.36),
    0 0 22px rgba(248, 113, 113, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill.is-failed .compound-plugin-pill-header {
  border-color: rgba(248, 113, 113, 0.6);
}

.compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill.is-active .compound-plugin-pill-header {
  border-color: rgba(126, 230, 255, 0.78);
  background:
    radial-gradient(circle at 22% 50%, rgba(126, 230, 255, 0.38), transparent 36%),
    linear-gradient(90deg, rgba(126, 230, 255, 0.24), rgba(177, 139, 255, 0.18) 62%, transparent),
    linear-gradient(180deg, rgba(10, 25, 69, 0.98), rgba(8, 18, 53, 0.94)),
    rgba(8, 18, 53, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(126, 230, 255, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 16px 30px rgba(4, 10, 24, 0.42);
}

.compound-plugin-pill-actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.compound-step-open-btn {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid rgba(188, 234, 255, 0.26);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(158, 210, 255, 0.06)),
    rgba(255, 255, 255, 0.06);
  color: #f6fcff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 18px rgba(4, 12, 26, 0.24);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.compound-step-open-btn.widget-focus-btn {
  display: grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  line-height: 0;
}

.compound-step-open-btn.widget-focus-btn svg {
  display: block;
  width: 14px;
  height: 14px;
  margin: 0;
}

.compound-workflow-edit-workflow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 132px;
  height: 42px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(210, 239, 255, 0.32);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(159, 211, 255, 0.08)),
    rgba(255, 255, 255, 0.08);
  color: #f8fcff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 14px 28px rgba(4, 10, 24, 0.26);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.compound-workflow-edit-workflow-btn span {
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.compound-workflow-edit-workflow-btn svg {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0;
}

.compound-workflow-edit-workflow-btn:hover,
.compound-workflow-edit-workflow-btn:focus-visible {
  border-color: rgba(220, 246, 255, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(126, 230, 255, 0.14)),
    rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 16px 32px rgba(4, 10, 24, 0.3),
    0 0 24px rgba(126, 230, 255, 0.2);
  outline: none;
  transform: translateY(-1px);
}

.compound-step-open-btn:hover,
.compound-step-open-btn:focus-visible {
  border-color: rgba(196, 239, 255, 0.4);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(120, 217, 255, 0.12)),
    rgba(255, 255, 255, 0.08);
  color: #ffffff;
  outline: none;
  transform: translateY(-1px);
}

body[data-theme="light"] .compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(244, 248, 253, 0.95)),
    rgba(241, 246, 252, 0.96);
  box-shadow:
    0 14px 28px rgba(43, 61, 86, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.6);
}

body[data-theme="light"] .compound-plugin-pill-header {
  border-color: rgba(67, 96, 132, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(236, 242, 249, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 12px 24px rgba(43, 61, 86, 0.12);
}

body[data-theme="light"] .compound-plugin-pill-header::after {
  opacity: 0;
}

body[data-theme="light"] .compound-workflow-plugin-stack .waterfall-step-title {
  color: #1f2d3d;
  text-shadow: none;
}

body[data-theme="light"] .compound-workflow-plugin-stack .waterfall-step-remark {
  color: rgba(31, 45, 61, 0.58);
}

body[data-theme="light"] .compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill.is-active {
  box-shadow:
    0 20px 38px rgba(43, 61, 86, 0.22),
    0 0 0 1px rgba(76, 132, 226, 0.38),
    0 0 0 7px rgba(76, 132, 226, 0.18),
    0 0 28px rgba(76, 132, 226, 0.18);
}

body[data-theme="light"] .compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill.is-active .compound-plugin-pill-header {
  border-color: rgba(76, 132, 226, 0.48);
  background:
    radial-gradient(circle at 22% 50%, rgba(76, 132, 226, 0.18), transparent 36%),
    linear-gradient(90deg, rgba(76, 132, 226, 0.16), rgba(255, 255, 255, 0.16) 60%, transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(232, 242, 252, 0.82));
  box-shadow:
    inset 0 0 0 1px rgba(76, 132, 226, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 12px 24px rgba(43, 61, 86, 0.14);
}

body[data-theme="light"] .compound-step-open-btn.widget-focus-btn {
  border-color: rgba(205, 133, 51, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 233, 204, 0.94), rgba(255, 244, 228, 0.98)),
    rgba(255, 255, 255, 0.92);
  color: #9a5413;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 10px 20px rgba(181, 122, 59, 0.14);
}

body[data-theme="light"] .compound-step-open-btn.widget-focus-btn:hover,
body[data-theme="light"] .compound-step-open-btn.widget-focus-btn:focus-visible {
  border-color: rgba(205, 133, 51, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 225, 186, 0.98), rgba(255, 238, 214, 1)),
    rgba(255, 255, 255, 0.96);
  color: #7d420b;
}

body[data-theme="light"] .compound-workflow-edit-workflow-btn {
  border-color: rgba(205, 133, 51, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 233, 204, 0.94), rgba(255, 244, 228, 0.98)),
    rgba(255, 255, 255, 0.92);
  color: #9a5413;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 12px 24px rgba(181, 122, 59, 0.14);
}

body[data-theme="light"] .compound-workflow-edit-workflow-btn:hover,
body[data-theme="light"] .compound-workflow-edit-workflow-btn:focus-visible {
  border-color: rgba(205, 133, 51, 0.36);
  background:
    linear-gradient(180deg, rgba(255, 225, 186, 0.98), rgba(255, 238, 214, 1)),
    rgba(255, 255, 255, 0.96);
  color: #7d420b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 14px 28px rgba(181, 122, 59, 0.18);
}

.compound-workflow-chat {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  border: 0;
  border-radius: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 0% 0%, rgba(124, 92, 255, 0.2), transparent 32%),
    linear-gradient(145deg, rgba(13, 10, 23, 0.92), rgba(24, 20, 43, 0.88));
}

.compound-workflow-asset-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  padding: 10px 16px 16px;
  background: #ffffff;
}

.compound-workflow-surface-tabs {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 4px;
  width: max-content;
  max-width: calc(100% - 128px);
  min-width: 0;
  margin: 6px 0 6px;
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.92);
}

.compound-workflow-surface-tab {
  min-width: 0;
  height: 28px;
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(71, 85, 105, 0.72);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
}

.compound-workflow-surface-tab:hover,
.compound-workflow-surface-tab:focus-visible {
  color: #0f172a;
  background: rgba(226, 232, 240, 0.68);
}

.compound-workflow-surface-tab.is-active {
  color: #ffffff;
  background: #111827;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.compound-workflow-asset-view-switch {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 3px;
  width: max-content;
  max-width: 100%;
  margin: 0 0 8px;
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.94);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.compound-workflow-asset-toolbar {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  min-width: 0;
  max-width: calc(100% - 128px);
  margin: 0 0 8px;
}

.compound-workflow-asset-toolbar .compound-workflow-asset-view-switch {
  margin: 0;
}

.compound-workflow-asset-view-switch[hidden] {
  display: none;
}

.compound-workflow-asset-toolbar[hidden] {
  display: none;
}

.compound-workflow-shell.is-studio-surface-active .compound-workflow-asset-panel,
.compound-workflow-shell.is-plugin-surface-active .compound-workflow-asset-panel {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.compound-workflow-asset-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(71, 85, 105, 0.72);
  cursor: pointer;
  box-shadow: none;
}

.compound-workflow-asset-view-btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.3;
}

.compound-workflow-asset-view-btn:hover,
.compound-workflow-asset-view-btn:focus-visible {
  color: #0f172a;
  background: rgba(226, 232, 240, 0.68);
  outline: none;
}

.compound-workflow-asset-view-btn.is-active {
  color: #ffffff;
  background: #111827;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.compound-workflow-surface-stack {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.compound-workflow-assistant-open-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 78px;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  transition:
    opacity 160ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.compound-workflow-assistant-open-btn.compound-workflow-assistant-mood::after {
  top: -11px;
  right: -7px;
}

.compound-workflow-shell.is-assistant-open .compound-workflow-assistant-open-btn {
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
}

.compound-workflow-assistant-open-btn span {
  font-size: 0.78rem;
  font-weight: 900;
}

.compound-workflow-asset-list {
  position: relative;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 0;
  background:
    radial-gradient(circle, rgba(15, 23, 42, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff, #f8fafc);
  background-size: 22px 22px, auto;
  background-position: 1px 1px, 0 0;
}

.workflow-resource-slot-panel {
  position: sticky;
  bottom: 14px;
  z-index: 24;
  display: grid;
  gap: 8px;
  width: min(322px, calc(100% - 28px));
  margin: 0 auto 14px 14px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(14px);
}

.workflow-resource-slot-title {
  color: rgba(15, 23, 42, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
}

.workflow-resource-slot-list {
  display: grid;
  gap: 7px;
  min-width: 0;
  max-height: min(36vh, 268px);
  overflow-y: auto;
  padding: 1px;
}

.workflow-resource-slot-chip {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.94);
  color: #0f172a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.workflow-resource-slot-chip:hover,
.workflow-resource-slot-chip:focus-visible {
  border-color: rgba(20, 184, 166, 0.48);
  background: rgba(240, 253, 250, 0.96);
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14);
}

.workflow-resource-slot-chip[data-status="missing"] {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(255, 251, 235, 0.96);
}

.workflow-resource-slot-chip[data-status="provided"] {
  border-color: rgba(34, 197, 94, 0.38);
  background: rgba(240, 253, 244, 0.96);
}

.workflow-resource-slot-glyph {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #111827;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
}

.workflow-resource-slot-chip[data-status="missing"] .workflow-resource-slot-glyph {
  background: #f59e0b;
}

.workflow-resource-slot-chip[data-status="provided"] .workflow-resource-slot-glyph {
  background: #16a34a;
}

.workflow-resource-slot-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workflow-resource-slot-name,
.workflow-resource-slot-plugin,
.workflow-resource-slot-status {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-resource-slot-name {
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 900;
}

.workflow-resource-slot-plugin {
  color: rgba(15, 23, 42, 0.64);
  font-size: 0.68rem;
  font-weight: 780;
}

.workflow-resource-slot-status {
  color: rgba(71, 85, 105, 0.72);
  font-size: 0.68rem;
  font-weight: 760;
}

@media (max-width: 720px) {
  .workflow-resource-slot-panel {
    bottom: 10px;
    width: min(300px, calc(100% - 20px));
    margin: 0 auto 10px 10px;
  }
}

.compound-workflow-studio-host {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(226, 232, 240, 0.8)),
    #f8fafc;
}

.compound-workflow-plugin-host {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.94)),
    #ffffff;
}

.compound-workflow-studio-host[hidden],
.compound-workflow-plugin-host[hidden] {
  display: none;
}

.compound-workflow-studio-host canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.compound-workflow-studio-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: rgba(51, 65, 85, 0.72);
  font-size: 0.86rem;
  font-weight: 760;
  text-align: center;
}

.compound-workflow-plugin-placeholder {
  display: grid;
  place-content: center;
  gap: 8px;
  min-height: 100%;
  padding: 28px;
  text-align: center;
}

.compound-workflow-plugin-placeholder strong {
  color: #111827;
  font-size: 1rem;
  font-weight: 900;
}

.compound-workflow-plugin-placeholder p {
  max-width: 360px;
  margin: 0;
  color: rgba(71, 85, 105, 0.72);
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.55;
}

.compound-workflow-asset-list .workflow-asset-stage {
  width: 100%;
  min-height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.compound-workflow-asset-list .workflow-asset-stage-grid {
  max-height: none;
}

.compound-workflow-asset-list .workflow-asset-grid {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}

.compound-workflow-asset-list .workflow-asset-stage-grid.is-asset-canvas {
  position: relative;
  display: block;
  min-height: max(100%, var(--asset-canvas-height, 520px));
  overflow: visible;
  padding: 0;
  cursor: default;
}

.compound-workflow-asset-list .workflow-asset-stage-grid.is-asset-canvas .workflow-asset-item {
  position: absolute;
  z-index: 1;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.compound-workflow-asset-list .workflow-asset-stage-grid.is-asset-canvas .workflow-asset-item.is-pointer-down {
  z-index: 8;
}

.compound-workflow-asset-list .workflow-asset-stage-grid.is-asset-canvas .workflow-asset-item.is-dragging {
  z-index: 18;
  cursor: grabbing;
  will-change: transform;
}

.compound-workflow-asset-list .workflow-asset-stage-grid.is-asset-canvas .workflow-asset-item.is-selected {
  z-index: 10;
}

.compound-workflow-asset-list .workflow-asset-stage-grid.is-asset-canvas .workflow-asset-preview {
  border-radius: 12px;
  cursor: grab;
  outline: 0 solid transparent;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
  transition:
    outline-color 140ms ease,
    outline-width 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.compound-workflow-asset-list .workflow-asset-stage-grid.is-asset-canvas .workflow-asset-item:hover .workflow-asset-preview,
.compound-workflow-asset-list .workflow-asset-stage-grid.is-asset-canvas .workflow-asset-item:focus-within .workflow-asset-preview {
  outline: 2px solid rgba(17, 24, 39, 0.16);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.2);
  transform: translateY(-1px);
}

.compound-workflow-asset-list .workflow-asset-stage-grid.is-asset-canvas .workflow-asset-item.is-selected .workflow-asset-preview {
  outline: 2px solid rgba(17, 24, 39, 0.38);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.24);
}

.compound-workflow-asset-list .workflow-asset-stage-grid.is-asset-canvas .workflow-asset-item.is-dragging .workflow-asset-preview {
  cursor: grabbing;
  transform: none;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.22);
}

.compound-workflow-asset-list .workflow-asset-stage.is-list-view,
.compound-workflow-asset-list .workflow-asset-stage.is-files-view {
  padding: 10px;
}

.compound-workflow-asset-list .workflow-asset-stage.is-list-view {
  min-height: auto;
  align-content: start;
}

.workflow-asset-list-view {
  display: grid;
  align-content: start;
  gap: 0;
  min-width: 760px;
  color: #0f172a;
}

.workflow-asset-list-header,
.workflow-asset-list-row {
  display: grid;
  grid-template-columns:
    minmax(178px, 1.36fr)
    minmax(106px, 0.66fr)
    minmax(108px, 0.7fr)
    minmax(76px, 0.42fr)
    minmax(66px, 0.38fr)
    96px;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.workflow-asset-list-header {
  height: 30px;
  min-height: 26px;
  padding: 0 6px;
  color: rgba(71, 85, 105, 0.68);
  font-size: 0.74rem;
  font-weight: 900;
}

.workflow-asset-list-header span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-asset-list-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.workflow-asset-list-sort-btn span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-asset-list-sort-btn:hover,
.workflow-asset-list-sort-btn:focus-visible,
.workflow-asset-list-sort-btn[aria-pressed="true"] {
  color: #0f172a;
  outline: none;
}

.workflow-asset-list-sort-indicator {
  display: inline-grid;
  place-items: center;
  width: 9px;
  min-width: 9px;
  font-size: 0.64rem;
  line-height: 1;
}

.workflow-asset-list-row {
  height: 65px;
  min-height: 65px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.13);
  cursor: pointer;
  transition:
    background 140ms ease,
    box-shadow 140ms ease;
}

.workflow-asset-list-row:hover,
.workflow-asset-list-row:focus-visible,
.workflow-asset-list-row:focus-within {
  background: rgba(248, 250, 252, 0.88);
  box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.18);
  outline: none;
}

.workflow-asset-list-row.is-selected {
  background: rgba(37, 99, 235, 0.08);
  box-shadow:
    inset 3px 0 0 rgba(37, 99, 235, 0.72),
    inset 0 -1px 0 rgba(37, 99, 235, 0.16);
}

.workflow-asset-list-name,
.workflow-asset-list-producer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.workflow-asset-list-name strong,
.workflow-asset-list-time,
.workflow-asset-list-description,
.workflow-asset-list-origin,
.workflow-asset-list-kind,
.workflow-asset-list-producer .workflow-asset-producer-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-asset-list-name strong {
  color: #0f172a;
  font-size: 0.96rem;
  font-weight: 850;
  line-height: 1.25;
}

.workflow-asset-list-glyph,
.workflow-asset-file-glyph,
.workflow-asset-mini-glyph {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 40px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(20, 184, 166, 0.12)),
    #ffffff;
  color: #1e3a8a;
  font-size: 0.54rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.workflow-asset-mini-preview .workflow-asset-mini-glyph {
  width: 40px;
  height: 44px;
  font-size: 0.62rem;
}

.workflow-asset-mini-preview .workflow-asset-mini-glyph::after {
  width: 12px;
  height: 12px;
  border-radius: 0 0 0 5px;
}

.workflow-asset-list-glyph::after,
.workflow-asset-file-glyph::after,
.workflow-asset-mini-glyph::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 11px;
  height: 11px;
  border-left: 1px solid rgba(15, 23, 42, 0.1);
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0 0 0 5px;
  background: rgba(255, 255, 255, 0.86);
}

.workflow-asset-list-glyph[data-asset-type*="image"],
.workflow-asset-file-glyph[data-asset-type*="image"],
.workflow-asset-mini-glyph[data-asset-type*="image"],
.workflow-asset-list-glyph[data-asset-type*="图片"],
.workflow-asset-file-glyph[data-asset-type*="图片"],
.workflow-asset-mini-glyph[data-asset-type*="图片"] {
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.22), rgba(14, 165, 233, 0.2)),
    #ffffff;
  color: #0f766e;
}

.workflow-asset-list-glyph[data-asset-type*="video"],
.workflow-asset-file-glyph[data-asset-type*="video"],
.workflow-asset-mini-glyph[data-asset-type*="video"],
.workflow-asset-list-glyph[data-asset-type*="视频"],
.workflow-asset-file-glyph[data-asset-type*="视频"],
.workflow-asset-mini-glyph[data-asset-type*="视频"] {
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(244, 63, 94, 0.16)),
    #ffffff;
  color: #9a3412;
}

.workflow-asset-list-glyph[data-asset-type*="audio"],
.workflow-asset-file-glyph[data-asset-type*="audio"],
.workflow-asset-mini-glyph[data-asset-type*="audio"],
.workflow-asset-list-glyph[data-asset-type*="音频"],
.workflow-asset-file-glyph[data-asset-type*="音频"],
.workflow-asset-mini-glyph[data-asset-type*="音频"] {
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(99, 102, 241, 0.16)),
    #ffffff;
  color: #0369a1;
}

.workflow-asset-list-glyph[data-asset-type*="text"],
.workflow-asset-file-glyph[data-asset-type*="text"],
.workflow-asset-mini-glyph[data-asset-type*="text"],
.workflow-asset-list-glyph[data-asset-type*="markdown"],
.workflow-asset-file-glyph[data-asset-type*="markdown"],
.workflow-asset-mini-glyph[data-asset-type*="markdown"],
.workflow-asset-list-glyph[data-asset-type*="文本"],
.workflow-asset-file-glyph[data-asset-type*="文本"],
.workflow-asset-mini-glyph[data-asset-type*="文本"] {
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(14, 165, 233, 0.12)),
    #ffffff;
  color: #3730a3;
}

.workflow-asset-list-glyph[data-asset-type*="spreadsheet"],
.workflow-asset-file-glyph[data-asset-type*="spreadsheet"],
.workflow-asset-mini-glyph[data-asset-type*="spreadsheet"],
.workflow-asset-list-glyph[data-asset-type*="excel"],
.workflow-asset-file-glyph[data-asset-type*="excel"],
.workflow-asset-mini-glyph[data-asset-type*="excel"],
.workflow-asset-list-glyph[data-asset-type*="table"],
.workflow-asset-file-glyph[data-asset-type*="table"],
.workflow-asset-mini-glyph[data-asset-type*="table"],
.workflow-asset-list-glyph[data-asset-type*="表格"],
.workflow-asset-file-glyph[data-asset-type*="表格"],
.workflow-asset-mini-glyph[data-asset-type*="表格"] {
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(132, 204, 22, 0.14)),
    #ffffff;
  color: #047857;
}

.workflow-asset-list-time,
.workflow-asset-list-description {
  margin: 0;
  color: rgba(71, 85, 105, 0.72);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.22;
}

.workflow-asset-list-description {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.workflow-asset-list-origin,
.workflow-asset-list-kind {
  justify-self: start;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.15;
}

.workflow-asset-list-origin[data-origin="uploaded"] {
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
}

.workflow-asset-list-origin[data-origin="generated"] {
  background: rgba(37, 99, 235, 0.11);
  color: #1d4ed8;
}

.workflow-asset-list-kind {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.72);
}

.workflow-asset-list-row .workflow-asset-actions,
.workflow-asset-file-item .workflow-asset-actions {
  justify-self: end;
  margin-top: 0;
}

.workflow-asset-list-row:hover .workflow-asset-actions,
.workflow-asset-list-row:focus-visible .workflow-asset-actions,
.workflow-asset-list-row:focus-within .workflow-asset-actions,
.workflow-asset-file-item:hover .workflow-asset-actions,
.workflow-asset-file-item:focus-within .workflow-asset-actions {
  opacity: 1;
  pointer-events: auto;
}

.workflow-asset-actions.is-compact {
  gap: 4px;
}

.workflow-asset-actions.is-compact button {
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
}

.workflow-asset-actions.is-compact button svg {
  width: 14px;
  height: 14px;
}

.workflow-asset-mini-preview {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 40px;
  aspect-ratio: var(--asset-mini-aspect-ratio, 1.3);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 7px;
  background:
    linear-gradient(45deg, rgba(148, 163, 184, 0.12) 25%, transparent 25%, transparent 75%, rgba(148, 163, 184, 0.12) 75%),
    linear-gradient(45deg, rgba(148, 163, 184, 0.12) 25%, transparent 25%, transparent 75%, rgba(148, 163, 184, 0.12) 75%),
    rgba(241, 245, 249, 0.92);
  background-position: 0 0, 5px 5px, 0 0;
  background-size: 10px 10px, 10px 10px, auto;
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.08);
}

.workflow-asset-mini-preview img,
.workflow-asset-mini-preview video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.workflow-asset-mini-preview.is-glyph {
  width: 40px;
  height: 44px;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.workflow-asset-file-preview.is-glyph {
  width: 76px;
  height: 68px;
}

.workflow-asset-mini-play {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}

.workflow-asset-mini-play::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid #ffffff;
}

.workflow-asset-file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  align-items: start;
  gap: 14px 12px;
  width: 100%;
  min-width: 0;
  padding: 2px;
  color: #0f172a;
}

.workflow-asset-file-item {
  position: relative;
  display: grid;
  justify-items: center;
  min-width: 0;
  padding: 0 4px 34px;
}

.workflow-asset-file-button {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  min-height: 116px;
  padding: 12px 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.workflow-asset-file-button:hover,
.workflow-asset-file-button:focus-visible,
.workflow-asset-file-item.is-selected .workflow-asset-file-button {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.09);
  outline: none;
  transform: translateY(-1px);
}

.workflow-asset-file-glyph {
  width: 58px;
  height: 68px;
  border-radius: 8px;
  font-size: 0.7rem;
}

.workflow-asset-file-preview {
  width: 76px;
  height: 68px;
  aspect-ratio: var(--asset-mini-aspect-ratio, 1.118);
  border-radius: 9px;
}

.workflow-asset-file-preview .workflow-asset-mini-glyph {
  width: 58px;
  height: 68px;
  border-radius: 8px;
  font-size: 0.7rem;
}

.workflow-asset-file-preview .workflow-asset-mini-glyph::after {
  width: 16px;
  height: 16px;
  border-radius: 0 0 0 7px;
}

.workflow-asset-file-glyph::after {
  width: 16px;
  height: 16px;
  border-radius: 0 0 0 7px;
}

.workflow-asset-file-name {
  display: -webkit-box;
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 860;
  line-height: 1.28;
  text-align: center;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.workflow-asset-file-detail {
  position: absolute;
  left: 50%;
  top: calc(100% - 24px);
  z-index: 24;
  display: grid;
  gap: 6px;
  width: min(260px, 78vw);
  padding: 10px 11px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  color: #0f172a;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, 4px, 0);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.workflow-asset-file-item:hover .workflow-asset-file-detail,
.workflow-asset-file-item:focus-within .workflow-asset-file-detail {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

.workflow-asset-file-detail strong,
.workflow-asset-file-detail p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workflow-asset-file-detail strong {
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 930;
  line-height: 1.25;
  white-space: nowrap;
}

.workflow-asset-file-detail p {
  color: rgba(71, 85, 105, 0.76);
  font-size: 0.68rem;
  font-weight: 760;
  line-height: 1.4;
}

.workflow-asset-file-detail p:first-of-type {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.workflow-asset-file-item .workflow-asset-actions {
  position: absolute;
  right: 6px;
  bottom: 2px;
  z-index: 2;
}

.compound-workflow-assistant-window {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 28;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(640px, calc(100% - 24px));
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-right: 0;
  border-radius: 24px 0 0 24px;
  background: #ffffff;
  box-shadow:
    0 30px 78px rgba(15, 23, 42, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.56) inset;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(calc(100% + 28px), 0, 0);
  transition:
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease,
    visibility 0s linear 260ms;
}

.compound-workflow-assistant-window[hidden] {
  display: grid;
}

.compound-workflow-assistant-window.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  transition:
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease,
    visibility 0s linear 0s;
}

body.is-compound-workflow-focus-active {
  overflow: hidden;
}

body.is-compound-workflow-focus-active::after,
.is-compound-workflow-focus-host::after {
  position: fixed;
  inset: 0;
  z-index: 990;
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.12), transparent 34%),
    rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(18px) saturate(1.04);
  -webkit-backdrop-filter: blur(18px) saturate(1.04);
  content: "";
  pointer-events: auto;
}

.widget.is-compound-workflow-focus-target {
  position: fixed !important;
  top: 18px !important;
  left: 18px !important;
  z-index: 1000 !important;
  width: calc(100vw - 36px) !important;
  height: calc(100vh - 36px) !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border-radius: 18px;
  transform: none !important;
  box-shadow:
    0 40px 100px rgba(2, 6, 23, 0.42),
    0 0 0 1px rgba(103, 232, 249, 0.22);
}

.widget.is-compound-workflow-focus-target::before {
  opacity: 0;
}

.widget.is-compound-workflow-focus-target .widget-header {
  cursor: default;
}

.widget.is-compound-workflow-focus-target .resize-handle,
.widget.is-compound-workflow-focus-target .widget-focus-btn,
.widget.is-compound-workflow-focus-target .widget-collapse-btn,
.widget.is-compound-workflow-focus-target .widget-delete-btn {
  display: none !important;
}

.widget.is-compound-workflow-focus-target .widget-body {
  min-height: 0;
}

.widget.is-compound-workflow-focus-target .compound-workflow-shell {
  gap: 12px;
  padding: 0;
}

.widget.is-compound-workflow-focus-target .compound-workflow-left {
  border-radius: 16px;
}

.widget.is-compound-workflow-focus-target .compound-workflow-chat {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  border-radius: 16px;
}

.widget.is-compound-workflow-focus-target .compound-workflow-shell.is-assistant-open .compound-workflow-chat {
  grid-template-columns: minmax(0, 1fr) clamp(440px, 34vw, 620px);
}

.widget.is-compound-workflow-focus-target .compound-workflow-asset-panel {
  min-width: 0;
  min-height: 0;
}

.widget.is-compound-workflow-focus-target .compound-workflow-surface-stack,
.widget.is-compound-workflow-focus-target .compound-workflow-asset-list {
  min-height: 0;
}

.widget.is-compound-workflow-focus-target .compound-workflow-assistant-window {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 100%;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  border-right: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
}

.widget.is-compound-workflow-focus-target .compound-workflow-assistant-window:not(.is-open) {
  display: none;
}

.widget.is-compound-workflow-focus-target .compound-workflow-assistant-open-btn {
  top: 12px;
  right: 16px;
}

body[data-theme="light"].is-compound-workflow-focus-active::after,
body[data-theme="light"] .is-compound-workflow-focus-host::after {
  background:
    radial-gradient(circle at 50% 0%, rgba(76, 132, 226, 0.12), transparent 34%),
    rgba(226, 232, 240, 0.72);
}

body[data-theme="light"] .widget.is-compound-workflow-focus-target {
  box-shadow:
    0 40px 96px rgba(43, 61, 86, 0.28),
    0 0 0 1px rgba(76, 132, 226, 0.2);
}

@media (max-width: 900px) {
  .widget.is-compound-workflow-focus-target {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0;
  }

  .widget.is-compound-workflow-focus-target .compound-workflow-shell,
  .widget.is-compound-workflow-focus-target .compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) {
    grid-template-columns: 1fr;
    grid-template-rows: 68px minmax(0, 1fr);
    gap: 8px;
  }

  .widget.is-compound-workflow-focus-target .compound-workflow-chat,
  .widget.is-compound-workflow-focus-target .compound-workflow-shell.is-assistant-open .compound-workflow-chat {
    grid-template-columns: minmax(0, 1fr);
  }

  .widget.is-compound-workflow-focus-target .compound-workflow-assistant-window {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    grid-column: 1;
    width: min(440px, calc(100% - 18px));
    border-radius: 18px 0 0 18px;
    box-shadow: 0 24px 68px rgba(15, 23, 42, 0.32);
  }
}

.compound-workflow-assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: #ffffff;
}

.compound-workflow-assistant-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.compound-workflow-assistant-copy strong {
  color: #111827;
  font-size: 0.88rem;
  font-weight: 900;
}

.compound-workflow-assistant-copy span {
  color: rgba(71, 85, 105, 0.62);
  font-size: 0.72rem;
  font-weight: 750;
}

.compound-workflow-assistant-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
}

.compound-workflow-shell.is-onboarding-mode .compound-workflow-asset-panel {
  display: none;
}

.compound-workflow-shell.is-onboarding-mode .compound-workflow-assistant-window {
  position: relative;
  inset: auto;
  width: 100%;
  border-radius: 30px;
  box-shadow: none;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.compound-workflow-shell.is-onboarding-mode .compound-workflow-assistant-header {
  display: none;
}

.compound-workflow-chat-header {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 74px;
  padding: 14px 24px 10px;
  text-align: center;
  border-bottom: 1px solid rgba(177, 139, 255, 0.12);
  background:
    radial-gradient(circle at 50% -40%, rgba(255, 124, 247, 0.18), transparent 54%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
}

.compound-workflow-chat-main {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 14px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 24px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 92% 8%, rgba(124, 92, 255, 0.16), transparent 32%),
    radial-gradient(circle at 8% 100%, rgba(24, 20, 43, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(251, 252, 255, 0.94), rgba(235, 239, 249, 0.9) 58%, rgba(210, 216, 236, 0.86));
}

.compound-workflow-chat-main.is-onboarding-mode {
  grid-template-rows: minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 236, 214, 0.96) 0%, rgba(237, 249, 255, 0.95) 38%, rgba(247, 238, 255, 0.95) 72%, rgba(236, 255, 243, 0.94) 100%);
}

body[data-theme="light"] .compound-workflow-chat-main {
  background: #ffffff;
}

body[data-theme="light"] .compound-workflow-chat {
  border: 0;
  background: #ffffff;
}

body[data-theme="dark"] .compound-workflow-asset-panel {
  background:
    radial-gradient(circle at 12% 0%, rgba(124, 92, 255, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(10, 15, 28, 0.98), rgba(7, 10, 20, 0.96));
}

body[data-theme="dark"] .compound-workflow-surface-tabs {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.62);
}

body[data-theme="dark"] .compound-workflow-surface-tab {
  color: rgba(226, 232, 240, 0.68);
}

body[data-theme="dark"] .compound-workflow-surface-tab:hover,
body[data-theme="dark"] .compound-workflow-surface-tab:focus-visible {
  color: #f8fafc;
  background: rgba(148, 163, 184, 0.12);
}

body[data-theme="dark"] .compound-workflow-surface-tab.is-active {
  color: #020617;
  background: #e2e8f0;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .compound-workflow-asset-list {
  background:
    radial-gradient(circle, rgba(148, 163, 184, 0.14) 1px, transparent 1px),
    linear-gradient(180deg, #0b1020, #070b14);
  background-size: 22px 22px, auto;
  background-position: 1px 1px, 0 0;
}

body[data-theme="dark"] .workflow-resource-slot-panel {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
}

body[data-theme="dark"] .workflow-resource-slot-title {
  color: rgba(226, 232, 240, 0.72);
}

body[data-theme="dark"] .workflow-resource-slot-chip {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.86);
  color: #f8fafc;
}

body[data-theme="dark"] .workflow-resource-slot-chip:hover,
body[data-theme="dark"] .workflow-resource-slot-chip:focus-visible {
  border-color: rgba(45, 212, 191, 0.5);
  background: rgba(19, 78, 74, 0.46);
}

body[data-theme="dark"] .workflow-resource-slot-chip[data-status="missing"] {
  border-color: rgba(251, 191, 36, 0.52);
  background: rgba(120, 53, 15, 0.42);
}

body[data-theme="dark"] .workflow-resource-slot-chip[data-status="provided"] {
  border-color: rgba(74, 222, 128, 0.42);
  background: rgba(20, 83, 45, 0.42);
}

body[data-theme="dark"] .workflow-resource-slot-glyph {
  background: #e2e8f0;
  color: #020617;
}

body[data-theme="dark"] .workflow-resource-slot-name {
  color: #f8fafc;
}

body[data-theme="dark"] .workflow-resource-slot-plugin {
  color: rgba(226, 232, 240, 0.68);
}

body[data-theme="dark"] .workflow-resource-slot-status {
  color: rgba(203, 213, 225, 0.72);
}

body[data-theme="dark"] .compound-workflow-studio-host {
  border-color: rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.9)),
    #020617;
}

body[data-theme="dark"] .compound-workflow-plugin-host {
  border-color: rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.9)),
    #020617;
}

body[data-theme="dark"] .compound-workflow-studio-fallback {
  color: rgba(226, 232, 240, 0.7);
}

body[data-theme="dark"] .compound-workflow-plugin-placeholder strong {
  color: #f8fafc;
}

body[data-theme="dark"] .compound-workflow-plugin-placeholder p {
  color: rgba(203, 213, 225, 0.68);
}

body[data-theme="dark"] .compound-workflow-plugin-host .compound-step-editor-header {
  border-bottom-color: rgba(148, 163, 184, 0.14);
  background: rgba(8, 13, 25, 0.72);
}

body[data-theme="dark"] .compound-workflow-plugin-host .compound-step-editor-widget {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.62);
}

body[data-theme="dark"] .compound-workflow-assistant-window {
  border-color: rgba(148, 163, 184, 0.2);
  background: #080d19;
  box-shadow:
    0 34px 82px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

body[data-theme="dark"] .compound-workflow-assistant-header {
  border-bottom-color: rgba(148, 163, 184, 0.14);
  background: rgba(8, 13, 25, 0.96);
}

body[data-theme="dark"] .compound-workflow-assistant-copy strong {
  color: #f8fafc;
}

body[data-theme="dark"] .compound-workflow-assistant-copy span {
  color: rgba(203, 213, 225, 0.66);
}

body[data-theme="dark"] .compound-workflow-assistant-close-btn {
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}

body[data-theme="dark"] .compound-workflow-chat-main {
  background:
    radial-gradient(circle at 92% 8%, rgba(124, 92, 255, 0.18), transparent 32%),
    radial-gradient(circle at 8% 100%, rgba(34, 211, 238, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(12, 17, 31, 0.98), rgba(7, 10, 20, 0.96));
}

body[data-theme="dark"] .compound-workflow-chat-main.is-onboarding-mode {
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 124, 247, 0.12), transparent 32%),
    radial-gradient(circle at 86% 18%, rgba(34, 211, 238, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(12, 17, 31, 0.98), rgba(8, 13, 25, 0.96));
}

body[data-theme="dark"] .workflow-entry-card {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.84);
  color: #f8fafc;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .workflow-entry-card-title,
body[data-theme="dark"] .workflow-entry-node-name {
  color: #f8fafc;
}

body[data-theme="dark"] .workflow-entry-card-summary,
body[data-theme="dark"] .workflow-entry-node-remark,
body[data-theme="dark"] .workflow-entry-field > span,
body[data-theme="dark"] .workflow-entry-attachment-copy > span,
body[data-theme="dark"] .workflow-entry-attachment-copy > small {
  color: rgba(203, 213, 225, 0.66);
}

body[data-theme="dark"] .workflow-entry-node,
body[data-theme="dark"] .workflow-entry-attachment,
body[data-theme="dark"] .workflow-entry-textarea {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.42);
  color: #f8fafc;
}

body[data-theme="dark"] .workflow-entry-textarea:focus {
  border-color: rgba(124, 92, 255, 0.42);
  background: rgba(2, 6, 23, 0.62);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.14);
}

body[data-theme="dark"] .workflow-entry-example {
  border-color: rgba(177, 139, 255, 0.22);
  background: rgba(124, 92, 255, 0.14);
  color: #d8ccff;
}

.compound-workflow-chat-main .waterfall-chat-messages {
  min-height: 0;
  padding: 8px 10px 6px;
}

.compound-workflow-chat-main.is-onboarding-mode .waterfall-chat-messages {
  padding: 0;
  overflow: hidden;
}

.compound-workflow-chat-main.is-onboarding-mode .waterfall-chat-composer,
.compound-workflow-chat-main.is-onboarding-mode .waterfall-pending-attachments {
  display: none;
}

.workflow-launch-overlay {
  position: absolute;
  inset: 0;
  z-index: 36;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(12px) saturate(1.08);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
}

.workflow-launch-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  width: min(760px, 100%);
  max-height: min(760px, 92%);
  min-height: 0;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.78);
  border-radius: 18px;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 30px 72px rgba(15, 23, 42, 0.28);
}

.workflow-launch-header,
.workflow-launch-section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.workflow-launch-eyebrow,
.workflow-launch-section-title {
  color: rgba(79, 70, 229, 0.82);
  font-size: 0.72rem;
  font-weight: 950;
}

.workflow-launch-title {
  margin: 0;
  color: #111827;
  font-size: clamp(1.24rem, 2.2vw, 1.72rem);
  font-weight: 950;
  line-height: 1.18;
}

.workflow-launch-summary {
  margin: 0;
  color: rgba(51, 65, 85, 0.72);
  font-size: 0.88rem;
  line-height: 1.56;
}

.workflow-launch-body {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.workflow-launch-check-item,
.workflow-launch-control-chip,
.workflow-launch-example {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.92);
  color: rgba(30, 41, 59, 0.78);
  font-size: 0.8rem;
  font-weight: 760;
  line-height: 1.45;
}

.workflow-launch-mode {
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.workflow-launch-mode.is-active {
  border-color: rgba(79, 70, 229, 0.42);
  background: rgba(238, 242, 255, 0.92);
  color: #312e81;
}

.workflow-launch-mode strong {
  font-size: 0.82rem;
  font-weight: 950;
}

.workflow-launch-mode span {
  color: rgba(51, 65, 85, 0.68);
  font-size: 0.74rem;
  font-weight: 720;
  line-height: 1.4;
}

.workflow-launch-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.workflow-launch-primary,
.workflow-launch-secondary {
  min-height: 36px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.workflow-launch-primary {
  background: #4f46e5;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.22);
}

.workflow-launch-secondary {
  background: rgba(15, 23, 42, 0.07);
  color: rgba(30, 41, 59, 0.72);
}

.compound-workflow-chat-main .waterfall-chat-conversations {
  padding: 0 10px;
}

.compound-workflow-chat-main.is-onboarding-mode .waterfall-chat-conversations {
  display: none;
}

.compound-workflow-chat-main .waterfall-chat-conversation-tab {
  border-color: rgba(24, 20, 43, 0.08);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(24, 20, 43, 0.58);
  box-shadow: 0 8px 20px rgba(24, 20, 43, 0.05);
}

.compound-workflow-chat-main .waterfall-chat-conversation-tab.is-active {
  border-color: rgba(124, 92, 255, 0.26);
  background: #ffffff;
  color: #18142b;
  box-shadow:
    0 10px 24px rgba(24, 20, 43, 0.08),
    inset 0 0 0 1px rgba(124, 92, 255, 0.06);
}

.compound-workflow-chat-main .waterfall-chat-conversation-action {
  border: 0;
  background: #ffffff;
  color: #6d4cff;
  box-shadow: 0 10px 24px rgba(24, 20, 43, 0.08);
}

.compound-workflow-conversation-bar.waterfall-chat-conversations {
  align-items: flex-end;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-bottom: 2px solid rgba(226, 232, 240, 0.14);
  background: transparent;
}

.compound-workflow-shell.is-onboarding-mode .compound-workflow-conversation-bar.waterfall-chat-conversations {
  display: none;
}

.compound-workflow-conversation-bar .waterfall-chat-conversation-tabs {
  align-self: stretch;
  align-items: flex-end;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.compound-workflow-conversation-bar .waterfall-chat-conversation-tabs::-webkit-scrollbar {
  display: none;
}

.compound-workflow-conversation-bar .waterfall-chat-conversation-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 44px;
  min-width: 74px;
  max-width: 188px;
  margin-bottom: -2px;
  padding: 10px 20px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.62);
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
  transition:
    color 180ms ease,
    border-bottom-color 180ms ease;
}

.compound-workflow-conversation-bar .waterfall-chat-conversation-tab:hover,
.compound-workflow-conversation-bar .waterfall-chat-conversation-tab:focus-visible {
  color: #f8fafc;
  outline: none;
}

.compound-workflow-conversation-bar .waterfall-chat-conversation-tab.is-active {
  border-bottom-color: #7d55ff;
  background: transparent;
  color: #7d55ff;
  box-shadow: none;
}

.compound-workflow-conversation-bar .waterfall-chat-conversation-action {
  flex: 0 0 30px;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  margin-bottom: 7px;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(226, 232, 240, 0.76);
  box-shadow: none;
}

.compound-workflow-conversation-bar .waterfall-chat-conversation-action:hover,
.compound-workflow-conversation-bar .waterfall-chat-conversation-action:focus-visible {
  background: rgba(124, 92, 255, 0.16);
  color: #ffffff;
  outline: none;
}

body[data-theme="light"] .compound-workflow-conversation-bar.waterfall-chat-conversations {
  border-bottom-color: rgba(89, 62, 170, 0.14);
  background: #ffffff;
}

body[data-theme="light"] .compound-workflow-conversation-bar .waterfall-chat-conversation-tab {
  border-color: transparent;
  background: transparent;
  color: rgba(71, 85, 105, 0.68);
  box-shadow: none;
}

body[data-theme="light"] .compound-workflow-conversation-bar .waterfall-chat-conversation-tab:hover,
body[data-theme="light"] .compound-workflow-conversation-bar .waterfall-chat-conversation-tab:focus-visible {
  color: #1e1240;
}

body[data-theme="light"] .compound-workflow-conversation-bar .waterfall-chat-conversation-tab.is-active {
  border-bottom-color: #7d55ff;
  background: transparent;
  color: #7d55ff;
  box-shadow: none;
}

body[data-theme="light"] .compound-workflow-conversation-bar .waterfall-chat-conversation-action {
  border: 0;
  background: transparent;
  color: rgba(91, 33, 182, 0.76);
  box-shadow: none;
}

body[data-theme="light"] .compound-workflow-conversation-bar .waterfall-chat-conversation-action:hover,
body[data-theme="light"] .compound-workflow-conversation-bar .waterfall-chat-conversation-action:focus-visible {
  background: rgba(124, 58, 237, 0.08);
  color: #5b21b6;
}

.compound-workflow-asset-panel .compound-workflow-conversation-bar.waterfall-chat-conversations {
  align-items: flex-end;
  gap: 0;
  min-height: 44px;
  padding: 0 108px 0 0;
  border-bottom: 2px solid rgba(226, 232, 240, 0.92);
  background: #ffffff;
}

.compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-tabs {
  align-self: stretch;
  align-items: flex-end;
  gap: 0;
  padding-bottom: 0;
}

.compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 44px;
  min-width: 74px;
  max-width: 188px;
  margin-bottom: -2px;
  padding: 10px 20px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: rgba(71, 85, 105, 0.7);
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
  transition:
    color 180ms ease,
    border-bottom-color 180ms ease;
  user-select: none;
}

.compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-tab::after {
  position: absolute;
  right: 14px;
  bottom: -2px;
  left: 14px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: transparent;
  content: "";
}

.compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-tab:hover,
.compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-tab:focus-visible {
  color: #18142b;
  outline: none;
}

.compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-tab.is-active {
  border-bottom-color: #7d55ff;
  background: transparent;
  color: #7d55ff;
  box-shadow: none;
}

.compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-tab.is-active::after {
  background: #7d55ff;
}

.compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-action {
  flex: 0 0 30px;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  margin-bottom: 7px;
  border: 0;
  background: transparent;
  color: rgba(91, 33, 182, 0.76);
  box-shadow: none;
}

.compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-action:hover,
.compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-action:focus-visible {
  background: rgba(124, 58, 237, 0.08);
  color: #5b21b6;
  outline: none;
}

.compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-action.is-confirming-delete {
  border: 0;
  background: rgba(220, 38, 38, 0.9);
  color: #ffffff;
}

body[data-theme="light"] .compound-workflow-asset-panel .compound-workflow-conversation-bar.waterfall-chat-conversations {
  border-bottom-color: rgba(226, 232, 240, 0.92);
  background: #ffffff;
}

body[data-theme="light"] .compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-tab {
  border-color: transparent;
  background: transparent;
  color: rgba(71, 85, 105, 0.7);
  box-shadow: none;
}

body[data-theme="light"] .compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-tab:hover,
body[data-theme="light"] .compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-tab:focus-visible {
  color: #18142b;
}

body[data-theme="light"] .compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-tab.is-active {
  border-bottom-color: #7d55ff;
  background: transparent;
  color: #7d55ff;
  box-shadow: none;
}

body[data-theme="light"] .compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-action {
  border: 0;
  background: transparent;
  color: rgba(91, 33, 182, 0.76);
  box-shadow: none;
}

body[data-theme="light"] .compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-action:hover,
body[data-theme="light"] .compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-action:focus-visible {
  background: rgba(124, 58, 237, 0.08);
  color: #5b21b6;
}

body[data-theme="light"] .compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-action.is-confirming-delete {
  border: 0;
  background: rgba(220, 38, 38, 0.9);
  color: #ffffff;
}

.workflow-understanding-card {
  display: block;
  width: min(980px, 100%);
  margin: 0 auto 10px;
  padding: 16px;
  border: 1px solid rgba(124, 92, 255, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  color: #18142b;
  box-shadow: 0 16px 36px rgba(24, 20, 43, 0.1);
}

.workflow-understanding-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.workflow-understanding-header-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workflow-understanding-toggle {
  flex: 0 0 auto;
  min-width: 56px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(124, 92, 255, 0.2);
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.08);
  color: #6d4cff;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.workflow-understanding-toggle:hover {
  border-color: rgba(124, 92, 255, 0.34);
  background: rgba(124, 92, 255, 0.13);
  box-shadow: 0 8px 18px rgba(124, 92, 255, 0.14);
  transform: translateY(-1px);
}

.workflow-understanding-details {
  display: grid;
  gap: 12px;
  max-height: none;
  margin-top: 12px;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition:
    max-height 0.24s ease,
    margin-top 0.2s ease,
    opacity 0.18s ease,
    transform 0.2s ease;
}

.workflow-understanding-card[data-expanded="false"] .workflow-understanding-details {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
}

.workflow-understanding-eyebrow {
  color: rgba(124, 92, 255, 0.86);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.workflow-understanding-title {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #18142b;
  font-size: 1rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-understanding-summary,
.workflow-understanding-node-role,
.workflow-understanding-footer {
  margin: 0;
  color: rgba(24, 20, 43, 0.68);
  font-size: 0.82rem;
  line-height: 1.55;
}

.workflow-understanding-node-list {
  display: grid;
  gap: 9px;
}

.workflow-understanding-node {
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px solid rgba(24, 20, 43, 0.08);
  border-radius: 16px;
  background: rgba(247, 248, 253, 0.9);
}

.workflow-understanding-node-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.workflow-understanding-node-index {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c5cff, #b18bff);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
}

.workflow-understanding-node-header strong {
  min-width: 0;
  overflow: hidden;
  color: #18142b;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-understanding-contract {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  color: rgba(24, 20, 43, 0.62);
  font-size: 0.76rem;
  line-height: 1.45;
}

.workflow-understanding-contract-label {
  color: rgba(24, 20, 43, 0.42);
  font-weight: 800;
}

.workflow-understanding-contract-values {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not([data-theme="light"]) .workflow-understanding-card {
  border-color: rgba(177, 139, 255, 0.2);
  background: rgba(255, 255, 255, 0.94);
}

.workflow-session-card {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 6;
  width: min(980px, 100%);
  max-height: min(64vh, 640px);
  margin: 0 auto 10px;
  padding: 15px;
  overflow: auto;
  border: 1px solid rgba(35, 128, 164, 0.18);
  border-radius: 18px;
  background: rgba(250, 252, 255, 0.96);
  color: #172638;
  box-shadow: 0 14px 32px rgba(24, 50, 75, 0.1);
}

.workflow-session-card.is-review_output,
.workflow-session-card.is-iterate {
  border-color: rgba(55, 168, 111, 0.2);
  background: rgba(247, 255, 250, 0.96);
}

.workflow-session-card.is-blocked {
  border-color: rgba(202, 138, 4, 0.22);
  background: rgba(255, 251, 235, 0.98);
}

.workflow-session-card.is-onboarding {
  position: relative;
  top: auto;
  z-index: 1;
  align-content: start;
  gap: 22px;
  width: 100%;
  min-height: 600px;
  max-height: none;
  margin: 0;
  padding: 28px 28px 98px;
  overflow: hidden;
  border: 1px solid rgba(233, 213, 255, 0.28);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(50, 28, 112, 0.98), rgba(113, 55, 184, 0.94) 48%, rgba(196, 64, 170, 0.88)),
    linear-gradient(180deg, #43206f, #23123f);
  color: #fffaff;
  box-shadow:
    0 34px 82px rgba(36, 18, 74, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.workflow-session-card.is-onboarding .workflow-session-header {
  align-items: flex-start;
  gap: 18px;
}

.workflow-session-card.is-onboarding .workflow-session-eyebrow {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(252, 245, 255, 0.86);
  font-size: 0.78rem;
}

.workflow-session-card.is-onboarding .workflow-session-title {
  color: #ffffff;
  font-size: 2rem;
  line-height: 1.12;
  white-space: normal;
}

.workflow-session-card.is-onboarding .workflow-session-summary {
  max-width: 780px;
  color: rgba(255, 250, 255, 0.78);
  font-size: 0.96rem;
}

.workflow-session-card.is-onboarding .workflow-session-progress {
  flex: 0 0 230px;
  padding: 10px 12px;
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 250, 255, 0.72);
  font-size: 0.8rem;
}

.workflow-session-card.is-onboarding .workflow-session-flow,
.workflow-session-card.is-onboarding .workflow-session-details {
  display: none;
}

.workflow-session-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.workflow-session-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.workflow-session-card.is-onboarding .workflow-session-header-actions {
  margin-left: auto;
}

.workflow-session-card.is-onboarding .workflow-session-header-actions .workflow-session-secondary {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 250, 255, 0.88);
}

.workflow-session-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workflow-session-eyebrow {
  color: rgba(35, 128, 164, 0.86);
  font-size: 0.72rem;
  font-weight: 900;
}

.workflow-session-title {
  min-width: 0;
  overflow: hidden;
  color: #172638;
  font-size: 0.98rem;
  font-weight: 950;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-session-summary {
  margin: 0;
  color: rgba(23, 38, 56, 0.68);
  font-size: 0.82rem;
  line-height: 1.5;
}

.workflow-session-progress {
  flex: 0 1 220px;
  padding: 6px 9px;
  border: 1px solid rgba(35, 128, 164, 0.12);
  border-radius: 8px;
  background: rgba(35, 128, 164, 0.06);
  color: rgba(23, 38, 56, 0.62);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.35;
}

.workflow-session-flow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(23, 38, 56, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.workflow-session-flow-label {
  color: rgba(23, 38, 56, 0.46);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.workflow-session-flow-track {
  display: flex;
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.workflow-session-flow-step {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 1px 7px;
  width: min(210px, 72vw);
  min-height: 40px;
  padding: 6px 10px;
  overflow: hidden;
  border: 1px solid rgba(23, 38, 56, 0.08);
  border-radius: 12px;
  background: rgba(23, 38, 56, 0.05);
  color: rgba(23, 38, 56, 0.62);
  text-align: left;
  cursor: pointer;
}

.workflow-session-flow-step-index {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(23, 38, 56, 0.1);
  color: rgba(23, 38, 56, 0.72);
  font-size: 0.68rem;
  font-weight: 950;
}

.workflow-session-flow-step-name,
.workflow-session-flow-step-state {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-session-flow-step-name {
  color: inherit;
  font-size: 0.73rem;
  font-weight: 900;
  line-height: 1.2;
}

.workflow-session-flow-step-state {
  color: rgba(23, 38, 56, 0.44);
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.2;
}

.workflow-session-flow-step.is-active {
  border-color: rgba(35, 128, 164, 0.32);
  background: rgba(35, 128, 164, 0.12);
  color: #172638;
}

.workflow-session-flow-step.is-active .workflow-session-flow-step-index {
  background: #2380a4;
  color: #ffffff;
}

.workflow-session-flow-step.is-done {
  border-color: rgba(55, 168, 111, 0.26);
  color: rgba(28, 112, 68, 0.86);
}

.workflow-session-flow-step.is-done .workflow-session-flow-step-index {
  background: rgba(55, 168, 111, 0.16);
  color: rgba(28, 112, 68, 0.9);
}

.workflow-session-details {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(23, 38, 56, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.workflow-session-step-assets {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(23, 38, 56, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.workflow-session-step-assets-header,
.workflow-session-step-asset-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.workflow-session-step-assets-title,
.workflow-session-step-asset-group-title {
  min-width: 0;
  overflow: hidden;
  color: #172638;
  font-size: 0.78rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-session-step-assets-summary,
.workflow-session-step-asset-count {
  flex: 0 0 auto;
  color: rgba(23, 38, 56, 0.48);
  font-size: 0.7rem;
  font-weight: 850;
  white-space: nowrap;
}

.workflow-session-step-assets-list {
  display: grid;
  gap: 10px;
}

.workflow-session-step-asset-group {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(23, 38, 56, 0.07);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.76);
}

.workflow-session-step-asset-grid.workflow-asset-grid {
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 10px;
}

.workflow-session-step-asset-grid .workflow-asset-preview {
  border-radius: 8px;
}

.workflow-session-step-asset-grid .workflow-asset-title {
  font-size: 0.72rem;
}

.workflow-session-guide {
  display: grid;
  gap: 12px;
  min-height: 0;
  padding-top: 2px;
}

.workflow-session-card.is-onboarding .workflow-session-guide {
  gap: 0;
  min-height: 0;
}

.workflow-session-guide-header {
  display: grid;
  gap: 3px;
}

.workflow-session-guide-title {
  color: #172638;
  font-size: 0.88rem;
  font-weight: 950;
}

.workflow-session-card.is-onboarding .workflow-session-guide-title {
  font-size: 1.06rem;
}

.workflow-session-guide-summary {
  margin: 0;
  color: rgba(23, 38, 56, 0.66);
  font-size: 0.78rem;
  line-height: 1.5;
}

.workflow-session-guide-primer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.workflow-session-card.is-onboarding .workflow-session-guide-primer {
  display: none;
}

.workflow-session-guide-primer-card {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  min-height: 92px;
  padding: 12px 14px;
  border: 1px solid rgba(23, 38, 56, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 22px rgba(24, 50, 75, 0.07);
}

.workflow-session-guide-primer-label {
  color: rgba(23, 38, 56, 0.48);
  font-size: 0.72rem;
  font-weight: 950;
}

.workflow-session-guide-primer-value {
  margin: 0;
  color: rgba(23, 38, 56, 0.74);
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.48;
}

.workflow-session-guide-list {
  display: flex;
  gap: 12px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}

.workflow-session-card.is-onboarding .workflow-session-guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  align-items: stretch;
  gap: 18px;
  min-height: 360px;
  max-height: min(58vh, 660px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 6px 4px 18px;
}

.workflow-session-guide-step {
  --workflow-guide-tone: #2380a4;
  --workflow-guide-bg: rgba(35, 128, 164, 0.06);
  display: grid;
  align-content: start;
  gap: 10px;
  flex: 0 0 min(286px, 82vw);
  min-height: 220px;
  padding: 12px;
  border: 1px solid rgba(23, 38, 56, 0.08);
  border-top: 4px solid var(--workflow-guide-tone);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.68)),
    var(--workflow-guide-bg);
  box-shadow: 0 12px 24px rgba(24, 50, 75, 0.08);
  opacity: 0;
  transform: rotate(var(--workflow-card-tilt, 0deg)) translateY(6px);
  animation: workflow-guide-card-in 180ms ease forwards;
  animation-delay: calc(var(--workflow-card-index, 0) * 45ms);
}

.workflow-session-card.is-onboarding .workflow-session-guide-step {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  flex: none;
  min-height: 288px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top-width: 1px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 24px 42px rgba(33, 16, 68, 0.2),
    0 3px 0 rgba(255, 255, 255, 0.58) inset;
}

.workflow-session-guide-step.is-active {
  border-color: color-mix(in srgb, var(--workflow-guide-tone) 42%, rgba(23, 38, 56, 0.08));
  border-top-color: var(--workflow-guide-tone);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72)),
    var(--workflow-guide-bg);
}

.workflow-session-guide-step.tone-1 {
  --workflow-guide-tone: #2380a4;
  --workflow-guide-bg: rgba(35, 128, 164, 0.08);
}

.workflow-session-guide-step.tone-2 {
  --workflow-guide-tone: #37a86f;
  --workflow-guide-bg: rgba(55, 168, 111, 0.08);
}

.workflow-session-guide-step.tone-3 {
  --workflow-guide-tone: #8b5cf6;
  --workflow-guide-bg: rgba(139, 92, 246, 0.08);
}

.workflow-session-guide-step.tone-4 {
  --workflow-guide-tone: #d97706;
  --workflow-guide-bg: rgba(217, 119, 6, 0.08);
}

.workflow-session-guide-step.tone-5 {
  --workflow-guide-tone: #dc4a6a;
  --workflow-guide-bg: rgba(220, 74, 106, 0.08);
}

.workflow-session-guide-step.tone-6 {
  --workflow-guide-tone: #2563eb;
  --workflow-guide-bg: rgba(37, 99, 235, 0.08);
}

.workflow-session-card.is-onboarding .workflow-session-guide-step.tone-1 {
  --workflow-guide-tone: #8b5cf6;
  --workflow-guide-bg: rgba(139, 92, 246, 0.2);
}

.workflow-session-card.is-onboarding .workflow-session-guide-step.tone-2 {
  --workflow-guide-tone: #ec4899;
  --workflow-guide-bg: rgba(236, 72, 153, 0.18);
}

.workflow-session-card.is-onboarding .workflow-session-guide-step.tone-3 {
  --workflow-guide-tone: #06b6d4;
  --workflow-guide-bg: rgba(6, 182, 212, 0.17);
}

.workflow-session-card.is-onboarding .workflow-session-guide-step.tone-4 {
  --workflow-guide-tone: #a855f7;
  --workflow-guide-bg: rgba(168, 85, 247, 0.18);
}

.workflow-session-card.is-onboarding .workflow-session-guide-step.tone-5 {
  --workflow-guide-tone: #f97316;
  --workflow-guide-bg: rgba(249, 115, 22, 0.16);
}

.workflow-session-card.is-onboarding .workflow-session-guide-step.tone-6 {
  --workflow-guide-tone: #7c3aed;
  --workflow-guide-bg: rgba(124, 58, 237, 0.18);
}

.workflow-session-guide-step-header {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.workflow-session-guide-step-visual {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.workflow-session-card.is-onboarding .workflow-session-guide-step-visual {
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 126px;
  padding: 20px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--workflow-guide-tone) 72%, #ffffff), color-mix(in srgb, var(--workflow-guide-tone) 36%, #ffffff)),
    var(--workflow-guide-bg);
}

.workflow-session-guide-step-index {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #2380a4;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
}

.workflow-session-card.is-onboarding .workflow-session-guide-step-index {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.9);
  color: color-mix(in srgb, var(--workflow-guide-tone) 74%, #172638);
  font-size: 0.9rem;
  box-shadow: 0 12px 24px color-mix(in srgb, var(--workflow-guide-tone) 30%, transparent);
}

.workflow-session-guide-step-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.workflow-session-card.is-onboarding .workflow-session-guide-step-icon {
  justify-self: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 30px rgba(23, 38, 56, 0.12);
}

.workflow-session-guide-step-body {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.workflow-session-card.is-onboarding .workflow-session-guide-step-body {
  padding: 18px 20px 16px;
}

.workflow-session-guide-step-heading {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workflow-session-guide-step-heading strong {
  min-width: 0;
  overflow: hidden;
  color: #172638;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-session-card.is-onboarding .workflow-session-guide-step-heading strong {
  font-size: 1.14rem;
  line-height: 1.2;
  white-space: normal;
}

.workflow-session-guide-step-status {
  min-width: 0;
  overflow: hidden;
  color: rgba(23, 38, 56, 0.48);
  font-size: 0.68rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-session-card.is-onboarding .workflow-session-guide-step-status {
  justify-self: end;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: color-mix(in srgb, var(--workflow-guide-tone) 72%, #172638);
  font-size: 0.76rem;
}

.workflow-session-guide-step-role,
.workflow-session-guide-step-next,
.workflow-session-guide-step-positioning,
.workflow-session-guide-step-description {
  margin: 0;
  color: rgba(23, 38, 56, 0.66);
  font-size: 0.76rem;
  line-height: 1.45;
}

.workflow-session-card.is-onboarding .workflow-session-guide-step-role,
.workflow-session-card.is-onboarding .workflow-session-guide-step-next,
.workflow-session-card.is-onboarding .workflow-session-guide-step-positioning,
.workflow-session-card.is-onboarding .workflow-session-guide-step-description {
  color: rgba(23, 38, 56, 0.72);
  font-size: 0.9rem;
  line-height: 1.55;
}

.workflow-session-card.is-onboarding .workflow-session-guide-step-positioning {
  width: fit-content;
  max-width: 100%;
  padding: 7px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--workflow-guide-tone) 16%, #ffffff);
  color: color-mix(in srgb, var(--workflow-guide-tone) 72%, #172638);
  font-size: 0.84rem;
  font-weight: 950;
}

.workflow-session-card.is-onboarding .workflow-session-guide-step-description {
  color: rgba(23, 38, 56, 0.74);
  font-weight: 720;
}

.workflow-session-card.is-onboarding .workflow-session-guide-step-next {
  display: none;
}

.workflow-session-guide-step-meta {
  display: grid;
  gap: 5px;
}

.workflow-session-card.is-onboarding .workflow-session-guide-step-meta {
  gap: 8px;
}

.workflow-session-card.is-onboarding .workflow-session-guide-step .workflow-understanding-contract {
  grid-template-columns: 48px minmax(0, 1fr);
  padding: 7px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.56);
  font-size: 0.8rem;
}

.workflow-session-usage-flow {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.workflow-session-usage-flow-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.workflow-session-usage-flow-title {
  color: #ffffff;
  font-size: 1.06rem;
  font-weight: 950;
  line-height: 1.2;
}

.workflow-session-usage-flow-summary {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 250, 255, 0.72);
  font-size: 0.84rem;
  font-weight: 680;
  line-height: 1.5;
  text-align: right;
}

.workflow-session-usage-flow-list {
  display: flex;
  gap: 12px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.workflow-session-usage-flow-card {
  --workflow-guide-tone: #8b5cf6;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  flex: 0 0 clamp(218px, 24vw, 286px);
  gap: 11px;
  min-height: 132px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 18px 34px rgba(24, 10, 54, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  opacity: 0;
  transform: translateY(6px);
  animation: workflow-usage-card-in 180ms ease forwards;
  animation-delay: calc(var(--workflow-card-index, 0) * 45ms);
  scroll-snap-align: start;
}

.workflow-session-usage-flow-card.tone-1 {
  --workflow-guide-tone: #8b5cf6;
}

.workflow-session-usage-flow-card.tone-2 {
  --workflow-guide-tone: #ec4899;
}

.workflow-session-usage-flow-card.tone-3 {
  --workflow-guide-tone: #06b6d4;
}

.workflow-session-usage-flow-card.tone-4 {
  --workflow-guide-tone: #a855f7;
}

.workflow-session-usage-flow-card.tone-5 {
  --workflow-guide-tone: #f97316;
}

.workflow-session-usage-flow-card.tone-6 {
  --workflow-guide-tone: #22c55e;
}

.workflow-session-usage-flow-marker {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--workflow-guide-tone) 16%, #ffffff);
  color: color-mix(in srgb, var(--workflow-guide-tone) 78%, #172638);
  font-size: 0.82rem;
  font-weight: 950;
  box-shadow: 0 10px 20px color-mix(in srgb, var(--workflow-guide-tone) 18%, transparent);
}

.workflow-session-usage-flow-body {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.workflow-session-usage-flow-card-title {
  min-width: 0;
  overflow: hidden;
  color: #172638;
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-session-usage-flow-card-summary {
  display: -webkit-box;
  min-height: 42px;
  margin: 0;
  overflow: hidden;
  color: rgba(23, 38, 56, 0.7);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.workflow-session-usage-flow-card-meta {
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--workflow-guide-tone) 12%, #ffffff);
  color: color-mix(in srgb, var(--workflow-guide-tone) 74%, #172638);
  font-size: 0.68rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes workflow-guide-card-in {
  to {
    opacity: 1;
    transform: rotate(var(--workflow-card-tilt, 0deg)) translateY(0);
  }
}

@keyframes workflow-usage-card-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.workflow-session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workflow-session-card.is-onboarding .workflow-session-actions {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 8;
  justify-content: flex-end;
  padding-top: 0;
}

.workflow-session-primary,
.workflow-session-secondary {
  min-height: 32px;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.workflow-session-primary {
  background: #2380a4;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(35, 128, 164, 0.2);
}

.workflow-session-card.is-onboarding .workflow-session-primary.is-start-using {
  min-height: 58px;
  min-width: 220px;
  padding: 14px 34px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(135deg, #ffffff, #fff1c2 42%, #ffd2ee);
  color: #4c1d95;
  font-size: 1rem;
  box-shadow:
    0 24px 48px rgba(24, 10, 54, 0.36),
    0 0 0 8px rgba(255, 255, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.workflow-session-card.is-onboarding .workflow-session-primary.is-start-using:hover,
.workflow-session-card.is-onboarding .workflow-session-primary.is-start-using:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 30px 58px rgba(24, 10, 54, 0.42),
    0 0 0 10px rgba(255, 255, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  outline: none;
}

.workflow-session-secondary {
  background: rgba(23, 38, 56, 0.07);
  color: rgba(23, 38, 56, 0.68);
}

.workflow-session-primary:disabled,
.workflow-session-secondary:disabled {
  opacity: 0.48;
  cursor: default;
  box-shadow: none;
}

.workflow-phase-card {
  display: grid;
  gap: 14px;
  width: min(980px, 100%);
  margin: 0 auto 10px;
  padding: 14px;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: #172033;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.workflow-phase-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.workflow-phase-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workflow-phase-eyebrow {
  color: rgba(79, 70, 229, 0.78);
  font-size: 0.7rem;
  font-weight: 950;
}

.workflow-phase-title {
  color: #111827;
  font-size: 0.94rem;
  font-weight: 950;
  line-height: 1.28;
}

.workflow-phase-summary,
.workflow-phase-detail-summary {
  margin: 0;
  color: rgba(51, 65, 85, 0.68);
  font-size: 0.78rem;
  line-height: 1.5;
}

.workflow-phase-rail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.72);
}

.workflow-phase-step {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 7px;
  min-width: 0;
  min-height: 52px;
  padding: 9px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
}

.workflow-phase-step + .workflow-phase-step {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.workflow-phase-step::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 0;
  bottom: 0;
  z-index: 0;
  width: 2px;
  background: rgba(148, 163, 184, 0.24);
}

.workflow-phase-step:first-child::before {
  top: 50%;
}

.workflow-phase-step:last-child::before {
  bottom: 50%;
}

.workflow-phase-step.is-active {
  background: rgba(238, 242, 255, 0.92);
}

.workflow-phase-step.is-running {
  background: rgba(240, 249, 255, 0.94);
}

.workflow-phase-step.is-waiting_confirmation,
.workflow-phase-step.is-stale {
  background: rgba(255, 251, 235, 0.94);
}

.workflow-phase-step.is-done {
  background: rgba(240, 253, 244, 0.94);
}

.workflow-phase-step.is-failed {
  background: rgba(254, 242, 242, 0.96);
}

.workflow-phase-step-number {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 950;
}

.workflow-phase-step.is-active .workflow-phase-step-number,
.workflow-phase-step.is-running .workflow-phase-step-number {
  background: #4f46e5;
  color: #ffffff;
}

.workflow-phase-step.is-done .workflow-phase-step-number {
  background: #16a34a;
  color: #ffffff;
}

.workflow-phase-step.is-waiting_confirmation .workflow-phase-step-number,
.workflow-phase-step.is-stale .workflow-phase-step-number {
  background: #d97706;
  color: #ffffff;
}

.workflow-phase-step.is-failed .workflow-phase-step-number {
  background: #dc2626;
  color: #ffffff;
}

.workflow-phase-step-name,
.workflow-phase-step-status {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-phase-step-name {
  color: #1f2937;
  font-size: 0.76rem;
  font-weight: 900;
}

.workflow-phase-step-status {
  justify-self: end;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  color: rgba(71, 85, 105, 0.64);
  font-size: 0.68rem;
  font-weight: 820;
}

.workflow-phase-detail {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.74);
}

.workflow-phase-detail-title {
  color: #111827;
  font-size: 0.84rem;
  font-weight: 950;
}

.workflow-phase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workflow-phase-primary,
.workflow-phase-secondary {
  min-height: 32px;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.workflow-phase-primary {
  background: #4f46e5;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

.workflow-phase-secondary {
  background: rgba(15, 23, 42, 0.07);
  color: rgba(30, 41, 59, 0.72);
}

.workflow-phase-primary:disabled,
.workflow-phase-secondary:disabled {
  opacity: 0.48;
  cursor: default;
  box-shadow: none;
}

@media (max-width: 680px) {
  .workflow-launch-overlay {
    padding: 12px;
  }

  .workflow-launch-modal {
    max-height: 94%;
    padding: 16px;
    border-radius: 14px;
  }

  .workflow-launch-actions {
    flex-direction: column-reverse;
  }

  .workflow-launch-primary,
  .workflow-launch-secondary,
  .workflow-phase-primary,
  .workflow-phase-secondary {
    width: 100%;
  }

  .workflow-phase-header,
  .workflow-phase-actions {
    flex-direction: column;
  }

  .workflow-phase-rail {
    grid-template-columns: 1fr;
  }

  .workflow-asset-detail-info {
    left: 14px;
    right: 14px;
    bottom: 14px;
    max-width: none;
  }
}

.workflow-intent-card {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 13px;
  border: 1px solid rgba(124, 92, 255, 0.14);
  border-radius: 18px;
  background: rgba(248, 249, 253, 0.94);
  color: #18142b;
}

.workflow-intent-card.is-error {
  border-color: rgba(219, 68, 68, 0.22);
  background: rgba(255, 246, 246, 0.96);
}

.workflow-intent-card.is-applied,
.workflow-intent-card.is-completed {
  border-color: rgba(55, 168, 111, 0.22);
  background: rgba(246, 255, 250, 0.96);
}

.workflow-intent-card.is-cancelled {
  opacity: 0.78;
}

.workflow-intent-title {
  color: #261c4c;
  font-size: 0.88rem;
  font-weight: 950;
}

.workflow-intent-summary,
.workflow-intent-missing {
  margin: 0;
  color: rgba(24, 20, 43, 0.68);
  font-size: 0.8rem;
  line-height: 1.5;
}

.workflow-intent-change-list {
  display: grid;
  gap: 8px;
}

.workflow-intent-change {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid rgba(24, 20, 43, 0.07);
  border-radius: 14px;
  background: #ffffff;
}

.workflow-intent-change-main {
  color: #18142b;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.42;
}

.workflow-intent-change-meta {
  color: rgba(24, 20, 43, 0.48);
  font-size: 0.72rem;
  line-height: 1.35;
}

.workflow-style-summary-card {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: rgba(250, 253, 252, 0.96);
  color: #172033;
}

.workflow-style-summary-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.workflow-style-summary-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workflow-style-summary-title strong {
  color: #12312f;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.3;
}

.workflow-style-summary-title span {
  color: rgba(51, 65, 85, 0.76);
  font-size: 0.74rem;
  line-height: 1.35;
}

.workflow-style-summary-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: rgba(236, 253, 245, 0.8);
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.workflow-style-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 8px;
}

.workflow-style-summary-item {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(71, 85, 105, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.workflow-style-summary-item span {
  color: rgba(51, 65, 85, 0.78);
  font-size: 0.7rem;
  line-height: 1.25;
}

.workflow-style-summary-item strong {
  color: #172033;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.workflow-style-summary-note {
  margin: 0;
  padding: 8px 9px;
  border: 1px solid rgba(71, 85, 105, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: rgba(30, 41, 59, 0.82);
  font-size: 0.74rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.workflow-execution-card {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(72, 99, 132, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #172033;
}

.workflow-execution-card.is-running {
  border-color: rgba(37, 99, 235, 0.2);
  background: rgba(248, 251, 255, 0.98);
}

.workflow-execution-card.is-pending {
  border-color: rgba(217, 119, 6, 0.24);
  background: rgba(255, 251, 235, 0.96);
}

.workflow-execution-card.is-completed {
  border-color: rgba(22, 163, 74, 0.22);
  background: rgba(247, 254, 251, 0.96);
}

.workflow-execution-card.is-failed {
  border-color: rgba(220, 38, 38, 0.22);
  background: rgba(254, 242, 242, 0.96);
}

.workbench-run-plan-card {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: rgba(248, 253, 252, 0.98);
  color: #172033;
}

.workbench-run-plan-card.is-pending {
  border-color: rgba(217, 119, 6, 0.24);
  background: rgba(255, 251, 235, 0.97);
}

.workbench-run-plan-card.is-failed {
  border-color: rgba(220, 38, 38, 0.22);
  background: rgba(254, 242, 242, 0.97);
}

.workbench-run-plan-card.is-ready,
.workbench-run-plan-card.is-completed {
  border-color: rgba(22, 163, 74, 0.22);
  background: rgba(247, 254, 251, 0.98);
}

.workbench-run-plan-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.workbench-run-plan-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.workbench-run-plan-eyebrow {
  color: rgba(15, 118, 110, 0.78);
  font-size: 0.68rem;
  font-weight: 950;
}

.workbench-run-plan-title {
  color: #10243f;
  font-size: 0.88rem;
  font-weight: 950;
  line-height: 1.28;
}

.workbench-run-plan-summary {
  margin: 0;
  color: rgba(51, 65, 85, 0.72);
  font-size: 0.76rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.workbench-run-plan-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 999px;
  background: rgba(240, 253, 250, 0.86);
  color: #0f766e;
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}

.workbench-run-plan-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 7px;
}

.workbench-run-plan-metric,
.workbench-run-plan-tool {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(71, 85, 105, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.workbench-run-plan-metric {
  display: grid;
  gap: 3px;
}

.workbench-run-plan-metric span {
  color: rgba(71, 85, 105, 0.68);
  font-size: 0.68rem;
  font-weight: 800;
}

.workbench-run-plan-metric strong {
  min-width: 0;
  overflow: hidden;
  color: #172033;
  font-size: 0.76rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-run-plan-list {
  display: grid;
  gap: 7px;
}

.workbench-run-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.workbench-run-plan-action {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: rgba(240, 253, 250, 0.9);
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
}

.workbench-run-plan-action:hover:not(:disabled) {
  border-color: rgba(15, 118, 110, 0.3);
  background: rgba(204, 251, 241, 0.9);
}

.workbench-run-plan-action:disabled {
  cursor: default;
  opacity: 0.48;
}

.workbench-run-plan-tool {
  display: grid;
  gap: 3px;
}

.workbench-run-plan-tool.is-blocker {
  border-color: rgba(220, 38, 38, 0.18);
  background: rgba(255, 247, 247, 0.88);
}

.workbench-run-plan-tool.is-skill {
  border-color: rgba(37, 99, 235, 0.14);
  background: rgba(239, 246, 255, 0.72);
}

.workbench-run-plan-tool.is-current-object {
  border-color: rgba(14, 116, 144, 0.2);
  background: rgba(236, 254, 255, 0.86);
}

.workbench-run-plan-tool.is-run-progress {
  border-color: rgba(15, 118, 110, 0.16);
  background: rgba(240, 253, 250, 0.78);
}

.workbench-run-plan-tool.is-run-step {
  position: relative;
  padding-left: 12px;
}

.workbench-run-plan-tool.is-run-step::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 6px;
  width: 3px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.8);
  content: "";
}

.workbench-run-plan-tool.is-run-step.is-done::before {
  background: rgba(22, 163, 74, 0.84);
}

.workbench-run-plan-tool.is-run-step.is-running::before {
  background: rgba(2, 132, 199, 0.84);
}

.workbench-run-plan-tool.is-run-step.is-waiting::before,
.workbench-run-plan-tool.is-run-step.is-pending::before,
.workbench-run-plan-tool.is-run-step.is-queued::before {
  background: rgba(217, 119, 6, 0.86);
}

.workbench-run-plan-tool.is-run-step.is-failed::before {
  background: rgba(220, 38, 38, 0.84);
}

.workbench-run-plan-tool strong {
  color: #172033;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.workbench-run-plan-tool span {
  color: rgba(51, 65, 85, 0.68);
  font-size: 0.72rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.workflow-execution-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.workflow-execution-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.workflow-execution-eyebrow {
  color: rgba(71, 85, 105, 0.72);
  font-size: 0.68rem;
  font-weight: 950;
}

.workflow-execution-title {
  color: #111827;
  font-size: 0.88rem;
  font-weight: 950;
  line-height: 1.28;
}

.workflow-execution-summary {
  margin: 0;
  color: rgba(51, 65, 85, 0.68);
  font-size: 0.76rem;
  line-height: 1.45;
}

.workflow-execution-list {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.72);
}

.workflow-execution-step {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 50px;
  padding: 9px 10px;
}

.workflow-execution-step:has(.workflow-execution-step-assets),
.workflow-execution-step:has(.workflow-execution-step-output) {
  align-items: start;
}

.workflow-execution-step + .workflow-execution-step {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.workflow-execution-step.is-running {
  background: rgba(239, 246, 255, 0.9);
}

.workflow-execution-step.is-waiting,
.workflow-execution-step.is-stale {
  background: rgba(255, 251, 235, 0.92);
}

.workflow-execution-step.is-done {
  background: rgba(240, 253, 244, 0.9);
}

.workflow-execution-step.is-failed {
  background: rgba(254, 242, 242, 0.94);
}

.workflow-execution-step-number {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 950;
}

.workflow-execution-step.is-running .workflow-execution-step-number {
  background: #2563eb;
  color: #ffffff;
}

.workflow-execution-step.is-waiting .workflow-execution-step-number,
.workflow-execution-step.is-stale .workflow-execution-step-number {
  background: #d97706;
  color: #ffffff;
}

.workflow-execution-step.is-done .workflow-execution-step-number {
  background: #16a34a;
  color: #ffffff;
}

.workflow-execution-step.is-failed .workflow-execution-step-number {
  background: #dc2626;
  color: #ffffff;
}

.workflow-execution-step-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workflow-execution-step-title,
.workflow-execution-step-summary,
.workflow-execution-step-status {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-execution-step-title {
  color: #1f2937;
  font-size: 0.78rem;
  font-weight: 900;
}

.workflow-execution-step-summary {
  color: rgba(71, 85, 105, 0.62);
  font-size: 0.7rem;
  font-weight: 720;
}

.workflow-execution-step-status {
  justify-self: end;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: rgba(51, 65, 85, 0.68);
  font-size: 0.68rem;
  font-weight: 860;
}

.workflow-execution-step-assets {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
  padding-top: 4px;
}

.workflow-execution-step-output {
  grid-column: 2 / -1;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.workflow-execution-step-output-label {
  color: rgba(71, 85, 105, 0.62);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.workflow-execution-step-output-text {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: rgba(30, 41, 59, 0.82);
  font-size: 0.72rem;
  font-weight: 680;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  white-space: pre-wrap;
}

.workflow-execution-step-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 7px;
  min-width: 0;
}

.workflow-execution-step-source {
  max-width: min(100%, 240px);
  overflow: hidden;
  color: #2563eb;
  font-size: 0.7rem;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.workflow-execution-step-source {
  text-decoration: underline;
  text-underline-offset: 2px;
}

a.workflow-execution-step-source:hover,
a.workflow-execution-step-source:focus-visible {
  color: #1d4ed8;
}

.workflow-execution-step-asset-link {
  min-width: 0;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #2563eb;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 850;
  text-align: left;
  text-decoration: underline;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.workflow-execution-step-asset-link:hover,
.workflow-execution-step-asset-link:focus-visible {
  color: #1d4ed8;
}

.workflow-execution-step-assets .workflow-asset-item {
  flex: 0 1 132px;
}

.workflow-execution-step-assets .workflow-asset-preview {
  border-radius: 8px;
}

.workflow-execution-step-assets .workflow-asset-title {
  font-size: 0.72rem;
}

.workflow-execution-more {
  color: rgba(71, 85, 105, 0.55);
  font-size: 0.72rem;
  font-weight: 760;
}

.workflow-next-suggestions-card {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 8px;
  background: rgba(247, 254, 252, 0.96);
  color: #172033;
}

.workflow-next-suggestions-card.is-running {
  border-color: rgba(99, 102, 241, 0.18);
  background: rgba(248, 250, 255, 0.96);
}

.workflow-next-suggestions-title {
  color: #111827;
  font-size: 0.88rem;
  font-weight: 950;
  line-height: 1.28;
}

.workflow-next-suggestions-summary {
  margin: 0;
  color: rgba(51, 65, 85, 0.68);
  font-size: 0.76rem;
  line-height: 1.45;
}

.workflow-next-suggestions-list {
  display: grid;
  gap: 8px;
}

.workflow-next-suggestion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
}

.workflow-next-suggestion-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.workflow-next-suggestion-title,
.workflow-next-suggestion-summary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workflow-next-suggestion-title {
  color: #172033;
  font-size: 0.8rem;
  font-weight: 920;
  line-height: 1.32;
  white-space: nowrap;
}

.workflow-next-suggestion-summary {
  margin: 0;
  color: rgba(71, 85, 105, 0.64);
  font-size: 0.72rem;
  font-weight: 720;
  line-height: 1.4;
}

.workflow-next-suggestion-action {
  min-height: 30px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(15, 118, 110, 0.16);
}

.workflow-next-suggestion-action:disabled {
  opacity: 0.48;
  cursor: default;
  box-shadow: none;
}

.workflow-checkpoint-compact {
  display: grid;
  gap: 2px;
  margin-top: 6px;
  color: rgba(24, 20, 43, 0.68);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.45;
}

.workflow-checkpoint-compact-line {
  display: flex;
  align-items: baseline;
  min-width: 0;
}

.workflow-checkpoint-compact-title {
  min-width: 0;
  max-width: min(260px, 68%);
  overflow: hidden;
  color: rgba(24, 20, 43, 0.78);
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-checkpoint-compact-status {
  color: rgba(24, 20, 43, 0.62);
  white-space: nowrap;
}

.workflow-checkpoint-compact-line.is-completed .workflow-checkpoint-compact-status {
  color: rgba(34, 132, 83, 0.9);
}

.workflow-checkpoint-compact-line.is-blocked .workflow-checkpoint-compact-status,
.workflow-checkpoint-compact-line.is-waiting_input .workflow-checkpoint-compact-status {
  color: rgba(180, 83, 9, 0.92);
}

.workflow-checkpoint-compact-line.is-failed .workflow-checkpoint-compact-status,
.workflow-checkpoint-compact-line.is-error .workflow-checkpoint-compact-status {
  color: rgba(185, 28, 28, 0.9);
}

.workflow-checkpoint-compact-more {
  color: rgba(24, 20, 43, 0.48);
  font-size: 0.72rem;
}

.workflow-control-panel-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.workflow-control-panel-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: rgba(24, 20, 43, 0.72);
  font-size: 0.76rem;
  font-weight: 850;
}

.workflow-control-panel-field input,
.workflow-control-panel-field select,
.workflow-control-panel-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(24, 20, 43, 0.12);
  border-radius: 8px;
  background: #ffffff;
  color: #18142b;
  font: inherit;
  font-weight: 700;
  box-sizing: border-box;
}

.workflow-control-panel-field textarea {
  min-height: 72px;
  resize: vertical;
}

.workflow-control-panel-field small {
  color: rgba(24, 20, 43, 0.48);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.35;
}

.workflow-action-card {
  border-color: rgba(35, 128, 164, 0.2);
  background: rgba(247, 252, 254, 0.96);
}

.workflow-action-list {
  display: grid;
  gap: 10px;
}

.workflow-action-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
}

.workflow-action-item-title {
  color: #172033;
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1.35;
}

.workflow-action-item-summary {
  margin: 0;
  color: rgba(30, 41, 59, 0.64);
  font-size: 0.76rem;
  line-height: 1.45;
}

.workflow-action-fields {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.workflow-action-field input[type="file"] {
  padding: 7px 8px;
}

.workflow-action-instructions {
  margin: 0;
  padding-left: 18px;
  color: rgba(30, 41, 59, 0.58);
  font-size: 0.74rem;
  font-weight: 720;
  line-height: 1.45;
}

.workflow-action-item-actions {
  padding-top: 0;
}

.workflow-asset-stage {
  display: grid;
  gap: 12px;
  width: min(980px, 100%);
  margin: 0 auto 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #18142b;
  box-shadow: none;
}

.workflow-asset-stage.has-assets {
  border-color: transparent;
  background: transparent;
}

.workflow-asset-stage-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.workflow-asset-stage-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.workflow-asset-stage-title {
  color: #18142b;
  font-size: 0.9rem;
  font-weight: 950;
}

.workflow-asset-stage-summary {
  margin: 0;
  color: rgba(24, 20, 43, 0.58);
  font-size: 0.78rem;
  line-height: 1.5;
}

.workflow-asset-stage-grid {
  max-height: min(36vh, 360px);
  overflow: auto;
  padding-right: 2px;
}

.workflow-asset-stage-empty {
  min-height: 88px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px dashed rgba(24, 20, 43, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  color: rgba(24, 20, 43, 0.52);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.45;
  text-align: center;
}

.workflow-asset-gallery {
  gap: 12px;
}

.workflow-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  align-items: start;
  gap: 12px;
}

.workflow-asset-item {
  position: relative;
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.workflow-asset-preview {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: var(--asset-aspect-ratio, 1.333);
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.06);
  color: rgba(24, 20, 43, 0.5);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.workflow-asset-item.is-pending .workflow-asset-preview {
  --asset-aspect-ratio: 1.05;
  cursor: progress;
  min-height: 170px;
  background: transparent;
}

.workflow-asset-pending {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 170px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(100, 116, 139, 0.36);
  border-radius: inherit;
  background:
    linear-gradient(45deg, rgba(100, 116, 139, 0.24) 25%, transparent 25%, transparent 75%, rgba(100, 116, 139, 0.24) 75%),
    linear-gradient(45deg, rgba(100, 116, 139, 0.24) 25%, transparent 25%, transparent 75%, rgba(100, 116, 139, 0.24) 75%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.46), rgba(203, 213, 225, 0.44));
  background-color: rgba(226, 232, 240, 0.42);
  background-position: 0 0, 11px 11px, 0 0;
  background-size: 22px 22px, 22px 22px, 100% 100%;
  box-sizing: border-box;
  backdrop-filter: blur(10px);
}

.workflow-asset-pending::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(148, 163, 184, 0.1));
  box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.18);
}

.workflow-asset-pending::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 16%, rgba(255, 255, 255, 0.45), transparent 36%);
  pointer-events: none;
}

.workflow-asset-pending-frame {
  position: absolute;
  inset: 10px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.56);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(148, 163, 184, 0.14)),
    rgba(226, 232, 240, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    0 18px 42px rgba(15, 23, 42, 0.13);
}

.workflow-asset-pending-sheen {
  position: absolute;
  inset: -36%;
  background: linear-gradient(115deg, transparent 34%, rgba(255, 255, 255, 0.78) 50%, transparent 66%);
  animation: workflow-asset-pending-sheen 2.1s ease-in-out infinite;
}

.workflow-asset-pending-grain {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.42), transparent 20%),
    radial-gradient(circle at 72% 68%, rgba(100, 116, 139, 0.24), transparent 22%);
  opacity: 0.64;
}

.workflow-asset-detail-preview .workflow-asset-pending {
  min-height: 420px;
  border-radius: 16px;
}

@keyframes workflow-asset-pending-sheen {
  0% {
    opacity: 0.42;
    transform: translateX(-44%);
  }
  58% {
    opacity: 0.74;
    transform: translateX(44%);
  }
  100% {
    opacity: 0.42;
    transform: translateX(44%);
  }
}

.workflow-asset-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.workflow-asset-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.workflow-asset-text-preview {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 12px;
  overflow: hidden;
  box-sizing: border-box;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
    repeating-linear-gradient(180deg, transparent 0 23px, rgba(148, 163, 184, 0.16) 24px);
  color: #111827;
  text-align: left;
}

.workflow-asset-text-badge {
  justify-self: start;
  max-width: 100%;
  padding: 3px 6px;
  overflow: hidden;
  border: 1px solid rgba(71, 85, 105, 0.18);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.72);
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-asset-text-title {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.24;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-asset-text-body {
  display: -webkit-box;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: rgba(51, 65, 85, 0.76);
  font-size: 0.68rem;
  font-weight: 760;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
  white-space: pre-wrap;
}

.workflow-asset-text-body.workflow-asset-markdown-preview {
  display: block;
  -webkit-line-clamp: unset;
  white-space: normal;
}

.workflow-asset-markdown-document {
  display: block;
  width: 100%;
  box-sizing: border-box;
  color: #111827;
  font-size: 0.9rem;
  font-weight: 520;
  line-height: 1.68;
  text-align: left;
}

.workflow-asset-markdown-document.is-compact {
  max-height: 100%;
  overflow: hidden;
  font-size: 0.68rem;
  line-height: 1.45;
}

.workflow-asset-markdown-document h1,
.workflow-asset-markdown-document h2,
.workflow-asset-markdown-document h3,
.workflow-asset-markdown-document h4,
.workflow-asset-markdown-document h5,
.workflow-asset-markdown-document h6 {
  margin: 0 0 0.55em;
  color: #0f172a;
  font-weight: 950;
  line-height: 1.22;
}

.workflow-asset-markdown-document h1 {
  font-size: 1.38rem;
}

.workflow-asset-markdown-document h2 {
  font-size: 1.14rem;
}

.workflow-asset-markdown-document h3 {
  font-size: 1rem;
}

.workflow-asset-markdown-document.is-compact h1,
.workflow-asset-markdown-document.is-compact h2,
.workflow-asset-markdown-document.is-compact h3,
.workflow-asset-markdown-document.is-compact h4,
.workflow-asset-markdown-document.is-compact h5,
.workflow-asset-markdown-document.is-compact h6 {
  margin-bottom: 0.35em;
  font-size: 0.78rem;
}

.workflow-asset-markdown-document p,
.workflow-asset-markdown-document ul,
.workflow-asset-markdown-document ol,
.workflow-asset-markdown-document blockquote,
.workflow-asset-markdown-document pre,
.workflow-asset-markdown-document table {
  margin: 0 0 0.9em;
}

.workflow-asset-markdown-document.is-compact p,
.workflow-asset-markdown-document.is-compact ul,
.workflow-asset-markdown-document.is-compact ol,
.workflow-asset-markdown-document.is-compact blockquote,
.workflow-asset-markdown-document.is-compact pre,
.workflow-asset-markdown-document.is-compact table {
  margin-bottom: 0.45em;
}

.workflow-asset-markdown-document p:last-child,
.workflow-asset-markdown-document ul:last-child,
.workflow-asset-markdown-document ol:last-child,
.workflow-asset-markdown-document blockquote:last-child,
.workflow-asset-markdown-document pre:last-child,
.workflow-asset-markdown-document table:last-child {
  margin-bottom: 0;
}

.workflow-asset-markdown-document ul,
.workflow-asset-markdown-document ol {
  padding-left: 1.35em;
}

.workflow-asset-markdown-document li {
  margin: 0.2em 0;
}

.workflow-asset-markdown-document blockquote {
  padding: 0.65em 0.85em;
  border-left: 3px solid rgba(37, 99, 235, 0.42);
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.08);
  color: rgba(30, 41, 59, 0.86);
}

.workflow-asset-markdown-document code {
  padding: 0.1em 0.32em;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.08);
  color: #7c2d12;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.workflow-asset-markdown-document pre {
  padding: 0.9em 1em;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 10px;
  background: #0f172a;
  color: #e2e8f0;
}

.workflow-asset-markdown-document pre code {
  display: block;
  padding: 0;
  background: transparent;
  color: inherit;
  white-space: pre;
}

.workflow-asset-markdown-document a {
  color: #2563eb;
  font-weight: 760;
  text-decoration: none;
}

.workflow-asset-markdown-document a:hover,
.workflow-asset-markdown-document a:focus-visible {
  text-decoration: underline;
}

.workflow-asset-markdown-document table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  font-size: 0.86em;
}

.workflow-asset-markdown-document th,
.workflow-asset-markdown-document td {
  padding: 0.55em 0.65em;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  text-align: left;
  vertical-align: top;
}

.workflow-asset-markdown-document th {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  font-weight: 900;
}

.workflow-asset-markdown-document tr:last-child td {
  border-bottom: 0;
}

.workflow-asset-markdown-document hr {
  height: 1px;
  margin: 1em 0;
  border: 0;
  background: rgba(148, 163, 184, 0.36);
}

.workflow-asset-chart-preview {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: #ffffff;
}

.workflow-asset-chart-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.workflow-asset-spreadsheet-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 7px;
  width: 100%;
  height: 100%;
  padding: 12px;
  box-sizing: border-box;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 252, 0.96)),
    radial-gradient(circle at 18% 12%, rgba(124, 92, 255, 0.16), transparent 36%);
  color: #111827;
  text-align: left;
}

.workflow-asset-spreadsheet-badge {
  justify-self: start;
  max-width: 100%;
  padding: 3px 7px;
  overflow: hidden;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.09);
  color: #0f766e;
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-asset-spreadsheet-title {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-asset-spreadsheet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  min-height: 0;
  overflow: hidden;
  padding: 5px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 9px;
  background: #ffffff;
}

.workflow-asset-spreadsheet-grid span {
  min-height: 12px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.18);
}

.workflow-asset-spreadsheet-grid span.is-head {
  background: rgba(124, 92, 255, 0.18);
}

.workflow-asset-spreadsheet-hint {
  overflow: hidden;
  color: rgba(71, 85, 105, 0.72);
  font-size: 0.66rem;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-asset-detail-preview.is-chart {
  padding: 16px;
  background: #f8fafc;
}

.workflow-asset-detail-preview.is-chart.is-interactive-chart {
  display: block;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
}

.workflow-asset-detail-preview.is-text {
  display: block;
  padding: 0;
  background: #ffffff;
}

.workflow-asset-detail-preview.is-markdown {
  display: block;
  background: #ffffff;
}

.workflow-asset-detail-preview.is-markdown .workflow-asset-markdown-document {
  min-height: 100%;
  padding: 28px 32px;
}

.workflow-asset-detail-preview.is-spreadsheet {
  display: block;
  overflow: hidden;
  background: #ffffff;
}

.workflow-asset-spreadsheet-detail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
}

.workflow-asset-spreadsheet-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
}

.workflow-asset-spreadsheet-detail-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.workflow-asset-spreadsheet-detail-copy strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-asset-spreadsheet-detail-copy span {
  overflow: hidden;
  color: rgba(71, 85, 105, 0.72);
  font-size: 0.72rem;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-asset-spreadsheet-sheet-select {
  flex: 0 0 min(280px, 42%);
  min-width: 160px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 9px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 820;
  outline: none;
}

.workflow-asset-spreadsheet-sheet-select:focus-visible {
  border-color: rgba(124, 92, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.14);
}

.workflow-asset-spreadsheet-table-wrap {
  min-height: 0;
  overflow: auto;
  background: #ffffff;
}

.workflow-asset-spreadsheet-table-wrap table {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
  color: #111827;
  font-size: 0.76rem;
  line-height: 1.35;
}

.workflow-asset-spreadsheet-table-wrap th,
.workflow-asset-spreadsheet-table-wrap td {
  max-width: 260px;
  padding: 8px 10px;
  overflow: hidden;
  border-right: 1px solid rgba(226, 232, 240, 0.9);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
}

.workflow-asset-spreadsheet-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f1f5f9;
  color: #334155;
  font-weight: 950;
}

.workflow-asset-spreadsheet-table-wrap tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 54px;
  min-width: 54px;
  background: #f8fafc;
  color: rgba(71, 85, 105, 0.72);
  font-weight: 900;
  text-align: center;
}

.workflow-asset-spreadsheet-table-wrap tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.72);
}

.workflow-asset-spreadsheet-note {
  min-height: 34px;
  margin: 0;
  padding: 9px 14px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  color: rgba(71, 85, 105, 0.72);
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1.4;
}

.workflow-asset-spreadsheet-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  color: rgba(71, 85, 105, 0.74);
  font-size: 0.82rem;
  font-weight: 820;
  text-align: center;
}

.workflow-asset-spreadsheet-empty.is-error {
  color: #b42318;
}

.workflow-asset-detail-chart {
  width: 100%;
  height: 100%;
  min-height: 460px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.workflow-asset-kline-control {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #ffffff;
}

.workflow-asset-kline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  min-height: 62px;
  padding: 14px 58px 12px 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  background: #ffffff;
}

.workflow-asset-kline-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workflow-asset-kline-copy strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-asset-kline-copy span {
  overflow: hidden;
  color: rgba(71, 85, 105, 0.78);
  font-size: 0.76rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-asset-kline-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.workflow-asset-kline-reset {
  min-width: 78px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(124, 58, 237, 0.32);
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.08);
  color: #5b21b6;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
}

.workflow-asset-kline-reset:hover,
.workflow-asset-kline-reset:focus-visible {
  background: rgba(124, 58, 237, 0.14);
  outline: none;
}

.workflow-asset-kline-echarts {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  color: rgba(71, 85, 105, 0.72);
  font-size: 0.82rem;
  font-weight: 800;
}

.workflow-asset-image.is-loading,
.workflow-asset-image.is-error {
  opacity: 0.42;
}

.workflow-asset-meta {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  max-width: 100%;
  max-height: none;
  margin-bottom: 7px;
  padding: 8px 9px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  pointer-events: none;
}

.workflow-asset-title,
.workflow-asset-purpose,
.workflow-asset-usage {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workflow-asset-title {
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1.24;
  white-space: nowrap;
}

.workflow-asset-purpose {
  display: -webkit-box;
  color: rgba(51, 65, 85, 0.76);
  font-size: 0.66rem;
  font-weight: 740;
  line-height: 1.34;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.workflow-asset-usage {
  color: rgba(71, 85, 105, 0.7);
  font-size: 0.62rem;
  font-weight: 780;
  line-height: 1.28;
  white-space: nowrap;
}

.workflow-asset-producer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-self: start;
  max-width: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #334155;
  box-shadow: none;
}

.workflow-asset-producer-icon {
  width: 18px;
  min-width: 18px;
  height: 18px;
  border-radius: 6px;
  overflow: hidden;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.58rem;
}

.workflow-asset-producer-icon.widget-title-icon {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.workflow-asset-producer-icon.widget-title-icon::before {
  content: none;
}

.workflow-asset-producer-icon .widget-title-icon-image,
.workflow-asset-producer-icon img {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 6px;
}

.workflow-asset-producer-name {
  min-width: 0;
  overflow: hidden;
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-asset-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 30px;
  margin-top: 7px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.workflow-asset-item:hover .workflow-asset-actions,
.workflow-asset-item:focus-within .workflow-asset-actions {
  opacity: 1;
  pointer-events: auto;
}

.workflow-asset-actions button {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.workflow-asset-actions button svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}

.workflow-asset-actions button:hover,
.workflow-asset-actions button:focus-visible {
  border-color: rgba(15, 23, 42, 0.28);
  background: #ffffff;
  outline: none;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

.workflow-asset-actions .workflow-asset-delete-btn {
  border-color: rgba(220, 38, 38, 0.24);
  color: #b91c1c;
}

.workflow-asset-actions .workflow-asset-delete-btn:hover,
.workflow-asset-actions .workflow-asset-delete-btn:focus-visible {
  border-color: rgba(220, 38, 38, 0.34);
  background: rgba(254, 242, 242, 0.98);
}

.workflow-asset-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  min-height: 20px;
  padding: 5px 2px 0;
  color: rgba(71, 85, 105, 0.62);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
}

.workflow-asset-time {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-asset-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 140001;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
}

.workflow-asset-detail-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  width: min(1120px, 96vw);
  height: min(860px, 92vh);
  max-height: 92vh;
  min-height: 0;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.76);
  border-radius: 20px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 28px 76px rgba(15, 23, 42, 0.28);
}

.workflow-asset-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.workflow-asset-detail-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workflow-asset-detail-copy h3 {
  margin: 0;
  overflow: hidden;
  color: #111827;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.24;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-asset-detail-copy p {
  margin: 0;
  color: rgba(71, 85, 105, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
}

.workflow-asset-detail-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.workflow-asset-detail-preview {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: auto;
  border-radius: 14px;
  background:
    linear-gradient(45deg, rgba(148, 163, 184, 0.12) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(148, 163, 184, 0.12) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, 0.12) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, 0.12) 75%),
    #f8fafc;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.workflow-asset-detail-preview.is-image,
.workflow-asset-detail-preview.is-video {
  overflow: hidden;
}

.workflow-asset-detail-image,
.workflow-asset-detail-video {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.workflow-asset-detail-image.is-loading,
.workflow-asset-detail-image.is-error {
  opacity: 0.42;
}

.workflow-asset-detail-audio {
  width: min(520px, 100%);
}

.workflow-asset-detail-text {
  width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 16px;
  overflow: auto;
  color: #111827;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.workflow-asset-detail-file {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 180px;
  color: rgba(71, 85, 105, 0.76);
  text-align: center;
}

.workflow-asset-detail-file strong {
  color: #111827;
  font-size: 1.05rem;
  font-weight: 950;
}

.workflow-asset-detail-info {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  min-width: 0;
  max-width: none;
  padding: 12px 52px 12px 14px;
  border: 1px solid rgba(226, 232, 240, 0.62);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.workflow-asset-detail-title,
.workflow-asset-detail-purpose,
.workflow-asset-detail-meta {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workflow-asset-detail-title {
  color: #111827;
  font-size: 0.94rem;
  font-weight: 950;
  line-height: 1.24;
  white-space: nowrap;
}

.workflow-asset-detail-purpose {
  color: rgba(51, 65, 85, 0.74);
  font-size: 0.82rem;
  font-weight: 740;
  line-height: 1.45;
}

.workflow-asset-detail-meta {
  color: rgba(71, 85, 105, 0.68);
  font-size: 0.74rem;
  font-weight: 820;
  line-height: 1.34;
  white-space: nowrap;
}

.workflow-asset-detail-row {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.94);
}

.workflow-asset-detail-row span {
  color: rgba(71, 85, 105, 0.6);
  font-size: 0.68rem;
  font-weight: 850;
}

.workflow-asset-detail-row strong {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: 0.78rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-asset-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.workflow-asset-detail-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  text-decoration: none;
}

.workflow-asset-detail-action.is-primary {
  background: #111827;
  color: #ffffff;
}

.workflow-asset-detail-action:disabled {
  cursor: not-allowed;
  opacity: 0.44;
}

.workflow-intent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workflow-intent-apply,
.workflow-intent-cancel {
  min-height: 32px;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.workflow-intent-apply {
  background: linear-gradient(135deg, #7c5cff, #b18bff);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(124, 92, 255, 0.22);
}

.workflow-intent-cancel {
  background: rgba(24, 20, 43, 0.07);
  color: rgba(24, 20, 43, 0.68);
}

.compound-workflow-chat-main .waterfall-message {
  max-width: min(860px, 88%);
  border-color: rgba(24, 20, 43, 0.08);
  border-radius: 20px;
  background: #ffffff;
  color: #18142b;
  box-shadow: 0 12px 28px rgba(24, 20, 43, 0.08);
}

.compound-workflow-chat-main .waterfall-message.has-assistant-avatar {
  max-width: min(900px, 94%);
  border: 0;
  background: transparent;
  box-shadow: none;
}

.compound-workflow-chat-main .waterfall-message.has-assistant-avatar .waterfall-message-body {
  padding: 10px 12px;
  border: 1px solid rgba(24, 20, 43, 0.08);
  border-radius: 16px;
  background: #ffffff;
  color: #18142b;
  box-shadow: 0 12px 28px rgba(24, 20, 43, 0.08);
}

.compound-workflow-chat-main .waterfall-message-avatar {
  border-color: rgba(124, 92, 255, 0.18);
  background: #ffffff;
}

.compound-workflow-chat-main .waterfall-message.is-workflow-opening {
  max-width: min(980px, 94%);
  border-color: rgba(124, 92, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 251, 255, 0.96)),
    #ffffff;
  box-shadow:
    0 18px 38px rgba(24, 20, 43, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.compound-workflow-chat-main .waterfall-message.is-user {
  background: #ffffff;
}

.compound-workflow-chat-main .waterfall-message-content {
  color: #18142b;
  font-size: 0.9rem;
}

.compound-workflow-chat-main .waterfall-message-role {
  color: rgba(24, 20, 43, 0.52);
}

.compound-workflow-assistant-window .compound-workflow-chat-main {
  gap: 10px;
  padding: 20px;
}

.compound-workflow-action-panel {
  position: absolute;
  right: 20px;
  bottom: 148px;
  left: 20px;
  z-index: 28;
  display: grid;
  gap: 8px;
  min-width: 0;
  max-height: min(360px, 48vh);
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
}

.compound-workflow-action-panel[hidden] {
  display: none;
}

.compound-workflow-task-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.compound-workflow-task-panel-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.compound-workflow-task-panel-copy strong {
  color: #172033;
  font-size: 0.78rem;
  font-weight: 500;
}

.compound-workflow-task-panel-copy p {
  margin: 0;
  color: rgba(51, 65, 85, 0.66);
  font-size: 0.68rem;
  font-weight: 400;
  line-height: 1.35;
}

.compound-workflow-task-panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.compound-workflow-task-panel-close {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.04);
  color: rgba(30, 41, 59, 0.72);
}

.compound-workflow-task-panel-actions button,
.compound-workflow-video-task-actions button {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 0.66rem;
  white-space: nowrap;
}

.compound-workflow-video-task-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.compound-workflow-video-task {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 8px;
  background: #f8fafc;
}

.compound-workflow-video-task.is-done {
  background: #f2fbf6;
}

.compound-workflow-video-task.is-running {
  background: #f7f9ff;
}

.compound-workflow-video-task.is-failed {
  background: #fff7f7;
}

.compound-workflow-video-task-index {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 500;
}

.compound-workflow-video-task-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.compound-workflow-video-task-body strong {
  overflow: hidden;
  color: #172033;
  font-size: 0.7rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-workflow-video-task-body p {
  overflow: hidden;
  margin: 0;
  color: rgba(51, 65, 85, 0.62);
  font-size: 0.64rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-workflow-video-task-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.compound-workflow-video-task-actions a {
  color: #2563eb;
  font-size: 0.66rem;
  font-weight: 850;
  text-decoration: none;
}

.compound-workflow-video-task-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: rgba(30, 41, 59, 0.72);
  font-size: 0.62rem;
  font-weight: 500;
  white-space: nowrap;
}

.compound-workflow-video-task.is-done .compound-workflow-video-task-status {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.compound-workflow-video-task.is-running .compound-workflow-video-task-status {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.compound-workflow-video-task.is-failed .compound-workflow-video-task-status {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.compound-workflow-assistant-window .compound-workflow-chat-main .waterfall-chat-messages {
  padding: 4px 6px;
}

.compound-workflow-assistant-window .compound-workflow-chat-main .waterfall-message {
  max-width: 94%;
  border-radius: 16px;
}

.compound-workflow-assistant-window .compound-workflow-chat-main .waterfall-message.has-assistant-avatar {
  grid-template-columns: 32px minmax(0, 1fr);
}

.compound-workflow-assistant-window .compound-workflow-chat-main .waterfall-message-avatar-shell {
  width: 32px;
  height: 32px;
}

.compound-workflow-assistant-window .compound-workflow-chat-main .waterfall-message-avatar {
  width: 32px;
  height: 32px;
}

.compound-workflow-assistant-window .compound-workflow-chat-main .waterfall-message-content {
  font-size: 0.86rem;
  line-height: 1.48;
}

.compound-workflow-assistant-window .compound-workflow-chat-main .waterfall-message-role {
  font-size: 0.68rem;
}

.compound-workflow-assistant-window .compound-workflow-chat-main .workflow-intent-title {
  font-size: 0.84rem;
}

.compound-workflow-assistant-window .compound-workflow-chat-main .workflow-intent-summary {
  font-size: 0.76rem;
  line-height: 1.5;
}

.waterfall-chat-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.compound-workflow-chat-main .waterfall-chat-tools {
  display: none;
}

.waterfall-chat-tool {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 72px;
  padding: 9px 8px;
  border: 1px solid rgba(24, 20, 43, 0.08);
  border-radius: 18px;
  background: #ffffff;
  color: rgba(24, 20, 43, 0.72);
  font-size: 0.76rem;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(24, 20, 43, 0.07);
}

.waterfall-chat-tool-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(124, 92, 255, 0.96), rgba(255, 124, 247, 0.78));
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(124, 92, 255, 0.26);
}

.compound-workflow-chat-main .waterfall-chat-composer {
  display: flex;
  align-items: center;
  justify-self: stretch;
  width: 100%;
  align-self: end;
  gap: 10px;
  min-height: 58px;
  padding: 9px 10px;
  border-color: rgba(24, 20, 43, 0.08);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(24, 20, 43, 0.09);
}

.compound-workflow-chat-main .workflow-composer-pending-actions {
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  padding: 0 4px 2px;
}

.compound-workflow-chat-main .workflow-composer-pending-actions .workflow-intent-card {
  margin-top: 0;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(24, 20, 43, 0.08);
}

.compound-workflow-chat-main .workflow-composer-pending-actions .workflow-action-item {
  padding: 9px;
}

.compound-workflow-chat-main .waterfall-chat-composer.is-workflow-input-requested {
  border-color: rgba(15, 118, 110, 0.36);
  box-shadow:
    0 0 0 3px rgba(45, 212, 191, 0.2),
    0 16px 36px rgba(24, 20, 43, 0.1);
}

.compound-workflow-chat-main .waterfall-chat-input {
  flex: 1 1 auto;
  min-width: 0;
  color: #18142b;
}

.compound-workflow-assistant-window .compound-workflow-chat-main .waterfall-chat-input {
  font-size: 0.86rem;
}

.compound-workflow-chat-main .waterfall-chat-input::placeholder {
  color: rgba(24, 20, 43, 0.42);
}

.compound-workflow-chat-main .waterfall-chat-attach-btn,
.compound-workflow-chat-main .waterfall-chat-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  border: 0;
  background:
    linear-gradient(135deg, rgba(124, 92, 255, 0.96), rgba(177, 139, 255, 0.88));
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(124, 92, 255, 0.26);
}

.compound-workflow-task-dock {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0 10px;
  pointer-events: none;
}

.compound-workflow-task-dock[hidden] {
  display: none;
}

.compound-workflow-loop-progress,
.compound-workflow-graph-loop-progress,
.compound-workflow-schedule-progress,
.compound-workflow-task-batch-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: min(420px, calc(100% - 48px));
  min-height: 34px;
  padding: 7px 9px 7px 11px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 12px;
  background: rgba(240, 253, 250, 0.96);
  color: #134e4a;
  box-shadow:
    0 12px 28px rgba(15, 118, 110, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  pointer-events: auto;
}

.compound-workflow-loop-progress[hidden],
.compound-workflow-graph-loop-progress[hidden],
.compound-workflow-schedule-progress[hidden],
.compound-workflow-task-batch-progress[hidden] {
  display: none;
}

.compound-workflow-schedule-progress {
  border-color: rgba(37, 99, 235, 0.18);
  background: rgba(239, 246, 255, 0.96);
  color: #1e3a8a;
}

.compound-workflow-task-batch-progress {
  border-color: rgba(124, 58, 237, 0.18);
  background: rgba(245, 243, 255, 0.96);
  color: #5b21b6;
}

.compound-workflow-loop-progress[data-tone="completed"],
.compound-workflow-graph-loop-progress[data-tone="completed"],
.compound-workflow-task-batch-progress[data-tone="completed"] {
  border-color: rgba(22, 163, 74, 0.18);
  background: rgba(240, 253, 244, 0.96);
  color: #166534;
}

.compound-workflow-loop-progress[data-tone="waiting"],
.compound-workflow-loop-progress[data-tone="cancelled"],
.compound-workflow-graph-loop-progress[data-tone="waiting"],
.compound-workflow-graph-loop-progress[data-tone="cancelled"],
.compound-workflow-schedule-progress[data-tone="waiting"],
.compound-workflow-task-batch-progress[data-tone="waiting"],
.compound-workflow-task-batch-progress[data-tone="cancelled"] {
  border-color: rgba(217, 119, 6, 0.18);
  background: rgba(255, 251, 235, 0.96);
  color: #92400e;
}

.compound-workflow-loop-progress[data-tone="failed"],
.compound-workflow-graph-loop-progress[data-tone="failed"],
.compound-workflow-schedule-progress[data-tone="failed"],
.compound-workflow-task-batch-progress[data-tone="failed"] {
  border-color: rgba(220, 38, 38, 0.2);
  background: rgba(254, 242, 242, 0.98);
  color: #991b1b;
}

.compound-workflow-schedule-progress[data-tone="running"],
.compound-workflow-graph-loop-progress[data-tone="running"],
.compound-workflow-task-batch-progress[data-tone="running"] {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(219, 234, 254, 0.98);
  color: #1d4ed8;
}

.compound-workflow-loop-progress-label,
.compound-workflow-graph-loop-progress-label,
.compound-workflow-schedule-progress-label,
.compound-workflow-task-batch-progress-label {
  min-width: 0;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-workflow-loop-stop-btn,
.compound-workflow-graph-loop-stop-btn,
.compound-workflow-schedule-cancel-btn,
.compound-workflow-task-batch-stop-btn {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: inherit;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
}

.compound-workflow-loop-stop-btn:hover,
.compound-workflow-loop-stop-btn:focus-visible,
.compound-workflow-schedule-cancel-btn:hover,
.compound-workflow-schedule-cancel-btn:focus-visible,
.compound-workflow-task-batch-stop-btn:hover,
.compound-workflow-task-batch-stop-btn:focus-visible {
  border-color: rgba(15, 23, 42, 0.16);
  background: #ffffff;
  outline: none;
}

.compound-workflow-chat-main .compound-workflow-task-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  border: 1px solid rgba(124, 92, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #7c3aed;
  box-shadow:
    0 12px 26px rgba(109, 76, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  pointer-events: auto;
}

.compound-workflow-chat-main .compound-workflow-task-toggle[hidden] {
  display: none;
}

.compound-workflow-chat-main .compound-workflow-task-toggle.is-active,
.compound-workflow-chat-main .compound-workflow-task-toggle:hover,
.compound-workflow-chat-main .compound-workflow-task-toggle:focus-visible {
  border-color: rgba(109, 76, 255, 0.42);
  background: rgba(245, 243, 255, 0.98);
  color: #6d28d9;
  outline: none;
}

.compound-workflow-chat-main .compound-workflow-task-toggle.is-running {
  box-shadow:
    0 0 0 3px rgba(124, 92, 255, 0.13),
    0 10px 22px rgba(109, 76, 255, 0.18);
}

.compound-workflow-chat-main .compound-workflow-task-toggle.is-failed {
  border-color: rgba(220, 38, 38, 0.28);
}

.compound-workflow-task-toggle-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #6d4cff;
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 950;
  line-height: 1;
}

.compound-workflow-chat-main .waterfall-chat-attach-btn {
  font-size: 0;
}

.compound-workflow-chat-main .waterfall-chat-attach-btn::before {
  content: "+";
  display: block;
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(47, 31, 121, 0.26);
}

body[data-theme="light"] .compound-workflow-chat-main .waterfall-chat-attach-btn {
  background:
    linear-gradient(135deg, #6d4cff, #8b5cf6 58%, #b18bff);
  color: #ffffff;
  box-shadow:
    0 10px 24px rgba(109, 76, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

body[data-theme="light"] .compound-workflow-chat-main .waterfall-chat-attach-btn::before {
  color: #ffffff;
}

.compound-workflow-chat-main .waterfall-chat-send-btn {
  margin-left: auto;
  background:
    linear-gradient(135deg, #7c5cff, #b18bff 48%, #ff7cf7);
}

.compound-workflow-chat-main .waterfall-pending-attachments {
  padding: 0 10px;
}

.workflow-analysis-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(124, 92, 255, 0.18), transparent 34%),
    rgba(12, 16, 28, 0.72);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  transition: opacity 220ms ease;
}

.workflow-analysis-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.workflow-analysis-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(420px, 90%);
  min-height: 0;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(20, 18, 44, 0.96), rgba(12, 14, 28, 0.96)),
    rgba(12, 14, 28, 0.96);
  box-shadow:
    0 28px 70px rgba(20, 15, 58, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  text-align: center;
  animation: workflow-analysis-card-in 0.3s ease-out;
}

.workflow-analysis-loader {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.workflow-analysis-spinner {
  width: 36px;
  height: 36px;
  border: 3.5px solid rgba(125, 85, 255, 0.18);
  border-top-color: #7d55ff;
  border-radius: 999px;
  animation: workflow-analysis-spin 0.8s linear infinite;
}

.workflow-analysis-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #7d55ff;
  animation: workflow-analysis-pulse 1.2s ease-in-out infinite;
}

.workflow-analysis-copy {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
}

.workflow-analysis-eyebrow {
  margin: 0;
  color: rgba(177, 139, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.workflow-analysis-copy h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.06rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.workflow-analysis-message {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  line-height: 1.5;
}

.workflow-analysis-progress {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: min(300px, 100%);
  margin-top: 2px;
}

.workflow-analysis-percent {
  min-width: 38px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
  font-weight: 950;
  text-align: right;
}

.workflow-analysis-progress-track {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.workflow-analysis-progress-bar {
  display: block;
  width: var(--workflow-analysis-progress, 8%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7d55ff, #b18bff);
  transition: width 360ms ease;
}

.workflow-analysis-stage-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
}

.workflow-analysis-stage {
  min-height: 24px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.7rem;
  font-weight: 850;
}

.workflow-analysis-stage.is-active {
  background: rgba(125, 85, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
}

.workflow-analysis-stage.is-done {
  background: rgba(60, 200, 140, 0.12);
  color: rgba(211, 255, 235, 0.82);
}

@keyframes workflow-analysis-card-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

@keyframes workflow-analysis-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

body[data-theme="light"] .workflow-analysis-overlay {
  background:
    radial-gradient(circle at 50% 42%, rgba(124, 92, 255, 0.1), transparent 34%),
    rgba(248, 246, 255, 0.72);
}

body[data-theme="light"] .workflow-analysis-card {
  border-color: rgba(89, 62, 170, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 243, 255, 0.96)),
    rgba(255, 255, 255, 0.96);
  box-shadow:
    0 28px 70px rgba(74, 55, 139, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body[data-theme="light"] .workflow-analysis-copy h2 {
  color: #21143f;
}

body[data-theme="light"] .workflow-analysis-message {
  color: #5a4b78;
}

body[data-theme="light"] .workflow-analysis-percent {
  color: #4d378f;
}

body[data-theme="light"] .workflow-analysis-progress-track {
  background: rgba(91, 63, 211, 0.1);
}

body[data-theme="light"] .workflow-analysis-stage {
  background: rgba(125, 85, 255, 0.08);
  color: rgba(91, 63, 211, 0.62);
}

body[data-theme="light"] .workflow-analysis-stage.is-active {
  background: rgba(125, 85, 255, 0.14);
  color: #5b3fd3;
}

body[data-theme="light"] .workflow-analysis-stage.is-done {
  background: rgba(21, 154, 102, 0.11);
  color: #27815b;
}

.has-compound-step-editor {
  overflow: hidden;
}

.compound-step-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 3600;
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 92, 255, 0.18), transparent 48%),
    rgba(8, 10, 16, 0.78);
  backdrop-filter: blur(20px) saturate(1.08);
  -webkit-backdrop-filter: blur(20px) saturate(1.08);
  opacity: 0;
  animation: compoundStepEditorIn 180ms ease forwards;
}

.compound-step-editor-overlay.is-closing {
  pointer-events: none;
  animation: compoundStepEditorOut 160ms ease forwards;
}

.compound-step-editor-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1280px, calc(100vw - 48px));
  height: min(860px, calc(100vh - 48px));
  min-width: min(760px, calc(100vw - 48px));
  min-height: min(620px, calc(100vh - 48px));
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 240, 255, 0.9)),
    radial-gradient(circle at 86% 16%, rgba(135, 88, 255, 0.16), transparent 42%);
  box-shadow:
    0 28px 74px rgba(15, 10, 32, 0.34),
    0 0 0 1px rgba(91, 61, 196, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  overflow: hidden;
  transform: translateY(10px) scale(0.98);
  animation: compoundStepEditorPanelIn 220ms cubic-bezier(0.22, 0.82, 0.28, 1) forwards;
}

.compound-workflow-plugin-host .compound-step-editor-panel {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  animation: none;
}

.compound-workflow-plugin-host .compound-step-editor-header {
  min-height: 56px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.76);
}

.compound-workflow-plugin-host .compound-step-editor-host {
  padding: 12px;
}

.compound-workflow-plugin-host .compound-step-editor-widget {
  border-radius: 8px;
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: none;
}

.compound-step-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  padding: 12px 14px 10px 16px;
  border-bottom: 1px solid rgba(91, 61, 196, 0.12);
}

.compound-step-editor-title {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 2px 10px;
  min-width: 0;
  align-items: center;
}

.compound-step-editor-icon {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.compound-step-editor-title strong {
  min-width: 0;
  overflow: hidden;
  color: #261c4c;
  font-size: 0.96rem;
  font-weight: 950;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-step-editor-title span:not(.compound-step-editor-icon) {
  min-width: 0;
  overflow: hidden;
  color: rgba(75, 36, 200, 0.56);
  font-size: 0.74rem;
  font-weight: 780;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-step-editor-close {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(75, 36, 200, 0.94), rgba(90, 116, 255, 0.9));
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(75, 36, 200, 0.22);
}

.compound-step-editor-close:hover,
.compound-step-editor-close:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

.compound-step-editor-host {
  min-height: 0;
  padding: 16px;
  overflow: hidden;
}

.compound-step-editor-widget {
  position: relative !important;
  inset: auto !important;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border-radius: 20px;
  border-color: rgba(91, 61, 196, 0.12);
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(24, 20, 43, 0.08);
  overflow: hidden;
}

.compound-step-editor-widget::before,
.compound-step-editor-port-layer {
  display: none !important;
}

.compound-step-editor-widget-body {
  min-height: 0;
  padding: 20px;
  overflow: auto;
  color: #18142b;
}

.widget.is-plugin-widget .compound-step-editor-widget-body {
  min-height: 0;
  padding: 20px;
  overflow: auto;
  color: #18142b;
}

.compound-chat-step-editor {
  display: grid;
  gap: 14px;
  min-height: 0;
}

.compound-chat-step-field,
.compound-chat-step-model {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.compound-chat-step-field > span {
  color: rgba(24, 20, 43, 0.54);
  font-size: 0.78rem;
  font-weight: 850;
}

.compound-chat-step-input {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(24, 20, 43, 0.1);
  border-radius: 14px;
  background: rgba(247, 248, 253, 0.92);
  color: #18142b;
  font: inherit;
  font-size: 0.88rem;
  outline: none;
}

.compound-chat-step-input:focus {
  border-color: rgba(124, 92, 255, 0.36);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.1);
}

.compound-chat-step-editor .chat-widget-model-picker {
  width: min(360px, 100%);
  margin: 0;
}

.compound-chat-step-editor .chat-widget-composer,
.compound-chat-step-editor .chat-widget-thread {
  margin: 0;
  border-color: rgba(24, 20, 43, 0.08);
  background: rgba(247, 248, 253, 0.92);
}

.compound-chat-step-editor .chat-widget-input {
  min-height: 78px;
  color: #18142b;
}

.compound-chat-step-editor .chat-widget-response {
  max-height: 120px;
  overflow: auto;
}

@keyframes compoundStepEditorIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes compoundStepEditorOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes compoundStepEditorPanelIn {
  from {
    transform: translateY(10px) scale(0.98);
  }
  to {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 860px) {
  .compound-step-editor-overlay {
    padding: 0;
  }

  .workflow-session-guide-primer {
    grid-template-columns: 1fr;
  }

  .workflow-session-guide-primer-card {
    min-height: 0;
  }

  .workflow-session-card.is-onboarding {
    min-height: 0;
    padding: 18px 18px 92px;
    border-radius: 22px;
  }

  .workflow-session-card.is-onboarding .workflow-session-copy {
    padding-right: 76px;
  }

  .workflow-session-card.is-onboarding .workflow-session-header-actions {
    position: absolute;
    top: 18px;
    right: 18px;
  }

  .workflow-session-card.is-onboarding .workflow-session-title {
    font-size: 1.52rem;
  }

  .workflow-session-card.is-onboarding .workflow-session-guide-list {
    grid-template-columns: 1fr;
    min-height: 0;
    max-height: none;
    padding-inline: 0;
  }

  .workflow-session-card.is-onboarding .workflow-session-guide-step {
    min-height: 0;
  }

  .workflow-session-usage-flow-header {
    display: grid;
    gap: 6px;
  }

  .workflow-session-usage-flow-summary {
    max-width: none;
    text-align: left;
  }

  .workflow-session-usage-flow-card {
    flex-basis: min(82vw, 286px);
    min-height: 0;
  }

  .workflow-session-card.is-onboarding .workflow-session-primary.is-start-using {
    width: 100%;
  }

  .workflow-session-card.is-onboarding .workflow-session-actions {
    right: 18px;
    bottom: 18px;
    left: 18px;
  }

  .compound-step-editor-panel {
    width: 100vw;
    height: 100vh;
    min-width: 0;
    min-height: 0;
    border-radius: 0;
  }

  .compound-step-editor-host {
    padding: 10px;
  }

  .compound-workflow-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 176px minmax(0, 1fr);
  }

  .compound-workflow-plugin-stack {
    flex-direction: row;
    overflow-x: auto;
  }

  .compound-workflow-plugin-stack .waterfall-step {
    min-width: 190px;
  }

  .waterfall-chat-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left {
  gap: 16px;
  padding: 24px 20px 18px;
  border: 1px solid rgba(210, 239, 255, 0.14);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 8%, rgba(126, 230, 255, 0.14), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(124, 92, 255, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(14, 20, 38, 0.62), rgba(24, 20, 43, 0.46));
  color: #f7fbff;
  box-shadow:
    0 24px 54px rgba(4, 10, 24, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header {
  align-items: center;
  padding: 2px 4px 6px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-main-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.72), transparent 34%),
    linear-gradient(145deg, #32d875, #09a83f);
  color: #ffffff;
  box-shadow:
    0 12px 24px rgba(34, 197, 94, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-main-icon svg {
  width: 30px;
  height: 30px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-main-icon::after {
  border-color: rgba(255, 255, 255, 0.92);
  background: #16a34a;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header h3 {
  color: #f7fbff;
  font-size: 1.05rem;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header p {
  color: rgba(223, 236, 255, 0.64);
  font-size: 0.76rem;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack.waterfall-chat-steps {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 4px 8px 6px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step {
  --workflow-flow-line: rgba(210, 239, 255, 0.18);
  --workflow-flow-dot-bg: rgba(223, 236, 255, 0.16);
  --workflow-flow-dot-color: rgba(223, 236, 255, 0.74);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-height: 76px;
  padding: 9px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(223, 236, 255, 0.76);
  box-shadow: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 0;
  bottom: 0;
  z-index: 0;
  width: 5px;
  border-radius: 999px;
  background: var(--workflow-flow-line);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-first::before {
  top: 50%;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-last::before {
  bottom: 50%;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step::after,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-plugin-pill-header::after {
  content: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-plugin-pill-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 54px 34px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(210, 239, 255, 0.18);
  border-radius: 999px;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.24), transparent 36%),
    var(--workflow-flow-dot-bg);
  color: var(--workflow-flow-dot-color);
  font-size: 1rem;
  font-weight: 950;
  box-shadow:
    0 10px 22px rgba(4, 10, 24, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-plugin-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border: 1px solid rgba(210, 239, 255, 0.16);
  border-radius: 10px;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.16), transparent 40%),
    rgba(255, 255, 255, 0.07);
  color: #f7fbff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 8px 16px rgba(4, 10, 24, 0.14);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-plugin-icon[data-has-image="true"] {
  background: transparent;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-title {
  color: rgba(247, 251, 255, 0.88);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.25;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-remark {
  color: rgba(223, 236, 255, 0.48);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-status {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: -7px 0 0 98px;
  color: rgba(223, 236, 255, 0.52);
  font-size: 0.78rem;
  font-weight: 800;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-done {
  --workflow-flow-line: #1fca55;
  --workflow-flow-dot-bg: linear-gradient(145deg, #36dc73, #09a53e);
  --workflow-flow-dot-color: #ffffff;
  color: #f7fbff;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-done .waterfall-step-title {
  color: #f7fbff;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-done .waterfall-step-status {
  color: rgba(14, 119, 47, 0.72);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-active {
  --workflow-flow-line: #1fca55;
  color: #f7fbff;
  box-shadow: none !important;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-active .waterfall-step-number {
  border: 1px solid rgba(31, 202, 85, 0.34);
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.3), transparent 34%),
    linear-gradient(145deg, #36dc73, #09a53e);
  color: #ffffff;
  box-shadow:
    0 0 0 9px rgba(31, 202, 85, 0.08),
    0 14px 30px rgba(31, 202, 85, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-active .waterfall-step-title {
  color: #10913d;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-active .waterfall-step-status {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(31, 202, 85, 0.16);
  color: rgba(195, 255, 211, 0.9);
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill.is-active,
body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill.is-active .compound-plugin-pill-header {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-blocked,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-stale {
  --workflow-flow-line: rgba(245, 158, 11, 0.72);
  --workflow-flow-dot-bg: #fff7ed;
  --workflow-flow-dot-color: #b45309;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-failed {
  --workflow-flow-line: rgba(220, 38, 38, 0.7);
  --workflow-flow-dot-bg: #fef2f2;
  --workflow-flow-dot-color: #b91c1c;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .compound-step-open-btn.widget-focus-btn {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  border-color: rgba(210, 239, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(223, 236, 255, 0.64);
  box-shadow: 0 8px 16px rgba(4, 10, 24, 0.14);
  opacity: 0;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step:hover .compound-step-open-btn.widget-focus-btn,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step:focus-visible .compound-step-open-btn.widget-focus-btn {
  opacity: 1;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-footer {
  padding-top: 4px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-edit-workflow-btn {
  border-color: rgba(210, 239, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #f7fbff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 24px rgba(4, 10, 24, 0.18);
}

@media (max-width: 860px) {
  .compound-workflow-shell:not(.is-onboarding-mode) {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack.waterfall-chat-steps {
    max-height: 280px;
  }

  .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step {
    min-width: 0;
  }
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left {
  gap: 10px;
  padding: 14px 9px;
  border-color: rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(17, 24, 39, 0.68)),
    rgba(15, 23, 42, 0.72);
  box-shadow:
    0 18px 36px rgba(2, 6, 23, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.compound-workflow-shell:not(.is-onboarding-mode) {
  grid-template-columns: clamp(360px, 28%, 470px) minmax(0, 1fr);
  gap: 8px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header {
  padding: 0 2px 2px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-main-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(145deg, #0f766e, #2563eb);
  box-shadow: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-main-icon svg {
  width: 25px;
  height: 25px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-main-icon::after {
  content: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header h3 {
  color: #f8fafc;
  font-size: 0.98rem;
  font-weight: 850;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header p {
  color: rgba(226, 232, 240, 0.62);
  font-size: 0.72rem;
  font-weight: 700;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack.waterfall-chat-steps {
  gap: 6px;
  padding: 2px 7px 6px;
  min-width: 0;
  border: 0;
  background: transparent;
  overflow-x: hidden;
  overflow-y: auto;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e5e7eb;
  box-shadow: 0 3px 8px rgba(2, 6, 23, 0.1);
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step::before,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step::after,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-plugin-pill-header::after {
  content: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-plugin-pill-header {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 54px 24px;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 7px 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-number {
  display: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-plugin-icon {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(51, 65, 85, 0.92), rgba(30, 41, 59, 0.86));
  color: #f8fafc;
  box-shadow: 0 2px 5px rgba(2, 6, 23, 0.14);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-plugin-icon[data-has-image="true"] {
  background: rgba(15, 23, 42, 0.72);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-copy {
  min-width: 0;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-title {
  display: block;
  overflow: hidden;
  color: #e5e7eb;
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-remark {
  display: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 54px;
  min-width: 54px;
  margin: 0;
  color: rgba(203, 213, 225, 0.72) !important;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--compound-step-status-dot, #94a3b8);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .compound-plugin-pill-actions {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .compound-step-open-btn.widget-focus-btn {
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  border: 0;
  background: transparent;
  color: rgba(203, 213, 225, 0.62);
  box-shadow: none;
  opacity: 1;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .compound-step-open-btn.widget-focus-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 3;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step:hover,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step:focus-visible {
  background: rgba(167, 139, 250, 0.045);
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.22);
  outline: none;
  transform: translateY(-1px);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-selected {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(124, 58, 237, 0.13), rgba(255, 255, 255, 0.03));
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.24) !important;
  transform: scale(1.018);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-selected .waterfall-step-title {
  color: #f8fafc;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-active .waterfall-step-status,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-selected .waterfall-step-status {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(203, 213, 225, 0.72);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-selected .waterfall-step-plugin-icon {
  background: linear-gradient(145deg, #7c3aed, #4f46e5);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.24);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-running .waterfall-step-status {
  color: rgba(203, 213, 225, 0.72);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-running .waterfall-step-status::before {
  --compound-step-status-dot: #8b5cf6;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14);
  animation: compound-step-status-pulse 1.1s ease-in-out infinite;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-done .waterfall-step-plugin-icon {
  border-color: rgba(74, 222, 128, 0.34);
  background: linear-gradient(145deg, #16a34a, #0f766e);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-done .waterfall-step-status {
  color: rgba(203, 213, 225, 0.72);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-done .waterfall-step-status::before {
  --compound-step-status-dot: #22c55e;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-blocked,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-stale {
  border-color: rgba(245, 158, 11, 0.34);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-failed {
  border-color: rgba(220, 38, 38, 0.32);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-blocked .waterfall-step-plugin-icon,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-stale .waterfall-step-plugin-icon {
  border-color: rgba(251, 191, 36, 0.36);
  background: linear-gradient(145deg, #d97706, #b45309);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-failed .waterfall-step-plugin-icon {
  border-color: rgba(248, 113, 113, 0.36);
  background: linear-gradient(145deg, #dc2626, #991b1b);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-blocked .waterfall-step-status,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-stale .waterfall-step-status {
  color: rgba(203, 213, 225, 0.72);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-failed .waterfall-step-status {
  color: rgba(203, 213, 225, 0.72);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-blocked .waterfall-step-status::before,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-stale .waterfall-step-status::before {
  --compound-step-status-dot: #f59e0b;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-failed .waterfall-step-status::before {
  --compound-step-status-dot: #ef4444;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-waiting .waterfall-step-status::before {
  --compound-step-status-dot: #f59e0b;
  animation: compound-step-waiting-pulse 1.15s ease-in-out infinite;
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left {
  border-color: rgba(148, 163, 184, 0.28);
  background: #f8fafc;
  color: #1f2937;
  box-shadow:
    0 18px 34px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header h3 {
  color: #111827;
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header p {
  color: rgba(71, 85, 105, 0.68);
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step,
body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill {
  background: transparent;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step:not(.is-selected):hover,
body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step:not(.is-selected):focus-visible {
  background: rgba(124, 58, 237, 0.035);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-plugin-pill-header {
  background: transparent;
  box-shadow: none;
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-title {
  color: #1f2937;
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-status {
  color: rgba(71, 85, 105, 0.72) !important;
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-selected {
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.12), rgba(255, 255, 255, 0.28));
  box-shadow: 0 14px 28px rgba(88, 28, 135, 0.16) !important;
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-selected .waterfall-step-title {
  color: #0f172a;
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-done,
body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-active {
  color: #1f2937;
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-done .waterfall-step-title {
  color: #1f2937;
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-active .waterfall-step-title {
  color: #0f172a;
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-done .waterfall-step-status {
  color: rgba(71, 85, 105, 0.72);
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-blocked .waterfall-step-status,
body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-stale .waterfall-step-status {
  color: rgba(71, 85, 105, 0.72);
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .compound-step-open-btn.widget-focus-btn {
  color: rgba(71, 85, 105, 0.64);
  background: transparent;
  box-shadow: none;
}

@media (max-width: 860px) {
  .compound-workflow-shell:not(.is-onboarding-mode) {
    grid-template-columns: 1fr;
  }

  .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack.waterfall-chat-steps {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step {
    min-width: 0;
    width: 100%;
  }
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-edit-workflow-btn {
  min-width: 120px;
  border-color: rgba(196, 181, 253, 0.36);
  background:
    linear-gradient(180deg, rgba(139, 92, 246, 0.96), rgba(109, 40, 217, 0.94));
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 12px 24px rgba(76, 29, 149, 0.24);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-edit-workflow-btn:hover,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-edit-workflow-btn:focus-visible {
  border-color: rgba(221, 214, 254, 0.62);
  background:
    linear-gradient(180deg, rgba(167, 139, 250, 0.98), rgba(124, 58, 237, 0.96));
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 14px 28px rgba(76, 29, 149, 0.3);
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-edit-workflow-btn {
  border-color: rgba(109, 40, 217, 0.42);
  background:
    linear-gradient(180deg, #7c3aed, #5b21b6);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 12px 24px rgba(91, 33, 182, 0.24);
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-edit-workflow-btn:hover,
body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-edit-workflow-btn:focus-visible {
  border-color: rgba(91, 33, 182, 0.54);
  background:
    linear-gradient(180deg, #8b5cf6, #6d28d9);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 14px 28px rgba(91, 33, 182, 0.28);
}

.compound-workflow-assistant-window .waterfall-chat-composer {
  grid-template-columns: 34px minmax(0, 1fr) 38px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
}

.compound-workflow-assistant-window .waterfall-chat-input {
  height: 34px;
  min-height: 34px;
  max-height: 34px;
  padding: 7px 0;
  background: #ffffff;
  overflow: hidden;
  resize: none;
  white-space: nowrap;
}

.compound-workflow-assistant-window .waterfall-chat-send-btn {
  border-color: transparent;
  background: transparent;
  color: #7c3aed;
  box-shadow: none;
}

.compound-workflow-assistant-window .waterfall-chat-send-btn:not(.is-pending) svg {
  fill: currentColor;
  stroke: none;
}

.compound-workflow-assistant-window .waterfall-chat-send-btn:not(:disabled):hover,
.compound-workflow-assistant-window .waterfall-chat-send-btn:not(:disabled):focus-visible {
  border-color: transparent;
  background: rgba(124, 58, 237, 0.08);
  color: #6d28d9;
  box-shadow: none;
}

.compound-workflow-assistant-window .waterfall-chat-send-btn:disabled {
  border-color: transparent;
  background: transparent;
  color: rgba(124, 58, 237, 0.36);
  box-shadow: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) {
  transition: grid-template-columns 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 10px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header h3 {
  grid-column: 2;
  grid-row: 1;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header p {
  grid-column: 2;
  grid-row: 2;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-runtime-diagnostics-btn {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.compound-workflow-left-toggle {
  position: absolute;
  top: 50%;
  left: calc(clamp(360px, 28%, 470px) + 4px);
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #8b5cf6;
  box-shadow: none;
  transform: translate(-50%, -50%);
}

.compound-workflow-left-toggle svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 4px 8px rgba(109, 40, 217, 0.28));
  transform: rotate(180deg);
  transition: transform 180ms ease;
}

.compound-workflow-shell.is-onboarding-mode .compound-workflow-left-toggle {
  display: none;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) {
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left {
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  padding: 8px 6px;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left-header,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-expert-card,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left-footer {
  display: none !important;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack.waterfall-chat-steps {
  display: flex !important;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 4px 2px;
  overflow-x: hidden;
  overflow-y: auto;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill {
  display: grid;
  place-items: center;
  width: 44px;
  max-width: 44px;
  min-height: 44px;
  padding: 4px;
  border-radius: 12px;
  box-shadow: none;
  transform: none;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-plugin-pill-header {
  display: grid;
  grid-template-columns: 32px;
  place-items: center;
  width: 36px;
  min-height: 36px;
  padding: 2px;
  border-radius: 12px;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-plugin-icon {
  width: 32px;
  height: 32px;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-copy,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-status,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack .compound-plugin-pill-actions {
  display: none !important;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left-toggle {
  left: 72px;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left-toggle svg {
  transform: rotate(0deg);
}

@media (max-width: 860px) {
  .compound-workflow-left-toggle {
    top: 176px;
    left: 50%;
  }

  .compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) {
    grid-template-columns: 1fr;
    grid-template-rows: 68px minmax(0, 1fr);
  }

  .compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left {
    min-height: 68px;
  }

  .compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack.waterfall-chat-steps {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left-toggle {
    left: 50%;
  }
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-running {
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.34),
    0 12px 28px rgba(79, 70, 229, 0.22);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-running .compound-plugin-pill-header {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(139, 92, 246, 0.18), rgba(34, 211, 238, 0.08));
  box-shadow:
    inset 0 0 0 1px rgba(196, 181, 253, 0.16),
    0 0 24px rgba(139, 92, 246, 0.16);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-running .compound-plugin-pill-header::before {
  position: absolute;
  inset: -1px;
  z-index: 0;
  background:
    linear-gradient(
      110deg,
      transparent 0%,
      transparent 31%,
      rgba(255, 255, 255, 0.56) 47%,
      rgba(167, 139, 250, 0.36) 58%,
      transparent 73%,
      transparent 100%
    );
  content: "";
  pointer-events: none;
  transform: translateX(-130%);
  animation: compound-plugin-running-sheen 1.25s linear infinite;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-running .compound-plugin-pill-header > * {
  position: relative;
  z-index: 1;
}

body[data-theme="light"] .compound-workflow-left-toggle {
  border-color: transparent;
  background: transparent;
  color: #7c3aed;
  box-shadow: none;
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-running {
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.24),
    0 12px 26px rgba(88, 28, 135, 0.16) !important;
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-running .compound-plugin-pill-header {
  background:
    linear-gradient(90deg, rgba(124, 58, 237, 0.12), rgba(14, 165, 233, 0.08));
}

@keyframes compound-plugin-running-sheen {
  0% {
    transform: translateX(-130%);
  }

  100% {
    transform: translateX(130%);
  }
}

@keyframes compound-step-status-pulse {
  0%,
  100% {
    opacity: 0.58;
    transform: scale(0.92);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes compound-step-waiting-pulse {
  0%,
  100% {
    opacity: 0.78;
    transform: scale(0.82);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.36);
  }

  50% {
    opacity: 1;
    transform: scale(1.22);
    box-shadow: 0 0 0 7px rgba(245, 158, 11, 0);
  }
}

.app-center-overlay {
  position: fixed;
  inset: 0;
  z-index: 118;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: clamp(22px, 4vh, 44px) clamp(16px, 4vw, 48px);
  color: #f7f3ff;
  background:
    linear-gradient(135deg, rgba(33, 35, 78, 0.8), rgba(84, 35, 108, 0.74) 42%, rgba(23, 58, 92, 0.78)),
    rgba(8, 10, 18, 0.78);
  backdrop-filter: blur(24px) saturate(1.18);
  -webkit-backdrop-filter: blur(24px) saturate(1.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.app-center-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.app-center-overlay[hidden] {
  display: none;
}

.app-center-shell {
  position: relative;
  width: min(1180px, 100%);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  justify-items: center;
}

.app-center-close.icon-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.4rem;
  line-height: 1;
}

.app-center-close.icon-btn:hover,
.app-center-close.icon-btn:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.app-center-search-row {
  position: relative;
  width: min(360px, calc(100vw - 96px));
  height: 34px;
  margin: 4px auto 12px;
}

.app-center-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.58);
  pointer-events: none;
}

.app-center-search-input {
  width: 100%;
  height: 100%;
  padding: 0 14px 0 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  outline: none;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.app-center-search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.app-center-body {
  --app-center-rail-space: clamp(170px, 16vw, 186px);
  --app-center-header-offset: calc(var(--app-center-rail-space) / -2);
  width: min(1080px, 100%);
  min-height: 0;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: calc(var(--app-center-rail-space) - 148px);
}

.app-center-sidebar {
  min-height: 0;
  padding-top: 46px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-center-section-button {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.84rem;
  font-weight: 850;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.app-center-section-button:hover,
.app-center-section-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
}

.app-center-section-button.is-active {
  border-color: rgba(255, 255, 255, 0.26);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.app-center-section-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.86rem;
  line-height: 1;
}

.app-center-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  justify-items: center;
}

.app-center-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(var(--app-center-header-offset));
}

.app-center-view-toggle[hidden] {
  display: none;
}

.app-center-view-button {
  min-width: 58px;
  height: 26px;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 800;
}

.app-center-view-button.is-active {
  color: #182033;
  background: rgba(255, 255, 255, 0.86);
}

.app-center-meta {
  min-height: 22px;
  margin: 12px 0 18px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.82rem;
  font-weight: 700;
  transform: translateX(var(--app-center-header-offset));
}

.app-center-content {
  width: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 4px clamp(42px, 6vh, 72px);
  outline: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.app-center-content::-webkit-scrollbar {
  width: 8px;
}

.app-center-content::-webkit-scrollbar-track {
  background: transparent;
}

.app-center-content::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.app-center-grid {
  width: min(1060px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(78px, 96px));
  justify-content: center;
  gap: clamp(24px, 4vw, 44px) clamp(18px, 4vw, 48px);
}

.app-center-folder-grid {
  padding-top: 14px;
}

.app-center-workflow-grid {
  justify-content: start;
}

.app-center-app,
.app-center-folder {
  position: relative;
  width: 96px;
  min-height: 112px;
  padding: 0;
  display: grid;
  grid-template-rows: 72px minmax(32px, auto);
  justify-items: center;
  align-items: start;
  gap: 8px;
  border-radius: 18px;
  color: #ffffff;
  background: transparent;
  text-align: center;
}

.app-center-app:focus-visible,
.app-center-folder:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.62);
  outline-offset: 5px;
}

.app-center-app-face,
.app-center-folder-face {
  position: relative;
  width: 72px;
  height: 72px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.07)),
    rgba(20, 24, 38, 0.36);
  box-shadow:
    0 18px 30px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  transition: transform 160ms ease, filter 160ms ease;
}

.app-center-app:hover .app-center-app-face,
.app-center-app:focus-visible .app-center-app-face,
.app-center-folder:hover .app-center-folder-face,
.app-center-folder:focus-visible .app-center-folder-face {
  transform: translateY(-3px);
  filter: brightness(1.06);
}

.app-center-app:active .app-center-app-face,
.app-center-folder:active .app-center-folder-face {
  transform: translateY(0);
}

.app-center-app-image,
.app-center-folder-preview-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 180ms ease;
}

.app-center-app-face[data-has-image="true"] {
  background: none;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.24);
}

.app-center-app-face[data-has-image="true"] .app-center-app-image,
.app-center-folder-preview[data-has-image="true"] .app-center-folder-preview-image {
  opacity: 1;
}

.app-center-app-face[data-has-image="true"] .app-center-app-glyph,
.app-center-folder-preview[data-has-image="true"] .app-center-folder-preview-glyph {
  opacity: 0;
}

.app-center-app-glyph {
  position: relative;
  z-index: 2;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.12rem;
  font-weight: 900;
}

.app-center-app-label {
  width: 100%;
  min-height: 32px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.74rem;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-center-folder-face {
  padding: 9px;
  background: rgba(255, 255, 255, 0.12);
}

.app-center-folder-preview-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 5px;
}

.app-center-folder-preview {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.app-center-folder-preview.is-placeholder {
  background: rgba(255, 255, 255, 0.07);
}

.app-center-folder-preview-glyph {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.58rem;
  font-weight: 900;
}

.app-center-folder-count {
  position: absolute;
  right: 4px;
  top: -8px;
  z-index: 4;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.76);
  color: #17212b;
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.68rem;
  font-weight: 900;
  pointer-events: none;
}

.app-center-category-header {
  width: min(1060px, 100%);
  margin: 0 auto 22px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
}

.app-center-category-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.08rem;
  text-align: center;
}

.app-center-back.icon-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.7rem;
}

.app-center-empty {
  width: min(420px, calc(100% - 32px));
  min-height: 120px;
  margin: 5vh auto 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.app-center-loading-grid {
  pointer-events: none;
}

.app-center-loading-item {
  width: 72px;
  height: 102px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  opacity: 0.52;
}

body[data-theme="light"] .app-center-overlay {
  color: #1d2430;
  background:
    linear-gradient(135deg, rgba(118, 151, 205, 0.58), rgba(194, 119, 169, 0.48) 45%, rgba(91, 154, 169, 0.5)),
    rgba(236, 242, 248, 0.72);
}

body[data-theme="light"] .app-center-search-input {
  color: #1d2430;
  border-color: rgba(27, 42, 54, 0.14);
  background: rgba(255, 255, 255, 0.58);
}

body[data-theme="light"] .app-center-search-input::placeholder,
body[data-theme="light"] .app-center-search-icon,
body[data-theme="light"] .app-center-meta {
  color: rgba(29, 36, 48, 0.55);
}

body[data-theme="light"] .app-center-view-toggle,
body[data-theme="light"] .app-center-section-button,
body[data-theme="light"] .app-center-close.icon-btn,
body[data-theme="light"] .app-center-back.icon-btn {
  border-color: rgba(27, 42, 54, 0.12);
  background: rgba(255, 255, 255, 0.42);
  color: rgba(29, 36, 48, 0.74);
}

body[data-theme="light"] .app-center-view-button {
  color: rgba(29, 36, 48, 0.62);
}

body[data-theme="light"] .app-center-section-button {
  color: rgba(29, 36, 48, 0.66);
}

body[data-theme="light"] .app-center-section-button:hover,
body[data-theme="light"] .app-center-section-button:focus-visible,
body[data-theme="light"] .app-center-section-button.is-active {
  color: #17212b;
  background: rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .app-center-section-icon {
  color: rgba(29, 36, 48, 0.78);
  background: rgba(255, 255, 255, 0.48);
}

body[data-theme="light"] .app-center-view-button.is-active {
  color: #17212b;
  background: rgba(255, 255, 255, 0.86);
}

body[data-theme="light"] .app-center-app-label,
body[data-theme="light"] .app-center-category-header h2,
body[data-theme="light"] .app-center-empty {
  color: #17212b;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.6);
}

@media (max-width: 720px) {
  .app-center-overlay {
    padding: 18px 12px 10px;
  }

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

  .app-center-close.icon-btn {
    top: 0;
    right: 2px;
  }

  .app-center-search-row {
    width: min(280px, calc(100vw - 86px));
    margin-top: 2px;
  }

  .app-center-meta {
    margin-bottom: 14px;
  }

  .app-center-body {
    --app-center-rail-space: 0px;
    --app-center-header-offset: 0px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .app-center-sidebar {
    padding-top: 0;
    flex-direction: row;
    justify-content: center;
  }

  .app-center-section-button {
    width: auto;
    min-width: 112px;
    min-height: 36px;
    border-radius: 999px;
    justify-content: center;
  }

  .app-center-grid {
    grid-template-columns: repeat(auto-fit, minmax(70px, 82px));
    gap: 20px 10px;
  }

  .app-center-app,
  .app-center-folder {
    width: 82px;
    min-height: 102px;
    grid-template-rows: 62px minmax(32px, auto);
  }

  .app-center-app-face,
  .app-center-folder-face {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .app-center-folder-face {
    padding: 8px;
  }

  .app-center-app-label {
    font-size: 0.68rem;
  }
}

.spotlight-overlay {
  position: fixed;
  inset: 0;
  z-index: 120000;
  display: grid;
  place-items: start center;
  padding-top: 14vh;
  background: rgba(7, 10, 18, 0.35);
  backdrop-filter: blur(16px) saturate(0.92);
  -webkit-backdrop-filter: blur(16px) saturate(0.92);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.spotlight-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.spotlight-overlay[hidden] {
  display: none !important;
}

.spotlight-modal {
  width: min(560px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 28vh));
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(28, 32, 44, 0.98), rgba(18, 21, 30, 0.97)),
    rgba(18, 21, 30, 0.97);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  overflow: hidden;
}

.spotlight-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.spotlight-search-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-dim, rgba(255,255,255,0.55));
}

.spotlight-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text-main, #f3efe7);
  font-size: 1.05rem;
  line-height: 1.4;
  outline: none;
  padding: 2px 0;
}

.spotlight-input::placeholder {
  color: var(--text-dim, rgba(255,255,255,0.4));
}

.spotlight-shortcut-hint {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim, rgba(255,255,255,0.5));
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 3px 8px;
  letter-spacing: 0.02em;
}

.spotlight-results {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.spotlight-results::-webkit-scrollbar {
  width: 5px;
}

.spotlight-results::-webkit-scrollbar-track {
  background: transparent;
}

.spotlight-results::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

.spotlight-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-dim, rgba(255,255,255,0.45));
  font-size: 0.92rem;
}

.spotlight-result {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 14px;
  border: none;
  background: transparent;
  color: var(--text-main, #f3efe7);
  cursor: pointer;
  transition: background 120ms ease;
}

.spotlight-result:hover,
.spotlight-result.is-selected {
  background: rgba(255, 255, 255, 0.08);
}

.spotlight-result-icon {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.88rem;
  font-weight: 850;
}

.spotlight-result-icon-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
}

.spotlight-result-icon[data-has-image="true"] .spotlight-result-icon-image {
  opacity: 1;
}

.spotlight-result-icon[data-has-image="true"] .spotlight-result-icon-glyph {
  opacity: 0;
}

.spotlight-result-icon-glyph {
  position: relative;
  z-index: 1;
}

.spotlight-result-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.spotlight-result-title {
  font-size: 0.96rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-result-desc {
  font-size: 0.82rem;
  color: var(--text-dim, rgba(255,255,255,0.55));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
}

.spotlight-badge-official {
  color: #f7a24c;
  background: rgba(247, 162, 76, 0.12);
}

.spotlight-badge-local {
  color: #7ec58a;
  background: rgba(126, 197, 138, 0.12);
}

.spotlight-badge-market {
  color: #8fb0ff;
  background: rgba(143, 176, 255, 0.12);
}

.spotlight-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.spotlight-footer-hint {
  font-size: 0.72rem;
  color: var(--text-dim, rgba(255,255,255,0.4));
  display: flex;
  align-items: center;
  gap: 6px;
}

.spotlight-footer-hint kbd {
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-dim, rgba(255,255,255,0.55));
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 2px 6px;
}

body[data-theme="light"] .spotlight-overlay {
  background: rgba(240, 242, 246, 0.45);
}

body[data-theme="light"] .spotlight-modal {
  border-color: rgba(0, 0, 0, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.97)),
    rgba(248, 250, 252, 0.97);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.14),
    0 0 0 1px rgba(0, 0, 0, 0.04) inset;
}

body[data-theme="light"] .spotlight-search-row {
  border-color: rgba(0, 0, 0, 0.06);
}

body[data-theme="light"] .spotlight-input {
  color: #1d2430;
}

body[data-theme="light"] .spotlight-input::placeholder {
  color: rgba(29, 36, 48, 0.45);
}

.skill-plugin-center-shell {
  --skill-accent: #7d55ff;
  --skill-accent-2: #8f55f0;
  --skill-accent-3: #6c42e7;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  position: relative;
  color: var(--pc-text-main);
  background:
    radial-gradient(circle at 18% 8%, rgba(125, 85, 255, 0.28), transparent 34%),
    linear-gradient(145deg, rgba(12, 16, 28, 0.96), rgba(26, 22, 58, 0.92));
  overflow: hidden;
}

body[data-theme="light"] .skill-plugin-center-shell {
  background:
    radial-gradient(circle at 18% 8%, rgba(125, 85, 255, 0.16), transparent 38%),
    linear-gradient(145deg, #fbf9ff, #f3efff);
}

.skill-plugin-center-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 14px;
  align-items: center;
  margin: 12px 12px 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(125, 85, 255, 0.2), rgba(143, 85, 240, 0.14));
  box-shadow: 0 14px 36px rgba(20, 15, 58, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body[data-theme="light"] .skill-plugin-center-hero {
  border-color: rgba(89, 62, 170, 0.16);
  background:
    linear-gradient(135deg, rgba(125, 85, 255, 0.15), rgba(255, 255, 255, 0.82));
  box-shadow: 0 12px 28px rgba(74, 55, 139, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.skill-plugin-center-hero-copy {
  display: grid;
  gap: 4px;
}

.skill-plugin-center-hero-kicker {
  display: none;
}

.skill-plugin-center-title {
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
  color: #fff;
}

body[data-theme="light"] .skill-plugin-center-title {
  color: #21143f;
}

.skill-plugin-center-subtitle {
  max-width: 920px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
  -webkit-line-clamp: unset;
  overflow: visible;
}

body[data-theme="light"] .skill-plugin-center-subtitle {
  color: #5a4b78;
}

.skill-plugin-center-hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  align-self: center;
}

.skill-plugin-center-hero-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

body[data-theme="light"] .skill-plugin-center-hero-pill {
  border-color: rgba(108, 66, 231, 0.18);
  background: rgba(248, 246, 255, 0.9);
  color: #57427d;
}

.skill-plugin-center-tabs {
  display: flex;
  gap: 0;
  margin: 0 12px 10px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-theme="light"] .skill-plugin-center-tabs {
  border-bottom-color: rgba(89, 62, 170, 0.14);
}

.skill-plugin-center-tabs .plugin-center-tab {
  min-height: 34px;
  width: auto;
  min-width: 78px;
  padding: 0 16px 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-bottom: -2px;
  background: transparent;
  color: var(--pc-text-faint);
  box-shadow: none;
  transform: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
}

.skill-plugin-center-tabs .plugin-center-tab:hover {
  color: var(--pc-text-main);
  background: transparent;
  transform: none;
  box-shadow: none;
}

.skill-plugin-center-tabs .plugin-center-tab.is-active {
  border-bottom-color: var(--skill-accent);
  background: transparent;
  color: var(--skill-accent);
  box-shadow: none;
  transform: none;
}

.skill-plugin-center-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 12px 10px;
}

.skill-plugin-center-status-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

body[data-theme="light"] .skill-plugin-center-status-chip {
  border-color: rgba(108, 66, 231, 0.18);
  background: rgba(248, 246, 255, 0.9);
  color: #57427d;
}

.skill-plugin-center-status-chip.is-busy {
  background: rgba(125, 85, 255, 0.16);
  color: #d9dcff;
}

body[data-theme="light"] .skill-plugin-center-status-chip.is-busy {
  background: rgba(125, 85, 255, 0.1);
  color: #5b3fd3;
}

.skill-plugin-center-notice {
  margin: 0 12px 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 13, 28, 0.72);
  color: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

body[data-theme="light"] .skill-plugin-center-notice {
  border-color: rgba(89, 62, 170, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: #57427d;
}

.skill-plugin-center-notice.is-success {
  border-color: rgba(126, 197, 138, 0.26);
  background: rgba(126, 197, 138, 0.1);
  color: var(--ok);
}

.skill-plugin-center-notice.is-error {
  border-color: rgba(199, 82, 82, 0.28);
  background: rgba(199, 82, 82, 0.1);
  color: #f7c8c8;
}

.skill-plugin-center-notice-text {
  font-size: 0.84rem;
  line-height: 1.55;
}

.skill-plugin-center-body {
  flex: 1;
  min-height: 0;
  margin: 0 12px 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 13, 28, 0.72);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  overflow: auto;
}

body[data-theme="light"] .skill-plugin-center-body {
  border-color: rgba(89, 62, 170, 0.14);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(74, 55, 139, 0.08);
}

.skill-plugin-center-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.skill-plugin-center-search {
  min-height: 38px;
  border-radius: 8px;
  font-size: 13px;
}

.skill-plugin-center-toolbar-action {
  min-height: 36px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(81, 42, 189, 0.18);
}

.skill-plugin-center-toolbar-discover {
  min-width: 82px;
  background: linear-gradient(135deg, var(--skill-accent) 0%, var(--skill-accent-2) 48%, var(--skill-accent-3) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(81, 42, 189, 0.22);
}

.skill-plugin-center-toolbar-config {
  min-width: 72px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: #d9dcff;
  box-shadow: none;
}

body[data-theme="light"] .skill-plugin-center-toolbar-config {
  border-color: rgba(108, 66, 231, 0.16);
  background: rgba(125, 85, 255, 0.08);
  color: #5b3fd3;
}

.skill-plugin-center-split {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(0, 1.75fr);
  gap: 12px;
  min-height: 0;
  align-items: start;
}

.skill-plugin-center-rail,
.skill-plugin-center-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.skill-plugin-center-rail-item {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(3, 6, 18, 0.35);
  color: var(--pc-text-main);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

body[data-theme="light"] .skill-plugin-center-rail-item {
  border-color: rgba(89, 62, 170, 0.12);
  background: rgba(248, 246, 255, 0.72);
}

.skill-plugin-center-rail-item:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 85, 255, 0.36);
  box-shadow: 0 12px 24px rgba(20, 15, 58, 0.2);
}

.skill-plugin-center-rail-item.is-active {
  border-color: rgba(125, 85, 255, 0.44);
  background: rgba(125, 85, 255, 0.16);
}

.skill-plugin-center-rail-id {
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
  word-break: break-word;
}

.skill-plugin-center-rail-score {
  color: var(--pc-text-soft);
  font-size: 0.76rem;
}

.skill-plugin-center-detail-card,
.skill-plugin-center-mine-card {
  cursor: default;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(3, 6, 18, 0.35);
  box-shadow: none;
}

body[data-theme="light"] .skill-plugin-center-detail-card,
body[data-theme="light"] .skill-plugin-center-mine-card {
  border-color: rgba(89, 62, 170, 0.12);
  background: rgba(248, 246, 255, 0.72);
}

.skill-plugin-center-card-main {
  gap: 12px;
}

.skill-plugin-center-detail-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(125, 85, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body[data-theme="light"] .skill-plugin-center-detail-primary-actions {
  border-color: rgba(108, 66, 231, 0.16);
  background: rgba(255, 255, 255, 0.62);
}

.skill-plugin-center-detail-cta {
  min-width: 112px;
  min-height: 36px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--skill-accent) 0%, var(--skill-accent-2) 48%, var(--skill-accent-3) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(81, 42, 189, 0.22);
}

.skill-plugin-center-secondary-action {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: #d9dcff;
  box-shadow: none;
}

body[data-theme="light"] .skill-plugin-center-secondary-action {
  border-color: rgba(108, 66, 231, 0.16);
  background: rgba(125, 85, 255, 0.08);
  color: #5b3fd3;
}

.skill-plugin-center-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.skill-plugin-center-panel-header .skill-plugin-center-panel-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.skill-plugin-center-md-panel {
  position: relative;
}

.skill-plugin-center-panel-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: var(--pc-text-main);
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 500;
  flex: none;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.skill-plugin-center-panel-close:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 85, 255, 0.4);
  background: rgba(125, 85, 255, 0.14);
  box-shadow: 0 8px 18px rgba(20, 15, 58, 0.16);
}

.skill-plugin-center-panel-close:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--pc-accent) 52%, var(--pc-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--pc-accent) 44%, transparent);
}

.skill-plugin-center-card-header-wide,
.skill-plugin-center-card-title-block-wide {
  gap: 8px;
}

.skill-plugin-center-card-title-row-wide {
  justify-content: space-between;
  align-items: flex-start;
}

.skill-plugin-center-card-footer-wide {
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  gap: 0;
}

.skill-plugin-center-actions-wide {
  justify-content: flex-start;
}

.skill-plugin-center-detail-title,
.skill-plugin-center-mine-title {
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: 0;
}

.skill-plugin-center-detail-skill-name,
.skill-plugin-center-mine-kicker {
  color: #d9dcff;
  font-size: 12px;
  letter-spacing: 0;
}

body[data-theme="light"] .skill-plugin-center-detail-skill-name,
body[data-theme="light"] .skill-plugin-center-mine-kicker {
  color: #5b3fd3;
}

.skill-plugin-center-detail-description,
.skill-plugin-center-mine-description {
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.skill-plugin-center-detail-source {
  font-size: 12px;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.skill-plugin-center-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
}

.skill-plugin-center-metric {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

body[data-theme="light"] .skill-plugin-center-metric {
  border-color: rgba(89, 62, 170, 0.12);
  background: rgba(255, 255, 255, 0.58);
}

.skill-plugin-center-metric-label {
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--pc-text-faint);
  font-weight: 700;
}

.skill-plugin-center-metric-value {
  color: var(--pc-text-main);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
}

.skill-plugin-center-detail-lines {
  display: grid;
  gap: 8px;
  margin-top: 0;
}

.skill-plugin-center-detail-lines-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skill-plugin-center-mine-detail-lines {
  grid-template-columns: minmax(0, 1.6fr) minmax(140px, 0.75fr) minmax(88px, 0.45fr);
}

.skill-plugin-center-mine-detail-lines-compact {
  gap: 10px;
}

.skill-plugin-center-detail-line-span-2 {
  grid-column: span 2;
}

.skill-plugin-center-mine-list {
  grid-template-columns: minmax(0, 1fr);
}

.skill-plugin-center-mine-card {
  padding: 12px;
}

.magic-creation-history-lines {
  grid-template-columns: minmax(0, 1fr) minmax(132px, 132px) minmax(72px, 72px);
}

.magic-creation-history-message {
  grid-column: auto;
}

.magic-creation-history-lines .skill-plugin-center-detail-line-value {
  word-break: break-word;
}

.magic-creation-history-lines .skill-plugin-center-detail-line:nth-child(2) .skill-plugin-center-detail-line-value,
.magic-creation-history-lines .skill-plugin-center-detail-line:nth-child(3) .skill-plugin-center-detail-line-value {
  white-space: nowrap;
}

.skill-plugin-center-detail-line {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

body[data-theme="light"] .skill-plugin-center-detail-line {
  border-color: rgba(89, 62, 170, 0.12);
  background: rgba(255, 255, 255, 0.58);
}

.skill-plugin-center-detail-line-label {
  color: var(--pc-text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.skill-plugin-center-detail-line-value {
  color: var(--pc-text-main);
  font-size: 12px;
  line-height: 1.55;
}

.skill-plugin-center-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(12, 16, 28, 0.72);
  backdrop-filter: blur(12px) saturate(1.1);
  z-index: 20;
}

body[data-theme="light"] .skill-plugin-center-overlay {
  background: rgba(248, 246, 255, 0.72);
}

.skill-plugin-center-panel {
  width: min(760px, 100%);
  max-height: 82vh;
  overflow: auto;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(145deg, rgba(20, 18, 44, 0.96), rgba(12, 14, 28, 0.96));
  box-shadow: 0 28px 70px rgba(20, 15, 58, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body[data-theme="light"] .skill-plugin-center-panel {
  border-color: rgba(89, 62, 170, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 243, 255, 0.96));
  box-shadow: 0 28px 70px rgba(74, 55, 139, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.skill-plugin-center-panel-wide {
  width: min(980px, 100%);
}

.skill-plugin-center-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.skill-plugin-center-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.skill-plugin-center-field-span {
  grid-column: 1 / -1;
}

.skill-plugin-center-inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.skill-plugin-center-checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--pc-text-main);
  font-size: 12px;
}

.skill-plugin-center-field .plugin-center-card-kicker {
  font-size: 12px;
  letter-spacing: 0;
  color: #d9dcff;
}

body[data-theme="light"] .skill-plugin-center-field .plugin-center-card-kicker {
  color: #5b3fd3;
}

.skill-plugin-center-field .plugin-center-market-select,
.skill-plugin-center-panel .plugin-center-market-select {
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: var(--pc-text-main);
  font-size: 13px;
  line-height: 1.35;
  padding: 8px 9px;
}

.skill-plugin-center-field .plugin-center-market-select:focus,
.skill-plugin-center-panel .plugin-center-market-select:focus {
  border-color: rgba(217, 220, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(125, 85, 255, 0.18);
}

body[data-theme="light"] .skill-plugin-center-field .plugin-center-market-select,
body[data-theme="light"] .skill-plugin-center-panel .plugin-center-market-select {
  border-color: rgba(89, 62, 170, 0.16);
  background: rgba(255, 255, 255, 0.86);
  color: #23193d;
}

.skill-plugin-center-simple-install-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: #d9dcff;
  font-size: 12px;
  font-weight: 700;
}

body[data-theme="light"] .skill-plugin-center-simple-install-toggle {
  border-color: rgba(108, 66, 231, 0.16);
  background: rgba(125, 85, 255, 0.08);
  color: #5b3fd3;
}

.skill-plugin-center-mine-status-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.skill-plugin-center-shell .plugin-center-status {
  min-height: 24px;
  padding: 0 8px;
  background: rgba(125, 85, 255, 0.16);
  color: #d9dcff;
  font-size: 11px;
}

body[data-theme="light"] .skill-plugin-center-shell .plugin-center-status {
  background: rgba(125, 85, 255, 0.1);
  color: #5b3fd3;
}

.skill-plugin-center-shell .plugin-center-launch,
.skill-plugin-center-shell .plugin-center-publish,
.skill-plugin-center-shell .plugin-center-delete {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.skill-plugin-center-shell .plugin-center-launch {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, var(--skill-accent) 0%, var(--skill-accent-2) 48%, var(--skill-accent-3) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(81, 42, 189, 0.22);
}

.skill-plugin-center-shell .plugin-center-publish {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: #d9dcff;
  box-shadow: none;
}

body[data-theme="light"] .skill-plugin-center-shell .plugin-center-publish {
  border-color: rgba(108, 66, 231, 0.16);
  background: rgba(125, 85, 255, 0.08);
  color: #5b3fd3;
}

.magic-creation-create-panel {
  display: grid;
  gap: 14px;
}

.magic-creation-textarea {
  min-height: 240px;
  resize: vertical;
}

.magic-creation-event-panel {
  margin-top: 12px;
  max-height: 320px;
  overflow: auto;
}

.magic-creation-event-list {
  display: grid;
  gap: 10px;
}

.magic-creation-event-row {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

body[data-theme="light"] .magic-creation-event-row {
  border-color: rgba(89, 62, 170, 0.12);
  background: rgba(255, 255, 255, 0.58);
}

.magic-plugin-editor-shell .skill-plugin-center-detail-card {
  min-height: 280px;
}

.magic-plugin-editor-shell .magic-plugin-editor-body,
.magic-plugin-editor-shell .magic-plugin-editor-form {
  width: 100%;
}

.magic-plugin-editor-shell .magic-plugin-editor-textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.magic-plugin-editor-shell .magic-plugin-editor-history-lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.magic-plugin-editor-shell .magic-plugin-editor-history-row-top {
  display: grid;
  grid-template-columns: minmax(0, 2.6fr) minmax(110px, 0.4fr);
  gap: 16px;
  align-items: start;
}

.magic-plugin-editor-shell .magic-plugin-editor-history-row-bottom {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(140px, 0.6fr) minmax(110px, 0.4fr);
  gap: 16px;
  align-items: start;
}

.magic-plugin-editor-shell .magic-plugin-editor-latest-row,
.magic-plugin-editor-shell .magic-plugin-editor-requirement-row {
  min-width: 0;
}

.magic-plugin-editor-shell .magic-plugin-editor-status-row,
.magic-plugin-editor-shell .magic-plugin-editor-updated-row,
.magic-plugin-editor-shell .magic-plugin-editor-version-row {
  min-width: 0;
}

.magic-plugin-editor-shell .magic-plugin-editor-latest-row .skill-plugin-center-detail-line-value,
.magic-plugin-editor-shell .magic-plugin-editor-requirement-row .skill-plugin-center-detail-line-value {
  white-space: pre-wrap;
  word-break: break-word;
}

.magic-plugin-editor-shell .skill-plugin-center-detail-description {
  max-width: 56rem;
}

.magic-creation-event-meta {
  color: var(--pc-text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.magic-creation-event-text {
  color: var(--pc-text-main);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.skill-plugin-center-config-json {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.84);
  max-height: 520px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(3, 6, 18, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
}

body[data-theme="light"] .skill-plugin-center-config-json {
  color: #2b2045;
  background: rgba(248, 246, 255, 0.9);
  border-color: rgba(89, 62, 170, 0.1);
}

.skill-plugin-center-markdown {
  color: var(--pc-text-main);
  font-size: 13px;
}

.skill-plugin-center-markdown-p {
  line-height: 1.75;
  margin: 12px 0;
}

.skill-plugin-center-markdown-h1 {
  margin: 22px 0 12px;
  font-size: 1.45rem;
}

.skill-plugin-center-markdown-h2 {
  margin: 20px 0 10px;
  font-size: 1.2rem;
}

.skill-plugin-center-markdown-h3 {
  margin: 18px 0 8px;
  font-size: 1rem;
}

.skill-plugin-center-markdown-code {
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 6px;
}

.skill-plugin-center-markdown-empty {
  opacity: .7;
}

@media (max-width: 1180px) {
  .skill-plugin-center-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .skill-plugin-center-hero-meta {
    justify-content: flex-start;
  }

  .skill-plugin-center-split {
    grid-template-columns: 1fr;
  }

  .skill-plugin-center-metrics,
  .skill-plugin-center-detail-lines-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skill-plugin-center-mine-detail-lines {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .magic-creation-history-lines {
    grid-template-columns: minmax(0, 1fr) minmax(132px, 132px) minmax(72px, 72px);
  }
}

@media (max-width: 760px) {
  .skill-plugin-center-toolbar {
    grid-template-columns: 1fr;
  }

  .skill-plugin-center-config-grid,
  .skill-plugin-center-metrics,
  .skill-plugin-center-detail-lines-grid,
  .skill-plugin-center-mine-detail-lines {
    grid-template-columns: 1fr;
  }

  .skill-plugin-center-detail-line-span-2 {
    grid-column: auto;
  }

  .skill-plugin-center-hero {
    margin: 10px 10px 8px;
    padding: 10px 12px;
  }

  .skill-plugin-center-tabs,
  .skill-plugin-center-statusbar,
  .skill-plugin-center-notice {
    margin-left: 10px;
    margin-right: 10px;
  }

  .skill-plugin-center-body {
    margin: 0 10px 10px;
    padding: 10px;
  }

  .skill-plugin-center-card-title-row-wide {
    flex-direction: column;
    align-items: flex-start;
  }

  .skill-plugin-center-detail-primary-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .skill-plugin-center-detail-cta,
  .skill-plugin-center-secondary-action {
    width: 100%;
    justify-content: center;
  }
}

.skill-plugin-center-panel-title {
  margin-top: 0;
}

.skill-plugin-center-rail-name {
  color: var(--pc-text-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.skill-plugin-center-mine-card .plugin-center-card-copy {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body[data-theme="light"] .spotlight-shortcut-hint {
  color: rgba(29, 36, 48, 0.55);
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] .spotlight-result:hover,
body[data-theme="light"] .spotlight-result.is-selected {
  background: rgba(0, 0, 0, 0.05);
}

body[data-theme="light"] .spotlight-result {
  color: #1d2430;
}

body[data-theme="light"] .spotlight-result-desc {
  color: rgba(29, 36, 48, 0.55);
}

body[data-theme="light"] .spotlight-empty {
  color: rgba(29, 36, 48, 0.45);
}

body[data-theme="light"] .spotlight-footer {
  border-color: rgba(0, 0, 0, 0.05);
}

body[data-theme="light"] .spotlight-footer-hint {
  color: rgba(29, 36, 48, 0.4);
}

body[data-theme="light"] .spotlight-footer-hint kbd {
  color: rgba(29, 36, 48, 0.55);
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] .spotlight-search-icon {
  color: rgba(29, 36, 48, 0.5);
}

.spotlight-btn.icon-btn,
.app-center-btn.icon-btn,
.plugin-admin-topbar-btn.icon-btn,
.advance-lab-topbar-btn.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: var(--text-main, #f3efe7);
  background: color-mix(in srgb, var(--panel-bg) 88%, transparent);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
  transition: transform 120ms ease, background 120ms ease;
}

.plugin-admin-topbar-btn.icon-btn {
  color: #fff7e5;
  background: linear-gradient(135deg, rgba(240, 168, 74, 0.9), rgba(119, 92, 230, 0.72));
  border-color: rgba(255, 226, 164, 0.34);
}

.advance-lab-topbar-btn.icon-btn {
  color: #e9fbff;
  background: linear-gradient(135deg, rgba(50, 160, 210, 0.92), rgba(86, 125, 255, 0.76));
  border-color: rgba(158, 222, 255, 0.34);
}

.plugin-admin-topbar-btn.icon-btn svg,
.advance-lab-topbar-btn.icon-btn svg {
  width: 19px;
  height: 19px;
}

.spotlight-btn.icon-btn:hover,
.app-center-btn.icon-btn:hover,
.plugin-admin-topbar-btn.icon-btn:hover,
.advance-lab-topbar-btn.icon-btn:hover {
  transform: scale(1.05);
  background: color-mix(in srgb, var(--panel-bg) 96%, transparent);
}

.plugin-admin-topbar-btn.icon-btn:hover {
  background: linear-gradient(135deg, rgba(246, 183, 91, 0.96), rgba(132, 108, 246, 0.82));
}

.advance-lab-topbar-btn.icon-btn:hover {
  background: linear-gradient(135deg, rgba(72, 179, 229, 0.98), rgba(101, 140, 255, 0.86));
}

body[data-theme="light"] .spotlight-btn.icon-btn,
body[data-theme="light"] .app-center-btn.icon-btn,
body[data-theme="light"] .plugin-admin-topbar-btn.icon-btn,
body[data-theme="light"] .advance-lab-topbar-btn.icon-btn {
  color: #1d2430;
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] .plugin-admin-topbar-btn.icon-btn {
  color: #352414;
  background: linear-gradient(135deg, rgba(255, 214, 134, 0.9), rgba(205, 195, 255, 0.8));
  border-color: rgba(116, 85, 22, 0.18);
}

body[data-theme="light"] .advance-lab-topbar-btn.icon-btn {
  color: #173b55;
  background: linear-gradient(135deg, rgba(178, 226, 255, 0.94), rgba(206, 218, 255, 0.86));
  border-color: rgba(36, 101, 144, 0.18);
}

body[data-theme="light"] .spotlight-btn.icon-btn:hover,
body[data-theme="light"] .app-center-btn.icon-btn:hover,
body[data-theme="light"] .plugin-admin-topbar-btn.icon-btn:hover,
body[data-theme="light"] .advance-lab-topbar-btn.icon-btn:hover {
  background: rgba(255, 255, 255, 0.88);
}

body[data-theme="light"] .plugin-admin-topbar-btn.icon-btn:hover {
  background: linear-gradient(135deg, rgba(255, 224, 154, 0.96), rgba(218, 211, 255, 0.9));
}

body[data-theme="light"] .advance-lab-topbar-btn.icon-btn:hover {
  background: linear-gradient(135deg, rgba(194, 234, 255, 0.98), rgba(218, 226, 255, 0.92));
}

body[data-theme="dark"] .compound-workflow-chat-main .waterfall-message {
  border-color: rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

body[data-theme="dark"] .compound-workflow-chat-main .waterfall-message.has-assistant-avatar {
  background: transparent;
  box-shadow: none;
}

body[data-theme="dark"] .compound-workflow-chat-main .waterfall-message.has-assistant-avatar .waterfall-message-body {
  border-color: rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

body[data-theme="dark"] .compound-workflow-chat-main .waterfall-message-avatar {
  border-color: rgba(177, 139, 255, 0.24);
  background: rgba(15, 23, 42, 0.72);
}

body[data-theme="dark"] .compound-workflow-chat-main .waterfall-message.is-workflow-opening {
  border-color: rgba(177, 139, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.82)),
    rgba(15, 23, 42, 0.82);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .compound-workflow-chat-main .waterfall-message.is-user {
  background: rgba(14, 116, 144, 0.24);
}

body[data-theme="dark"] .compound-workflow-chat-main .waterfall-message-content {
  color: rgba(248, 250, 252, 0.94);
}

body[data-theme="dark"] .compound-workflow-chat-main .waterfall-message-role {
  color: rgba(203, 213, 225, 0.58);
}

body[data-theme="dark"] .compound-workflow-action-panel {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(8, 13, 25, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

body[data-theme="dark"] .compound-workflow-task-panel-copy strong,
body[data-theme="dark"] .compound-workflow-video-task-body strong {
  color: #f8fafc;
}

body[data-theme="dark"] .compound-workflow-task-panel-copy p,
body[data-theme="dark"] .compound-workflow-video-task-body p {
  color: rgba(203, 213, 225, 0.66);
}

body[data-theme="dark"] .compound-workflow-task-panel-close,
body[data-theme="dark"] .compound-workflow-video-task {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.74);
  color: #e2e8f0;
}

body[data-theme="dark"] .compound-workflow-video-task.is-done {
  background: rgba(20, 83, 45, 0.32);
}

body[data-theme="dark"] .compound-workflow-video-task.is-running {
  background: rgba(30, 64, 175, 0.26);
}

body[data-theme="dark"] .compound-workflow-video-task.is-failed {
  background: rgba(127, 29, 29, 0.3);
}

body[data-theme="dark"] .compound-workflow-assistant-window .waterfall-chat-composer {
  border-color: rgba(148, 163, 184, 0.16);
  background: #020617;
}

body[data-theme="dark"] .compound-workflow-assistant-window .waterfall-chat-input {
  background: #020617;
  color: #e5e7eb;
}

body[data-theme="dark"] .compound-workflow-assistant-window .waterfall-chat-send-btn {
  color: #c4b5fd;
}

body[data-theme="dark"] .compound-workflow-assistant-window .waterfall-chat-send-btn:not(:disabled):hover,
body[data-theme="dark"] .compound-workflow-assistant-window .waterfall-chat-send-btn:not(:disabled):focus-visible {
  background: rgba(124, 58, 237, 0.16);
  color: #ddd6fe;
}

body[data-theme="dark"] .compound-workflow-surface-tabs {
  border-color: rgba(71, 85, 105, 0.74);
  background: rgba(2, 6, 23, 0.72);
}

body[data-theme="dark"] .compound-workflow-surface-tab {
  color: rgba(203, 213, 225, 0.72);
  background: transparent;
}

body[data-theme="dark"] .compound-workflow-surface-tab:hover,
body[data-theme="dark"] .compound-workflow-surface-tab:focus-visible {
  color: #f8fafc;
  background: rgba(51, 65, 85, 0.68);
}

body[data-theme="dark"] .compound-workflow-surface-tab.is-active {
  color: #f8fafc;
  background: rgba(124, 92, 255, 0.72);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
}

body[data-theme="dark"] .compound-workflow-conversation-bar.waterfall-chat-conversations,
body[data-theme="dark"] .compound-workflow-asset-panel .compound-workflow-conversation-bar.waterfall-chat-conversations {
  border-bottom-color: rgba(51, 65, 85, 0.92);
  background: rgba(2, 6, 23, 0.88);
}

body[data-theme="dark"] .compound-workflow-conversation-bar .waterfall-chat-conversation-tab,
body[data-theme="dark"] .compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-tab {
  border-color: transparent;
  background: transparent;
  color: rgba(203, 213, 225, 0.68);
  box-shadow: none;
}

body[data-theme="dark"] .compound-workflow-conversation-bar .waterfall-chat-conversation-tab:hover,
body[data-theme="dark"] .compound-workflow-conversation-bar .waterfall-chat-conversation-tab:focus-visible,
body[data-theme="dark"] .compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-tab:hover,
body[data-theme="dark"] .compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-tab:focus-visible {
  color: #f8fafc;
}

body[data-theme="dark"] .compound-workflow-conversation-bar .waterfall-chat-conversation-tab.is-active,
body[data-theme="dark"] .compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-tab.is-active {
  border-bottom-color: #a78bfa;
  background: transparent;
  color: #c4b5fd;
}

body[data-theme="dark"] .compound-workflow-conversation-bar .waterfall-chat-conversation-tab.is-active::after,
body[data-theme="dark"] .compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-tab.is-active::after {
  background: #a78bfa;
}

body[data-theme="dark"] .compound-workflow-conversation-bar .waterfall-chat-conversation-action,
body[data-theme="dark"] .compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-action {
  background: transparent;
  color: rgba(196, 181, 253, 0.82);
  box-shadow: none;
}

body[data-theme="dark"] .compound-workflow-conversation-bar .waterfall-chat-conversation-action:hover,
body[data-theme="dark"] .compound-workflow-conversation-bar .waterfall-chat-conversation-action:focus-visible,
body[data-theme="dark"] .compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-action:hover,
body[data-theme="dark"] .compound-workflow-asset-panel .compound-workflow-conversation-bar .waterfall-chat-conversation-action:focus-visible {
  background: rgba(124, 58, 237, 0.16);
  color: #ddd6fe;
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left {
  border-color: rgba(71, 85, 105, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 245, 249, 0.88)),
    rgba(248, 250, 252, 0.9);
  color: #172033;
  box-shadow:
    0 18px 36px rgba(51, 65, 85, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

body[data-theme="light"] .compound-workflow-left-header h3,
body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header h3 {
  color: #0f172a;
}

body[data-theme="light"] .compound-workflow-left-header p,
body[data-theme="light"] .compound-workflow-chat-header p,
body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header p {
  color: rgba(30, 41, 59, 0.72);
}

body[data-theme="light"] .compound-workflow-runtime-badge,
body[data-theme="light"] .compound-workflow-runtime-badge[data-runtime-status="legacy"] {
  color: rgba(30, 41, 59, 0.82);
}

body[data-theme="light"] .compound-workflow-runtime-badge[data-runtime-status="langgraph"],
body[data-theme="light"] .compound-workflow-runtime-badge[data-runtime-status="langgraph-executor"],
body[data-theme="light"] .compound-workflow-runtime-badge[data-runtime-status="langgraph-executor-ready"] {
  color: #075985;
}

body[data-theme="light"] .compound-workflow-runtime-badge[data-runtime-status="shadow"],
body[data-theme="light"] .compound-workflow-runtime-badge[data-runtime-status="langgraph-preview"] {
  color: #5b21b6;
}

body[data-theme="light"] .compound-workflow-runtime-diagnostics-btn,
body[data-theme="light"] .compound-workflow-contract-diagnostics-btn {
  border-color: rgba(71, 85, 105, 0.22);
  background: rgba(255, 255, 255, 0.82);
  color: #1e293b;
}

body[data-theme="light"] .compound-workflow-runtime-diagnostics-btn:hover,
body[data-theme="light"] .compound-workflow-runtime-diagnostics-btn:focus-visible,
body[data-theme="light"] .compound-workflow-runtime-diagnostics-btn[aria-expanded="true"],
body[data-theme="light"] .compound-workflow-contract-diagnostics-btn:hover,
body[data-theme="light"] .compound-workflow-contract-diagnostics-btn:focus-visible,
body[data-theme="light"] .compound-workflow-contract-diagnostics-btn[aria-expanded="true"] {
  border-color: rgba(14, 116, 144, 0.34);
  background: rgba(224, 242, 254, 0.9);
  color: #0f172a;
}

body[data-theme="light"] .compound-workflow-contract-diagnostics-btn.is-failed,
body[data-theme="light"] .compound-workflow-contract-diagnostics-btn[data-contract-status="failed"] {
  border-color: rgba(220, 38, 38, 0.34);
  background: rgba(254, 226, 226, 0.88);
  color: #7f1d1d;
}

body[data-theme="light"] .compound-workflow-runtime-diagnostics {
  border-color: rgba(71, 85, 105, 0.16);
  background: rgba(255, 255, 255, 0.78);
  color: #1e293b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 10px 22px rgba(51, 65, 85, 0.1);
}

body[data-theme="light"] .compound-workflow-contract-diagnostics[data-contract-status="failed"] {
  border-color: rgba(220, 38, 38, 0.18);
  background: rgba(255, 241, 242, 0.82);
}

body[data-theme="light"] .compound-workflow-runtime-diagnostics-header strong,
body[data-theme="light"] .compound-workflow-runtime-diagnostics-row span:last-child,
body[data-theme="light"] .compound-workflow-runtime-diagnostics-list span,
body[data-theme="light"] .compound-workflow-executor-shadow-title {
  color: #0f172a;
}

body[data-theme="light"] .compound-workflow-runtime-diagnostics-header span,
body[data-theme="light"] .compound-workflow-runtime-diagnostics-row span:first-child,
body[data-theme="light"] .compound-workflow-runtime-diagnostics-list strong,
body[data-theme="light"] .compound-workflow-executor-shadow-meta {
  color: rgba(51, 65, 85, 0.72);
}

body[data-theme="light"] .compound-workflow-runtime-diagnostics-list li,
body[data-theme="light"] .compound-workflow-executor-shadow-row {
  border-color: rgba(71, 85, 105, 0.12);
  background: rgba(248, 250, 252, 0.78);
}

body[data-theme="light"] .compound-workflow-executor-shadow {
  border-top-color: rgba(71, 85, 105, 0.14);
}

body[data-theme="light"] .compound-workflow-executor-shadow-marker,
body[data-theme="light"] .compound-workflow-executor-shadow-badge {
  background: rgba(15, 23, 42, 0.07);
  color: #1e293b;
}

body[data-theme="light"] .compound-workflow-contract-error-list code {
  background: rgba(254, 226, 226, 0.72);
  color: #7f1d1d;
}

body[data-theme="light"] .compound-workflow-contract-empty {
  color: rgba(51, 65, 85, 0.72);
}

body[data-theme="light"] .compound-workflow-run-observation-controls {
  border-top-color: rgba(71, 85, 105, 0.12);
}

body[data-theme="light"] .compound-workflow-run-observation-action {
  border-color: rgba(71, 85, 105, 0.18);
  background: rgba(255, 255, 255, 0.84);
  color: #1e293b;
}

body[data-theme="light"] .compound-workflow-run-observation-action:hover,
body[data-theme="light"] .compound-workflow-run-observation-action:focus-visible {
  border-color: rgba(13, 148, 136, 0.32);
  background: rgba(204, 251, 241, 0.76);
  color: #0f172a;
}

body[data-theme="light"] .compound-workflow-expert-card {
  border-color: rgba(71, 85, 105, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: #172033;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 20px rgba(51, 65, 85, 0.08);
}

body[data-theme="light"] .compound-workflow-expert-avatar {
  border-color: rgba(13, 148, 136, 0.18);
  background: rgba(240, 253, 250, 0.92);
  color: #0f766e;
}

body[data-theme="light"] .compound-workflow-expert-title,
body[data-theme="light"] .compound-workflow-expert-capabilities-header strong {
  color: #0f172a;
}

body[data-theme="light"] .compound-workflow-expert-eyebrow,
body[data-theme="light"] .compound-workflow-expert-subtitle,
body[data-theme="light"] .compound-workflow-expert-status,
body[data-theme="light"] .compound-workflow-expert-field,
body[data-theme="light"] .compound-workflow-expert-capabilities-meta {
  color: rgba(51, 65, 85, 0.72);
}

body[data-theme="light"] .compound-workflow-expert-description,
body[data-theme="light"] .compound-workflow-expert-methods {
  color: rgba(30, 41, 59, 0.76);
}

body[data-theme="light"] .compound-workflow-expert-action,
body[data-theme="light"] .compound-workflow-expert-save,
body[data-theme="light"] .compound-workflow-expert-cancel,
body[data-theme="light"] .compound-workflow-expert-apply,
body[data-theme="light"] .compound-workflow-expert-memory-refresh,
body[data-theme="light"] .compound-workflow-expert-memory-action {
  border-color: rgba(71, 85, 105, 0.16);
  background: rgba(248, 250, 252, 0.92);
  color: #1e293b;
}

body[data-theme="light"] .compound-workflow-expert-tags span {
  border-color: rgba(71, 85, 105, 0.12);
  background: rgba(241, 245, 249, 0.86);
  color: rgba(30, 41, 59, 0.78);
}

body[data-theme="light"] .compound-workflow-expert-input {
  border-color: rgba(71, 85, 105, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
}

body[data-theme="light"] .compound-workflow-expert-memory-panel {
  border-color: rgba(71, 85, 105, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: #172033;
}

body[data-theme="light"] .compound-workflow-expert-memory-header strong,
body[data-theme="light"] .compound-workflow-expert-memory-body strong {
  color: #0f172a;
}

body[data-theme="light"] .compound-workflow-expert-memory-meta,
body[data-theme="light"] .compound-workflow-expert-memory-empty,
body[data-theme="light"] .compound-workflow-expert-memory-body span {
  color: rgba(51, 65, 85, 0.68);
}

body[data-theme="light"] .compound-workflow-expert-memory-item {
  border-color: rgba(71, 85, 105, 0.12);
  background: rgba(248, 250, 252, 0.78);
}

body[data-theme="dark"] .compound-workflow-expert-capabilities {
  border-color: rgba(71, 85, 105, 0.42);
  background: rgba(2, 6, 23, 0.56);
}

body[data-theme="dark"] .compound-workflow-expert-capabilities-header strong {
  color: #f8fafc;
}

body[data-theme="dark"] .compound-workflow-expert-capabilities .compound-workflow-expert-capability-list span {
  border-color: rgba(45, 212, 191, 0.16);
  background: rgba(15, 118, 110, 0.18);
  color: #99f6e4;
}

body[data-theme="light"] .compound-workflow-plugin-stack .waterfall-step,
body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step {
  --workflow-flow-line: rgba(100, 116, 139, 0.26);
  --workflow-flow-dot-bg: rgba(226, 232, 240, 0.94);
  --workflow-flow-dot-color: #334155;
  color: #1e293b;
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-title,
body[data-theme="light"] .compound-workflow-plugin-stack .waterfall-step-title {
  color: #0f172a;
  text-shadow: none;
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-remark,
body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-status,
body[data-theme="light"] .compound-workflow-plugin-stack .waterfall-step-remark {
  color: rgba(51, 65, 85, 0.72);
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-plugin-icon {
  border-color: rgba(71, 85, 105, 0.16);
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.84), transparent 40%),
    rgba(226, 232, 240, 0.74);
  color: #1e293b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 8px 16px rgba(51, 65, 85, 0.12);
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .compound-step-open-btn.widget-focus-btn,
body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-edit-workflow-btn,
body[data-theme="light"] .compound-workflow-left-toggle {
  border-color: rgba(71, 85, 105, 0.18);
  background: rgba(255, 255, 255, 0.82);
  color: #1e293b;
}

body[data-theme="light"] .compound-workflow-left-toggle svg {
  filter: drop-shadow(0 4px 8px rgba(51, 65, 85, 0.18));
}

/* Smart workbench chat-first MVP surface. */
.widget.is-compound-workflow-widget:not(.is-collapsed):not(.is-header-collapsed) {
  min-width: 900px;
  min-height: 620px;
}

.widget.is-compound-workflow-widget .widget-body {
  padding: 12px;
}

.compound-workflow-shell:not(.is-onboarding-mode) {
  grid-template-columns: clamp(220px, 18vw, 286px) minmax(0, 1fr);
  gap: 12px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left {
  gap: 12px;
  padding: 16px 12px;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 2px 8px;
  padding: 0 2px 6px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-main-icon {
  width: 34px;
  height: 34px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-main-icon svg {
  width: 24px;
  height: 24px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header h3 {
  font-size: 0.94rem;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header p {
  font-size: 0.68rem;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack.waterfall-chat-steps {
  padding: 6px 2px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step {
  min-height: 58px;
  padding: 7px 2px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-plugin-pill-header {
  grid-template-columns: 34px minmax(0, 1fr) 26px;
  min-height: 42px;
  gap: 8px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step::before {
  left: 16px;
  width: 3px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-number {
  width: 32px;
  height: 32px;
  font-size: 0.78rem;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-plugin-icon {
  display: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-status {
  margin: -4px 0 0 42px;
  font-size: 0.68rem;
}

.compound-workflow-chat {
  border-radius: 18px;
  background: #ffffff;
}

.compound-workflow-asset-panel {
  grid-template-rows: auto minmax(0, 1fr);
  padding: 14px;
  background: #ffffff;
}

.compound-workflow-shell.is-onboarding-mode .compound-workflow-asset-panel {
  display: grid;
}

.compound-workflow-shell.is-onboarding-mode .compound-workflow-assistant-window {
  display: none !important;
}

.compound-workflow-shell.is-assets-surface-active .compound-workflow-asset-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.compound-workflow-surface-tabs {
  width: auto;
  max-width: 100%;
  margin: 0 0 10px;
}

.compound-workflow-surface-tab.is-debug {
  color: rgba(185, 28, 28, 0.72);
}

.compound-workflow-surface-tab.is-debug.is-active {
  color: #ffffff;
  background: #7f1d1d;
}

.compound-workflow-surface-stack {
  display: grid;
  min-height: 0;
}

.compound-workflow-chat-host,
.compound-workflow-expert-host,
.compound-workflow-debug-host,
.compound-workflow-asset-list,
.compound-workflow-studio-host,
.compound-workflow-plugin-host,
.compound-workflow-knowledge-host,
.compound-workflow-settings-host {
  grid-area: 1 / 1;
}

.compound-workflow-chat-host[hidden],
.compound-workflow-expert-host[hidden],
.compound-workflow-debug-host[hidden],
.compound-workflow-knowledge-host[hidden],
.compound-workflow-settings-host[hidden] {
  display: none !important;
}

.compound-workflow-chat-host {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(238, 242, 247, 0.98)),
    #eef3f8;
}

.compound-workflow-chat-host .compound-workflow-expert-card {
  justify-self: stretch;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.compound-workflow-chat-host .compound-workflow-expert-hero {
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px;
}

.compound-workflow-chat-host .compound-workflow-expert-avatar {
  width: 54px;
  min-width: 54px;
  height: 54px;
  border-radius: 999px;
  border-color: rgba(14, 116, 144, 0.2);
  background: linear-gradient(145deg, #ecfeff, #eef2ff);
  color: #0f172a;
  font-size: 0.86rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.compound-workflow-chat-host .compound-workflow-expert-eyebrow {
  color: rgba(14, 116, 144, 0.82);
  font-size: 0.72rem;
}

.compound-workflow-chat-host .compound-workflow-expert-title {
  color: #0f172a;
  font-size: 1.2rem;
}

.compound-workflow-chat-host .compound-workflow-expert-subtitle,
.compound-workflow-chat-host .compound-workflow-expert-status {
  color: rgba(51, 65, 85, 0.72);
}

.compound-workflow-chat-host .compound-workflow-expert-description,
.compound-workflow-chat-host .compound-workflow-expert-methods,
.compound-workflow-chat-host .compound-workflow-expert-tags {
  display: none;
}

.compound-workflow-chat-host .compound-workflow-expert-action,
.compound-workflow-chat-host .compound-workflow-expert-save,
.compound-workflow-chat-host .compound-workflow-expert-cancel,
.compound-workflow-chat-host .compound-workflow-expert-apply {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.94);
  color: #1e293b;
}

.compound-workflow-chat-host .compound-workflow-expert-instruction {
  display: none;
}

.compound-workflow-chat-host .compound-workflow-conversation-bar.waterfall-chat-conversations {
  justify-self: stretch;
  width: 100%;
  min-height: 42px;
  padding: 0 2px;
  border: 0;
  background: transparent;
}

.compound-workflow-chat-host .compound-workflow-chat-main {
  justify-self: stretch;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 0%, rgba(14, 165, 233, 0.1), transparent 34%),
    linear-gradient(180deg, #f6f9fc, #eef4f8);
}

.compound-workflow-chat-host .waterfall-chat-messages {
  grid-row: 1;
  gap: 12px;
  padding: 2px 2px 12px;
  border-radius: 12px;
}

.compound-workflow-chat-host .waterfall-pending-attachments,
.compound-workflow-chat-host .workflow-composer-pending-actions {
  grid-row: 2;
}

.compound-workflow-chat-host .waterfall-chat-tools {
  display: none;
}

.compound-workflow-chat-host .waterfall-chat-composer {
  position: sticky;
  grid-row: 3;
  bottom: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 42px;
  align-items: end;
  justify-self: stretch;
  width: 100%;
  min-height: 104px;
  padding: 12px;
  border-color: rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  background: #ffffff;
  box-shadow:
    0 18px 38px rgba(15, 23, 42, 0.08),
    0 10px 34px rgba(14, 165, 233, 0.12);
}

.compound-workflow-chat-host .waterfall-chat-input {
  min-height: 72px;
  max-height: 160px;
  color: #0f172a;
  font-size: 0.96rem;
}

.compound-workflow-chat-host .waterfall-chat-input::placeholder {
  color: rgba(100, 116, 139, 0.74);
}

.compound-workflow-chat-host .waterfall-chat-attach-btn,
.compound-workflow-chat-host .waterfall-chat-send-btn {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(248, 250, 252, 0.94);
  color: #0f172a;
}

.compound-workflow-chat-host .waterfall-chat-send-btn:not(:disabled) {
  border-color: rgba(14, 165, 233, 0.3);
  background: #dffcf8;
  color: #0f766e;
}

.workflow-chat-welcome-card {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: none;
  margin: 0 0 12px;
  padding: 16px;
  border: 1px solid rgba(14, 116, 144, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.86), rgba(239, 246, 255, 0.92) 54%, rgba(255, 247, 237, 0.78)),
    #ffffff;
  color: #0f172a;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.compound-workflow-chat-host .workflow-phase-card,
.compound-workflow-chat-host .workflow-entry-card,
.compound-workflow-chat-host .workflow-session-card {
  width: 100%;
  max-width: none;
  margin-right: 0;
  margin-left: 0;
}

.workflow-chat-welcome-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.workflow-chat-welcome-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workflow-chat-welcome-eyebrow,
.workflow-chat-welcome-section-title {
  color: rgba(15, 118, 110, 0.82);
  font-size: 0.72rem;
  font-weight: 950;
}

.workflow-chat-welcome-title {
  color: #0f172a;
  font-size: 1.08rem;
  font-weight: 950;
  line-height: 1.25;
}

.workflow-chat-welcome-summary {
  margin: 0;
  color: rgba(51, 65, 85, 0.72);
  font-size: 0.84rem;
  line-height: 1.5;
}

.workflow-chat-welcome-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.8fr);
  gap: 12px;
  min-width: 0;
}

.workflow-chat-welcome-section {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
}

.workflow-chat-welcome-section.is-examples {
  grid-column: 1 / -1;
}

.workflow-chat-welcome-flow,
.workflow-chat-welcome-list,
.workflow-chat-welcome-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.workflow-chat-welcome-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: min(220px, 100%);
  max-width: 100%;
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.92);
  color: rgba(51, 65, 85, 0.78);
  text-align: left;
  cursor: pointer;
}

.workflow-chat-welcome-step:hover,
.workflow-chat-welcome-step:focus-visible {
  border-color: rgba(14, 116, 144, 0.28);
  background: #ffffff;
  outline: none;
}

.workflow-chat-welcome-step.is-active {
  border-color: rgba(14, 116, 144, 0.32);
  background: rgba(240, 253, 250, 0.94);
}

.workflow-chat-welcome-step-index {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
  font-size: 0.68rem;
  font-weight: 950;
}

.workflow-chat-welcome-step-name,
.workflow-chat-welcome-step-status {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-chat-welcome-step-name {
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 920;
}

.workflow-chat-welcome-step-status {
  color: rgba(100, 116, 139, 0.74);
  font-size: 0.66rem;
  font-weight: 850;
}

.workflow-chat-welcome-need,
.workflow-chat-welcome-example,
.workflow-chat-welcome-more {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.9);
  color: rgba(51, 65, 85, 0.74);
  font-size: 0.72rem;
  font-weight: 850;
}

.workflow-chat-welcome-example {
  cursor: pointer;
}

.workflow-chat-welcome-example:hover,
.workflow-chat-welcome-example:focus-visible {
  border-color: rgba(14, 116, 144, 0.28);
  background: #ffffff;
  color: #0f766e;
  outline: none;
}

.workflow-chat-welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workflow-chat-welcome-primary,
.workflow-chat-welcome-secondary {
  min-height: 34px;
  padding: 8px 13px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 950;
  cursor: pointer;
}

.workflow-chat-welcome-primary {
  background: #0f766e;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.2);
}

.workflow-chat-welcome-secondary {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(51, 65, 85, 0.74);
}

.workflow-chat-welcome-primary:hover,
.workflow-chat-welcome-primary:focus-visible,
.workflow-chat-welcome-secondary:hover,
.workflow-chat-welcome-secondary:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.compound-workflow-debug-host {
  display: grid;
  grid-template-rows: auto minmax(0, auto) minmax(0, auto) auto auto;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: #f8fafc;
}

.compound-workflow-debug-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: #ffffff;
}

.compound-workflow-debug-intro-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.compound-workflow-debug-intro strong {
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 900;
}

.compound-workflow-debug-intro p {
  margin: 0;
  color: rgba(71, 85, 105, 0.72);
  font-size: 0.76rem;
  line-height: 1.45;
}

.compound-workflow-debug-host .compound-workflow-runtime-diagnostics {
  margin: 0;
  max-height: none;
}

.compound-workflow-debug-host .compound-workflow-expert-capabilities,
.compound-workflow-debug-host .compound-workflow-expert-memory-panel {
  margin: 0;
}

body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.96);
  box-shadow: none;
}

body[data-theme="dark"] .compound-workflow-chat,
body[data-theme="dark"] .compound-workflow-asset-panel,
body[data-theme="dark"] .compound-workflow-chat-host {
  background: #080d19;
}

body[data-theme="dark"] .compound-workflow-chat-host .compound-workflow-expert-card,
body[data-theme="dark"] .compound-workflow-chat-host .compound-workflow-expert-title,
body[data-theme="dark"] .compound-workflow-chat-host .waterfall-chat-input {
  color: #f8fafc;
}

body[data-theme="dark"] .compound-workflow-chat-host .compound-workflow-expert-card {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

body[data-theme="dark"] .compound-workflow-chat-host .compound-workflow-chat-main {
  border-color: rgba(148, 163, 184, 0.16);
  background:
    radial-gradient(circle at 90% 0%, rgba(45, 212, 191, 0.1), transparent 36%),
    linear-gradient(180deg, #0f172a, #0b1120);
}

body[data-theme="dark"] .compound-workflow-chat-host .waterfall-chat-composer,
body[data-theme="dark"] .compound-workflow-debug-host,
body[data-theme="dark"] .compound-workflow-debug-intro {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.92);
}

body[data-theme="dark"] .workflow-chat-welcome-card {
  border-color: rgba(45, 212, 191, 0.18);
  background:
    linear-gradient(135deg, rgba(20, 83, 45, 0.22), rgba(30, 41, 59, 0.86) 52%, rgba(76, 29, 149, 0.24)),
    #0f172a;
  color: #f8fafc;
}

body[data-theme="dark"] .workflow-chat-welcome-title,
body[data-theme="dark"] .workflow-chat-welcome-step-name {
  color: #f8fafc;
}

body[data-theme="dark"] .workflow-chat-welcome-summary,
body[data-theme="dark"] .workflow-chat-welcome-step-status {
  color: rgba(203, 213, 225, 0.72);
}

body[data-theme="dark"] .workflow-chat-welcome-section,
body[data-theme="dark"] .workflow-chat-welcome-step,
body[data-theme="dark"] .workflow-chat-welcome-need,
body[data-theme="dark"] .workflow-chat-welcome-example,
body[data-theme="dark"] .workflow-chat-welcome-more,
body[data-theme="dark"] .workflow-chat-welcome-secondary {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.66);
  color: rgba(226, 232, 240, 0.76);
}

/* Chat-first Agent layout: keep the workflow as a compact progress rail. */
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-toggle {
  left: calc(clamp(220px, 18vw, 286px) + 8px);
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) {
  grid-template-columns: clamp(76px, 6vw, 92px) minmax(0, 1fr);
  gap: 10px;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left {
  grid-template-rows: minmax(0, 1fr);
  justify-items: center;
  gap: 8px;
  padding: 10px 6px;
  border-radius: 16px;
  box-shadow: none;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left-header,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left-footer {
  display: none !important;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack.waterfall-chat-steps {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 4px 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill {
  display: grid;
  place-items: center;
  width: 52px;
  max-width: 52px;
  min-height: 52px;
  padding: 4px;
  border-radius: 16px;
  box-shadow: none;
  transform: none;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step::before {
  left: 50%;
  width: 2px;
  opacity: 0.42;
  transform: translateX(-50%);
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-plugin-pill-header {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  width: 42px;
  min-height: 42px;
  padding: 0;
  gap: 0;
  border-radius: 14px;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-number,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-plugin-icon {
  display: grid !important;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  margin: 0;
  border-radius: 12px;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-copy,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step-status,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack .compound-plugin-pill-actions {
  display: none !important;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-active,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-plugin-stack .waterfall-step.is-selected {
  border-color: rgba(14, 116, 144, 0.28);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(14, 116, 144, 0.12);
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left-toggle {
  left: calc(clamp(76px, 6vw, 92px) + 8px);
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left-toggle svg {
  transform: rotate(0deg);
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-chat-host .compound-workflow-expert-card {
  display: grid !important;
}

@media (max-width: 900px) {
  .compound-workflow-shell:not(.is-onboarding-mode) {
    grid-template-columns: 1fr;
    grid-template-rows: 96px minmax(0, 1fr);
  }

  .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-plugin-stack.waterfall-chat-steps {
    flex-direction: row;
    overflow-x: auto;
  }

  .compound-workflow-chat-host {
    padding: 16px;
  }

  .workflow-chat-welcome-body {
    grid-template-columns: 1fr;
  }

  .workflow-chat-welcome-section.is-examples {
    grid-column: auto;
  }
}

/* Expert-style smart workbench: chat-first center with persistent agent status rail. */
.widget.is-compound-workflow-widget:not(.is-collapsed):not(.is-header-collapsed) {
  min-width: 1120px;
  min-height: 700px;
}

.widget.is-compound-workflow-widget .widget-body {
  padding: 10px;
}

.compound-workflow-shell:not(.is-onboarding-mode),
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) {
  grid-template-columns: minmax(214px, 252px) minmax(480px, 1fr) minmax(280px, 340px);
  gap: 14px;
  background: transparent;
  transition: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left,
.compound-workflow-agent-rail,
.compound-workflow-chat {
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-items: stretch;
  justify-items: stretch;
  gap: 14px;
  padding: 16px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 2px 10px;
  padding: 0;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-main-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-main-icon svg {
  width: 30px;
  height: 30px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header h3,
body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header h3 {
  color: #111827;
  font-size: 1.02rem;
  font-weight: 950;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header p,
body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header p {
  color: rgba(71, 85, 105, 0.72);
  font-size: 0.72rem;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-runtime-actions {
  flex-direction: row;
}

.compound-workflow-left .compound-workflow-expert-card {
  margin: -6px;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #0f172a;
  box-shadow: none;
}

.compound-workflow-left .compound-workflow-expert-card.is-profile-link:hover,
.compound-workflow-left .compound-workflow-expert-card.is-profile-link:focus-visible,
.compound-workflow-left .compound-workflow-expert-card.is-active {
  border-color: rgba(124, 58, 237, 0.14);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.compound-workflow-left .compound-workflow-expert-card.is-active {
  border-color: rgba(124, 58, 237, 0.28);
  background: rgba(124, 58, 237, 0.08);
}

.compound-workflow-left .compound-workflow-expert-hero {
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 10px;
}

.compound-workflow-left .compound-workflow-expert-avatar {
  width: 52px;
  min-width: 52px;
  height: 52px;
  border-radius: 999px;
  border-color: rgba(124, 58, 237, 0.18);
  background: radial-gradient(circle at 30% 25%, #ffffff, #ede9fe 42%, #7c3aed);
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(124, 58, 237, 0.18);
}

.compound-workflow-left .compound-workflow-expert-eyebrow {
  display: none;
}

.compound-workflow-left .compound-workflow-expert-title {
  color: #111827;
  font-size: 0.95rem;
}

.compound-workflow-left .compound-workflow-expert-status {
  color: rgba(71, 85, 105, 0.72);
}

.compound-workflow-left .compound-workflow-expert-subtitle,
.compound-workflow-left .compound-workflow-expert-tags,
.compound-workflow-left .compound-workflow-expert-description,
.compound-workflow-left .compound-workflow-expert-methods,
.compound-workflow-left .compound-workflow-expert-instruction {
  display: none;
}

.compound-workflow-left-nav.compound-workflow-surface-tabs {
  display: grid;
  align-content: start;
  gap: 8px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.compound-workflow-left-nav .compound-workflow-surface-tab {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 42px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  color: rgba(51, 65, 85, 0.74);
  font-size: 0.84rem;
  font-weight: 900;
}

.compound-workflow-left-nav .compound-workflow-surface-tab:hover,
.compound-workflow-left-nav .compound-workflow-surface-tab:focus-visible {
  background: rgba(124, 58, 237, 0.08);
  color: #5b21b6;
  outline: none;
}

.compound-workflow-left-nav .compound-workflow-surface-tab.is-active,
.compound-workflow-left-nav .compound-workflow-surface-tab.is-debug.is-active {
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
  box-shadow: inset 3px 0 0 #7c3aed;
}

.compound-workflow-left-footer {
  justify-content: stretch;
  padding: 0;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-edit-workflow-btn {
  width: 100%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  border-radius: 12px;
  border-color: rgba(124, 58, 237, 0.2);
  background: rgba(124, 58, 237, 0.08);
  color: #6d28d9;
  box-shadow: none;
}

.compound-workflow-left-toggle {
  display: none !important;
}

.compound-workflow-chat {
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
}

.compound-workflow-asset-panel {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  padding: 0;
  background: #ffffff;
}

.compound-workflow-shell.is-assets-surface-active .compound-workflow-asset-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

.compound-workflow-asset-toolbar {
  justify-self: end;
  max-width: 100%;
  margin: 12px 14px 0;
}

.compound-workflow-chat-host {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.compound-workflow-chat-host .compound-workflow-conversation-bar.waterfall-chat-conversations {
  min-height: 48px;
  padding: 8px 14px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
}

.compound-workflow-chat-host .compound-workflow-chat-main {
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 14px 16px 16px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.66), #ffffff 34%),
    #ffffff;
}

.compound-workflow-chat-host .waterfall-chat-messages {
  padding: 4px 2px 12px;
}

.compound-workflow-chat-host .waterfall-chat-composer {
  min-height: 74px;
  padding: 10px 12px;
  border-radius: 16px;
  border-color: rgba(203, 213, 225, 0.76);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.compound-workflow-chat-host .waterfall-chat-input {
  min-height: 46px;
  max-height: 132px;
  font-size: 0.92rem;
}

.compound-workflow-chat-host .waterfall-chat-send-btn:not(:disabled) {
  border-color: transparent;
  background: #6d28d9;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(109, 40, 217, 0.24);
}

.compound-workflow-agent-rail {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.compound-workflow-agent-status-panel,
.compound-workflow-agent-related-panel,
.compound-workflow-agent-rail .compound-workflow-expert-capabilities,
.compound-workflow-agent-rail .compound-workflow-expert-memory-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.compound-workflow-agent-rail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.compound-workflow-agent-rail-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.compound-workflow-agent-rail-header strong,
.compound-workflow-agent-rail .compound-workflow-expert-capabilities-header strong,
.compound-workflow-agent-rail .compound-workflow-expert-memory-header strong {
  color: #111827;
  font-size: 0.84rem;
  font-weight: 950;
}

.compound-workflow-agent-rail-header span,
.compound-workflow-agent-rail .compound-workflow-expert-capabilities-meta,
.compound-workflow-agent-rail .compound-workflow-expert-memory-meta {
  color: rgba(71, 85, 105, 0.66);
  font-size: 0.7rem;
  font-weight: 820;
}

.compound-workflow-agent-rail .compound-workflow-plugin-stack.waterfall-chat-steps {
  display: grid !important;
  gap: 7px;
  max-height: 320px;
  padding: 0;
  overflow: auto;
}

.compound-workflow-agent-rail .compound-workflow-plugin-stack .waterfall-step,
.compound-workflow-agent-rail .compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill {
  display: grid;
  width: 100%;
  max-width: none;
  min-height: 46px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}

.compound-workflow-agent-rail .compound-workflow-plugin-stack .waterfall-step::before,
.compound-workflow-agent-rail .compound-workflow-plugin-stack .waterfall-step::after,
.compound-workflow-agent-rail .compound-plugin-pill-header::after {
  content: none;
  display: none;
}

.compound-workflow-agent-rail .compound-plugin-pill-header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
  min-height: 46px;
  padding: 7px 8px;
  border: 1px solid rgba(226, 232, 240, 0.84);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.92);
  box-shadow: none;
}

.compound-workflow-agent-rail .compound-workflow-plugin-stack .waterfall-step-plugin-icon,
.compound-workflow-agent-rail .compound-workflow-plugin-stack .waterfall-step-number {
  display: grid !important;
  place-items: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  border-radius: 10px;
}

.compound-workflow-agent-rail .compound-workflow-plugin-stack .waterfall-step-title {
  color: #111827;
  font-size: 0.76rem;
  text-shadow: none;
}

.compound-workflow-agent-rail .compound-workflow-plugin-stack .waterfall-step-remark {
  color: rgba(71, 85, 105, 0.62);
}

.compound-workflow-agent-rail .compound-workflow-plugin-stack .waterfall-step-status {
  display: inline-flex !important;
  align-items: center;
  margin: 0;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
  font-size: 0.64rem;
}

.compound-workflow-agent-rail .compound-workflow-plugin-stack .compound-plugin-pill-actions {
  display: none !important;
}

.compound-workflow-agent-rail .compound-workflow-plugin-stack .waterfall-step.is-running .compound-plugin-pill-header,
.compound-workflow-agent-rail .compound-workflow-plugin-stack .waterfall-step.is-active .compound-plugin-pill-header,
.compound-workflow-agent-rail .compound-workflow-plugin-stack .waterfall-step.is-selected .compound-plugin-pill-header {
  border-color: rgba(109, 40, 217, 0.24);
  background: rgba(245, 243, 255, 0.96);
}

.compound-workflow-agent-rail .compound-workflow-plugin-stack .waterfall-step.is-done .compound-plugin-pill-header {
  border-color: rgba(16, 185, 129, 0.22);
  background: rgba(236, 253, 245, 0.9);
}

.compound-workflow-agent-rail .compound-workflow-expert-capability-list,
.compound-workflow-agent-related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.compound-workflow-agent-rail .compound-workflow-expert-capability-list span,
.compound-workflow-agent-related-list span {
  max-width: 100%;
  padding: 5px 8px;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 9px;
  background: rgba(245, 243, 255, 0.76);
  color: #5b21b6;
  font-size: 0.68rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-workflow-agent-rail .compound-workflow-expert-memory-list {
  max-height: 180px;
}

.compound-workflow-agent-rail-link {
  min-height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.08);
  color: #6d28d9;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
}

.compound-workflow-debug-host {
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.compound-workflow-knowledge-host,
.compound-workflow-settings-host {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 28px;
  background: #ffffff;
}

.compound-workflow-utility-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  width: min(760px, 100%);
  min-width: 0;
}

.compound-workflow-utility-eyebrow {
  margin: 0;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 850;
}

.compound-workflow-utility-panel h3 {
  margin: 0;
  color: #111827;
  font-size: 1.05rem;
  font-weight: 850;
}

.compound-workflow-utility-summary {
  max-width: 680px;
  margin: 0;
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.65;
}

.compound-workflow-utility-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compound-workflow-utility-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 760;
}

.compound-workflow-utility-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compound-workflow-utility-action {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(26, 115, 232, 0.22);
  border-radius: 8px;
  background: #e8f0fe;
  color: #1967d2;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.compound-workflow-utility-action:hover,
.compound-workflow-utility-action:focus-visible {
  border-color: rgba(26, 115, 232, 0.38);
  background: #d2e3fc;
  outline: none;
}

body[data-theme="dark"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left,
body[data-theme="dark"] .compound-workflow-agent-rail,
body[data-theme="dark"] .compound-workflow-chat,
body[data-theme="dark"] .compound-workflow-asset-panel,
body[data-theme="dark"] .compound-workflow-chat-host,
body[data-theme="dark"] .compound-workflow-expert-host,
body[data-theme="dark"] .compound-workflow-knowledge-host,
body[data-theme="dark"] .compound-workflow-settings-host {
  border-color: rgba(51, 65, 85, 0.9);
  background: #0f172a;
  color: #f8fafc;
}

body[data-theme="dark"] .compound-workflow-utility-panel h3 {
  color: #f8fafc;
}

body[data-theme="dark"] .compound-workflow-utility-summary,
body[data-theme="dark"] .compound-workflow-utility-eyebrow {
  color: #cbd5e1;
}

body[data-theme="dark"] .compound-workflow-utility-meta span {
  border-color: rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5e1;
}

body[data-theme="dark"] .compound-workflow-left-nav .compound-workflow-surface-tab {
  color: rgba(226, 232, 240, 0.72);
}

body[data-theme="dark"] .compound-workflow-left-nav .compound-workflow-surface-tab.is-active,
body[data-theme="dark"] .compound-workflow-left-nav .compound-workflow-surface-tab.is-debug.is-active {
  background: rgba(124, 58, 237, 0.22);
  color: #ddd6fe;
}

@media (max-width: 1180px) {
  .compound-workflow-shell:not(.is-onboarding-mode),
  .compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) {
    grid-template-columns: minmax(198px, 228px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(260px, 34vh);
  }

  .compound-workflow-agent-rail {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: auto;
  }
}

@media (max-width: 820px) {
  .widget.is-compound-workflow-widget:not(.is-collapsed):not(.is-header-collapsed) {
    min-width: 360px;
  }

  .compound-workflow-shell:not(.is-onboarding-mode),
  .compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(420px, 1fr) auto;
  }

  .compound-workflow-agent-rail {
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: 1fr;
  }
}

/* Business smart workbench: calm two-column workspace scoped to compound workflows. */
.widget.is-compound-workflow-widget:not(.is-collapsed):not(.is-header-collapsed) {
  min-width: 1040px;
  min-height: 680px;
}

.widget.is-compound-workflow-widget {
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 12px;
  background: #f8fafc;
  box-shadow: 0 22px 64px rgba(15, 23, 42, 0.14);
}

.widget.is-compound-workflow-widget .widget-header {
  min-height: 48px;
  padding: 10px 14px 9px;
  border-bottom-color: rgba(226, 232, 240, 0.95);
  background: #ffffff;
}

.widget.is-compound-workflow-widget:not(.is-header-collapsed) .widget-header {
  clip-path: inset(0 round 12px 12px 0 0);
}

.widget.is-compound-workflow-widget .widget-title {
  color: #111827;
  font-size: 0.96rem;
  font-weight: 850;
}

.widget.is-compound-workflow-widget .widget-title-icon[data-tone="compound-workflow"] {
  border: 1px solid rgba(26, 115, 232, 0.16);
  background: #e8f0fe;
  color: #1a73e8;
  box-shadow: none;
}

.widget.is-compound-workflow-widget .widget-title-icon[data-tone="compound-workflow"]::before,
.widget.is-compound-workflow-widget .widget-title-icon[data-tone="compound-workflow"]::after {
  content: none;
}

.widget.is-compound-workflow-widget .widget-body {
  padding: 0;
  background: #f8fafc;
}

.compound-workflow-shell:not(.is-onboarding-mode),
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) {
  grid-template-columns: minmax(232px, 256px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  padding: 0;
  background: #f8fafc;
  color: #0f172a;
}

.compound-workflow-shell:not(.is-onboarding-mode) > .compound-workflow-agent-rail {
  display: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 12px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 0;
  background: #ffffff;
  color: #0f172a;
  box-shadow: none;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left-header,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-expert-card {
  display: grid !important;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left-footer {
  display: flex !important;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 2px 9px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-main-icon {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(26, 115, 232, 0.16);
  border-radius: 8px;
  background: #e8f0fe;
  color: #1a73e8;
  box-shadow: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-main-icon::after {
  right: -2px;
  bottom: -2px;
  width: 8px;
  height: 8px;
  border-color: #ffffff;
  background: #188038;
  box-shadow: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-main-icon svg {
  width: 22px;
  height: 22px;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header h3,
body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header h3 {
  color: #111827;
  font-size: 0.9rem;
  font-weight: 850;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header p,
body[data-theme="light"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left-header p {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
}

.compound-workflow-runtime-badge {
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 800;
}

.compound-workflow-runtime-badge[data-runtime-status="langgraph"],
.compound-workflow-runtime-badge[data-runtime-status="langgraph-executor"],
.compound-workflow-runtime-badge[data-runtime-status="langgraph-executor-ready"] {
  color: #1967d2;
}

.compound-workflow-runtime-actions {
  flex-direction: row;
  gap: 4px;
}

.compound-workflow-runtime-diagnostics-btn,
.compound-workflow-contract-diagnostics-btn {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  border-color: rgba(203, 213, 225, 0.9);
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  box-shadow: none;
}

.compound-workflow-runtime-diagnostics-btn:hover,
.compound-workflow-runtime-diagnostics-btn:focus-visible,
.compound-workflow-runtime-diagnostics-btn[aria-expanded="true"],
.compound-workflow-contract-diagnostics-btn:hover,
.compound-workflow-contract-diagnostics-btn:focus-visible,
.compound-workflow-contract-diagnostics-btn[aria-expanded="true"] {
  border-color: rgba(26, 115, 232, 0.32);
  background: #e8f0fe;
  color: #1967d2;
}

.compound-workflow-left .compound-workflow-expert-card {
  padding: 10px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: none;
}

.compound-workflow-left .compound-workflow-expert-hero {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
}

.compound-workflow-left .compound-workflow-expert-avatar {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid rgba(26, 115, 232, 0.18);
  border-radius: 8px;
  background: #e8f0fe;
  color: #1a73e8;
  box-shadow: none;
}

.compound-workflow-left .compound-workflow-expert-eyebrow {
  display: none;
}

.compound-workflow-left .compound-workflow-expert-title {
  color: #111827;
  font-size: 0.82rem;
  font-weight: 850;
}

.compound-workflow-left .compound-workflow-expert-subtitle,
.compound-workflow-left .compound-workflow-expert-status {
  color: #64748b;
  font-size: 0.68rem;
}

.compound-workflow-left-nav.compound-workflow-surface-tabs {
  gap: 4px;
  padding: 0;
}

.compound-workflow-left-nav .compound-workflow-surface-tab {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 8px;
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 780;
}

.compound-workflow-left-nav .compound-workflow-surface-tab::before {
  content: "";
  align-self: center;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: #cbd5e1;
}

.compound-workflow-left-nav .compound-workflow-surface-tab[data-surface="chat"]::before {
  background: #1a73e8;
}

.compound-workflow-left-nav .compound-workflow-surface-tab[data-surface="assets"]::before {
  background: #188038;
}

.compound-workflow-left-nav .compound-workflow-surface-tab[data-surface="studio"]::before {
  background: #f9ab00;
}

.compound-workflow-left-nav .compound-workflow-surface-tab[data-surface="plugin"]::before {
  background: #64748b;
}

.compound-workflow-left-nav .compound-workflow-surface-tab[data-surface="debug"]::before {
  background: #d93025;
}

.compound-workflow-left-nav .compound-workflow-surface-tab:hover,
.compound-workflow-left-nav .compound-workflow-surface-tab:focus-visible {
  background: #f1f5f9;
  color: #111827;
}

.compound-workflow-left-nav .compound-workflow-surface-tab.is-active,
.compound-workflow-left-nav .compound-workflow-surface-tab.is-debug.is-active {
  background: #e8f0fe;
  color: #1967d2;
  box-shadow: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left .compound-workflow-plugin-stack.waterfall-chat-steps,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left .compound-workflow-plugin-stack.waterfall-chat-steps {
  display: grid !important;
  gap: 6px;
  min-height: 0;
  max-height: none;
  padding: 8px 0 0;
  overflow: auto;
  border: 0;
  border-top: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 0;
  background: transparent;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left .compound-workflow-plugin-stack .waterfall-step,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left .compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left .compound-workflow-plugin-stack .waterfall-step,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left .compound-workflow-plugin-stack .waterfall-step.is-compound-plugin-pill {
  display: grid;
  width: 100%;
  max-width: none;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left .compound-plugin-pill-header,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left .compound-plugin-pill-header {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left .waterfall-step::before,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left .waterfall-step::after,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left .compound-plugin-pill-header::after {
  content: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left .waterfall-step-number,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left .waterfall-step-plugin-icon,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left .waterfall-step-number,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left .waterfall-step-plugin-icon {
  display: grid !important;
  place-items: center;
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  margin: 0;
  border-radius: 7px;
  background: #f1f5f9;
  color: #475569;
  box-shadow: none;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left .waterfall-step-copy,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left .waterfall-step-copy {
  display: grid !important;
  min-width: 0;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left .waterfall-step-title {
  color: #111827;
  font-size: 0.74rem;
  font-weight: 820;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left .waterfall-step-remark {
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 650;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left .waterfall-step-status {
  display: inline-flex !important;
  align-items: center;
  margin: 0;
  padding: 3px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.6rem;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left .waterfall-step.is-running .compound-plugin-pill-header,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left .waterfall-step.is-active .compound-plugin-pill-header,
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left .waterfall-step.is-selected .compound-plugin-pill-header {
  border-color: rgba(26, 115, 232, 0.28);
  background: #e8f0fe;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left .waterfall-step.is-done .compound-plugin-pill-header {
  border-color: rgba(24, 128, 56, 0.22);
  background: #e6f4ea;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left .compound-plugin-pill-actions,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left .compound-plugin-pill-actions {
  display: none !important;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-edit-workflow-btn {
  height: 36px;
  min-height: 36px;
  border-color: rgba(203, 213, 225, 0.95);
  border-radius: 8px;
  background: #ffffff;
  color: #1967d2;
  box-shadow: none;
}

.compound-workflow-chat {
  border: 0;
  border-radius: 0;
  background: #f8fafc;
  box-shadow: none;
}

.compound-workflow-asset-panel,
.compound-workflow-chat-host {
  background: #f8fafc;
}

.compound-workflow-chat-host {
  grid-template-rows: auto minmax(0, 1fr);
}

.compound-workflow-chat-host .compound-workflow-conversation-bar.waterfall-chat-conversations {
  min-height: 46px;
  padding: 6px 22px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.96);
  background: #ffffff;
}

.compound-workflow-chat-host .compound-workflow-conversation-bar .waterfall-chat-conversation-tab {
  min-height: 40px;
  padding: 9px 14px;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 760;
}

.compound-workflow-chat-host .compound-workflow-conversation-bar .waterfall-chat-conversation-tab:hover,
.compound-workflow-chat-host .compound-workflow-conversation-bar .waterfall-chat-conversation-tab:focus-visible {
  color: #111827;
}

.compound-workflow-chat-host .compound-workflow-conversation-bar .waterfall-chat-conversation-tab.is-active {
  border-bottom-color: #1a73e8;
  color: #1967d2;
}

.compound-workflow-chat-host .compound-workflow-conversation-bar .waterfall-chat-conversation-action {
  margin-bottom: 6px;
  color: #64748b;
}

.compound-workflow-chat-host .compound-workflow-chat-main {
  gap: 12px;
  padding: 28px clamp(22px, 4vw, 56px) 24px;
  border: 0;
  background: #f8fafc;
}

.compound-workflow-chat-host .waterfall-chat-messages {
  justify-self: center;
  width: min(920px, 100%);
  padding: 20px 0 18px;
  border-radius: 0;
}

.workflow-chat-welcome-card,
.compound-workflow-chat-host .workflow-phase-card,
.compound-workflow-chat-host .workflow-entry-card,
.compound-workflow-chat-host .workflow-session-card,
.compound-workflow-chat-main .waterfall-message,
.compound-workflow-chat-main .waterfall-message.has-assistant-avatar .waterfall-message-body {
  border-color: rgba(226, 232, 240, 0.96);
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.workflow-chat-welcome-card {
  padding: 14px;
}

.workflow-chat-welcome-title {
  color: #111827;
  font-size: 1rem;
  font-weight: 850;
}

.workflow-chat-welcome-eyebrow,
.workflow-chat-welcome-section-title {
  color: #1967d2;
}

.workflow-chat-welcome-summary {
  color: #64748b;
}

.workflow-chat-welcome-section,
.workflow-chat-welcome-step,
.workflow-chat-welcome-need,
.workflow-chat-welcome-example,
.workflow-chat-welcome-more {
  border-radius: 8px;
  background: #f8fafc;
}

.workflow-chat-welcome-primary {
  background: #1a73e8;
  box-shadow: none;
}

.workflow-chat-welcome-secondary {
  border: 1px solid rgba(203, 213, 225, 0.95);
  background: #ffffff;
}

.compound-workflow-chat-host .waterfall-chat-composer {
  grid-template-columns: 38px minmax(0, 1fr) 42px;
  align-items: end;
  justify-self: center;
  width: min(820px, 100%);
  min-height: 124px;
  padding: 12px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.compound-workflow-chat-host .waterfall-chat-input {
  min-height: 92px;
  max-height: 180px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.94rem;
}

.compound-workflow-chat-host .waterfall-chat-input::placeholder {
  color: #94a3b8;
}

.compound-workflow-chat-host .waterfall-chat-attach-btn,
.compound-workflow-chat-host .waterfall-chat-send-btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  box-shadow: none;
}

.compound-workflow-chat-host .waterfall-chat-attach-btn::before {
  color: #475569;
  text-shadow: none;
}

.compound-workflow-chat-host .waterfall-chat-send-btn:not(:disabled) {
  border-color: #1a73e8;
  background: #1a73e8;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(26, 115, 232, 0.22);
}

.compound-workflow-task-dock {
  justify-self: center;
  width: min(820px, 100%);
  padding: 0;
}

.compound-workflow-debug-host,
.compound-workflow-expert-host,
.compound-workflow-studio-host,
.compound-workflow-plugin-host,
.compound-workflow-asset-list {
  border-radius: 0;
  background: #f8fafc;
}

body[data-theme="dark"] .widget.is-compound-workflow-widget,
body[data-theme="dark"] .widget.is-compound-workflow-widget .widget-header,
body[data-theme="dark"] .widget.is-compound-workflow-widget .widget-body,
body[data-theme="dark"] .compound-workflow-shell:not(.is-onboarding-mode),
body[data-theme="dark"] .compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode),
body[data-theme="dark"] .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left,
body[data-theme="dark"] .compound-workflow-chat,
body[data-theme="dark"] .compound-workflow-asset-panel,
body[data-theme="dark"] .compound-workflow-chat-host,
body[data-theme="dark"] .compound-workflow-expert-host,
body[data-theme="dark"] .compound-workflow-chat-host .compound-workflow-chat-main,
body[data-theme="dark"] .compound-workflow-chat-host .compound-workflow-conversation-bar.waterfall-chat-conversations,
body[data-theme="dark"] .compound-workflow-chat-host .waterfall-chat-composer {
  background: #f8fafc;
  color: #0f172a;
}

body[data-theme="dark"] .compound-workflow-chat-host .waterfall-chat-input,
body[data-theme="dark"] .compound-workflow-left .compound-workflow-expert-title {
  color: #0f172a;
}

body[data-theme="dark"] .compound-workflow-chat-host .waterfall-chat-input {
  background: #ffffff;
}

body[data-theme="dark"] .compound-workflow-left-nav .compound-workflow-surface-tab {
  color: #475569;
}

body[data-theme="dark"] .compound-workflow-left-nav .compound-workflow-surface-tab.is-active,
body[data-theme="dark"] .compound-workflow-left-nav .compound-workflow-surface-tab.is-debug.is-active {
  background: #e8f0fe;
  color: #1967d2;
}

body[data-theme="dark"] .workflow-chat-welcome-card,
body[data-theme="dark"] .compound-workflow-chat-main .waterfall-message,
body[data-theme="dark"] .compound-workflow-chat-main .waterfall-message.has-assistant-avatar .waterfall-message-body {
  background: #ffffff;
  color: #0f172a;
}

@media (max-width: 1180px) {
  .widget.is-compound-workflow-widget:not(.is-collapsed):not(.is-header-collapsed) {
    min-width: 900px;
  }

  .compound-workflow-shell:not(.is-onboarding-mode),
  .compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) {
    grid-template-columns: minmax(220px, 240px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .widget.is-compound-workflow-widget:not(.is-collapsed):not(.is-header-collapsed) {
    min-width: 360px;
    min-height: 640px;
  }

  .compound-workflow-shell:not(.is-onboarding-mode),
  .compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left,
  .compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left {
    max-height: 260px;
    border-right: 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.96);
  }

  .compound-workflow-chat-host .compound-workflow-chat-main {
    padding: 18px 14px;
  }
}

/* Business treatment for the first-open guide mode as well. */
.compound-workflow-shell.is-onboarding-mode,
.compound-workflow-shell.is-plugin-rail-collapsed.is-onboarding-mode {
  grid-template-columns: minmax(232px, 256px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  padding: 0;
  background: #f8fafc;
}

.compound-workflow-shell.is-onboarding-mode > .compound-workflow-agent-rail {
  display: none;
}

.compound-workflow-shell.is-onboarding-mode .compound-workflow-left,
.compound-workflow-shell.is-plugin-rail-collapsed.is-onboarding-mode .compound-workflow-left {
  display: grid !important;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
  padding: 14px 12px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 0;
  background: #ffffff;
  color: #0f172a;
  box-shadow: none;
}

.compound-workflow-shell.is-onboarding-mode .compound-workflow-left-header {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 2px 9px;
  padding: 0;
}

.compound-workflow-shell.is-onboarding-mode .compound-workflow-plugin-stack.waterfall-chat-steps {
  display: grid !important;
  gap: 6px;
  min-height: 0;
  padding: 8px 0 0;
  overflow: auto;
  border: 0;
  border-top: 1px solid rgba(226, 232, 240, 0.86);
  background: transparent;
}

.compound-workflow-shell.is-onboarding-mode .compound-workflow-chat {
  display: grid;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: #f8fafc;
  box-shadow: none;
}

.compound-workflow-shell.is-onboarding-mode .compound-workflow-asset-panel,
.compound-workflow-shell.is-onboarding-mode .compound-workflow-chat-host {
  min-height: 0;
  background: #f8fafc;
}

.compound-workflow-shell.is-onboarding-mode .compound-workflow-chat-main.is-onboarding-mode {
  height: 100%;
  min-height: 0;
  padding: 28px clamp(22px, 4vw, 56px);
  overflow: auto;
  background: #f8fafc;
}

.compound-workflow-shell.is-onboarding-mode .compound-workflow-chat-main .waterfall-chat-messages {
  display: grid;
  align-content: start;
  justify-self: center;
  width: min(920px, 100%);
  padding: 0;
  overflow: visible;
}

.compound-workflow-shell.is-onboarding-mode .workflow-chat-welcome-card,
.compound-workflow-shell.is-onboarding-mode .workflow-entry-card,
.compound-workflow-shell.is-onboarding-mode .workflow-launch-modal {
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.compound-workflow-shell.is-onboarding-mode .workflow-chat-welcome-body {
  grid-template-columns: minmax(0, 1fr);
}

.compound-workflow-shell.is-onboarding-mode .workflow-chat-welcome-section,
.compound-workflow-shell.is-onboarding-mode .workflow-chat-welcome-step,
.compound-workflow-shell.is-onboarding-mode .workflow-launch-check-item,
.compound-workflow-shell.is-onboarding-mode .workflow-launch-control-chip,
.compound-workflow-shell.is-onboarding-mode .workflow-launch-example,
.compound-workflow-shell.is-onboarding-mode .workflow-launch-mode {
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: none;
}

.compound-workflow-shell.is-onboarding-mode .workflow-chat-welcome-primary,
.compound-workflow-shell.is-onboarding-mode .workflow-launch-primary {
  border-radius: 8px;
  background: #1a73e8;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(26, 115, 232, 0.18);
}

.compound-workflow-shell.is-onboarding-mode .workflow-chat-welcome-secondary,
.compound-workflow-shell.is-onboarding-mode .workflow-launch-secondary {
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 8px;
  background: #ffffff;
  color: #475569;
  box-shadow: none;
}

@media (max-width: 820px) {
  .compound-workflow-shell.is-onboarding-mode,
  .compound-workflow-shell.is-plugin-rail-collapsed.is-onboarding-mode {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .compound-workflow-shell.is-onboarding-mode .compound-workflow-left {
    max-height: 260px;
    border-right: 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.96);
  }
}

.compound-workflow-left .compound-workflow-expert-actions,
.compound-workflow-left .compound-workflow-expert-editor-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.compound-workflow-left .compound-workflow-expert-action,
.compound-workflow-left .compound-workflow-expert-save,
.compound-workflow-left .compound-workflow-expert-cancel,
.compound-workflow-left .compound-workflow-expert-apply {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: auto;
  min-width: 62px;
  padding: 0 10px;
  white-space: nowrap;
}

.compound-workflow-shell.is-onboarding-mode .compound-workflow-chat-main .waterfall-chat-tools {
  display: none;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding {
  gap: 14px;
  min-height: 0;
  max-height: none;
  padding: 18px;
  overflow: visible;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-header {
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-eyebrow {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #1967d2;
  font-size: 0.72rem;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-title {
  color: #111827;
  font-size: 1.12rem;
  line-height: 1.22;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-summary {
  max-width: 720px;
  color: #64748b;
  font-size: 0.84rem;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-header-actions .workflow-session-secondary {
  min-height: 30px;
  border-color: rgba(203, 213, 225, 0.95);
  border-radius: 8px;
  background: #ffffff;
  color: #475569;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-guide {
  display: grid;
  gap: 12px;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-guide-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-height: 0;
  max-height: none;
  overflow: visible;
  padding: 0;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-guide-step {
  grid-template-rows: auto auto;
  min-height: 0;
  padding: 10px;
  overflow: visible;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
  transform: none;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-guide-step-visual {
  min-height: 0;
  padding: 0;
  background: transparent;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-guide-step-index {
  width: 24px;
  height: 24px;
  background: #e8f0fe;
  color: #1967d2;
  font-size: 0.72rem;
  box-shadow: none;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-guide-step-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: none;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-guide-step-status {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.68rem;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-guide-step-body {
  gap: 5px;
  padding: 8px 0 0 62px;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-guide-step-heading strong {
  color: #111827;
  font-size: 0.9rem;
  line-height: 1.25;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-guide-step-role,
.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-guide-step-positioning,
.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-guide-step-description {
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.45;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-guide-step-positioning {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #1967d2;
  font-size: 0.72rem;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-usage-flow {
  gap: 10px;
  margin-top: 4px;
  padding-top: 12px;
  border-top-color: rgba(226, 232, 240, 0.9);
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-usage-flow-title {
  color: #111827;
  font-size: 0.92rem;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-usage-flow-summary {
  color: #64748b;
  font-size: 0.76rem;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-usage-flow-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  overflow: visible;
  padding: 0;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-usage-flow-card {
  min-height: 0;
  padding: 10px;
  border-color: rgba(226, 232, 240, 0.96);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
  transform: none;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-usage-flow-marker {
  width: 26px;
  height: 26px;
  background: #e8f0fe;
  color: #1967d2;
  box-shadow: none;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-usage-flow-card-title {
  font-size: 0.8rem;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-usage-flow-card-summary {
  min-height: 0;
  font-size: 0.72rem;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-usage-flow-card-meta {
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-actions {
  position: static;
  justify-content: flex-end;
  padding-top: 4px;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-primary.is-start-using {
  min-height: 38px;
  min-width: 112px;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  background: #1a73e8;
  color: #ffffff;
  font-size: 0.8rem;
  box-shadow: 0 8px 18px rgba(26, 115, 232, 0.18);
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-primary.is-start-using:hover,
.compound-workflow-shell.is-onboarding-mode .workflow-session-card.is-onboarding .workflow-session-primary.is-start-using:focus-visible {
  transform: none;
  box-shadow: 0 8px 18px rgba(26, 115, 232, 0.22);
  outline: none;
}

.compound-workflow-shell.is-onboarding-mode .workflow-session-usage-flow {
  display: none;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left .compound-plugin-pill-header {
  width: 100%;
  min-width: 0;
  grid-template-columns: 28px minmax(0, 1fr) auto !important;
  place-items: center stretch;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left .waterfall-step-copy {
  display: grid !important;
  width: auto;
}

.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left .waterfall-step-status {
  display: inline-flex !important;
}

/* Smart workbench sidebar split: primary chat stays high, tools sit low. */
.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-left,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-left,
.compound-workflow-shell.is-onboarding-mode .compound-workflow-left,
.compound-workflow-shell.is-plugin-rail-collapsed.is-onboarding-mode .compound-workflow-left {
  display: flex !important;
  flex-direction: column;
  min-height: 0;
}

.compound-workflow-left-nav.compound-workflow-surface-tabs {
  flex: 0 0 auto;
}

.compound-workflow-bottom-nav.compound-workflow-surface-tabs {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.compound-workflow-left-footer {
  flex: 0 0 auto;
}

.compound-workflow-shell .compound-workflow-plugin-stack.waterfall-chat-steps {
  display: none !important;
}

.compound-workflow-shell:not(.is-onboarding-mode) .compound-workflow-agent-rail .compound-workflow-agent-status-panel > .compound-workflow-plugin-stack.waterfall-chat-steps,
.compound-workflow-shell.is-plugin-rail-collapsed:not(.is-onboarding-mode) .compound-workflow-agent-rail .compound-workflow-agent-status-panel > .compound-workflow-plugin-stack.waterfall-chat-steps,
.compound-workflow-shell.is-onboarding-mode .compound-workflow-agent-rail .compound-workflow-agent-status-panel > .compound-workflow-plugin-stack.waterfall-chat-steps,
.compound-workflow-shell.is-plugin-rail-collapsed.is-onboarding-mode .compound-workflow-agent-rail .compound-workflow-agent-status-panel > .compound-workflow-plugin-stack.waterfall-chat-steps {
  display: none !important;
}

/* Smart workbench menu icons: left-aligned outline style. */
.compound-workflow-left-nav .compound-workflow-surface-tab {
  grid-template-columns: 22px minmax(0, 1fr);
  justify-items: start;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  text-align: left;
}

.compound-workflow-left-nav .compound-workflow-surface-tab::before {
  content: none !important;
  display: none !important;
}

.compound-workflow-surface-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #111827;
}

.compound-workflow-surface-icon svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.compound-workflow-surface-label {
  min-width: 0;
  justify-self: start;
  overflow: hidden;
  color: inherit;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-workflow-left-nav .compound-workflow-surface-tab.is-active .compound-workflow-surface-icon,
.compound-workflow-left-nav .compound-workflow-surface-tab.is-active .compound-workflow-surface-label,
.compound-workflow-left-nav .compound-workflow-surface-tab.is-debug.is-active .compound-workflow-surface-icon,
.compound-workflow-left-nav .compound-workflow-surface-tab.is-debug.is-active .compound-workflow-surface-label {
  color: #1967d2;
}

body[data-theme="dark"] .compound-workflow-surface-icon {
  color: #111827;
}

/* Smart workbench chat: centered scroll lane with a floating composer. */
.compound-workflow-chat-host .compound-workflow-chat-main:not(.is-onboarding-mode) {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.compound-workflow-chat-host .compound-workflow-chat-main:not(.is-onboarding-mode) .waterfall-chat-messages {
  justify-self: center;
  width: min(920px, calc(100% - 48px));
  height: 100%;
  min-height: 0;
  padding: 24px 10px 172px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  scrollbar-gutter: stable;
}

.compound-workflow-chat-host .compound-workflow-chat-main:not(.is-onboarding-mode) .waterfall-chat-messages.is-scrollbar-auto-hide {
  scrollbar-color: transparent transparent;
  scrollbar-width: thin;
}

.compound-workflow-chat-host .compound-workflow-chat-main:not(.is-onboarding-mode) .waterfall-chat-messages.is-scrollbar-auto-hide.is-scrollbar-visible {
  scrollbar-color: rgba(148, 163, 184, 0.62) transparent;
}

.compound-workflow-chat-host .compound-workflow-chat-main:not(.is-onboarding-mode) .waterfall-chat-messages.is-scrollbar-auto-hide::-webkit-scrollbar {
  width: 10px;
}

.compound-workflow-chat-host .compound-workflow-chat-main:not(.is-onboarding-mode) .waterfall-chat-messages.is-scrollbar-auto-hide::-webkit-scrollbar-track {
  background: transparent;
}

.compound-workflow-chat-host .compound-workflow-chat-main:not(.is-onboarding-mode) .waterfall-chat-messages.is-scrollbar-auto-hide::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background-color: transparent;
  background-clip: padding-box;
}

.compound-workflow-chat-host .compound-workflow-chat-main:not(.is-onboarding-mode) .waterfall-chat-messages.is-scrollbar-auto-hide.is-scrollbar-visible::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.62);
}

.compound-workflow-chat-host .compound-workflow-chat-main:not(.is-onboarding-mode) .waterfall-chat-messages.is-scrollbar-auto-hide.is-scrollbar-visible::-webkit-scrollbar-thumb:hover {
  background-color: rgba(100, 116, 139, 0.74);
}

.compound-workflow-chat-host .compound-workflow-chat-main:not(.is-onboarding-mode) .waterfall-chat-composer {
  position: absolute;
  right: auto;
  bottom: 20px;
  left: 50%;
  z-index: 5;
  width: min(820px, calc(100% - 64px));
  min-height: 58px;
  padding: 10px 12px;
  align-items: center;
  transform: translateX(-50%);
}

.compound-workflow-chat-host .compound-workflow-chat-main:not(.is-onboarding-mode) .waterfall-chat-input {
  min-height: 24px;
  max-height: 120px;
  background: #ffffff;
  line-height: 1.5;
  resize: none;
  overflow-y: hidden;
}

.compound-workflow-chat-host .compound-workflow-chat-main:not(.is-onboarding-mode) .waterfall-pending-attachments,
.compound-workflow-chat-host .compound-workflow-chat-main:not(.is-onboarding-mode) .workflow-composer-pending-actions {
  position: absolute;
  right: auto;
  bottom: 154px;
  left: 50%;
  z-index: 6;
  width: min(820px, calc(100% - 64px));
  transform: translateX(-50%);
}

.compound-workflow-chat-host .compound-workflow-chat-main:not(.is-onboarding-mode) .waterfall-pending-attachments:empty,
.compound-workflow-chat-host .compound-workflow-chat-main:not(.is-onboarding-mode) .workflow-composer-pending-actions[hidden] {
  display: none;
}

/* Smart workbench conversations live in the left rail, not above the chat. */
.compound-workflow-chat-host {
  grid-template-rows: minmax(0, 1fr) !important;
}

.compound-workflow-chat-host > .compound-workflow-conversation-bar.waterfall-chat-conversations,
.compound-workflow-chat-main > .waterfall-chat-conversations {
  display: none !important;
}

.compound-workflow-left-conversations {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.compound-workflow-new-conversation-btn {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 8px;
  background: #ffffff;
  color: #1967d2;
  font-size: 0.78rem;
  font-weight: 820;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}

.compound-workflow-new-conversation-btn:hover,
.compound-workflow-new-conversation-btn:focus-visible {
  border-color: rgba(26, 115, 232, 0.34);
  background: #e8f0fe;
  outline: none;
}

.compound-workflow-new-conversation-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.compound-workflow-left-conversation-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 2px 2px 8px;
  overflow-x: hidden;
  overflow-y: auto;
}

.compound-workflow-left-conversation-list::-webkit-scrollbar {
  width: 8px;
}

.compound-workflow-left-conversation-list::-webkit-scrollbar-thumb {
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.55);
}

.compound-workflow-conversation-section {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.compound-workflow-conversation-section-title {
  padding: 3px 10px 2px;
  color: #94a3b8;
  font-size: 0.66rem;
  font-weight: 850;
}

.compound-workflow-conversation-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 2px;
  min-height: 34px;
  border-radius: 8px;
}

.compound-workflow-conversation-row:hover,
.compound-workflow-conversation-row:focus-within {
  background: #f1f5f9;
}

.compound-workflow-conversation-row.is-active {
  background: #e8f0fe;
}

.compound-workflow-conversation-main,
.compound-workflow-conversation-more,
.compound-workflow-conversation-menu-item {
  border: 0;
  background: transparent;
  color: #475569;
  font: inherit;
  cursor: pointer;
}

.compound-workflow-conversation-main {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 9px;
  min-width: 0;
  min-height: 34px;
  padding: 0 8px 0 10px;
  border-radius: 8px;
  text-align: left;
}

.compound-workflow-conversation-main:disabled,
.compound-workflow-conversation-more:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.compound-workflow-conversation-row.is-active .compound-workflow-conversation-main,
.compound-workflow-conversation-row.is-active .compound-workflow-conversation-more {
  color: #1967d2;
}

.compound-workflow-conversation-more {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  opacity: 0;
}

.compound-workflow-conversation-row:hover .compound-workflow-conversation-more,
.compound-workflow-conversation-row:focus-within .compound-workflow-conversation-more {
  opacity: 1;
}

.compound-workflow-conversation-more:hover,
.compound-workflow-conversation-more:focus-visible {
  background: #ffffff;
  color: #111827;
  outline: none;
}

.compound-workflow-conversation-more svg,
.compound-workflow-conversation-action-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.compound-workflow-conversation-more svg circle {
  fill: currentColor;
  stroke: none;
}

.compound-workflow-conversation-action-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: currentColor;
}

.compound-workflow-conversation-action-label {
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compound-workflow-conversation-menu {
  position: absolute;
  top: 32px;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 2px;
  width: 138px;
  padding: 5px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}

.compound-workflow-conversation-menu.is-floating {
  position: fixed;
  top: 0;
  right: auto;
  left: 0;
  z-index: 100000;
}

.compound-workflow-conversation-menu-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 8px;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 7px;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 760;
  text-align: left;
}

.compound-workflow-conversation-menu-item:hover,
.compound-workflow-conversation-menu-item:focus-visible {
  background: #f1f5f9;
  color: #111827;
  outline: none;
}

.compound-workflow-conversation-menu-item:nth-child(2):hover,
.compound-workflow-conversation-menu-item:nth-child(2):focus-visible {
  background: #fef2f2;
  color: #b42318;
}

.compound-workflow-conversation-empty {
  padding: 10px;
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 720;
}

body[data-theme="dark"] .compound-workflow-new-conversation-btn,
body[data-theme="dark"] .compound-workflow-conversation-menu {
  background: #ffffff;
  color: #1967d2;
}

body[data-theme="dark"] .compound-workflow-conversation-main,
body[data-theme="dark"] .compound-workflow-conversation-more,
body[data-theme="dark"] .compound-workflow-conversation-menu-item {
  color: #475569;
}

/* Smart workbench role messages should stay plain chat text, not nested cards. */
.compound-workflow-chat-host .compound-workflow-chat-main .waterfall-message.has-assistant-avatar,
.compound-workflow-chat-host .compound-workflow-chat-main .waterfall-message.has-assistant-avatar .waterfall-message-body {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.compound-workflow-chat-host .compound-workflow-chat-main .waterfall-message.has-assistant-avatar .waterfall-message-body {
  padding: 2px 0;
  border-radius: 0;
}

body[data-theme="dark"] .compound-workflow-chat-host .compound-workflow-chat-main .waterfall-message.has-assistant-avatar,
body[data-theme="dark"] .compound-workflow-chat-host .compound-workflow-chat-main .waterfall-message.has-assistant-avatar .waterfall-message-body {
  background: transparent;
}

/* Studio surface is a full-canvas workspace inside the smart workbench. */
.compound-workflow-shell.is-studio-surface-active .compound-workflow-asset-panel {
  grid-template-rows: minmax(0, 1fr);
  padding: 0;
}

.compound-workflow-shell.is-studio-surface-active .compound-workflow-surface-stack,
.compound-workflow-shell.is-studio-surface-active .compound-workflow-studio-host {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.compound-workflow-shell.is-studio-surface-active .compound-workflow-studio-host {
  border: 0;
}
