/* 万能画布 · 入口门户 + 节点画布 */
:root {
  --uc-bg: #eef1f4;
  --uc-dot: #c5ccd6;
  --uc-card: #ffffff;
  --uc-ink: #1f2937;
  --uc-muted: #8b93a1;
  --uc-line: #d7dde6;
  --uc-teal: #14b8a6;
  --uc-teal-deep: #0d9488;
  --uc-orange: #f59e0b;
  --uc-blue: #60a5fa;
  --uc-blue-deep: #3b82f6;
  --uc-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  --uc-radius: 14px;
}

/* —— 入口：我的项目 / 案例演示 —— */
body.uc-page .uc-hub {
  min-height: 100dvh;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 40%, #eef2f7 100%);
  overflow: visible;
  padding-bottom: 72px;
}

body.uc-page .uc-mobile-tip {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  color: #0e7490;
  font-size: 12px;
  line-height: 1.45;
}

body.uc-page .uc-mobile-tip--canvas {
  display: none;
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 58px;
  z-index: 14;
  margin: 0;
  text-align: center;
}

@media (max-width: 820px) and (orientation: portrait) {
  body.uc-page .uc-mobile-tip--canvas { display: block; }
}

@media (max-width: 900px) {
  body.uc-page .uc-hub__hero {
    grid-template-columns: 1fr;
  }
  body.uc-page .uc-hub__hero-visual {
    min-height: 280px;
  }
  body.uc-page .uc-hub__hero-stack--large {
    width: 68%;
  }
  body.uc-page .uc-hub__hero-stack--mid {
    width: 44%;
  }
  body.uc-page .uc-hub__hero-stack--small {
    width: 33%;
  }
  body.uc-page .uc-hub__feature-grid,
  body.uc-page .uc-hub__scene-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  body.uc-page .uc-hub__hero {
    padding: 16px;
    border-radius: 22px;
  }
  body.uc-page .uc-hub__hero-title {
    font-size: 24px;
  }
  body.uc-page .uc-hub__hero-visual {
    min-height: 220px;
  }
  body.uc-page .uc-hub__hero-stack--large {
    width: 72%;
    height: 190px;
  }
  body.uc-page .uc-hub__hero-stack--mid {
    width: 46%;
    height: 176px;
  }
  body.uc-page .uc-hub__hero-stack--small {
    width: 36%;
    height: 126px;
  }
  body.uc-page .uc-hub__section {
    padding: 0 14px;
  }
  body.uc-page .uc-hub__feature-grid,
  body.uc-page .uc-hub__scene-grid {
    grid-template-columns: 1fr;
  }
  body.uc-page .uc-hub__feature-card,
  body.uc-page .uc-hub__scene-card img {
    min-height: 0;
  }
}

body.uc-page .uc-hub__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  background: #fff;
  border-bottom: 1px solid #eef0f3;
}

