/* Portal · 复用 /ow 主题，只补门户布局 */
body.portal {
  min-height: 100vh;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  letter-spacing: 0;
}
body.portal .ow-console { min-height: 100vh; }

.portal-login-hint {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--ow-text-faint);
}

.portal-topbar {
  flex-wrap: nowrap;
  min-height: 68px;
  gap: 14px;
}
.portal-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 14px;
}
.portal-nav__item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  border: 1px solid rgba(112, 142, 128, 0.2);
  background: rgba(8, 18, 14, 0.62);
  color: var(--ow-text-dim);
  border-radius: 13px;
  padding: 7px 12px;
  font-size: 14px;
  letter-spacing: 0;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.portal-nav__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  color: #8da69a;
}
.portal-nav__icon svg {
  width: 18px;
  height: 18px;
}
.portal-nav__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.14;
  white-space: nowrap;
}
.portal-nav__copy strong {
  color: #dcebe4;
  font-size: 14px;
  font-weight: 760;
}
.portal-nav__copy small {
  margin-top: 3px;
  color: #71887e;
  font-size: 10px;
}
.portal-nav__item--knowledge {
  border-color: rgba(30, 227, 138, 0.46);
  background: linear-gradient(135deg, rgba(30, 227, 138, 0.14), rgba(0, 184, 148, 0.055));
  box-shadow: inset 0 0 0 1px rgba(30, 227, 138, 0.05), 0 0 18px rgba(30, 227, 138, 0.06);
}
.portal-nav__item--knowledge .portal-nav__icon {
  color: var(--ow-green-bright);
  background: rgba(30, 227, 138, 0.13);
}
.portal-nav__hint {
  align-self: flex-start;
  margin: 1px -3px 0 2px;
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(30, 227, 138, 0.16);
  color: var(--ow-green-bright);
  font-size: 9px;
  font-weight: 760;
  white-space: nowrap;
}
.portal-publish {
  display: none;
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 90;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  background: #1ee38a;
  color: #04140c;
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow:
    0 0 0 6px rgba(30, 227, 138, 0.18),
    0 12px 28px rgba(0, 0, 0, 0.45);
}
.portal-publish .wiki-ico {
  width: 18px;
  height: 18px;
}
.portal-publish:hover:not(:disabled) {
  background: #3af09c;
  transform: translateY(-1px);
}
.portal-publish:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
body.portal.is-kb .portal-publish { display: inline-flex; }
@media (min-width: 961px) {
  body.portal.is-kb .portal-publish {
    right: calc(10px + 336px + 20px);
    bottom: 28px;
  }
}
@media (min-width: 961px) and (max-width: 1280px) {
  body.portal.is-kb .portal-publish {
    right: calc(10px + 312px + 20px);
  }
}
body.portal.is-kb .kb-app__bar { display: none; }
.portal-nav__item:hover {
  color: var(--ow-text);
  border-color: rgba(30, 227, 138, 0.58);
  background: rgba(24, 47, 37, 0.72);
  transform: translateY(-1px);
}
.portal-nav__item.is-active {
  color: #04140c;
  background: linear-gradient(135deg, var(--ow-green-bright), #00b894);
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(0, 184, 148, 0.2);
}
.portal-nav__item.is-active .portal-nav__icon {
  color: #052217;
  background: rgba(4, 20, 12, 0.11);
}
.portal-nav__item.is-active .portal-nav__copy strong,
.portal-nav__item.is-active .portal-nav__copy small {
  color: #052217;
}
.portal-nav__item.is-active .portal-nav__hint {
  color: #eafff4;
  background: rgba(4, 20, 12, 0.42);
}
.portal-account-pill {
  display: flex;
  min-width: 138px;
  min-height: 43px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(30, 227, 138, 0.25);
  border-radius: 12px;
  padding: 5px 13px 6px;
  background: linear-gradient(180deg, rgba(30, 227, 138, 0.09), rgba(5, 15, 11, 0.38));
  text-align: center;
}
.portal-account-pill__label {
  color: #6f897d;
  font-size: 9px;
  line-height: 1.1;
  letter-spacing: 0.08em;
}
.portal-user {
  display: block;
  max-width: 190px;
  margin-top: 3px;
  overflow: hidden;
  color: #effff6;
  font-size: 14px;
  font-weight: 780;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .portal-topbar { gap: 9px; padding-inline: 14px; }
  .portal-nav { margin-left: 4px; }
  .portal-nav__hint { display: none; }
  .portal-account-pill { min-width: 120px; padding-inline: 9px; }
  .portal-user { max-width: 145px; font-size: 13px; }
}

@media (max-width: 760px) {
  .portal-topbar { flex-wrap: wrap; }
  .portal-nav { order: 3; width: 100%; margin: 0; }
  .portal-nav__item { flex: 1 1 0; justify-content: center; }
  .portal-nav__item#navAccounts { flex: 0 0 auto; }
}

.app-panel { display: none; flex: 1; min-height: 0; flex-direction: column; }
.app-panel.is-active { display: flex; }
.app-panel[data-panel="knowledge"] { background: #080c0b; }
body.portal.is-kb {
  overflow: hidden;
  height: 100vh;
}
body.portal.is-kb .ow-console {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}
body.portal:not(.is-kb) .ow-console {
  height: 100vh;
  overflow: hidden;
}
.app-panel[data-panel="knowledge"].is-active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.portal-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 22px 0;
}
.portal-main { padding: 16px 22px 28px; }
body.portal .app-panel[data-panel="devices"] { flex: 1; min-height: 0; }
.portal-ow-frame {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #04070a;
}
body.portal .ow-node--locked {
  filter: grayscale(1);
  opacity: 0.5;
  pointer-events: none;
}
body.portal .ow-node__lock {
  margin-left: 6px;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: #9aa3ad;
  border: 1px solid rgba(160, 170, 180, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
body.portal .ow-node--locked .ow-btn {
  cursor: not-allowed;
}

.portal-device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.portal-device-card {
  padding: 16px;
  border-radius: 14px;
  background: var(--ow-panel);
  border: 1px solid var(--ow-line);
  backdrop-filter: blur(8px);
}
.portal-device-card.is-online { border-color: rgba(34, 227, 122, 0.45); }
.portal-device-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}
.portal-device-card h4 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--ow-green-bright);
}
.portal-device-card p {
  margin: 0;
  font-size: 12px;
  color: var(--ow-text-dim);
  line-height: 1.5;
}
.portal-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--ow-line);
  color: var(--ow-text-dim);
}
.portal-pill.is-on {
  color: #04140c;
  background: var(--ow-green);
  border-color: transparent;
}
.portal-device-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.portal-shot {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 10px;
  border: 1px solid var(--ow-line);
  background: rgba(0, 0, 0, 0.35);
}

.kb-workspace {
  display: grid;
  grid-template-columns: 280px 260px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 18px 22px;
  min-height: calc(100vh - 86px);
}
.kb-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--ow-line);
  border-radius: 14px;
  background: var(--ow-panel);
  overflow: hidden;
}
.kb-col__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 8px;
}
.kb-col__head h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--ow-green-bright);
}
.kb-col__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.kb-search { margin: 0 12px 8px; }
.kb-search input { width: 100%; }
.kb-list { flex: 1; overflow: auto; padding: 0 10px 12px; }
.kb-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: rgba(0, 0, 0, 0.22);
  color: var(--ow-text);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  cursor: pointer;
}
.kb-item:hover { border-color: var(--ow-line); }
.kb-item.is-active { border-color: var(--ow-green); box-shadow: 0 0 0 2px rgba(34, 227, 122, 0.12); }
.kb-item small { display: block; color: var(--ow-text-dim); margin-top: 4px; font-size: 11px; }
.kb-edit-link { color: var(--ow-cyan); text-decoration: underline; }
.kb-item__meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--ow-text-faint); }

.kb-editor { display: flex; flex-direction: column; gap: 8px; padding: 0 14px 12px; flex: 1; min-height: 0; }
.kb-editor__meta {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 80px 90px;
  gap: 8px 10px;
  align-items: end;
}
.kb-editor__body {
  flex: 1;
  min-height: 280px;
  display: grid;
  grid-template-columns: 1fr;
}
.kb-editor__body.is-split { grid-template-columns: 1fr 1fr; gap: 10px; }
.kb-textarea {
  min-height: 280px;
  resize: vertical;
  font-family: var(--ow-mono);
  line-height: 1.55;
  letter-spacing: 0;
}
.kb-preview {
  min-height: 280px;
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid var(--ow-line);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.35);
  white-space: pre-wrap;
  line-height: 1.6;
}
.kb-word-count { color: var(--ow-text-faint); font-weight: 400; }
.kb-save-state { font-size: 12px; color: var(--ow-text-dim); }
.kb-save-state.is-dirty { color: var(--ow-warn); }
.kb-save-state.is-ok { color: var(--ow-green); }
.kb-dropzone {
  margin: 0 14px 14px;
  padding: 10px;
  border: 1px dashed var(--ow-line);
  border-radius: 10px;
  color: var(--ow-text-faint);
  font-size: 12px;
  text-align: center;
}
.kb-dropzone.is-over { border-color: var(--ow-green); color: var(--ow-green-bright); background: rgba(34, 227, 122, 0.06); }

.portal-empty, .ow-skeleton {
  padding: 24px 12px;
  text-align: center;
  color: var(--ow-text-dim);
}
.portal-account-list { padding: 16px 22px 28px; display: grid; gap: 10px; }
.portal-account-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--ow-line);
  background: var(--ow-panel);
}
.portal-account-card h4 { margin: 0 0 4px; color: var(--ow-green-bright); }
.portal-account-card p { margin: 0; font-size: 12px; color: var(--ow-text-dim); }
.portal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
.portal-device-picker {
  max-height: 240px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--ow-line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
}
.portal-device-picker label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ow-text);
}
.ow-modal__dialog--wide { width: min(720px, 94vw); }
.portal-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(9, 22, 17, 0.95);
  border: 1px solid var(--ow-line-strong);
  color: var(--ow-text);
  box-shadow: var(--ow-glow);
}

.kb-brand-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 10px 10px;
}
.kb-brand {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: rgba(0, 0, 0, 0.22);
  color: var(--ow-text);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}
.kb-brand small { display: block; margin-top: 4px; color: var(--ow-text-dim); font-size: 11px; }
.kb-brand.is-active { border-color: var(--ow-green); box-shadow: 0 0 0 2px rgba(34, 227, 122, 0.12); }

.kb-tree {
  flex: 1;
  overflow: auto;
  padding: 0 10px 14px;
}
.kb-tree__root {
  position: relative;
  padding-left: 10px;
}
.kb-tree__brand {
  width: 100%;
  border: 0;
  background: linear-gradient(135deg, #19e38a, #00c2a8);
  color: #04140c;
  font-weight: 800;
  border-radius: 999px;
  padding: 8px 14px;
  text-align: left;
}
.kb-tree__children {
  margin: 10px 0 0 14px;
  padding-left: 12px;
  border-left: 1px solid rgba(34, 227, 122, 0.22);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kb-tree__node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: 1px solid transparent;
  background: rgba(0, 0, 0, 0.2);
  color: var(--ow-text);
  border-radius: 9px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
}
.kb-tree__node em {
  font-style: normal;
  color: var(--ow-text-faint);
  font-size: 11px;
}
.kb-tree__node:hover { border-color: var(--ow-line); }
.kb-tree__node.is-active {
  border-color: var(--ow-green);
  background: rgba(34, 227, 122, 0.12);
}
.kb-tree__stores {
  margin: 0 0 4px 16px;
  padding-left: 10px;
  border-left: 1px dashed rgba(34, 227, 122, 0.18);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.kb-tree__node--store { font-size: 13px; }
.kb-tree__store-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.kb-sync-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 14px 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 209, 102, 0.45);
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 209, 102, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(16, 28, 22, 0.95), rgba(8, 16, 13, 0.95));
}
.kb-sync-bar__copy { min-width: 0; }
.kb-sync-bar__copy strong {
  display: block;
  color: #ffe08a;
  font-size: 15px;
  letter-spacing: 1px;
}
.kb-sync-bar__copy span {
  display: block;
  margin-top: 4px;
  color: var(--ow-text-dim);
  font-size: 12px;
  line-height: 1.45;
}
.kb-sync-btn {
  flex: 0 0 auto;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #2a1600;
  cursor: pointer;
  background: linear-gradient(135deg, #ffe08a, #ff8a3d);
  box-shadow: 0 8px 24px rgba(255, 138, 61, 0.28);
}
.kb-sync-btn:hover { filter: brightness(1.06); }
.kb-sync-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.kb-sync-btn.is-busy { animation: kb-pulse 1s linear infinite; }

@keyframes kb-pulse {
  50% { filter: brightness(1.15); }
}

.kb-rich {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  border: 1px solid #24332c;
  border-radius: 8px;
  overflow: hidden;
  background: #0b1110;
}
.kb-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid #24332c;
  background: #101816;
}
.kb-toolbar button {
  border: 1px solid #2a3a34;
  background: #121a18;
  color: #d7ffe8;
  border-radius: 6px;
  min-width: 34px;
  padding: 5px 8px;
  font-size: 12px;
  cursor: pointer;
}
.kb-toolbar button:hover { border-color: var(--ow-green); color: var(--ow-green-bright); }
.kb-toolbar__sep {
  width: 1px;
  background: var(--ow-line);
  margin: 0 2px;
}
.kb-rich__editor {
  min-height: 300px;
  padding: 14px 16px 20px;
  outline: none;
  line-height: 1.7;
  color: var(--ow-text);
}
.kb-rich__editor.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.kb-rich__editor:empty:before {
  content: attr(data-placeholder);
  color: var(--ow-text-faint);
}
.kb-rich__editor h2,
.kb-rich__editor h3 { color: var(--ow-green-bright); margin: 0.6em 0 0.35em; }
.kb-rich__editor ul,
.kb-rich__editor ol { padding-left: 1.4em; }
.kb-rich__editor blockquote {
  margin: 0.6em 0;
  padding: 6px 12px;
  border-left: 3px solid var(--ow-green);
  color: var(--ow-text-dim);
}

