:root {
  --editor-bg: #ffffff;
  --editor-surface: #f5f6f8;
  --editor-panel: #ffffff;
  --editor-border: rgba(0, 0, 0, 0.08);
  --editor-text: #111827;
  --editor-muted: #6b7280;
  --editor-primary: #2563eb;
}

html[data-theme="dark"] {
  --editor-bg: #101010;
  --editor-surface: #101010;
  --editor-panel: #151a24;
  --editor-border: #2b3142;
  --editor-text: #e6ebf4;
  --editor-muted: #9aa3b2;
  --editor-primary: #5aa3ff;
}

/* 通知样式已统一到 /static/css/notification.css（按 html[data-theme] 适配深浅色），
   画布页不再单独覆盖，避免与工作台/其他页面出现不一致。 */

.image-editor-page {
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--editor-surface);
  color: var(--editor-text);
}

/* Hide the global Crisp support widget on the canvas editor page. */
#crisp-chatbox,
.crisp-client {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.image-editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--editor-border);
  background: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .image-editor-topbar {
  background: rgba(15, 20, 32, 0.92);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 240px;
}

.editor-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--editor-text);
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
}

html[data-theme="dark"] .editor-link {
  border-color: var(--editor-border);
  background: rgba(255, 255, 255, 0.03);
}

.editor-link:hover {
  background: rgba(0, 0, 0, 0.04);
}

html[data-theme="dark"] .editor-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.editor-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--editor-text);
}

.topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.editor-status {
  font-size: 13px;
  color: var(--editor-muted);
}

.topbar-right {
  min-width: 240px;
  display: flex;
  justify-content: flex-end;
}

.editor-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  color: var(--editor-text);
  background: rgba(0, 0, 0, 0.02);
  font-size: 13px;
}

html[data-theme="dark"] .editor-btn {
  border-color: var(--editor-border);
  background: rgba(255, 255, 255, 0.03);
}

.editor-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

html[data-theme="dark"] .editor-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.editor-btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--editor-primary), #4f46e5);
  color: #fff;
}

.editor-btn.primary:hover {
  opacity: 0.95;
}

.image-editor-body {
  flex: 1;
  position: relative;
  display: flex;
  overflow: hidden;
  background: var(--editor-surface);
}

.image-editor-stage-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  min-width: 0;
  order: 1;
}

.image-editor-stage {
  position: relative;
  display: flex;
  flex: 1;
  width: 100%;
  min-height: 100%;
  border-radius: 0;
  overflow: hidden;
  background: var(--editor-surface);
  border: none;
  box-shadow: none;
}

.editor-graph-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.09) 1px, transparent 0) 0 0 / 24px 24px,
    linear-gradient(180deg, #0d0d0f 0%, #0a0a0c 100%);
}

.editor-graph-stage.is-pan-mode {
  cursor: grab;
}

.editor-graph-stage.is-panning {
  cursor: grabbing;
}

html[data-theme="dark"] .editor-graph-stage {
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.08) 1px, transparent 0) 0 0 / 24px 24px,
    linear-gradient(180deg, #0d0d0f 0%, #0a0a0c 100%);
}

html:not([data-theme="dark"]) .editor-graph-stage {
  background:
    radial-gradient(circle at 1px 1px, rgba(15, 23, 42, 0.10) 1px, transparent 0) 0 0 / 24px 24px,
    linear-gradient(180deg, #eef2f7 0%, #e4e9f2 100%);
}

.editor-graph-grid,
.editor-graph-groups,
.editor-graph-svg,
.editor-graph-nodes {
  position: absolute;
  inset: 0;
}

.editor-graph-grid {
  pointer-events: none;
}

.editor-graph-svg {
  overflow: visible;
  pointer-events: auto;
  z-index: 1;
}

.editor-graph-groups {
  z-index: 2;
  pointer-events: none;
}

.editor-graph-nodes {
  z-index: 3;
  pointer-events: none;
}

.editor-graph-group {
  position: absolute;
  pointer-events: auto;
  user-select: none;
}

.editor-graph-group-inner {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  border: 1px dashed var(--graph-group-border, rgba(255, 255, 255, 0.42));
  background: var(--graph-group-bg, rgba(255, 255, 255, 0.045));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.045), 0 18px 56px rgba(0, 0, 0, 0.18);
  cursor: grab;
  overflow: hidden;
}

.editor-graph-group.is-selected .editor-graph-group-inner {
  border-color: rgba(96, 165, 250, 0.86);
  background: var(--graph-group-selected-bg, rgba(96, 165, 250, 0.08));
}

.editor-graph-group.is-dragging .editor-graph-group-inner {
  cursor: grabbing;
}

.editor-graph-group-head {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--graph-group-head-bg, rgba(20, 20, 24, 0.72));
  color: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.editor-graph-group-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  font-weight: 900;
}

.editor-graph-group-title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-graph-group-title small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  font-weight: 800;
}

.editor-graph-group-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.editor-graph-group-actions button {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.84);
  cursor: pointer;
}

.editor-graph-group-actions button:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.editor-graph-group-collapsed-meta {
  padding: 12px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
  font-weight: 800;
}

html:not([data-theme="dark"]) .editor-graph-group-inner {
  border-color: var(--graph-group-border, rgba(15, 23, 42, 0.30));
  background: var(--graph-group-bg, rgba(255, 255, 255, 0.45));
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05), 0 18px 42px rgba(15, 23, 42, 0.10);
}

html:not([data-theme="dark"]) .editor-graph-group.is-selected .editor-graph-group-inner {
  border-color: rgba(96, 165, 250, 0.86);
  background: var(--graph-group-selected-bg, rgba(96, 165, 250, 0.10));
}

html:not([data-theme="dark"]) .editor-graph-group-head {
  background: var(--graph-group-head-bg, rgba(255, 255, 255, 0.74));
  border-bottom-color: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.86);
}

html:not([data-theme="dark"]) .editor-graph-group-title small,
html:not([data-theme="dark"]) .editor-graph-group-collapsed-meta {
  color: rgba(55, 65, 81, 0.62);
}

html:not([data-theme="dark"]) .editor-graph-group-actions button {
  background: rgba(15, 23, 42, 0.07);
  color: rgba(15, 23, 42, 0.74);
}

html:not([data-theme="dark"]) .editor-graph-group-actions button:hover {
  background: rgba(15, 23, 42, 0.12);
  color: rgba(15, 23, 42, 0.95);
}

.editor-graph-selection-box {
  position: absolute;
  z-index: 6;
  border-radius: 18px;
  border: 1px solid rgba(96, 165, 250, 0.92);
  background: rgba(96, 165, 250, 0.14);
  box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.34);
  pointer-events: none;
}

.editor-graph-selection-box.is-persistent {
  border-style: dashed;
  background: rgba(96, 165, 250, 0.10);
}

.editor-graph-stage.is-selection-drag-hover {
  cursor: grab;
}

.editor-graph-stage.is-selection-dragging,
.editor-graph-stage.is-selection-dragging * {
  cursor: grabbing !important;
}

.editor-graph-minimap {
  position: absolute;
  left: 14px;
  bottom: 60px;
  z-index: 8;
  width: 240px;
  height: 150px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background:
    linear-gradient(180deg, rgba(24, 24, 28, 0.96) 0%, rgba(12, 12, 16, 0.94) 100%);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  cursor: crosshair;
}

html:not([data-theme="dark"]) .editor-graph-minimap {
  border-color: rgba(37, 99, 235, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(241, 245, 249, 0.94) 100%);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
}

.editor-graph-minimap-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.editor-graph-minimap-viewport {
  position: absolute;
  border-radius: 12px;
  border: 2px solid rgba(96, 165, 250, 0.96);
  box-shadow: 0 0 0 1px rgba(8, 47, 73, 0.18), 0 0 0 999px rgba(15, 23, 42, 0.12);
  background: rgba(96, 165, 250, 0.08);
  pointer-events: none;
}

html:not([data-theme="dark"]) .editor-graph-minimap-viewport {
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.16), 0 0 0 999px rgba(148, 163, 184, 0.08);
}

.editor-graph-minimap-toggle {
  position: absolute;
  left: 58px;
  bottom: 14px;
  z-index: 9;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(24, 24, 28, 0.94);
  color: rgba(255, 255, 255, 0.94);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.editor-graph-minimap-toggle:hover {
  transform: translateY(-1px);
  background: rgba(36, 36, 40, 0.98);
}

.editor-graph-minimap-toggle.is-active {
  border-color: rgba(96, 165, 250, 0.46);
  background: rgba(42, 78, 138, 0.94);
}

html:not([data-theme="dark"]) .editor-graph-minimap-toggle {
  border-color: rgba(37, 99, 235, 0.14);
  background: rgba(255, 255, 255, 0.94);
  color: rgba(15, 23, 42, 0.92);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
}

html:not([data-theme="dark"]) .editor-graph-minimap-toggle:hover {
  background: rgba(255, 255, 255, 0.98);
}

html:not([data-theme="dark"]) .editor-graph-minimap-toggle.is-active {
  border-color: rgba(45, 108, 223, 0.34);
  background: rgba(45, 108, 223, 0.12);
  color: rgba(26, 78, 163, 0.96);
}

.editor-graph-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  overflow: visible;
  background: rgba(24, 24, 28, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  color: #f3f4f6;
  user-select: none;
  transform-origin: top left;
  pointer-events: auto;
}

html:not([data-theme="dark"]) .editor-graph-node {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
  color: #111827;
}

.editor-graph-node.is-selected {
  box-shadow: 0 0 0 2px rgba(90, 163, 255, 0.82), 0 18px 60px rgba(0, 0, 0, 0.28);
}

.editor-graph-node.is-selected,
.editor-graph-node.is-selected .editor-graph-node-body,
.editor-graph-node.is-selected .editor-graph-node-media {
  cursor: grab;
}

.editor-graph-node.is-dragging,
.editor-graph-node.is-dragging .editor-graph-node-body,
.editor-graph-node.is-dragging .editor-graph-node-media {
  cursor: grabbing;
}

.editor-graph-node.is-running {
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.76), 0 18px 60px rgba(0, 0, 0, 0.28);
}

.editor-graph-node.is-error {
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.76), 0 18px 60px rgba(0, 0, 0, 0.28);
}

.editor-graph-node.is-panorama {
  border-color: rgba(14, 165, 233, 0.30);
}

.editor-graph-node.is-panorama.is-selected {
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.84), 0 18px 60px rgba(0, 0, 0, 0.28);
}

.editor-graph-node-head {
  position: absolute;
  left: 14px;
  right: 14px;
  top: -34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.88);
}

html:not([data-theme="dark"]) .editor-graph-node-head {
  color: rgba(17, 24, 39, 0.86);
}

.editor-graph-node-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 62%;
}

.editor-graph-node-title-edit {
  display: inline-block;
  min-width: 34px;
  max-width: 100%;
  padding: 2px 4px;
  border-radius: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  outline: none;
  cursor: text;
}

.editor-graph-node-title-edit:focus {
  min-width: 160px;
  max-width: min(420px, 58vw);
  overflow: visible;
  text-overflow: clip;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.58);
}

html:not([data-theme="dark"]) .editor-graph-node-title-edit:focus {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.42);
}

.editor-graph-node-model,
.editor-graph-node-dimensions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.78);
}

html:not([data-theme="dark"]) .editor-graph-node-model,
html:not([data-theme="dark"]) .editor-graph-node-dimensions {
  color: rgba(55, 65, 81, 0.82);
}

.editor-graph-node-dimensions {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.editor-graph-node-body {
  position: relative;
  flex: 1;
  border-radius: 26px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

html:not([data-theme="dark"]) .editor-graph-node-body {
  background: rgba(15, 23, 42, 0.04);
}

.editor-graph-node-media,
.editor-graph-node-media img,
.editor-graph-node-media video {
  width: 100%;
  height: 100%;
}

.editor-graph-node-media {
  position: relative;
}

.editor-graph-node-media img,
.editor-graph-node-media video {
  display: block;
  object-fit: cover;
}

.editor-graph-panorama-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(12, 74, 110, 0.88);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

.editor-graph-panorama-badge:disabled {
  opacity: 0.62;
  cursor: default;
}

.editor-graph-panorama-enter {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  min-width: 112px;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(11, 15, 24, 0.78);
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.editor-graph-node-media:hover .editor-graph-panorama-enter,
.editor-graph-panorama-enter:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1.02);
}

.editor-graph-toolbar-panorama-icon,
.editor-left-add-panorama-icon,
.editor-panorama-mode-icon {
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
}

.editor-graph-node-media.is-video video {
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, 0.22);
}

.editor-graph-video-poster {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.editor-graph-video-placeholder,
.editor-video-poster-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: rgba(226, 232, 240, 0.72);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.98));
  pointer-events: none;
}

.editor-graph-video-placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  transition: opacity 0.18s ease;
}

.editor-graph-video-placeholder i {
  font-size: 22px;
}

.editor-graph-node-media.is-video.has-poster:not(.has-ready-frame) video {
  opacity: 0;
}

.editor-graph-node-media.is-video.is-playing .editor-graph-video-poster {
  opacity: 0;
}

.editor-graph-node-media.is-video.has-ready-frame .editor-graph-video-placeholder,
.editor-graph-node-media.is-video.is-playing .editor-graph-video-placeholder {
  opacity: 0;
}

.editor-graph-node-media.is-audio {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(34, 34, 38, 0.96), rgba(20, 20, 24, 0.98));
  --audio-progress: 0%;
}

html:not([data-theme="dark"]) .editor-graph-node-media.is-audio {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98));
}

.editor-graph-node-media.is-text {
  display: block;
  padding: 18px 20px;
  overflow: hidden;
  background: var(--editor-graph-text-bg,
    radial-gradient(circle at 18% 0%, rgba(96, 165, 250, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(18, 18, 20, 0.96), rgba(9, 9, 11, 0.98)));
}

html:not([data-theme="dark"]) .editor-graph-node-media.is-text {
  background: var(--editor-graph-text-bg,
    radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98)));
}

.editor-graph-node-media.is-product {
  display: block;
  padding: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(16, 185, 129, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(10, 10, 12, 0.98));
}

html:not([data-theme="dark"]) .editor-graph-node-media.is-product {
  background:
    radial-gradient(circle at 12% 0%, rgba(16, 185, 129, 0.10), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.editor-graph-product-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.editor-graph-product-main {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  min-height: 132px;
}

.editor-graph-product-cover {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

html:not([data-theme="dark"]) .editor-graph-product-cover {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.04);
}

.editor-graph-product-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.editor-graph-product-cover-empty {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  color: rgba(255, 255, 255, 0.58);
  text-align: center;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
}

html:not([data-theme="dark"]) .editor-graph-product-cover-empty {
  color: rgba(55, 65, 81, 0.68);
}

.editor-graph-product-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.editor-graph-product-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.editor-graph-product-field span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 850;
}

html:not([data-theme="dark"]) .editor-graph-product-field span {
  color: rgba(55, 65, 81, 0.72);
}

.editor-graph-product-field input,
.editor-graph-product-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  outline: none;
}

.editor-graph-product-field input {
  height: 38px;
  padding: 0 11px;
}

.editor-graph-product-field textarea {
  resize: none;
  min-height: 54px;
  padding: 9px 11px;
}

.editor-graph-product-field input:focus,
.editor-graph-product-field textarea:focus {
  border-color: rgba(96, 165, 250, 0.82);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18);
}

html:not([data-theme="dark"]) .editor-graph-product-field input,
html:not([data-theme="dark"]) .editor-graph-product-field textarea {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: rgba(17, 24, 39, 0.94);
}

.editor-graph-product-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.editor-graph-product-field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.editor-graph-product-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.editor-graph-product-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.editor-graph-product-action:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.editor-graph-product-action:disabled {
  opacity: 0.56;
  cursor: default;
}

html:not([data-theme="dark"]) .editor-graph-product-action {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.06);
  color: rgba(17, 24, 39, 0.84);
}

.editor-graph-text-rendered {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 6px;
  color: var(--editor-graph-text-color, rgba(255, 255, 255, 0.88));
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: 0.01em;
  word-break: break-word;
  cursor: grab;
}

.editor-graph-node.is-dragging .editor-graph-text-rendered {
  cursor: grabbing;
}

.editor-graph-text-rendered p,
.editor-graph-text-rendered h1,
.editor-graph-text-rendered h2,
.editor-graph-text-rendered h3,
.editor-graph-text-rendered h4 {
  margin: 0 0 10px;
}

.editor-graph-text-rendered h1 {
  font-size: 24px;
  line-height: 1.22;
}

.editor-graph-text-rendered h2 {
  font-size: 20px;
  line-height: 1.28;
}

.editor-graph-text-rendered h3 {
  font-size: 17px;
  line-height: 1.34;
}

.editor-graph-text-rendered h4 {
  font-size: 15px;
  line-height: 1.4;
}

.editor-graph-text-rendered strong {
  font-weight: 900;
}

.editor-graph-text-rendered em {
  font-style: italic;
}

.editor-graph-reference-chip {
  display: inline-flex;
  align-items: center;
  max-width: 138px;
  min-height: 24px;
  margin: 0 3px;
  padding: 2px 7px 2px 3px;
  gap: 5px;
  border-radius: 8px;
  vertical-align: middle;
  background: rgba(59, 130, 246, 0.18);
  color: var(--editor-graph-text-color, rgba(255, 255, 255, 0.94));
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.editor-graph-reference-chip-thumb,
.editor-graph-reference-chip-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 6px;
  overflow: hidden;
}

.editor-graph-reference-chip-thumb {
  display: block;
  object-fit: cover;
}

.editor-graph-reference-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.22);
  color: inherit;
  font-size: 11px;
}

.editor-graph-reference-chip.is-video {
  background: rgba(139, 92, 246, 0.2);
}

.editor-graph-reference-chip.is-audio {
  background: rgba(14, 165, 233, 0.2);
}

.editor-graph-reference-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

html:not([data-theme="dark"]) .editor-graph-reference-chip {
  background: rgba(37, 99, 235, 0.13);
  color: var(--editor-graph-text-color, rgba(15, 23, 42, 0.92));
}

html:not([data-theme="dark"]) .editor-graph-reference-chip.is-video {
  background: rgba(124, 58, 237, 0.13);
}

html:not([data-theme="dark"]) .editor-graph-reference-chip.is-audio {
  background: rgba(2, 132, 199, 0.13);
}

.editor-graph-text-rendered-empty {
  color: rgba(255, 255, 255, 0.42);
}

.editor-graph-node-media.is-text .editor-graph-text-content {
  display: none;
}

.editor-graph-node-media.is-text.is-editing .editor-graph-text-content {
  display: block;
}

.editor-graph-node-media.is-text.is-editing .editor-graph-text-rendered {
  display: none;
}

.editor-graph-text-content {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 6px;
  color: var(--editor-graph-text-color, rgba(255, 255, 255, 0.86));
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: 0.01em;
  white-space: pre-wrap;
  word-break: break-word;
  cursor: text;
  outline: none;
}

.editor-graph-text-content:empty::before {
  content: attr(data-placeholder);
  display: block;
  max-width: 260px;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 650;
  line-height: 1.45;
  pointer-events: none;
}

.editor-graph-text-content:focus {
  color: var(--editor-graph-text-color, rgba(255, 255, 255, 0.94));
}

.editor-graph-text-content::-webkit-scrollbar {
  width: 8px;
}

.editor-graph-text-content::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.editor-graph-text-content::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}

.editor-graph-text-content:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.38);
}

html:not([data-theme="dark"]) .editor-graph-text-content {
  color: var(--editor-graph-text-color, rgba(15, 23, 42, 0.84));
}

html:not([data-theme="dark"]) .editor-graph-text-content:empty::before {
  color: rgba(15, 23, 42, 0.42);
}

html:not([data-theme="dark"]) .editor-graph-text-content:focus {
  color: var(--editor-graph-text-color, rgba(15, 23, 42, 0.94));
}

html:not([data-theme="dark"]) .editor-graph-text-content::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.06);
}

html:not([data-theme="dark"]) .editor-graph-text-content::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.22);
}

html:not([data-theme="dark"]) .editor-graph-text-content:hover::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.34);
}

.editor-graph-text-skeleton {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 4px;
}

.editor-graph-text-skeleton span {
  display: block;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

html:not([data-theme="dark"]) .editor-graph-text-skeleton span {
  background: rgba(15, 23, 42, 0.11);
}

.editor-graph-node-media.is-audio audio {
  display: none;
}

.editor-graph-audio-shell {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 22px 18px;
  gap: 20px;
}

.editor-graph-audio-wave {
  position: relative;
  flex: 1;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.editor-graph-audio-wave::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--audio-progress, 0%);
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.92), rgba(239, 68, 68, 0.66));
  opacity: 0.16;
  transition: width 0.15s linear;
  pointer-events: none;
}

.editor-graph-audio-wave::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: var(--audio-progress, 0%);
  width: 3px;
  margin-left: -1px;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.96);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.editor-graph-audio-main-toggle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transform: translate(-50%, -50%);
  transition: transform 0.16s ease, background 0.16s ease, opacity 0.16s ease;
  z-index: 2;
}

.editor-graph-audio-main-toggle:hover,
.editor-graph-audio-main-toggle.is-playing {
  background: rgba(15, 23, 42, 0.72);
}

.editor-graph-node-media.is-audio.is-playing .editor-graph-audio-main-toggle {
  opacity: 0.38;
}

.editor-graph-node-media.is-audio:hover .editor-graph-audio-main-toggle.is-playing {
  opacity: 0.92;
}

.editor-graph-audio-wave span {
  position: relative;
  flex: 1 1 0;
  min-width: 3px;
  max-width: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

html:not([data-theme="dark"]) .editor-graph-audio-wave span {
  background: rgba(15, 23, 42, 0.16);
}

.editor-graph-node-media.is-audio.is-playing .editor-graph-audio-wave span {
  background: linear-gradient(180deg, rgba(248, 113, 113, 0.9), rgba(244, 63, 94, 0.9));
}

html:not([data-theme="dark"]) .editor-graph-node-media.is-audio.is-playing .editor-graph-audio-wave span {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.76), rgba(244, 63, 94, 0.76));
}

.editor-graph-audio-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.editor-graph-audio-time {
  font-size: 15px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.84);
  letter-spacing: 0.01em;
}

html:not([data-theme="dark"]) .editor-graph-audio-time {
  color: rgba(15, 23, 42, 0.78);
}

.editor-graph-audio-toggle {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}

.editor-graph-audio-toggle:hover {
  transform: scale(1.04);
  background: rgba(255, 255, 255, 0.14);
}

.editor-graph-audio-toggle.is-playing {
  background: rgba(248, 113, 113, 0.22);
}

html:not([data-theme="dark"]) .editor-graph-audio-toggle {
  background: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.9);
}

html:not([data-theme="dark"]) .editor-graph-audio-toggle:hover {
  background: rgba(15, 23, 42, 0.13);
}

html:not([data-theme="dark"]) .editor-graph-audio-main-toggle {
  background: rgba(15, 23, 42, 0.66);
}

.editor-graph-video-toolbar,
.editor-graph-image-tool-panel,
.editor-graph-video-trim-panel {
  position: absolute;
  z-index: 7;
}

.editor-graph-video-toolbar[hidden],
.editor-graph-image-tool-panel[hidden],
.editor-graph-video-trim-panel[hidden] {
  display: none;
}

.editor-graph-video-toolbar {
  transform: translateX(-50%);
}

.editor-graph-video-toolbar.is-selection-toolbar {
  width: max-content;
  max-width: calc(100% - 24px);
}

.editor-graph-video-toolbar.is-selection-toolbar .editor-graph-video-toolbar-inner {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  box-sizing: border-box;
}

.editor-graph-video-toolbar.is-selection-toolbar .editor-graph-video-tool-btn {
  flex-shrink: 0;
}

.editor-graph-video-toolbar-inner {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 22px;
  background: rgba(32, 32, 34, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.editor-graph-group-color-control {
  position: relative;
  display: inline-flex;
}

.editor-graph-group-color-current,
.editor-graph-group-color-swatch {
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.editor-graph-group-color-current {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.editor-graph-group-color-current > span,
.editor-graph-group-color-swatch > span {
  position: relative;
  display: block;
  border-radius: 999px;
  background: var(--group-color, rgba(255, 255, 255, 0.86));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 6px 14px rgba(0, 0, 0, 0.20);
}

.editor-graph-group-color-current > span {
  width: 28px;
  height: 28px;
}

.editor-graph-group-color-swatch > span {
  width: 34px;
  height: 34px;
}

.editor-graph-group-color-current.is-empty > span,
.editor-graph-group-color-swatch.is-empty > span {
  background: rgba(255, 255, 255, 0.14);
}

.editor-graph-group-color-current.is-empty > span::after,
.editor-graph-group-color-swatch.is-empty > span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70%;
  height: 3px;
  border-radius: 999px;
  background: #ef4444;
  transform: translate(-50%, -50%) rotate(45deg);
}

.editor-graph-group-color-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 14px);
  z-index: 12;
  width: 258px;
  display: grid;
  grid-template-columns: repeat(5, 42px);
  gap: 14px 18px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(38, 38, 40, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.36);
}

.editor-graph-group-color-swatch {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.editor-graph-group-color-swatch.is-active {
  outline: 3px solid #22d3ee;
  outline-offset: 3px;
}

html:not([data-theme="dark"]) .editor-graph-group-color-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.16);
}

html:not([data-theme="dark"]) .editor-graph-video-toolbar-inner {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(15, 23, 42, 0.10);
}

