/* V5 — Stars & Dust frontend */

html, body {
  margin: 0; padding: 0;
  background: #0c0d1a;
  color: #c8cad8;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden;
  height: 100%;
}

#scene { position: fixed; inset: 0; }

/* ── Header ──────────────────────────────────────────── */
.hdr {
  position: fixed; top: 0; left: 0; right: 0;
  height: 52px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  background: rgba(12, 13, 26, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(47, 49, 70, 0.5);
  z-index: 30;
}
.hdr-left { display: flex; align-items: baseline; gap: 14px; }
.hdr-left .logo {
  font-weight: 600; font-size: 14px; letter-spacing: .04em;
  color: #fff; text-transform: uppercase;
}
.hdr-left .version {
  font-size: 11px; color: #7c3aed;
  text-transform: uppercase; letter-spacing: .12em;
}
.hdr-nav { display: flex; gap: 8px; }
.nav-link, .nav-btn {
  padding: 6px 12px;
  border: 1px solid #2f3146;
  border-radius: 6px;
  background: transparent;
  color: #8b8fa8;
  font-size: 12px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: all .18s;
}
.nav-link:hover, .nav-btn:hover {
  color: #fff; border-color: #7c3aed;
}
.nav-link.active {
  color: #fff; border-color: #7c3aed; background: rgba(124, 58, 237, 0.18);
}

/* ── Side panels ────────────────────────────────────── */
.panel {
  position: fixed;
  top: 70px;
  width: 320px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  background: rgba(12, 13, 26, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(47, 49, 70, 0.5);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 12px;
  line-height: 1.55;
  z-index: 20;
}
.panel-left  { left: 18px; width: 360px; }
.panel-right { right: 18px; width: 380px; max-height: calc(100vh - 90px); overflow-y: auto; }
.panel-left  { max-height: calc(100vh - 90px); overflow-y: auto; }
.panel-left::-webkit-scrollbar { width: 6px; }
.panel-left::-webkit-scrollbar-track { background: transparent; }
.panel-left::-webkit-scrollbar-thumb { background: rgba(124,58,237,.25); border-radius: 3px; }
/* Скрываем стандартный scrollbar когда не нужен */
.panel-right::-webkit-scrollbar { width: 6px; }
.panel-right::-webkit-scrollbar-track { background: transparent; }
.panel-right::-webkit-scrollbar-thumb { background: rgba(124,58,237,.25); border-radius: 3px; }

.panel-title {
  font-size: 10px; font-weight: 600;
  color: #7c3aed;
  text-transform: uppercase; letter-spacing: .14em;
  margin-bottom: 10px;
}
.panel-content {
  color: #b6b9cc;
}
.panel-content p { margin: 0 0 10px 0; }
.panel-content b, .panel-content strong { color: #e1e2ed; font-weight: 600; }

/* ── Legend rows (per cluster) ──────────────────────── */
.legend-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(47, 49, 70, 0.4);
  cursor: default;
  transition: background .15s;
}
.legend-row:last-child { border-bottom: none; }
.legend-row:hover { background: rgba(124, 58, 237, 0.06); border-radius: 4px; padding-left: 4px; }
.legend-chip {
  width: 12px; height: 12px; border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}
.legend-text {
  flex: 1; min-width: 0;
}
.legend-text .name {
  display: block;
  color: #e1e2ed; font-weight: 500; font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.legend-text .count {
  display: block; color: #8b8fa8; font-size: 10px;
}

/* ── Segment switcher ───────────────────────────────── */
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  background: #14152a;
  border-radius: 6px;
  padding: 3px;
}
.seg-btn {
  border: none;
  background: transparent;
  color: #8b8fa8;
  padding: 6px 4px;
  font-size: 11px;
  font-family: inherit;
  border-radius: 4px;
  cursor: pointer;
  transition: all .15s;
}
.seg-btn:hover { color: #fff; }
.seg-btn.active {
  background: rgba(124, 58, 237, 0.22);
  color: #fff;
}

/* Короткая легенда координат под сегментом Гибрид/MDS/UMAP */
.coord-legend {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.5;
  color: #8b8fa8;
}
body.display-mode .coord-legend { font-size: 14px; }

/* ── Article card ───────────────────────────────────── */
/* Карточка статьи — модалка по центру экрана */
.card {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(680px, calc(100vw - 80px));
  max-height: 82vh; overflow-y: auto;
  background: rgba(15, 17, 30, 0.98);
  border: 1px solid #2f3146;
  border-radius: 14px;
  padding: 28px 32px 32px;
  z-index: 60;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
}
.card.hidden { display: none; }
.card-close {
  position: absolute; top: 12px; right: 16px;
  background: transparent; border: none;
  color: #8b8fa8; font-size: 28px; cursor: pointer;
  line-height: 1; z-index: 2;
}
.card-close:hover { color: #fff; }
.card h3 { margin: 0 0 8px 0; font-size: 15px; color: #fff; line-height: 1.35; }
.card .meta { font-size: 11px; color: #8b8fa8; margin-bottom: 8px; }
.card .meta b { color: #e1e2ed; font-weight: 500; }

/* ── Article modal-card (V4-стиль .am-*) ──────────────────── */
.am-loading, .am-error {
  text-align: center; padding: 50px 20px; color: #8b8fa8; font-size: 14px;
}
.am-error { color: #ef4444; }
.am-title {
  font-size: 19px; font-weight: 600; color: #fff; line-height: 1.45;
  margin: 0 0 18px; padding-right: 40px;
}
.am-meta-grid { margin-bottom: 18px; }
.am-row {
  display: flex; gap: 12px; font-size: 13px; padding: 7px 0;
  border-bottom: 1px solid rgba(47, 49, 70, 0.4);
}
.am-row:last-child { border-bottom: none; }
.am-key {
  color: #8b8fa8; min-width: 92px; flex-shrink: 0; font-weight: 500;
}
.am-val { color: #d4d6e4; line-height: 1.5; }
.am-val a { color: #a78bfa; text-decoration: none; }
.am-section-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: #a78bfa; margin: 18px 0 10px;
}
.am-abstract {
  font-size: 13px; color: #b9bdd0; line-height: 1.7;
  padding: 16px 18px; background: rgba(47, 49, 70, 0.3); border-radius: 10px;
}
.am-abstract p { margin: 0 0 .8em; }
.am-abstract p:last-child { margin-bottom: 0; }
.am-affiliations { font-size: 12px; color: #8b8fa8; line-height: 1.5; }
.am-aff-item { padding: 5px 0; border-bottom: 1px solid rgba(47, 49, 70, 0.25); }
.am-aff-item:last-child { border-bottom: none; }
.am-badge {
  display: inline-block; padding: 3px 10px; border-radius: 10px;
  font-size: 11px; font-weight: 600; margin-bottom: 14px;
}

/* ── Loading ────────────────────────────────────────── */
#loading {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 13px; color: #8b8fa8; z-index: 100;
}

/* ── Cluster labels (DOM, projected from 3D) ────────── */
.cluster-label {
  position: absolute; transform: translate(-50%, -50%);
  font-size: 13px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  text-shadow:
    0 0 10px currentColor,
    0 0 24px currentColor,
    0 2px 6px rgba(0, 0, 0, 0.95);
}
.cluster-label .sub {
  display: block;
  font-size: 10px; font-weight: 400;
  letter-spacing: .04em; text-transform: none;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 2px;
}

@media (max-width: 900px) {
  .panel-left, .panel-right {
    width: calc(100vw - 36px);
    max-height: 30vh;
  }
  .panel-right { right: 18px; top: auto; bottom: 18px; }
}

/* ── Display mode (LED-экран — layout: cluster-cards | scene | articles-list) ── */
body.display-mode { cursor: none; }
body.display-mode .hdr,
body.display-mode .card,
body.display-mode #loading { display: none !important; }

/* Левая панель — кластерные карточки. Ширина и типографика как в V4 LED
   (#leftPanel: 1300px fixed, padding 48×40, font 22/1.6). */
body.display-mode .panel-left {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 1300px;
  min-width: 1300px;
  max-width: none;
  max-height: 100vh;
  padding: 48px 40px;
  background: rgba(21, 22, 37, 0.97);
  border-radius: 0;
  border: none;
  border-right: 1px solid #2f3146;
  font-size: 22px;
  line-height: 1.6;
}

/* Правая панель — список статей (V4-стиль), теперь видна на LED */
body.display-mode .panel-right {
  display: block !important;
  position: fixed;
  top: 0; right: 0; bottom: 0;
  left: auto;
  width: 26vw;
  max-width: none;
  max-height: 100vh;
  padding: 36px 32px;
  background: rgba(12, 13, 26, 0.97);
  border-radius: 0;
  border: none;
  border-left: 1px solid rgba(124, 58, 237, 0.35);
  font-size: 18px;
  line-height: 1.5;
  overflow-y: auto;
}

/* 3D сцена — между панелями: слева фикс 1300px (V4), справа 26vw. */
body.display-mode #scene { inset: 0; left: 1300px; right: 26vw; }

/* LED-масштаб для cluster-карточек — типографика как V4 .dp-* */
body.display-mode .cp-title { font-size: 42px; gap: 12px; margin-bottom: 12px; }
body.display-mode .cp-subtitle { font-size: 22px; margin-bottom: 28px; }
body.display-mode .cp-stat { font-size: 36px; }
body.display-mode .cp-stat-label { font-size: 18px; letter-spacing: .08em; }
body.display-mode .cp-stats-row { gap: 36px; margin-bottom: 28px; }
body.display-mode .cp-section { font-size: 18px; margin: 32px 0 16px; padding-bottom: 8px; }
body.display-mode .cp-card { padding: 22px; border-radius: 14px; margin-bottom: 14px; }
body.display-mode .cp-card-name { font-size: 22px; }
body.display-mode .cp-card-count { font-size: 18px; }
body.display-mode .cp-card-stats { font-size: 16px; gap: 24px; margin-bottom: 8px; }
body.display-mode .cp-dot { width: 16px; height: 16px; }
body.display-mode .cp-pill { font-size: 14px; padding: 4px 12px; }
body.display-mode .cp-card-top { font-size: 16px; margin-top: 12px; padding-top: 12px; }
body.display-mode .cp-card-top em { font-size: 13px; }
body.display-mode .cp-card.cp-card-hero .cp-card-name { font-size: 26px; }
body.display-mode .cp-info-card { padding: 18px 20px; }
body.display-mode .cp-item { font-size: 17px; padding: 8px 0; }
body.display-mode .cp-link-btn { font-size: 15px; padding: 8px 16px; }

/* 2-колоночная сетка карточек (как V4 .dp-cards-grid) — только на LED */
.cp-cards-grid { display: contents; }
body.display-mode .cp-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
body.display-mode .cp-cards-grid .cp-card { margin-bottom: 0; }

/* ── Article cards в правой панели LED ──────────────────────── */
body.display-mode .dp-article-card {
  background: rgba(21, 22, 37, 0.7);
  border: 1px solid rgba(47, 49, 70, 0.7);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: border-color .15s;
}
body.display-mode .dp-article-card:hover {
  border-color: rgba(124, 58, 237, .5);
}
body.display-mode .dp-article-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 6px;
}
body.display-mode .dp-article-meta {
  font-size: 12px;
  color: #8b8fa8;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
body.display-mode .dp-article-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 6px;
  color: #2f3146;
}
body.display-mode .dp-article-cited {
  font-size: 13px;
  color: #a78bfa;
  font-weight: 600;
}
body.display-mode .dp-empty {
  font-size: 14px;
  color: #6b6f8a;
  text-align: center;
  padding: 40px 12px;
  font-style: italic;
}

/* Breadcrumb наверху display — крупный, читаемый с дистанции */
body.display-mode .breadcrumb {
  top: 20px;
  left: calc(28vw + 32px);
  right: 32px;
  transform: none;
  font-size: 22px;
  padding: 16px 28px;
  border-radius: 32px;
  width: auto;
  max-width: calc(100vw - 28vw - 64px);
  justify-content: flex-start;
}
/* На LED-display breadcrumb показывает только название текущего уровня.
   Иерархия и так понятна по cards слева (header области + hero-карточка
   меты + описание подтемы). Кнопок навигации тут нет — display read-only. */
body.display-mode .breadcrumb .back-btn,
body.display-mode .breadcrumb .bc-root,
body.display-mode .breadcrumb .bc-sep { display: none; }
body.display-mode .breadcrumb .bc-current { font-size: 22px; }
body.display-mode .breadcrumb:empty,
body.display-mode .breadcrumb:not(:has(.bc-current)) { display: none; }

.display-stamp {
  position: fixed;
  bottom: 28px; right: 36px;
  z-index: 20;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(167, 139, 250, .85);
  font-weight: 500;
  pointer-events: none;
  text-shadow: 0 0 12px rgba(124, 58, 237, .5);
  text-align: right;
  display: none;
}
.display-stamp b {
  display: block;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .08em;
  color: #fff;
  margin-top: 4px;
  text-shadow: 0 0 14px rgba(124, 58, 237, .7);
}
.display-stamp .v {
  display: block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .12em;
  color: rgba(167, 139, 250, .55);
  margin-top: 6px;
}
body.display-mode .display-stamp { display: block; }

/* Display-button + dot indicator в шапке controller'а */
.display-dot {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: #ef4444;
  margin-left: 5px;
  vertical-align: middle;
  transition: background .2s;
}
.display-dot.connected { background: #34d399; }

/* ── L1-zoom: legend rows clickable ─────────────────────────── */
.legend-row-clickable {
  cursor: pointer;
  position: relative;
}
.legend-row-clickable .legend-arrow {
  color: #6b6f8a;
  font-size: 18px;
  font-weight: 300;
  margin-left: 4px;
  transition: transform .15s, color .15s;
}
.legend-row-clickable:hover .legend-arrow {
  color: #fff;
  transform: translateX(2px);
}

/* ── Breadcrumb (полный путь, всегда видим) ──────────────────── */
.breadcrumb {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px;
  background: rgba(12, 13, 26, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(124, 58, 237, 0.55);
  border-radius: 28px;
  font-size: 16px;
  letter-spacing: .03em;
  box-shadow: 0 4px 28px rgba(124, 58, 237, 0.18);
}
.breadcrumb .back-btn {
  background: rgba(124, 58, 237, 0.16);
  border: 1px solid #7c3aed;
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}
.breadcrumb .back-btn:hover {
  background: rgba(124, 58, 237, 0.32);
}
.breadcrumb .bc-sep {
  color: #6b6f8a;
  font-size: 18px;
  font-weight: 400;
}
.breadcrumb .bc-current {
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
}
.breadcrumb .bc-root {
  /* Корневой узел «Все 4 области» — без кнопки на L0, кликабельный на L1/L2 */
  font-weight: 600;
  color: #b9bdd0;
  padding: 6px 12px;
  border-radius: 16px;
  letter-spacing: .03em;
}
.breadcrumb .bc-root.bc-root-link {
  background: rgba(124, 58, 237, 0.10);
  border: 1px solid rgba(124, 58, 237, 0.45);
  color: #fff;
  cursor: pointer;
  transition: background .15s;
}
.breadcrumb .bc-root.bc-root-link:hover {
  background: rgba(124, 58, 237, 0.26);
}

/* (раньше breadcrumb был спрятан на display — теперь показываем; см. правила выше) */

/* Тач-стол: hover ничего не делает. Кликабельность подписей сигнализируется
   курсором (pointer) и activate-фидбэком (легкий scale на :active).
   labelLayer имеет pointer-events:none (чтобы не блокировать 3D-raycast),
   поэтому кликабельные подписи ОБЯЗАНЫ переопределить это на auto. */
.cluster-label-clickable {
  cursor: pointer;
  pointer-events: auto;
  transition: transform .12s;
  /* Маленькая невидимая «толстая» зона клика для пальца на тач-столе */
  padding: 6px 10px;
  margin: -6px -10px;
}
.cluster-label-clickable:active { transform: translate(-50%, -50%) scale(1.07); }

/* Подсветка активной мета-строки в легенде L1 (touch-toggle) */
.legend-meta-row { cursor: pointer; }
.legend-meta-row.active-meta {
  background: rgba(124, 58, 237, 0.18);
  border-radius: 4px;
}
.legend-meta-row.active-meta .name {
  color: #fff;
}

/* Layout radio + sliders */
.layout-opt {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  cursor: pointer;
  font-size: 11px;
}
.layout-opt input { margin: 0; cursor: pointer; }
.layout-opt span { color: #b6b9cc; }
.layout-opt input:checked + span { color: #fff; font-weight: 500; }
.layout-opt i { color: #6b6f8a; font-style: normal; font-size: 10px; }

.viz-row {
  display: grid;
  grid-template-columns: 110px 1fr 36px;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-size: 10.5px;
}
.viz-label { color: #8b8fa8; }
.viz-row input[type=range] {
  width: 100%;
  height: 3px;
  background: #2f3146;
  outline: none;
  border-radius: 2px;
  cursor: pointer;
}
.viz-row input[type=range]::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #7c3aed;
  cursor: pointer;
  border: 1px solid #fff;
}
.viz-val {
  color: #c8cad8;
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 10.5px;
}

/* Section titles в правой панели */
.section-title {
  font-size: 10px; color: #7c3aed; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  margin: 0 0 6px;
}
.layout-radio { font-size: 11px; color: #b6b9cc; }

/* Каждая опция layout/checkbox: title + small description */
.layout-opt {
  display: grid;
  grid-template-columns: 16px 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 1px;
  padding: 5px 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .12s;
}
.layout-opt:hover { background: rgba(124,58,237,.07); }
.layout-opt input { grid-row: 1 / span 2; align-self: center; margin: 0; cursor: pointer; }
.layout-opt span { color: #b6b9cc; font-size: 11.5px; }
.layout-opt input:checked ~ span { color: #fff; font-weight: 500; }
.layout-opt small {
  grid-column: 2;
  color: #6b6f8a;
  font-size: 10px;
  font-style: italic;
  line-height: 1.3;
}
.layout-opt input:checked ~ small { color: #a78bfa; }

.hint-italic {
  margin-top: 4px;
  font-size: 10px;
  color: #8b8fa8;
  font-style: italic;
}
.hr-dashed {
  border: none;
  border-top: 1px dashed rgba(47, 49, 70, 0.4);
  margin: 14px 0;
}
.block-title {
  color: #8b8fa8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 4px;
}

/* Параметры визуализации — расширенный grid с hint */
.viz-row {
  display: grid;
  grid-template-columns: 130px 1fr 36px;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 2px;
  padding: 6px 0;
  font-size: 11px;
}
.viz-label {
  grid-row: 1;
  grid-column: 1;
  color: #c8cad8;
  font-weight: 500;
}
.viz-row input[type=range] {
  grid-row: 1;
  grid-column: 2;
  width: 100%;
  height: 3px;
  background: #2f3146;
  outline: none;
  border-radius: 2px;
  cursor: pointer;
  appearance: none;
}
.viz-row input[type=range]::-webkit-slider-thumb {
  appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #7c3aed;
  cursor: pointer;
  border: 1px solid #fff;
  box-shadow: 0 0 6px rgba(124,58,237,.6);
}
.viz-val {
  grid-row: 1;
  grid-column: 3;
  color: #c8cad8;
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 10.5px;
}
.viz-hint {
  grid-row: 2;
  grid-column: 1 / span 3;
  font-size: 9.5px;
  color: #6b6f8a;
  font-style: italic;
  margin-top: 1px;
}

/* Плавающая кнопка «Центр» — низ по центру; card теперь слева, не перекрывает */
.floating-btn {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: rgba(12, 13, 26, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(124, 58, 237, 0.45);
  border-radius: 24px;
  color: #c8cad8;
  font-size: 12px;
  font-family: Inter, sans-serif;
  letter-spacing: .04em;
  cursor: pointer;
  transition: all .18s;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
.floating-btn:hover {
  border-color: #7c3aed;
  color: #fff;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.35);
}
.floating-btn:active { transform: translateX(-50%) scale(0.97); }
.floating-btn-icon {
  font-size: 16px;
  line-height: 1;
  color: #a78bfa;
}
.floating-btn-label {
  font-weight: 500;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .14em;
}

body.display-mode .floating-btn { display: none !important; }

/* ============================================================
   Cluster cards в левой панели (по образцу V4 .cp-*)
   ============================================================ */
.cp-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: .02em;
}
.cp-subtitle {
  font-size: 11px;
  color: #8b8fa8;
  margin-bottom: 14px;
}
.cp-stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.cp-stat-block { flex: 0 0 auto; }
.cp-stat {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}
.cp-stat-label {
  font-size: 9px;
  color: #8b8fa8;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 2px;
}
.cp-section {
  font-size: 10px;
  font-weight: 700;
  color: #7c3aed;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin: 18px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(47, 49, 70, 0.6);
}
.cp-card {
  background: rgba(21, 22, 37, 0.7);
  border: 1px solid rgba(47, 49, 70, 0.7);
  border-radius: 10px;
  padding: 12px 13px;
  margin-bottom: 9px;
  cursor: pointer;
  transition: border-color .15s, transform .12s, box-shadow .15s;
  position: relative;
  overflow: hidden;
}
.cp-card:hover {
  border-color: rgba(124, 58, 237, .8);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
}
.cp-card:active { transform: translateY(0); }
.cp-card.cp-card-static { cursor: default; }
.cp-card.cp-card-static:hover { transform: none; box-shadow: none; border-color: rgba(47, 49, 70, 0.7); }
.cp-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.cp-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.cp-card-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex: 1;
  line-height: 1.25;
}
.cp-card-count {
  font-size: 11px;
  color: #b9bdd0;
  font-weight: 600;
  white-space: nowrap;
}
.cp-card-stats {
  display: flex;
  gap: 12px;
  font-size: 10px;
  color: #8b8fa8;
  margin-bottom: 6px;
}
.cp-card-stats span strong { color: #e7ecff; font-weight: 600; }
.cp-bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .06);
  overflow: hidden;
}
.cp-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .4s;
}
.cp-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.cp-pill {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(124, 58, 237, .12);
  color: #c8cad8;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
  white-space: nowrap;
}
.cp-pill:hover {
  background: rgba(124, 58, 237, .25);
  color: #fff;
  border-color: rgba(124, 58, 237, .6);
}
.cp-pill.cp-pill-static { cursor: default; }
.cp-pill.cp-pill-static:hover { background: rgba(124,58,237,.12); color: #c8cad8; border-color: transparent; }
.cp-card-top {
  font-size: 10px;
  color: #8b8fa8;
  line-height: 1.4;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(124, 58, 237, .18);
}
.cp-card-top strong { color: #e7ecff; font-weight: 600; }
.cp-card-top em {
  display: block;
  margin-top: 2px;
  color: #6b6f8a;
  font-style: normal;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.cp-info-card {
  background: rgba(21, 22, 37, 0.55);
  border: 1px solid rgba(47, 49, 70, 0.5);
  border-radius: 8px;
  padding: 10px 11px;
  margin-bottom: 8px;
}

/* Большая карточка меты в режиме meta-detail */
.cp-card.cp-card-hero {
  background: rgba(124, 58, 237, 0.06);
  border-color: rgba(124, 58, 237, 0.35);
  padding: 14px 15px;
  margin-bottom: 12px;
}
.cp-card.cp-card-hero .cp-card-name { font-size: 15px; }
.cp-card.cp-card-hero .cp-card-stats { gap: 14px; font-size: 11px; }

/* Кнопка-ссылка «← К 7 мета-группам» */
.cp-link-btn {
  background: transparent;
  border: 1px solid rgba(124, 58, 237, 0.4);
  color: #c8cad8;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 12px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: .02em;
  transition: background .12s, color .12s, border-color .12s;
}
.cp-link-btn:hover {
  background: rgba(124, 58, 237, 0.18);
  color: #fff;
  border-color: rgba(124, 58, 237, 0.7);
}
.cp-info-card .cp-section {
  margin-top: 0;
  border: none;
  padding-bottom: 0;
}
.cp-item {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(47, 49, 70, 0.3);
}
.cp-item:last-child { border-bottom: none; }
.cp-item-name { color: #e7ecff; }
.cp-item-count { color: #8b8fa8; }
