﻿/* =========================================================================
 * onticards · 行业智能化全景图谱 — 图谱视图样式
 * 米色主题 #f7f3e9，暖色系
 * ========================================================================= */

:root {
  --bg: #f7f3e9;
  --bg-elevated: #fffdf7;
  --surface: #f1ead9;
  --surface-hover: #e9e0ca;
  --text: #2d2a26;
  --text-secondary: #6b655c;
  --text-tertiary: #a39a8b;
  --border: #e5ddc9;
  --border-strong: #d4c9ae;
  --primary: #ff6b2c;
  --primary-soft: rgba(255, 107, 44, 0.10);

  --c-data: #2563eb;
  --c-knowledge: #059669;
  --c-skill: #9333ea;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 2px 8px rgba(87, 72, 50, 0.08);
  --shadow-md: 0 8px 24px rgba(87, 72, 50, 0.12);
  --shadow-lg: 0 24px 60px rgba(87, 72, 50, 0.18);

  --header-h: 62px;
  --footer-h: 46px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; overflow: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===================== 顶栏 ===================== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(247, 243, 233, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-inner {
  max-width: 1600px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.brand {
  display: flex; align-items: center;
  text-decoration: none; color: inherit;
}
.brand-title {
  font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", "Songti SC", serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
  line-height: 1.2;
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.view-nav { display: flex; align-items: center; gap: 6px; }
.view-btn {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.view-btn:hover { border-color: var(--border-strong); color: var(--text); }
.view-btn svg { width: 15px; height: 15px; }
.view-btn.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  cursor: default;
}

/* ===================== 行业切换器（样式与语言切换器一致） ===================== */
.industry-switch { position: relative; margin-left: 14px; }
.industry-btn {
  display: flex; align-items: center; gap: 6px;
  font-family: inherit;
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  max-width: 220px;
}
.industry-btn:hover { border-color: var(--border-strong); color: var(--text); }
.industry-btn > svg:first-child { width: 15px; height: 15px; flex: none; }
.industry-btn > span { overflow: hidden; text-overflow: ellipsis; }
.industry-btn .industry-caret { width: 12px; height: 12px; opacity: 0.7; transition: transform 0.2s ease; flex: none; }
.industry-switch:hover .industry-caret,
.industry-switch.open .industry-caret { transform: rotate(180deg); }

.industry-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  padding: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 200;
}
.industry-switch:hover .industry-menu,
.industry-switch.open .industry-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.industry-switch:hover .industry-menu::before,
.industry-switch.open .industry-menu::before {
  content: '';
  position: absolute;
  top: -14px; left: 0; right: 0;
  height: 14px;
}
.industry-item {
  display: flex; align-items: center;
  width: 100%;
  font-family: inherit;
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-align: left;
}
.industry-item:hover { background: var(--surface); color: var(--text); }
.industry-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}
.industry-item.active::after {
  content: '✓';
  margin-left: auto;
  font-size: 12px;
}

/* ===================== 语言切换器 ===================== */
.lang-switch { position: relative; margin-left: 6px; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  font-family: inherit;
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.lang-btn:hover { border-color: var(--border-strong); color: var(--text); }
.lang-btn > svg:first-child { width: 15px; height: 15px; }
.lang-btn .lang-caret { width: 12px; height: 12px; opacity: 0.7; transition: transform 0.2s ease; }
.lang-switch:hover .lang-caret,
.lang-switch.open .lang-caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 138px;
  padding: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 200;
}
.lang-switch:hover .lang-menu,
.lang-switch.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-switch:hover .lang-menu::before,
.lang-switch.open .lang-menu::before {
  content: '';
  position: absolute;
  top: -14px; left: 0; right: 0;
  height: 14px;
}
.lang-item {
  display: flex; align-items: center;
  width: 100%;
  font-family: inherit;
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.lang-item:hover { background: var(--surface); color: var(--text); }
.lang-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}
.lang-item.active::after {
  content: '✓';
  margin-left: auto;
  font-size: 12px;
}

/* ===================== 图谱舞台 ===================== */
.graph-stage {
  position: fixed;
  top: var(--header-h); left: 0; right: 0; bottom: var(--footer-h);
  background: var(--bg);
}

#graphContainer,
#networkContainer {
  width: 100%;
  height: 100%;
}
#graphContainer canvas,
#networkContainer canvas { outline: none; }

/* ===================== 工具栏 ===================== */
.graph-toolbar {
  position: absolute;
  top: 20px; right: 24px;
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 7px;
  box-shadow: var(--shadow-sm);
  z-index: 50;
}

.tb-btn {
  display: flex; align-items: center; gap: 6px;
  border: none; background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px; font-weight: 600;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  white-space: nowrap;
}
.tb-btn:hover { background: var(--surface); color: var(--text); }
.tb-btn.active { background: var(--surface); color: var(--accent, #ff6b2c); box-shadow: inset 0 0 0 1.5px var(--accent, #ff6b2c); }
.tb-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.tb-btn.icon-only { padding: 7px; }
.tb-btn:active { transform: scale(0.95); }

.tb-divider {
  width: 1px; height: 20px;
  background: var(--border);
  margin: 0 2px;
}

.tb-zoom-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
  min-width: 44px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ===================== 图例 ===================== */
.graph-legend {
  position: absolute;
  left: 24px; bottom: 24px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  z-index: 50;
}
.legend-item {
  display: flex; align-items: center; gap: 9px;
  font-size: 12px; color: var(--text-secondary); font-weight: 500;
}
.legend-dot {
  width: 12px; height: 12px; border-radius: 4px;
  flex-shrink: 0;
}
.legend-dot.outline {
  background: transparent;
  border: 2px solid;
  border-radius: 4px;
}

/* ===================== 加载与提示 ===================== */
.graph-loading {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
  background: var(--bg);
  z-index: 60;
  color: var(--text-secondary);
  font-size: 14px;
  transition: opacity 0.4s ease;
}
.graph-loading.hide { opacity: 0; pointer-events: none; }
.loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.graph-toast {
  position: absolute;
  top: 76px; left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--text);
  color: #fdf9f0;
  font-size: 13px; font-weight: 500;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 80;
}
.graph-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===================== 节点详情模态窗 ===================== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(45, 42, 38, 0.32);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.22s ease;
}
.modal-mask.show { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  width: 92vw;
  max-width: 640px;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal.modal-skill { max-width: 900px; height: 84vh; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  padding: 22px 26px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-head-main { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.modal-badge {
  align-self: flex-start;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}
.modal-badge.badge-data { background: rgba(37,99,235,0.10); color: var(--c-data); }
.modal-badge.badge-knowledge { background: rgba(5,150,105,0.10); color: var(--c-knowledge); }
.modal-badge.badge-skill { background: rgba(147,51,234,0.10); color: var(--c-skill); }
.modal-title { font-size: 19px; font-weight: 800; line-height: 1.35; }

.modal-close {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 9px;
  color: var(--text-tertiary);
  cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.modal-close:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.modal-close svg { width: 16px; height: 16px; }

.modal-body {
  padding: 22px 26px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* 数据/知识节点弹窗内容 */
.detail-para {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text-secondary);
}
.detail-para strong { color: var(--text); }

.kv-block { margin-bottom: 20px; }
.kv-block:last-child { margin-bottom: 0; }
.kv-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 800;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 9px;
}
.kv-label::before {
  content: "";
  width: 4px; height: 14px;
  border-radius: 2px;
  background: var(--kv-color, var(--c-knowledge));
}
.kv-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  padding-left: 11px;
}

/* ===================== 技能节点：代码仓库 ===================== */
.skill-desc {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.repo-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.repo-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 800;
}
.repo-title svg { width: 16px; height: 16px; color: var(--text-secondary); }
.repo-count { font-size: 12px; color: var(--text-tertiary); font-weight: 500; margin-left: 6px; }
.repo-actions { display: flex; gap: 8px; align-items: center; }
.repo-toggle-all {
  border: none; background: transparent;
  color: var(--c-skill); font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  padding: 4px 6px;
}
.repo-toggle-all:hover { text-decoration: underline; }

.repo-panel {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fbf8f1;
  min-height: 320px;
  flex: 1;
}

.repo-tree {
  width: 250px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 12px 8px;
  background: var(--bg-elevated);
}
.repo-tree-item {
  display: flex; align-items: center; gap: 7px;
  width: 100%;
  border: none; background: transparent;
  font-size: 13px; color: var(--text-secondary);
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  font-family: "SF Mono", "JetBrains Mono", Consolas, monospace;
  transition: background 0.15s ease;
}
.repo-tree-item:hover { background: var(--surface); }
.repo-tree-item.active { background: rgba(147,51,234,0.10); color: var(--c-skill); font-weight: 600; }
.repo-tree-item .tree-caret {
  width: 12px; height: 12px; flex-shrink: 0;
  transition: transform 0.15s ease;
  color: var(--text-tertiary);
}
.repo-tree-item.open > .tree-caret { transform: rotate(90deg); }
.repo-tree-item .tree-icon { width: 14px; height: 14px; flex-shrink: 0; }
.repo-tree-item .tree-tag {
  margin-left: auto;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(37,99,235,0.10);
  color: var(--c-data);
  font-weight: 600;
  flex-shrink: 0;
}
.repo-tree-children { padding-left: 16px; }
.repo-tree-children.collapsed { display: none; }

.repo-code {
  flex: 1;
  overflow: auto;
  min-width: 0;
  display: flex; flex-direction: column;
}
.repo-code-path {
  font-size: 12px;
  font-family: "SF Mono", Consolas, monospace;
  color: var(--text-tertiary);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  flex-shrink: 0;
}
.repo-code pre {
  flex: 1;
  margin: 0;
  padding: 16px 18px;
  font-family: "SF Mono", "JetBrains Mono", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: #3f3a33;
  white-space: pre;
  overflow: auto;
}
.repo-code-empty {
  flex: 1;
  display: grid; place-items: center;
  color: var(--text-tertiary);
  font-size: 13px;
}

/* 一键打包下载 */
.modal-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 26px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.foot-hint { font-size: 12px; color: var(--text-tertiary); }
.btn-download {
  display: flex; align-items: center; gap: 7px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 13.5px; font-weight: 700;
  padding: 9px 18px;
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(255, 107, 44, 0.3);
}
.btn-download:hover { background: #ff5a14; transform: translateY(-1px); }
.btn-download:active { transform: translateY(0); }
.btn-download svg { width: 15px; height: 15px; }

/* ===================== 响应式 ===================== */
@media (max-width: 900px) {
  .graph-toolbar { right: 12px; top: 12px; }
  .tb-btn span { display: none; }
  .graph-legend { left: 12px; bottom: 12px; padding: 10px 12px; gap: 6px; }
  .brand-site, .brand-sep { display: none; }
  .repo-panel { flex-direction: column; }
  .repo-tree { width: 100%; max-height: 160px; border-right: none; border-bottom: 1px solid var(--border); }
}

/* =========================================================================
 * 右侧详情面板（两个视图共用）
 * ========================================================================= */
.otc-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 580px;
  max-width: 92vw;
  background: #fffdf7;
  box-shadow: -10px 0 30px rgba(45,42,38,.14);
  z-index: 1300;
  transform: translateX(105%);
  transition: transform .32s ease;
  display: flex;
  flex-direction: column;
  font-family: inherit;
}
.otc-panel.open { transform: translateX(0); }

.otc-panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px 12px 18px;
  border-bottom: 1px solid #eee5d0;
  background: #fbf6ea;
  flex-shrink: 0;
}
.otc-panel-crumb {
  flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
  font-size: 12.5px; color: #8a7a5c; min-width: 0;
}
.otc-crumb-item {
  border: none; background: none; padding: 2px 6px; margin: 0;
  font-size: 12.5px; color: #8a7a5c; cursor: pointer;
  border-radius: 6px; max-width: 180px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
  font-family: inherit;
}
.otc-crumb-item:hover { background: #f0e7d2; color: #574832; }
.otc-crumb-item.current { color: #2d2a26; font-weight: 600; cursor: default; }
.otc-crumb-item.current:hover { background: none; }
.otc-crumb-sep { color: #c9bda0; user-select: none; }

.otc-panel-close {
  border: none; background: none; cursor: pointer; color: #8a7a5c;
  width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  padding: 0; flex-shrink: 0;
}
.otc-panel-close:hover { background: #f0e7d2; color: #2d2a26; }
.otc-panel-close svg { width: 17px; height: 17px; }

.otc-panel-body {
  flex: 1; overflow-y: auto; padding: 20px 22px 40px;
  scrollbar-width: thin; scrollbar-color: #d8cdb4 transparent;
}
.otc-panel-body::-webkit-scrollbar { width: 6px; }
.otc-panel-body::-webkit-scrollbar-thumb { background: #d8cdb4; border-radius: 3px; }

.otc-panel-hero {
  border-left: 4px solid var(--hero, #ff6b2c);
  background: linear-gradient(180deg, #fbf6ea, #fffdf7);
  border-radius: 12px; padding: 16px 18px; margin-bottom: 22px;
}
.otc-hero-kicker { font-size: 11.5px; color: #8a7a5c; letter-spacing: .4px; margin-bottom: 5px; }
.otc-hero-title { font-size: 21px; font-weight: 700; color: #2d2a26; line-height: 1.35; margin-bottom: 8px; }
.otc-hero-desc { font-size: 13.5px; line-height: 1.8; color: #4a443a; margin: 0; }

.otc-panel-section-title {
  font-size: 13px; font-weight: 700; color: #574832;
  margin: 20px 0 10px; padding-left: 9px;
  border-left: 3px solid var(--sec, #d8cdb4);
}

.otc-domain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.otc-domain-card {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid #eee5d0; background: #fffdf7; border-radius: 10px;
  padding: 12px 14px; cursor: pointer; text-align: left; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.otc-domain-card:hover { border-color: var(--acc, #ff6b2c); box-shadow: 0 3px 12px rgba(87,72,50,.10); }
.otc-domain-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--acc, #ff6b2c); flex-shrink: 0; }
.otc-domain-name { font-size: 13.5px; font-weight: 600; color: #2d2a26; flex: 1; }
.otc-domain-modules { font-size: 11px; color: #a29478; white-space: nowrap; }

.otc-module-list { display: flex; flex-direction: column; gap: 8px; }
.otc-module-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid #eee5d0; background: #fffdf7; border-radius: 10px;
  padding: 12px 14px; cursor: pointer; text-align: left; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.otc-module-card:hover { border-color: #d8cdb4; box-shadow: 0 3px 12px rgba(87,72,50,.10); }
.otc-module-name { font-size: 13.5px; font-weight: 600; color: #2d2a26; }
.otc-module-count { font-size: 11.5px; color: #a29478; white-space: nowrap; }

.otc-group-block { margin-bottom: 14px; }
.otc-group-title {
  font-size: 12px; font-weight: 700; color: #574832; margin-bottom: 8px;
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  background: color-mix(in srgb, var(--g, #0891b2) 10%, #fffdf7);
  border: 1px solid color-mix(in srgb, var(--g, #0891b2) 30%, #fffdf7);
}
.otc-scenario-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.otc-scenario-chip {
  border: 1px solid color-mix(in srgb, var(--chip, #0891b2) 35%, #eee5d0);
  background: #fffdf7; color: #2d2a26; border-radius: 20px;
  padding: 6px 12px; font-size: 12.5px; cursor: pointer; font-family: inherit;
  transition: border-color .15s, background .15s;
}
.otc-scenario-chip:hover { border-color: var(--chip, #0891b2); background: color-mix(in srgb, var(--chip, #0891b2) 7%, #fffdf7); }

.otc-scenario-loading { padding: 30px 0; text-align: center; color: #a29478; font-size: 13px; }

.otc-entity-list { display: flex; flex-direction: column; gap: 8px; }
.otc-entity-row {
  display: flex; align-items: baseline; gap: 12px;
  border: 1px solid #eee5d0; background: #fffdf7; border-radius: 10px;
  padding: 10px 14px; cursor: pointer; text-align: left; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.otc-entity-row:hover { border-color: var(--row, #2563eb); box-shadow: 0 3px 12px rgba(87,72,50,.10); }
.otc-entity-name {
  font-size: 13px; font-weight: 600; color: #2d2a26; flex-shrink: 0;
  max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.otc-entity-desc { font-size: 12px; color: #a29478; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.otc-entity-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.otc-entity-badge {
  font-size: 11.5px; font-weight: 700; color: #fff;
  background: var(--badge, #2563eb); border-radius: 20px; padding: 3px 12px; flex-shrink: 0;
}
.otc-entity-title { font-size: 18px; font-weight: 700; color: #2d2a26; line-height: 1.4; }
/* 必须/可选徽标（数据、知识） */
.otc-must {
  font-size: 11px; font-weight: 700; border-radius: 10px; padding: 2px 10px;
  flex-shrink: 0; margin-left: auto; cursor: help;
}
.otc-must.req { color: #fff; background: #1d6adf; }
.otc-must.opt { color: #6b655c; background: #ece5d3; }
.otc-mini-tag {
  font-size: 10.5px; font-weight: 700; border-radius: 9px; padding: 1px 8px;
  flex-shrink: 0; margin-left: 6px; cursor: help;
}
.otc-mini-tag.req { color: #fff; background: #1d6adf; }
.otc-mini-tag.opt { color: #6b655c; background: #ece5d3; }
.otc-para { font-size: 13.5px; line-height: 1.8; color: #4a443a; margin: 0 0 16px; }
.otc-shared-note {
  font-size: 12px; color: #b45309; background: #fdf3e3; border: 1px solid #f3dfba;
  border-radius: 8px; padding: 7px 12px; margin-bottom: 14px;
}
.otc-kv { margin-bottom: 14px; }
.otc-kv-label {
  font-size: 11.5px; font-weight: 700; color: #574832; margin-bottom: 4px;
  display: inline-block; padding: 1px 8px; border-radius: 4px;
  background: color-mix(in srgb, var(--kv, #059669) 12%, #fffdf7);
  border: 1px solid color-mix(in srgb, var(--kv, #059669) 25%, #fffdf7);
}
.otc-kv-text { font-size: 13px; line-height: 1.75; color: #4a443a; }

.otc-repo { margin-top: 6px; }
.otc-repo-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed #eee5d0;
}
.otc-empty { padding: 30px 0; text-align: center; color: #a29478; font-size: 13px; }

/* ===================== 底部版权 ===================== */
.site-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--footer-h);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  z-index: 900;
}
.footer-copy {
  display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  justify-content: center;
  font-size: 13px; color: var(--text-tertiary);
  letter-spacing: 0.2px;
}
.footer-brand {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.footer-brand:hover { text-decoration: underline; }
.footer-rights { color: var(--text-tertiary); }