body.uc-page .uc-hub__top-left,
body.uc-page .uc-hub__top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.uc-page .uc-hub__hero {
  max-width: 1100px;
  margin: 20px auto 0;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 20px;
  align-items: center;
  border: 1px solid #e7ecf2;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(243,248,252,.96));
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

body.uc-page .uc-hub__hero-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

body.uc-page .uc-hub__hero-pill {
  display: inline-flex;
  align-self: flex-start;
  padding: 7px 12px;
  border-radius: 999px;
  background: #ecfeff;
  color: var(--uc-teal-deep);
  font-size: 12px;
  font-weight: 800;
}

body.uc-page .uc-hub__hero-title {
  margin: 0;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 900;
  color: #0f172a;
}

body.uc-page .uc-hub__hero-sub {
  margin: 0;
  max-width: 42em;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

body.uc-page .uc-hub__hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.uc-page .uc-hub__hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2dd4bf, #14b8a6);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(20, 184, 166, 0.22);
}

body.uc-page .uc-hub__hero-btn--ghost {
  background: #fff;
  color: #0f172a;
  border: 1px solid #dbe4ed;
  box-shadow: none;
}

body.uc-page .uc-hub__hero-metas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.uc-page .uc-hub__hero-metas span {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

body.uc-page .uc-hub__hero-visual {
  position: relative;
  min-height: 320px;
}

body.uc-page .uc-hub__hero-stack {
  position: absolute;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  background: #e2e8f0;
}

body.uc-page .uc-hub__hero-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.uc-page .uc-hub__hero-stack--large {
  left: 0;
  top: 20px;
  width: 72%;
  height: 270px;
  transform: rotate(-4deg);
}

body.uc-page .uc-hub__hero-stack--mid {
  right: 18px;
  top: 0;
  width: 46%;
  height: 250px;
  transform: rotate(8deg);
}

body.uc-page .uc-hub__hero-stack--small {
  right: 0;
  bottom: 10px;
  width: 34%;
  height: 182px;
  transform: rotate(1deg);
}

body.uc-page .uc-hub__nav {
  display: flex;
  gap: 8px;
  padding: 14px 22px 0;
  max-width: 1100px;
  margin: 0 auto;
}

body.uc-page .uc-hub__tab {
  height: 36px;
  padding: 0 16px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

body.uc-page .uc-hub__tab.is-on {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: var(--uc-teal-deep);
}

body.uc-page .uc-hub__panel {
  display: none;
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 22px 0;
}

body.uc-page .uc-hub__panel.is-on { display: block; }

body.uc-page .uc-hub__head h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}

body.uc-page .uc-hub__head p {
  margin: 8px 0 0;
  font-size: 14px;
  color: #94a3b8;
}

body.uc-page .uc-hub__search {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #94a3b8;
}

body.uc-page .uc-hub__search input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 14px;
  background: transparent;
  color: #0f172a;
}

body.uc-page .uc-hub__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

body.uc-page .uc-hub__grid--demos {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

body.uc-page .uc-hub__hero {
  max-width: 1100px;
  margin: 20px auto 0;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 20px;
  align-items: center;
  border: 1px solid #e7ecf2;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(243,248,252,.96));
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

body.uc-page .uc-hub__hero-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

body.uc-page .uc-hub__hero-pill {
  display: inline-flex;
  align-self: flex-start;
  padding: 7px 12px;
  border-radius: 999px;
  background: #ecfeff;
  color: var(--uc-teal-deep);
  font-size: 12px;
  font-weight: 800;
}

body.uc-page .uc-hub__hero-title {
  margin: 0;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 900;
  color: #0f172a;
}

body.uc-page .uc-hub__hero-sub {
  margin: 0;
  max-width: 42em;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

body.uc-page .uc-hub__hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.uc-page .uc-hub__hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2dd4bf, #14b8a6);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(20, 184, 166, 0.22);
}

body.uc-page .uc-hub__hero-btn--ghost {
  background: #fff;
  color: #0f172a;
  border: 1px solid #dbe4ed;
  box-shadow: none;
}

body.uc-page .uc-hub__hero-metas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.uc-page .uc-hub__hero-metas span {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

body.uc-page .uc-hub__hero-visual {
  position: relative;
  min-height: 320px;
}

body.uc-page .uc-hub__hero-stack {
  position: absolute;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  background: #e2e8f0;
}

body.uc-page .uc-hub__hero-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.uc-page .uc-hub__hero-stack--large {
  left: 0;
  top: 20px;
  width: 72%;
  height: 270px;
  transform: rotate(-4deg);
}

body.uc-page .uc-hub__hero-stack--mid {
  right: 18px;
  top: 0;
  width: 46%;
  height: 250px;
  transform: rotate(8deg);
}

body.uc-page .uc-hub__hero-stack--small {
  right: 0;
  bottom: 10px;
  width: 34%;
  height: 182px;
  transform: rotate(1deg);
}

body.uc-page .uc-hub__section {
  max-width: 1100px;
  margin: 28px auto 0;
  padding: 0 22px;
}

body.uc-page .uc-hub__section-head {
  text-align: center;
  margin-bottom: 18px;
}

body.uc-page .uc-hub__section-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  color: #0f172a;
  font-weight: 900;
}

body.uc-page .uc-hub__section-head p {
  margin: 8px 0 0;
  color: #94a3b8;
  font-size: 13px;
}

body.uc-page .uc-hub__feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

body.uc-page .uc-hub__feature-card {
  min-height: 170px;
  padding: 20px 18px;
  border-radius: 18px;
  border: 1px solid #e8edf3;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

body.uc-page .uc-hub__feature-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #ecfeff;
  color: var(--uc-teal-deep);
  font-weight: 900;
  margin-bottom: 12px;
}

body.uc-page .uc-hub__feature-card strong {
  display: block;
  font-size: 16px;
  color: #0f172a;
  margin-bottom: 8px;
}

body.uc-page .uc-hub__feature-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
  font-size: 13px;
}

body.uc-page .uc-hub__scene-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

body.uc-page .uc-hub__scene-card {
  overflow: hidden;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

body.uc-page .uc-hub__scene-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

body.uc-page .uc-hub__scene-card div {
  padding: 14px 16px 16px;
}

body.uc-page .uc-hub__scene-card strong {
  display: block;
  margin-bottom: 6px;
  color: #0f172a;
  font-size: 15px;
}

body.uc-page .uc-hub__scene-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

body.uc-page .uc-hub__section + .uc-hub__panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 168px;
  padding: 22px 18px;
  border: 1px solid #e8ecf1;
  border-radius: 16px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  overflow: hidden;
}

body.uc-page .uc-hub-card--demo {
  padding: 18px;
  min-height: 168px;
}

body.uc-page .uc-hub-card__cover {
  display: none;
}

body.uc-page .uc-hub-card__body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  padding: 0;
  flex: 1;
}

body.uc-page .uc-hub-card__desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.uc-page .uc-hub-card:hover {
  border-color: #99f6e4;
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.1);
  transform: translateY(-1px);
}