.editor-graph-video-tool-btn,
.editor-graph-video-tool-icon {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.96);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  transition: background 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
}

.editor-graph-selection-count {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

html:not([data-theme="dark"]) .editor-graph-selection-count {
  color: rgba(15, 23, 42, 0.62);
}

html:not([data-theme="dark"]) .editor-graph-video-tool-btn,
html:not([data-theme="dark"]) .editor-graph-video-tool-icon {
  color: rgba(15, 23, 42, 0.92);
}

.editor-graph-video-tool-btn {
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 16px;
  font-size: 15px;
}

.editor-graph-video-tool-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 20px;
}

.editor-graph-video-tool-btn:hover,
.editor-graph-video-tool-icon:hover,
.editor-graph-video-tool-btn.is-active {
  background: rgba(255, 255, 255, 0.08);
}

html:not([data-theme="dark"]) .editor-graph-video-tool-btn:hover,
html:not([data-theme="dark"]) .editor-graph-video-tool-icon:hover,
html:not([data-theme="dark"]) .editor-graph-video-tool-btn.is-active {
  background: rgba(15, 23, 42, 0.06);
}

.editor-graph-video-tool-btn:disabled,
.editor-graph-video-tool-icon:disabled {
  opacity: 0.48;
  cursor: default;
}

.editor-graph-text-toolbar-inner {
  gap: 6px;
}

.editor-graph-text-format-btn {
  min-width: 42px;
  padding: 0 12px;
  font-size: 15px;
}

.editor-graph-text-bg-label {
  padding: 0 2px 0 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 800;
}

html:not([data-theme="dark"]) .editor-graph-text-bg-label {
  color: rgba(15, 23, 42, 0.62);
}

.editor-graph-text-bg-options {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.editor-graph-text-bg-swatch {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.20);
  background: var(--swatch-color);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16);
}

.editor-graph-text-bg-swatch.is-active,
.editor-graph-text-bg-reset.is-active {
  outline: 2px solid rgba(96, 165, 250, 0.95);
  outline-offset: 2px;
}

.editor-graph-text-bg-reset {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 13px;
}

.editor-graph-video-tool-sep {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.10);
}

html:not([data-theme="dark"]) .editor-graph-video-tool-sep {
  background: rgba(15, 23, 42, 0.10);
}

.editor-graph-video-tool-dropdown {
  position: relative;
  display: inline-flex;
}

.editor-graph-video-tool-chevron {
  font-size: 11px;
  opacity: 0.72;
  transition: transform 0.16s ease;
}

.editor-graph-video-tool-dropdown.is-open .editor-graph-video-tool-chevron {
  transform: rotate(180deg);
}

.editor-graph-grid-split-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 9;
  width: 236px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(42, 42, 44, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.editor-graph-crop-ratio-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 9;
  width: 188px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(42, 42, 44, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.editor-graph-video-tool-dropdown.is-menu-up .editor-graph-grid-split-menu {
  top: auto;
  bottom: calc(100% + 10px);
}

.editor-graph-video-tool-dropdown.is-menu-up .editor-graph-crop-ratio-menu {
  top: auto;
  bottom: calc(100% + 10px);
}

html:not([data-theme="dark"]) .editor-graph-grid-split-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.editor-graph-crop-ratio-menu-item {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 850;
  text-align: left;
}

html:not([data-theme="dark"]) .editor-graph-crop-ratio-menu,
html:not([data-theme="dark"]) .editor-graph-crop-ratio-menu-item {
  color: rgba(15, 23, 42, 0.92);
}

html:not([data-theme="dark"]) .editor-graph-crop-ratio-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.editor-graph-crop-ratio-menu-item:hover,
.editor-graph-crop-ratio-menu-item.is-active {
  background: rgba(255, 255, 255, 0.08);
}

html:not([data-theme="dark"]) .editor-graph-crop-ratio-menu-item:hover,
html:not([data-theme="dark"]) .editor-graph-crop-ratio-menu-item.is-active {
  background: rgba(15, 23, 42, 0.06);
}

.editor-graph-video-tool-confirm {
  min-height: 42px;
  padding: 0 22px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  color: rgba(11, 14, 20, 0.96);
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
}

html:not([data-theme="dark"]) .editor-graph-video-tool-confirm {
  background: rgba(15, 23, 42, 0.92);
  color: rgba(255, 255, 255, 0.96);
}

.editor-graph-video-tool-confirm:disabled {
  cursor: default;
  opacity: 0.48;
}

.editor-graph-grid-split-menu-item {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
  font-weight: 850;
  text-align: left;
}

html:not([data-theme="dark"]) .editor-graph-grid-split-menu-item {
  color: rgba(15, 23, 42, 0.92);
}

.editor-graph-grid-split-menu-item strong {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

html:not([data-theme="dark"]) .editor-graph-grid-split-menu-item strong {
  color: rgba(15, 23, 42, 0.54);
}

.editor-graph-grid-split-menu-item:hover,
.editor-graph-grid-split-menu-item.is-active {
  background: rgba(255, 255, 255, 0.08);
}

html:not([data-theme="dark"]) .editor-graph-grid-split-menu-item:hover,
html:not([data-theme="dark"]) .editor-graph-grid-split-menu-item.is-active {
  background: rgba(15, 23, 42, 0.06);
}

.editor-graph-grid-split-menu-foot {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 800;
}

html:not([data-theme="dark"]) .editor-graph-grid-split-menu-foot {
  border-top-color: rgba(15, 23, 42, 0.10);
  color: rgba(15, 23, 42, 0.54);
}

.editor-graph-grid-split-menu-apply {
  min-width: 72px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: rgba(11, 14, 20, 0.96);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

html:not([data-theme="dark"]) .editor-graph-grid-split-menu-apply {
  background: rgba(15, 23, 42, 0.92);
  color: rgba(255, 255, 255, 0.96);
}

.editor-graph-grid-split-menu-apply:disabled,
.editor-graph-grid-split-menu-item:disabled,
.editor-graph-crop-ratio-menu-item:disabled {
  cursor: default;
  opacity: 0.48;
}

.editor-graph-image-tool-panel {
  min-width: 320px;
}

.editor-graph-image-tool-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(24, 24, 28, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.editor-graph-image-tool-panel-inner.is-crop {
  gap: 16px;
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

html:not([data-theme="dark"]) .editor-graph-image-tool-panel-inner {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.10);
}

.editor-graph-image-tool-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editor-graph-image-tool-panel-title {
  color: rgba(255, 255, 255, 0.96);
  font-size: 18px;
  font-weight: 900;
}

html:not([data-theme="dark"]) .editor-graph-image-tool-panel-title {
  color: rgba(15, 23, 42, 0.94);
}

.editor-graph-image-tool-panel-meta {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 700;
}

html:not([data-theme="dark"]) .editor-graph-image-tool-panel-meta {
  color: rgba(15, 23, 42, 0.62);
}

.editor-graph-image-tool-ratios {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.editor-graph-image-tool-ratio {
  min-width: 72px;
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

html:not([data-theme="dark"]) .editor-graph-image-tool-ratio {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.04);
  color: rgba(15, 23, 42, 0.92);
}

.editor-graph-image-tool-ratio:hover,
.editor-graph-image-tool-ratio.is-active {
  background: rgba(63, 132, 255, 0.20);
  border-color: rgba(84, 145, 255, 0.72);
}

html:not([data-theme="dark"]) .editor-graph-image-tool-ratio:hover,
html:not([data-theme="dark"]) .editor-graph-image-tool-ratio.is-active {
  background: rgba(45, 108, 223, 0.10);
  border-color: rgba(45, 108, 223, 0.44);
}

.editor-graph-image-tool-ratio:disabled {
  opacity: 0.54;
  cursor: default;
}

.editor-graph-crop-size-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.editor-graph-crop-dim {
  display: grid;
  gap: 8px;
}

.editor-graph-crop-dim span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 800;
}

html:not([data-theme="dark"]) .editor-graph-crop-dim span {
  color: rgba(15, 23, 42, 0.58);
}

.editor-graph-crop-dim input {
  width: 100%;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.94);
  padding: 0 14px;
  font-size: 18px;
  font-weight: 900;
  outline: none;
}

html:not([data-theme="dark"]) .editor-graph-crop-dim input {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.04);
  color: rgba(15, 23, 42, 0.92);
}

.editor-graph-crop-dim input:focus {
  border-color: rgba(84, 145, 255, 0.86);
  box-shadow: 0 0 0 3px rgba(84, 145, 255, 0.18);
}

.editor-graph-crop-lock {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(63, 132, 255, 0.18);
  color: rgba(84, 145, 255, 0.96);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.editor-graph-crop-lock:not(.is-locked) {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.48);
}

html:not([data-theme="dark"]) .editor-graph-crop-lock:not(.is-locked) {
  background: rgba(15, 23, 42, 0.05);
  color: rgba(15, 23, 42, 0.48);
}

.editor-graph-crop-lock:disabled {
  cursor: default;
  opacity: 0.52;
}

.editor-graph-crop-section-title {
  color: rgba(255, 255, 255, 0.70);
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
}

html:not([data-theme="dark"]) .editor-graph-crop-section-title {
  color: rgba(15, 23, 42, 0.62);
}

.editor-graph-crop-presets {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-graph-crop-preset-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-graph-crop-preset-group-header {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
}

html:not([data-theme="dark"]) .editor-graph-crop-preset-group-header {
  color: rgba(15, 23, 42, 0.78);
}

.editor-graph-crop-preset-group-header i {
  transition: transform 0.16s ease;
  color: rgba(255, 255, 255, 0.42);
}

html:not([data-theme="dark"]) .editor-graph-crop-preset-group-header i {
  color: rgba(15, 23, 42, 0.44);
}

.editor-graph-crop-preset-group-header.is-open i {
  transform: rotate(90deg);
}

.editor-graph-crop-preset-group-header span {
  font-size: 16px;
  font-weight: 500;
}

.editor-graph-crop-preset-group-title {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

html:not([data-theme="dark"]) .editor-graph-crop-preset-group-title {
  color: rgba(15, 23, 42, 0.52);
}

.editor-graph-crop-preset-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 8px;
}

.editor-graph-crop-preset {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.90);
  cursor: pointer;
  text-align: left;
}

html:not([data-theme="dark"]) .editor-graph-crop-preset {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.04);
  color: rgba(15, 23, 42, 0.90);
}

.editor-graph-crop-preset:hover,
.editor-graph-crop-preset.is-active {
  border-color: rgba(84, 145, 255, 0.72);
  background: rgba(84, 145, 255, 0.16);
}

html:not([data-theme="dark"]) .editor-graph-crop-preset:hover,
html:not([data-theme="dark"]) .editor-graph-crop-preset.is-active {
  background: rgba(45, 108, 223, 0.10);
  border-color: rgba(45, 108, 223, 0.46);
}

.editor-graph-crop-preset span {
  font-size: 14px;
  font-weight: 850;
}

.editor-graph-crop-preset strong {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 750;
}

html:not([data-theme="dark"]) .editor-graph-crop-preset strong {
  color: rgba(15, 23, 42, 0.56);
}

.editor-graph-crop-actions {
  justify-content: flex-end;
}

.editor-graph-image-tool-actions {
  display: flex;
  justify-content: flex-end;
}

.editor-graph-image-tool-panel-inner.is-relight {
  gap: 16px;
}

.editor-graph-image-tool-panel-inner.is-multi-angle {
  gap: 16px;
}

.editor-graph-image-tool-panel-inner.is-ecommerce-translate {
  gap: 16px;
  max-height: min(720px, calc(100vh - 56px));
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.editor-graph-ecommerce-tool-tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.editor-graph-ecommerce-tool-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 13px;
  color: rgba(255, 255, 255, 0.96);
  background: rgba(255, 255, 255, 0.10);
  font-size: 14px;
  font-weight: 900;
}

.editor-graph-ecommerce-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.editor-graph-ecommerce-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.92);
}

.editor-graph-ecommerce-section-head strong {
  font-size: 15px;
  font-weight: 900;
}

.editor-graph-ecommerce-section-head span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  font-weight: 800;
}

.editor-graph-ecommerce-language-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.editor-graph-ecommerce-language-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-graph-ecommerce-language-group-title {
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.editor-graph-ecommerce-language-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-graph-ecommerce-language-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.84);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.editor-graph-ecommerce-language-chip:hover,
.editor-graph-ecommerce-language-chip.is-active {
  background: rgba(63, 132, 255, 0.22);
  border-color: rgba(84, 145, 255, 0.74);
  color: rgba(255, 255, 255, 0.98);
}

.editor-graph-ecommerce-language-chip:disabled {
  opacity: 0.56;
  cursor: default;
}

.editor-graph-ecommerce-toggle,
.editor-graph-ecommerce-output-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
}

.editor-graph-ecommerce-toggle span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.editor-graph-ecommerce-toggle strong,
.editor-graph-ecommerce-output-row strong {
  color: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  font-weight: 900;
}

.editor-graph-ecommerce-toggle small,
.editor-graph-ecommerce-output-row span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  font-weight: 750;
}

.editor-graph-ecommerce-toggle input {
  width: 20px;
  height: 20px;
  accent-color: #4f8cff;
}

.editor-graph-ecommerce-actions {
  justify-content: flex-end;
}

html:not([data-theme="dark"]) .editor-graph-ecommerce-tool-tabs,
html:not([data-theme="dark"]) .editor-graph-ecommerce-toggle,
html:not([data-theme="dark"]) .editor-graph-ecommerce-output-row {
  background: rgba(15, 23, 42, 0.05);
}

html:not([data-theme="dark"]) .editor-graph-ecommerce-tool-tabs button {
  color: rgba(15, 23, 42, 0.94);
  background: rgba(255, 255, 255, 0.86);
}

html:not([data-theme="dark"]) .editor-graph-ecommerce-section-head,
html:not([data-theme="dark"]) .editor-graph-ecommerce-language-chip,
html:not([data-theme="dark"]) .editor-graph-ecommerce-toggle,
html:not([data-theme="dark"]) .editor-graph-ecommerce-output-row {
  color: rgba(15, 23, 42, 0.84);
}

html:not([data-theme="dark"]) .editor-graph-ecommerce-section-head span,
html:not([data-theme="dark"]) .editor-graph-ecommerce-language-group-title,
html:not([data-theme="dark"]) .editor-graph-ecommerce-toggle small,
html:not([data-theme="dark"]) .editor-graph-ecommerce-output-row span {
  color: rgba(15, 23, 42, 0.56);
}

html:not([data-theme="dark"]) .editor-graph-ecommerce-language-chip {
  background: rgba(15, 23, 42, 0.06);
}

html:not([data-theme="dark"]) .editor-graph-ecommerce-language-chip:hover,
html:not([data-theme="dark"]) .editor-graph-ecommerce-language-chip.is-active {
  background: rgba(45, 108, 223, 0.12);
  border-color: rgba(45, 108, 223, 0.46);
  color: rgba(15, 23, 42, 0.96);
}

html:not([data-theme="dark"]) .editor-graph-ecommerce-toggle strong,
html:not([data-theme="dark"]) .editor-graph-ecommerce-output-row strong {
  color: rgba(15, 23, 42, 0.94);
}

.editor-graph-multi-angle-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.editor-graph-multi-angle-preset {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
}

html:not([data-theme="dark"]) .editor-graph-multi-angle-preset {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.04);
  color: rgba(15, 23, 42, 0.68);
}

.editor-graph-multi-angle-preset:hover,
.editor-graph-multi-angle-preset.is-active {
  background: rgba(255, 255, 255, 0.20);
  color: rgba(255, 255, 255, 0.96);
}

html:not([data-theme="dark"]) .editor-graph-multi-angle-preset:hover,
html:not([data-theme="dark"]) .editor-graph-multi-angle-preset.is-active {
  background: rgba(15, 23, 42, 0.14);
  color: rgba(15, 23, 42, 0.94);
}

.editor-graph-multi-angle-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.editor-graph-multi-angle-preview {
  position: relative;
  min-height: 260px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
  display: grid;
  place-items: center;
  overflow: hidden;
}

html:not([data-theme="dark"]) .editor-graph-multi-angle-preview {
  background: rgba(15, 23, 42, 0.05);
}

.editor-graph-multi-angle-globe {
  position: relative;
  width: 226px;
  height: 226px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03) 48%, rgba(0, 0, 0, 0.16) 76%, rgba(0, 0, 0, 0.26)),
    radial-gradient(circle at 50% 50%, transparent 70%, rgba(255, 255, 255, 0.16) 70.5%, transparent 71.2%);
  overflow: hidden;
  box-shadow:
    inset 0 0 34px rgba(255, 255, 255, 0.06),
    inset 0 0 0 4px rgba(255, 255, 255, 0.035),
    0 0 0 2px rgba(255, 255, 255, 0.10),
    0 16px 34px rgba(0, 0, 0, 0.22);
  perspective: 760px;
  transform-style: preserve-3d;
}

html:not([data-theme="dark"]) .editor-graph-multi-angle-globe {
  border-color: rgba(15, 23, 42, 0.18);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.84), rgba(15, 23, 42, 0.05) 72%, rgba(15, 23, 42, 0.10)),
    radial-gradient(circle at 50% 50%, transparent 70%, rgba(15, 23, 42, 0.16) 70.5%, transparent 71.2%);
}

.editor-graph-multi-angle-globe::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 999px;
  pointer-events: none;
  background:
    radial-gradient(ellipse 13% 100% at 50% 50%, transparent 95.2%, rgba(255, 255, 255, 0.22) 95.8%, transparent 96.7%),
    radial-gradient(ellipse 26% 100% at 50% 50%, transparent 95.6%, rgba(255, 255, 255, 0.20) 96.2%, transparent 97.1%),
    radial-gradient(ellipse 39% 100% at 50% 50%, transparent 96%, rgba(255, 255, 255, 0.18) 96.6%, transparent 97.4%),
    radial-gradient(ellipse 52% 100% at 50% 50%, transparent 96.3%, rgba(255, 255, 255, 0.16) 96.9%, transparent 97.8%),
    radial-gradient(ellipse 65% 100% at 50% 50%, transparent 96.6%, rgba(255, 255, 255, 0.15) 97.2%, transparent 98%),
    radial-gradient(ellipse 78% 100% at 50% 50%, transparent 96.8%, rgba(255, 255, 255, 0.13) 97.4%, transparent 98.2%),
    radial-gradient(ellipse 91% 100% at 50% 50%, transparent 97%, rgba(255, 255, 255, 0.11) 97.6%, transparent 98.4%),
    radial-gradient(ellipse 100% 13% at 50% 50%, transparent 95.2%, rgba(255, 255, 255, 0.21) 95.8%, transparent 96.7%),
    radial-gradient(ellipse 100% 26% at 50% 50%, transparent 95.6%, rgba(255, 255, 255, 0.19) 96.2%, transparent 97.1%),
    radial-gradient(ellipse 100% 39% at 50% 50%, transparent 96%, rgba(255, 255, 255, 0.17) 96.6%, transparent 97.4%),
    radial-gradient(ellipse 100% 52% at 50% 50%, transparent 96.3%, rgba(255, 255, 255, 0.15) 96.9%, transparent 97.8%),
    radial-gradient(ellipse 100% 65% at 50% 50%, transparent 96.6%, rgba(255, 255, 255, 0.14) 97.2%, transparent 98%),
    radial-gradient(ellipse 100% 78% at 50% 50%, transparent 96.8%, rgba(255, 255, 255, 0.12) 97.4%, transparent 98.2%),
    radial-gradient(ellipse 100% 91% at 50% 50%, transparent 97%, rgba(255, 255, 255, 0.10) 97.6%, transparent 98.4%);
  opacity: 0.95;
  transform:
    perspective(760px)
    rotateX(calc(var(--pitch, 0deg) * -1.45))
    rotateY(calc(var(--yaw, 0deg) * 0.86))
    rotate(calc(var(--yaw, 0deg) * 0.08));
  transform-origin: center;
  transition: transform 0.08s linear;
}

.editor-graph-multi-angle-globe::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse 14% 100% at 50% 50%, transparent 95.4%, rgba(255, 255, 255, 0.16) 96%, transparent 97%),
    radial-gradient(ellipse 28% 100% at 50% 50%, transparent 95.8%, rgba(255, 255, 255, 0.14) 96.4%, transparent 97.2%),
    radial-gradient(ellipse 42% 100% at 50% 50%, transparent 96.2%, rgba(255, 255, 255, 0.13) 96.8%, transparent 97.6%),
    radial-gradient(ellipse 56% 100% at 50% 50%, transparent 96.4%, rgba(255, 255, 255, 0.12) 97%, transparent 97.8%),
    radial-gradient(ellipse 70% 100% at 50% 50%, transparent 96.7%, rgba(255, 255, 255, 0.11) 97.3%, transparent 98.1%),
    radial-gradient(ellipse 84% 100% at 50% 50%, transparent 96.9%, rgba(255, 255, 255, 0.10) 97.5%, transparent 98.3%),
    radial-gradient(ellipse 100% 14% at 50% 50%, transparent 95.4%, rgba(255, 255, 255, 0.16) 96%, transparent 97%),
    radial-gradient(ellipse 100% 28% at 50% 50%, transparent 95.8%, rgba(255, 255, 255, 0.14) 96.4%, transparent 97.2%),
    radial-gradient(ellipse 100% 42% at 50% 50%, transparent 96.2%, rgba(255, 255, 255, 0.13) 96.8%, transparent 97.6%),
    radial-gradient(ellipse 100% 56% at 50% 50%, transparent 96.4%, rgba(255, 255, 255, 0.12) 97%, transparent 97.8%),
    radial-gradient(ellipse 100% 70% at 50% 50%, transparent 96.7%, rgba(255, 255, 255, 0.11) 97.3%, transparent 98.1%),
    radial-gradient(ellipse 100% 84% at 50% 50%, transparent 96.9%, rgba(255, 255, 255, 0.10) 97.5%, transparent 98.3%);
  opacity: 0.48;
  transform: rotate(calc(var(--yaw, 0deg) * -0.06));
}

html:not([data-theme="dark"]) .editor-graph-multi-angle-globe::before {
  background:
    radial-gradient(ellipse 18% 100% at 50% 50%, transparent 95.4%, rgba(15, 23, 42, 0.22) 96%, transparent 97%),
    radial-gradient(ellipse 34% 100% at 50% 50%, transparent 96%, rgba(15, 23, 42, 0.19) 96.6%, transparent 97.5%),
    radial-gradient(ellipse 50% 100% at 50% 50%, transparent 96.4%, rgba(15, 23, 42, 0.17) 97%, transparent 98%),
    radial-gradient(ellipse 66% 100% at 50% 50%, transparent 96.8%, rgba(15, 23, 42, 0.15) 97.4%, transparent 98.2%),
    radial-gradient(ellipse 82% 100% at 50% 50%, transparent 97%, rgba(15, 23, 42, 0.13) 97.6%, transparent 98.4%),
    radial-gradient(ellipse 100% 18% at 50% 50%, transparent 95.4%, rgba(15, 23, 42, 0.20) 96%, transparent 97%),
    radial-gradient(ellipse 100% 34% at 50% 50%, transparent 96%, rgba(15, 23, 42, 0.18) 96.6%, transparent 97.5%),
    radial-gradient(ellipse 100% 50% at 50% 50%, transparent 96.4%, rgba(15, 23, 42, 0.16) 97%, transparent 98%),
    radial-gradient(ellipse 100% 66% at 50% 50%, transparent 96.8%, rgba(15, 23, 42, 0.14) 97.4%, transparent 98.2%),
    radial-gradient(ellipse 100% 82% at 50% 50%, transparent 97%, rgba(15, 23, 42, 0.12) 97.6%, transparent 98.4%);
}

html:not([data-theme="dark"]) .editor-graph-multi-angle-globe::after {
  background:
    radial-gradient(ellipse 14% 100% at 50% 50%, transparent 95.4%, rgba(15, 23, 42, 0.15) 96%, transparent 97%),
    radial-gradient(ellipse 28% 100% at 50% 50%, transparent 95.8%, rgba(15, 23, 42, 0.13) 96.4%, transparent 97.2%),
    radial-gradient(ellipse 42% 100% at 50% 50%, transparent 96.2%, rgba(15, 23, 42, 0.12) 96.8%, transparent 97.6%),
    radial-gradient(ellipse 56% 100% at 50% 50%, transparent 96.4%, rgba(15, 23, 42, 0.11) 97%, transparent 97.8%),
    radial-gradient(ellipse 70% 100% at 50% 50%, transparent 96.7%, rgba(15, 23, 42, 0.10) 97.3%, transparent 98.1%),
    radial-gradient(ellipse 84% 100% at 50% 50%, transparent 96.9%, rgba(15, 23, 42, 0.09) 97.5%, transparent 98.3%),
    radial-gradient(ellipse 100% 14% at 50% 50%, transparent 95.4%, rgba(15, 23, 42, 0.15) 96%, transparent 97%),
    radial-gradient(ellipse 100% 28% at 50% 50%, transparent 95.8%, rgba(15, 23, 42, 0.13) 96.4%, transparent 97.2%),
    radial-gradient(ellipse 100% 42% at 50% 50%, transparent 96.2%, rgba(15, 23, 42, 0.12) 96.8%, transparent 97.6%),
    radial-gradient(ellipse 100% 56% at 50% 50%, transparent 96.4%, rgba(15, 23, 42, 0.11) 97%, transparent 97.8%),
    radial-gradient(ellipse 100% 70% at 50% 50%, transparent 96.7%, rgba(15, 23, 42, 0.10) 97.3%, transparent 98.1%),
    radial-gradient(ellipse 100% 84% at 50% 50%, transparent 96.9%, rgba(15, 23, 42, 0.09) 97.5%, transparent 98.3%);
}

