body.ic-workspace-open {
  overflow: hidden;
}

.ic-workspace {
  position: fixed;
  inset: 86px 0 0;
  z-index: 2400;
  display: grid;
  grid-template-rows: 64px 64px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  background: #edf4f1;
}

.ic-generator-mode-slot {
  position: relative;
  z-index: 13;
  display: grid;
  min-width: 0;
  padding: 6px 14px;
  place-items: center;
  border-bottom: 1px solid #dbe8e1;
  background: #f8fbf9;
}

.ic-generator-mode-slot .generator-mode-switch {
  grid-column: auto;
  width: min(360px, 100%);
}

.ic-workspace[hidden] {
  display: none;
}

.ic-workspace *,
.ic-workspace *::before,
.ic-workspace *::after {
  box-sizing: border-box;
}

.ic-workspace button,
.ic-workspace input,
.ic-workspace textarea,
.ic-workspace output {
  font: inherit;
}

.ic-topbar {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(0, 2fr);
  align-items: center;
  gap: 20px;
  min-width: 0;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, #07100c, #18332a 58%, #23463b);
  box-shadow: 0 10px 30px rgba(7, 16, 12, 0.18);
  backdrop-filter: blur(18px);
}

.ic-topbar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.ic-brand-mark {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  color: var(--green);
  font-size: 27px;
  background: rgba(8, 199, 102, 0.1);
  box-shadow: inset 0 0 0 1px rgba(120, 255, 197, 0.12), 0 0 20px rgba(8, 199, 102, 0.22);
}

.ic-topbar-brand div {
  min-width: 0;
}

.ic-topbar-brand strong,
.ic-topbar-brand span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ic-topbar-brand strong {
  color: #f6fffb;
  font-size: 15px;
  line-height: 1.35;
}

.ic-topbar-brand span {
  margin-top: 2px;
  color: rgba(246, 255, 251, 0.62);
  font-size: 10px;
}

.ic-project-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: max-content;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(246, 255, 251, 0.72);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
}

.ic-project-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a5adba;
}