body.uc-page .uc-hub-card--new {
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #f8fafc;
  border-style: dashed;
}

body.uc-page .uc-hub-card__plus {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ecfeff;
  color: var(--uc-teal);
  font-size: 20px;
  margin-bottom: 6px;
}

body.uc-page .uc-hub-card strong {
  font-size: 16px;
  color: #0f172a;
}

body.uc-page .uc-hub-card > span {
  font-size: 12px;
  color: #94a3b8;
}

body.uc-page .uc-hub-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  font-size: 12px;
  color: #94a3b8;
}

body.uc-page .uc-hub-card__foot {
  margin-top: auto;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}

body.uc-page .uc-hub-card__foot .uc-chip {
  background: #f8fafc;
}

body.uc-page .uc-hub__empty-tip {
  margin: 28px 0 0;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

body.uc-page .uc-rename-btn {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 11px;
  cursor: pointer;
}

body.uc-page .uc-mode-icons {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

body.uc-page .uc-mode-icons button {
  width: 34px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}

body.uc-page .uc-mode-icons button.is-on {
  background: #fff;
  color: var(--uc-teal-deep);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

body.uc-page .uc-empty-star {
  font-size: 28px;
  color: #cbd5e1;
  line-height: 1;
  margin-bottom: 4px;
}

body.uc-page .uc-readonly-banner {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 16;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 24px);
  padding: 8px 10px 8px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
}

body.uc-page .uc-readonly-banner span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.uc-page .uc-readonly-banner .uc-chip {
  flex-shrink: 0;
  height: 30px;
  border: 0;
  background: #2dd4bf;
  color: #042f2e;
}

body.uc-page.is-readonly .uc-node textarea,
body.uc-page.is-readonly .uc-node select,
body.uc-page.is-readonly .uc-node input {
  pointer-events: none;
  opacity: 0.85;
}

body.uc-page.is-readonly .uc-gen,
body.uc-page.is-readonly .uc-opt,
body.uc-page.is-readonly .uc-ref-btn,
body.uc-page.is-readonly [data-act="close"],
body.uc-page.is-readonly [data-act="continue"],
body.uc-page.is-readonly [data-act="as-ref"],
body.uc-page.is-readonly [data-act="mode-prompt"],
body.uc-page.is-readonly [data-act="mode-agent"],
body.uc-page.is-readonly #ucNewNode,
body.uc-page.is-readonly #ucNewRef,
body.uc-page.is-readonly #ucSave {
  display: none !important;
}

@media (max-width: 820px) {
  body.uc-page .uc-hub__head h2 { font-size: 22px; }
  body.uc-page .uc-hub__nav,
  body.uc-page .uc-hub__panel { padding-left: 14px; padding-right: 14px; }
  body.uc-page .uc-hub__grid,
  body.uc-page .uc-hub__grid--demos {
    grid-template-columns: 1fr;
  }
  body.uc-page .uc-toolbar {
    top: 8px;
    max-width: calc(100% - 12px);
    border-radius: 16px;
    gap: 6px;
  }
  body.uc-page .uc-top__right .uc-chip { display: none; }
  body.uc-page .uc-top__right .uc-quota { font-size: 11px; }
  body.uc-page .uc-readonly-banner {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 16px;
    bottom: 10px;
  }
}

html.uc-html, body.uc-page {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--uc-bg);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  color: var(--uc-ink);
}