.editor-graph-multi-angle-globe::before,
.editor-graph-multi-angle-globe::after {
  display: none;
}

.editor-graph-multi-angle-sphere {
  position: absolute;
  inset: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  z-index: 1;
  overflow: visible;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.16));
  transform: scale(var(--sphere-scale, 1));
  transform-origin: center;
  transition: transform 0.12s ease;
}

.editor-graph-multi-angle-sphere-rim {
  fill: none;
  stroke: rgba(255, 255, 255, 0.34);
  stroke-width: 2.1;
}

.editor-graph-multi-angle-sphere-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 0.82;
}

.editor-graph-multi-angle-sphere-line.is-front {
  stroke: rgba(255, 255, 255, 0.36);
}

.editor-graph-multi-angle-sphere-line.is-back {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-dasharray: 2 4;
}

.editor-graph-multi-angle-sphere-line.is-parallel.is-front {
  stroke: rgba(255, 255, 255, 0.30);
}

.editor-graph-multi-angle-sphere-line.is-great-circle.is-front {
  stroke: rgba(255, 255, 255, 0.28);
}

.editor-graph-multi-angle-sphere-line.is-great-circle.is-back {
  stroke: rgba(255, 255, 255, 0.10);
}

html:not([data-theme="dark"]) .editor-graph-multi-angle-sphere-rim {
  stroke: rgba(15, 23, 42, 0.25);
}

html:not([data-theme="dark"]) .editor-graph-multi-angle-sphere-line.is-front {
  stroke: rgba(15, 23, 42, 0.30);
}

html:not([data-theme="dark"]) .editor-graph-multi-angle-sphere-line.is-back {
  stroke: rgba(15, 23, 42, 0.12);
}

html:not([data-theme="dark"]) .editor-graph-multi-angle-sphere-line.is-parallel.is-front {
  stroke: rgba(15, 23, 42, 0.26);
}

html:not([data-theme="dark"]) .editor-graph-multi-angle-sphere-line.is-great-circle.is-front {
  stroke: rgba(15, 23, 42, 0.24);
}

html:not([data-theme="dark"]) .editor-graph-multi-angle-sphere-line.is-great-circle.is-back {
  stroke: rgba(15, 23, 42, 0.10);
}

.editor-graph-multi-angle-lat {
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  pointer-events: none;
  transform:
    perspective(760px)
    rotateX(calc(var(--pitch, 0deg) * -1.55))
    rotateY(calc(var(--yaw, 0deg) * 0.64))
    rotate(34deg)
    scaleX(0.56);
  transition: transform 0.08s linear;
}

.editor-graph-multi-angle-lon {
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
  transform:
    perspective(760px)
    rotateX(calc(var(--pitch, 0deg) * -1.18))
    rotateY(calc(var(--yaw, 0deg) * 0.92))
    rotate(-38deg)
    scaleX(0.58);
  transition: transform 0.08s linear;
}

.editor-graph-multi-angle-photo {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 64px;
  height: 84px;
  border-radius: 12px;
  overflow: hidden;
  transform:
    translate(-50%, -50%)
    rotateY(calc(var(--yaw, 0deg) * -0.18))
    rotateX(calc(var(--pitch, 0deg) * 0.12))
    scale(var(--subject-scale, 1));
  transform-origin: center;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.16);
  z-index: 2;
  transition: transform 0.12s ease;
}

.editor-graph-multi-angle-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.editor-graph-multi-angle-camera {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.20), 0 0 20px rgba(239, 68, 68, 0.48);
  transform:
    translate(-50%, -50%)
    translate(var(--camera-x, 92px), var(--camera-y, 0px))
    scale(var(--camera-scale, 1));
  z-index: 3;
  transition: transform 0.08s linear;
}

.editor-graph-multi-angle-camera::before {
  content: "";
  position: absolute;
  right: 8px;
  top: 6px;
  width: var(--camera-line-length, 92px);
  height: 1px;
  background: rgba(255, 255, 255, 0.58);
  transform: rotate(var(--camera-line-rotate, 0deg));
  transform-origin: right center;
  transition: width 0.08s linear, transform 0.08s linear;
}

.editor-graph-multi-angle-arrow {
  position: absolute;
  z-index: 4;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  font-size: 17px;
}

.editor-graph-multi-angle-arrow:hover {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
}

.editor-graph-multi-angle-arrow.is-top {
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
}

.editor-graph-multi-angle-arrow.is-bottom {
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
}

.editor-graph-multi-angle-arrow.is-left {
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.editor-graph-multi-angle-arrow.is-right {
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.editor-graph-multi-angle-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.editor-graph-multi-angle-slider {
  grid-template-columns: 72px minmax(0, 1fr) 54px;
}

.editor-graph-multi-angle-slider input[type="range"] {
  accent-color: #22d3ee;
}

.editor-graph-multi-angle-scales {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.editor-graph-multi-angle-prompt {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.16);
  color: rgba(255, 255, 255, 0.92);
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
}

html:not([data-theme="dark"]) .editor-graph-multi-angle-prompt {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.04);
  color: rgba(15, 23, 42, 0.92);
}

.editor-graph-multi-angle-actions {
  justify-content: space-between;
  align-items: center;
}

.editor-graph-relight-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.editor-graph-relight-orb {
  position: relative;
  min-height: 220px;
  border-radius: 999px;
  overflow: hidden;
  cursor: crosshair;
  touch-action: none;
  background:
    radial-gradient(circle at var(--light-x, 16%) var(--light-y, 62%), rgba(255, 255, 255, 0.34), transparent 11%),
    radial-gradient(circle at 56% 42%, rgba(255, 255, 255, 0.16), transparent 12%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05) 42%, rgba(0, 0, 0, 0.30) 72%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

html:not([data-theme="dark"]) .editor-graph-relight-orb {
  background:
    radial-gradient(circle at var(--light-x, 16%) var(--light-y, 62%), rgba(255, 255, 255, 0.78), transparent 11%),
    radial-gradient(circle at 56% 42%, rgba(255, 255, 255, 0.68), transparent 12%),
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.09), rgba(15, 23, 42, 0.04) 45%, rgba(15, 23, 42, 0.11) 78%);
  border-color: rgba(15, 23, 42, 0.08);
}

.editor-graph-relight-card {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 52px;
  height: 36px;
  border-radius: 6px;
  transform: translate(-50%, -50%) rotateY(-24deg) rotateZ(5deg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(148, 163, 184, 0.52));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.38);
  z-index: 2;
}

.editor-graph-relight-beam {
  position: absolute;
  border-radius: 999px;
  filter: blur(1px);
  opacity: 0.88;
  pointer-events: none;
}

.editor-graph-relight-beam.is-primary {
  left: var(--light-x, 16%);
  top: var(--light-y, 62%);
  width: var(--beam-length, 122px);
  height: 34px;
  transform: translate(0, -50%) rotate(var(--beam-angle, -18deg));
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 244, 214, 0.42), transparent);
  box-shadow: 0 0 22px rgba(255, 248, 220, 0.34);
}

.editor-graph-relight-beam.is-rim {
  right: 28px;
  top: 42px;
  width: 78px;
  height: 16px;
  transform: rotate(138deg);
  background: linear-gradient(90deg, rgba(166, 211, 255, 0.88), transparent);
}

.editor-graph-relight-handle {
  position: absolute;
  left: var(--light-x, 16%);
  top: var(--light-y, 62%);
  z-index: 4;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 32%, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.64) 30%, rgba(0, 0, 0, 0.82) 64%);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.5), 0 10px 22px rgba(0, 0, 0, 0.42);
  cursor: grab;
  transform: translate(-50%, -50%);
}

.editor-graph-relight-handle:active,
.editor-graph-relight-orb.is-dragging .editor-graph-relight-handle {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.08);
}

.editor-graph-relight-help {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 5;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
  transform: translateX(-50%);
}

.editor-graph-relight-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.editor-graph-relight-slider {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 72px;
  gap: 12px;
  align-items: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 800;
}

html:not([data-theme="dark"]) .editor-graph-relight-slider {
  color: rgba(15, 23, 42, 0.86);
}

.editor-graph-relight-slider input[type="range"] {
  width: 100%;
  accent-color: #f6f0df;
}

.editor-graph-relight-slider.is-temp input[type="range"] {
  accent-color: #c99454;
}

.editor-graph-relight-slider strong {
  text-align: right;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

html:not([data-theme="dark"]) .editor-graph-relight-slider strong {
  color: rgba(15, 23, 42, 0.72);
}

.editor-graph-relight-section-title {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 900;
}

html:not([data-theme="dark"]) .editor-graph-relight-section-title {
  color: rgba(15, 23, 42, 0.9);
}

.editor-graph-relight-directions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.editor-graph-relight-dir {
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

html:not([data-theme="dark"]) .editor-graph-relight-dir {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.68);
}

.editor-graph-relight-dir.is-active {
  background: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.96);
}

html:not([data-theme="dark"]) .editor-graph-relight-dir.is-active {
  background: rgba(15, 23, 42, 0.16);
  color: rgba(15, 23, 42, 0.96);
}

.editor-graph-relight-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-height: 42px;
  padding-top: 2px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 900;
}

html:not([data-theme="dark"]) .editor-graph-relight-toggle {
  color: rgba(15, 23, 42, 0.9);
}

@media (max-width: 760px) {
  .editor-graph-multi-angle-body {
    grid-template-columns: 1fr;
  }

  .editor-graph-multi-angle-scales {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editor-graph-relight-grid {
    grid-template-columns: 1fr;
  }

  .editor-graph-relight-orb {
    min-height: 180px;
  }
}

.editor-graph-image-tool-panel.is-annotate-mode {
  min-width: 0;
}

.editor-graph-image-tool-panel-inner.is-annotate {
  width: 100%;
  height: 100%;
  gap: 12px;
  padding: 18px;
}

.editor-graph-annotate-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.84) 0%, rgba(10, 14, 22, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

html:not([data-theme="dark"]) .editor-graph-annotate-stage {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
  border-color: rgba(15, 23, 42, 0.08);
}

.editor-graph-annotate-image-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.editor-graph-annotate-image-shell {
  position: relative;
  display: inline-block;
  line-height: 0;
  max-width: 100%;
  max-height: 100%;
}

.editor-graph-annotate-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  pointer-events: none;
  user-select: none;
}

.editor-graph-annotate-layer {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 2;
}

.editor-graph-annotate-layer.active {
  pointer-events: auto;
}

.editor-graph-annotate-canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair !important;
  touch-action: none;
  pointer-events: none;
}

.editor-graph-annotate-layer.active .editor-graph-annotate-canvas {
  pointer-events: auto;
}

.editor-graph-annotate-layer .canvas-container {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: auto;
  z-index: 2;
}

.editor-graph-annotate-layer .canvas-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  cursor: crosshair !important;
  touch-action: none;
}

.editor-graph-annotate-layer.active,
.editor-graph-annotate-layer.active .canvas-container,
.editor-graph-annotate-layer.active .canvas-container canvas {
  cursor: crosshair !important;
}

.editor-graph-annotate-quickbar {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(12, 16, 24, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: auto;
  z-index: 3;
  color: rgba(255, 255, 255, 0.94);
}

html:not([data-theme="dark"]) .editor-graph-annotate-quickbar {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
  color: rgba(15, 23, 42, 0.92);
}

.editor-graph-annotate-quickbar .annotation-drag-handle {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

html:not([data-theme="dark"]) .editor-graph-annotate-quickbar .annotation-drag-handle {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.04);
}

.editor-graph-annotate-quickbar.is-dragging {
  cursor: grabbing;
}

.editor-graph-annotate-quickbar.is-dragging .annotation-drag-handle {
  cursor: grabbing;
}

.editor-graph-annotate-quickbar .annotation-colors,
.editor-graph-annotate-quickbar .annotation-tools,
.editor-graph-annotate-quickbar .annotation-quick-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.editor-graph-annotate-quickbar .color-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.24);
  background: var(--dot-color);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.editor-graph-annotate-quickbar .color-dot.is-active {
  transform: scale(1.08);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.26);
}

.editor-graph-annotate-quickbar .tool-chip,
.editor-graph-annotate-quickbar .ghost-btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

html:not([data-theme="dark"]) .editor-graph-annotate-quickbar .tool-chip,
html:not([data-theme="dark"]) .editor-graph-annotate-quickbar .ghost-btn {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.04);
}

.editor-graph-annotate-quickbar .tool-chip.is-active,
.editor-graph-annotate-quickbar .ghost-btn.is-primary {
  background: rgba(59, 130, 246, 0.24);
  border-color: rgba(96, 165, 250, 0.48);
  color: #ffffff;
}

html:not([data-theme="dark"]) .editor-graph-annotate-quickbar .tool-chip.is-active,
html:not([data-theme="dark"]) .editor-graph-annotate-quickbar .ghost-btn.is-primary {
  background: rgba(45, 108, 223, 0.12);
  border-color: rgba(45, 108, 223, 0.32);
  color: rgba(26, 78, 163, 0.96);
}

.editor-graph-annotate-quickbar .annotation-brush-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: inherit;
}

.editor-graph-annotate-quickbar .annotation-brush {
  width: 100px;
  accent-color: #60a5fa;
}

.editor-graph-annotate-quickbar .annotation-brush-value {
  min-width: 34px;
  text-align: right;
  opacity: 0.78;
}

.editor-graph-grid-split-note {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

html:not([data-theme="dark"]) .editor-graph-grid-split-note {
  color: rgba(15, 23, 42, 0.58);
}

.editor-graph-grid-split-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  grid-template-rows: repeat(var(--grid-rows), minmax(0, 1fr));
  grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
  pointer-events: auto;
  background:
    linear-gradient(rgba(90, 163, 255, 0.62), rgba(90, 163, 255, 0.62)) 0 0 / 100% 1px no-repeat,
    linear-gradient(rgba(90, 163, 255, 0.62), rgba(90, 163, 255, 0.62)) 0 100% / 100% 1px no-repeat,
    linear-gradient(90deg, rgba(90, 163, 255, 0.62), rgba(90, 163, 255, 0.62)) 0 0 / 1px 100% no-repeat,
    linear-gradient(90deg, rgba(90, 163, 255, 0.62), rgba(90, 163, 255, 0.62)) 100% 0 / 1px 100% no-repeat;
}

.editor-graph-grid-split-cell {
  position: relative;
  border: 0;
  border-right: 1px solid rgba(90, 163, 255, 0.62);
  border-bottom: 1px solid rgba(90, 163, 255, 0.62);
  background: rgba(0, 0, 0, 0.16);
  color: rgba(255, 255, 255, 0.94);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.58);
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.editor-graph-grid-split-cell:nth-child(n) {
  min-width: 0;
  min-height: 0;
}

.editor-graph-grid-split-cell span {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
}

.editor-graph-grid-split-cell:hover,
.editor-graph-grid-split-cell.is-selected {
  background: rgba(56, 135, 255, 0.24);
  box-shadow: inset 0 0 0 2px rgba(87, 160, 255, 0.78);
}

.editor-graph-grid-split-cell:not(.is-selected) {
  background: rgba(0, 0, 0, 0.42);
}

.editor-graph-image-crop-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.editor-graph-image-crop-box {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.42), 0 0 24px rgba(0, 0, 0, 0.28);
  cursor: move;
  pointer-events: auto;
  touch-action: none;
}

.editor-graph-image-crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 33.333%, rgba(255, 255, 255, 0.46) 33.333%, rgba(255, 255, 255, 0.46) calc(33.333% + 1px), transparent calc(33.333% + 1px)),
    linear-gradient(90deg, transparent 66.666%, rgba(255, 255, 255, 0.46) 66.666%, rgba(255, 255, 255, 0.46) calc(66.666% + 1px), transparent calc(66.666% + 1px)),
    linear-gradient(0deg, transparent 33.333%, rgba(255, 255, 255, 0.46) 33.333%, rgba(255, 255, 255, 0.46) calc(33.333% + 1px), transparent calc(33.333% + 1px)),
    linear-gradient(0deg, transparent 66.666%, rgba(255, 255, 255, 0.46) 66.666%, rgba(255, 255, 255, 0.46) calc(66.666% + 1px), transparent calc(66.666% + 1px));
}

.editor-graph-image-crop-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.18), 0 2px 10px rgba(0, 0, 0, 0.26);
  pointer-events: auto;
  touch-action: none;
}

.editor-graph-image-crop-handle.is-nw,
.editor-graph-image-crop-handle.is-se {
  cursor: nwse-resize;
}

.editor-graph-image-crop-handle.is-ne,
.editor-graph-image-crop-handle.is-sw {
  cursor: nesw-resize;
}

.editor-graph-image-crop-handle.is-n,
.editor-graph-image-crop-handle.is-s {
  cursor: ns-resize;
}

.editor-graph-image-crop-handle.is-e,
.editor-graph-image-crop-handle.is-w {
  cursor: ew-resize;
}

.editor-graph-image-crop-handle.is-nw {
  left: -8px;
  top: -8px;
}

.editor-graph-image-crop-handle.is-n {
  left: calc(50% - 8px);
  top: -8px;
}

.editor-graph-image-crop-handle.is-ne {
  right: -8px;
  top: -8px;
}

.editor-graph-image-crop-handle.is-e {
  right: -8px;
  top: calc(50% - 8px);
}

.editor-graph-image-crop-handle.is-se {
  right: -8px;
  bottom: -8px;
}

.editor-graph-image-crop-handle.is-s {
  left: calc(50% - 8px);
  bottom: -8px;
}

.editor-graph-image-crop-handle.is-sw {
  left: -8px;
  bottom: -8px;
}

.editor-graph-image-crop-handle.is-w {
  left: -8px;
  top: calc(50% - 8px);
}

.editor-graph-video-trim-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 16px 16px;
  border-radius: 24px;
  background: rgba(26, 26, 30, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html:not([data-theme="dark"]) .editor-graph-video-trim-inner {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(15, 23, 42, 0.10);
}

.editor-graph-video-trim-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.editor-graph-video-trim-close,
.editor-graph-video-trim-apply {
  border: 0;
  cursor: pointer;
}

.editor-graph-video-trim-close {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.94);
}

html:not([data-theme="dark"]) .editor-graph-video-trim-close {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.92);
}

.editor-graph-video-trim-duration {
  justify-self: center;
  min-width: 92px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(107, 79, 56, 0.92);
  color: #ffffff;
  text-align: center;
  font-size: 16px;
  font-weight: 900;
}

.editor-graph-video-trim-apply {
  min-width: 92px;
  height: 46px;
  padding: 0 18px;
  border-radius: 16px;
  background: #ffffff;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
}

.editor-graph-video-trim-apply.is-credit-action {
  position: relative;
}

.editor-graph-tool-cost-badge {
  position: absolute;
  top: -12px;
  right: -12px;
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff4d5d;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 22px rgba(255, 77, 93, 0.34);
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
}

.editor-graph-video-trim-apply:disabled {
  opacity: 0.56;
  cursor: default;
}

.editor-graph-video-trim-strip {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

html:not([data-theme="dark"]) .editor-graph-video-trim-strip {
  background: rgba(15, 23, 42, 0.04);
}

.editor-graph-video-trim-thumbs {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  min-height: 84px;
}

.editor-graph-video-trim-thumb {
  position: relative;
  min-width: 0;
  height: 84px;
  overflow: hidden;
}

.editor-graph-video-trim-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.editor-graph-video-trim-loading {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
}

html:not([data-theme="dark"]) .editor-graph-video-trim-loading {
  color: rgba(15, 23, 42, 0.68);
}

.editor-graph-video-trim-mask {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(6, 8, 14, 0.58);
  pointer-events: none;
}

.editor-graph-video-trim-mask.is-left {
  left: 0;
}

.editor-graph-video-trim-window {
  position: absolute;
  top: 0;
  bottom: 0;
  border: 3px solid rgba(255, 255, 255, 0.96);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  cursor: grab;
}

.editor-graph-video-trim-window:active {
  cursor: grabbing;
}

.editor-graph-video-trim-handle {
  position: relative;
  z-index: 2;
  width: 18px;
  height: calc(100% + 12px);
  margin-top: -6px;
  margin-bottom: -6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  cursor: ew-resize;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.editor-graph-video-trim-handle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 24px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.28);
  transform: translate(-50%, -50%);
}

.editor-graph-video-trim-pill {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  min-width: 88px;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(96, 72, 54, 0.96);
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
  pointer-events: none;
}

.editor-graph-video-trim-times {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editor-graph-video-trim-time {
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 800;
}

html:not([data-theme="dark"]) .editor-graph-video-trim-time {
  color: rgba(15, 23, 42, 0.86);
}

.editor-video-preview-modal {
  position: absolute;
  inset: 0;
  z-index: 18;
}

.editor-video-preview-modal[hidden] {
  display: none;
}

.editor-video-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 14, 0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.editor-video-preview-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1100px, calc(100% - 48px));
  transform: translate(-50%, -50%);
  padding: 18px;
  border-radius: 28px;
  background: rgba(18, 18, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

html:not([data-theme="dark"]) .editor-video-preview-dialog {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(15, 23, 42, 0.10);
}

.editor-video-preview-close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.96);
  cursor: pointer;
  z-index: 2;
}

html:not([data-theme="dark"]) .editor-video-preview-close {
  background: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.92);
}

.editor-video-preview-media {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 20px;
  background: #000000;
}

.editor-video-preview-media img,
.editor-video-preview-media video {
  width: 100%;
  max-height: min(78vh, 760px);
  display: block;
  background: #000000;
  object-fit: contain;
}

.editor-video-preview-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding-top: 14px;
}

.editor-video-preview-actions[hidden] {
  display: none;
}

.editor-video-preview-upscale-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(96, 165, 250, 0.36);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(30, 64, 175, 0.38));
  color: rgba(239, 246, 255, 0.96);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.editor-video-preview-upscale-btn:hover {
  border-color: rgba(147, 197, 253, 0.62);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.42), rgba(30, 64, 175, 0.52));
}

.editor-video-preview-upscale-btn small {
  color: rgba(191, 219, 254, 0.82);
  font-size: 12px;
  font-weight: 700;
}

html:not([data-theme="dark"]) .editor-video-preview-upscale-btn {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(59, 130, 246, 0.18));
  border-color: rgba(37, 99, 235, 0.24);
  color: rgba(30, 64, 175, 0.96);
}

html:not([data-theme="dark"]) .editor-video-preview-upscale-btn small {
  color: rgba(37, 99, 235, 0.72);
}

.editor-panorama-preview-modal {
  position: absolute;
  inset: 0;
  z-index: 22;
}

.editor-panorama-preview-modal[hidden] {
  display: none;
}

.editor-panorama-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 12, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.editor-panorama-preview-dialog {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #05070c;
}

.editor-panorama-preview-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.editor-panorama-preview-canvas:active {
  cursor: grabbing;
}

.editor-panorama-preview-topbar {
  position: absolute;
  left: 50%;
  top: 28px;
  z-index: 3;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(34, 34, 36, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.editor-panorama-preview-tool {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.94);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 17px;
}

.editor-panorama-preview-tool:hover {
  background: rgba(255, 255, 255, 0.10);
}

.editor-panorama-preview-sep {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.14);
}

.editor-panorama-preview-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(20, 20, 22, 0.86);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.editor-panorama-preview-loading[hidden] {
  display: none;
}

.editor-panorama-orientation {
  position: absolute;
  right: 34px;
  bottom: 34px;
  z-index: 3;
  width: 156px;
  padding: 14px 12px 12px;
  border-radius: 18px;
  background: rgba(12, 8, 8, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

.editor-panorama-orientation-box {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.editor-panorama-axis,
.editor-panorama-axis-line {
  position: absolute;
  display: block;
}

.editor-panorama-axis {
  font-size: 11px;
  font-weight: 950;
}

.editor-panorama-axis.is-y {
  left: 49px;
  top: 12px;
  color: #47d75d;
}

.editor-panorama-axis.is-x {
  right: 16px;
  bottom: 26px;
  color: #ff6161;
}

.editor-panorama-axis.is-z {
  left: 19px;
  bottom: 24px;
  color: #41a6ff;
}

.editor-panorama-axis-line {
  left: 50%;
  top: 50%;
  width: 2px;
  height: 48px;
  border-radius: 999px;
  transform-origin: center bottom;
}

.editor-panorama-axis-line.is-y {
  background: #47d75d;
  transform: translate(-50%, -100%) rotate(var(--pitch, 0deg));
}

.editor-panorama-axis-line.is-x {
  height: 44px;
  background: #ff6161;
  transform: translate(-50%, -100%) rotate(calc(90deg + var(--yaw, 0deg)));
}

.editor-panorama-axis-line.is-z {
  height: 36px;
  background: #41a6ff;
  transform: translate(-50%, -100%) rotate(calc(240deg + var(--yaw, 0deg)));
}

.editor-panorama-orientation-meta {
  min-height: 32px;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  color: rgba(255, 255, 255, 0.74);
}

.editor-graph-node-empty {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.54);
  text-align: center;
  padding: 18px;
  font-size: 14px;
}

html:not([data-theme="dark"]) .editor-graph-node-empty {
  color: rgba(55, 65, 81, 0.62);
}

.editor-graph-node-empty i {
  font-size: 22px;
}

.editor-graph-node-input-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 86%;
}

.editor-graph-node-input-thumb {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

html:not([data-theme="dark"]) .editor-graph-node-input-thumb {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.06);
}

.editor-graph-node-input-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.editor-graph-node-input-thumb span {
  position: absolute;
  right: 4px;
  top: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.editor-graph-node-meta {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.editor-graph-node-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
}

.editor-graph-node-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.92;
}

.editor-graph-node-status[data-status="idle"] {
  color: rgba(255, 255, 255, 0.82);
}

.editor-graph-node-status[data-status="running"] {
  color: #f59e0b;
}

.editor-graph-node-status[data-status="uploading"] {
  color: #60a5fa;
}

.editor-graph-node-status[data-status="done"] {
  color: #34d399;
}

.editor-graph-node-status[data-status="error"] {
  color: #f87171;
}

.editor-graph-node-status[data-status="stale"] {
  color: #c084fc;
}

.editor-graph-node-running-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 3;
  pointer-events: none;
}