.ic-project-status[data-state="saving"] i {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.ic-project-status[data-state="dirty"] i {
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(53, 232, 255, 0.12);
}

.ic-project-status[data-state="saved"] i {
  background: #22a06b;
  box-shadow: 0 0 0 4px rgba(34, 160, 107, 0.12);
}

.ic-project-status[data-state="error"] i {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.ic-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.ic-toolbar::-webkit-scrollbar {
  display: none;
}

.ic-toolbar button,
.ic-mobile-tools button {
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(246, 255, 251, 0.72);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  background: transparent;
  transition: 150ms ease;
}

.ic-toolbar button:hover,
.ic-mobile-tools button:hover,
.ic-toolbar button.is-active,
.ic-mobile-tools button.is-active {
  border-color: rgba(120, 255, 197, 0.18);
  color: #d9ffe6;
  background: rgba(8, 199, 102, 0.12);
}

.ic-toolbar button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ic-toolbar output {
  flex: 0 0 44px;
  color: rgba(246, 255, 251, 0.66);
  font-size: 10px;
  text-align: center;
}

.ic-toolbar-divider {
  flex: 0 0 1px;
  width: 1px;
  height: 20px;
  margin: 0 3px;
  background: rgba(255, 255, 255, 0.12);
}

.ic-toolbar .ic-save-button {
  min-width: 78px;
  border: 0;
  color: #04110b;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(8, 199, 102, 0.22);
}

.ic-toolbar .ic-account-button {
  gap: 6px;
  border-color: rgba(120, 255, 197, 0.16);
  color: #d9ffe6;
  background: rgba(8, 199, 102, 0.08);
}

.ic-toolbar .ic-save-button:hover {
  color: #04110b;
  background: #12d773;
}

.ic-layout {
  position: relative;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr) 272px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.ic-palette,
.ic-inspector {
  position: relative;
  z-index: 8;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  background: rgba(249, 252, 250, 0.96);
  scrollbar-width: thin;
  scrollbar-color: #dfe4ef transparent;
}

.ic-palette {
  padding: 18px 14px 24px;
  border-right: 1px solid rgba(13, 31, 24, 0.08);
}

.ic-palette-close {
  display: none;
}

.ic-inspector {
  padding: 18px 16px 24px;
  border-left: 1px solid rgba(13, 31, 24, 0.08);
}

.ic-palette-section + .ic-palette-section {
  margin-top: 22px;
}

.ic-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.ic-section-heading span {
  color: #07100b;
  font-size: 14px;
  font-weight: 750;
}

.ic-section-heading small {
  color: #7a817d;
  font-size: 11px;
}

.ic-sync-card {
  display: flex;
  width: 100%;
  min-height: 62px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(8, 199, 102, 0.18);
  border-radius: 16px;
  color: #07100b;
  text-align: left;
  cursor: pointer;
  background: linear-gradient(135deg, #f3faf6, #edf7f2);
}

.ic-sync-card > span:first-child {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-deep));
}

.ic-sync-card strong,
.ic-sync-card small {
  display: block;
}

.ic-sync-card strong {
  font-size: 13px;
}

.ic-sync-card small {
  margin-top: 3px;
  color: #858fa3;
  font-size: 11px;
  line-height: 1.35;
}

.ic-generation-settings {
  display: grid;
  gap: 10px;
}

.ic-generation-settings > .ic-section-heading {
  margin-bottom: 0;
}

.ic-generation-settings label > span {
  display: block;
  margin-bottom: 5px;
  color: #5f6964;
  font-size: 11px;
  font-weight: 700;
}

.ic-generation-settings select,
.ic-generation-settings input,
.ic-generation-settings textarea {
  width: 100%;
  border: 1px solid #dfe6e2;
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: #fff;
}

.ic-generation-settings select,
.ic-generation-settings input {
  height: 34px;
  padding: 0 8px;
  font-size: 12px;
}

.ic-generation-settings textarea {
  min-height: 64px;
  padding: 8px;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
}

.ic-generation-settings select:focus,
.ic-generation-settings input:focus,
.ic-generation-settings textarea:focus {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(8, 199, 102, 0.1);
}

.ic-custom-size-fields,
.ic-setting-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ic-custom-size-fields[hidden] {
  display: none;
}

.ic-custom-size-fields label {
  position: relative;
}

.ic-custom-size-fields input {
  padding-right: 28px;
}

.ic-custom-size-fields em {
  position: absolute;
  right: 8px;
  bottom: 9px;
  color: #929bad;
  font-size: 10px;
  font-style: normal;
}

.ic-reference-upload {
  min-height: 34px;
  border: 1px dashed rgba(8, 199, 102, 0.34);
  border-radius: 10px;
  color: #087443;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  background: #f0faf5;
}

.ic-advanced-settings {
  padding: 9px;
  border: 1px solid rgba(13, 31, 24, 0.08);
  border-radius: 11px;
  background: #f7faf8;
}

.ic-advanced-settings summary {
  color: #52605a;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.ic-advanced-settings[open] {
  display: grid;
  gap: 9px;
}

.ic-advanced-settings[open] summary {
  margin-bottom: 1px;
}

.ic-node-palette {
  display: grid;
  gap: 7px;
}

.ic-node-palette > button {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid rgba(13, 31, 24, 0.08);
  border-radius: 14px;
  color: #07100b;
  text-align: left;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.76);
  transition: 150ms ease;
}

.ic-node-palette > button:hover {
  border-color: rgba(8, 199, 102, 0.24);
  background: #f0faf5;
  transform: translateY(-1px);
}

.ic-node-palette i {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: #087443;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  background: #e3f7ed;
}

.ic-node-palette button:nth-child(2) i {
  color: #0f8b73;
  background: #e5f8f2;
}

.ic-node-palette button:nth-child(3) i {
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-deep));
}

.ic-node-palette button:nth-child(4) i {
  color: #d46a16;
  background: #fff0df;
}