html.uc-html {
  background: #e5e7eb;
}

html.uc-html body.uc-page {
  width: 100% !important;
  max-width: var(--h5-app-max-width, 430px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
  box-shadow: 0 0 24px rgba(15, 23, 42, 0.08);
}

html.uc-html:not(.is-hub) body.uc-page {
  max-width: none !important;
  box-shadow: none;
}

/* 入口页允许手机下滑；编辑器仍锁滚动 */
html.uc-html.is-hub,
body.uc-page.is-hub {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

body.uc-page .uc-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100dvh;
}

body.uc-page .uc-top {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(10px);
  z-index: 20;
}

body.uc-page .uc-top__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body.uc-page .uc-back {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #f3f4f6;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

body.uc-page .uc-title {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

body.uc-page .uc-sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--uc-muted);
}

body.uc-page .uc-top__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.uc-page .uc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--uc-line);
  background: #fff;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

body.uc-page .uc-chip.is-on {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: var(--uc-teal-deep);
}

body.uc-page .uc-stage-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

body.uc-page .uc-stage {
  position: absolute;
  inset: 0;
  background-color: var(--uc-bg);
  background-image: radial-gradient(var(--uc-dot) 1.1px, transparent 1.1px);
  background-size: 18px 18px;
  cursor: grab;
  touch-action: none;
}

body.uc-page .uc-stage.is-panning {
  cursor: grabbing;
}

body.uc-page .uc-world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}

body.uc-page .uc-edges {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  pointer-events: none;
}

body.uc-page .uc-edge {
  fill: none;
  stroke: #94a3b8;
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.72;
}

body.uc-page .uc-edge.is-animated {
  stroke: #8b5cf6;
  stroke-width: 1.8;
  stroke-dasharray: 7 7;
  opacity: 0.82;
  animation: uc-dash 1.4s linear infinite;
}

@keyframes uc-dash {
  to { stroke-dashoffset: -28; }
}

body.uc-page .uc-mode-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

body.uc-page .uc-mode-switch button {
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

body.uc-page .uc-mode-switch button.is-on {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

body.uc-page .uc-toolbar {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--uc-shadow);
}

body.uc-page .uc-btn-new {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.28);
}

body.uc-page .uc-zoom {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--uc-line);
}

body.uc-page .uc-zoom button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: #f3f4f6;
  color: #374151;
  cursor: pointer;
}

body.uc-page .uc-zoom span {
  min-width: 42px;
  text-align: center;
  font-size: 12px;
  font-weight: 650;
  color: #64748b;
}

body.uc-page .uc-node {
  position: absolute;
  width: 300px;
  background: var(--uc-card);
  border: 1px solid #dfe5ec;
  border-radius: 14px;
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.07), 0 1px 2px rgba(15, 23, 42, 0.05);
  user-select: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