.editor-graph-node-running-pill {
  max-width: min(84%, 240px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 20px;
  border-radius: 18px;
  background: rgba(18, 18, 20, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.96);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.editor-graph-node-running-pill.is-indeterminate {
  min-width: 142px;
}

.editor-graph-node-running-spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  opacity: 0.9;
  animation: editorGraphNodeRunningSpin 0.8s linear infinite;
}

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

html:not([data-theme="dark"]) .editor-graph-node-running-pill {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(15, 23, 42, 0.10);
  color: rgba(15, 23, 42, 0.92);
}

.editor-graph-node-error-overlay {
  position: absolute;
  inset: 18px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(248, 113, 113, 0.36);
  background: rgba(24, 24, 28, 0.88);
  color: rgba(255, 255, 255, 0.94);
  pointer-events: none;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.editor-graph-node-error-title {
  color: #fca5a5;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.editor-graph-node-error-text {
  max-height: 96px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}

html:not([data-theme="dark"]) .editor-graph-node-error-overlay {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(220, 38, 38, 0.24);
  color: rgba(127, 29, 29, 0.94);
}

html:not([data-theme="dark"]) .editor-graph-node-error-title {
  color: #dc2626;
}

html:not([data-theme="dark"]) .editor-graph-node-error-text {
  color: rgba(127, 29, 29, 0.82);
}

.editor-graph-node-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

.editor-graph-run-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  cursor: pointer;
}

.editor-graph-run-btn:hover {
  transform: translateY(-1px);
}

.editor-graph-run-btn:disabled {
  opacity: 0.48;
  cursor: default;
}

.editor-graph-handle {
  position: absolute;
  top: 50%;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(13, 16, 22, 0.98);
  border: 2px solid rgba(126, 176, 255, 0.46);
  transform: translate(-50%, -50%);
  cursor: crosshair;
  z-index: 4;
  color: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 0 2px rgba(90, 163, 255, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.26);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

html:not([data-theme="dark"]) .editor-graph-handle {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(37, 99, 235, 0.38);
  color: rgba(15, 23, 42, 0.88);
  box-shadow:
    0 0 0 2px rgba(37, 99, 235, 0.08),
    0 4px 10px rgba(15, 23, 42, 0.14);
}

.editor-graph-handle::before {
  content: "+";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -53%);
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  pointer-events: none;
}

.editor-graph-handle::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.30);
  pointer-events: none;
}

html:not([data-theme="dark"]) .editor-graph-handle::after {
  background: rgba(37, 99, 235, 0.12);
}

.editor-graph-handle[data-side="left"] {
  left: 0;
}

.editor-graph-handle[data-side="right"] {
  left: 100%;
}

.editor-graph-handle.editor-graph-selection-connect {
  width: 32px;
  height: 32px;
  transform: none;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: crosshair;
  touch-action: none;
}

.editor-graph-selection-connect[hidden] {
  display: none;
}

.editor-graph-selection-connect::before,
.editor-graph-selection-connect::after {
  display: none;
}

.editor-graph-handle.is-disabled {
  cursor: default;
  opacity: 0.52;
}

.editor-graph-node:hover .editor-graph-handle:not(.is-disabled),
.editor-graph-node.is-selected .editor-graph-handle:not(.is-disabled) {
  transform: translate(-50%, -50%) scale(1.3);
  border-color: rgba(90, 163, 255, 0.92);
  background: rgba(15, 18, 24, 1);
  box-shadow:
    0 0 0 5px rgba(90, 163, 255, 0.20),
    0 8px 18px rgba(0, 0, 0, 0.28);
}

html:not([data-theme="dark"]) .editor-graph-node:hover .editor-graph-handle:not(.is-disabled),
html:not([data-theme="dark"]) .editor-graph-node.is-selected .editor-graph-handle:not(.is-disabled) {
  background: rgba(255, 255, 255, 0.98);
}

.editor-graph-edge {
  fill: none;
  stroke: rgba(255, 255, 255, 0.62);
  stroke-width: 2;
  pointer-events: none;
}

html:not([data-theme="dark"]) .editor-graph-edge {
  stroke: rgba(15, 23, 42, 0.48);
}

.editor-graph-edge-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 18;
  pointer-events: stroke;
  cursor: pointer;
}

.editor-graph-edge-hit:hover + .editor-graph-edge {
  stroke: rgba(90, 163, 255, 0.92);
  stroke-width: 2.6;
}

html:not([data-theme="dark"]) .editor-graph-edge-hit:hover + .editor-graph-edge {
  stroke: rgba(37, 99, 235, 0.86);
}

.editor-graph-edge.is-selected {
  stroke: rgba(90, 163, 255, 0.96);
  stroke-width: 2.8;
  stroke-dasharray: 12 8;
  animation: editorGraphEdgeFlow 0.95s linear infinite;
  filter: drop-shadow(0 0 8px rgba(90, 163, 255, 0.38));
}

html:not([data-theme="dark"]) .editor-graph-edge.is-selected {
  stroke: rgba(37, 99, 235, 0.92);
  filter: drop-shadow(0 0 7px rgba(37, 99, 235, 0.22));
}

@keyframes editorGraphEdgeFlow {
  to {
    stroke-dashoffset: -20;
  }
}

.editor-graph-temp-edge {
  fill: none;
  stroke: rgba(90, 163, 255, 0.88);
  stroke-width: 2;
  display: none;
}

.editor-graph-temp-edge.is-visible {
  display: block;
}

.editor-graph-inspector {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 8;
  width: min(320px, calc(100% - 36px));
  max-height: calc(100% - 128px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(16, 18, 22, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  overflow: auto;
}

.editor-graph-inspector[hidden] {
  display: none;
}

html:not([data-theme="dark"]) .editor-graph-inspector {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(15, 23, 42, 0.10);
  color: rgba(15, 23, 42, 0.92);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.16);
}

.editor-graph-inspector-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.editor-graph-inspector-kicker {
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.48);
}

html:not([data-theme="dark"]) .editor-graph-inspector-kicker {
  color: rgba(71, 85, 105, 0.62);
}

.editor-graph-inspector-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.editor-graph-inspector-close {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
}

html:not([data-theme="dark"]) .editor-graph-inspector-close {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.05);
}

.editor-graph-inspector-section {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.editor-graph-inspector-section.is-hidden {
  display: none;
}

.editor-graph-inspector-label {
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.62);
}

html:not([data-theme="dark"]) .editor-graph-inspector-label {
  color: rgba(51, 65, 85, 0.72);
}

.editor-graph-input-role-select {
  height: 36px;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.30);
  color: inherit;
  padding: 0 10px;
  outline: none;
}

html:not([data-theme="dark"]) .editor-graph-input-role-select {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.78);
}

.editor-graph-input-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-graph-input-empty {
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
  line-height: 1.45;
}

html:not([data-theme="dark"]) .editor-graph-input-empty {
  border-color: rgba(15, 23, 42, 0.14);
  color: rgba(71, 85, 105, 0.72);
}

.editor-graph-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 122px 30px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

html:not([data-theme="dark"]) .editor-graph-input-row {
  background: rgba(15, 23, 42, 0.05);
}

.editor-graph-input-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 12px;
  font-weight: 800;
}

.editor-graph-input-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-graph-input-remove {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  cursor: pointer;
}

html:not([data-theme="dark"]) .editor-graph-input-remove {
  color: #b91c1c;
}

.editor-graph-inspector-note {
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  line-height: 1.45;
}

html:not([data-theme="dark"]) .editor-graph-inspector-note {
  color: rgba(71, 85, 105, 0.72);
}

.editor-graph-create-menu {
  position: absolute;
  z-index: 14;
  width: 290px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(29, 31, 34, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.editor-graph-create-menu[hidden] {
  display: none;
}

html:not([data-theme="dark"]) .editor-graph-create-menu {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(15, 23, 42, 0.10);
  color: rgba(15, 23, 42, 0.92);
}

.editor-graph-create-title {
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.60);
  font-size: 18px;
  font-weight: 800;
}

html:not([data-theme="dark"]) .editor-graph-create-title {
  color: rgba(51, 65, 85, 0.72);
}

.editor-graph-create-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 8px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  font-size: 19px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.editor-graph-create-option:hover {
  background: rgba(255, 255, 255, 0.07);
}

html:not([data-theme="dark"]) .editor-graph-create-option:hover {
  background: rgba(15, 23, 42, 0.06);
}

.editor-graph-create-option.is-disabled {
  opacity: 0.42;
  cursor: default;
}

.editor-graph-create-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.10);
  font-size: 19px;
}

html:not([data-theme="dark"]) .editor-graph-create-icon {
  background: rgba(15, 23, 42, 0.08);
}

.editor-float-top-left,
.editor-float-top-right {
  position: absolute;
  top: 14px;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.editor-float-top-left {
  left: 14px;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.editor-float-top-right {
  top: auto;
  right: auto;
  left: 112px;
  bottom: 14px;
  align-items: flex-end;
}

.editor-share-wrap {
  position: relative;
}

.editor-share-btn {
  color: var(--editor-text);
}

.editor-duplicate-shared-btn {
  height: 44px;
  border: 1px solid var(--editor-border);
  border-radius: 999px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--editor-text);
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
  cursor: pointer;
}

.editor-duplicate-shared-btn[hidden] {
  display: none !important;
}

.editor-duplicate-shared-btn:disabled {
  opacity: 0.68;
  cursor: wait;
}

html[data-theme="dark"] .editor-duplicate-shared-btn {
  background: rgba(32, 32, 32, 0.96);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.30);
}

.editor-share-menu {
  position: absolute;
  top: auto;
  right: auto;
  left: 0;
  bottom: calc(100% + 12px);
  width: min(360px, calc(100vw - 32px));
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.20);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: none;
  z-index: 30;
}

html[data-theme="dark"] .editor-share-menu {
  background: rgba(32, 32, 32, 0.98);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.30);
}

.editor-share-menu.is-open {
  display: block;
}

.editor-share-menu-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--editor-muted);
  margin: 2px 4px 12px;
}

.editor-share-menu-item {
  width: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--editor-text);
  text-align: left;
  cursor: pointer;
}

.editor-share-menu-item:hover {
  background: rgba(15, 23, 42, 0.06);
}

html[data-theme="dark"] .editor-share-menu-item:hover,
html[data-theme="dark"] .editor-share-menu-item:nth-of-type(2) {
  background: rgba(255, 255, 255, 0.08);
}

.editor-share-menu-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgba(15, 23, 42, 0.08);
  color: var(--editor-text);
  font-size: 20px;
}

html[data-theme="dark"] .editor-share-menu-icon {
  background: rgba(255, 255, 255, 0.12);
}

.editor-share-menu-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.editor-share-menu-copy strong {
  font-size: 17px;
  line-height: 1.2;
}

.editor-share-menu-copy small {
  font-size: 13px;
  line-height: 1.35;
  color: var(--editor-muted);
}

.editor-publish-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.editor-publish-modal.is-open {
  display: flex;
}

.editor-publish-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.editor-publish-dialog {
  position: relative;
  width: min(980px, calc(100vw - 48px));
  max-height: min(880px, calc(100vh - 48px));
  overflow: auto;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(145deg, rgba(28, 28, 28, 0.98), rgba(20, 20, 20, 0.98));
  color: #f4f4f5;
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.48);
}

.editor-publish-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: #f4f4f5;
  cursor: pointer;
}

.editor-publish-hero {
  min-height: 170px;
  padding: 34px 42px;
  display: flex;
  align-items: flex-start;
  background:
    radial-gradient(circle at 82% 18%, rgba(122, 255, 203, 0.20), transparent 28%),
    radial-gradient(circle at 72% 58%, rgba(255, 182, 114, 0.16), transparent 26%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.00));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-publish-hero h2 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
  font-weight: 900;
}

.editor-publish-hero p {
  max-width: 620px;
  margin: 0;
  color: rgba(244, 244, 245, 0.62);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 700;
}

.editor-publish-body {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 36px;
  padding: 34px 42px 38px;
}

.editor-publish-media,
.editor-publish-form {
  min-width: 0;
}

.editor-publish-label {
  display: block;
  margin: 0 0 12px;
  color: rgba(244, 244, 245, 0.78);
  font-size: 18px;
  font-weight: 900;
}

.editor-publish-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}

.editor-publish-list-cover {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.editor-publish-card {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: #f4f4f5;
  text-align: left;
  cursor: pointer;
}

.editor-publish-card.is-selected {
  border-color: rgba(81, 151, 255, 0.96);
  box-shadow: 0 0 0 2px rgba(81, 151, 255, 0.22);
}

.editor-publish-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.editor-publish-list-cover .editor-publish-thumb {
  aspect-ratio: 1 / 1;
}

.editor-publish-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.editor-publish-placeholder {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(244, 244, 245, 0.55);
  font-size: 26px;
}

.editor-publish-card-title {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  color: rgba(244, 244, 245, 0.72);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-publish-empty {
  margin: 0 0 28px;
  padding: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  color: rgba(244, 244, 245, 0.50);
  font-weight: 800;
}

.editor-publish-empty[hidden] {
  display: none;
}

.editor-publish-input-wrap,
.editor-publish-textarea-wrap {
  position: relative;
  margin-bottom: 26px;
}

.editor-publish-input,
.editor-publish-textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.20);
  color: #f4f4f5;
  outline: none;
  font-size: 16px;
  font-weight: 700;
}

.editor-publish-input {
  min-height: 54px;
  padding: 0 74px 0 18px;
}

.editor-publish-textarea {
  min-height: 126px;
  resize: vertical;
  padding: 16px 74px 34px 18px;
}

.editor-publish-input:focus,
.editor-publish-textarea:focus {
  border-color: rgba(81, 151, 255, 0.90);
  box-shadow: 0 0 0 3px rgba(81, 151, 255, 0.14);
}

.editor-publish-input-wrap span,
.editor-publish-textarea-wrap span {
  position: absolute;
  right: 16px;
  bottom: 14px;
  color: rgba(244, 244, 245, 0.48);
  font-size: 13px;
  font-weight: 800;
}

.editor-publish-toggle {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 44px;
  color: rgba(244, 244, 245, 0.84);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.editor-publish-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.editor-publish-toggle i {
  position: relative;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.editor-publish-toggle i::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #f4f4f5;
  transition: transform 0.16s ease;
}

.editor-publish-toggle input:checked + i {
  background: #1d7cff;
}

.editor-publish-toggle input:checked + i::after {
  transform: translateX(24px);
}

.editor-publish-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
}

.editor-publish-secondary,
.editor-publish-submit {
  min-height: 54px;
  padding: 0 28px;
  border: 0;
  border-radius: 18px;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
}

.editor-publish-secondary {
  background: rgba(255, 255, 255, 0.10);
  color: rgba(244, 244, 245, 0.82);
}

.editor-publish-submit {
  min-width: 156px;
  background: #2278f6;
  color: #fff;
}

.editor-publish-submit:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.editor-publish-submit[aria-disabled="true"]:not(:disabled) {
  opacity: 0.66;
}

.editor-tiktok-publish-dialog {
  width: min(620px, calc(100vw - 48px));
}

.editor-tiktok-publish-form {
  padding: 30px 42px 38px;
}

.editor-tiktok-preview {
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
}

.editor-tiktok-preview video {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #050505;
}

.editor-tiktok-account {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(244, 244, 245, 0.86);
  font-size: 15px;
  font-weight: 900;
}

.editor-tiktok-account-select {
  margin-bottom: 14px;
}

.editor-tiktok-account:disabled {
  cursor: progress;
}

.editor-tiktok-account-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.editor-tiktok-account-text strong,
.editor-tiktok-account-text small {
  display: block;
}

.editor-tiktok-account-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-tiktok-account-text small {
  color: rgba(244, 244, 245, 0.52);
  font-size: 12px;
  font-weight: 700;
}

.editor-tiktok-avatar {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.editor-tiktok-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.editor-tiktok-title-wrap .editor-publish-textarea {
  min-height: 152px;
}

.editor-tiktok-privacy {
  margin-bottom: 22px;
  padding-right: 18px;
}

.editor-tiktok-toggles {
  display: grid;
  gap: 12px;
  margin-bottom: 30px;
}

.editor-tiktok-toggles .editor-publish-toggle {
  width: 100%;
  justify-content: space-between;
  margin-bottom: 0;
  font-size: 15px;
}

.editor-tiktok-disclosure {
  margin-bottom: 14px;
}

.editor-publish-toggle input:disabled + i,
.editor-publish-toggle:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.52;
}

@media (max-width: 820px) {
  .editor-publish-modal {
    padding: 14px;
  }

  .editor-publish-dialog {
    width: 100%;
  }

  .editor-publish-hero,
  .editor-publish-body {
    padding-left: 22px;
    padding-right: 22px;
  }

  .editor-publish-body {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .editor-tiktok-publish-form {
    padding-left: 22px;
    padding-right: 22px;
  }
}

.editor-shortcuts-fab {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 15;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: var(--editor-text);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.editor-shortcuts-fab:hover {
  background: rgba(255, 255, 255, 0.98);
}

html[data-theme="dark"] .editor-shortcuts-fab {
  background: rgba(16, 16, 16, 0.9);
  border-color: var(--editor-border);
  box-shadow: none;
}

html[data-theme="dark"] .editor-shortcuts-fab:hover {
  background: rgba(21, 26, 36, 0.95);
}

.editor-icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.editor-icon-btn:hover {
  background: rgba(255, 255, 255, 0.98);
}

html[data-theme="dark"] .editor-icon-btn {
  background: rgba(16, 16, 16, 0.9);
  border-color: var(--editor-border);
  box-shadow: none;
}

html[data-theme="dark"] .editor-icon-btn:hover {
  background: rgba(21, 26, 36, 0.95);
}

.editor-icon-btn span {
  display: none;
}

.editor-left-panel {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
  z-index: 14;
}

.editor-left-add-wrap {
  position: relative;
}

.editor-left-agent-panel {
  position: absolute;
  right: 16px;
  bottom: 76px;
  display: flex;
  padding: 8px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
  z-index: 14;
}

html[data-theme="dark"] .editor-left-panel {
  background: rgba(16, 16, 16, 0.92);
  border-color: var(--editor-border);
  box-shadow: none;
}

html[data-theme="dark"] .editor-left-agent-panel {
  background: rgba(16, 16, 16, 0.92);
  border-color: var(--editor-border);
  box-shadow: none;
}

.editor-left-tool-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: none;
  background: #f3f4f6;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}

html[data-theme="dark"] .editor-left-tool-btn {
  background: #1b2333;
  color: var(--editor-text);
}

.editor-left-tool-btn:hover {
  transform: translateY(-1px);
  background: rgba(37, 99, 235, 0.12);
}

html[data-theme="dark"] .editor-left-tool-btn:hover {
  background: rgba(90, 163, 255, 0.18);
}

.editor-left-tool-btn.is-active {
  background: rgba(59, 130, 246, 0.18);
  color: #1d4ed8;
}

html[data-theme="dark"] .editor-left-tool-btn.is-active {
  background: rgba(90, 163, 255, 0.28);
  color: #dbeafe;
}

.editor-left-tool-btn i {
  font-size: 16px;
}

.editor-canvas-agent-panel {
  position: absolute;
  right: 16px;
  top: 16px;
  bottom: 24px;
  width: min(390px, calc(100vw - 116px));
  height: auto;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background: rgba(248, 250, 252, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
  z-index: 32;
  overflow: hidden;
  opacity: 1;
  transform: translateX(0);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease;
  will-change: transform, opacity;
}

.editor-canvas-agent-panel.is-hiding {
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 32px));
}

.editor-canvas-agent-panel[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .editor-canvas-agent-panel {
    transition: none;
  }
}

html[data-theme="dark"] .editor-canvas-agent-panel {
  background: rgba(18, 18, 20, 0.98);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.editor-canvas-agent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] .editor-canvas-agent-head {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.editor-canvas-agent-title {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 950;
  color: #111827;
}

html[data-theme="dark"] .editor-canvas-agent-title {
  color: rgba(255, 255, 255, 0.96);
}

.editor-canvas-agent-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.editor-canvas-agent-history,
.editor-canvas-agent-new,
.editor-canvas-agent-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.06);
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.editor-canvas-agent-history:hover,
.editor-canvas-agent-new:hover,
.editor-canvas-agent-close:hover {
  background: rgba(15, 23, 42, 0.10);
}

html[data-theme="dark"] .editor-canvas-agent-history,
html[data-theme="dark"] .editor-canvas-agent-new,
html[data-theme="dark"] .editor-canvas-agent-close {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .editor-canvas-agent-history:hover,
html[data-theme="dark"] .editor-canvas-agent-new:hover,
html[data-theme="dark"] .editor-canvas-agent-close:hover {
  background: rgba(255, 255, 255, 0.13);
}

.editor-canvas-agent-history-popover {
  position: absolute;
  top: 58px;
  right: 58px;
  width: min(320px, calc(100% - 32px));
  max-height: 420px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.22);
}

.editor-canvas-agent-history-popover[hidden] {
  display: none;
}

html[data-theme="dark"] .editor-canvas-agent-history-popover {
  background: rgba(25, 25, 28, 0.98);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.38);
}

.editor-canvas-agent-history-title {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 850;
  color: #111827;
}

html[data-theme="dark"] .editor-canvas-agent-history-title {
  color: rgba(255, 255, 255, 0.94);
}

.editor-canvas-agent-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 350px;
}

.editor-canvas-agent-history-item {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 10px 11px;
  text-align: left;
  background: rgba(15, 23, 42, 0.05);
  color: #111827;
  cursor: pointer;
}

.editor-canvas-agent-history-item:hover,
.editor-canvas-agent-history-item.is-active {
  background: rgba(37, 99, 235, 0.12);
}

html[data-theme="dark"] .editor-canvas-agent-history-item {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.94);
}

html[data-theme="dark"] .editor-canvas-agent-history-item:hover,
html[data-theme="dark"] .editor-canvas-agent-history-item.is-active {
  background: rgba(59, 130, 246, 0.22);
}

.editor-canvas-agent-history-main {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 780;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.editor-canvas-agent-history-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.2;
  color: rgba(75, 85, 99, 0.92);
}

html[data-theme="dark"] .editor-canvas-agent-history-meta {
  color: rgba(255, 255, 255, 0.58);
}

.editor-canvas-agent-history-empty {
  padding: 16px 10px;
  color: rgba(75, 85, 99, 0.86);
  font-size: 13px;
  text-align: center;
}

html[data-theme="dark"] .editor-canvas-agent-history-empty {
  color: rgba(255, 255, 255, 0.58);
}

.editor-canvas-agent-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.editor-canvas-agent-skill {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.editor-canvas-agent-skill.is-active {
  background: rgba(59, 130, 246, 0.16);
  color: #1d4ed8;
}

html[data-theme="dark"] .editor-canvas-agent-skill {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(226, 232, 240, 0.76);
}

html[data-theme="dark"] .editor-canvas-agent-skill.is-active {
  background: rgba(90, 163, 255, 0.24);
  color: #dbeafe;
}

.editor-canvas-agent-context {
  padding: 0 0 10px;
}

.editor-canvas-agent-context[hidden] {
  display: none;
}

.editor-canvas-agent-context-grid {
  display: flex;
  gap: 7px;
  overflow-x: auto;
}

.editor-canvas-agent-ref {
  flex: 0 0 58px;
  min-width: 0;
}

.editor-canvas-agent-ref-media {
  position: relative;
  width: 100%;
  height: 46px;
  overflow: hidden;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.08);
}

.editor-canvas-agent-ref-media img,
.editor-canvas-agent-ref-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.editor-canvas-agent-ref-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
  opacity: 0.92;
  transform: scale(1);
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.editor-canvas-agent-ref:hover .editor-canvas-agent-ref-remove,
.editor-canvas-agent-ref-remove:focus-visible {
  opacity: 1;
}

.editor-canvas-agent-ref-remove:hover {
  background: rgba(239, 68, 68, 0.92);
}

.editor-canvas-agent-ref-meta {
  min-width: 0;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
}