.ic-node-palette button:nth-child(5) i {
  color: #fff;
  background: linear-gradient(135deg, #087443, #0b5d48);
}

.ic-node-palette button:nth-child(6) i {
  color: #176b87;
  background: #e2f3f8;
}

.ic-node-palette strong,
.ic-node-palette small {
  display: block;
}

.ic-node-palette strong {
  font-size: 13px;
  line-height: 1.3;
}

.ic-node-palette small {
  margin-top: 2px;
  color: #9098a7;
  font-size: 11px;
  line-height: 1.35;
}

.ic-guide-section ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  counter-reset: guide;
  list-style: none;
}

.ic-guide-section li {
  position: relative;
  min-height: 24px;
  padding-left: 30px;
  color: #747e91;
  font-size: 12px;
  line-height: 24px;
  counter-increment: guide;
}

.ic-guide-section li::before {
  position: absolute;
  top: 2px;
  left: 0;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 7px;
  color: #087443;
  font-size: 10px;
  font-weight: 800;
  content: counter(guide);
  background: #e7f7ef;
}

.ic-source-note {
  margin-top: 22px;
  padding: 10px 11px;
  border: 1px solid #edf0f5;
  border-radius: 13px;
  color: #8a93a3;
  font-size: 10px;
  line-height: 1.55;
  background: #fafbfd;
}

.ic-source-note summary {
  color: #6f7889;
  font-weight: 700;
  cursor: pointer;
}

.ic-source-note p {
  margin: 8px 0 4px;
}

.ic-source-note a {
  color: #087443;
  text-decoration: none;
}

.ic-stage-shell {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #edf4f1;
}

.ic-mobile-tools {
  display: none;
}

.ic-stage-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  outline: none;
  touch-action: none;
  cursor: default;
  background-color: #edf4f1;
  background-image: radial-gradient(circle, rgba(8, 199, 102, 0.2) 1px, transparent 1px);
  background-position: 0 0;
  background-size: 24px 24px;
  user-select: none;
}

.ic-stage-viewport:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(8, 199, 102, 0.58);
}

.ic-stage-viewport.is-panning,
.ic-stage-viewport[data-tool="pan"] {
  cursor: grab;
}

.ic-stage-viewport.is-panning {
  cursor: grabbing;
}

.ic-scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: visible;
  transform-origin: 0 0;
  will-change: transform;
}

.ic-edge-layer,
.ic-group-layer,
.ic-node-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: visible;
}

.ic-group-layer {
  z-index: 0;
  pointer-events: none;
}

.ic-group-frame {
  position: absolute;
  border: 1px dashed rgba(8, 116, 67, 0.38);
  border-radius: 24px;
  background: rgba(8, 199, 102, 0.035);
  transform-origin: top left;
}

.ic-group-frame.is-selected {
  border-color: var(--green-deep);
  background: rgba(8, 199, 102, 0.07);
  box-shadow: 0 0 0 3px rgba(8, 199, 102, 0.08);
}

.ic-group-frame > span {
  position: absolute;
  top: 8px;
  left: 14px;
  max-width: calc(100% - 28px);
  overflow: hidden;
  color: #087443;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ic-edge-layer {
  z-index: 1;
  pointer-events: none;
}

