/* PC 工作台 */
body.pc {
  min-height: 100vh;
}

.pc-top {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--ktb-line);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  position: sticky;
  top: 33px;
  z-index: 30;
}

.pc-brand {
  display: flex;
  align-items: center;
  gap: 0;
  color: var(--ktb-ink);
}

.pc-brand i {
  width: 24px;
  height: 24px;
  background: var(--ktb-primary);
  color: #fff;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 12px;
}

.pc-nav {
  display: flex;
  gap: 4px;
  flex: 1;
}

.pc-nav a {
  color: var(--ktb-body);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
}

.pc-nav a.is-active,
.pc-nav a:hover {
  background: var(--ktb-primary-soft);
  color: var(--ktb-primary);
}

.pc-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.pc-user .pts {
  background: var(--ktb-paper);
  border: 1px solid var(--ktb-line);
  border-radius: 999px;
  padding: 4px 10px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ece6f4;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  overflow: hidden;
  flex: none;
  padding: 0;
}
.avatar svg,
.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.avatar--lg { width: 56px; height: 56px; }
.avatar--xl { width: 72px; height: 72px; }

.pc-main {
  width: min(var(--ktb-plaza), calc(100% - 40px));
  margin: 24px auto 64px;
}

.pc-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.pc-title h1 {
  font-size: 20px;
  color: var(--ktb-ink);
}