.portal-bind {
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--ow-line);
  background: rgba(8, 18, 14, 0.72);
}
.portal-bind--empty { background: rgba(6, 12, 10, 0.55); }
.portal-bind__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.portal-bind--empty .portal-bind__head { margin-bottom: 0; }
.portal-bind__head strong { color: #e8fff3; font-size: 14px; }
.portal-bind__head span { color: var(--ow-text-dim); font-size: 12px; line-height: 1.5; }
.portal-bind__list { display: grid; gap: 8px; }
.portal-bind__card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(34, 227, 122, 0.2);
  border-radius: 14px;
  background: rgba(10, 24, 18, 0.9);
}
.portal-bind__card strong { display: block; color: #f3fff8; }
.portal-bind__card p { margin: 4px 0 0; color: var(--ow-text-dim); font-size: 12px; }
.portal-bind__actions { display: flex; gap: 8px; flex-shrink: 0; }

.kb-app {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #0b110f;
  color: #e8fff3;
}
body.portal.is-kb .ow-brand__name { font-size: 16px; }
body.portal.is-kb .portal-nav__item {
  padding: 7px 12px;
  min-height: 48px;
}
.wiki-root {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
}
.wiki {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #0b110f;
}
@media (max-width: 860px) {
  .wiki { grid-template-columns: 1fr; height: auto; }
  .wiki-side { position: static; height: auto; max-height: 42vh; border-right: 0; border-bottom: 1px solid #1c2622; }
  .wiki-main { height: auto; }
}
.wiki-side,
.wiki-main {
  scrollbar-width: thin;
  scrollbar-color: #2c3d36 transparent;
}
.wiki-side::-webkit-scrollbar,
.wiki-main::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.wiki-side::-webkit-scrollbar-track,
.wiki-main::-webkit-scrollbar-track {
  background: transparent;
}
.wiki-side::-webkit-scrollbar-thumb,
.wiki-main::-webkit-scrollbar-thumb {
  background: #2c3d36;
  border-radius: 8px;
}
.wiki-side::-webkit-scrollbar-thumb:hover,
.wiki-main::-webkit-scrollbar-thumb:hover {
  background: #3d5349;
}
.wiki-side::-webkit-scrollbar-button,
.wiki-main::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
.wiki-ico {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}
.wiki-side {
  height: 100%;
  overflow: auto;
  padding: 16px 12px 24px;
  border-right: 1px solid #1a2420;
  background: #0c1311;
}
.wiki-store {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #15211c;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.wiki-store__av {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #1ee38a;
  color: #04140c;
  flex-shrink: 0;
}
.wiki-store__av .wiki-ico { width: 18px; height: 18px; }
.wiki-store__meta { flex: 1; min-width: 0; }
.wiki-store__meta b {
  display: block;
  font-size: 16px;
  color: #f3fff8;
  font-weight: 700;
}
.wiki-store__meta small {
  display: block;
  margin-top: 2px;
  color: #8aa399;
  font-size: 12px;
}
.wiki-store__chev { color: #8aa399; }
.wiki-store__chev .wiki-ico { width: 16px; height: 16px; }
.wiki-stores {
  margin: 8px 0 0;
  padding: 4px;
  border-radius: 8px;
  background: #101816;
}
.wiki-stores__row {
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: 6px;
}
.wiki-stores__row.is-on { background: #1c2a24; }
.wiki-stores__row button[data-wiki-store] {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: #cfe7db;
  text-align: left;
  padding: 9px 10px;
  font-size: 14px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wiki-stores__ico {
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  color: #6f8279;
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
}
.wiki-stores__ico .wiki-ico { width: 14px; height: 14px; }
.wiki-stores__ico:hover { background: #1c2a24; color: #e8fff4; }
.wiki-stores__ico.is-danger:hover { background: #2a1616; color: #ff8a8a; }
.wiki-stores__add {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: none;
  color: #1ee38a;
  text-align: left;
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
}
.wiki-stores__add:hover { background: #1c2a24; }
.wiki-ref { margin: 0 0 14px; }
.wiki-ref__add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: #1ee38a;
  color: #062117;
  font-weight: 700;
  text-align: center;
  padding: 11px 12px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 10px;
}
.wiki-ref__add:hover { background: #3aee9c; }
.wiki-ref__add .wiki-ico { width: 16px; height: 16px; }
.wiki-ref__row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 0 4px 0 8px;
}
.wiki-ref__row span {
  flex: 1;
  min-width: 0;
  color: #c5d8ce;
  font-size: 13px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: break-all;
}
.wiki-ref__hint {
  margin-top: 6px;
  padding: 0 4px;
  color: #6f8279;
  font-size: 12px;
  line-height: 1.45;
}
.wiki-stores button:hover,
.wiki-stores button.is-on { background: #1c2a24; color: #fff; }
.wiki-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 16px;
  padding: 10px 12px;
  border: 1px solid #24332c;
  border-radius: 10px;
  background: #0a100e;
  color: #8aa399;
}
.wiki-search .wiki-ico { width: 16px; height: 16px; }
.wiki-search input {
  flex: 1;
  border: 0;
  background: none;
  color: #f3fff8;
  font-size: 15px;
  outline: none;
}
.wiki-k {
  margin: 0 10px 8px;
  color: #6f8279;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.wiki-tree { display: flex; flex-direction: column; gap: 2px; }
.wiki-fold__h,
.wiki-leaf {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: none;
  color: #d5e8de;
  font-size: 15px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  min-height: 42px;
}
.wiki-fold__h span,
.wiki-leaf span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wiki-fold__h:hover,
.wiki-leaf:hover { background: #15211c; }
.wiki-leaf.is-on,
.wiki-fold__h.is-on {
  background: #1a2822;
  color: #fff;
  font-weight: 650;
}
.wiki-fold__h .chev { color: #8aa399; width: 16px; height: 16px; display: grid; place-items: center; }
.wiki-fold__h .chev .wiki-ico { width: 16px; height: 16px; }
.wiki-kids { display: none; padding: 2px 0 6px 8px; }
.wiki-fold.is-open > .wiki-kids { display: block; }
.wiki-kids .wiki-leaf { font-size: 14px; padding-left: 24px; color: #c5d8ce; min-height: 38px; }
.wiki-tree__hint {
  padding: 8px 12px 8px 28px;
  color: #6f8279;
  font-size: 13px;
}
.wiki-new {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  width: 100%;
  border: 0;
  background: none;
  color: #1ee38a;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 8px;
}
.wiki-new:hover { background: rgba(30, 227, 138, 0.08); }
.wiki-new-menu {
  display: none;
  margin-top: 4px;
  padding: 4px;
  border-radius: 8px;
  background: #101816;
}
.wiki-new-menu.is-open { display: block; }
.wiki-new-menu button {
  display: block;
  width: 100%;
  border: 0;
  background: none;
  color: #cfe7db;
  text-align: left;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
}
.wiki-new-menu button:hover { background: #1c2a24; }
.wiki-main {
  min-width: 0;
  height: 100%;
  overflow: auto;
  padding: 18px 22px 64px;
}
.wiki-stack { max-width: none; width: 100%; }
.wiki-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 28px;
}
.wiki-top__ico {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #1ee38a;
  color: #04140c;
  flex-shrink: 0;
}
.wiki-top__ico .wiki-ico { width: 20px; height: 20px; }
.wiki-top__text { flex: 1; min-width: 0; }
.wiki-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8aa399;
  font-size: 13px;
  margin-bottom: 8px;
}
.wiki-crumb b { color: #cfe7db; font-weight: 500; }
.wiki-top h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 720;
  letter-spacing: -0.02em;
  color: #f3fff8;
  line-height: 1.25;
}
.wiki-top p {
  margin: 0;
  color: #8aa399;
  font-size: 13px;
  line-height: 1.6;
  max-width: 40em;
}
.wiki-more {
  border: 0;
  background: none;
  color: #8aa399;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}
.wiki-more:hover { background: #15211c; color: #fff; }
.wiki-block { margin-top: 28px; }
.wiki-block:first-of-type { margin-top: 0; }
.wiki-block__h {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.wiki-block__ico {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #15211c;
  color: #1ee38a;
  flex-shrink: 0;
}
.wiki-block__h h2 {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 700;
  color: #f3fff8;
  letter-spacing: 0;
}
.wiki-block__h p {
  margin: 0;
  color: #7d9389;
  font-size: 12px;
  line-height: 1.55;
}
.wiki-card {
  border: 1px solid #1c2622;
  border-radius: 10px;
  background: #101816;
  overflow: hidden;
}
.wiki-card__h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 6px;
  color: #f3fff8;
  font-size: 14px;
  font-weight: 650;
}
.wiki-card__h span { color: #6f8279; font-size: 13px; font-weight: 500; }
.wiki-subh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
  color: #d5e8de;
  font-size: 14px;
  font-weight: 650;
}
.wiki-subh span { color: #6f8279; font-weight: 500; }
.wiki-prop {
  display: grid;
  grid-template-columns: 22px 72px minmax(0, 1fr) 22px;
  align-items: start;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid #1a2420;
  cursor: text;
  transition: background 0.12s ease;
}
.wiki-prop:hover { background: #141c19; }
.wiki-prop:focus-within {
  background: #15211c;
  box-shadow: inset 3px 0 0 #1ee38a;
}
.wiki-prop--stack {
  grid-template-columns: 22px 78px minmax(0, 1fr);
}
.wiki-prop--stack .wiki-note__body { grid-column: 2 / -1; }
.wiki-prop__ico { color: #8aa399; padding-top: 2px; }
.wiki-prop__ico .wiki-ico { width: 16px; height: 16px; }
.wiki-prop__lab { color: #8aa399; font-size: 13px; padding-top: 3px; letter-spacing: 0.02em; }
.wiki-prop__val {
  width: 100%;
  border: 0;
  background: transparent;
  color: #eef8f2;
  font: inherit;
  font-size: 15px;
  line-height: 1.65;
  padding: 0;
  outline: none;
  resize: none;
  overflow: hidden;
  min-height: 24px;
}
.wiki-prop__val::placeholder { color: #d4a24a; }
.wiki-prop__act { color: #3d5349; padding-top: 2px; }
.wiki-prop:hover .wiki-prop__act,
.wiki-prop:focus-within .wiki-prop__act { color: #1ee38a; }
.wiki-prop__act .wiki-ico { width: 15px; height: 15px; margin-left: auto; }
.wiki-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px 8px;
  border-top: 1px solid #1a2420;
}
.wiki-field__lab {
  color: #8aa399;
  font-size: 13px;
}
.wiki-field__area {
  width: 100%;
  border: 1px solid #24332c;
  border-radius: 8px;
  background: #0c1210;
  color: #dce8e2;
  font: inherit;
  font-size: 14px;
  line-height: 1.7;
  padding: 10px 12px;
  outline: none;
  resize: none;
  overflow: hidden;
  min-height: 96px;
}
.wiki-field__area:hover { border-color: #31463d; }
.wiki-field__area:focus {
  border-color: #1ee38a;
  background: #101816;
}
.wiki-field__area::placeholder { color: #d4a24a; }
.wiki-notes { display: grid; gap: 10px; }
.wiki-note {
  border: 1px solid #1c2622;
  border-radius: 10px;
  background: #101816;
  padding: 12px 14px 14px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.wiki-note:hover { border-color: #2a3c36; }
.wiki-note:focus-within {
  border-color: #1ee38a;
  box-shadow: inset 0 0 0 1px rgba(30, 227, 138, 0.28);
}
.wiki-note__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.wiki-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: #1a2822;
  color: #8aa399;
  font-size: 12px;
}
.wiki-note__del {
  border: 0;
  background: none;
  color: #6f8279;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.wiki-note__del:hover { color: #ff8a8a; background: #1a1414; }
.wiki-note__title {
  width: 100%;
  border: 0;
  background: none;
  color: #f3fff8;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  outline: none;
  padding: 2px 0;
}
.wiki-note__title::placeholder { color: #d4a24a; }
.wiki-note__body {
  width: 100%;
  border: 0;
  background: transparent;
  color: #c5d4cc;
  font: inherit;
  font-size: 14px;
  line-height: 1.75;
  outline: none;
  resize: none;
  overflow: hidden;
  min-height: 72px;
  margin-top: 6px;
}
.wiki-note__body::placeholder { color: #6f8279; }
.wiki-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 2px;
  padding: 12px 14px;
  border: 1px dashed #2a3c36;
  border-radius: 8px;
  background: none;
  color: #1ee38a;
  font-size: 14px;
  cursor: pointer;
}
.wiki-add:hover { background: rgba(30, 227, 138, 0.06); }
.wiki-empty {
  margin: 0;
  color: #8aa399;
  font-size: 14px;
  padding: 8px 2px 4px;
  line-height: 1.6;
}
.wiki-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid #1a2420;
  color: #e8fff4;
  font-size: 15px;
  cursor: pointer;
}
.wiki-card > .wiki-toggle:first-child { border-top: 0; }
.wiki-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.wiki-toggle i {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #24332c;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.wiki-toggle i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e8fff4;
  transition: transform 0.15s ease;
}
.wiki-toggle input:checked + i { background: #1ee38a; }
.wiki-toggle input:checked + i::after { transform: translateX(18px); }
.wiki-mini-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 4px 16px 14px;
  color: #8aa399;
  font-size: 13px;
}
.wiki-mini-row input,
.wiki-mini-row select {
  border: 1px solid #24332c;
  border-radius: 6px;
  background: #0c1210;
  color: #f3fff8;
  padding: 6px 8px;
  font-size: 13px;
}
.wiki-live {
  margin-top: 12px;
  min-height: 280px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #1c2622;
}
.wiki-page.is-saved,
.wiki-prop.is-saved,
.wiki-note.is-saved,
.wiki-card.is-saved,
.wiki-toggle.is-saved {
  box-shadow: inset 0 0 0 1px rgba(30, 227, 138, 0.35);
}
.wiki-page.is-err,
.wiki-prop.is-err,
.wiki-note.is-err,
.wiki-card.is-err {
  box-shadow: inset 0 0 0 1px rgba(255, 90, 90, 0.45);
}

.kb-app__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid #1c2622;
  background: #0c1210;
}
.kb-app__id { min-width: 160px; }
.kb-app__brand {
  font-size: 16px;
  font-weight: 700;
  color: #e8fff3;
  line-height: 1.3;
}
.kb-brand-switch { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kb-brand-switch button {
  border: 1px solid #2a3a34;
  background: #101816;
  color: #8aa399;
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  font-size: 12px;
}
.kb-brand-switch button.is-active {
  color: #04140c;
  background: #1ee38a;
  border-color: #1ee38a;
}
.kb-status { flex: 1; min-width: 0; text-align: center; }
.kb-status strong { display: none; }
.kb-status span { display: block; color: #8aa399; font-size: 12px; }
.kb-status span:empty { display: none; }
.kb-text-btn {
  border: 0;
  background: transparent;
  color: #7ec8ff;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
}
.kb-text-btn--danger { color: #ff8aa0; }
.kb-push-btn {
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #1a1000;
  cursor: pointer;
  background: #ff9f40;
  white-space: nowrap;
}
.kb-push-btn--sm { padding: 7px 12px; font-size: 13px; }
.kb-push-btn:disabled { opacity: 0.38; cursor: not-allowed; }
.kb-sync-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 140px;
}
.kb-sync-wrap span {
  color: #6f8279;
  font-size: 11px;
  text-align: right;
  max-width: 16em;
  line-height: 1.4;
}

.kb-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.kb-home {
  display: none;
  background: #080c0b;
}
.kb-home.is-on {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 8px 10px 8px 0;
  gap: 8px;
}
@media (max-width: 1280px) {
  .kb-home.is-on { grid-template-columns: minmax(0, 1fr) 312px; }
}
@media (max-width: 960px) {
  .kb-home.is-on { grid-template-columns: 1fr; padding: 8px; }
  .kb-sim {
    width: min(336px, 100%);
    height: 640px;
    margin: 0 auto 12px;
    border-left: 1px solid #1e2a26;
  }
}
.kb-room,
.kb-sheet {
  display: none;
  position: fixed;
  inset: 0;
  overflow: auto;
  background: #080c0b;
  z-index: 40;
}
.kb-home.is-on,
.kb-room.is-on,
.kb-sheet.is-on {
  z-index: 1;
}
.kb-room.is-on,
.kb-sheet.is-on {
  display: block;
  z-index: 40;
}
.kb-mind {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 8px 20px 28px;
}
.kb-mind__guide {
  min-height: 42px;
  margin: 0 auto 8px;
  max-width: 36em;
  text-align: center;
  color: #d7ffe8;
  font-size: 14px;
  line-height: 1.55;
}
.kb-mind__tree {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.kb-mind__stem {
  width: 2px;
  height: 26px;
  background: #33463d;
  flex-shrink: 0;
  transform-origin: top center;
  animation: kb-draw-y 0.35s ease both;
}
.kb-mind__stem--store { height: 22px; }
.kb-mind__stem--leaf { height: 14px; }
.kb-mind__lvl {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  position: relative;
}
.kb-mind__rail {
  position: absolute;
  top: 0;
  left: 72px;
  right: 72px;
  height: 2px;
  background: #33463d;
  transform-origin: center;
  animation: kb-draw-x 0.4s ease both;
}
.kb-mind__tick {
  display: block;
  width: 2px;
  height: 18px;
  background: #33463d;
  flex-shrink: 0;
  transform-origin: top center;
  animation: kb-draw-y 0.3s ease both;
  animation-delay: var(--d, 0s);
}
.kb-mind__cell,
.kb-mind__store {
  width: 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: kb-in 0.4s ease both;
  animation-delay: var(--d, 0s);
}
.kb-mind__store { width: 168px; }
.kb-addpick .ow-btn { width: 100%; justify-content: center; }
.kb-mind__leaves,
.kb-mind__kids {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.kb-mind__leaves {
  flex-direction: row;
}
.kb-mind__addrow {
  display: flex;
  gap: 6px;
  width: 100%;
}
.kb-mind__addrow .kb-mind__add { flex: 1; min-height: 40px; }
.kb-mind__leaves .kb-mn {
  flex: 1;
  min-width: 0;
  padding: 9px 8px 8px;
}

.kb-mn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 12px 10px;
  border: 1px solid #2b3a34;
  border-radius: 14px;
  background: #121a18;
  color: inherit;
  text-align: center;
  cursor: pointer;
}
.kb-mn:hover { border-color: #4a6358; background: #16201d; }
.kb-mn--root {
  width: auto;
  min-width: 210px;
  padding: 16px 28px 14px;
  border-radius: 18px;
  background: #1ee38a;
  border-color: #1ee38a;
  color: #04140c;
  cursor: default;
  animation: kb-in 0.35s ease both;
}
.kb-mn--root:hover { border-color: #1ee38a; background: #1ee38a; }
.kb-mn--hub { cursor: default; }
.kb-mn--hub:hover { border-color: #2b3a34; background: #121a18; }
.kb-mn.is-share { box-shadow: inset 0 3px 0 #5ad0ff; }
.kb-mn.is-own { box-shadow: inset 0 3px 0 #ffc857; }
.kb-mn--root { box-shadow: none; }
.kb-mn.is-empty { background: #0c1210; }
.kb-mn i {
  font-style: normal;
  font-size: 10px;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 999px;
  background: #0e1a20;
  color: #7ed7ff;
}
.kb-mn.is-own i { background: #1c170c; color: #ffd27a; }
.kb-mn--root i { background: #0f4d2c; color: #d8ffe8; }
.kb-mn strong { font-size: 14px; color: #f3fff8; letter-spacing: 0.02em; }
.kb-mn--root strong { color: #04140c; font-size: 20px; }
.kb-mn b { font-size: 11px; color: #1ee38a; font-weight: 700; }
.kb-mn b.is-todo { color: #ffc857; }
.kb-mn--root b { color: #0a3d24; }
.kb-mn--shop .kb-mn__edit {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: #ffd27a;
  margin-top: 2px;
}
.kb-mn__rename {
  margin-top: 6px;
  border: 0;
  background: transparent;
  color: #7ec8ff;
  font-size: 12px;
  cursor: pointer;
}
.kb-mn__rename:hover { color: #c7e8ff; }
.kb-mind__store { width: 188px; }
.kb-mn--shop strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kb-mind__store--add { width: 148px; }
.kb-mind__add {
  width: 100%;
  min-height: 86px;
  border: 1px dashed #3d5248;
  background: #0c1210;
  color: #8fffc4;
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
}
.kb-mind__add--sm {
  min-height: 40px;
  border-radius: 10px;
  font-size: 12px;
  padding: 8px 6px;
}
.kb-mn--doc {
  padding: 8px 8px 7px;
  border-radius: 10px;
}
.kb-mn--doc strong {
  font-size: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kb-mind__more {
  border: 0;
  background: transparent;
  color: #8aa399;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}

.kb-mind.is-demo-root .kb-mn--root,
.kb-mind.is-demo-l1 .kb-mind__lvl--1 .kb-mn,
.kb-mind.is-demo-share .kb-mn.is-share,
.kb-mind.is-demo-hub .kb-mn--hub,
.kb-mind.is-demo-store .kb-mind__store {
  animation: kb-pulse 1.1s ease;
}
.kb-mind.is-demo-share .kb-mn.is-share { outline: 1px solid #5ad0ff; }
.kb-mind.is-demo-hub .kb-mn--hub,
.kb-mind.is-demo-store .kb-mn.is-own { outline: 1px solid #ffc857; }

.kb-mind__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
  color: #6f8279;
  font-size: 12px;
}
.kb-sim {
  position: relative;
  height: 100%;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid #1e2a26;
  border-radius: 22px;
  background: #070b0a;
  z-index: 2;
  transform: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}
.kb-sim-fab { display: none !important; }
.kb-live {
  display: flex;
  flex-direction: column;
  flex: 1.2;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 12%, rgba(80, 110, 90, 0.18), transparent 48%),
    linear-gradient(180deg, #1a2220 0%, #0c100e 55%, #070b0a 100%);
}
.kb-live-settings {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #0c1311;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transform: translateX(16px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}
.kb-live-settings.is-on {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.kb-live__top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 8px;
  flex-shrink: 0;
}
.kb-live__badge {
  padding: 2px 7px;
  border-radius: 4px;
  background: #ff2b55;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.kb-live__title {
  flex: 1;
  min-width: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.kb-live__cam-name {
  position: absolute;
  left: 10px;
  top: 10px;
  max-width: calc(100% - 86px);
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kb-live__viewers {
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  flex-shrink: 0;
}
.kb-live__stage {
  position: relative;
  flex: 1;
  min-height: 160px;
  overflow: hidden;
}
.kb-live__cam {
  position: absolute;
  inset: 8px 10px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 38%, rgba(40, 56, 48, 0.55), transparent 42%),
    linear-gradient(180deg, #24302b 0%, #101614 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.kb-live__flags {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.kb-live__flag {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
}
.kb-live__flag.is-on {
  background: rgba(30, 227, 138, 0.18);
  color: #1ee38a;
}
.kb-live__lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  line-height: 1.6;
  z-index: 3;
  background: rgba(7, 11, 10, 0.35);
}
.kb-live__comments {
  position: absolute;
  left: 16px;
  right: 26%;
  bottom: 12px;
  top: 44px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}
.kb-live__idle {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  line-height: 1.6;
  z-index: 2;
}
.kb-live__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid #1c2622;
}
.kb-live__hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
  line-height: 1.4;
}
.kb-live__go,
.kb-live__back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}
.kb-live__go {
  background: #1ee38a;
  color: #04140c;
}
.kb-live__go .wiki-ico,
.kb-live__back .wiki-ico {
  width: 14px;
  height: 14px;
}
.kb-live-set__top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid #1a2420;
}
.kb-live-set__top strong {
  color: #f3fff8;
  font-size: 13px;
}
.kb-live__back {
  background: rgba(30, 227, 138, 0.12);
  color: #1ee38a;
  font-weight: 650;
}
.kb-live-form {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: scroll;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px 32px;
  display: block;
  scrollbar-width: thin;
  scrollbar-color: #2c3d36 transparent;
}
.kb-live-form::-webkit-scrollbar { width: 6px; }
.kb-live-form::-webkit-scrollbar-thumb {
  background: #2c3d36;
  border-radius: 8px;
}
.kb-live-set__lead {
  margin: 0;
  color: #9bb4a8;
  font-size: 12px;
  line-height: 1.55;
}
.kb-live-set__note {
  margin: 0;
  padding: 0 12px 12px;
  color: #8aa399;
  font-size: 11px;
  line-height: 1.55;
}
.kb-live-track {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 12px 0;
}
.kb-live-track__ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #15211c;
  color: #1ee38a;
  flex-shrink: 0;
}
.kb-live-track__ico.is-mic { color: #7ec8ff; }
.kb-live-track__ico.is-warm { color: #ffd56a; }
.kb-live-track__ico .wiki-ico { width: 15px; height: 15px; }
.kb-live-track__txt b {
  display: block;
  color: #f3fff8;
  font-size: 13px;
  font-weight: 700;
}
.kb-live-track__txt em {
  display: block;
  margin-top: 2px;
  color: #8aa399;
  font-style: normal;
  font-size: 11px;
  line-height: 1.4;
}
.kb-live-form .wiki-toggle {
  padding: 10px 12px;
  font-size: 13px;
}
.kb-live-form .wiki-mini-row {
  padding: 4px 12px 12px;
  gap: 8px;
}
.kb-live__lock[hidden],
.kb-live__idle[hidden],
.kb-live__comments[hidden] {
  display: none !important;
}
.kb-live-form .wiki-card { margin: 0; }
.kb-pool__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 12px 8px;
}
.kb-pool__head b {
  color: #f3fff8;
  font-size: 14px;
  font-weight: 700;
}
.kb-pool__head span {
  color: #8aa399;
  font-size: 12px;
  line-height: 1.5;
}
.kb-pool__list {
  max-height: min(42vh, 320px);
  min-height: 120px;
  overflow: auto;
  padding: 2px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: #2c3d36 transparent;
}
.kb-pool__list::-webkit-scrollbar { width: 6px; }
.kb-pool__list::-webkit-scrollbar-thumb {
  background: #2c3d36;
  border-radius: 8px;
}
.kb-pool__item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #141c19;
  border: 1px solid #24332c;
}
.kb-pool__n {
  width: 16px;
  flex-shrink: 0;
  color: #6f8279;
  font-size: 12px;
  text-align: right;
}
.kb-pool__t {
  flex: 1;
  min-width: 0;
  color: #e8fff4;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kb-pool__x {
  border: 0;
  background: none;
  color: #8aa399;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  flex-shrink: 0;
}
.kb-pool__x:hover { color: #ff8a8a; }
.kb-pool__add {
  display: block;
  width: calc(100% - 24px);
  margin: 0 12px 8px;
  border: 1px dashed #2a3c36;
  border-radius: 10px;
  background: #0c1210;
  color: #f3fff8;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  outline: none;
}
.kb-pool__add:focus { border-color: #1ee38a; }
.kb-pool__add::placeholder { color: #6f8279; }
.kb-pool__preset {
  display: block;
  margin: 0 12px 12px;
  border: 0;
  background: none;
  color: #1ee38a;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  text-align: left;
}
.kb-pool__preset[hidden] { display: none !important; }
.kb-pool__empty {
  margin: 12px 4px;
  color: #8aa399;
  font-size: 12px;
  line-height: 1.55;
}
.kb-talk {
  display: flex;
  flex-direction: column;
  flex: 0.95;
  min-height: 180px;
  background: #0c1311;
}
.kb-talk__h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 6px;
  flex-shrink: 0;
}
.kb-talk__h strong { color: #f3fff8; font-size: 13px; font-weight: 700; }
.kb-talk__h span { color: #6f8279; font-size: 11px; }
.kb-talk__empty {
  padding: 8px 12px 0;
  color: #6f8279;
  font-size: 12px;
  line-height: 1.55;
}
.kb-talk__log {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: #2c3d36 transparent;
}
.kb-talk__log::-webkit-scrollbar { width: 5px; }
.kb-talk__log::-webkit-scrollbar-thumb { background: #2c3d36; border-radius: 8px; }
.kb-talk__msg {
  max-width: 92%;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.kb-talk__msg small {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
  font-size: 11px;
  opacity: 0.78;
}
.kb-talk__msg small em {
  font-style: normal;
  font-size: 10px;
  opacity: 0.85;
  flex-shrink: 0;
}
.kb-talk__msg.is-user {
  align-self: flex-end;
  background: #1ee38a;
  color: #04140c;
  border-radius: 10px 10px 4px 10px;
}
.kb-talk__msg.is-ai {
  align-self: flex-start;
  max-width: 96%;
  background: #18241f;
  color: #e8fff3;
  border: 1px solid #2a3a34;
  border-radius: 10px 10px 10px 4px;
}
.kb-talk__msg.is-danmaku {
  align-self: flex-start;
  max-width: 88%;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  border: 1px solid rgba(255, 213, 106, 0.28);
  border-radius: 4px 14px 14px 4px;
}
.kb-talk__msg.is-danmaku small { color: #ffd56a; opacity: 1; }
.kb-talk__msg.is-wait { color: #8aa399; border-style: dashed; }
.kb-talk__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 12px;
  flex-shrink: 0;
  border-top: 1px solid #1a2420;
}
.kb-talk__bar input {
  flex: 1;
  border: 1px solid #24332c;
  border-radius: 8px;
  background: #0a100e;
  color: #f3fff8;
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
}
.kb-talk__bar input:focus { border-color: #1ee38a; }
.kb-talk__bar button {
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: #1ee38a;
  color: #04140c;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.kb-talk__bar button:disabled,
.kb-talk__bar input:disabled { opacity: 0.4; cursor: not-allowed; }
.kb-book {
  min-width: 0;
}
.kb-book__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 18px 8px 12px;
}
.kb-book__guide {
  margin: 0 0 0 auto;
  color: #7d978c;
  font-size: 12px;
  line-height: 1.4;
}
.kb-book__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.kb-book__tab {
  border: 1px solid #2a3c36;
  background: #101816;
  color: #cfe7db;
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 12px;
  cursor: pointer;
}
.kb-book__tab.is-on {
  border-color: #3dff9a;
  color: #08120e;
  background: #3dff9a;
  font-weight: 700;
}
.kb-book__tab--add {
  border-style: dashed;
  color: #8aa399;
}
.kb-book__rename {
  border: 0;
  background: none;
  color: #8aa399;
  font-size: 12px;
  cursor: pointer;
}
.kb-work {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: start;
  min-height: calc(100vh - 160px);
}
@media (max-width: 760px) {
  .kb-work { grid-template-columns: 1fr; }
  .kb-rail { position: static; flex-direction: row; flex-wrap: wrap; border-right: 0; }
}
.kb-rail {
  position: sticky;
  top: 72px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px 24px;
  border-right: 1px solid #1c2622;
  background: #0a100e;
  min-height: calc(100vh - 160px);
}
.kb-canvas {
  min-width: 0;
  padding: 12px 22px 96px 18px;
  background: #141c19;
}
.kb-rail button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #8aa399;
  font-size: 14px;
  text-align: left;
  padding: 9px 12px;
  cursor: pointer;
}
.kb-rail button i {
  font-style: normal;
  width: 18px;
  text-align: center;
  opacity: 0.85;
}
.kb-rail button:hover { color: #e8fff4; background: #15211c; }
.kb-rail button.is-on {
  color: #f3fff8;
  background: #1c2a24;
  font-weight: 650;
}
.kb-book[data-gallery="store"] .kb-panel:not([data-gallery="store"]),
.kb-book[data-gallery="brand"] .kb-panel:not([data-gallery="brand"]),
.kb-book[data-gallery="qa"] .kb-panel:not([data-gallery="qa"]),
.kb-book[data-gallery="theme"] .kb-panel:not([data-gallery="theme"]),
.kb-book[data-gallery="chat"] .kb-panel:not([data-gallery="chat"]) {
  display: none;
}
.kb-panel {
  margin: 0 0 28px;
  scroll-margin-top: 84px;
}
.kb-panel.is-saved .kb-form-card,
.kb-panel.is-saved .kb-tile {
  box-shadow: 0 0 0 1px rgba(61, 255, 154, 0.45);
}
.kb-panel.is-err .kb-form-card,
.kb-panel.is-err .kb-tile {
  box-shadow: 0 0 0 1px rgba(255, 77, 109, 0.45);
}
.kb-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
}
.kb-panel__head h3 {
  margin: 0;
  color: #cfe7db;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
}
.kb-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  align-items: stretch;
}
.kb-gallery--chat {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.kb-tile {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 16px 16px 14px;
  border: 1px solid #24332c;
  border-radius: 16px;
  background: #161e1b;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}
.kb-tile.is-saved { box-shadow: 0 0 0 1px rgba(61, 255, 154, 0.45), 0 10px 28px rgba(0, 0, 0, 0.22); }
.kb-tile.is-err { box-shadow: 0 0 0 1px rgba(255, 77, 109, 0.45); }
.kb-tile__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.kb-tile--add {
  min-height: 220px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-style: dashed;
  background: transparent;
  box-shadow: none;
  color: #8aa399;
  cursor: pointer;
}
.kb-tile--add i {
  font-style: normal;
  font-size: 22px;
  color: #3dff9a;
  line-height: 1;
}
.kb-tile--add b { font-weight: 600; font-size: 13px; }
.kb-tile--add:hover {
  border-color: #3dff9a;
  background: rgba(61, 255, 154, 0.04);
}
.kb-form-card {
  max-width: 520px;
  padding: 22px 22px 18px;
  border: 1px solid #24332c;
  border-radius: 16px;
  background: #161e1b;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}
.kb-form-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.kb-form-card__head h3 {
  margin: 0;
  font-size: 18px;
  color: #f3fff8;
}
.kb-form-card__head span { color: #6f8279; font-size: 12px; }
.kb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.kb-field span {
  color: #8aa399;
  font-size: 12px;
}
.kb-field textarea,
.kb-field input,
.kb-mini input,
.kb-mini select {
  width: 100%;
  border: 1px solid #2a3c36;
  border-radius: 10px;
  background: #0c1210;
  color: #f3fff8;
  font: inherit;
  font-size: 13px;
  padding: 10px 12px;
  outline: none;
  resize: none;
  overflow: hidden;
}
.kb-field textarea:focus,
.kb-field input:focus {
  border-color: #3dff9a;
}
.kb-book__tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: #8aa399;
  border: 1px solid #2a3c36;
}
.kb-book__tag.is-share {
  color: #9fe7c4;
  border-color: #2f6a52;
  background: rgba(47, 106, 82, 0.18);
}
.kb-book__tag.is-own {
  color: #f0d48a;
  border-color: #6a5a2f;
  background: rgba(106, 90, 47, 0.18);
}
.kb-book__title {
  width: 100%;
  border: 0;
  background: transparent;
  color: #f3fff8;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 0 0 8px;
  outline: none;
}
.kb-book__body {
  width: 100%;
  flex: 1;
  border: 0;
  background: transparent;
  color: #c5d8ce;
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
  padding: 0;
  outline: none;
  resize: none;
  overflow: hidden;
  min-height: 88px;
}
.kb-book__del {
  border: 0;
  background: none;
  color: #6f8279;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}
.kb-book__del:hover { color: #ff7b8d; }
.kb-switch,
.kb-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #d7ffe8;
  font-size: 13px;
  margin-bottom: 10px;
}
.kb-mini { display: inline-flex; margin: 0 12px 8px 0; color: #8aa399; font-size: 12px; }
.kb-mini input { width: 72px; padding: 6px 8px; }
.kb-mini select { width: auto; padding: 6px 8px; }
.kb-tile--form { min-height: 280px; }
.kb-tile--live {
  padding: 0;
  overflow: hidden;
  min-height: 280px;
}
.kb-inline { display: flex; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.kb-book.is-demo-brand .kb-panel[data-sec="brand"] .kb-form-card,
.kb-book.is-demo-qa .kb-panel[data-sec="qa"],
.kb-book.is-demo-theme .kb-panel[data-sec="theme"],
.kb-book.is-demo-chat .kb-panel[data-sec="chat"] {
  outline: 1px solid rgba(61, 255, 154, 0.4);
  outline-offset: 4px;
  border-radius: 16px;
}
.kb-live-preview {
  position: relative;
  min-height: 196px;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(80, 110, 90, 0.2), transparent 52%),
    linear-gradient(180deg, #1c2420 0%, #0a0e0c 100%);
  border: 1px solid #2a3c36;
}
.kb-live-preview__stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.kb-live-preview__live {
  position: absolute;
  top: 10px;
  left: 12px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #ff2b55;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.kb-live-preview__title {
  position: absolute;
  top: 11px;
  left: 52px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}
.kb-live-preview__comments {
  position: absolute;
  left: 12px;
  right: 28%;
  bottom: 42px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.kb-live-cmt {
  align-self: flex-start;
  max-width: 92%;
  padding: 5px 10px;
  border-radius: 4px 14px 14px 4px;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  animation: kbLiveCmtIn 0.32s ease;
}
.kb-live-cmt b {
  margin-right: 6px;
  color: #7ec8ff;
  font-weight: 700;
}
.kb-live-cmt.is-host b {
  color: #ffd56a;
}
.kb-live-cmt.is-wait { opacity: 0.72; }
.kb-live-cmt.is-wait b { color: #9fb5aa; }
.kb-live-preview__bar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}
@keyframes kbLiveCmtIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.kb-book__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 6px;
  color: #6f8279;
  font-size: 11px;
}
.kb-book__foot .lg-share { color: #9fe7c4; }
.kb-book__foot .lg-own { color: #f0d48a; }
.kb-group { margin-top: 8px; }
.kb-group:first-of-type { margin-top: 0; }
.kb-group__label {
  margin: 0 0 4px;
  color: #6f8279;
  font-size: 11px;
}
.kb-cards:empty { padding: 8px 10px; }
.kb-cards:empty::before {
  content: '还没有，点右上角加一条';
  color: #6f8279;
  font-size: 12px;
}
.kb-book.is-demo-brand .kb-panel[data-sec="brand"],
.kb-book.is-demo-qa .kb-panel[data-sec="qa"],
.kb-book.is-demo-theme .kb-panel[data-sec="theme"],
.kb-book.is-demo-chat .kb-panel[data-sec="chat"] {
  outline: 1px solid #3dff9a;
  outline-offset: 2px;
  border-radius: 10px;
}
.kb-book.is-demo-brand .kb-rail [data-rail="store"],
.kb-book.is-demo-brand .kb-rail [data-rail="brand"],
.kb-book.is-demo-qa .kb-rail [data-rail="qa"],
.kb-book.is-demo-theme .kb-rail [data-rail="theme"],
.kb-book.is-demo-chat .kb-rail [data-rail="chat"] {
  color: #3dff9a;
  background: #15241e;
}
@keyframes kbBookIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.kb-sim__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.kb-sim__head strong { display: block; color: #f3fff8; font-size: 13px; }
.kb-sim__head span { display: none; }
.kb-sim__head select {
  min-width: 0;
  max-width: 148px;
  border: 1px solid #2a3a34;
  background: #0c1210;
  color: #e8fff3;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 12px;
}
.kb-sim__lock {
  padding: 10px 8px;
  text-align: center;
  color: #8aa399;
  font-size: 12px;
}
.kb-sim__log {
  min-height: 96px;
  max-height: 220px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0 10px;
}
.kb-sim__msg {
  max-width: 86%;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.kb-sim__msg--user {
  align-self: flex-end;
  background: #1ee38a;
  color: #04140c;
}
.kb-sim__msg--ai {
  align-self: flex-start;
  background: #18241f;
  color: #e8fff3;
  border: 1px solid #2a3a34;
}
.kb-sim__msg.is-wait { color: #8aa399; }
.kb-sim__form {
  display: flex;
  gap: 8px;
}
.kb-sim__form input {
  flex: 1;
  border: 1px solid #2a3a34;
  background: #0c1210;
  color: #e8fff3;
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 12px;
}
.kb-sim__form button {
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  background: #1ee38a;
  color: #04140c;
  font-weight: 700;
  cursor: pointer;
  font-size: 12px;
}
.kb-sim__form button:disabled,
.kb-sim__form input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.kb-mind__foot .lg-share { color: #5ad0ff; }
.kb-mind__foot .lg-own { color: #ffc857; }

@keyframes kb-in {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: none; }
}
@keyframes kb-draw-x {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes kb-draw-y {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
@keyframes kb-pulse {
  0%, 100% { transform: none; }
  40% { transform: translateY(4px); }
}

.kb-room__inner {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 20px 20px 64px;
}
.kb-room__head { margin: 16px 0 18px; }
.kb-room__head h2 { margin: 8px 0 6px; font-size: 26px; color: #f3fff8; }
.kb-room__head p { margin: 0; color: #8aa399; font-size: 13px; }
.kb-chip {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #2a3a34;
  background: #121a18;
  color: #c5d4cc;
  font-size: 11px;
  font-weight: 600;
}
.kb-chip.is-share { color: #5ad0ff; border-color: #245066; background: #0e1a20; }
.kb-chip.is-store { color: #ffc857; border-color: #5a4a20; background: #1a160c; }
.kb-notes { display: flex; flex-direction: column; gap: 8px; }
.kb-note {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #24332c;
  border-radius: 8px;
  background: #121a18;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.kb-note:hover { border-color: #3d5248; }
.kb-note strong { font-size: 16px; color: #f3fff8; }
.kb-note span { color: #8aa399; font-size: 13px; line-height: 1.5; }
.kb-note b { color: #6f8279; font-size: 12px; font-weight: 600; }
.kb-write {
  margin-top: 14px;
  border: 1px solid #24332c;
  background: #121a18;
  color: #e8fff3;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
}
.kb-room__empty { padding: 8px 0 16px; }
.kb-room__empty strong { display: block; font-size: 16px; color: #f3fff8; }
.kb-room__empty p { margin: 6px 0 0; color: #8aa399; font-size: 13px; line-height: 1.55; }
.kb-starts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.kb-starts button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #24332c;
  border-radius: 8px;
  background: #121a18;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.kb-starts button:hover { border-color: #3d5248; }
.kb-starts strong { font-size: 14px; color: #f3fff8; }
.kb-starts span { color: #8aa399; font-size: 12px; }
.kb-add-btn {
  display: block;
  margin: 14px 0 0;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: #6f8279;
  font-size: 13px;
  text-decoration: underline;
}

.kb-sheet { padding: 20px 24px 48px; background: #0b1110; }
.kb-paper {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 20px 24px 36px;
  border: 1px solid #24332c;
  border-radius: 10px;
  background: #121a18;
}
.kb-where {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #2a3a34;
  background: #0b1110;
  color: #8aa399;
  font-size: 12px;
  font-weight: 600;
}
.kb-step-banner {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #5a4d20;
  background: #2a2410;
}
.kb-step-banner strong { display: block; color: #ffc857; font-size: 14px; }
.kb-step-banner p { margin: 6px 0 0; color: #e6d7a8; font-size: 13px; line-height: 1.55; }
.kb-sheet__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.kb-back-btn {
  border: 1px solid #2a3a34;
  background: #101816;
  color: #d7ffe8;
  border-radius: 6px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 13px;
}
.kb-sheet__bar .kb-save-state { margin-left: auto; color: #8aa399; font-size: 12px; }
.kb-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.kb-tips span {
  border-radius: 4px;
  padding: 3px 8px;
  background: #0e1a14;
  border: 1px solid #1a4a32;
  color: #c8ffe0;
  font-size: 12px;
}
.kb-field-hint { margin: 0 0 6px; color: #6f8279; font-size: 12px; }
.kb-title-input {
  width: 100%;
  border: 1px solid #24332c;
  border-radius: 8px;
  background: #0b1110;
  color: #f3fff8;
  font-size: 20px;
  font-weight: 700;
  padding: 10px 12px;
  outline: none;
  margin-bottom: 14px;
}
.kb-title-input:focus { border-color: #3d5248; }
.kb-store-form {
  display: grid;
  gap: 8px;
  margin: 8px 0 18px;
}
.kb-store-form[hidden] { display: none; }
.kb-store-form label {
  margin-top: 6px;
  color: #c8ffe0;
  font-size: 13px;
  font-weight: 700;
}
.kb-store-form input,
.kb-store-form textarea {
  width: 100%;
  border: 1px solid #24332c;
  border-radius: 8px;
  background: #0b1110;
  color: #f3fff8;
  font-size: 15px;
  padding: 10px 12px;
  outline: none;
}
.kb-store-form input:focus,
.kb-store-form textarea:focus { border-color: #3d5248; }
.kb-store-form textarea { resize: vertical; line-height: 1.6; }
.kb-store-form__hint {
  margin: 0;
  color: #8aa399;
  font-size: 12px;
  line-height: 1.5;
}
.kb-store-preview {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #1a4a32;
  background: #0e1a14;
}
.kb-store-preview strong {
  display: block;
  color: #8fffc4;
  font-size: 12px;
  margin-bottom: 6px;
}
.kb-store-preview p {
  margin: 0;
  color: #d7ffe8;
  font-size: 14px;
  line-height: 1.7;
}
.kb-sheet .kb-rich {
  border: 1px solid #24332c;
  background: #0b1110;
  min-height: 280px;
}
.kb-sheet .kb-toolbar {
  padding: 8px;
  background: #101816;
  border-bottom: 1px solid #24332c;
}
.kb-sheet .kb-rich__editor {
  min-height: 360px;
  line-height: 1.85;
  font-size: 16px;
  padding: 14px 14px 20px;
  background: #0b1110;
}

@media (max-width: 1100px) {
  .kb-app__bar { flex-direction: column; align-items: stretch; }
  .kb-status { text-align: left; }
  .kb-sync-wrap { align-items: flex-start; }
  .kb-mind__lvl { flex-wrap: wrap; }
  .kb-mind__rail,
  .kb-mind__tick,
  .kb-mind__stem { display: none; }
  .kb-mind__cell,
  .kb-mind__store { width: 46%; }
  .kb-starts { grid-template-columns: 1fr; }
  .kb-paper { padding: 16px; }
  .portal-bind__card { flex-direction: column; align-items: stretch; }
  .kb-editor__meta { grid-template-columns: 1fr 1fr; }
  .kb-sync-bar { flex-direction: column; align-items: stretch; }
  .portal-account-card { grid-template-columns: 1fr; }
}

/* 门店微调：差异、设备、讲解侧重、本店讲开关 */
@media (min-width: 1281px) {
  .kb-home.is-on { grid-template-columns: minmax(0, 1fr) 384px; }
  body.portal.is-kb .portal-publish { right: calc(10px + 384px + 20px); }
}
@media (min-width: 961px) and (max-width: 1280px) {
  .kb-home.is-on { grid-template-columns: minmax(0, 1fr) 344px; }
  body.portal.is-kb .portal-publish { right: calc(10px + 344px + 20px); }
}
.wiki-diff {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -12px 0 24px;
}
.wiki-diff__h { width: 100%; color: #8aa399; font-size: 12px; }
.wiki-diff__chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #22302a;
  border-radius: 8px;
  background: #0e1513;
  color: #8aa399;
  font-size: 12px;
  cursor: pointer;
}
.wiki-diff__chip b { color: #cfe7db; font-weight: 600; }
.wiki-diff__chip.is-on { border-color: rgba(30, 227, 138, 0.45); background: #0f2219; }
.wiki-diff__chip.is-on b { color: #1ee38a; }
.wiki-diff__chip:hover { border-color: #1ee38a; }
.wiki-tag.is-own { background: #10301f; color: #1ee38a; }
.wiki-note__tools { display: inline-flex; align-items: center; gap: 4px; }
.wiki-note__try {
  border: 1px solid #24332c;
  background: none;
  color: #9fd9bd;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.wiki-note__try:hover { border-color: #1ee38a; color: #1ee38a; }
.wiki-note.is-skipped { opacity: 0.55; }
.wiki-note.is-skipped:focus-within { opacity: 1; }
.wiki-skip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  color: #8aa399;
  font-size: 12px;
  cursor: pointer;
}
.wiki-skip input { position: absolute; opacity: 0; width: 0; height: 0; }
.wiki-skip i {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 8px;
  background: #24332c;
  transition: background 0.15s ease;
}
.wiki-skip i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e8fff4;
  transition: transform 0.15s ease;
}
.wiki-skip input:checked + i { background: #05c46b; }
.wiki-skip input:checked + i::after { transform: translateX(12px); }
.wiki-count { color: #6f8279; font-size: 12px; padding: 0 4px; }
.wiki-style .wiki-note__body { min-height: 96px; }
.wiki-subh__btn {
  margin-left: auto;
  border: 1px solid #24332c;
  background: none;
  color: #9fd9bd;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.wiki-subh span + .wiki-subh__btn { margin-left: 10px; }
.wiki-hint { margin: 0 0 10px; color: #6f8279; font-size: 12px; line-height: 1.6; }
.kb-devs { padding: 4px 0; }
.kb-devs .wiki-empty { padding: 10px 16px; }
.kb-dev {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid #1a2420;
}
.kb-dev:first-child { border-top: 0; }
.kb-dev.is-here { background: #0f1a16; }
.kb-dev__name { min-width: 0; display: flex; align-items: center; gap: 6px; }
.kb-dev__name b { color: #e8fff4; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-dev__name em {
  flex-shrink: 0;
  font-style: normal;
  font-size: 11px;
  color: #ff8a8a;
  border: 1px solid rgba(255, 138, 138, 0.4);
  border-radius: 5px;
  padding: 0 5px;
}
.kb-dev__store {
  min-width: 0;
  border: 1px solid #24332c;
  border-radius: 7px;
  background: #0a100e;
  color: #e8fff4;
  font-size: 12px;
  padding: 5px 6px;
}
.kb-dev__cart.is-own { border-color: rgba(30, 227, 138, 0.6); color: #1ee38a; }
.kb-dev__cart.is-na { color: #4f6158; font-size: 12px; text-align: center; }
.kb-dev__st { font-size: 12px; color: #8aa399; }
.kb-dev__st.is-ok { color: #1ee38a; }
.kb-dev__st.is-wait { color: #ffd56a; }
.kb-dev__st.is-off { color: #6f8279; }
.kb-dev__warn { grid-column: 1 / -1; color: #ffb36a; font-size: 12px; margin-top: -4px; }
.kb-warm-scope { margin-bottom: 10px; }
.kb-warm-scope .wiki-toggle { font-size: 13px; }
.kb-warm-scope .wiki-toggle small { display: block; color: #6f8279; font-size: 11px; margin-top: 3px; }

/* 右侧：口播预览 / AI 助手 / 弹幕试问 / 暖场 */
.kb-tabs {
  display: flex;
  flex-shrink: 0;
  gap: 2px;
  padding: 6px 6px 0;
  border-bottom: 1px solid #1a2420;
  background: #0a100e;
}
.kb-tabs button {
  flex: 1;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: #8aa399;
  font-size: 12px;
  padding: 8px 2px 7px;
  cursor: pointer;
}
.kb-tabs button.is-on { color: #f3fff8; border-bottom-color: #1ee38a; font-weight: 650; }
.kb-pane { display: none; flex: 1; min-height: 0; flex-direction: column; background: #0c1311; }
.kb-pane.is-on { display: flex; }
.kb-pane > .kb-talk { flex: 1; }
.kb-pane--warm { position: relative; }
.kb-pane--warm > .kb-live { flex: 1; }
.kb-pane__h {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 6px;
  flex-shrink: 0;
}
.kb-pane__h strong { color: #f3fff8; font-size: 13px; font-weight: 700; }
.kb-pane__h span { color: #6f8279; font-size: 11px; }
.kb-pane__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 12px 10px;
}
.kb-pane__empty { color: #6f8279; font-size: 12px; line-height: 1.6; padding: 4px 0; }
.kb-pane__bar { display: flex; gap: 8px; padding: 8px 12px 6px; border-top: 1px solid #1a2420; flex-shrink: 0; }
.kb-pane__go,
.kb-pane__ghost {
  flex: 1;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.kb-pane__go { border: 0; background: #1ee38a; color: #04140c; }
.kb-pane__ghost { border: 1px solid #2a3c36; background: none; color: #cfe7db; }
.kb-pane__go:disabled,
.kb-pane__ghost:disabled { opacity: 0.45; cursor: not-allowed; }
.kb-pane__key { margin: 0; padding: 0 12px 10px; color: #5f7369; font-size: 11px; flex-shrink: 0; }
.kb-pane__key.is-warn { color: #ffb36a; }
.kb-round { display: flex; flex-direction: column; gap: 6px; }
.kb-round__h { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.kb-round__h b { color: #cfe7db; font-size: 12px; }
.kb-round__h span { color: #6f8279; font-size: 11px; line-height: 1.5; }
.kb-seg { border: 1px solid #1c2622; border-radius: 9px; background: #101816; padding: 8px 10px; }
.kb-seg__h { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 12px; color: #8aa399; }
.kb-seg__h em {
  font-style: normal;
  color: #04140c;
  background: #1ee38a;
  border-radius: 4px;
  padding: 0 5px;
  font-size: 11px;
}
.kb-seg__h b { color: #cfe7db; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-seg__h span { margin-left: auto; flex-shrink: 0; }
.kb-seg p { margin: 0; color: #e8fff4; font-size: 13px; line-height: 1.7; }
.kb-seg__flag { margin-top: 6px; color: #ffb36a; font-size: 12px; }
.kb-msg {
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.kb-msg.is-user { align-self: flex-end; max-width: 88%; background: #15301f; color: #e8fff4; }
.kb-msg.is-ai { background: #101816; border: 1px solid #1c2622; color: #e8fff4; }
.kb-msg.is-wait { color: #8aa399; border: 1px dashed #2a3c36; }
.kb-msg.is-err { color: #ff9a9a; border: 1px solid rgba(255, 138, 138, 0.35); background: #1a1212; }
.kb-assist__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 12px 0; flex-shrink: 0; }
.kb-assist__chips button {
  border: 1px solid #24332c;
  border-radius: 14px;
  background: #0e1513;
  color: #9fd9bd;
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
}
.kb-assist__chips button:hover:not(:disabled) { border-color: #1ee38a; color: #1ee38a; }
.kb-assist__chips button:disabled { opacity: 0.4; cursor: not-allowed; }
.kb-assist__bar { display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px 6px; flex-shrink: 0; }
.kb-assist__bar textarea {
  flex: 1;
  resize: none;
  border: 1px solid #24332c;
  border-radius: 8px;
  background: #0a100e;
  color: #f3fff8;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  outline: none;
}
.kb-assist__bar textarea:focus { border-color: #1ee38a; }
.kb-assist__bar button {
  border: 0;
  border-radius: 8px;
  padding: 9px 12px;
  background: #1ee38a;
  color: #04140c;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.kb-assist__bar button:disabled { opacity: 0.4; cursor: not-allowed; }
.kb-prop { border: 1px solid #23413a; border-radius: 9px; background: #0d1a16; padding: 8px 10px; font-size: 13px; }
.kb-prop.is-shared { border-color: rgba(255, 179, 106, 0.45); }
.kb-prop__h { color: #1ee38a; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.kb-prop.is-shared .kb-prop__h { color: #ffb36a; }
.kb-prop__why { margin: 0 0 6px; color: #8aa399; font-size: 12px; line-height: 1.55; }
.kb-prop__title { display: block; color: #f3fff8; margin-bottom: 2px; }
.kb-prop__text { margin: 0; color: #e8fff4; line-height: 1.7; white-space: pre-wrap; }
.kb-prop__text.is-del { color: #8aa399; text-decoration: line-through; }
.kb-prop__kv { display: flex; gap: 8px; color: #e8fff4; line-height: 1.6; }
.kb-prop__kv span { flex-shrink: 0; width: 5em; color: #8aa399; }
.kb-prop__lines { margin: 0; padding-left: 20px; color: #e8fff4; line-height: 1.65; }
.kb-prop__before { margin-top: 6px; color: #8aa399; font-size: 12px; }
.kb-prop__before summary { cursor: pointer; }
.kb-prop__before p { margin: 4px 0 0; line-height: 1.6; white-space: pre-wrap; }
.kb-prop__warn { margin: 6px 0 0; color: #ffb36a; font-size: 12px; }
.kb-prop__edit { display: grid; gap: 3px; margin: 5px 0; font-size: 13px; line-height: 1.6; }
.kb-prop__edit del, .kb-prop__edit ins { white-space: pre-wrap; border-radius: 6px; padding: 2px 7px; }
.kb-prop__edit del { color: #b9a3a3; background: rgba(255, 122, 122, 0.08); text-decoration-color: rgba(255, 122, 122, 0.55); }
.kb-prop__edit ins { color: #e8fff4; background: rgba(30, 227, 138, 0.1); text-decoration: none; }
.kb-prop__eff, .kb-cf__eff { margin-top: 8px; padding: 6px 9px; border: 1px solid #1c2c26; border-radius: 8px; background: rgba(30, 227, 138, 0.05); color: #a9c2b7; font-size: 12px; line-height: 1.6; }
.kb-prop__eff b, .kb-cf__eff b { color: #1ee38a; font-size: 11px; font-weight: 700; }
.kb-prop__eff ul, .kb-cf__eff ul { margin: 2px 0 0; padding-left: 18px; }
.kb-prop__eff .is-warn, .kb-cf__eff .is-warn { margin: 4px 0 0; color: #ffb36a; }
.kb-prop__eff .is-ok, .kb-cf__eff .is-ok { margin: 4px 0 0; color: #1ee38a; }
.kb-msg__drop { border: 1px dashed rgba(255, 179, 106, 0.4); border-radius: 9px; padding: 6px 10px; color: #c9b39a; font-size: 12px; line-height: 1.6; }
.kb-msg__drop b { color: #ffb36a; font-weight: 600; }
.kb-msg__drop p { margin: 2px 0 0; }
.kb-prop__flag { margin: 6px 0 0; color: #ff9a9a; font-size: 12px; }
.kb-prop__acts { display: flex; gap: 8px; margin-top: 8px; }
.kb-prop__acts button {
  border: 1px solid #2a3c36;
  border-radius: 7px;
  background: none;
  color: #cfe7db;
  font-size: 12px;
  padding: 5px 14px;
  cursor: pointer;
}
.kb-prop__acts button.is-go { border-color: #1ee38a; background: #1ee38a; color: #04140c; font-weight: 700; }
.kb-prop__acts button:disabled { opacity: 0.5; cursor: not-allowed; }
.kb-prop__done { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: #1ee38a; font-size: 12px; }
.kb-prop__done.is-muted { color: #6f8279; }
.kb-prop__done button {
  border: 1px solid #24332c;
  border-radius: 6px;
  background: none;
  color: #9fd9bd;
  font-size: 12px;
  padding: 3px 8px;
  cursor: pointer;
}
@media (max-width: 960px) {
  .kb-dev { grid-template-columns: 1fr 1fr; }
  .kb-dev__st { grid-column: 1 / -1; }
}

/* 待确认的修改：卡片标记、底部提示条、确认框 */
.wiki-note__pend {
  display: none;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 5px;
  background: rgba(255, 213, 106, 0.16);
  color: #ffd56a;
  font-size: 11px;
  line-height: 20px;
}
.wiki-note.is-pending { border-color: rgba(255, 213, 106, 0.55); box-shadow: inset 3px 0 0 #ffd56a; }
.wiki-note.is-pending .wiki-note__pend { display: inline-block; }
.wiki-note.is-draft:not(.is-pending) .wiki-note__pend { display: inline-block; }
.wiki-note.is-deleted { opacity: 0.6; }
.wiki-note.is-deleted .wiki-note__title,
.wiki-note.is-deleted .wiki-note__body { text-decoration: line-through; pointer-events: none; }
.wiki-note__bar { gap: 4px; }
.wiki-note__bar .wiki-note__tools { margin-left: auto; }
.wiki-prop.is-pending { box-shadow: inset 3px 0 0 #ffd56a; background: rgba(255, 213, 106, 0.05); }
.kb-pendbar {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 96;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 16px;
  border: 1px solid rgba(255, 213, 106, 0.6);
  border-radius: 999px;
  background: #1d1a0f;
  color: #ffe9a8;
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.kb-pendbar[hidden] { display: none !important; }
.kb-pendbar.is-busy { opacity: 0.6; pointer-events: none; }
.kb-pendbar__dot { width: 8px; height: 8px; border-radius: 50%; background: #ffd56a; box-shadow: 0 0 10px #ffd56a; }
.kb-pendbar button {
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.kb-pendbar__undo { border: 1px solid rgba(255, 213, 106, 0.4); background: none; color: #ffe9a8; }
.kb-pendbar__go { border: 0; background: #ffd56a; color: #1d1a0f; }
@media (min-width: 961px) {
  body.portal.is-kb .kb-pendbar { left: calc((100vw - 384px) / 2); }
}
.kb-confirm {
  position: fixed;
  inset: 0;
  z-index: 2147483100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 8, 6, 0.72);
}
.kb-confirm[hidden] { display: none !important; }
.kb-confirm__box {
  width: min(640px, 100%);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(30, 227, 138, 0.45);
  border-radius: 14px;
  background: #0c1311;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.kb-confirm__box h3 { margin: 0; padding: 16px 18px 8px; color: #f3fff8; font-size: 17px; }
.kb-confirm__body { flex: 1; min-height: 0; overflow: auto; padding: 4px 18px 10px; color: #cfe7db; font-size: 14px; line-height: 1.65; }
.kb-confirm__body p { margin: 0 0 8px; }
.kb-confirm__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid #1a2420; }
.kb-confirm__foot button { border-radius: 8px; padding: 9px 16px; font-size: 14px; font-weight: 700; cursor: pointer; }
.kb-confirm__cancel, .kb-confirm__extra { border: 1px solid #2a3c36; background: none; color: #cfe7db; }
.kb-confirm__ok { border: 0; background: #1ee38a; color: #04140c; }
.kb-confirm__ok.is-danger { background: #ff7a7a; color: #1a0606; }
.kb-confirm__ok[hidden], .kb-confirm__extra[hidden] { display: none; }
.kb-cf { border: 1px solid #1c2622; border-radius: 10px; background: #101816; padding: 10px 12px; margin-bottom: 10px; }
.kb-cf__h { color: #1ee38a; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.kb-cf__title { color: #f3fff8; font-weight: 700; margin: 0 0 4px; }
.kb-cf__text { white-space: pre-wrap; }
.kb-cf__old, .kb-cf__new { white-space: pre-wrap; border-radius: 7px; padding: 6px 8px; margin-bottom: 6px; font-size: 13px; }
.kb-cf__old { background: rgba(255, 122, 122, 0.08); color: #b9a3a3; text-decoration: line-through; text-decoration-color: rgba(255, 122, 122, 0.5); }
.kb-cf__new { background: rgba(30, 227, 138, 0.08); color: #e8fff4; }
.kb-cf__old b, .kb-cf__new b { display: block; font-size: 11px; color: #8aa399; text-decoration: none; margin-bottom: 2px; }
.kb-cf__kv { display: flex; gap: 10px; font-size: 13px; margin-bottom: 4px; }
.kb-cf__kv span { flex-shrink: 0; width: 5.5em; color: #8aa399; }
.kb-cf__kv s { color: #b9a3a3; }
.kb-cf__warn { margin: 6px 0 0 !important; color: #ffb36a; font-size: 12px; }
.kb-cf__err { color: #ff9a9a; font-weight: 700; }
.kb-cf__lead { color: #8aa399; font-size: 13px; }
.kb-cf__list { margin: 0 0 6px; padding-left: 20px; }

/* 直播方式：挂车 / 不挂车 */
.wiki-cart { padding: 12px 14px; }
.wiki-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.wiki-seg__btn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid #24332c;
  border-radius: 9px;
  background: #0e1513;
  color: #cfe7db;
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}
.wiki-seg__btn b { font-size: 13px; }
.wiki-seg__btn small { color: #6f8279; font-size: 11px; }
.wiki-seg__btn.is-on { border-color: #1ee38a; background: #0f2219; }
.wiki-seg__btn.is-on b { color: #1ee38a; }
.wiki-hint.is-warn { color: #ffb36a; }

/* DeepSeek 助手：全局悬浮、可拖动、始终在最上层 */
.ds-logo { width: 26px; height: 26px; color: #4d6bfe; flex-shrink: 0; }
.ds-fab {
  position: fixed;
  right: 28px;
  bottom: 104px;
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 18px 0 9px;
  border: 1px solid rgba(30, 227, 138, 0.65);
  border-radius: 26px;
  background: linear-gradient(135deg, #143022, #0b1612);
  color: #1ee38a;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  cursor: grab;
  touch-action: none;
  user-select: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 0 3px rgba(30, 227, 138, 0.2), 0 0 24px rgba(30, 227, 138, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ds-fab .ds-logo {
  width: 34px;
  height: 34px;
  padding: 5px;
  border-radius: 50%;
  background: #fff;
}
.ds-fab[hidden], .ds-win[hidden], .ds-tip[hidden] { display: none !important; }
.ds-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6), 0 0 0 4px rgba(30, 227, 138, 0.35), 0 0 30px rgba(30, 227, 138, 0.5);
}
.ds-fab.is-dragging { cursor: grabbing; transform: scale(1.05); transition: none; }
.ds-fab.is-open { background: #1ee38a; color: #04140c; border-color: #1ee38a; }
.ds-fab__ring {
  position: absolute;
  inset: -6px;
  border-radius: 32px;
  border: 2px solid rgba(30, 227, 138, 0.55);
  animation: dsRing 2.6s ease-out infinite;
  pointer-events: none;
}
.ds-fab.is-open .ds-fab__ring { animation: none; opacity: 0; }
.ds-fab.is-pulse { animation: dsBounce 0.8s ease 3; }
.ds-fab__badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #ff5b5b;
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
@keyframes dsRing {
  0% { transform: scale(0.96); opacity: 0.9; }
  70% { transform: scale(1.12); opacity: 0; }
  100% { transform: scale(1.12); opacity: 0; }
}
@keyframes dsBounce {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
}
.ds-tip {
  position: fixed;
  z-index: 2147483000;
  max-width: 260px;
  padding: 10px 12px;
  border: 1px solid rgba(30, 227, 138, 0.6);
  border-radius: 10px;
  background: #0f2219;
  color: #e8fff4;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5), 0 0 18px rgba(30, 227, 138, 0.25);
  pointer-events: none;
}
.ds-win {
  position: fixed;
  right: 28px;
  bottom: 170px;
  z-index: 2147483001;
  width: 420px;
  height: min(640px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  min-width: 340px;
  min-height: 380px;
  border: 1px solid rgba(30, 227, 138, 0.45);
  border-radius: 14px;
  background: #0c1311;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(30, 227, 138, 0.15), 0 0 36px rgba(30, 227, 138, 0.12);
}
.ds-win.is-dragging { opacity: 0.92; }
.ds-win__h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 12px;
  background: linear-gradient(90deg, #12301f, #0e1d17 60%, #0b1411);
  border-bottom: 1px solid rgba(30, 227, 138, 0.35);
  cursor: grab;
  touch-action: none;
  user-select: none;
  flex-shrink: 0;
}
.ds-win.is-dragging .ds-win__h { cursor: grabbing; }
.ds-win__h .ds-logo {
  width: 30px;
  height: 30px;
  padding: 4px;
  border-radius: 50%;
  background: #fff;
}
.ds-win__title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ds-win__title b { color: #f3fff8; font-size: 14px; }
.ds-win__title small { color: #9fd9bd; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#dsStore {
  max-width: 130px;
  border: 1px solid rgba(30, 227, 138, 0.35);
  border-radius: 7px;
  background: #0a100e;
  color: #e8fff4;
  font-size: 12px;
  padding: 4px 6px;
}
.ds-win__btn {
  border: 1px solid rgba(30, 227, 138, 0.35);
  border-radius: 7px;
  background: none;
  color: #cfe7db;
  font-size: 12px;
  padding: 4px 8px;
  cursor: pointer;
}
.ds-win__btn:hover { background: rgba(30, 227, 138, 0.15); color: #1ee38a; }
.ds-win__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
}
.ds-win__ctx {
  margin: 0 12px;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(30, 227, 138, 0.1);
  color: #9fd9bd;
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
}
.ds-win__ctx.is-off { background: none; color: #6f8279; border: 1px dashed #2a3c36; }
.ds-win__grip {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, rgba(30, 227, 138, 0.5) 50%);
  touch-action: none;
}
@media (max-width: 760px) {
  .ds-win { width: calc(100vw - 16px); min-width: 0; }
}

/* 讲解规则：手机生成口播用的提示词 */
.kb-rules { padding: 14px 16px 6px; }
.kb-rules__top { display: flex; align-items: flex-start; gap: 12px; }
.kb-rules__top .wiki-hint { flex: 1; }
.kb-rules__group { border-top: 1px solid #1c2622; }
.kb-rules__gh {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 2px;
  border: 0;
  background: none;
  color: #dbe7e1;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.kb-rules__gh .wiki-ico { width: 16px; height: 16px; color: #6f8279; }
.kb-rules__gh span { color: #6f8279; font-size: 12px; }
.kb-rules__gh em {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: #8a9a92;
  font-size: 12px;
  font-style: normal;
}
.kb-rules__gh em .wiki-ico { width: 13px; height: 13px; }
.kb-rules__gh:hover b { color: #1ee38a; }
.kb-rules__hint { margin-left: 24px; }
.kb-rule {
  margin: 0 0 10px 24px;
  padding: 10px 12px;
  border: 1px solid #1c2622;
  border-radius: 8px;
  background: #0c1311;
}
.kb-rule.is-pending { border-color: rgba(255, 213, 106, 0.55); box-shadow: inset 3px 0 0 #ffd56a; }
.kb-rule__h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.kb-rule__h b { color: #c5d4cc; font-size: 13px; font-weight: 600; }
.kb-rule__tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 6px;
  border-radius: 5px;
  background: #18211e;
  color: #8a9a92;
  font-size: 11px;
  line-height: 20px;
}
.kb-rule__tag .wiki-ico { width: 11px; height: 11px; }
.kb-rule__tag.is-own { background: #10301f; color: #1ee38a; }
.kb-rule__tag.is-pend { background: rgba(255, 213, 106, 0.16); color: #ffd56a; }
.kb-rule__tools { display: inline-flex; gap: 4px; margin-left: auto; }
.kb-rule__tools button {
  border: 1px solid #24332c;
  background: none;
  color: #9fd9bd;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.kb-rule__tools button:hover { border-color: rgba(30, 227, 138, 0.6); color: #1ee38a; }
.kb-rule__note { margin: 0 0 4px; color: #6f8279; font-size: 12px; }
.kb-rules__persona { margin: 10px 0 14px; border: 1px solid rgba(30, 227, 138, 0.28); border-radius: 8px; padding: 10px 12px; }
.kb-rules__persona .kb-rule__def { margin-top: 6px; max-height: 260px; overflow: auto; color: #c5d4cc; font-size: 13px; }
.ow-label__aside { margin-left: 6px; color: #6f8279; font-weight: 400; }
.ow-label__aside.is-warn { color: #ffd56a; }
.kb-rule__body {
  width: 100%;
  max-height: 420px;
  border: 0;
  background: transparent;
  color: #c5d4cc;
  font: inherit;
  font-size: 13px;
  line-height: 1.7;
  outline: none;
  resize: vertical;
  white-space: pre-wrap;
}
.kb-rule__body[readonly] { color: #8a9a92; cursor: default; }
.kb-rule__def {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #101816;
  color: #8a9a92;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.kb-rule__def b { display: block; margin-bottom: 2px; color: #6f8279; font-weight: 600; }

/* 知识库切换：目录栏最上面，下面才是门店 */
.wiki-kb { margin: 0 0 10px; }
.wiki-kb__btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid #24332c;
  border-radius: 10px;
  padding: 8px 12px;
  background: #0f1815;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.wiki-kb__btn:hover { border-color: #2f4a3e; }
.wiki-kb__ico {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #1c2a24;
  color: #1ee38a;
  flex-shrink: 0;
}
.wiki-kb__meta { flex: 1; min-width: 0; }
.wiki-kb__meta small { display: block; color: #6f8279; font-size: 11px; }
.wiki-kb__meta b {
  display: block;
  margin-top: 1px;
  color: #e8fff4;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wiki-kbs {
  margin: 6px 0 0;
  padding: 4px;
  border-radius: 8px;
  background: #101816;
}
.wiki-kbs__row { display: flex; align-items: center; gap: 2px; border-radius: 6px; }
.wiki-kbs__row.is-on { background: #1c2a24; }
.wiki-kbs__pick {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: #cfe7db;
  text-align: left;
  padding: 7px 10px;
  cursor: pointer;
}
.wiki-kbs__pick b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wiki-kbs__row.is-on .wiki-kbs__pick b { color: #1ee38a; }
.wiki-kbs__pick small { display: block; margin-top: 1px; color: #6f8279; font-size: 11px; }
.wiki-kbs__hint { margin: 2px 10px 8px; color: #56685f; font-size: 11px; line-height: 1.5; }

/* 设备与同步：换知识库 */
.kb-dev.has-kb {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 0.8fr) minmax(0, 1.2fr);
}
.kb-dev.no-store { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.4fr); }
.kb-dev.no-store.has-kb { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 1.3fr); }
.kb-dev__kb { border-color: rgba(30, 227, 138, 0.35); }
.wiki-split {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 213, 106, 0.35);
  border-radius: 10px;
  background: rgba(255, 213, 106, 0.06);
}
.wiki-split b { color: #ffd56a; font-size: 13px; }
.wiki-split p { margin: 4px 0 8px; color: #a9c2b6; font-size: 12px; line-height: 1.55; }
.kb-devs__others { border-top: 1px dashed #24332c; margin-top: 4px; }
.kb-devs__oh { padding: 10px 16px 2px; color: #8aa399; font-size: 12px; }
.kb-dev.kb-dev--other { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) auto; border-top: 0; }
.kb-dev__move {
  border: 1px solid rgba(30, 227, 138, 0.5);
  border-radius: 7px;
  background: none;
  color: #1ee38a;
  font-size: 12px;
  padding: 5px 12px;
  cursor: pointer;
}
.kb-dev__move:hover { background: rgba(30, 227, 138, 0.1); }
.kb-admin-only[hidden] { display: none !important; }

/* 新建知识库向导 */
.ow-modal__dialog.kb-new {
  width: min(760px, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.kb-new .ow-modal__head { flex-shrink: 0; }
.kb-new__steps {
  flex-shrink: 0;
  display: flex;
  gap: 18px;
  padding: 12px 20px;
  border-bottom: 1px solid #1a2420;
  color: #56685f;
  font-size: 13px;
}
.kb-new__steps span { display: flex; align-items: center; gap: 6px; }
.kb-new__steps i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11px;
  border: 1px solid #2a3c36;
}
.kb-new__steps .is-on { color: #e8fff4; }
.kb-new__steps .is-on i { background: #1ee38a; border-color: #1ee38a; color: #04140c; font-weight: 700; }
.kb-new__steps .is-done { color: #8aa399; }
.kb-new__steps .is-done i { border-color: #1ee38a; color: #1ee38a; }
.kb-new__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kb-new__foot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px 16px;
  border-top: 1px solid #1a2420;
}
.kb-new__sum { margin-right: auto; color: #8aa399; font-size: 13px; }
.kb-new__sum b { color: #1ee38a; }
.kb-new__list { display: flex; flex-direction: column; gap: 6px; }
.kb-new__opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #1f2d27;
  border-radius: 10px;
  background: #0c1311;
  cursor: pointer;
}
.kb-new__opt:hover { border-color: #2f4a3e; }
.kb-new__opt input { margin-top: 3px; accent-color: #1ee38a; }
.kb-new__opt b { display: block; color: #e8fff4; font-size: 14px; font-weight: 600; }
.kb-new__opt small { display: block; margin-top: 2px; color: #6f8279; font-size: 12px; }
.kb-new__live {
  font-style: normal;
  font-size: 11px;
  font-weight: 400;
  color: #ff8a8a;
  border: 1px solid rgba(255, 138, 138, 0.4);
  border-radius: 5px;
  padding: 0 5px;
}
.kb-new__note,
.kb-new__lead {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #101816;
  color: #a9c2b6;
  font-size: 13px;
  line-height: 1.6;
}
.kb-new__note b { color: #1ee38a; }
.kb-new__sec h4 { margin: 4px 0 4px; color: #e8fff4; font-size: 14px; }
.kb-new__sec .ow-hint { margin-bottom: 8px; }
.kb-new__grp {
  border: 1px solid #1f2d27;
  border-radius: 10px;
  background: #0c1311;
  margin-bottom: 8px;
}
.kb-new__grp.is-off { opacity: 0.85; }
.kb-new__gh { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.kb-new__gh label { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; }
.kb-new__gh input { accent-color: #1ee38a; }
.kb-new__gh b { color: #e8fff4; font-size: 14px; font-weight: 600; }
.kb-new__gh small { color: #6f8279; font-size: 12px; }
.kb-new__more {
  margin-left: auto;
  border: 0;
  background: none;
  color: #1ee38a;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}
.kb-new__gd { margin: -6px 12px 8px 36px; color: #6f8279; font-size: 12px; }
.kb-new__docs {
  max-height: 260px;
  overflow-y: auto;
  padding: 4px 12px 10px 36px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 14px;
  border-top: 1px solid #16211d;
}
.kb-new__doc {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  color: #cfe7db;
  font-size: 13px;
  cursor: pointer;
  min-width: 0;
}
.kb-new__doc input { accent-color: #1ee38a; flex-shrink: 0; }
.kb-new__doc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-new__doc em { flex-shrink: 0; font-style: normal; font-size: 11px; color: #6f8279; }
.kb-new__doc.is-off { color: #56685f; cursor: default; }
.kb-new__sets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; padding: 2px 4px; }
.kb-new__done {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(30, 227, 138, 0.35);
  background: rgba(30, 227, 138, 0.06);
}
.kb-new__done b { color: #1ee38a; font-size: 15px; }
.kb-new__done p { margin: 4px 0 0; color: #a9c2b6; font-size: 13px; line-height: 1.6; }
@media (max-width: 720px) {
  .kb-new__docs, .kb-new__sets { grid-template-columns: 1fr; }
  .kb-new__steps { gap: 10px; font-size: 12px; }
  .kb-dev.has-kb, .kb-dev.kb-dev--other { grid-template-columns: 1fr 1fr; }
}

/* ---------- 门户 · API 配置（DeepSeek / 优云智算） ---------- */
.portal-nav__item--api .portal-nav__icon { color: #93bcd8; background: rgba(147, 188, 216, 0.12); }
.portal-nav__item--api.is-active .portal-nav__icon { color: #052217; background: rgba(4, 20, 12, 0.11); }
body.is-api .ds-fab, body.is-api .ds-tip, body.is-api .ds-win { display: none !important; }

.app-panel[data-panel="api"] {
  position: relative;
  overflow: auto;
  background:
    radial-gradient(1200px 420px at 50% -120px, rgba(34, 227, 122, 0.07), transparent 70%),
    #070b0a;
}
.apicfg {
  --a-bg: #070b0a;
  --a-surface: #0c1512;
  --a-surface-2: #111d19;
  --a-line: rgba(214, 245, 230, 0.08);
  --a-line-2: rgba(214, 245, 230, 0.13);
  --a-text: #e7f2ec;
  --a-text-2: #a8c1b5;
  --a-text-3: #6e887c;
  --a-accent: #4dffa0;
  --a-warm: #e2c27e;
  --a-coral: #ec9a8b;
  --a-sky: #93bcd8;
  flex: 1;
  min-height: 0;
  overflow: auto;
  color: var(--a-text);
  font-family: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}
.apicfg__wrap { max-width: 1240px; margin: 0 auto; padding: 30px 40px 80px; }
.apicfg__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.apicfg__eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; color: var(--a-accent); }
.apicfg__title { margin: 8px 0 0; font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-size: clamp(26px, 2.6vw, 34px); font-weight: 600; line-height: 1.3; letter-spacing: 0.01em; color: #f2faf6; }
.apicfg__lead { margin: 12px 0 26px; max-width: 860px; font-size: 15px; line-height: 1.85; color: var(--a-text-2); }
.apicfg-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 1080px) {
  .apicfg-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .apicfg-grid--wide { grid-column: 1 / -1; }
}
.apicfg-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--a-line);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(22, 36, 31, 0.9), rgba(12, 21, 18, 0.96));
  padding: 22px 24px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}
.apicfg-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.apicfg-card__title { margin: 0; font-size: 17px; font-weight: 700; color: #f2faf6; }
.apicfg-card__sub { margin: 5px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--a-text-3); }
.apicfg-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--a-line-2);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--a-text-2);
  background: var(--a-surface-2);
}
.apicfg-badge.is-ok { color: #052217; background: var(--a-accent); border-color: transparent; }
.apicfg-badge.is-warm { color: #ffe3a8; border-color: rgba(226, 194, 126, 0.4); background: rgba(226, 194, 126, 0.1); }
.apicfg-badge.is-bad { color: #ffc2b6; border-color: rgba(236, 154, 139, 0.4); background: rgba(236, 154, 139, 0.1); }
.apicfg-meta { display: grid; gap: 8px; }
.apicfg-meta__row { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 7px; border-bottom: 1px dashed rgba(214, 245, 230, 0.08);
  font-size: 13px; color: var(--a-text-2); }
.apicfg-meta__row:last-child { border-bottom: 0; padding-bottom: 0; }
.apicfg-meta__row strong { font-weight: 600; color: var(--a-text); }
.apicfg-meta__row code { border-radius: 6px; padding: 2px 6px; background: rgba(0, 0, 0, 0.22); color: #cfe6da;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.apicfg-form { display: grid; gap: 10px; }
.apicfg-field { display: grid; gap: 6px; }
.apicfg-field label { font-size: 12px; color: var(--a-text-3); }
.apicfg-field input { height: 42px; border: 1px solid var(--a-line-2); border-radius: 12px; padding: 0 14px;
  background: var(--a-surface-2); color: var(--a-text); font: inherit; font-size: 14px; }
.apicfg-field input:focus { outline: none; border-color: rgba(77, 255, 160, 0.45); box-shadow: 0 0 0 3px rgba(77, 255, 160, 0.1); }
.apicfg-field input::placeholder { color: #4d6157; }
.apicfg-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.apicfg-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; border: 1px solid transparent; border-radius: 12px;
  padding: 0 16px; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.apicfg-btn.is-primary { background: var(--a-accent); color: #052217; }
.apicfg-btn.is-primary:hover:not(:disabled) { filter: brightness(1.06); }
.apicfg-btn.is-ghost { border-color: var(--a-line-2); background: transparent; color: var(--a-text-2); }
.apicfg-btn.is-ghost:hover:not(:disabled) { color: var(--a-text); border-color: rgba(77, 255, 160, 0.4); }
.apicfg-btn.is-danger { border-color: rgba(236, 154, 139, 0.35); background: rgba(236, 154, 139, 0.1); color: #ffc2b6; }
.apicfg-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.apicfg-note { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--a-text-3); }
.apicfg-note.is-warn { color: var(--a-warm); }
.apicfg-note.is-error { color: var(--a-coral); }
.apicfg-foot { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  margin-top: 18px; padding: 16px 18px; border: 1px dashed var(--a-line-2); border-radius: 16px;
  font-size: 12.5px; line-height: 1.7; color: var(--a-text-3); }
.apicfg-empty { padding: 120px 0; text-align: center; font-size: 15px; color: var(--a-text-3); }
@media (max-width: 760px) {
  .apicfg__wrap { padding: 22px 18px 64px; }
  .apicfg-card { padding: 18px; }
}
.apicfg-gpu { display: grid; gap: 12px; }
.apicfg-gpu__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 12.5px; color: var(--a-text-3); }
.apicfg-gpu__bar span { display: inline-flex; align-items: center; }
.apicfg-gpu__bar span + span { padding-left: 16px; border-left: 1px solid var(--a-line); }
.apicfg-gpu__balance { color: var(--a-accent); font-weight: 700; }
.apicfg-text-btn { border: 0; background: transparent; color: var(--a-accent); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 0; }
.apicfg-text-btn:hover { text-decoration: underline; }
.apicfg-gpu__grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 1080px) { .apicfg-gpu__grid { grid-template-columns: 1fr 1fr; } }
.apicfg-gpu-card { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--a-line); border-radius: 14px; background: rgba(17, 29, 25, 0.72); padding: 16px 18px; }
.apicfg-gpu-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.apicfg-gpu-card__head strong { display: block; color: var(--a-text); font-size: 15px; font-weight: 700; }
.apicfg-gpu-card__head code { display: inline-block; margin-top: 3px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; color: var(--a-text-3); }
.apicfg-gpu-card__meta { display: grid; gap: 7px; }
.apicfg-gpu-card__meta > div { display: flex; justify-content: space-between; gap: 14px; font-size: 12.5px; color: var(--a-text-3); }
.apicfg-gpu-card__meta strong { font-weight: 600; color: var(--a-text-2); text-align: right; }
.apicfg-gpu-card__endpoint { max-width: 72%; overflow-wrap: anywhere; color: var(--a-accent) !important; }
.apicfg-gpu-card__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.apicfg-chip { border: 1px solid var(--a-line-2); border-radius: 999px; padding: 3px 9px; font-size: 11px; color: var(--a-text-3); background: rgba(0, 0, 0, 0.12); }
.apicfg-gpu-card__actions { display: flex; gap: 8px; padding-top: 2px; }
.apicfg-badge.is-on { color: #052217; background: var(--a-accent); border-color: transparent; }
.apicfg-badge.is-off { color: var(--a-text-3); }
.apicfg-badge.is-busy { color: #ffe3a8; border-color: rgba(226, 194, 126, 0.4); background: rgba(226, 194, 126, 0.1); }

/* ---------- API 配置页视觉细化（2026-11-04） ---------- */
.apicfg__wrap { max-width: 1180px; padding: 34px 40px 88px; }
.apicfg__head { margin-bottom: 2px; }
.apicfg__title { font-size: clamp(24px, 2.3vw, 31px); }
.apicfg__lead { margin: 12px 0 28px; font-size: 14px; }
.apicfg-grid { gap: 18px; align-items: stretch; }
.apicfg-card {
  height: 100%;
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(23, 38, 32, 0.92), rgba(12, 21, 18, 0.97));
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.apicfg-card__head { gap: 16px; }
.apicfg-card__title { font-size: 18px; letter-spacing: 0.01em; }
.apicfg-card__sub { margin-top: 6px; }
.apicfg-meta { gap: 9px; }
.apicfg-meta__row { padding-bottom: 9px; }
.apicfg-meta__row > span:first-child { color: var(--a-text-3); }
.apicfg-meta__row strong { text-align: right; }
.apicfg-form { margin-top: auto; gap: 12px; }
.apicfg-field input { height: 44px; background: rgba(8, 18, 14, 0.55); }
.apicfg-actions { gap: 10px; }
.apicfg-btn { height: 42px; border-radius: 13px; }
.apicfg-btn.is-primary { box-shadow: 0 8px 22px rgba(30, 227, 138, 0.16); }
.apicfg-btn.is-primary:hover:not(:disabled) { box-shadow: 0 10px 26px rgba(30, 227, 138, 0.24); }

/* GPU 实例：统一卡片密度和行高 */
.apicfg-gpu { margin-top: 2px; }
.apicfg-gpu__bar {
  padding: 10px 14px;
  border: 1px solid var(--a-line);
  border-radius: 12px;
  background: rgba(8, 18, 14, 0.45);
  gap: 6px 14px;
}
.apicfg-gpu__bar span + span { padding-left: 14px; }
.apicfg-gpu__bar .apicfg-text-btn { margin-left: auto; }
.apicfg-gpu__grid { gap: 14px; align-items: stretch; }
.apicfg-gpu-card {
  height: 100%;
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(21, 35, 29, 0.92), rgba(13, 22, 18, 0.96));
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.apicfg-gpu-card:hover { border-color: rgba(77, 255, 160, 0.24); transform: translateY(-1px); }
.apicfg-gpu-card__head strong { font-size: 16px; }
.apicfg-gpu-card__head code { color: #5d7469; }
.apicfg-gpu-card__meta { gap: 8px; }
.apicfg-gpu-card__meta > div { align-items: flex-start; gap: 12px; }
.apicfg-gpu-card__meta > div > span { flex: 0 0 82px; white-space: nowrap; color: var(--a-text-3); }
.apicfg-gpu-card__meta > div > strong {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}
.apicfg-gpu-card__meta > div.is-wrap > strong {
  white-space: normal;
  line-height: 1.45;
  text-align: right;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.apicfg-gpu-card__endpoint { word-break: break-all; }
.apicfg-gpu-card__chips { gap: 5px; margin-top: 2px; }
.apicfg-chip { padding: 3px 9px; font-size: 10.5px; color: var(--a-text-3); }
.apicfg-gpu-card__actions {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--a-line);
  gap: 10px;
}
.apicfg-gpu-card__actions .apicfg-btn { min-width: 92px; justify-content: center; flex: 0 0 auto; }
.apicfg-gpu-card__actions .apicfg-btn.is-ghost { color: var(--a-text-2); }
.apicfg-gpu-card__actions .apicfg-btn.is-ghost:not(:disabled):hover { border-color: rgba(236, 154, 139, 0.3); color: #ffc2b6; }
@media (max-width: 760px) {
  .apicfg__wrap { padding: 22px 16px 64px; }
  .apicfg-card { padding: 20px; }
  .apicfg-gpu-card { padding: 16px; }
  .apicfg-gpu-card__meta > div > span { flex-basis: 72px; }
}
.apicfg-gpu-plan { display: grid; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--a-line); }
.apicfg-gpu-plan__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.apicfg-gpu-plan__head > span { font-size: 12px; color: var(--a-text-3); }
.apicfg-gpu-plan__sum { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--a-text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.apicfg-plan-editor { display: grid; gap: 10px; margin-top: 4px; padding: 12px; border-radius: 12px;
  background: rgba(8, 18, 14, 0.45); border: 1px solid var(--a-line); }
.apicfg-plan-modes { display: inline-flex; gap: 3px; padding: 3px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.2); border: 1px solid var(--a-line); }
.apicfg-plan-mode { border: 0; border-radius: 999px; padding: 5px 12px; background: transparent;
  color: var(--a-text-3); font: inherit; font-size: 12px; cursor: pointer; }
.apicfg-plan-mode.is-on { background: var(--a-surface-2); color: var(--a-text); box-shadow: inset 0 0 0 1px var(--a-line-2); }
.apicfg-plan-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--a-text-2); }
.apicfg-plan-num { width: 68px; height: 34px; border: 1px solid var(--a-line-2); border-radius: 9px;
  background: rgba(8, 18, 14, 0.55); color: var(--a-text); padding: 0 8px; font: inherit; font-size: 12.5px; }
.apicfg-plan-slots { display: grid; gap: 8px; }
.apicfg-plan-slot { display: flex; align-items: center; gap: 8px; }
.apicfg-plan-time { display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 0 9px;
  border: 1px solid var(--a-line-2); border-radius: 9px; background: rgba(8, 18, 14, 0.55); }
.apicfg-plan-time:focus-within { border-color: rgba(77, 255, 160, 0.45); box-shadow: 0 0 0 2px rgba(77, 255, 160, 0.08); }
.apicfg-plan-time b { color: var(--a-text-3); font-weight: 400; font-size: 12px; }
.apicfg-plan-num2 { width: 2.1ch; border: 0; outline: 0; padding: 0; background: transparent; color: var(--a-text);
  font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; text-align: center; -moz-appearance: textfield; }
.apicfg-plan-num2::-webkit-outer-spin-button,
.apicfg-plan-num2::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.apicfg-plan-arrow { color: var(--a-text-3); font-size: 12px; }
.apicfg-plan-del { width: 26px; height: 26px; border: 1px solid var(--a-line-2); border-radius: 8px;
  background: transparent; color: var(--a-text-3); cursor: pointer; line-height: 1; }
.apicfg-plan-del:hover { color: #ffc2b6; border-color: rgba(236, 154, 139, 0.35); }
.apicfg-plan-add { height: 34px; font-size: 12.5px; padding: 0 12px; justify-self: start; }
.apicfg-plan-actions { display: flex; gap: 8px; margin-top: 2px; }
.apicfg-plan-actions .apicfg-btn { height: 34px; font-size: 12.5px; padding: 0 12px; }
.apicfg-summary {
  position: sticky;
  top: -1px;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 22px;
  padding: 11px 16px;
  border: 1px solid var(--a-line);
  border-radius: 14px;
  background: rgba(7, 14, 11, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}
.apicfg-summary__item { display: inline-flex; align-items: baseline; gap: 8px; }
.apicfg-summary__item + .apicfg-summary__item { padding-left: 18px; border-left: 1px solid var(--a-line); }
.apicfg-summary__item span { font-size: 12.5px; color: var(--a-text-3); }
.apicfg-summary__item strong { font-size: 19px; font-weight: 800; letter-spacing: 0.01em; }
.apicfg-summary__item strong.is-ds { color: #4dffa0; }
.apicfg-summary__item strong.is-cs { color: #93bcd8; }
.apicfg-meta__row > strong.apicfg-balance { color: #eafff2; font-size: 15px; font-weight: 800; }
.apicfg-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(5, 34, 23, 0.28);
  border-top-color: #052217;
  border-radius: 50%;
  animation: apicfg-spin 0.75s linear infinite;
}
.apicfg-btn.is-ghost .apicfg-spinner { border-color: rgba(214, 245, 230, 0.22); border-top-color: var(--a-text); }
.apicfg-btn.is-danger .apicfg-spinner { border-color: rgba(255, 195, 183, 0.25); border-top-color: #ffc2b6; }
.apicfg-btn.is-busy { cursor: progress; }
@keyframes apicfg-spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .apicfg-summary { position: static; }
}