.ic-edge-layer path.ic-edge {
  fill: none;
  stroke: #8fa89b;
  stroke-width: 2;
  marker-end: url(#icArrow);
  vector-effect: non-scaling-stroke;
}

.ic-edge-layer path.ic-edge-preview {
  fill: none;
  stroke: var(--green-deep);
  stroke-width: 2;
  stroke-dasharray: 7 5;
  vector-effect: non-scaling-stroke;
}

.ic-edge-layer marker path {
  fill: #8fa89b;
}

.ic-node-layer {
  z-index: 2;
}

.ic-node {
  position: absolute;
  display: flex;
  min-width: 180px;
  min-height: 96px;
  flex-direction: column;
  overflow: visible;
  border: 1px solid #dfe6e2;
  border-radius: 18px;
  color: #111714;
  background: #fff;
  box-shadow: 0 14px 32px rgba(12, 24, 20, 0.1), 0 2px 7px rgba(12, 24, 20, 0.05);
  transform-origin: top left;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.ic-node:hover {
  border-color: rgba(8, 199, 102, 0.34);
  box-shadow: 0 18px 38px rgba(12, 24, 20, 0.14), 0 2px 7px rgba(12, 24, 20, 0.06);
}

.ic-node.is-selected {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(8, 199, 102, 0.14), 0 18px 38px rgba(12, 90, 55, 0.16);
}

.ic-node.is-dragging {
  transition: none;
  box-shadow: 0 20px 42px rgba(12, 24, 20, 0.18);
}

.ic-node--generation {
  border-color: #bde7d1;
  background: linear-gradient(155deg, #ffffff 0%, #f0faf5 100%);
}

.ic-node--result {
  border-color: #dfe4ee;
  background: #fff;
}

.ic-node--reference {
  border-color: #cfe9e3;
}

.ic-node--loop {
  border-color: #d5c4ee;
  background: linear-gradient(155deg, #ffffff 0%, #f7f1ff 100%);
}

.ic-node--video-generation {
  border-color: #a9ddc4;
  background: linear-gradient(155deg, #ffffff 0%, #eaf8f1 100%);
}

.ic-node--video-result {
  border-color: #bfdae4;
  background: linear-gradient(155deg, #ffffff 0%, #f1f8fa 100%);
}

.ic-node-head {
  display: flex;
  flex: 0 0 auto;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-bottom: 1px solid rgba(13, 31, 24, 0.08);
  cursor: grab;
}

.ic-node-head:active {
  cursor: grabbing;
}

.ic-node-type {
  display: grid;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 9px;
  color: #087443;
  font-size: 11px;
  font-weight: 800;
  background: #e3f7ed;
}

.ic-node--reference .ic-node-type {
  color: #0f8b73;
  background: #e5f8f2;
}

.ic-node--generation .ic-node-type {
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-deep));
}

.ic-node--result .ic-node-type {
  color: #d46a16;
  background: #fff0df;
}

.ic-node--loop .ic-node-type {
  color: #7145a5;
  background: #eee4fb;
}

.ic-node--video-generation .ic-node-type {
  color: #fff;
  background: linear-gradient(135deg, #087443, #0b5d48);
}

.ic-node--video-result .ic-node-type {
  color: #176b87;
  background: #e2f3f8;
}

.ic-node-head strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ic-node-menu {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #929bab;
  cursor: pointer;
  background: transparent;
}

.ic-node-menu:hover {
  color: #4d5870;
  background: #f0f2f7;
}

.ic-node-content {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 11px 12px 13px;
}

.ic-node-content p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #66706b;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.ic-node--result .ic-node-content > p {
  flex-shrink: 0;
}

.ic-node-image {
  width: 100%;
  min-height: 90px;
  flex: 1 1 auto;
  margin-bottom: 8px;
  overflow: hidden;
  border-radius: 12px;
  background: #eef1f6;
}

.ic-node-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ic-node-video {
  width: 100%;
  min-height: 120px;
  flex: 1 1 auto;
  margin-bottom: 8px;
  overflow: hidden;
  border-radius: 12px;
  background: #07100b;
}

.ic-node-video video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 120px;
  object-fit: contain;
  background: #07100b;
}

.ic-node-audio {
  margin-bottom: 8px;
}

.ic-node-audio audio {
  display: block;
  width: 100%;
  height: 34px;
}

.ic-node-task-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  padding: 10px;
  border: 1px solid #cfe9dc;
  border-radius: 11px;
  color: #35604d;
  font-size: 12px;
  background: #eff9f4;
}

.ic-node-task-status i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(8, 199, 102, 0.12);
}

.ic-node-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  color: #929baa;
  font-size: 11px;
}

.ic-node-footer button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(8, 199, 102, 0.22);
  border-radius: 8px;
  color: #087443;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  background: #edf9f3;
}

.ic-port {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  cursor: crosshair;
  background: #77839b;
  box-shadow: 0 0 0 1px #aab3c4;
  transform: translateY(-50%);
}

.ic-port:hover,
.ic-port.is-connect-target {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(8, 199, 102, 0.18);
}