.banner {
  background: var(--ktb-primary-soft);
  color: var(--ktb-primary);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.banner--warn {
  background: #fbf3e6;
  color: #7a5a18;
}

.banner--danger {
  background: #fbeaea;
  color: var(--ktb-danger);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.filters select,
.filters input {
  height: 36px;
  border: 1px solid var(--ktb-line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.agent-card {
  padding: 0;
  overflow: hidden;
  color: inherit;
  display: block;
}

.agent-card .thumb {
  height: 112px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.thumb.chem { background: linear-gradient(135deg, #6b1f7a, #8b2d9e); }
.thumb.phy { background: linear-gradient(135deg, #1a1a2e, #4c1d95); }
.thumb.chn { background: linear-gradient(135deg, #4c1d95, #7c3aed); }
.thumb.math { background: linear-gradient(135deg, #5b21b6, #8b2d9e); }
.thumb.eng { background: linear-gradient(135deg, #6d28d9, #a855c9); }
.thumb.sci { background: linear-gradient(135deg, #3b0764, #7c3aed); }

.agent-card .body {
  padding: 14px 16px 16px;
}

.agent-card h3 {
  font-size: 16px;
  color: var(--ktb-ink);
  margin-bottom: 6px;
}

.meta {
  color: var(--ktb-muted);
  font-size: 12px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.rec-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.login-box {
  width: min(420px, calc(100% - 32px));
  margin: 80px auto;
  padding: 32px;
}

.login-box h1 {
  font-size: 20px;
  color: var(--ktb-ink);
  margin-bottom: 8px;
}

.qr-big {
  width: 180px;
  height: 180px;
  margin: 20px auto;
  border: 1px solid var(--ktb-line);
  border-radius: 12px;
  background:
    repeating-conic-gradient(var(--ktb-ink) 0 25%, #fff 0 50%) 0 0 / 16px 16px;
}

.check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  margin: 12px 0 16px;
}

.two-col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}
.two-col--agent {
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}
.agent-sec {
  margin: 22px 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ktb-ink);
}

.price-box {
  padding: 20px;
  position: sticky;
  top: 72px;
}
.price-acts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.price-acts .ktb-btn { width: 100%; }
.price-acts .meta { margin: 0; }
.price-pay {
  background: #fff;
  color: var(--ktb-primary);
  border-color: var(--ktb-primary);
  font-weight: 600;
}
.price-pay:hover {
  background: var(--ktb-primary-soft);
  color: var(--ktb-primary-hover);
  border-color: var(--ktb-primary-hover);
  box-shadow: none;
}
.price-sub {
  background: var(--ktb-primary-soft);
  color: var(--ktb-primary);
  border-color: var(--ktb-primary-soft);
  font-weight: 600;
}
.price-sub:hover {
  background: #ead6f3;
  color: var(--ktb-primary-hover);
  border-color: #ead6f3;
  box-shadow: none;
}

.price-box .num {
  font-size: 28px;
  color: var(--ktb-ink);
  font-weight: 700;
}

.form-run .ktb-field { margin-bottom: 14px; }

.stream {
  min-height: 180px;
  background: var(--ktb-paper);
  border-radius: 8px;
  padding: 16px;
  white-space: pre-wrap;
}

.bundle {
  padding: 0;
  overflow: hidden;
  margin-bottom: 16px;
}

.bundle header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ktb-line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.bundle ol {
  margin: 0;
  padding: 8px 16px 16px 36px;
}

.bundle li {
  padding: 10px 0;
  border-bottom: 1px solid var(--ktb-line);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.bundle li:last-child { border-bottom: 0; }

/* Studio */
.studio:not(.studio--flow) {
  display: grid;
  grid-template-columns: 240px 1fr 320px;
  height: 100vh;
  background: #0a0a12;
}

.studio:not(.studio--flow) aside,
.studio:not(.studio--flow) .cfg {
  background: #0a0a12;
  color: #e5e7eb;
  overflow: auto;
  padding: 12px;
}

.studio:not(.studio--flow) .cfg {
  background: #12121e;
  border-left: 1px solid rgba(139, 45, 158, 0.2);
}

.studio:not(.studio--flow) h4 {
  font-size: 12px;
  color: #9aa6b4;
  margin: 12px 8px 8px;
  font-weight: 600;
}

.studio:not(.studio--flow) a,
.studio:not(.studio--flow) button.link {
  display: block;
  width: 100%;
  text-align: left;
  color: #d7dde4;
  background: transparent;
  border: 0;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.studio:not(.studio--flow) a:hover,
.studio:not(.studio--flow) button.link:hover,
.studio:not(.studio--flow) a.is-active {
  background: rgba(139, 45, 158, 0.22);
  color: #fff;
}

.node-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: grab;
  font-size: 13px;
}

.node-item:hover { background: rgba(139, 45, 158, 0.22); }

.canvas-wrap {
  background: #f3f0f8;
  position: relative;
  overflow: hidden;
}

.canvas-top {
  height: 48px;
  background: #fff;
  border-bottom: 1px solid var(--ktb-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.canvas {
  position: relative;
  height: calc(100% - 48px);
  background-image:
    radial-gradient(#d5dbe3 1px, transparent 1px);
  background-size: 20px 20px;
}

.flow-node {
  position: absolute;
  width: 160px;
  background: #fff;
  border: 1px solid var(--ktb-line);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: var(--ktb-shadow);
  cursor: move;
  z-index: 2;
}

.flow-node.is-sel {
  border-color: var(--ktb-primary);
  box-shadow: 0 0 0 3px rgba(15, 110, 106, 0.15);
}

.flow-node.is-bad {
  border-color: var(--ktb-danger);
}

.flow-node small {
  display: block;
  color: var(--ktb-muted);
  font-size: 11px;
}

#edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Knowledge */
.kb-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  min-height: 640px;
}

.tree-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tree-item button.nm {
  flex: 1;
  text-align: left;
  background: none;
  border: 0;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--ktb-ink);
}

.tree-item button.nm.is-on,
.tree-item button.nm:hover {
  background: var(--ktb-primary-soft);
  color: var(--ktb-primary);
}

.tree-item .ops {
  display: flex;
  gap: 2px;
}

.tree-item .ops button {
  border: 0;
  background: none;
  color: var(--ktb-muted);
  cursor: pointer;
  font-size: 12px;
}

.kb-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ktb-line);
  align-items: center;
}
.kb-row:last-child { border-bottom: 0; }
.kb-row > div:last-child { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--ktb-line);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
}

.chip.is-on {
  border-color: var(--ktb-primary);
  background: var(--ktb-primary-soft);
  color: var(--ktb-primary);
}

.page-form { max-width: 800px; }
.page-head { margin-bottom: 16px; }
.page-head h1 { font-size: 20px; color: var(--ktb-ink); margin: 0 0 6px; }
.page-card { padding: 24px; margin-top: 0; }
.pf-stack { display: flex; flex-direction: column; gap: 16px; }
.pf-sec {
  background: #fff;
  border: 1px solid var(--ktb-line-tint);
  border-radius: 20px;
  padding: 22px 24px 20px;
  box-shadow: var(--ktb-shadow);
}
.pf-sec h2 {
  font-size: 16px;
  font-weight: 650;
  color: var(--ktb-ink);
  margin: 0 0 4px;
  letter-spacing: 0;
}
.pf-lead {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--ktb-muted);
  line-height: 1.5;
}
.pf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 20px;
}
.pf-grid .ktb-field { margin-bottom: 12px; }
.pf-sec > .ktb-field:last-child,
.pf-sec > .pf-phone { margin-bottom: 0; }
.pf-phone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--ktb-bg);
  border-radius: 12px;
  font-size: 13px;
  color: var(--ktb-body);
}
.pf-phone strong { color: var(--ktb-ink); font-weight: 600; letter-spacing: .04em; }
.pf-phone .meta { margin: 0; }
.pf-foot {
  display: flex;
  justify-content: flex-end;
  padding: 4px 0 8px;
}
.page-form .avatar-edit {
  grid-template-columns: auto 1fr;
  align-items: center;
}
.page-form .avatar-edit-now { grid-column: 1; grid-row: 1; }
.page-form .avatar-edit-acts { grid-column: 2; grid-row: 1; }
.page-form .avatar-edit > .meta { display: none; }
.page-form .avatar-grid { grid-column: 1 / -1; }
.pf-grid:has(#ipWrap[hidden]) { grid-template-columns: 1fr; }
@media (max-width: 720px) {
  .pf-grid { grid-template-columns: 1fr; }
}
.pf-lab { font-size: 13px; color: var(--ktb-ink); }
.pick-block { margin-bottom: 10px; }
.pick-kicker { font-size: 12px; color: var(--ktb-muted); margin: 0 0 8px; }
.pick-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--ktb-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: var(--ktb-ink);
  user-select: none;
}
.pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pick:hover { border-color: #d4c4e0; }
.pick.is-on {
  border-color: var(--ktb-primary);
  background: var(--ktb-primary-soft);
  color: var(--ktb-primary);
  font-weight: 600;
}

.picker {
  width: min(720px, calc(100% - 32px));
}

.preview-paper {
  min-height: 480px;
  padding: 32px 40px 48px;
  background: var(--ktb-paper);
  position: relative;
}

.preview-paper h2 {
  font-size: 20px;
  color: var(--ktb-ink);
  margin: 12px 0;
}

.map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.map-grid a {
  display: block;
  padding: 16px;
  color: inherit;
}

.map-grid a h3 {
  color: var(--ktb-ink);
  margin-bottom: 6px;
}

@media (max-width: 1100px) {
  .agent-grid { grid-template-columns: 1fr 1fr; }
  .studio { grid-template-columns: 200px 1fr 260px; }
}

@media (max-width: 800px) {
  .agent-grid, .rec-row, .two-col, .kb-layout, .map-grid { grid-template-columns: 1fr; }
  .pc-nav { display: none; }
}

/* —— 工作台壳层覆盖：扣子布局 + tnistech 登录/浅紫底 —— */
body.pc { background: #f4f0fa; }

.pc-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.pc-side {
  background: #fff;
  border-right: 1px solid var(--ktb-line-tint);
  display: flex;
  flex-direction: column;
  padding: 8px 10px 10px;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  width: 220px;
}

.pc-space select {
  width: 100%;
  height: 36px;
  border: 1px solid var(--ktb-line);
  border-radius: 10px;
  padding: 0 10px;
  background: #faf8fd;
  color: var(--ktb-ink);
  font-size: 13px;
}

.pc-create {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0 8px;
  height: 36px;
  border-radius: 10px;
  background: var(--ktb-primary-soft);
  color: var(--ktb-primary);
  font-weight: 600;
  font-size: 14px;
}

.pc-create:hover { background: #ead6f3; color: var(--ktb-primary-hover); }

.pc-side-nav { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.pc-side-nav p { margin: 14px 8px 6px; font-size: 11px; color: var(--ktb-muted); letter-spacing: 0.08em; }
.pc-side-nav a { display: block; padding: 8px 10px; border-radius: 10px; color: var(--ktb-body); font-size: 14px; }
.pc-side-nav a:hover,
.pc-side-nav a.is-on { background: var(--ktb-primary-soft); color: var(--ktb-primary); font-weight: 500; }

.pc-side-foot { border-top: 1px solid var(--ktb-line); padding-top: 10px; font-size: 12px; }
.pc-side-foot > a { display: block; color: var(--ktb-muted); padding: 6px 8px; }
.pc-side-user { display: flex; align-items: center; gap: 8px; color: var(--ktb-ink) !important; }
.pc-side-user small { display: block; color: var(--ktb-muted); font-size: 11px; }

.pc-stage { padding: 16px 16px 48px; }
.pc-stage .pc-main { width: 100%; max-width: 1120px; margin: 0; }
.pc-stage .pc-main.agent-page { max-width: none; }
.pc-top { display: none !important; }

.plaza-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.plaza-spots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 16px;
}
.plaza-spot {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 75 / 28;
  background: #1a1a2e;
}
.plaza-spot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 1100px) {
  .plaza-spots { grid-template-columns: 1fr; }
}
.plaza-bar h1 { font-size: 22px; color: var(--ktb-ink); margin-right: auto; font-weight: 700; }
.plaza-search {
  width: min(360px, 42vw);
  height: 40px;
  border: 1px solid var(--ktb-line);
  border-radius: 999px;
  padding: 0 16px;
  background: #fff;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip-row .chip { height: 32px; padding: 0 12px; }

.agent-grid { grid-template-columns: repeat(3, 1fr); }
.agent-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--ktb-line-tint);
  border-radius: 16px;
  color: inherit;
  box-shadow: var(--ktb-shadow);
  min-height: 118px;
  overflow: visible;
}
.agent-card:hover { color: inherit; box-shadow: var(--ktb-shadow-md); }
.agent-card .thumb {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}
.agent-card .body { padding: 0; min-width: 0; }
.agent-card h3 {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.agent-card .desc {
  font-size: 12px;
  color: var(--ktb-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}
.agent-card .foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  gap: 8px;
}
.agent-card .try { color: var(--ktb-primary); font-size: 12px; font-weight: 600; white-space: nowrap; }

.flow-node.is-sel { box-shadow: 0 0 0 3px rgba(139, 45, 158, 0.18); }

.auth-page { margin: 0; min-height: 100vh; background: #f6f1fb; }
.auth-page .ktb-demo-bar { display: none; }
.auth {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 100vh;
}
.auth-left {
  background:
    radial-gradient(ellipse 70% 55% at 18% 8%, rgba(192, 132, 252, 0.45), transparent 55%),
    linear-gradient(165deg, #5b21b6 0%, #6b1f7a 42%, #3b0764 100%);
  color: rgba(255, 255, 255, 0.78);
  padding: 72px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-logo {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 8px 12px 8px 8px;
  width: fit-content;
  margin-bottom: 36px;
}
.auth-logo .ktb-lockup { height: 36px; }
.auth-kicker { font-size: 13px; letter-spacing: 0.14em; color: rgba(255,255,255,.55); margin-bottom: 12px; }
.auth-left h1 { font-size: 40px; line-height: 1.2; color: #fff; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 16px; }
.auth-lead { max-width: 26em; margin-bottom: 28px; }
.auth-points { list-style: none; padding: 0; margin: 0 0 32px; }
.auth-points li { position: relative; padding: 8px 0 8px 28px; }
.auth-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 12px;
  display: grid;
  place-items: center;
}
.auth-badge {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff;
  font-size: 13px;
  width: fit-content;
}
.auth-right {
  background: #f6f1fb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.auth-card {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 24px;
  padding: 32px 32px 24px;
  box-shadow: 0 20px 60px rgba(107, 31, 122, 0.1);
}
.auth-card-brand { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.auth-card-brand .ktb-lockup { height: 40px; }
.auth-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--ktb-line); margin-bottom: 18px; }
.auth-tabs button { background: none; border: 0; padding: 0 0 10px; color: var(--ktb-muted); cursor: pointer; font-size: 14px; }
.auth-tabs button.is-on { color: var(--ktb-primary); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ktb-primary); }
.auth-card h2 { font-size: 26px; color: var(--ktb-ink); margin-bottom: 8px; }
.auth-hint { font-size: 13px; color: var(--ktb-primary); margin-bottom: 16px; line-height: 1.55; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 12px; }
.auth-foot a { color: var(--ktb-muted); margin: 0 8px; }
.qr-big {
  border-radius: 16px;
  background: repeating-conic-gradient(#8b2d9e 0 25%, #f8f7fc 0 50%) 0 0 / 16px 16px;
}

@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .pc-body { grid-template-columns: 1fr; }
  .pc-side { display: none; }
  .pc-topnav { display: none; }
}

/* —— 侧栏对标扣子：图标 / 空间切换 / 底栏头像通知 —— */
/* —— 顶栏分角色 + 当前段侧栏 —— */
.pc-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.pc-head {
  height: 56px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 16px 0 12px;
  background: #fff;
  border-bottom: 1px solid var(--ktb-line-tint);
  position: sticky;
  top: 0;
  z-index: 40;
}
.pc-brand .ktb-lockup {
  height: 32px;
}
.pc-topnav { display: flex; gap: 4px; flex: 1; }
.pc-topnav a {
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--ktb-body);
  font-size: 14px;
}
.pc-topnav a:hover { background: #f4f0fa; color: var(--ktb-ink); }
.pc-topnav a.is-on { background: var(--ktb-primary-soft); color: var(--ktb-primary); font-weight: 600; }
.pc-head-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.pc-head .pc-space { position: relative; }
.pc-head .pc-space-btn {
  width: auto;
  height: 36px;
  padding: 0 10px 0 6px;
  background: #faf8fd;
}
.pc-head .pc-space-txt { flex: none; }
.pc-head .pc-space-txt b { display: inline; font-size: 13px; }
.pc-head .pc-space-pop {
  left: auto;
  right: 0;
  width: 320px;
  min-width: 320px;
  z-index: 60;
}
.pc-head-pts {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #faf8fd;
  color: var(--ktb-ink);
  font-size: 13px;
}
.pc-head-pts .nav-ico { width: 16px; height: 16px; }
.pc-user { position: relative; }
.pc-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px 0 4px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #faf8fd;
  cursor: pointer;
  color: var(--ktb-ink);
  max-width: 200px;
}
.pc-user-btn:hover { border-color: var(--ktb-line); }
.pc-user-btn .avatar { width: 32px; height: 32px; font-size: 13px; flex: none; }
.pc-user-meta { min-width: 0; text-align: left; }
.pc-user-meta b, .pc-user-meta small { display: block; line-height: 1.2; }
.pc-user-meta b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-user-meta small { font-size: 11px; color: var(--ktb-muted); }
.pc-user-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(20, 12, 40, .16);
  padding: 8px;
  z-index: 50;
}
.pc-user-pop a, .pc-user-out {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--ktb-ink);
  font: inherit;
}
.pc-user-pop a:hover { background: var(--ktb-primary-soft); }
.pc-user-pop a small { display: block; color: var(--ktb-muted); font-size: 12px; margin-top: 2px; }
.pc-user-out { color: #e11d48; }
.pc-user-out:hover { background: #fff1f2; }
.pc-head-user .avatar { width: 32px; height: 32px; font-size: 13px; }
.pc-pager {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--ktb-muted);
}
.pc-pager button {
  min-width: 72px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--ktb-line);
  border-radius: 8px;
  background: #fff;
  color: var(--ktb-ink);
  cursor: pointer;
}
.pc-pager button:disabled {
  opacity: 1;
  color: var(--ktb-muted);
  background: #f4f0f7;
  border-color: var(--ktb-line-tint);
  cursor: not-allowed;
}
.pc-pager b { min-width: 48px; text-align: center; color: var(--ktb-ink); font-weight: 600; }
.pc-pager--bar {
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--ktb-line-tint);
  background: #fff;
}
.ledger tbody tr:last-child td { border-bottom: 0; }
.pc-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  flex: 1;
  min-height: 0;
  transition: grid-template-columns .18s ease;
}
.pc-side {
  top: 56px;
  height: calc(100vh - 56px);
  position: sticky;
  overflow: visible;
}
.pc-side-head {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  margin-bottom: 4px;
}
.pc-side-kicker {
  margin: 4px 8px 12px;
  font-size: 12px;
  color: var(--ktb-muted);
  letter-spacing: 0.06em;
}
.pc-side-head .pc-side-kicker { flex: 1; margin: 0 4px; }
.pc-side-edge, .pc-side-fold {
  border: 0;
  background: none;
  color: var(--ktb-muted);
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.pc-side-edge {
  width: 32px;
  height: 32px;
  flex: none;
  margin-right: 2px;
}
.pc-side-edge:hover, .pc-side-fold:hover { background: var(--ktb-primary-soft); color: var(--ktb-primary); }
.pc-side-fold {
  width: 100%;
  height: 40px;
  margin-top: auto;
  justify-content: flex-start;
  padding: 0 10px;
  border-top: 1px solid var(--ktb-line-tint);
  border-radius: 0;
}
.pc-side-hint { padding: 8px 10px; font-size: 12px; color: var(--ktb-muted); line-height: 1.5; }
.side-collapsed .pc-body { grid-template-columns: 64px 1fr; }
.side-collapsed .pc-side { width: 64px; padding: 8px 6px 8px; }
.side-collapsed .pc-side-kicker,
.side-collapsed .pc-side-fold-txt,
.side-collapsed .pc-nav-a span,
.side-collapsed .pc-create span,
.side-collapsed .pc-side-hint { display: none; }
.side-collapsed .pc-side-head { justify-content: center; }
.side-collapsed .pc-nav-a { justify-content: center; padding: 10px 0; }
.side-collapsed .pc-side-fold { justify-content: center; padding: 0; }
.side-collapsed .pc-side-fold-ico svg { transform: rotate(180deg); }
.side-collapsed .pc-side-edge {
  margin: 0 auto;
}
.pc-side {
  padding: 8px 8px 10px 6px;
}
.pc-work {
  min-width: 0;
  padding-left: 0;
}
.pc-body { column-gap: 16px; }
.has-pc-head .studio--flow,
.has-pc-head .as-app { height: calc(100vh - 56px); }
.has-pc-head .pc-head { top: 0; }
.ledger { width: 100%; border-collapse: collapse; font-size: 13px; }
.ledger th, .ledger td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--ktb-line-tint); }
.ledger th { color: var(--ktb-muted); font-weight: 500; background: #faf8fd; }
.pc-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ktb-ink);
  margin: 0 4px 14px;
  font-size: 16px;
}
.pc-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ktb-primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
}
.pc-space { position: relative; }
.pc-space-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--ktb-line);
  border-radius: 12px;
  background: #faf8fd;
  cursor: pointer;
  text-align: left;
  color: var(--ktb-ink);
}
.pc-space-btn:hover { border-color: var(--ktb-primary); }
.pc-space-av {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ktb-primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}
.pc-space-txt { flex: 1; min-width: 0; }
.pc-space-txt b { display: block; font-size: 13px; }
.pc-space-opt-txt {
  flex: 1;
  min-width: 0;
}
.pc-space-opt-txt b,
.pc-space-opt-txt small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-space-opt-txt b { font-size: 13px; font-weight: 600; color: var(--ktb-ink); }
.pc-space-opt-txt small { color: var(--ktb-muted); font-size: 12px; margin-top: 2px; }
.pc-space-pop, .pc-create-pop {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(20, 12, 40, .16);
  padding: 10px;
  z-index: 30;
}
.pc-space-pop p { font-size: 11px; color: var(--ktb-muted); margin: 10px 4px 6px; }
.pc-space-opt {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 0;
  background: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}
.pc-space-opt em { width: 16px; color: var(--ktb-primary); font-style: normal; }
.pc-space-opt.is-on, .pc-space-opt:hover { background: var(--ktb-primary-soft); }
.pc-create-wrap { position: relative; }
.pc-create { width: 100%; border: 0; cursor: pointer; }
.pc-create-pop a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ktb-ink); }
.pc-create-pop a:hover { background: var(--ktb-primary-soft); color: var(--ktb-primary); }
.pc-nav-a {
  display: flex !important;
  align-items: center;
  gap: 10px;
}
.nav-ico { width: 18px; height: 18px; flex: none; }
.pc-points {
  display: block;
  padding: 10px 12px !important;
  border-radius: 12px;
  background: #faf8fd;
  color: var(--ktb-ink) !important;
  margin-bottom: 8px;
}
.pc-points small { display: block; color: var(--ktb-muted); margin-top: 2px; }
.pc-me-row { display: flex; align-items: center; gap: 4px; }
.pc-me-row .pc-side-user { flex: 1; min-width: 0; }
.pc-bell {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--ktb-body);
}
.pc-bell:hover { background: var(--ktb-primary-soft); color: var(--ktb-primary); }
.pc-bell i {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 99px;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  line-height: 14px;
  text-align: center;
}

.mine-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.mine-card {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 14px;
  align-items: center;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(139, 45, 158, .06);
}
.mine-cover {
  width: 88px;
  height: 64px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #8b2d9e, #5b1f7a);
}
.mine-cover.wf { background: linear-gradient(135deg, #4f46e5, #8b2d9e); }
.mine-cover.phy { background: linear-gradient(135deg, #1d4ed8, #6366f1); }
.mine-acts { display: flex; align-items: center; gap: 6px; }
.icon-more {
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
}
.icon-more:hover { background: #f3eef8; }
.st { font-size: 11px; padding: 2px 8px; border-radius: 99px; font-weight: 600; }
.st--ok { background: #ecfdf5; color: #047857; }
.st--bad { background: #fef2f2; color: #b91c1c; }
.st--draft { background: #f4f0fa; color: #6b5a78; }
.st--warn { background: #fff7ed; color: #c2410c; }
.more-menu {
  position: fixed;
  z-index: 80;
  min-width: 180px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(20,12,40,.18);
  padding: 6px;
}
.more-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.more-menu button:hover { background: #f4f0fa; }
.more-menu .is-danger { color: #dc2626; }
.bar-row { display: flex; align-items: flex-end; gap: 16px; height: 110px; margin-top: 16px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar-col i { width: 18px; background: var(--ktb-primary); border-radius: 6px 6px 0 0; display: block; }
.bar-col b { font-size: 12px; }
.bar-col small { color: var(--ktb-muted); font-size: 11px; }

/* 浅色全屏工作流设计器 */
html:has(.studio--flow) {
  height: 100%;
  overflow: hidden;
}
body.pc.has-pc-head:has(.studio--flow) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100vh;
}
body.pc.has-pc-head:has(.studio--flow) .studio--flow {
  flex: 1;
  height: auto;
  min-height: 0;
}
.studio--flow {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
  background: #f4f0fa;
  overflow: hidden;
  min-height: 0;
}
.studio--flow .flow-top {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--ktb-line);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  flex: none;
  flex-wrap: nowrap;
  min-width: 0;
}
.flow-back {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ktb-ink);
  font-size: 20px;
}
.flow-back:hover { background: #f4f0fa; }
.flow-top-id,
.as-top-id {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.studio--flow .flow-top strong,
.as-top strong {
  color: var(--ktb-ink);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.flow-top-id .meta,
.as-top-id .meta { white-space: nowrap; flex: none; }
.dot-ok { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex: none; }
.flow-top-acts,
.as-top-acts {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  flex-wrap: nowrap;
}
.flow-top-acts .ktb-btn,
.as-top-acts .ktb-btn {
  white-space: nowrap;
  flex: none;
  width: auto;
  min-width: max-content;
  flex-shrink: 0;
}
.studio.studio--flow a.flow-back {
  width: 32px;
  max-width: 32px;
  flex: none;
}
.studio--flow .flow-stage .flow-node { z-index: 2; }
.studio--flow #edges { z-index: 1; }
.flow-body {
  flex: 1;
  position: relative;
  min-height: 0;
  overflow: hidden;
}
.studio--flow .canvas {
  position: absolute;
  inset: 0;
  overflow: auto;
  background-image: radial-gradient(#d9d3e6 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  background-color: #f7f4fb;
}
.studio--flow:has(.cfg.is-open) .canvas,
.studio--flow:has(.cfg.is-collapsed) .canvas {
  scrollbar-width: none;
}
.studio--flow:has(.cfg.is-open) .canvas::-webkit-scrollbar,
.studio--flow:has(.cfg.is-collapsed) .canvas::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.flow-stage {
  position: relative;
  width: 2200px;
  height: 1200px;
  transform-origin: 0 0;
}
.studio--flow .canvas { cursor: grab; }
.studio--flow .canvas.is-panning,
.studio--flow .canvas.is-panning * { cursor: grabbing !important; }
.flow-name {
  min-width: 0;
  max-width: 320px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ktb-ink);
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flow-name:hover,
.flow-name:focus {
  border-color: var(--ktb-line);
  background: #fff;
  outline: none;
}
.studio--flow .cfg {
  position: absolute;
  top: 10px;
  right: 10px;
  bottom: 10px;
  width: 360px;
  background: #fff;
  color: var(--ktb-ink);
  border: 1px solid var(--ktb-line);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(20, 12, 40, .14);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 5;
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
  transition: transform .2s ease, opacity .2s ease;
}
.studio--flow .cfg.is-open,
.studio--flow .cfg.is-collapsed {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
.studio--flow .cfg.is-collapsed {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
}
.studio--flow .cfg.is-collapsed .cfg-head-copy,
.studio--flow .cfg.is-collapsed .cfg-close,
.studio--flow .cfg.is-collapsed .cfg-body { display: none; }
.studio--flow .cfg.is-collapsed .cfg-head { justify-content: center; padding: 12px 0; border: 0; height: 100%; align-items: center; }
.studio--flow .cfg.is-collapsed .cfg-fold-ico { transform: rotate(180deg); }
.cfg-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 10px 10px 8px;
  border-bottom: 1px solid var(--ktb-line-tint);
  flex: none;
}
.cfg-head-copy { flex: 1; min-width: 0; }
.cfg-head-copy strong { display: block; font-size: 15px; line-height: 1.4; }
.cfg-head-copy .meta { display: block; margin-top: 2px; line-height: 1.45; }
.cfg-ico-btn {
  width: 28px;
  height: 28px;
  flex: none;
  border: 0;
  background: none;
  border-radius: 8px;
  color: var(--ktb-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.cfg-ico-btn:hover { background: #f4f0fa; color: var(--ktb-ink); }
.cfg-fold-ico { display: block; }
.cfg-body {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 16px 20px;
  scrollbar-gutter: auto;
}
.cfg-sec { border: 1px solid var(--ktb-line-tint); border-radius: 12px; padding: 0 12px 10px; margin-bottom: 10px; background: #faf8fd; }
.cfg-sec summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 10px 0; list-style: none; }
.cfg-sec summary::-webkit-details-marker { display: none; }
.cfg-sec summary::before { content: "▾ "; color: var(--ktb-muted); }
.cfg-sec:not([open]) summary::before { content: "▸ "; }
.cfg-debug { white-space: pre-wrap; padding: 8px 0; }
.cfg-rej { color: var(--ktb-danger); }
.studio--flow .cfg h4 { color: var(--ktb-muted); margin: 16px 0 8px; }
.studio--flow .check { color: var(--ktb-body); display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.studio--flow .flow-node {
  position: absolute;
  width: 280px;
  min-height: 88px;
  border-radius: 16px;
  padding: 14px 18px 14px 16px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  box-shadow: 0 10px 28px rgba(40, 20, 70, .08);
}
.studio--flow .flow-node.is-sel {
  border-color: #6d5efc;
  box-shadow: 0 0 0 3px rgba(91, 108, 255, .18);
}
.flow-copy { padding: 2px 4px 2px 2px; min-width: 0; }
.flow-copy small { color: var(--ktb-muted); display: block; }
.flow-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #8b2d9e;
  display: grid;
  place-items: center;
  flex: none;
}
.flow-ico[data-t="开始"], .np-ico[data-t="开始"] { background: #6366f1; }
.flow-ico[data-t="结束"], .np-ico[data-t="输出"], .flow-ico[data-t="输出"] { background: #0f172a; }
.flow-ico[data-t="大模型"], .np-ico[data-t="大模型"] { background: #111827; }
.flow-ico[data-t="知识库检索"], .np-ico[data-t="知识库检索"] { background: #7c3aed; }
.flow-ico[data-t="调用工作流"], .np-ico[data-t="调用工作流"] { background: #2563eb; }
.flow-ico[data-t="意图识别"], .np-ico[data-t="意图识别"] { background: #8b2d9e; }
.flow-ico[data-t="H5 实验室"], .np-ico[data-t="H5 实验室"] { background: #0f766e; }
.flow-ico[data-t="PPT 导出"], .np-ico[data-t="PPT 导出"] { background: #c2410c; }
.flow-ico[data-t="选择器"], .np-ico[data-t="选择器"] { background: #0d9488; }
.flow-ico[data-t="循环"], .np-ico[data-t="循环"] { background: #0891b2; }
.flow-ico[data-t="文本处理"], .np-ico[data-t="文本处理"] { background: #4f46e5; }
.flow-ico[data-t="批处理"], .np-ico[data-t="批处理"] { background: #64748b; }
.flow-ico[data-t="变量聚合"], .np-ico[data-t="变量聚合"] { background: #57534e; }
.flow-ico[data-t="HTTP 请求"], .np-ico[data-t="HTTP 请求"] { background: #1d4ed8; }
.flow-ico[data-t="试卷导出"], .np-ico[data-t="试卷导出"] { background: #b45309; }
.flow-ico[data-t="教案导出"], .np-ico[data-t="教案导出"] { background: #a16207; }
.flow-ico[data-t="报告导出"], .np-ico[data-t="报告导出"] { background: #92400e; }
.flow-ico[data-t="学段课标"], .np-ico[data-t="学段课标"] { background: #6d28d9; }
.flow-ico[data-t="适用范围"], .np-ico[data-t="适用范围"] { background: #7c3aed; }
.flow-ico[data-t="视频成片"], .np-ico[data-t="视频成片"] { background: #db2777; }
.np-ico[data-t="代码"], .np-ico[data-t="插件"], .np-ico[data-t="数据库"], .np-ico[data-t="会话节点"] { background: #9ca3af; }
.port {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #5b6cff;
  top: 38px;
}
.port-in { left: -6px; }
.port-out { right: -6px; left: auto; }
.flow-dock {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  padding: 8px 10px;
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(20,12,40,.14);
  z-index: 6;
}
.flow-dock .zoom {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  color: var(--ktb-ink);
  padding: 0 4px 0 0;
  border-right: 1px solid var(--ktb-line);
  margin-right: 4px;
}
.zoom-btn,
.zoom-fit {
  height: 28px;
  min-width: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ktb-ink);
  cursor: pointer;
  font-size: 14px;
}
.zoom-btn:hover,
.zoom-fit:hover { background: #f4f0fa; }
.zoom-pct {
  min-width: 44px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 12px;
}
.zoom-fit { font-size: 12px; }
.dock-more { position: relative; display: flex; align-items: center; gap: 8px; }
.dock-pop {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  min-width: 140px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20,12,40,.16);
  padding: 6px;
  z-index: 9;
}
.dock-pop button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ktb-ink);
}
.dock-pop button:hover { background: #f4f0fa; }
.flow-dock .ktb-btn.is-on {
  background: var(--ktb-primary-soft);
  color: var(--ktb-primary);
  border-color: transparent;
}
.flow-mini-dock {
  position: absolute;
  left: 20px;
  bottom: 24px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.flow-mini-chip {
  width: 40px;
  height: 40px;
  border: 1px solid var(--ktb-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20,12,40,.1);
  color: var(--ktb-primary);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.flow-mini-chip:hover { background: var(--ktb-primary-soft); }
.flow-mini-chip[hidden],
.flow-mini[hidden] { display: none !important; }
.flow-mini {
  position: relative;
  left: auto;
  bottom: auto;
  width: 180px;
  background: #fff;
  border: 1px solid var(--ktb-line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(20,12,40,.1);
  overflow: hidden;
  cursor: pointer;
}
.flow-mini-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 4px 10px;
  font-size: 12px;
  color: var(--ktb-muted);
  background: #faf8fd;
  border-bottom: 1px solid var(--ktb-line-tint);
}
.flow-mini-bar button {
  width: 24px;
  height: 24px;
  border: 0;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ktb-ink);
}
.flow-mini-bar button:hover { background: #eee8f6; }
.flow-mini canvas { display: block; width: 100%; height: 110px; }
.flow-debug {
  flex: none;
  height: 188px;
  background: #fff;
  border-top: 1px solid var(--ktb-line);
  z-index: 6;
  display: flex;
  flex-direction: column;
}
.flow-debug[hidden] { display: none !important; }
.dbg-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--ktb-line-tint);
}
.dbg-head strong { font-size: 13px; color: var(--ktb-ink); }
.dbg-head .meta { flex: 1; }
.dbg-body { flex: 1; overflow: auto; padding: 12px 16px; }
.dbg-empty {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--ktb-muted);
  font-size: 13px;
  gap: 8px;
  min-height: 120px;
}
.dbg-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dbg-log li {
  display: grid;
  grid-template-columns: 108px 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--ktb-line-tint);
  border-radius: 12px;
  background: #faf8fd;
  font-size: 13px;
}
.dbg-log b { color: var(--ktb-ink); }
.dbg-log small { color: var(--ktb-muted); }
.studio--flow.is-debug .flow-dock { bottom: 208px; }
.studio--flow.is-debug .node-palette { bottom: 292px; }
.node-palette {
  position: absolute;
  left: 50%;
  bottom: 108px;
  transform: translateX(-50%);
  width: 440px;
  max-height: min(72vh, 560px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(20,12,40,.16);
  padding: 12px 12px 10px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.node-palette .ktb-input { min-height: 36px; }
.np-list { overflow: auto; flex: 1; min-height: 0; padding-right: 4px; }
.np-g { font-size: 12px; color: var(--ktb-muted); margin: 10px 6px 6px; }
.np-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.np-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ktb-ink);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.np-item:hover { background: #f4f0fa; }
.np-item.is-off { opacity: .42; cursor: not-allowed; }
.np-item.is-off:hover { background: none; }
.np-ico {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex: none;
  background: #8b2d9e;
  display: grid;
  place-items: center;
}
.np-ico svg { width: 12px; height: 12px; }
.np-item em {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  color: var(--ktb-muted);
  flex: none;
}
.node-palette[hidden] { display: none !important; }
.studio--flow .node-item {
  color: var(--ktb-ink);
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  cursor: pointer;
}
.studio--flow .node-item:hover { background: #f4f0fa; }
.studio--flow { position: relative; }

/* 智能体编排（对标扣子 Bot） */
.as-app {
  height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  background: #f4f2f8;
}
.as-top {
  height: 52px;
  background: #fff;
  border-bottom: 1px solid var(--ktb-line);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  flex-wrap: nowrap;
  min-width: 0;
}
.as-mode {
  font-size: 12px;
  color: var(--ktb-muted);
  background: #f4f0fa;
  padding: 2px 8px;
  border-radius: 99px;
  white-space: nowrap;
  flex: none;
}
.as-cols {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 280px minmax(340px, 1fr) 400px;
}
.as-left { background: #fff; overflow: auto; padding: 18px 16px 32px; }
.as-right { background: #fff; overflow: hidden; padding: 18px 16px 16px; border-left: 1px solid var(--ktb-line-tint); display: flex; flex-direction: column; min-height: 0; }
.as-right-tools { display: flex; align-items: center; gap: 4px; }
.as-preview { flex: 1; overflow: auto; padding: 8px 4px 12px; }
.chat-composer { position: relative; z-index: 2; padding: 4px 0 0; }
.chat-pill {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid var(--ktb-line);
  background: #fff;
  border-radius: 24px;
  padding: 8px 10px 8px 14px;
  min-height: 48px;
}
.chat-pill-row { display: flex; align-items: flex-end; gap: 4px; }
.chat-pill:focus-within { border-color: #c4b4d4; box-shadow: 0 0 0 3px rgba(139,45,158,.08); }
.chat-attach {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin: 2px 0 6px;
  font-size: 12px;
  color: var(--ktb-ink);
  background: #f3f0f8;
  border-radius: 8px;
  padding: 4px 8px;
}
.chat-attach button { border: 0; background: none; cursor: pointer; color: var(--ktb-muted); }
.chat-field {
  flex: 1;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  min-height: 24px;
  max-height: 120px;
  padding: 6px 0;
  color: var(--ktb-ink);
}
.chat-field::placeholder { color: #b0a4bc; }
.chat-pill-acts { display: flex; align-items: center; gap: 2px; flex-shrink: 0; padding-bottom: 2px; }
.chat-plus { position: relative; }
.chat-tip {
  position: fixed;
  z-index: 80;
  width: 232px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #2c2c34;
  color: #fff;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 400;
  box-shadow: 0 8px 24px rgba(20, 16, 32, .22);
  pointer-events: auto;
}
.chat-tip::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: #2c2c34;
  transform: rotate(45deg);
}
.chat-tip button {
  border: 0;
  padding: 0;
  background: none;
  color: #a78bfa;
  cursor: pointer;
  font: inherit;
}
.chat-tip button:hover { text-decoration: underline; }
.chat-pill-div { width: 1px; height: 14px; background: var(--ktb-line); margin: 0 4px; }
.chat-ico {
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  border-radius: 50%;
  color: #8a7a98;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.chat-ico:hover { background: #f3f0f8; color: var(--ktb-ink); }
.chat-ico.is-on { color: var(--ktb-primary); background: var(--ktb-primary-soft); }
.chat-ico:disabled { opacity: .4; cursor: not-allowed; }
.as-mid { overflow: auto; padding: 18px 28px 48px; }
.as-left h2, .as-mid-h h2, .as-right-h h2 { font-size: 16px; color: var(--ktb-ink); margin: 0 0 12px; }
.as-mid-h, .as-right-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.as-persona {
  width: 100%;
  min-height: 220px;
  border: 1px solid var(--ktb-line);
  border-radius: 12px;
  padding: 12px;
  resize: vertical;
  font: inherit;
}
.as-count { text-align: right; color: var(--ktb-muted); font-size: 12px; margin: 4px 0 12px; }
.as-tabs { display: flex; gap: 16px; margin-bottom: 10px; }
.as-tabs button { border: 0; background: none; padding: 0 0 6px; color: var(--ktb-muted); cursor: pointer; }
.as-tabs button.is-on { color: var(--ktb-primary); box-shadow: inset 0 -2px 0 var(--ktb-primary); font-weight: 600; }
.as-tpl {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--ktb-line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
}
.as-tpl strong { display: block; font-size: 13px; }
.as-tpl span { font-size: 12px; color: var(--ktb-muted); }
.as-tpl.is-on, .as-tpl:hover { border-color: var(--ktb-primary); background: var(--ktb-primary-soft); }
.as-sec { background: #fff; border-radius: 16px; padding: 4px 16px 12px; margin-bottom: 12px; }
.as-sec summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none; }
.as-sec summary::-webkit-details-marker { display: none; }
.as-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.as-fold { border: 0; background: none; color: var(--ktb-muted); }
.as-model { width: auto; min-width: 160px; }
.as-pill {
  margin-left: auto;
  border: 1px solid #f0abfc;
  color: var(--ktb-primary);
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.as-subh { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--ktb-muted); margin: 10px 0 8px; }
.as-add, .as-add-line { border: 0; background: none; color: var(--ktb-primary); cursor: pointer; }
.as-add-line { display: block; margin: 8px 0; }
.as-card {
  background: #faf8fd;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.as-card strong { display: block; }
.as-card span { font-size: 12px; color: var(--ktb-muted); }
.as-card-acts { display: flex; gap: 12px; align-items: center; margin-top: 8px; font-size: 12px; }
.as-card-acts button { border: 0; background: none; color: var(--ktb-danger); cursor: pointer; }
.as-kb {
  display: flex;
  align-items: center;
  gap: 12px;
}
.as-kb > div { flex: 1; min-width: 0; }
.as-icon-btn {
  width: 32px;
  height: 32px;
  flex: none;
  border: 0;
  background: none;
  border-radius: 8px;
  color: #9a8aa8;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.as-icon-btn:hover { background: #fde8e8; color: var(--ktb-danger); }
.as-right-meta { font-weight: 400; font-size: 12px; color: var(--ktb-muted); }
.as-disabled { background: #f6f6f8; border-radius: 10px; padding: 10px; color: var(--ktb-muted); font-size: 12px; }
.as-q {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.as-q-handle {
  color: #c4b8d0;
  cursor: grab;
  flex: none;
  letter-spacing: -2px;
  user-select: none;
}
.as-q .ktb-input { width: auto; flex: 1; min-width: 0; }
.as-q .ktb-select { width: auto; max-width: 148px; flex: 0 0 148px; }
.as-intent { margin-top: 8px; }
.as-route-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 8px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid var(--ktb-line);
  font-size: 13px;
}
.as-route-row strong { font-size: 13px; }
.as-route-row span { color: var(--ktb-muted); font-size: 12px; }
.as-route-row em { font-style: normal; color: var(--ktb-primary); white-space: nowrap; }
.as-hero { text-align: center; padding: 24px 0 8px; }
.as-av {
  width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 8px;
  background: linear-gradient(135deg, #8b2d9e, #5b1f7a); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
.as-bubble {
  background: #f3f0f8;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 8px 0;
  font-size: 14px;
  white-space: pre-wrap;
}
.as-bubble--me { background: var(--ktb-primary-soft); margin-left: 24px; }
.as-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.as-chip {
  border: 1px solid var(--ktb-line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
}
.as-chip:hover { border-color: var(--ktb-primary); color: var(--ktb-primary); }
.as-modal {
  position: fixed; inset: 0; background: rgba(20,12,40,.35);
  display: grid; place-items: center; z-index: 90;
}
.as-modal[hidden] { display: none; }
.as-pick {
  display: block; width: 100%; text-align: left; border: 0; background: #faf8fd;
  padding: 10px 12px; border-radius: 10px; margin-bottom: 6px; cursor: pointer;
}
.as-pick small { display: block; color: var(--ktb-muted); }
.run-chat { max-width: 720px; margin: 0 auto; padding: 12px 16px 32px; }
.run-chat-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.run-chat-h h1 { font-size: 20px; color: var(--ktb-ink); }
.run-chat-body { min-height: 420px; }

@media (max-width: 1100px) {
  .as-cols { grid-template-columns: 1fr; }
  .as-right { min-height: 420px; }
}

.qr-redeem .qr-mp-wrap, .qr-wecom {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin: 12px 0 4px;
}
.qr-mp, .qr-wecom-code {
  width: 148px;
  height: 148px;
  border: 1px solid var(--ktb-line);
  border-radius: 12px;
  background: repeating-conic-gradient(#8b2d9e 0 25%, #f8f7fc 0 50%) 0 0 / 14px 14px;
}
.qr-mp-name { font-size: 16px; color: var(--ktb-ink); }
.qr-mp--lg { width: 180px; height: 180px; margin: 12px auto; }
.redeem-qr-card { padding: 24px 20px; text-align: center; }
.redeem-pts { font-size: 36px; font-weight: 700; color: var(--ktb-ink); margin: 0 0 12px; }
.redeem-steps {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}
.redeem-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 2px 10px;
  align-items: start;
}
.redeem-steps i {
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ktb-primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 700;
  font-size: 13px;
}
.redeem-steps b { color: var(--ktb-ink); font-size: 14px; }
.redeem-steps small { color: var(--ktb-muted); }
.redeem-rules { margin: 8px 0 0; padding-left: 18px; color: var(--ktb-body); line-height: 1.7; }
.redeem-gifts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.redeem-gift {
  border: 1px solid var(--ktb-line-tint);
  border-radius: 12px;
  padding: 12px;
  background: #faf8fd;
}
.redeem-gift h3 { font-size: 14px; color: var(--ktb-ink); margin: 6px 0; }
.redeem-faq details { border-top: 1px solid var(--ktb-line-tint); padding: 10px 0; }
.redeem-faq summary { cursor: pointer; color: var(--ktb-ink); font-weight: 600; }
.redeem-faq p { margin: 8px 0 0; color: var(--ktb-body); }
@media (max-width: 1100px) {
  .redeem-gifts { grid-template-columns: 1fr 1fr; }
}
.grow-board { padding: 22px 24px 20px; margin-bottom: 16px; }
.me-shortcuts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 14px 20px;
  margin-bottom: 16px;
}
.me-shortcuts h3 { margin: 0; font-size: 14px; color: var(--ktb-ink); }
.me-shortcuts p { margin: 0; }
.grow-now { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.grow-now-main { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.grow-now-copy { flex: 1; min-width: 0; }
.grow-now-trail {
  flex: none;
  margin-left: auto;
  padding-top: 4px;
}
.grow-now-trail a { font-size: 13px; color: var(--ktb-muted); white-space: nowrap; }
.grow-now-trail a:hover { color: var(--ktb-danger); }
.grow-now--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}
.grow-now-side {
  border-left: 1px solid var(--ktb-line-tint);
  padding-left: 24px;
}
.grow-now-side h3 { margin: 0 0 6px; font-size: 16px; }
.support-list { margin: 10px 0 0; padding-left: 18px; color: var(--ktb-body); line-height: 1.7; }
.support-qr-card { padding: 24px; text-align: center; }
.support-hours { display: block; font-size: 18px; color: var(--ktb-ink); margin: 4px 0 12px; }
.grow-now h1 { font-size: 22px; color: var(--ktb-ink); margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.grow-next { margin: 8px 0; color: var(--ktb-ink); }
.grow-bar { height: 10px; background: var(--ktb-line); border-radius: 99px; overflow: hidden; }
.grow-bar i { display: block; height: 100%; background: linear-gradient(90deg, #c084fc, var(--ktb-primary)); }
.grow-board h3 { margin: 18px 0 10px; font-size: 15px; color: var(--ktb-ink); }
.grow-path {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.grow-path li {
  position: relative;
  background: #faf8fd;
  border: 1px solid var(--ktb-line-tint);
  border-radius: 12px;
  padding: 12px 10px 10px;
  text-align: center;
}
.grow-path li i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0 auto 6px;
  border-radius: 50%;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  background: #e8e0f2;
  color: var(--ktb-muted);
}
.grow-path li b { display: block; font-size: 13px; color: var(--ktb-ink); }
.grow-path li small { display: block; margin-top: 4px; color: var(--ktb-muted); font-size: 11px; }
.grow-path li.is-done { border-color: #c4b5e0; background: #f3eafb; }
.grow-path li.is-done i { background: var(--ktb-primary); color: #fff; }
.grow-path li.is-now { border-color: var(--ktb-primary); background: var(--ktb-primary-soft); box-shadow: 0 0 0 2px rgba(139,45,158,.12); }
.grow-path li.is-now i { background: var(--ktb-primary); color: #fff; }
.grow-path li.is-lock { opacity: .72; }
.grow-path--ip { grid-template-columns: repeat(4, 1fr); }
.grow-acts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grow-acts li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  background: #faf8fd;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}
.grow-acts small { color: var(--ktb-muted); }
.grow-acts a { color: var(--ktb-primary); }
.grow-do {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: var(--ktb-primary-soft);
  border-radius: 12px;
  font-size: 13px;
  color: var(--ktb-ink);
}
.grow-do a { font-weight: 600; }
.skill-q {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  border: 1px solid var(--ktb-primary);
  border-radius: 50%;
  background: #fff;
  color: var(--ktb-primary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  vertical-align: middle;
}
.skill-tip {
  margin: 6px 0 0;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--ktb-line-tint);
  border-radius: 10px;
  font-size: 12px;
  color: var(--ktb-body);
  max-width: 420px;
}
.grow-medals { gap: 8px 14px; }
.ktb-medal { width: 56px; }
.ktb-medal__stamp { width: 36px; height: 36px; }
.grow-ip { margin-top: 8px; }
.auth-mode { display: flex; gap: 8px; margin: 0 0 14px; }
.auth-mode button {
  flex: 1;
  height: 36px;
  border: 1px solid var(--ktb-line);
  border-radius: 10px;
  background: #fff;
  color: var(--ktb-muted);
  cursor: pointer;
}
.auth-mode button.is-on { border-color: var(--ktb-primary); color: var(--ktb-primary); background: var(--ktb-primary-soft); font-weight: 600; }
.auth-card [hidden] { display: none !important; }
.auth-sms { display: flex; gap: 8px; }
.auth-sms .ktb-input { flex: 1; }
.auth-sms button { flex: none; white-space: nowrap; }
.pwd-wrap { position: relative; }
.pwd-wrap .ktb-input { padding-right: 52px; width: 100%; }
.pwd-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: var(--ktb-muted);
  cursor: pointer;
  font-size: 13px;
  height: 32px;
  padding: 0 4px;
}

@media (max-width: 1100px) {
  .grow-path, .grow-path--ip, .grow-acts { grid-template-columns: 1fr 1fr; }
  .grow-now--split { grid-template-columns: 1fr; }
  .grow-now-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--ktb-line-tint); padding-top: 16px; }
  .grow-now-trail { margin-left: 0; }
}