body.uc-page .uc-node:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1), 0 2px 5px rgba(15, 23, 42, 0.05);
}

body.uc-page .uc-node.is-agent {
  border-color: #fde68a;
}

body.uc-page .uc-node.is-skill {
  width: 224px;
  min-height: 76px;
  border: 1.5px solid #5eead4;
  border-radius: 13px;
  box-shadow: 0 7px 20px rgba(15, 23, 42, 0.09);
}

body.uc-page .uc-node.is-ref {
  width: 240px;
  border-color: #86efac;
}

body.uc-page .uc-node.is-result {
  width: 264px;
}

body.uc-page .uc-node.is-skill .uc-dot { background: #8b5cf6; }
body.uc-page .uc-node.is-ref .uc-dot { background: #22c55e; }

body.uc-page .uc-skill-compact {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 34px 12px 14px;
  box-sizing: border-box;
  cursor: grab;
}

body.uc-page .uc-skill-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a16207;
  font-size: 18px;
}

body.uc-page .uc-skill-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

body.uc-page .uc-skill-info strong {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.uc-page .uc-skill-info small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #a16207;
  font-size: 12px;
}

body.uc-page .uc-skill-info small i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a16207;
}

body.uc-page .uc-skill-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}

body.uc-page .uc-empty-hint {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  color: #64748b;
  text-align: center;
}

body.uc-page .uc-empty-hint strong {
  font-size: 16px;
  color: #334155;
}

body.uc-page .uc-empty-hint span {
  font-size: 12px;
}

body.uc-page .uc-proj-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: left;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
}

body.uc-page .uc-proj-item:hover {
  border-color: #99f6e4;
  background: #f0fdfa;
}

body.uc-page .uc-proj-item strong {
  font-size: 14px;
  color: #0f172a;
}

body.uc-page .uc-proj-item span {
  font-size: 12px;
  color: #94a3b8;
}

body.uc-page .uc-port {
  cursor: crosshair;
}

body.uc-page .uc-port:hover {
  border-color: var(--uc-teal);
  background: #ccfbf1;
}

body.uc-page .uc-node.is-dragging {
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
  z-index: 5;
}

body.uc-page .uc-node__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 8px 11px;
  border-bottom: 1px solid #f1f5f9;
  cursor: grab;
}

body.uc-page .uc-node__title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 750;
}

body.uc-page .uc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--uc-teal);
}

body.uc-page .uc-node.is-agent .uc-dot {
  background: var(--uc-orange);
}

body.uc-page .uc-node.is-result .uc-dot {
  background: #64748b;
}

body.uc-page .uc-node__actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: #f3f4f6;
}

body.uc-page .uc-icon-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

body.uc-page .uc-icon-btn.is-on {
  background: #fff;
  color: var(--uc-teal-deep);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

body.uc-page .uc-node.is-agent .uc-icon-btn.is-on {
  background: var(--uc-orange);
  color: #fff;
}

body.uc-page .uc-node__body {
  padding: 10px 11px 11px;
}

body.uc-page .uc-prompt-wrap {
  position: relative;
  margin-bottom: 10px;
}

body.uc-page .uc-prompt {
  width: 100%;
  min-height: 82px;
  max-height: 150px;
  resize: vertical;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px 12px 34px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--uc-ink);
  box-sizing: border-box;
  outline: none;
}

body.uc-page .uc-prompt:focus {
  border-color: #99f6e4;
  background: #fff;
}