.ic-port--input {
  left: -8px;
}

.ic-port--output {
  right: -8px;
}

.ic-selection-box {
  position: absolute;
  z-index: 3;
  border: 1px solid var(--green);
  background: rgba(8, 199, 102, 0.1);
  pointer-events: none;
}

.ic-empty-state {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  display: grid;
  width: min(280px, 70%);
  justify-items: center;
  color: #9ba4b4;
  text-align: center;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.ic-empty-state[hidden] {
  display: none;
}

.ic-empty-state > span {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  place-items: center;
  border: 1px solid rgba(8, 199, 102, 0.2);
  border-radius: 16px;
  color: #087443;
  background: #e8f8f0;
}

.ic-empty-state strong {
  color: #687386;
  font-size: 13px;
}

.ic-empty-state small {
  margin-top: 5px;
  font-size: 10px;
}

.ic-stage-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  z-index: 6;
  padding: 6px 10px;
  border: 1px solid rgba(13, 31, 24, 0.1);
  border-radius: 999px;
  color: #66706b;
  font-size: 9px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 6px 14px rgba(12, 24, 20, 0.06);
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.ic-minimap {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 7;
  width: 150px;
  height: 90px;
  overflow: hidden;
  border: 1px solid #dfe6e2;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 9px 22px rgba(12, 24, 20, 0.1);
  backdrop-filter: blur(10px);
}

.ic-minimap .ic-minimap-node {
  fill: #cfd5e2;
  stroke: #fff;
  stroke-width: 1;
}

.ic-minimap .ic-minimap-node[data-type="generation"] {
  fill: var(--green);
}

.ic-minimap .ic-minimap-node[data-type="reference"] {
  fill: #75c4b1;
}

.ic-minimap .ic-minimap-node[data-type="result"] {
  fill: #efb273;
}

.ic-minimap .ic-minimap-node[data-type="loop"] {
  fill: #9a74c7;
}

.ic-context-menu,
.ic-quick-add-menu {
  position: fixed;
  z-index: 60;
  display: grid;
  min-width: 220px;
  gap: 3px;
  padding: 7px;
  border: 1px solid rgba(13, 31, 24, 0.12);
  border-radius: 14px;
  color: #18231e;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(12, 24, 20, 0.18);
  backdrop-filter: blur(18px);
}

.ic-context-menu[hidden],
.ic-quick-add-menu[hidden] {
  display: none;
}

.ic-context-menu button,
.ic-quick-add-menu button {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  color: #34413b;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  background: transparent;
}

.ic-context-menu button:hover,
.ic-context-menu button:focus-visible,
.ic-quick-add-menu button:hover,
.ic-quick-add-menu button:focus-visible {
  outline: none;
  color: #075f39;
  background: #edf9f3;
}

.ic-context-menu button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.ic-context-menu kbd {
  color: #87918c;
  font-size: 9px;
  font-family: inherit;
}

.ic-quick-add-menu {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 278px;
}

.ic-quick-add-menu > strong {
  grid-column: 1 / -1;
  padding: 5px 7px 8px;
  color: #66706b;
  font-size: 11px;
}

.ic-quick-add-menu button {
  justify-content: flex-start;
  gap: 8px;
}

.ic-quick-add-menu i {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 8px;
  color: #087443;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  background: #e3f7ed;
}

.ic-minimap .ic-minimap-node[data-type="video-generation"] {
  fill: #087443;
}

.ic-minimap .ic-minimap-node[data-type="video-result"] {
  fill: #5aa3bc;
}

.ic-minimap .ic-minimap-viewport {
  fill: rgba(8, 199, 102, 0.08);
  stroke: var(--green);
  stroke-width: 1.5;
}

.ic-inspector-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(13, 31, 24, 0.08);
}

.ic-inspector-head span,
.ic-inspector-head strong {
  display: block;
}

.ic-inspector-head span {
  color: #969eac;
  font-size: 11px;
}

.ic-inspector-head strong {
  max-width: 170px;
  margin-top: 4px;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ic-inspector-head button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #f2d7d7;
  border-radius: 9px;
  color: #c34b4b;
  font-size: 10px;
  cursor: pointer;
  background: #fff8f8;
}