.editor-canvas-agent-ref-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme="dark"] .editor-canvas-agent-ref-media {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .editor-canvas-agent-ref-meta {
  color: rgba(226, 232, 240, 0.64);
}

.editor-canvas-agent-messages,
.editor-canvas-agent-plan {
  padding: 14px 16px;
}

.editor-canvas-agent-messages {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

.editor-canvas-agent-welcome {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 36px 0;
  text-align: center;
}

.editor-canvas-agent-welcome-title {
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

html[data-theme="dark"] .editor-canvas-agent-welcome-title {
  color: rgba(255, 255, 255, 0.90);
}

.editor-canvas-agent-msg {
  width: fit-content;
  max-width: min(82%, 560px);
  margin-bottom: 12px;
  padding: 12px 13px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.06);
  color: #111827;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.editor-canvas-agent-msg.is-user {
  margin-left: auto;
  background: rgba(59, 130, 246, 0.14);
}

.editor-canvas-agent-msg-text {
  white-space: pre-wrap;
}

.editor-canvas-agent-msg.is-structured-plan {
  max-width: min(86%, 620px);
  padding: 14px 15px;
}

.editor-canvas-agent-msg-text.is-structured {
  white-space: normal;
}

.editor-canvas-agent-msg-text.is-structured > *:first-child {
  margin-top: 0;
}

.editor-canvas-agent-msg-text.is-structured > *:last-child {
  margin-bottom: 0;
}

.editor-canvas-agent-plan-paragraph {
  margin: 0 0 10px;
  line-height: 1.72;
}

.editor-canvas-agent-plan-section-title {
  margin: 12px 0 6px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.45;
}

.editor-canvas-agent-plan-list-text {
  margin: 6px 0 12px;
  padding-left: 20px;
}

.editor-canvas-agent-plan-list-text li {
  margin: 5px 0;
  padding-left: 2px;
  line-height: 1.62;
}

.editor-canvas-agent-msg-text strong {
  font-weight: 950;
}

.editor-canvas-agent-msg-text code {
  display: inline-block;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  font-weight: 750;
  line-height: 1.35;
  padding: 1px 5px;
}

.editor-canvas-agent-msg-text a {
  color: #2563eb;
  font-weight: 850;
  text-decoration: none;
  word-break: break-word;
}

.editor-canvas-agent-msg-text a:hover {
  text-decoration: underline;
}

html[data-theme="dark"] .editor-canvas-agent-msg-text code {
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .editor-canvas-agent-msg-text a {
  color: #93c5fd;
}

.editor-canvas-agent-msg-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.editor-canvas-agent-msg-actions button {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #334155;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 8px 13px;
}

.editor-canvas-agent-msg-actions button:hover {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.editor-canvas-agent-msg-actions button:disabled {
  cursor: default;
  opacity: 0.55;
}

.editor-canvas-agent-msg-actions button.is-primary {
  border-color: rgba(37, 99, 235, 0.28);
  background: #2563eb;
  color: #fff;
}

.editor-canvas-agent-msg-actions button.is-primary:hover {
  background: #1d4ed8;
  color: #fff;
}

.editor-canvas-agent-message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
}

.editor-canvas-agent-message-attachment {
  width: 78px;
  min-width: 0;
}

.editor-canvas-agent-message-attachment-media {
  position: relative;
  width: 78px;
  height: 62px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.10);
}

.editor-canvas-agent-message-attachment-media img,
.editor-canvas-agent-message-attachment-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.editor-canvas-agent-message-attachment-badge {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(15, 23, 42, 0.70);
  font-size: 10px;
}

.editor-canvas-agent-message-attachment-meta {
  min-width: 0;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.25;
  font-weight: 800;
}

.editor-canvas-agent-message-attachment-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-canvas-agent-msg.is-thinking {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: fit-content;
  min-width: 86px;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 2px 0;
}

.editor-canvas-agent-thinking-text {
  font-size: 13px;
  line-height: 1.6;
  font-weight: 700;
  letter-spacing: 0.1px;
  color: #94a3b8;
  background: linear-gradient(110deg, #94a3b8 10%, #e2e8f0 35%, #94a3b8 60%);
  background-size: 200% 100%;
  animation: editorCanvasAgentThinkingSweep 2.4s linear infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.editor-canvas-agent-tool-status {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.14);
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 850;
  white-space: nowrap;
}

.editor-canvas-agent-tool-status.is-step {
  background: rgba(100, 116, 139, 0.08);
  border-color: rgba(100, 116, 139, 0.16);
}

.editor-canvas-agent-tool-status.is-step .editor-canvas-agent-tool-name i {
  color: #64748b;
}

.editor-canvas-agent-msg.is-thinking .editor-canvas-agent-tool-status {
  margin-top: 0;
}

.editor-canvas-agent-tool-name {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #334155;
}

.editor-canvas-agent-tool-name i {
  width: 12px;
  text-align: center;
  color: #3b82f6;
  font-size: 11px;
}

.editor-canvas-agent-tool-prefix,
.editor-canvas-agent-tool-state {
  color: #64748b;
}

.editor-canvas-agent-tool-divider {
  width: 1px;
  height: 14px;
  background: rgba(100, 116, 139, 0.22);
}

.editor-canvas-agent-tool-status.is-done {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.16);
}

.editor-canvas-agent-tool-status.is-done .editor-canvas-agent-tool-name i {
  color: #16a34a;
}

.editor-canvas-agent-tool-status.is-failed {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.18);
}

.editor-canvas-agent-tool-status.is-failed .editor-canvas-agent-tool-name i {
  color: #ef4444;
}

.editor-canvas-agent-final-state {
  margin-top: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  color: #475569;
  background: rgba(100, 116, 139, 0.08);
  border: 1px solid rgba(100, 116, 139, 0.14);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 850;
  white-space: nowrap;
}

.editor-canvas-agent-final-state i {
  width: 11px;
  text-align: center;
  color: #64748b;
  font-size: 10px;
}

.editor-canvas-agent-final-state span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.editor-canvas-agent-final-state.is-running {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.10);
  border-color: rgba(59, 130, 246, 0.18);
}

.editor-canvas-agent-final-state.is-running i {
  color: #2563eb;
  animation: editorCanvasAgentFinalStateSpin 1s linear infinite;
}

.editor-canvas-agent-final-state.is-waiting,
.editor-canvas-agent-final-state.is-plan {
  color: #92400e;
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.20);
}

.editor-canvas-agent-final-state.is-waiting i,
.editor-canvas-agent-final-state.is-plan i {
  color: #d97706;
}

.editor-canvas-agent-final-state.is-done {
  color: #166534;
  background: rgba(34, 197, 94, 0.10);
  border-color: rgba(34, 197, 94, 0.18);
}

.editor-canvas-agent-final-state.is-done i {
  color: #16a34a;
}

.editor-canvas-agent-final-state.is-blocked,
.editor-canvas-agent-final-state.is-failed {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.20);
}

.editor-canvas-agent-final-state.is-blocked i,
.editor-canvas-agent-final-state.is-failed i {
  color: #ef4444;
}

html[data-theme="dark"] .editor-canvas-agent-msg {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .editor-canvas-agent-plan-section-title {
  color: rgba(255, 255, 255, 0.96);
}

html[data-theme="dark"] .editor-canvas-agent-msg.is-user {
  background: rgba(90, 163, 255, 0.20);
}

html[data-theme="dark"] .editor-canvas-agent-msg-actions button {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.86);
}

html[data-theme="dark"] .editor-canvas-agent-msg-actions button:hover {
  background: rgba(96, 165, 250, 0.18);
  color: #bfdbfe;
}

html[data-theme="dark"] .editor-canvas-agent-msg-actions button.is-primary {
  border-color: rgba(96, 165, 250, 0.32);
  background: #2563eb;
  color: #fff;
}

html[data-theme="dark"] .editor-canvas-agent-msg-actions button.is-primary:hover {
  background: #1d4ed8;
  color: #fff;
}

html[data-theme="dark"] .editor-canvas-agent-message-attachment-media {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .editor-canvas-agent-message-attachment-meta {
  color: rgba(226, 232, 240, 0.64);
}

html[data-theme="dark"] .editor-canvas-agent-msg.is-thinking {
  background: transparent;
}

html[data-theme="dark"] .editor-canvas-agent-tool-status {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.18);
  color: rgba(226, 232, 240, 0.86);
}

html[data-theme="dark"] .editor-canvas-agent-tool-status.is-step {
  background: rgba(148, 163, 184, 0.10);
  border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .editor-canvas-agent-tool-name {
  color: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .editor-canvas-agent-tool-prefix,
html[data-theme="dark"] .editor-canvas-agent-tool-state {
  color: rgba(226, 232, 240, 0.64);
}

html[data-theme="dark"] .editor-canvas-agent-tool-divider {
  background: rgba(226, 232, 240, 0.18);
}

html[data-theme="dark"] .editor-canvas-agent-tool-status.is-done {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.20);
}

html[data-theme="dark"] .editor-canvas-agent-tool-status.is-failed {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.22);
}

html[data-theme="dark"] .editor-canvas-agent-final-state {
  color: rgba(226, 232, 240, 0.76);
  background: rgba(148, 163, 184, 0.10);
  border-color: rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"] .editor-canvas-agent-final-state.is-running {
  color: rgba(191, 219, 254, 0.94);
  background: rgba(96, 165, 250, 0.14);
  border-color: rgba(96, 165, 250, 0.22);
}

html[data-theme="dark"] .editor-canvas-agent-final-state.is-waiting,
html[data-theme="dark"] .editor-canvas-agent-final-state.is-plan {
  color: rgba(253, 230, 138, 0.94);
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.22);
}

html[data-theme="dark"] .editor-canvas-agent-final-state.is-done {
  color: rgba(187, 247, 208, 0.94);
  background: rgba(34, 197, 94, 0.13);
  border-color: rgba(34, 197, 94, 0.22);
}

html[data-theme="dark"] .editor-canvas-agent-final-state.is-blocked,
html[data-theme="dark"] .editor-canvas-agent-final-state.is-failed {
  color: rgba(254, 202, 202, 0.94);
  background: rgba(239, 68, 68, 0.13);
  border-color: rgba(239, 68, 68, 0.24);
}

@keyframes editorCanvasAgentThinkingSweep {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

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

.editor-canvas-agent-plan {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.03);
  flex: 0 0 auto;
  max-height: 240px;
  overflow-y: auto;
}

html[data-theme="dark"] .editor-canvas-agent-plan {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.editor-canvas-agent-plan-title {
  font-size: 13px;
  font-weight: 950;
  color: #111827;
  margin-bottom: 8px;
}

.editor-canvas-agent-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.editor-canvas-agent-plan-head .editor-canvas-agent-plan-title {
  margin-bottom: 0;
}

.editor-canvas-agent-plan-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.editor-canvas-agent-plan-actions button {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #334155;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  padding: 6px 9px;
  cursor: pointer;
}

.editor-canvas-agent-plan-actions button:hover {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.editor-canvas-agent-confirm-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.editor-canvas-agent-confirm-actions button {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 8px 12px;
  cursor: pointer;
}

.editor-canvas-agent-confirm-actions button:hover {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.editor-canvas-agent-confirm-actions button.is-primary {
  border-color: rgba(37, 99, 235, 0.28);
  background: #2563eb;
  color: #fff;
}

.editor-canvas-agent-confirm-actions button.is-primary:hover {
  background: #1d4ed8;
  color: #fff;
}

html[data-theme="dark"] .editor-canvas-agent-plan-title {
  color: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .editor-canvas-agent-plan-actions button {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.86);
}

html[data-theme="dark"] .editor-canvas-agent-plan-actions button:hover {
  background: rgba(96, 165, 250, 0.18);
  color: #bfdbfe;
}

html[data-theme="dark"] .editor-canvas-agent-confirm-actions button {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.86);
}

html[data-theme="dark"] .editor-canvas-agent-confirm-actions button:hover {
  background: rgba(96, 165, 250, 0.18);
  color: #bfdbfe;
}

html[data-theme="dark"] .editor-canvas-agent-confirm-actions button.is-primary {
  border-color: rgba(96, 165, 250, 0.32);
  background: #2563eb;
  color: #fff;
}

html[data-theme="dark"] .editor-canvas-agent-confirm-actions button.is-primary:hover {
  background: #1d4ed8;
  color: #fff;
}

.editor-canvas-agent-plan-note {
  margin: 0 0 10px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
  font-weight: 700;
}

html[data-theme="dark"] .editor-canvas-agent-plan-note {
  color: rgba(226, 232, 240, 0.68);
}

.editor-canvas-agent-plan-list {
  margin: 0;
  padding-left: 18px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 750;
}

.editor-canvas-agent-plan-item-title {
  color: #111827;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.5;
}

.editor-canvas-agent-plan-item-meta {
  margin-top: 3px;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.editor-canvas-agent-plan-item-note {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 650;
}

.editor-canvas-agent-plan-list.is-execution {
  list-style: none;
  padding-left: 0;
}

.editor-canvas-agent-plan-list.is-execution li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0;
  cursor: pointer;
}

.editor-canvas-agent-plan-list.is-execution li:hover span {
  color: #2563eb;
}

html[data-theme="dark"] .editor-canvas-agent-plan-list.is-execution li:hover span {
  color: #e2e8f0;
}

.editor-canvas-agent-plan-list.is-execution em {
  flex: 0 0 auto;
  font-style: normal;
  color: #94a3b8;
}

.editor-canvas-agent-plan-list.is-execution li.is-active em {
  color: #60a5fa;
}

.editor-canvas-agent-plan-list.is-execution li.is-active em::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: currentColor;
  animation: editorCanvasAgentPulse 1s ease-in-out infinite;
  vertical-align: middle;
}

.editor-canvas-agent-plan-list.is-execution li.is-done em {
  color: #22c55e;
}

.editor-canvas-agent-plan-list.is-execution li.is-failed em {
  color: #ef4444;
}

@keyframes editorCanvasAgentPulse {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

html[data-theme="dark"] .editor-canvas-agent-plan-list {
  color: rgba(226, 232, 240, 0.64);
}

html[data-theme="dark"] .editor-canvas-agent-plan-item-title {
  color: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .editor-canvas-agent-plan-item-meta {
  color: rgba(203, 213, 225, 0.78);
}

html[data-theme="dark"] .editor-canvas-agent-plan-item-note {
  color: rgba(226, 232, 240, 0.68);
}

.editor-canvas-agent-composer {
  flex: 0 0 auto;
  position: relative;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] .editor-canvas-agent-composer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.editor-canvas-agent-live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin: 0 0 9px 4px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 850;
}

.editor-canvas-agent-live-status[hidden] {
  display: none;
}

.editor-canvas-agent-live-status i {
  width: 16px;
  color: #3b82f6;
  font-size: 12px;
  text-align: center;
}

.editor-canvas-agent-live-status.is-running i.fa-spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: url('/static/favicon.ico') center / contain no-repeat;
  color: transparent;
  font-size: 0;
  animation: none !important;
  transform: none !important;
}

.editor-canvas-agent-live-status.is-running i.fa-spinner::before {
  content: '';
}

.editor-canvas-agent-live-status span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-canvas-agent-live-status.is-running span {
  color: #94a3b8;
  background: linear-gradient(110deg, #94a3b8 10%, #e2e8f0 35%, #94a3b8 60%);
  background-size: 200% 100%;
  animation: editorCanvasAgentThinkingSweep 2.4s linear infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.editor-canvas-agent-live-status.is-done i,
.editor-canvas-agent-live-status.is-done span {
  color: #16a34a;
}

.editor-canvas-agent-live-status.is-failed i,
.editor-canvas-agent-live-status.is-failed span {
  color: #dc2626;
}

html[data-theme="dark"] .editor-canvas-agent-live-status {
  color: rgba(226, 232, 240, 0.72);
}

html[data-theme="dark"] .editor-canvas-agent-live-status i {
  color: #60a5fa;
}

html[data-theme="dark"] .editor-canvas-agent-live-status.is-done i,
html[data-theme="dark"] .editor-canvas-agent-live-status.is-done span {
  color: #86efac;
}

html[data-theme="dark"] .editor-canvas-agent-live-status.is-failed i,
html[data-theme="dark"] .editor-canvas-agent-live-status.is-failed span {
  color: #fca5a5;
}

.editor-canvas-agent-skill-popover {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 70px;
  z-index: 2;
  max-height: 248px;
  overflow-y: auto;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.editor-canvas-agent-skill-popover[hidden] {
  display: none;
}

html[data-theme="dark"] .editor-canvas-agent-skill-popover {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(30, 30, 32, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.editor-canvas-agent-model-popover {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 70px;
  z-index: 3;
  max-height: 370px;
  overflow: hidden;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.editor-canvas-agent-model-popover[hidden] {
  display: none;
}

html[data-theme="dark"] .editor-canvas-agent-model-popover {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(30, 30, 32, 0.99);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.40);
}

.editor-canvas-agent-model-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editor-canvas-agent-model-title {
  color: #111827;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 900;
}

html[data-theme="dark"] .editor-canvas-agent-model-title {
  color: rgba(255, 255, 255, 0.95);
}

.editor-canvas-agent-model-auto-toggle {
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  color: #475569;
  font-size: 13px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.editor-canvas-agent-model-auto-toggle.is-active {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.22);
}

.editor-canvas-agent-model-auto-toggle i {
  font-size: 12px;
  opacity: 0.72;
}

html[data-theme="dark"] .editor-canvas-agent-model-auto-toggle {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(226, 232, 240, 0.80);
}

html[data-theme="dark"] .editor-canvas-agent-model-auto-toggle.is-active {
  background: rgba(96, 165, 250, 0.16);
  color: #dbeafe;
  border-color: rgba(96, 165, 250, 0.28);
}

.editor-canvas-agent-model-auto-hint {
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

html[data-theme="dark"] .editor-canvas-agent-model-auto-hint {
  color: rgba(226, 232, 240, 0.60);
}

.editor-canvas-agent-model-tabs {
  margin-top: 12px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.05);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

html[data-theme="dark"] .editor-canvas-agent-model-tabs {
  background: rgba(255, 255, 255, 0.06);
}

.editor-canvas-agent-model-tab {
  height: 40px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #334155;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.editor-canvas-agent-model-tab.is-active {
  background: rgba(255, 255, 255, 0.96);
  color: #111827;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.10);
}

html[data-theme="dark"] .editor-canvas-agent-model-tab {
  color: rgba(226, 232, 240, 0.82);
}

html[data-theme="dark"] .editor-canvas-agent-model-tab.is-active {
  background: rgba(30, 30, 32, 0.98);
  color: rgba(255, 255, 255, 0.96);
}

.editor-canvas-agent-model-list {
  margin-top: 12px;
  max-height: 246px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 2px;
  scrollbar-gutter: stable;
}

.editor-canvas-agent-model-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-canvas-agent-model-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.editor-canvas-agent-model-section-title {
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.editor-canvas-agent-model-section-hint {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 800;
}

.editor-canvas-agent-model-section.is-active .editor-canvas-agent-model-section-title {
  color: #111827;
}

.editor-canvas-agent-model-section.is-active .editor-canvas-agent-model-section-hint {
  color: #64748b;
}

html[data-theme="dark"] .editor-canvas-agent-model-section-title {
  color: rgba(226, 232, 240, 0.64);
}

html[data-theme="dark"] .editor-canvas-agent-model-section-hint {
  color: rgba(226, 232, 240, 0.44);
}

html[data-theme="dark"] .editor-canvas-agent-model-section.is-active .editor-canvas-agent-model-section-title {
  color: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .editor-canvas-agent-model-section.is-active .editor-canvas-agent-model-section-hint {
  color: rgba(226, 232, 240, 0.62);
}

.editor-canvas-agent-model-section-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-canvas-agent-model-option {
  width: 100%;
  min-height: 74px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.90);
  color: #111827;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}

.editor-canvas-agent-model-option.is-active {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.92);
}

.editor-canvas-agent-model-option-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.10);
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  margin-top: 2px;
}

.editor-canvas-agent-model-option-body {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.editor-canvas-agent-model-option-title {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 900;
}

.editor-canvas-agent-model-option-desc {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.editor-canvas-agent-model-option-meta {
  flex: 0 0 auto;
  min-width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.editor-canvas-agent-model-option-meta em {
  font-style: normal;
}

.editor-canvas-agent-model-option-meta i {
  color: #16a34a;
  opacity: 0;
}

.editor-canvas-agent-model-option.is-active .editor-canvas-agent-model-option-meta i {
  opacity: 1;
}

html[data-theme="dark"] .editor-canvas-agent-model-option {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.94);
}

html[data-theme="dark"] .editor-canvas-agent-model-option.is-active {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.055);
}

html[data-theme="dark"] .editor-canvas-agent-model-option-icon {
  background: rgba(96, 165, 250, 0.14);
  color: #bfdbfe;
}

html[data-theme="dark"] .editor-canvas-agent-model-option-desc,
html[data-theme="dark"] .editor-canvas-agent-model-option-meta {
  color: rgba(226, 232, 240, 0.62);
}

.editor-canvas-agent-model-empty {
  padding: 20px 12px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

html[data-theme="dark"] .editor-canvas-agent-model-empty {
  color: rgba(226, 232, 240, 0.60);
}

.editor-canvas-agent-skill-popover-title {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

html[data-theme="dark"] .editor-canvas-agent-skill-popover-title {
  color: rgba(226, 232, 240, 0.64);
}

.editor-canvas-agent-skill-popover-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-canvas-agent-skill-popover .editor-canvas-agent-skill {
  width: 100%;
  justify-content: flex-start;
  min-height: 40px;
  border-radius: 13px;
  font-size: 13px;
}

.editor-canvas-agent-input {
  position: relative;
  padding: 0;
}

.editor-canvas-agent-skill-rail {
  margin-top: 10px;
  padding: 10px 12px 11px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.38);
  overflow: hidden;
}

.editor-canvas-agent-skill-rail-label {
  margin-bottom: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.editor-canvas-agent-skill-rail-viewport {
  overflow: hidden;
}

.editor-canvas-agent-skill-rail-track {
  display: flex;
  width: max-content;
  gap: 8px;
  animation: editorCanvasAgentSkillRailScroll 24s linear infinite;
  will-change: transform;
}

.editor-canvas-agent-skill-rail:hover .editor-canvas-agent-skill-rail-track,
.editor-canvas-agent-skill-rail:focus-within .editor-canvas-agent-skill-rail-track {
  animation-play-state: paused;
}

.editor-canvas-agent-skill-rail-group {
  display: flex;
  gap: 8px;
  padding-right: 8px;
}

.editor-canvas-agent-skill-rail .editor-canvas-agent-skill {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  white-space: nowrap;
}

.editor-canvas-agent-skill-rail[hidden] {
  display: none;
}

html[data-theme="dark"] .editor-canvas-agent-skill-rail {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .editor-canvas-agent-skill-rail-label {
  color: rgba(226, 232, 240, 0.58);
}

.editor-canvas-agent-mention-menu {
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 8;
  max-width: none;
}

.editor-canvas-agent-mention-menu[hidden] {
  display: none;
}

.editor-canvas-agent-input textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.90);
  color: #111827;
  padding: 13px 14px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
  outline: none;
}

html[data-theme="dark"] .editor-canvas-agent-input textarea {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.94);
}

.editor-canvas-agent-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.editor-canvas-agent-action-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.editor-canvas-agent-skill-toggle {
  min-width: 0;
  max-width: 190px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #111827;
  font-size: 14px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.editor-canvas-agent-upload {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
}

.editor-canvas-agent-upload:disabled {
  cursor: default;
  opacity: 0.72;
}

.editor-canvas-agent-skill-toggle span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-canvas-agent-skill-toggle:hover,
.editor-canvas-agent-skill-toggle[aria-expanded="true"],
.editor-canvas-agent-upload:hover,
.editor-canvas-agent-upload:focus-visible {
  background: rgba(15, 23, 42, 0.06);
}

html[data-theme="dark"] .editor-canvas-agent-skill-toggle,
html[data-theme="dark"] .editor-canvas-agent-upload {
  color: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .editor-canvas-agent-skill-toggle:hover,
html[data-theme="dark"] .editor-canvas-agent-skill-toggle[aria-expanded="true"],
html[data-theme="dark"] .editor-canvas-agent-upload:hover,
html[data-theme="dark"] .editor-canvas-agent-upload:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.editor-canvas-agent-model-toggle {
  flex: 0 1 auto;
  max-width: 150px;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #111827;
  font-size: 14px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.editor-canvas-agent-model-toggle span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-canvas-agent-model-toggle:hover,
.editor-canvas-agent-model-toggle[aria-expanded="true"] {
  background: rgba(15, 23, 42, 0.06);
}

html[data-theme="dark"] .editor-canvas-agent-model-toggle {
  color: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .editor-canvas-agent-model-toggle:hover,
html[data-theme="dark"] .editor-canvas-agent-model-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.08);
}

.editor-canvas-agent-apply,
.editor-canvas-agent-send {
  border: 0;
  border-radius: 16px;
  font-weight: 900;
  cursor: pointer;
}

.editor-canvas-agent-apply {
  margin-left: auto;
  min-height: 42px;
  padding: 0 18px;
  background: rgba(59, 130, 246, 0.14);
  color: #1d4ed8;
}

.editor-canvas-agent-send {
  width: 44px;
  height: 44px;
  background: #f8fafc;
  color: #111827;
}

.editor-canvas-agent-send.is-stop {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
}

html[data-theme="dark"] .editor-canvas-agent-apply {
  background: rgba(90, 163, 255, 0.22);
  color: #dbeafe;
}

html[data-theme="dark"] .editor-canvas-agent-send {
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
}

html[data-theme="dark"] .editor-canvas-agent-send.is-stop {
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
}

@keyframes editorCanvasAgentSkillRailScroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .editor-canvas-agent-skill-rail-track {
    animation: none;
  }
}

.editor-left-add-btn {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

html[data-theme="dark"] .editor-left-add-btn {
  background: #f8fafc;
  color: #111827;
}

.editor-left-add-menu {
  position: absolute;
  left: calc(100% + 16px);
  top: 0;
  width: 244px;
  z-index: 15;
}

.editor-left-add-menu[hidden] {
  display: none;
}

.editor-left-add-menu-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 26px;
  background: rgba(28, 28, 30, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html:not([data-theme="dark"]) .editor-left-add-menu-inner {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.10);
}

.editor-left-add-group-title {
  font-size: 15px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 2px;
}

html:not([data-theme="dark"]) .editor-left-add-group-title {
  color: rgba(15, 23, 42, 0.92);
}

.editor-left-add-group-title.is-secondary {
  margin-top: 6px;
}

.editor-left-add-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 54px;
  padding: 0 10px 0 8px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: rgba(255, 255, 255, 0.94);
  font-size: 15px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, transform 0.14s ease;
}

html:not([data-theme="dark"]) .editor-left-add-item {
  color: rgba(15, 23, 42, 0.94);
}

.editor-left-add-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

html:not([data-theme="dark"]) .editor-left-add-item:hover {
  background: rgba(15, 23, 42, 0.06);
}

.editor-left-add-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.96);
  flex: 0 0 auto;
}

html:not([data-theme="dark"]) .editor-left-add-item-icon {
  background: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.92);
}

.editor-left-add-item-icon i {
  font-size: 18px;
}

.editor-status-float {
  min-height: 0;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.86);
  color: var(--editor-muted);
  max-width: min(340px, 48vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

html[data-theme="dark"] .editor-status-float {
  background: rgba(16, 16, 16, 0.9);
  border-color: var(--editor-border);
  color: var(--editor-text);
  box-shadow: none;
}

.editor-project-menu-wrap {
  position: relative;
}

.editor-project-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--editor-text);
  font-size: 13px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.editor-project-title:hover {
  background: #f8fafc;
}

html[data-theme="dark"] .editor-project-title {
  background: rgba(16, 16, 16, 0.9);
  border-color: var(--editor-border);
  color: var(--editor-text);
  box-shadow: none;
}

html[data-theme="dark"] .editor-project-title:hover {
  background: rgba(21, 26, 36, 0.95);
}

.editor-project-title i {
  font-size: 12px;
  opacity: 0.85;
}

.project-menu-caret {
  font-size: 9px;
  opacity: 0.75;
}

.editor-project-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 140px;
  padding: 6px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  display: none;
  z-index: 20;
}

html[data-theme="dark"] .editor-project-menu {
  background: #151a24;
  border-color: var(--editor-border);
  box-shadow: none;
}

.editor-project-menu.is-open {
  display: block;
}

.editor-project-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: none;
  background: transparent;
  color: var(--editor-text);
  font-size: 12px;
  border-radius: 8px;
  cursor: pointer;
}

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

html[data-theme="dark"] .editor-project-menu-item:hover {
  background: rgba(90, 163, 255, 0.12);
}

.editor-project-menu-item.is-danger {
  color: #ef4444;
}

.editor-readonly-mode .editor-left-panel,
.editor-readonly-mode .editor-graph-handle,
.editor-readonly-mode .editor-graph-node-actions,
.editor-readonly-mode .editor-graph-image-tool-panel,
.editor-readonly-mode .editor-graph-video-toolbar,
.editor-readonly-mode .editor-graph-video-trim-panel,
.editor-readonly-mode #editorProjectMenu,
.editor-readonly-mode #editorSaveProjectBtn,
.editor-readonly-mode #editorDeleteProjectBtn,
.editor-readonly-mode #editorProjectsBtn {
  display: none !important;
}

.editor-readonly-mode .editor-project-title {
  pointer-events: none;
}

.editor-readonly-mode .project-menu-caret {
  display: none;
}

.editor-readonly-mode .editor-promptbar.is-readonly-view .input-actions,
.editor-readonly-mode .editor-promptbar.is-readonly-view .promptbar-controls-row,
.editor-readonly-mode .editor-promptbar.is-readonly-view .reverse-prompt-field,
.editor-readonly-mode .editor-promptbar.is-readonly-view #editorPromptTemplateField {
  display: none !important;
}

.editor-readonly-mode .editor-promptbar.is-readonly-view .promptbar-input {
  cursor: default;
  user-select: text;
}

.editor-readonly-mode .editor-promptbar.is-readonly-view .promptbar-select-btn,
.editor-readonly-mode .editor-promptbar.is-readonly-view .promptbar-mode-btn,
.editor-readonly-mode .editor-promptbar.is-readonly-view .promptbar-select-hidden {
  pointer-events: none;
}

.editor-readonly-mode .editor-promptbar.is-readonly-view .param-dropdown-icon {
  display: none;
}

.editor-readonly-mode .editor-promptbar.is-readonly-view .promptbar-select-btn,
.editor-readonly-mode .editor-promptbar.is-readonly-view .promptbar-mode-btn {
  cursor: default;
}

.editor-status-float:empty {
  display: none;
}

.editor-promptbar {
  position: absolute;
  left: 12px;
  top: 12px;
  bottom: auto;
  transform: none;
  z-index: 12;
  width: min(520px, calc(100% - 24px));
  pointer-events: auto;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  padding: 8px 10px;
  color: var(--editor-text);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.editor-promptbar.input-area.fixed-bottom {
  position: absolute;
  right: auto;
  bottom: auto;
  transform: none;
  max-width: none;
  margin: 0;
}

.editor-promptbar .chat-input-form {
  max-width: none !important;
  margin: 0 !important;
}

.editor-promptbar[hidden] {
  display: none !important;
}

.promptbar-icon-btn {
  width: 16px;
  height: 16px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.04);
  color: var(--editor-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.promptbar-icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.08);
}

.promptbar-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.promptbar-input-row {
  margin-top: 0;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
}

.promptbar-preview {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin: 2px 2px 4px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.04);
}