body.uc-page .uc-opt {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border: 0;
  background: transparent;
  color: var(--uc-blue-deep);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

body.uc-page .uc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

body.uc-page .uc-row label {
  flex-shrink: 0;
  width: 42px;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

body.uc-page .uc-row select,
body.uc-page .uc-row input[type="number"] {
  flex: 1;
  min-width: 0;
  height: 34px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  padding: 0 10px;
  font-size: 12px;
  color: var(--uc-ink);
  outline: none;
}

body.uc-page .uc-qty {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

body.uc-page .uc-qty select {
  flex: 1.2;
}

body.uc-page .uc-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  flex: 1;
}

body.uc-page .uc-stepper input {
  width: 42px;
  border: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  outline: none;
  background: transparent;
}

body.uc-page .uc-stepper button {
  width: 28px;
  border: 0;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

body.uc-page .uc-refs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 8px 0 5px;
}

body.uc-page .uc-ref-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 58px;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  background: #fafafa;
  color: #64748b;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  padding: 8px;
  text-align: center;
}

body.uc-page .uc-ref-btn i {
  font-size: 16px;
  color: #94a3b8;
}

body.uc-page .uc-ref-hint {
  margin: 0 0 10px;
  text-align: center;
  font-size: 11px;
  color: var(--uc-muted);
}

body.uc-page .uc-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

body.uc-page .uc-thumb {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

body.uc-page .uc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.uc-page .uc-thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

body.uc-page .uc-gen {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

body.uc-page .uc-gen:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body.uc-page .uc-node.is-agent .uc-gen {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

body.uc-page .uc-port {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid #94a3b8;
  box-shadow: 0 0 0 3px rgba(255,255,255,.86);
  z-index: 2;
}

body.uc-page .uc-port--out {
  right: -6px;
}

body.uc-page .uc-port--in {
  left: -6px;
}

body.uc-page .uc-result__img {
  margin: 10px 11px;
  border-radius: 10px;
  overflow: hidden;
  background: #f4f7fa;
  min-height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.uc-page .uc-result__img img {
  width: 100%;
  max-height: 250px;
  object-fit: contain;
  display: block;
}

body.uc-page .uc-result__status {
  padding: 28px 16px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

body.uc-page .uc-result__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 12px 12px;
}

body.uc-page .uc-result__actions button {
  height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

body.uc-page .uc-result__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
  padding: 6px;
  box-sizing: border-box;
}

body.uc-page .uc-result__grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

body.uc-page .uc-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  z-index: 80;
  max-width: min(90vw, 360px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
}

body.uc-page .uc-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body.uc-page .uc-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.45);
}

body.uc-page .uc-modal.is-on {
  display: flex;
}

body.uc-page .uc-modal__panel {
  width: min(920px, 100%);
  max-height: min(84vh, 720px);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

body.uc-page .uc-modal__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f7;
}

body.uc-page .uc-modal__head h3 {
  margin: 0;
  font-size: 16px;
}

body.uc-page .uc-modal__head p {
  margin: 6px 0 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
}

body.uc-page .uc-modal__tools {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
}

body.uc-page .uc-modal__tools select,
body.uc-page .uc-modal__tools input {
  height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 13px;
}

body.uc-page .uc-modal__tools input {
  flex: 1;
}

body.uc-page .uc-modal__grid {
  flex: 1;
  overflow: auto;
  padding: 0 16px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

body.uc-page .uc-model-card {
  border: 2px solid transparent;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  text-align: left;
  padding: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

body.uc-page .uc-model-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body.uc-page .uc-model-card.is-on {
  border-color: #34d399;
}

body.uc-page .uc-model-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  background: #f8fafc;
}

body.uc-page .uc-model-card p {
  margin: 0;
  padding: 8px 10px 10px;
  font-size: 12px;
  font-weight: 650;
  color: #334155;
}

body.uc-page .uc-model-card small {
  display: block;
  padding: 0 10px 10px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.4;
}

body.uc-page .uc-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #94a3b8;
  padding: 40px 12px;
  font-size: 13px;
}

body.uc-page .uc-quota {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
}

@media (max-width: 720px) {
  body.uc-page .uc-node,
  body.uc-page .uc-node.is-result {
    width: 292px;
  }
  body.uc-page .uc-toolbar {
    left: 12px;
    right: 12px;
    transform: none;
    justify-content: space-between;
  }
  body.uc-page .uc-sub {
    display: none;
  }
}