.ic-inspector-head button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ic-inspector-empty {
  display: grid;
  min-height: 280px;
  align-content: center;
  justify-items: center;
  color: #929bab;
  text-align: center;
}

.ic-inspector-empty[hidden] {
  display: none;
}

.ic-inspector-empty > span {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 16px;
  color: #087443;
  font-size: 22px;
  background: #e8f8f0;
}

.ic-inspector-empty strong {
  color: #647085;
  font-size: 14px;
}

.ic-inspector-empty p {
  max-width: 210px;
  margin: 7px 0 0;
  font-size: 11px;
  line-height: 1.7;
}

.ic-inspector-form {
  display: grid;
  gap: 14px;
  padding-top: 16px;
}

.ic-inspector-form[hidden] {
  display: none;
}

.ic-inspector-form label > span {
  display: block;
  margin-bottom: 7px;
  color: #6f798c;
  font-size: 11px;
  font-weight: 700;
}

.ic-inspector-form input,
.ic-inspector-form select,
.ic-inspector-form textarea {
  width: 100%;
  border: 1px solid #dfe6e2;
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: 150ms ease;
}

.ic-inspector-form input,
.ic-inspector-form select {
  height: 38px;
  padding: 0 11px;
  font-size: 13px;
}

.ic-inspector-form textarea {
  min-height: 120px;
  padding: 10px 11px;
  font-size: 12px;
  line-height: 1.65;
  resize: vertical;
}

.ic-inspector-form input:focus,
.ic-inspector-form select:focus,
.ic-inspector-form textarea:focus {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(8, 199, 102, 0.1);
}

.ic-node-image-preview {
  position: relative;
  display: block;
  width: 100%;
  height: 150px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  background: #eef1f6;
}

.ic-node-image-preview[hidden] {
  display: none;
}

.ic-node-image-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ic-node-image-preview span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  background: rgba(7, 16, 11, 0.72);
}

.ic-run-log {
  position: absolute;
  z-index: 12;
  top: 14px;
  right: 14px;
  display: grid;
  width: min(320px, calc(100% - 28px));
  max-height: min(430px, calc(100% - 28px));
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(13, 31, 24, 0.12);
  border-radius: 16px;
  color: #26372f;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 45px rgba(12, 24, 20, 0.16);
  backdrop-filter: blur(18px);
}

.ic-run-log[hidden] {
  display: none;
}

.ic-run-log header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(13, 31, 24, 0.08);
}

.ic-run-log header strong {
  font-size: 13px;
}

.ic-run-log header output {
  color: #84908a;
  font-size: 10px;
}

.ic-run-log ol {
  min-height: 90px;
  margin: 0;
  overflow-y: auto;
  padding: 8px 12px 12px;
  list-style: none;
}

.ic-run-log li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 2px;
  border-bottom: 1px solid rgba(13, 31, 24, 0.06);
  color: #52605a;
  font-size: 11px;
  line-height: 1.45;
}

.ic-run-log li[data-state="error"] span {
  color: #c83f3f;
}

.ic-run-log time {
  color: #96a09b;
  font-size: 9px;
}

.ic-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 40px));
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(13, 31, 24, 0.12);
  border-radius: 22px;
  color: #17231d;
  background: #fff;
  box-shadow: 0 28px 90px rgba(7, 16, 12, 0.28);
}

.ic-dialog::backdrop {
  background: rgba(4, 12, 8, 0.58);
  backdrop-filter: blur(8px);
}

.ic-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(13, 31, 24, 0.08);
}

.ic-dialog h2 {
  margin: 0;
  font-size: 16px;
}

.ic-dialog > header button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid #dfe6e2;
  border-radius: 10px;
  color: #66706b;
  font-size: 18px;
  cursor: pointer;
  background: #fff;
}

.ic-shortcut-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
  margin: 0;
  overflow-y: auto;
  padding: 12px 20px 20px;
}

.ic-shortcut-list > div {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(13, 31, 24, 0.07);
}