.promptbar-preview.is-visible {
  display: flex;
}

.promptbar-preview-single {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.promptbar-preview.is-multi .promptbar-preview-single {
  display: none;
}

.promptbar-preview-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  background: #e5e7eb;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  flex: 0 0 auto;
}

.promptbar-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.promptbar-preview-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.promptbar-preview-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--editor-text);
}

.promptbar-preview-sub {
  font-size: 9px;
  color: var(--editor-muted);
}

.multi-image-preview-grid {
  --thumb-size: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--thumb-size), var(--thumb-size)));
  gap: 6px;
  padding: 6px;
  background: #f8f9fa;
  border-radius: 6px;
}

.promptbar-preview.is-graph-video-inputs {
  padding: 8px;
}

.promptbar-preview.is-graph-video-inputs .multi-upload-info {
  display: none !important;
}

.promptbar-preview.is-graph-video-inputs .multi-image-preview-grid {
  --thumb-size: 62px;
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
}

.multi-image-preview-item {
  position: relative;
  background: #ffffff;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e9ecef;
  transition: all 0.2s ease;
  aspect-ratio: 1;
  width: var(--thumb-size);
  height: var(--thumb-size);
}

.promptbar-preview.is-graph-video-inputs .multi-image-preview-item {
  border-radius: 10px;
  cursor: grab;
}

.promptbar-preview.is-graph-video-inputs .multi-image-preview-item:active {
  cursor: grabbing;
}

.promptbar-preview.is-graph-video-inputs .multi-image-preview-item.is-first-frame {
  border-color: rgba(59, 130, 246, 0.78);
}

.promptbar-preview.is-graph-video-inputs .multi-image-preview-item.is-last-frame {
  border-color: rgba(245, 158, 11, 0.82);
}

.promptbar-preview.is-graph-video-inputs .multi-image-preview-item.is-reference {
  border-color: rgba(148, 163, 184, 0.46);
}

.multi-image-preview-item:hover {
  border-color: #1890ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);
}

.multi-image-preview-item.is-dragover {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.multi-image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.multi-image-preview-item.is-audio {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(168, 85, 247, 0.18));
}

.multi-image-audio-thumb {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #dbeafe;
  font-size: 20px;
}

.multi-image-preview-item.uploading {
  opacity: 0.78;
}

.multi-image-uploading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
  color: #475569;
  z-index: 2;
}

.multi-image-uploading-overlay .spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(37, 99, 235, 0.25);
  border-top-color: rgba(37, 99, 235, 0.9);
  animation: editorPromptSpin 0.9s linear infinite;
}

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

.multi-image-remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-size: 9px;
  z-index: 3;
}

.multi-image-preview-item:hover .multi-image-remove-btn {
  opacity: 1;
}

.multi-image-remove-btn:hover {
  background: rgba(220, 53, 69, 0.9);
  transform: scale(1.1);
}

.promptbar-preview.is-graph-video-inputs .multi-image-remove-btn {
  top: auto;
  right: 4px;
  bottom: 4px;
}

.multi-image-index {
  position: absolute;
  bottom: 2px;
  left: 2px;
  background: rgba(24, 144, 255, 0.9);
  color: #ffffff;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 2px;
  font-weight: 500;
  line-height: 1;
  z-index: 2;
}

.promptbar-preview.is-graph-video-inputs .multi-image-index {
  top: 4px;
  right: 4px;
  bottom: auto;
  left: auto;
  min-width: 30px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
}

.promptbar-preview.is-graph-video-inputs .multi-image-preview-item.is-first-frame .multi-image-index {
  background: rgba(37, 99, 235, 0.92);
}

.promptbar-preview.is-graph-video-inputs .multi-image-preview-item.is-last-frame .multi-image-index {
  background: rgba(217, 119, 6, 0.94);
}

.multi-upload-info {
  background: #f0f8ff;
  border: 1px solid #d4edda;
  border-radius: 6px;
  padding: 6px 8px;
}

html[data-theme="dark"] .multi-upload-info {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.10);
}

.multi-upload-info .upload-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.current-count,
.max-limit {
  font-size: 11px;
  color: #495057;
}

html[data-theme="dark"] .current-count,
html[data-theme="dark"] .max-limit {
  color: rgba(255, 255, 255, 0.62);
}

.current-count strong,
.max-limit strong {
  color: #1890ff;
  font-weight: 600;
}

.upload-tip {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #6c757d;
}

html[data-theme="dark"] .upload-tip {
  color: rgba(255, 255, 255, 0.62);
}

.upload-tip i {
  color: #1890ff;
  font-size: 10px;
}

.promptbar-mode {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.02);
}

.promptbar-mode-btn {
  border: none;
  background: transparent;
  padding: 3px 5px;
  font-size: 9px;
  color: var(--editor-muted);
  cursor: pointer;
}

/* ===== Projects modal ===== */
.editor-projects-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
}

.editor-projects-modal.is-open {
  display: flex;
}

.editor-projects-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.editor-projects-panel {
  position: relative;
  width: min(540px, calc(100% - 28px));
  max-height: min(72vh, 560px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 18px;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.18);
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-shortcuts-panel {
  width: min(720px, calc(100% - 28px));
  max-height: min(78vh, 640px);
}

.editor-shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  padding: 4px 4px 0;
  overflow: auto;
}

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

.editor-shortcuts-group-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--editor-muted);
  letter-spacing: 0.02em;
}

.editor-shortcuts-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.7);
}

.shortcut-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  font-weight: 700;
  color: var(--editor-text);
  white-space: nowrap;
}

.shortcut-desc {
  font-size: 12px;
  color: var(--editor-text);
  text-align: right;
}

.editor-shortcuts-footnote {
  font-size: 11px;
  color: var(--editor-muted);
  padding: 4px 6px 2px;
}

html[data-theme="dark"] .editor-shortcuts-item {
  background: rgba(20, 24, 34, 0.85);
  border-color: var(--editor-border);
}

html[data-theme="dark"] .shortcut-key {
  background: rgba(27, 35, 51, 0.92);
  border-color: var(--editor-border);
  color: var(--editor-text);
}

html[data-theme="dark"] .editor-shortcuts-panel {
  background: rgba(13, 18, 28, 0.96);
  border-color: var(--editor-border);
  box-shadow: none;
}

.editor-projects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.editor-projects-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--editor-text);
}

.editor-projects-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.03);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--editor-text);
}

.editor-projects-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-projects-list {
  flex: 1;
  overflow: auto;
  padding: 4px 2px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-project-row {
  display: flex;
  align-items: stretch;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.editor-project-row.is-active {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
}

.editor-project-main {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 12px;
  text-align: left;
  cursor: pointer;
}

.editor-project-name {
  font-weight: 650;
  color: var(--editor-text);
  font-size: 14px;
  line-height: 1.2;
}

.editor-project-meta {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
}

.editor-project-actions {
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  border-left: 1px solid rgba(15, 23, 42, 0.08);
}

.editor-project-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.03);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(239, 68, 68, 0.95);
}

.editor-projects-footnote {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
  text-align: center;
  padding: 2px 0 0;
}

.promptbar-mode-btn.is-active {
  background: rgba(37, 99, 235, 0.12);
  color: var(--editor-text);
}

.promptbar-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.promptbar-label {
  display: none;
}

.promptbar-select {
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f3f4f6;
  padding: 0 8px;
  font-size: 11px;
  color: var(--editor-text);
}

.promptbar-model-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 8px;
  padding-right: 24px;
}

.promptbar-model-btn .model-select-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  color: inherit;
}

.promptbar-model-btn .model-select-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.promptbar-model-btn .model-select-icon i {
  font-size: 12px;
}

.promptbar-select-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  line-height: 1;
  position: relative;
  padding-right: 24px;
}

.editor-panorama-mode-btn {
  gap: 6px;
  padding-right: 10px;
}

.promptbar-select-btn.editor-panorama-mode-btn::after {
  display: none;
}

.editor-panorama-mode-btn.is-active,
.editor-panorama-mode-btn[aria-pressed="true"] {
  border-color: rgba(14, 165, 233, 0.68);
  background: rgba(14, 165, 233, 0.18);
  color: #ffffff;
}

html:not([data-theme="dark"]) .editor-panorama-mode-btn.is-active,
html:not([data-theme="dark"]) .editor-panorama-mode-btn[aria-pressed="true"] {
  color: rgba(12, 74, 110, 0.96);
  background: rgba(14, 165, 233, 0.16);
}

.promptbar-select-btn::after {
  content: "▾";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

html[data-theme="dark"] .promptbar-select-btn::after {
  color: rgba(255, 255, 255, 0.62);
}

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

.editor-ratio-popup {
  padding: 12px;
}

.editor-ratio-popup-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.7);
  margin-bottom: 10px;
}

.editor-ratio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.editor-ratio-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: rgba(0, 0, 0, 0.78);
  font-size: 12px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.editor-ratio-option:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.08);
}

.editor-ratio-option.is-active {
  border-color: rgba(37, 99, 235, 0.65);
  background: rgba(37, 99, 235, 0.12);
  color: rgba(0, 0, 0, 0.9);
}

.popup-panel.param-popup .param-content h6,
.popup-panel.param-popup .param-popup-content h6 {
  margin: 0 0 12px;
  color: rgba(226, 232, 240, 0.92);
  font-size: 14px;
  font-weight: 750;
}

.popup-panel.param-popup .editor-prompt-popup-options {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.popup-panel.param-popup .param-option.editor-prompt-popup-option {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(226, 232, 240, 0.9);
  box-shadow: none;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.popup-panel.param-popup .param-option.editor-prompt-popup-option:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.48);
  background: rgba(96, 165, 250, 0.16);
  color: #ffffff;
}

.popup-panel.param-popup .param-option.editor-prompt-popup-option.active {
  border-color: rgba(96, 165, 250, 0.72);
  background: rgba(59, 130, 246, 0.24);
  color: #ffffff;
}

.popup-panel.param-popup .custom-prompt-box {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.52);
  border-radius: 14px;
  padding: 12px;
}

.popup-panel.param-popup .custom-prompt-header {
  margin: 0 0 8px;
  color: rgba(226, 232, 240, 0.92);
  font-size: 13px;
  font-weight: 750;
}

.popup-panel.param-popup .custom-prompt-input-row {
  display: grid;
  grid-template-columns: minmax(96px, 128px) minmax(240px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.popup-panel.param-popup .custom-prompt-input {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.68);
  color: rgba(226, 232, 240, 0.94);
  padding: 0 12px;
  font-size: 13px;
  outline: none;
}

.popup-panel.param-popup .custom-prompt-input::placeholder {
  color: rgba(148, 163, 184, 0.76);
}

.popup-panel.param-popup .custom-prompt-input:focus {
  border-color: rgba(96, 165, 250, 0.72);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18);
}

.popup-panel.param-popup .custom-prompt-add-btn {
  appearance: none;
  -webkit-appearance: none;
  height: 38px;
  border: 1px solid rgba(59, 130, 246, 0.8);
  border-radius: 10px;
  background: #1890ff;
  color: #ffffff;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.popup-panel.param-popup .custom-prompt-add-btn:hover {
  transform: translateY(-1px);
  background: #0f7ae5;
  border-color: rgba(96, 165, 250, 0.95);
}

.popup-panel.param-popup .custom-prompt-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.popup-panel.param-popup .custom-prompt-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.popup-panel.param-popup .template-option.custom-template-option {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(30, 41, 59, 0.72);
  color: rgba(226, 232, 240, 0.96);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.popup-panel.param-popup .template-option.custom-template-option:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.72);
  background: rgba(59, 130, 246, 0.22);
}

.popup-panel.param-popup .template-option.custom-template-option[data-shortcut-name] {
  font-weight: 800;
}

.popup-panel.param-popup .custom-prompt-remove {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.96);
  color: rgba(203, 213, 225, 0.9);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.popup-panel.param-popup .custom-prompt-remove:hover {
  transform: scale(1.04);
  border-color: rgba(248, 113, 113, 0.78);
  background: rgba(127, 29, 29, 0.78);
  color: #ffffff;
}

.popup-panel.param-popup .custom-prompt-remove i {
  font-size: 10px;
  line-height: 1;
}

.popup-panel.param-popup .custom-prompt-empty {
  color: rgba(148, 163, 184, 0.9);
  font-size: 12px;
}

html:not([data-theme="dark"]) .popup-panel.param-popup .param-content h6,
html:not([data-theme="dark"]) .popup-panel.param-popup .param-popup-content h6 {
  color: rgba(15, 23, 42, 0.9);
}

html:not([data-theme="dark"]) .popup-panel.param-popup .param-option.editor-prompt-popup-option {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.04);
  color: rgba(15, 23, 42, 0.78);
}

html:not([data-theme="dark"]) .popup-panel.param-popup .param-option.editor-prompt-popup-option:hover {
  border-color: rgba(37, 99, 235, 0.36);
  background: rgba(37, 99, 235, 0.09);
  color: rgba(15, 23, 42, 0.94);
}

html:not([data-theme="dark"]) .popup-panel.param-popup .param-option.editor-prompt-popup-option.active {
  border-color: rgba(37, 99, 235, 0.56);
  background: rgba(37, 99, 235, 0.14);
  color: rgba(15, 23, 42, 0.96);
}

html:not([data-theme="dark"]) .popup-panel.param-popup .custom-prompt-box {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(248, 250, 252, 0.96);
}

html:not([data-theme="dark"]) .popup-panel.param-popup .custom-prompt-header {
  color: rgba(15, 23, 42, 0.9);
}

html:not([data-theme="dark"]) .popup-panel.param-popup .custom-prompt-input {
  border-color: rgba(15, 23, 42, 0.14);
  background: #ffffff;
  color: rgba(15, 23, 42, 0.92);
}

html:not([data-theme="dark"]) .popup-panel.param-popup .custom-prompt-input::placeholder {
  color: rgba(100, 116, 139, 0.78);
}

html:not([data-theme="dark"]) .popup-panel.param-popup .template-option.custom-template-option {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.08);
  color: rgba(15, 23, 42, 0.86);
}

html:not([data-theme="dark"]) .popup-panel.param-popup .template-option.custom-template-option:hover {
  border-color: rgba(37, 99, 235, 0.42);
  background: rgba(37, 99, 235, 0.13);
}

html:not([data-theme="dark"]) .popup-panel.param-popup .custom-prompt-remove {
  border-color: rgba(15, 23, 42, 0.14);
  background: #ffffff;
  color: rgba(100, 116, 139, 0.9);
}

html:not([data-theme="dark"]) .popup-panel.param-popup .custom-prompt-empty {
  color: rgba(100, 116, 139, 0.86);
}

@media (max-width: 720px) {
  .popup-panel.param-popup .custom-prompt-input-row {
    grid-template-columns: 1fr;
  }

  .popup-panel.param-popup .custom-prompt-add-btn {
    width: 100%;
  }
}

.promptbar-input {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  resize: none;
  border-radius: 10px;
  border: none;
  padding: 4px 2px;
  font-size: 13px;
  line-height: 1.5;
  outline: none;
  background: transparent;
  color: var(--editor-text);
}

.promptbar-input::placeholder {
  color: #9ca3af;
}

.promptbar-input:focus {
  box-shadow: none;
}

.prompt-rich-input {
  position: relative;
}

.prompt-rich-overlay {
  position: absolute;
  inset: 4px 2px;
  overflow: hidden;
  color: transparent;
  pointer-events: none;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.5;
}

.editor-graph-stage ~ .editor-promptbar .prompt-rich-overlay {
  inset: 0;
  font-size: 15px;
  line-height: 1.5;
}

.prompt-rich-overlay.is-hidden {
  display: none;
}

.prompt-rich-overlay-text {
  visibility: hidden;
}

.prompt-rich-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0 2px;
  vertical-align: text-bottom;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14);
}

.prompt-rich-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prompt-rich-chip.is-audio {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.24), rgba(168, 85, 247, 0.24));
  color: #dbeafe;
  font-size: 13px;
}

.prompt-rich-input.has-lexical-editor .prompt-rich-overlay {
  display: none !important;
}

.prompt-rich-input.has-lexical-editor {
  cursor: text;
}

.prompt-rich-input.has-lexical-editor textarea {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0 !important;
  max-height: none;
  padding: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.prompt-lexical-editor {
  position: relative;
  width: 100%;
  min-height: 64px;
  max-height: 180px;
  padding: 4px 2px;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  outline: none;
  border: none;
  background: transparent;
  color: var(--editor-text);
  caret-color: currentColor;
  font-family: inherit;
  font-size: 13px;
  font-weight: inherit;
  line-height: 1.5;
  letter-spacing: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  scrollbar-width: thin;
  cursor: text;
}

.prompt-lexical-editor p {
  margin: 0;
}

.prompt-lexical-editor.is-empty::before {
  content: attr(data-placeholder);
  position: absolute;
  inset: 4px auto auto 2px;
  color: #9ca3af;
  pointer-events: none;
  user-select: none;
}

.prompt-lexical-mention {
  display: inline-flex;
  align-items: center;
  max-width: 138px;
  min-height: 26px;
  margin: 0 2px;
  padding: 2px 7px 2px 3px;
  gap: 5px;
  border-radius: 8px;
  vertical-align: middle;
  background: rgba(59, 130, 246, 0.16);
  color: inherit;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}

.prompt-lexical-mention-thumb,
.prompt-lexical-mention-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 6px;
  overflow: hidden;
}

.prompt-lexical-mention-thumb {
  display: block;
  object-fit: cover;
}

.prompt-lexical-mention-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.16);
  color: inherit;
  font-size: 12px;
}

.prompt-lexical-mention-video {
  background: rgba(139, 92, 246, 0.18);
}

.prompt-lexical-mention-audio {
  background: rgba(14, 165, 233, 0.18);
}

.prompt-lexical-mention-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prompt-mention-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  min-width: 220px;
  max-width: min(420px, 100%);
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  border-radius: 14px;
  background: rgba(17, 20, 26, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  z-index: 6;
}

.prompt-mention-menu.editor-prompt-mention-portal {
  position: fixed;
  bottom: auto;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
  z-index: 1000;
}

.prompt-mention-menu[hidden] {
  display: none !important;
}

html:not([data-theme="dark"]) .prompt-mention-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.prompt-mention-menu-hint {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.64);
  margin-bottom: 8px;
}

html:not([data-theme="dark"]) .prompt-mention-menu-hint {
  color: rgba(71, 85, 105, 0.78);
}

.prompt-mention-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prompt-mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.prompt-mention-item:hover,
.prompt-mention-item.is-active {
  border-color: rgba(90, 163, 255, 0.38);
  background: rgba(90, 163, 255, 0.12);
}

html:not([data-theme="dark"]) .prompt-mention-item {
  background: rgba(15, 23, 42, 0.04);
}

.prompt-mention-thumb {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
}

.prompt-mention-thumb.is-audio,
.prompt-mention-thumb.is-video {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(168, 85, 247, 0.22));
  color: #dbeafe;
  font-size: 16px;
}

.prompt-mention-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.prompt-mention-token {
  font-size: 11px;
  font-weight: 700;
  color: #60a5fa;
}

.prompt-mention-name {
  font-size: 12px;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-mention-empty {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.56);
  padding: 4px 2px;
}

html:not([data-theme="dark"]) .prompt-mention-empty {
  color: rgba(71, 85, 105, 0.72);
}

.promptbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.04);
  color: var(--editor-text);
  cursor: pointer;
  font-size: 10px;
  white-space: nowrap;
}

.promptbar-btn.ghost {
  background: rgba(0, 0, 0, 0.04);
  color: var(--editor-text);
}

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

.promptbar-hint {
  margin-top: 2px;
  font-size: 8px;
  color: var(--editor-muted);
  min-height: 0;
}

.promptbar-hint:empty {
  display: none;
}

.promptbar-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 4px;
}

.promptbar-project {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 600;
  color: #f3f6fb;
}

.promptbar-project-icon {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(245, 247, 250, 0.7);
}

.promptbar-project-title {
  letter-spacing: 0.3px;
}

.promptbar-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.promptbar-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.promptbar-upload-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
  color: var(--editor-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  flex: 0 0 auto;
}

.promptbar-upload-btn:hover {
  border-color: rgba(37, 99, 235, 0.4);
  background: rgba(37, 99, 235, 0.08);
}