.ic-shortcut-list dt,
.ic-shortcut-list dd {
  margin: 0;
}

.ic-shortcut-list kbd {
  padding: 4px 7px;
  border: 1px solid #d8e0dc;
  border-bottom-width: 2px;
  border-radius: 7px;
  color: #35443d;
  font: 650 10px/1.2 inherit;
  background: #f6f9f7;
}

.ic-shortcut-list dd {
  color: #68746e;
  font-size: 12px;
}

.ic-media-dialog {
  width: min(820px, calc(100vw - 32px));
}

.ic-media-stage {
  display: grid;
  min-height: 260px;
  max-height: 58vh;
  place-items: center;
  overflow: hidden;
  background: #07100b;
}

.ic-media-stage img,
.ic-media-stage video {
  display: block;
  max-width: 100%;
  max-height: 58vh;
  object-fit: contain;
}

.ic-media-stage audio {
  width: min(520px, calc(100% - 40px));
}

.ic-media-stage [hidden] {
  display: none;
}

#canvasMediaEditField {
  display: grid;
  gap: 7px;
  padding: 14px 18px 0;
}

#canvasMediaEditField[hidden] {
  display: none;
}

#canvasMediaEditField span {
  color: #52605a;
  font-size: 12px;
  font-weight: 750;
}

#canvasMediaEditPrompt {
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid #dfe6e2;
  border-radius: 12px;
  outline: 0;
  color: #17231d;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
}

#canvasMediaEditPrompt:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(8, 199, 102, 0.1);
}

.ic-media-dialog > footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
}

.ic-media-dialog > footer a,
.ic-media-dialog > footer button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  color: #04110b;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  background: var(--green);
}

.ic-media-dialog > footer .ic-dialog-secondary {
  border: 1px solid #dfe6e2;
  color: #52605a;
  background: #fff;
}

.ic-overview-dialog {
  width: min(900px, calc(100vw - 32px));
}

.ic-overview-grid {
  display: grid;
  max-height: min(650px, calc(100vh - 140px));
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  overflow-y: auto;
  padding: 16px 18px 20px;
}

.ic-overview-item {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid #dfe6e2;
  border-radius: 14px;
  color: #26372f;
  text-align: left;
  cursor: pointer;
  background: #fff;
}

.ic-overview-item:hover,
.ic-overview-item:focus-visible {
  border-color: rgba(8, 199, 102, 0.42);
  outline: none;
  box-shadow: 0 0 0 3px rgba(8, 199, 102, 0.1);
}

.ic-overview-item img,
.ic-overview-media-icon {
  display: grid;
  width: 100%;
  height: 112px;
  place-items: center;
  border-radius: 10px;
  object-fit: cover;
  color: #087443;
  font-size: 30px;
  background: #edf7f2;
}

.ic-overview-item strong,
.ic-overview-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ic-overview-item strong {
  margin-top: 3px;
  font-size: 12px;
}

.ic-overview-item small {
  color: #87918c;
  font-size: 10px;
}

.ic-overview-empty {
  margin: 0;
  padding: 46px 20px 56px;
  color: #87918c;
  text-align: center;
  font-size: 13px;
}

.ic-overview-empty[hidden] {
  display: none;
}

.ic-node-media-fields,
.ic-video-settings {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(13, 31, 24, 0.08);
  border-radius: 13px;
  background: #f7faf8;
}

.ic-node-media-fields[hidden],
.ic-video-settings[hidden] {
  display: none;
}

.ic-node-media-fields > small {
  color: #87918c;
  font-size: 11px;
  line-height: 1.55;
}

.ic-video-settings > strong {
  color: #26372f;
  font-size: 13px;
}

.ic-video-settings > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.ic-video-settings label:last-child {
  grid-column: 1 / -1;
}

.ic-inspector-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.ic-inspector-meta span {
  padding: 9px;
  border: 1px solid rgba(13, 31, 24, 0.08);
  border-radius: 10px;
  color: #969eac;
  font-size: 10px;
  background: #f7faf8;
}