.promptbar-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.promptbar-graph-video-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.promptbar-graph-video-inputs[hidden] {
  display: none !important;
}

.graph-video-input-chip {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  cursor: grab;
}

.graph-video-input-chip:active {
  cursor: grabbing;
}

.graph-video-input-chip.is-dragover {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.26);
}

.graph-video-input-chip.is-first-frame {
  border-color: rgba(59, 130, 246, 0.82);
}

.graph-video-input-chip.is-last-frame {
  border-color: rgba(245, 158, 11, 0.82);
}

.graph-video-input-chip.is-reference {
  border-color: rgba(148, 163, 184, 0.42);
}

.graph-video-input-chip.is-audio,
.graph-video-input-chip.is-audio-ref {
  border-color: rgba(168, 85, 247, 0.62);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(168, 85, 247, 0.22));
}

.graph-video-input-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.graph-video-input-chip-audio {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #dbeafe;
  font-size: 22px;
}

.graph-video-input-chip-role {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 30px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.graph-video-input-chip.is-first-frame .graph-video-input-chip-role {
  background: rgba(37, 99, 235, 0.92);
}

.graph-video-input-chip.is-last-frame .graph-video-input-chip-role {
  background: rgba(217, 119, 6, 0.94);
}

.graph-video-input-chip.is-audio .graph-video-input-chip-role,
.graph-video-input-chip.is-audio-ref .graph-video-input-chip-role {
  background: rgba(126, 34, 206, 0.88);
}

.graph-video-input-chip-remove {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.graph-video-input-chip:hover .graph-video-input-chip-remove {
  opacity: 1;
}

.graph-video-input-chip-remove:hover {
  background: rgba(220, 53, 69, 0.92);
  transform: scale(1.08);
}

.promptbar-controls-row {
  align-items: center;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.promptbar-controls-row .promptbar-field:last-of-type {
  margin-left: auto;
}

#editorPromptDurationBtn {
  min-width: 72px;
}

#editorPromptVideoInputModeBtn {
  min-width: 108px;
}

#editorPromptAudioVoiceBtn {
  min-width: 132px;
  max-width: 220px;
}

#editorPromptAudioVoiceBtn .promptbar-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-audio-voice-popup h6 {
  margin-bottom: 10px;
}

.editor-audio-voice-list {
  display: grid;
  gap: 4px;
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

.editor-audio-voice-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--editor-text);
  background: transparent;
}

.editor-audio-voice-row:hover,
.editor-audio-voice-row.is-selected {
  background: rgba(15, 23, 42, 0.08);
}

.editor-audio-voice-play {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.editor-audio-voice-play.is-playing {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.45);
}

.editor-audio-voice-main {
  min-width: 0;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
}

.editor-audio-voice-name {
  display: block;
  font-size: 14px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-audio-voice-meta {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: rgba(100, 116, 139, 0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-audio-voice-badge {
  font-size: 12px;
  color: rgba(100, 116, 139, 0.92);
}

.editor-audio-voice-empty {
  padding: 18px;
  color: rgba(100, 116, 139, 0.92);
  text-align: center;
}

#editorPromptImageResolutionBtn,
#editorPromptImageSizeBtn,
#editorPromptNumImagesBtn {
  min-width: 64px;
}

.promptbar-send-btn {
  height: 26px;
  min-width: 54px;
  padding: 0 10px;
  border-radius: 10px;
  border: none;
  background: #e5e7eb;
  color: #111827;
  box-shadow: none;
  font-size: 11px;
  font-weight: 600;
}

.promptbar-send-btn:hover {
  background: #cbd5f5;
  transform: none;
}

.promptbar-send-btn span {
  display: inline;
}

.editor-graph-stage ~ .editor-promptbar {
  width: min(1080px, calc(100% - 96px));
  bottom: auto;
  transform: none;
  padding: 22px 24px 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(34, 35, 38, 0.97), rgba(27, 28, 31, 0.97));
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 249, 252, 0.96));
  border-color: rgba(15, 23, 42, 0.10);
  color: rgba(15, 23, 42, 0.92);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.16);
}

.editor-graph-stage ~ .editor-promptbar .promptbar-header {
  display: none;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-body {
  gap: 0;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-input-row {
  align-items: stretch;
  width: 100%;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-main {
  width: 100%;
}

.editor-prompt-size-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 8px;
}

.editor-prompt-size-controls[hidden],
.editor-prompt-expand-btn[hidden] {
  display: none !important;
}

.editor-prompt-expanded-title {
  display: none;
  margin-right: auto;
  font-size: 16px;
  font-weight: 700;
}

.editor-prompt-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 9px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0.75;
}

.editor-prompt-expand-btn:hover,
.editor-prompt-expand-btn:focus-visible {
  opacity: 1;
}

.editor-graph-stage ~ .editor-promptbar.is-prompt-expanded,
.editor-graph-stage ~ .editor-promptbar.is-prompt-expanded.is-graph-text-node {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
}

.editor-promptbar.is-prompt-expanded .editor-prompt-expanded-title {
  display: inline;
}

.editor-graph-stage ~ .editor-promptbar.is-prompt-expanded .text-input-wrapper {
  flex-wrap: wrap;
}

.editor-graph-stage ~ .editor-promptbar.is-prompt-expanded .prompt-rich-input {
  flex: 1 0 100%;
}

/* Override the composer's inline 120/180px cap without rebuilding rich text. */
.editor-graph-stage ~ .editor-promptbar.is-prompt-expanded .prompt-lexical-editor,
.editor-graph-stage ~ .editor-promptbar.is-prompt-expanded .prompt-rich-input:not(.has-lexical-editor) .promptbar-input {
  height: clamp(160px, 46dvh, 560px) !important;
  min-height: clamp(160px, 46dvh, 560px) !important;
  max-height: clamp(160px, 46dvh, 560px) !important;
  overflow-y: auto;
  line-height: 1.7;
}

.editor-graph-stage ~ .editor-promptbar.is-prompt-expanded.is-graph-text-node .text-input-wrapper {
  display: flex;
}

.editor-graph-stage ~ .editor-promptbar.is-graph-text-node {
  width: min(760px, calc(100% - 96px));
  padding: 20px 22px 18px;
}

.editor-graph-stage ~ .editor-promptbar.is-graph-text-node .promptbar-input-row {
  align-items: stretch;
}

.editor-graph-stage ~ .editor-promptbar.is-graph-text-node .text-input-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.editor-graph-stage ~ .editor-promptbar.is-graph-text-node .promptbar-input {
  min-height: 118px;
}

.editor-graph-stage ~ .editor-promptbar.is-graph-text-node .input-actions {
  align-self: end;
  margin-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}

.editor-graph-stage ~ .editor-promptbar.is-graph-text-node .promptbar-controls-row {
  padding-top: 14px;
}

.editor-graph-stage ~ .editor-promptbar.is-graph-text-node .promptbar-model-btn {
  min-width: 220px;
  max-width: 320px;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-project {
  color: rgba(255, 255, 255, 0.68);
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .promptbar-project {
  color: rgba(51, 65, 85, 0.72);
}

.editor-graph-stage ~ .editor-promptbar .promptbar-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-input {
  min-height: 104px;
  font-size: 17px;
  line-height: 1.55;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: inherit;
  padding: 0 2px;
}

.editor-graph-stage ~ .editor-promptbar .text-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  width: 100%;
}

.editor-graph-stage ~ .editor-promptbar .prompt-rich-input {
  flex: 1;
  min-width: 0;
}

.editor-graph-stage ~ .editor-promptbar .prompt-lexical-editor {
  min-height: 104px;
  padding: 0 2px;
  font-size: 17px;
  line-height: 1.55;
  font-weight: 500;
  letter-spacing: 0;
  color: inherit;
}

.editor-graph-stage ~ .editor-promptbar .prompt-lexical-editor.is-empty::before {
  inset: 0 auto auto 2px;
}

.editor-graph-stage ~ .editor-promptbar.is-graph-text-node .prompt-lexical-editor {
  min-height: 118px;
}

.editor-graph-stage ~ .editor-promptbar .input-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: auto;
  align-self: flex-end;
  justify-content: flex-end;
  padding-bottom: 2px;
  padding-right: 4px;
  gap: 10px;
}

.editor-graph-stage ~ .editor-promptbar .polish-btn-compact,
.editor-graph-stage ~ .editor-promptbar .input-action-btn.polish-btn.polish-btn-compact {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: rgba(226, 232, 240, 0.82);
  background: rgba(255, 255, 255, 0.04) !important;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18) !important;
}

.editor-graph-stage ~ .editor-promptbar .reverse-prompt-btn {
  width: auto;
  min-width: 96px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.04) !important;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18) !important;
}

.editor-graph-stage ~ .editor-promptbar .reverse-prompt-field {
  flex: 0 0 auto;
}

.editor-graph-stage ~ .editor-promptbar .polish-btn-compact:hover,
.editor-graph-stage ~ .editor-promptbar .input-action-btn.polish-btn.polish-btn-compact:hover,
.editor-graph-stage ~ .editor-promptbar .reverse-prompt-btn:hover {
  color: #ffffff;
  background: rgba(96, 165, 250, 0.16) !important;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.38), 0 10px 24px rgba(37, 99, 235, 0.16) !important;
}

.editor-graph-stage ~ .editor-promptbar .polish-btn-compact .sparkle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .polish-btn-compact,
html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .input-action-btn.polish-btn.polish-btn-compact {
  color: rgba(30, 41, 59, 0.78);
  background: rgba(15, 23, 42, 0.04) !important;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28) !important;
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .reverse-prompt-btn {
  color: rgba(30, 41, 59, 0.86);
  background: rgba(15, 23, 42, 0.04) !important;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28) !important;
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .polish-btn-compact:hover,
html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .input-action-btn.polish-btn.polish-btn-compact:hover,
html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .reverse-prompt-btn:hover {
  color: #0f172a;
  background: rgba(59, 130, 246, 0.12) !important;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.32), 0 8px 20px rgba(59, 130, 246, 0.12) !important;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-input::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .promptbar-input::placeholder {
  color: rgba(71, 85, 105, 0.56);
}

.editor-graph-stage ~ .editor-promptbar .promptbar-controls-row {
  border-top-color: rgba(255, 255, 255, 0.09);
  padding-top: 16px;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .promptbar-controls-row {
  border-top-color: rgba(15, 23, 42, 0.08);
}

.editor-graph-stage ~ .editor-promptbar .promptbar-controls-row .promptbar-field:last-of-type {
  margin-left: 0;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-field {
  min-width: 0;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-preview {
  margin: 0 0 14px;
  padding: 0;
  border: none;
  background: transparent;
  gap: 10px;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-preview-single {
  grid-template-columns: 52px minmax(0, 1fr) 28px;
  gap: 12px;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-preview-thumb {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.editor-graph-stage ~ .editor-promptbar .promptbar-preview-title {
  font-size: 14px;
  font-weight: 700;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-preview-sub {
  font-size: 12px;
}

.editor-graph-stage ~ .editor-promptbar .multi-image-preview-grid {
  --thumb-size: 64px;
  padding: 0;
  background: transparent;
  gap: 8px;
}

.editor-graph-stage ~ .editor-promptbar .multi-upload-info {
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
  padding: 0 2px;
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .multi-upload-info {
  color: rgba(71, 85, 105, 0.68);
}

.editor-graph-stage ~ .editor-promptbar .param-btn,
.editor-graph-stage ~ .editor-promptbar .promptbar-select,
.editor-graph-stage ~ .editor-promptbar .promptbar-upload-btn,
.editor-graph-stage ~ .editor-promptbar .promptbar-btn {
  display: inline-flex;
  align-items: center;
  height: 44px;
  min-width: 88px;
  border-radius: 999px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-size: 18px;
  font-weight: 750;
  line-height: 1;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-btn {
  justify-content: center;
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .param-btn,
html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .promptbar-select,
html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .promptbar-upload-btn,
html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .promptbar-btn {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
}

.editor-graph-stage ~ .editor-promptbar .param-btn {
  justify-content: flex-start;
  gap: 8px;
}

.editor-graph-stage ~ .editor-promptbar .param-btn:disabled,
.editor-graph-stage ~ .editor-promptbar .param-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-send-btn {
  width: 56px;
  height: 56px;
  min-width: 56px;
  padding: 0;
  border-radius: 18px;
  border: none;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.24);
}

.editor-graph-stage ~ .editor-promptbar .promptbar-send-btn:hover {
  background: #ffffff;
  color: #111827;
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.28);
}

.editor-graph-stage ~ .editor-promptbar .promptbar-send-btn i {
  font-size: 20px;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-send-btn span {
  display: none;
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .promptbar-send-btn {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .promptbar-send-btn:hover {
  background: #111827;
  color: #ffffff;
}

.editor-graph-stage ~ .editor-promptbar .param-btn .promptbar-value,
.editor-graph-stage ~ .editor-promptbar .param-btn .model-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-graph-stage ~ .editor-promptbar .param-btn i:not(.param-dropdown-icon),
.editor-graph-stage ~ .editor-promptbar .param-btn .promptbar-select-icon {
  font-size: 14px;
  flex: 0 0 auto;
}

.editor-graph-stage ~ .editor-promptbar .param-btn:hover {
  border-color: rgba(96, 165, 250, 0.72);
  color: #ffffff;
  background: rgba(96, 165, 250, 0.16);
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .param-btn:hover {
  border-color: rgba(37, 99, 235, 0.48);
  color: rgba(15, 23, 42, 0.92);
  background: rgba(59, 130, 246, 0.10);
}

.editor-graph-stage ~ .editor-promptbar .param-btn.active,
.editor-graph-stage ~ .editor-promptbar .param-btn[aria-pressed="true"] {
  border-color: rgba(96, 165, 250, 0.84);
  color: #ffffff;
  background: rgba(59, 130, 246, 0.22);
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .param-btn.active,
html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .param-btn[aria-pressed="true"] {
  border-color: rgba(37, 99, 235, 0.56);
  color: rgba(15, 23, 42, 0.94);
  background: rgba(59, 130, 246, 0.14);
}

.editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn.active,
.editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn[aria-pressed="true"] {
  border-color: rgba(74, 222, 128, 0.68);
  color: #86efac;
  background: rgba(34, 197, 94, 0.16);
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn.active,
html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn[aria-pressed="true"] {
  border-color: rgba(22, 163, 74, 0.48);
  color: #15803d;
  background: rgba(34, 197, 94, 0.12);
}

.editor-graph-stage ~ .editor-promptbar .promptbar-mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 700;
  color: inherit;
  border-radius: 999px;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-mode-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  transform: translateY(-1px);
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .promptbar-mode-btn:hover {
  background: rgba(15, 23, 42, 0.06);
}

.editor-graph-stage ~ .editor-promptbar .promptbar-select-btn {
  min-width: 96px;
  justify-content: flex-start;
  gap: 10px;
  padding-right: 18px;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-model-btn {
  min-width: 220px;
  justify-content: flex-start;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-select-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  opacity: 0.82;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-select-btn::after {
  display: none;
  content: none;
}

/* 不限量开关：与 image 页一致，右侧可左右滑动的拨动开关（蓝色系） */
.editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn {
  position: relative;
  min-height: 40px;
  min-width: 160px;
  padding: 8px 64px 8px 18px;
  justify-content: flex-start;
  font-size: 16px;
  font-weight: 700;
  border-color: rgba(148, 163, 184, 0.32);
  background: rgba(148, 163, 184, 0.08);
  color: #cbd5e1;
  box-shadow: none;
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn {
  border-color: rgba(100, 116, 139, 0.28);
  background: rgba(100, 116, 139, 0.08);
  color: #475569;
  box-shadow: none;
}

.editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn:hover {
  border-color: rgba(24, 144, 255, 0.62);
  color: #80bfff;
  background: rgba(24, 144, 255, 0.1);
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn:hover {
  border-color: rgba(24, 144, 255, 0.62);
  color: #3b9eff;
  background: rgba(24, 144, 255, 0.1);
}

.editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn.active,
.editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn[aria-pressed="true"] {
  border-color: rgba(24, 144, 255, 0.88);
  background: rgba(24, 144, 255, 0.22);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(24, 144, 255, 0.28);
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn.active,
html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn[aria-pressed="true"] {
  border-color: rgba(24, 144, 255, 0.88);
  background: rgba(24, 144, 255, 0.22);
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(24, 144, 255, 0.22);
}

.editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn i {
  display: none;
}

.editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn::after {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  right: 8px;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #596273;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 30px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  transform: translateY(-50%);
  transition: transform 0.2s ease;
}

.editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn.active::after,
.editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn[aria-pressed="true"]::after {
  background: #1890ff;
}

.editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn.active::before,
.editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn[aria-pressed="true"]::before {
  transform: translate(20px, -50%);
}

.editor-graph-stage ~ .editor-promptbar #unlimitedToggleBtn.disabled {
  opacity: 0.48;
}

.editor-graph-stage ~ .editor-promptbar .param-dropdown-icon {
  font-size: 12px;
  opacity: 0.72;
  margin-left: 2px;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-mode {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 2px;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  gap: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .promptbar-mode {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.editor-graph-stage ~ .editor-promptbar .promptbar-mode-btn.is-active {
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.24);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.24);
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .promptbar-mode-btn.is-active {
  background: rgba(59, 130, 246, 0.18);
  color: rgba(15, 23, 42, 0.94);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.14);
}

.editor-graph-stage ~ .editor-promptbar.is-graph-node .promptbar-mode {
  display: none;
}

.editor-graph-stage ~ .editor-promptbar.is-graph-node .promptbar-mode-field {
  display: none !important;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-send-btn {
  width: 58px;
  min-width: 58px;
  height: 58px;
  position: relative;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  font-size: 22px;
  margin-left: 2px;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-send-btn.premium {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.98) 0%, rgba(245, 158, 11, 0.96) 100%);
  color: #111827;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.24);
}

.editor-graph-stage ~ .editor-promptbar .promptbar-send-btn .generate-cost-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.28);
}

.editor-graph-stage ~ .editor-promptbar .promptbar-send-btn span {
  display: none;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-send-btn:disabled,
.editor-graph-stage ~ .editor-promptbar .promptbar-send-btn.premium:disabled,
.editor-graph-stage ~ .editor-promptbar .promptbar-send-btn.unlimited-free:disabled {
  background: rgba(148, 163, 184, 0.34);
  color: rgba(226, 232, 240, 0.58);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-send-btn:disabled:hover,
.editor-graph-stage ~ .editor-promptbar .promptbar-send-btn.premium:disabled:hover,
.editor-graph-stage ~ .editor-promptbar .promptbar-send-btn.unlimited-free:disabled:hover {
  background: rgba(148, 163, 184, 0.34);
  color: rgba(226, 232, 240, 0.58);
  box-shadow: none;
  transform: none;
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .promptbar-send-btn.premium {
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.18);
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .promptbar-send-btn:disabled,
html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .promptbar-send-btn.premium:disabled,
html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .promptbar-send-btn.unlimited-free:disabled,
html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .promptbar-send-btn:disabled:hover {
  background: rgba(100, 116, 139, 0.28);
  color: rgba(71, 85, 105, 0.58);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-btn.ghost {
  height: 44px;
  padding: 0 16px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
}

.editor-graph-stage ~ .editor-promptbar .promptbar-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.52);
}

html:not([data-theme="dark"]) .editor-graph-stage ~ .editor-promptbar .promptbar-hint {
  color: rgba(71, 85, 105, 0.72);
}

.editor-graph-model-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.editor-graph-model-popup h6 {
  color: rgba(15, 23, 42, 0.86);
}

html[data-theme="dark"] .editor-graph-model-popup h6 {
  color: rgba(255, 255, 255, 0.88);
}

.editor-graph-model-option {
  width: 100%;
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.04);
  color: rgba(15, 23, 42, 0.86);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.editor-graph-model-option:hover,
.editor-graph-model-option.is-active {
  border-color: rgba(37, 99, 235, 0.40);
  background: rgba(37, 99, 235, 0.10);
}

html[data-theme="dark"] .popup-panel.editor-graph-model-popup-panel {
  background: rgba(15, 18, 24, 0.98);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.90);
}

html[data-theme="dark"] .editor-graph-model-option {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
}

html[data-theme="dark"] .editor-graph-model-option:hover,
html[data-theme="dark"] .editor-graph-model-option.is-active {
  border-color: rgba(79, 140, 255, 0.62);
  background: rgba(59, 130, 246, 0.22);
  color: #ffffff;
}

.editor-graph-context-menu {
  position: absolute;
  z-index: 20;
  width: 300px;
  max-height: calc(100% - 24px);
  overflow: auto;
  padding: 18px;
  border-radius: 24px;
  background: rgba(31, 32, 34, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.editor-graph-context-menu[hidden] {
  display: none;
}

html:not([data-theme="dark"]) .editor-graph-context-menu {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(15, 23, 42, 0.10);
  color: rgba(15, 23, 42, 0.92);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.16);
}

.editor-graph-context-item {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  padding: 7px 12px;
  font-size: 17px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.editor-graph-context-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

html:not([data-theme="dark"]) .editor-graph-context-item:hover {
  background: rgba(15, 23, 42, 0.06);
}

.editor-graph-context-item.is-disabled,
.editor-graph-context-item:disabled {
  color: rgba(255, 255, 255, 0.28);
  cursor: default;
}

html:not([data-theme="dark"]) .editor-graph-context-item.is-disabled,
html:not([data-theme="dark"]) .editor-graph-context-item:disabled {
  color: rgba(15, 23, 42, 0.30);
}

.editor-graph-context-item kbd {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.44);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
}

html:not([data-theme="dark"]) .editor-graph-context-item kbd {
  color: rgba(15, 23, 42, 0.42);
}

.editor-graph-context-separator {
  height: 1px;
  margin: 10px 0;
  background: rgba(255, 255, 255, 0.08);
}

html:not([data-theme="dark"]) .editor-graph-context-separator {
  background: rgba(15, 23, 42, 0.10);
}

.editor-zoom {
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  margin-right: 0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

html[data-theme="dark"] .editor-zoom {
  background: rgba(16, 16, 16, 0.9);
  border-color: var(--editor-border);
  box-shadow: none;
}

.editor-zoom-btn {
  width: 38px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--editor-text);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.editor-zoom-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

html[data-theme="dark"] .editor-zoom-btn:hover {
  background: rgba(90, 163, 255, 0.14);
}

.editor-zoom-label {
  min-width: 64px;
  text-align: center;
  font-size: 12px;
  color: var(--editor-muted);
  padding: 0 8px;
}

.editor-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  z-index: 8;
}

html[data-theme="dark"] .editor-loading {
  background: rgba(16, 16, 16, 0.78);
}

.image-editor-stage.is-loading .editor-loading {
  display: flex;
}

.editor-loading-spinner {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 4px solid rgba(0, 0, 0, 0.12);
  border-top-color: rgba(59, 130, 246, 0.9);
  animation: editorSpin 0.9s linear infinite;
}

html[data-theme="dark"] .editor-loading-spinner {
  border-color: rgba(255, 255, 255, 0.12);
  border-top-color: rgba(90, 163, 255, 0.9);
}

.editor-loading-text {
  font-size: 13px;
  color: var(--editor-text);
}

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

.editor-hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--editor-muted);
  text-align: center;
  max-width: 820px;
}

.image-editor-sidebar {
  width: 320px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px 16px;
  gap: 12px;
  position: relative;
  overflow: visible;
  transition: width 0.22s ease, padding 0.22s ease;
  margin: 16px 16px 16px 0;
  border-radius: 18px;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.image-editor-sidebar.is-no-collapse-anim,
.image-editor-sidebar.is-no-collapse-anim .sidebar-section {
  transition: none !important;
}

.image-editor-sidebar.is-assets-panel:not(.is-collapsed) {
  position: absolute;
  left: 84px;
  top: 156px;
  width: min(500px, calc(100vw - 132px));
  height: min(460px, calc(100vh - 162px));
  margin: 0;
  padding: 0;
  gap: 0;
  z-index: 18;
  overflow: hidden;
  border-radius: 18px;
}

html[data-theme="dark"] .image-editor-sidebar {
  background: rgba(18, 18, 20, 0.94);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.30);
}

.image-editor-sidebar.is-collapsed {
  width: 44px;
  padding: 10px 6px;
}

.image-editor-page.has-input-shell .image-editor-body {
  min-height: 0;
}

.image-editor-input-shell {
  padding: 18px 24px 28px;
  background: var(--editor-surface);
}

.image-editor-input-shell .chat-content-area,
.image-editor-input-shell #vueHistoryContainer {
  display: none;
}

.image-editor-input-shell .prompt-welcome-message {
  display: none;
}

.image-editor-input-shell .input-area,
.image-editor-input-shell .input-area.fixed-bottom {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  transform: none;
  width: min(920px, 92vw);
  max-width: 920px;
  margin: 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.image-editor-input-shell .chat-input-form {
  max-width: none;
}

.image-editor-input-shell .params-buttons {
  justify-content: flex-start;
  max-width: none;
}

/* Desktop: when collapsed, hide the whole sidebar "bar" and keep only a floating mini button. */
@media (min-width: 981px) {
  .image-editor-sidebar.is-collapsed {
    width: 0;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    box-shadow: none;
	  pointer-events: none;
  }

  .image-editor-sidebar.is-collapsed .sidebar-toggle {
    display: none;
  }
}

.sidebar-section {
  max-width: 1000px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  transition: max-width 0.22s ease, opacity 0.18s ease, transform 0.22s ease;
}

.image-editor-sidebar.is-collapsed .sidebar-section {
  max-width: 0;
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
}

.image-editor-sidebar.is-collapsed .sidebar-tabs {
  display: none;
}

.sidebar-tabs {
  display: flex;
  gap: 8px;
  padding: 2px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.06);
}

.sidebar-tab {
  flex: 1;
  height: 34px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--editor-muted);
  font-weight: 700;
  cursor: pointer;
}

.sidebar-tab.is-active {
  background: rgba(255, 255, 255, 0.9);
  color: var(--editor-text);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] .sidebar-tabs {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .sidebar-tab.is-active {
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-toggle {
  position: absolute;
  top: 16px;
  left: -14px;
  width: 28px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  color: var(--editor-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.image-editor-sidebar.is-assets-panel:not(.is-collapsed) .sidebar-toggle {
  top: 10px;
  left: auto;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  font-size: 22px;
  z-index: 5;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.98);
  color: var(--editor-text);
}

html[data-theme="dark"] .sidebar-toggle {
  background: rgba(32, 32, 34, 0.96);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .sidebar-toggle:hover {
  background: rgba(45, 45, 48, 0.98);
  color: #ffffff;
}

.image-editor-sidebar.is-collapsed .sidebar-toggle {
  left: -14px;
}

.sidebar-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
}

.image-editor-sidebar.is-assets-panel .sidebar-title {
  height: 56px;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 76px 0 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.10);
  font-size: 17px;
  font-weight: 900;
}

html[data-theme="dark"] .image-editor-sidebar.is-assets-panel .sidebar-title {
  border-bottom-color: rgba(255, 255, 255, 0.10);
}

.layer-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.layer-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--editor-muted);
}

.layer-count select {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: var(--editor-text);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  outline: none;
}

.layer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding: 10px 4px 14px 0;
}

.editor-assets-section {
  min-height: 0;
}

.editor-assets-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  min-height: 0;
  padding: 8px 4px 16px 0;
}

.image-editor-sidebar.is-assets-panel .editor-assets-list {
  padding: 0;
  gap: 0;
}

.editor-assets-category-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 50px;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.editor-assets-category-scroll {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 5px;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.32) transparent;
}

.editor-assets-category-add {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: transparent;
  color: var(--editor-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.editor-assets-category-add:hover {
  background: rgba(90, 163, 255, 0.16);
  border-color: rgba(90, 163, 255, 0.35);
}

.editor-assets-inline-category-input {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--editor-text);
  font-size: 14px;
  font-weight: 900;
  outline: none;
  padding: 0;
}

.editor-assets-inline-category-input::placeholder {
  color: var(--editor-muted);
}

.editor-assets-inline-category-input.is-top {
  width: 112px;
  min-width: 96px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.08);
  padding: 0 12px;
  font-size: 13px;
  flex: 0 0 auto;
}

html[data-theme="dark"] .editor-assets-inline-category-input.is-top {
  background: rgba(255, 255, 255, 0.10);
}

.editor-assets-category-scroll::-webkit-scrollbar {
  height: 5px;
}

.editor-assets-category-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.editor-assets-category-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.32);
}

html[data-theme="dark"] .editor-assets-category-tabs {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .editor-assets-category-scroll {
  scrollbar-color: rgba(255, 255, 255, 0.38) transparent;
}

html[data-theme="dark"] .editor-assets-category-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.38);
}

html[data-theme="dark"] .editor-assets-category-add {
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(226, 232, 240, 0.92);
}

.editor-assets-category-tab-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding-top: 7px;
}

.editor-assets-category-tab {
  height: 32px;
  min-width: 58px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--editor-muted);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  padding: 0 10px;
  white-space: nowrap;
}

.editor-assets-category-tab.is-active {
  background: rgba(15, 23, 42, 0.10);
  color: var(--editor-text);
}

html[data-theme="dark"] .editor-assets-category-tab.is-active {
  background: rgba(255, 255, 255, 0.12);
}

.editor-assets-category-delete,
.editor-assets-subcategory-delete {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease, background 0.14s ease, transform 0.14s ease;
}

.editor-assets-category-delete {
  position: absolute;
  top: 0;
  right: -5px;
  z-index: 2;
}

.editor-assets-category-delete i,
.editor-assets-subcategory-delete i {
  font-size: 10px;
  line-height: 1;
}

.editor-assets-category-tab-wrap.is-custom:hover .editor-assets-category-delete,
.editor-assets-subcategory-head:hover .editor-assets-subcategory-delete {
  opacity: 1;
  pointer-events: auto;
}

.editor-assets-category-delete:hover,
.editor-assets-subcategory-delete:hover {
  transform: scale(1.05);
  background: rgba(239, 68, 68, 0.86);
}

html[data-theme="dark"] .editor-assets-category-delete,
html[data-theme="dark"] .editor-assets-subcategory-delete {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

html[data-theme="dark"] .editor-assets-category-delete:hover,
html[data-theme="dark"] .editor-assets-subcategory-delete:hover {
  background: rgba(239, 68, 68, 0.88);
}

.editor-assets-group-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 20px;
}

.editor-assets-subcategory-group {
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.24);
}

.editor-assets-subcategory-group.is-draft {
  border-style: solid;
}

html[data-theme="dark"] .editor-assets-subcategory-group {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
}

.editor-assets-subcategory-head {
  position: relative;
  min-height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--editor-text);
  font-size: 14px;
  font-weight: 900;
}

html[data-theme="dark"] .editor-assets-subcategory-head {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.editor-assets-subcategory-head i {
  color: var(--editor-muted);
  font-size: 12px;
}

.editor-assets-subcategory-delete {
  margin-left: auto;
  flex: 0 0 auto;
}

.editor-assets-subcategory-delete i {
  color: inherit;
}

.editor-assets-subcategory-group .editor-asset-collection-grid {
  padding: 14px;
}

.editor-assets-empty.is-compact {
  padding: 14px;
}

.editor-assets-subcategory-footer {
  position: sticky;
  bottom: 0;
  padding: 12px 16px 16px;
  background: linear-gradient(to top, var(--editor-bg) 70%, rgba(255, 255, 255, 0));
}

.editor-assets-add-subcategory {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--editor-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.editor-assets-add-subcategory:hover {
  background: rgba(90, 163, 255, 0.16);
}

html[data-theme="dark"] .editor-assets-subcategory-footer {
  background: linear-gradient(to top, var(--editor-bg) 70%, rgba(15, 23, 42, 0));
}

html[data-theme="dark"] .editor-assets-add-subcategory {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.94);
}

html[data-theme="dark"] .editor-assets-add-subcategory:hover {
  background: rgba(96, 165, 250, 0.16);
}

.editor-asset-collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding: 14px 16px 20px;
}

.editor-assets-empty,
.editor-assets-loading {
  color: var(--editor-muted);
  font-size: 13px;
  line-height: 1.5;
  padding: 14px 4px;
}

.editor-assets-loading {
  flex: 1;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.editor-assets-loading-spinner {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 3px solid rgba(148, 163, 184, 0.22);
  border-top-color: rgba(96, 165, 250, 0.92);
  animation: editorSpin 0.85s linear infinite;
}

.editor-asset-collection {
  border: 0;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

html[data-theme="dark"] .editor-asset-collection {
  background: transparent;
}

.editor-asset-collection-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--editor-text);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.editor-asset-collection-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.10);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--editor-muted);
}

.editor-asset-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.66);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.editor-asset-collection:hover .editor-asset-delete-btn,
.editor-asset-delete-btn:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

.editor-asset-delete-btn:hover {
  background: rgba(220, 38, 38, 0.88);
}

html[data-theme="dark"] .editor-asset-collection-cover,
html[data-theme="dark"] .editor-asset-thumb {
  background: rgba(255, 255, 255, 0.08);
}

.editor-asset-collection-cover img,
.editor-asset-collection-cover video,
.editor-asset-thumb img,
.editor-asset-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.editor-asset-collection-name {
  font-weight: 800;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-asset-collection-meta {
  display: block;
  margin-top: 3px;
  color: var(--editor-muted);
  font-size: 12px;
}

.editor-asset-collection-text {
  min-width: 0;
  padding: 0 6px;
}

.editor-asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 10px 10px;
}

.editor-asset-detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] .editor-asset-detail-head {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.editor-asset-detail-back {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--editor-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

html[data-theme="dark"] .editor-asset-detail-back {
  background: rgba(255, 255, 255, 0.08);
}

.editor-asset-detail-back:hover {
  background: rgba(90, 163, 255, 0.18);
}

.editor-asset-detail-title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--editor-text);
  font-size: 15px;
  font-weight: 800;
}

.editor-asset-detail-title span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-asset-detail-title span:last-child {
  color: var(--editor-muted);
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 auto;
}

.editor-asset-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.editor-asset-detail-grid .editor-asset-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
}

.editor-asset-item {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--editor-text);
  text-align: left;
  cursor: pointer;
}

.editor-asset-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--editor-muted);
}

.editor-asset-title {
  margin-top: 5px;
  font-size: 11px;
  color: var(--editor-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-material-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.42);
}

.editor-material-modal[hidden] {
  display: none;
}

.editor-video-watermark-modal {
  position: fixed;
  inset: 0;
  z-index: 86;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.46);
}

.editor-video-watermark-modal[hidden] {
  display: none;
}

.editor-video-watermark-dialog {
  width: min(980px, 94vw);
  max-height: min(760px, 90vh);
  display: flex;
  flex-direction: column;
  background: rgba(22, 22, 25, 0.98);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  color-scheme: dark;
}

html:not([data-theme="dark"]) .editor-video-watermark-dialog {
  background: #fff;
  color: #111827;
  border-color: rgba(15, 23, 42, 0.12);
  color-scheme: light;
}

.editor-video-watermark-head,
.editor-video-watermark-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.editor-video-watermark-actions {
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  border-bottom: 0;
}

html:not([data-theme="dark"]) .editor-video-watermark-head,
html:not([data-theme="dark"]) .editor-video-watermark-actions {
  border-color: rgba(15, 23, 42, 0.10);
}

.editor-video-watermark-title {
  font-size: 18px;
  font-weight: 900;
}

.editor-video-watermark-subtitle {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 700;
}

html:not([data-theme="dark"]) .editor-video-watermark-subtitle {
  color: rgba(15, 23, 42, 0.56);
}

.editor-video-watermark-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
}

html:not([data-theme="dark"]) .editor-video-watermark-close {
  background: rgba(15, 23, 42, 0.06);
}

.editor-video-watermark-body {
  display: grid;
  grid-template-columns: 336px minmax(300px, 420px);
  grid-template-areas: "assets preview";
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}

.editor-video-watermark-preview {
  grid-area: preview;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
}

.editor-video-watermark-player {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.editor-video-watermark-player.is-portrait {
  max-width: 330px;
}

.editor-video-watermark-player.is-square {
  max-width: 380px;
}

html:not([data-theme="dark"]) .editor-video-watermark-player {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.03));
  border-color: rgba(15, 23, 42, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.editor-video-watermark-player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.editor-video-watermark-player-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.editor-video-watermark-player-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 900;
}

.editor-video-watermark-player-meta span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
  font-weight: 700;
}

html:not([data-theme="dark"]) .editor-video-watermark-player-meta span {
  color: rgba(15, 23, 42, 0.54);
}

.editor-video-watermark-player-pill {
  flex: 0 0 auto;
  height: 26px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  font-weight: 900;
}

html:not([data-theme="dark"]) .editor-video-watermark-player-pill {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.72);
}

.editor-video-watermark-selected {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.62);
}

html:not([data-theme="dark"]) .editor-video-watermark-selected {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.46);
}

.editor-video-watermark-selected img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.editor-video-watermark-field,
.editor-video-watermark-range {
  min-width: 0;
  width: 100%;
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
}

.editor-video-watermark-field *,
.editor-video-watermark-range * {
  box-sizing: border-box;
}

.editor-video-watermark-field span,
.editor-video-watermark-range span {
  color: rgba(255, 255, 255, 0.64);
}

html:not([data-theme="dark"]) .editor-video-watermark-field span,
html:not([data-theme="dark"]) .editor-video-watermark-range span {
  color: rgba(15, 23, 42, 0.58);
}

.editor-video-watermark-field input,
.editor-video-watermark-field select {
  width: 100%;
  min-width: 0;
  height: 40px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  padding: 0 11px;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.editor-video-watermark-range input[type="range"] {
  width: 100%;
  min-width: 0;
  display: block;
  margin: 0;
}

.editor-video-watermark-field select {
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.78) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.78) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 16px,
    calc(100% - 12px) 16px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

html:not([data-theme="dark"]) .editor-video-watermark-field input,
html:not([data-theme="dark"]) .editor-video-watermark-field select {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.04);
}

html:not([data-theme="dark"]) .editor-video-watermark-field select {
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(15, 23, 42, 0.72) 50%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.72) 50%, transparent 50%);
}

.editor-video-watermark-positions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.editor-video-watermark-positions button,
.editor-video-watermark-secondary,
.editor-video-watermark-primary {
  height: 38px;
  border: 0;
  border-radius: 11px;
  padding: 0 12px;
  font-weight: 900;
  cursor: pointer;
}

.editor-video-watermark-positions button,
.editor-video-watermark-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
}

html:not([data-theme="dark"]) .editor-video-watermark-positions button,
html:not([data-theme="dark"]) .editor-video-watermark-secondary {
  background: rgba(15, 23, 42, 0.06);
}

.editor-video-watermark-positions button.is-active,
.editor-video-watermark-primary {
  background: #2563eb;
  color: #fff;
}

.editor-video-watermark-assets {
  grid-area: assets;
  padding: 18px;
  display: grid;
  gap: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.10);
  overflow: auto;
}

html:not([data-theme="dark"]) .editor-video-watermark-assets {
  border-right-color: rgba(15, 23, 42, 0.10);
}

.editor-video-watermark-assets h4 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.72);
}

html:not([data-theme="dark"]) .editor-video-watermark-assets h4 {
  color: rgba(15, 23, 42, 0.68);
}

.editor-video-watermark-cover {
  display: grid;
  gap: 10px;
}

.editor-video-watermark-cover-frame {
  position: relative;
  width: 100%;
  min-height: 0;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

html:not([data-theme="dark"]) .editor-video-watermark-cover-frame {
  background: rgba(15, 23, 42, 0.05);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.editor-video-watermark-cover-image,
.editor-video-watermark-cover-empty {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.editor-video-watermark-cover-image {
  object-fit: contain;
  display: block;
}

.editor-video-watermark-cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 800;
}

html:not([data-theme="dark"]) .editor-video-watermark-cover-empty {
  color: rgba(15, 23, 42, 0.50);
}

.editor-video-watermark-cover-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.editor-video-watermark-cover-watermark {
  position: absolute;
}

.editor-video-watermark-cover-watermark-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: var(--wm-opacity, 0.85);
  width: var(--wm-size, 72px);
}

.editor-video-watermark-cover-watermark-inner img,
.editor-video-watermark-cover-watermark-inner span {
  width: 100%;
  display: block;
}

.editor-video-watermark-cover-watermark-inner span {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.editor-video-watermark-cover-watermark-inner img {
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.editor-video-watermark-cover-watermark.is-top-left {
  top: var(--wm-margin, 24px);
  left: var(--wm-margin, 24px);
}

.editor-video-watermark-cover-watermark.is-top-right {
  top: var(--wm-margin, 24px);
  right: var(--wm-margin, 24px);
}

.editor-video-watermark-cover-watermark.is-bottom-left {
  left: var(--wm-margin, 24px);
  bottom: var(--wm-margin, 24px);
}

.editor-video-watermark-cover-watermark.is-bottom-right {
  right: var(--wm-margin, 24px);
  bottom: var(--wm-margin, 24px);
}

.editor-video-watermark-cover-watermark.is-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.editor-video-watermark-cover-watermark-inner.is-float-x {
  animation: editorWatermarkFloatX 2.8s ease-in-out infinite;
}

.editor-video-watermark-cover-watermark-inner.is-float-y {
  animation: editorWatermarkFloatY 2.8s ease-in-out infinite;
}

.editor-video-watermark-cover-watermark-inner.is-float-xy {
  animation: editorWatermarkFloatXY 3.6s ease-in-out infinite;
}

.editor-video-watermark-cover-caption {
  display: grid;
  gap: 2px;
}

.editor-video-watermark-cover-caption strong {
  font-size: 13px;
  font-weight: 900;
}

.editor-video-watermark-cover-caption span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  font-weight: 700;
}

html:not([data-theme="dark"]) .editor-video-watermark-cover-caption span {
  color: rgba(15, 23, 42, 0.54);
}

.editor-video-watermark-cover-caption strong,
.editor-video-watermark-cover-caption span {
  line-height: 1.35;
}

.editor-video-watermark-player-controls {
  display: grid;
  grid-template-columns: 38px auto minmax(0, 1fr) auto 38px 38px;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 2px;
}

.editor-video-watermark-player-icon {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

html:not([data-theme="dark"]) .editor-video-watermark-player-icon {
  background: rgba(15, 23, 42, 0.06);
}

.editor-video-watermark-player-time {
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0;
}

html:not([data-theme="dark"]) .editor-video-watermark-player-time {
  color: rgba(15, 23, 42, 0.58);
}

.editor-video-watermark-player-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

html:not([data-theme="dark"]) .editor-video-watermark-player-progress {
  background: rgba(15, 23, 42, 0.10);
}

.editor-video-watermark-player-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
}

@keyframes editorWatermarkFloatX {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(8px); }
}

@keyframes editorWatermarkFloatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@keyframes editorWatermarkFloatXY {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(6px, -4px); }
  50% { transform: translate(0, 6px); }
  75% { transform: translate(-6px, -2px); }
}

.editor-video-watermark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 10px;
}

.editor-video-watermark-collection-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.editor-video-watermark-collection {
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  flex: 0 0 150px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  padding: 7px 8px;
  cursor: pointer;
  text-align: left;
}

html:not([data-theme="dark"]) .editor-video-watermark-collection {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.035);
}

.editor-video-watermark-collection.is-selected {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.28);
}

.editor-video-watermark-collection-cover {
  width: 36px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.68);
}

html:not([data-theme="dark"]) .editor-video-watermark-collection-cover {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.58);
}

.editor-video-watermark-collection-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor-video-watermark-collection-text {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.editor-video-watermark-collection-text strong,
.editor-video-watermark-collection-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-video-watermark-collection-text strong {
  font-size: 11px;
  font-weight: 900;
}

.editor-video-watermark-collection-text small {
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
  font-weight: 800;
}

html:not([data-theme="dark"]) .editor-video-watermark-collection-text small {
  color: rgba(15, 23, 42, 0.54);
}

.editor-video-watermark-asset {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  padding: 8px;
  cursor: pointer;
  text-align: left;
}

html:not([data-theme="dark"]) .editor-video-watermark-asset {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.035);
}

.editor-video-watermark-asset.is-selected {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.28);
}

.editor-video-watermark-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  overflow: hidden;
  display: block;
  background: rgba(255, 255, 255, 0.08);
}

.editor-video-watermark-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor-video-watermark-asset > span:last-child {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.68);
}

html:not([data-theme="dark"]) .editor-video-watermark-asset > span:last-child {
  color: rgba(15, 23, 42, 0.64);
}

.editor-video-watermark-empty,
.editor-video-watermark-loading {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
  font-weight: 800;
}

html:not([data-theme="dark"]) .editor-video-watermark-empty,
html:not([data-theme="dark"]) .editor-video-watermark-loading {
  background: rgba(15, 23, 42, 0.04);
  color: rgba(15, 23, 42, 0.52);
}

@media (max-width: 760px) {
  .editor-video-watermark-body {
    grid-template-columns: 1fr;
    grid-template-areas:
      "preview"
      "assets";
    justify-content: stretch;
  }
  .editor-video-watermark-preview {
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  }
  .editor-video-watermark-assets {
    border-right: 0;
    border-top: 0;
  }
  html:not([data-theme="dark"]) .editor-video-watermark-preview {
    border-bottom-color: rgba(15, 23, 42, 0.10);
  }
  .editor-video-watermark-cover-frame {
    min-height: 0;
  }
  .editor-video-watermark-player-controls {
    grid-template-columns: 38px auto minmax(0, 1fr) auto 38px;
  }
  .editor-video-watermark-player-controls .editor-video-watermark-player-icon:last-child {
    display: none;
  }
}

.editor-material-dialog {
  width: min(820px, 92vw);
  max-height: min(680px, 88vh);
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  background: rgba(24, 24, 26, 0.98);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
}

html:not([data-theme="dark"]) .editor-material-dialog {
  background: #ffffff;
  color: #111827;
  border-color: rgba(15, 23, 42, 0.12);
}

.editor-material-cover {
  padding: 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

html:not([data-theme="dark"]) .editor-material-cover {
  border-right-color: rgba(15, 23, 42, 0.10);
}

.editor-material-cover-preview {
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.62);
}

html:not([data-theme="dark"]) .editor-material-cover-preview {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.46);
}

.editor-material-cover-preview img,
.editor-material-cover-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor-material-count {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

html:not([data-theme="dark"]) .editor-material-count {
  color: rgba(15, 23, 42, 0.54);
}

.editor-material-main {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.editor-material-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editor-material-title {
  font-weight: 900;
  font-size: 18px;
}

.editor-material-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
}

html:not([data-theme="dark"]) .editor-material-close {
  background: rgba(15, 23, 42, 0.06);
}

.editor-material-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

html:not([data-theme="dark"]) .editor-material-tabs {
  border-bottom-color: rgba(15, 23, 42, 0.10);
}

.editor-material-tab {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.56);
  padding: 0 0 12px;
  font-weight: 800;
  cursor: pointer;
}

html:not([data-theme="dark"]) .editor-material-tab {
  color: rgba(15, 23, 42, 0.52);
}

.editor-material-tab.is-active {
  color: inherit;
}

.editor-material-form {
  display: grid;
  gap: 14px;
}

.editor-material-field {
  display: grid;
  gap: 8px;
}

.editor-material-field span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 700;
}

html:not([data-theme="dark"]) .editor-material-field span {
  color: rgba(15, 23, 42, 0.58);
}

.editor-material-field input,
.editor-material-field select {
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  padding: 0 12px;
  outline: none;
}

html:not([data-theme="dark"]) .editor-material-field input,
html:not([data-theme="dark"]) .editor-material-field select {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.04);
}

.editor-material-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.editor-material-secondary,
.editor-material-primary {
  height: 44px;
  border-radius: 12px;
  padding: 0 18px;
  border: 0;
  font-weight: 900;
  cursor: pointer;
}

.editor-material-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
}

.editor-material-primary {
  background: #38bdf8;
  color: #06111f;
}

.editor-material-primary:disabled {
  opacity: 0.55;
  cursor: wait;
}

@media (max-width: 760px) {
  .editor-material-dialog {
    grid-template-columns: 1fr;
  }
  .editor-material-cover {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  }
  .editor-material-cover-preview {
    max-height: 220px;
  }
}

@media (max-width: 980px) {
  .image-editor-body {
    flex-direction: column;
  }

  .image-editor-sidebar {
    width: 100%;
    max-height: 42vh;
    border-left: none;
    border-top: 1px solid var(--editor-border);
  }

  .image-editor-sidebar.is-collapsed {
    width: 100%;
    max-height: 56px;
  }

  .image-editor-sidebar.is-collapsed .sidebar-section {
    display: none;
  }

  .sidebar-toggle {
    left: auto;
    right: 12px;
    top: 10px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .image-editor-stage {
    max-height: 58vh;
  }

}

@media (max-width: 720px) {
  .editor-left-panel {
    left: 8px;
    padding: 8px 6px;
    gap: 10px;
    border-radius: 18px;
  }

  .editor-left-agent-panel {
    right: 8px;
    bottom: 68px;
    padding: 6px;
    border-radius: 18px;
  }

  .editor-left-tool-btn {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .editor-left-tool-btn i {
    font-size: 14px;
  }

  .editor-left-add-menu {
    left: calc(100% + 10px);
    width: min(220px, calc(100vw - 72px));
  }

  .editor-left-add-item {
    min-height: 48px;
    font-size: 14px;
  }

  .editor-left-add-item-icon {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 720px) {
  .editor-promptbar {
    width: calc(100% - 12px);
    padding: 6px 8px;
    border-radius: 10px;
  }

  .promptbar-body {
    flex-direction: column;
  }

  .promptbar-upload-btn {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    box-shadow: none;
  }

  .promptbar-controls-row {
    justify-content: flex-start;
  }

  .promptbar-controls-row .promptbar-field:last-of-type {
    margin-left: 0;
  }

  .promptbar-input {
    min-height: 56px;
    font-size: 12px;
  }

  .promptbar-send-btn {
    height: 24px;
    padding: 0 8px;
  }

  .promptbar-preview {
    margin-bottom: 4px;
  }

  .promptbar-preview-thumb {
    width: 36px;
    height: 36px;
  }

  .multi-image-preview-grid {
    --thumb-size: 48px;
    padding: 4px;
    gap: 4px;
  }

  .multi-upload-info {
    padding: 5px 6px;
  }
}

/* A paused status check is not a confirmed generation failure. */
.editor-graph-node-error-overlay.is-unconfirmed {
  border-color: rgba(148, 163, 184, 0.36);
}
.editor-graph-node-error-overlay.is-unconfirmed .editor-graph-node-error-title,
.editor-graph-node-error-overlay.is-unconfirmed .editor-graph-node-error-text {
  color: inherit;
}
html:not([data-theme="dark"]) .editor-graph-node-error-overlay.is-unconfirmed {
  color: #475569;
}

.editor-graph-node-task-id {
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
}
.editor-graph-node-task-id span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