.ic-inspector-meta b {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #59657a;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ic-inspector-form > button {
  min-height: 38px;
  border: 1px solid #dfe6e2;
  border-radius: 11px;
  color: #59657a;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
}

.ic-inspector-form > .ic-node-image-preview {
  height: 150px;
  padding: 0;
  border: 0;
  background: #eef1f6;
}

.ic-inspector-form > .ic-generate-node-button {
  border: 0;
  color: #04110b;
  background: var(--green);
  box-shadow: 0 8px 17px rgba(8, 199, 102, 0.18);
}

.ic-inspector-form > button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 1180px) {
  .ic-topbar {
    grid-template-columns: minmax(180px, auto) auto minmax(0, 1fr);
    gap: 10px;
  }

  .ic-layout {
    grid-template-columns: 200px minmax(0, 1fr) 246px;
  }

  .ic-toolbar button {
    padding: 0 7px;
  }
}

@media (max-width: 900px) {
  .ic-workspace {
    inset: 72px 0 0;
    grid-template-rows: 58px 58px minmax(0, 1fr);
  }

  .ic-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0 12px;
  }

  .ic-project-status,
  .ic-topbar .ic-toolbar > :not(.ic-account-button):not(.ic-save-button) {
    display: none;
  }

  .ic-topbar .ic-toolbar button {
    min-width: 44px;
    height: 44px;
  }

  .ic-account-button span {
    display: none;
  }

  .ic-topbar .ic-toolbar {
    overflow: visible;
  }

  .ic-layout {
    grid-template-columns: 178px minmax(0, 1fr);
  }

  .ic-inspector {
    position: absolute;
    z-index: 20;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(292px, 82vw);
    border-left: 1px solid #e6eaf2;
    box-shadow: -12px 0 30px rgba(40, 51, 82, 0.12);
    transform: translateX(100%);
    transition: transform 180ms ease;
  }

  .ic-inspector.has-selection {
    transform: translateX(0);
  }

  .ic-palette.is-open ~ .ic-inspector {
    transform: translateX(100%);
    pointer-events: none;
  }

  .ic-run-log {
    top: 64px;
    max-height: calc(100% - 78px);
  }

  .ic-mobile-tools {
    position: absolute;
    z-index: 9;
    top: 10px;
    left: 50%;
    display: flex;
    max-width: calc(100% - 20px);
    gap: 4px;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 4px;
    border: 1px solid #e0e5ef;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 18px rgba(38, 49, 80, 0.09);
    transform: translateX(-50%);
    backdrop-filter: blur(10px);
    scrollbar-width: none;
  }

  .ic-mobile-tools::-webkit-scrollbar { display: none; }

  .ic-mobile-tools button {
    height: 30px;
    color: #52605a;
  }

  .ic-mobile-tools button:hover,
  .ic-mobile-tools button.is-active {
    border-color: rgba(8, 199, 102, 0.22);
    color: #087443;
    background: #e7f7ef;
  }

  .ic-stage-hint {
    display: none;
  }
}

@media (max-width: 760px) {
  .ic-workspace {
    inset: 64px 0 0;
  }
}

@media (max-width: 640px) {
  .ic-topbar-brand span {
    display: none;
  }

  .ic-layout {
    display: block;
  }

  .ic-palette {
    position: absolute;
    z-index: 18;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(304px, 86vw);
    box-shadow: 12px 0 28px rgba(40, 51, 82, 0.12);
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .ic-palette.is-open {
    transform: translateX(0);
  }

  .ic-palette-close {
    position: sticky;
    z-index: 2;
    top: 0;
    display: grid;
    width: 32px;
    height: 32px;
    margin: -8px 0 8px auto;
    place-items: center;
    border: 1px solid #e3e7ef;
    border-radius: 10px;
    color: #657086;
    font-size: 18px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 5px 14px rgba(38, 49, 80, 0.08);
  }

  .ic-stage-shell {
    position: absolute;
    inset: 0;
  }

  .ic-minimap {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: 116px;
    height: 70px;
  }

  .ic-mobile-tools { left: 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .ic-workspace *,
  .ic-workspace *::before,
  .ic-workspace *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
