/* hola-v2 · адаптивная тема (светлая Holaspirit / тёмная why.html).
   Палитра вынесена в CSS-переменные; имена одинаковы во всех темах,
   меняются только значения, поэтому все экраны перекрашиваются сами.
   :root / [data-theme="light"] — СВЕТЛАЯ (по умолчанию, Apple-стиль).
   [data-theme="dark"] — ТЁМНАЯ (исходная палитра why.html).
   auto (нет data-theme) + системная тёмная → тёмная через media-query. */

/* ───────── СВЕТЛАЯ тема (Holaspirit, Apple-стиль) ───────── */
:root,
:root[data-theme="light"] {
  /* фон-сцена (вертикальный градиент) */
  --bg-top: #F7F8FA;
  --bg-bottom: #EEF1F6;
  --paper: #EEF1F6;
  /* стекло-панели */
  --card: #FFFFFF;
  --card-glass: rgba(255,255,255,.82);
  --glass-stroke: rgba(15,23,42,.08);
  --line: rgba(15,23,42,.08);
  --line-soft: rgba(15,23,42,.06);
  /* тёмная панель (таб-бар) — на телефоне остаётся тёмной, как у iOS */
  --board: #1B2230;
  --board-deep: #0F1623;
  --chalk: #F6F7F9;
  --chalk-dim: #9AA0AD;
  /* текст */
  --ink: #1A2233;
  --ink-soft: #64748B;
  /* акцент — синий */
  --accent: #2563EB;
  --accent-deep: #1D4ED8;
  --accent-soft: rgba(37,99,235,.10);
  --accent-text: #1D4ED8; /* насыщенный синий для текста на светлом accent-soft */
  /* синий сайдбар (Holaspirit) */
  --sidebar-bg: linear-gradient(180deg, #3B82F6, #2563EB);
  --sidebar-ink: #FFFFFF;
  --sidebar-ink-soft: rgba(255,255,255,.72);
  --sidebar-line: rgba(255,255,255,.16);
  --sidebar-hover: rgba(255,255,255,.12);
  --sidebar-active-bg: rgba(255,255,255,.20);
  --sidebar-active-ink: #FFFFFF;
  /* семантика */
  --ok: #16A34A;   --ok-soft: rgba(22,163,74,.12);
  --warn: #D97706; --warn-soft: rgba(217,119,6,.12);
  --danger: #DC2626; --danger-soft: rgba(220,38,38,.12);
  --info: #2563EB; --info-soft: rgba(37,99,235,.12);
  --abstain: #D97706;
  /* радиусы / тени */
  --r-card: 22px;
  --r-ctrl: 14px;
  --shadow-card: 0 6px 18px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-pop: 0 16px 40px rgba(15,23,42,.14);
  --ease: cubic-bezier(.22,1,.36,1);
}

/* ───────── ТЁМНАЯ тема (исходная why.html, не менять облик) ───────── */
:root[data-theme="dark"] {
  /* фон-сцена (вертикальный градиент) */
  --bg-top: #0C0D11;
  --bg-bottom: #14161C;
  --paper: #1A1D26;
  /* стекло-панели */
  --card: #14161C;
  --card-glass: rgba(20,22,28,.72);
  --glass-stroke: rgba(255,255,255,.08);
  --line: rgba(255,255,255,.08);
  --line-soft: rgba(255,255,255,.06);
  /* тёмная панель (таб-бар) */
  --board: #14161C;
  --board-deep: #0C0D11;
  --chalk: #F6F7F9;
  --chalk-dim: #9AA0AD;
  /* текст */
  --ink: #F6F7F9;
  --ink-soft: #9AA0AD;
  /* акцент — индиго */
  --accent: #6366F1;
  --accent-deep: #4F46E5;
  --accent-soft: rgba(99,102,241,.18);
  --accent-text: #A5B4FC; /* светлый индиго для текста на тёмном accent-soft */
  /* сайдбар = карточка/текст (как было) */
  --sidebar-bg: var(--card);
  --sidebar-ink: var(--ink);
  --sidebar-ink-soft: var(--ink-soft);
  --sidebar-line: var(--line);
  --sidebar-hover: var(--bg-bottom);
  --sidebar-active-bg: var(--accent-soft);
  --sidebar-active-ink: var(--accent-text);
  /* семантика */
  --ok: #22C55E;   --ok-soft: rgba(34,197,94,.16);
  --warn: #F59E0B; --warn-soft: rgba(245,158,11,.16);
  --danger: #F26060; --danger-soft: rgba(242,96,96,.16);
  --info: #6366F1; --info-soft: rgba(99,102,241,.16);
  --abstain: #F59E0B;
  /* радиусы / тени */
  --shadow-card: 0 8px 22px rgba(0,0,0,.40), 0 1px 1px rgba(0,0,0,.30);
  --shadow-pop: 0 12px 30px rgba(0,0,0,.50);
}

/* ───────── auto: системная тёмная → тёмная палитра ─────────
   действует только когда явная тема не выбрана (нет data-theme) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg-top: #0C0D11;
    --bg-bottom: #14161C;
    --paper: #1A1D26;
    --card: #14161C;
    --card-glass: rgba(20,22,28,.72);
    --glass-stroke: rgba(255,255,255,.08);
    --line: rgba(255,255,255,.08);
    --line-soft: rgba(255,255,255,.06);
    --board: #14161C;
    --board-deep: #0C0D11;
    --chalk: #F6F7F9;
    --chalk-dim: #9AA0AD;
    --ink: #F6F7F9;
    --ink-soft: #9AA0AD;
    --accent: #6366F1;
    --accent-deep: #4F46E5;
    --accent-soft: rgba(99,102,241,.18);
    --accent-text: #A5B4FC;
    --sidebar-bg: var(--card);
    --sidebar-ink: var(--ink);
    --sidebar-ink-soft: var(--ink-soft);
    --sidebar-line: var(--line);
    --sidebar-hover: var(--bg-bottom);
    --sidebar-active-bg: var(--accent-soft);
    --sidebar-active-ink: var(--accent-text);
    --ok: #22C55E;   --ok-soft: rgba(34,197,94,.16);
    --warn: #F59E0B; --warn-soft: rgba(245,158,11,.16);
    --danger: #F26060; --danger-soft: rgba(242,96,96,.16);
    --info: #6366F1; --info-soft: rgba(99,102,241,.16);
    --abstain: #F59E0B;
    --shadow-card: 0 8px 22px rgba(0,0,0,.40), 0 1px 1px rgba(0,0,0,.30);
    --shadow-pop: 0 12px 30px rgba(0,0,0,.50);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  font-size: 15px; line-height: 1.5; color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom)) fixed;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, textarea, select { font: inherit; color: var(--ink); }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }

/* каркас приложения: телефонная колонка по центру */
.app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; position: relative; }

/* ── верхняя панель (TopBar) ── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px 12px; background: var(--bg-top);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 20px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.topbar .sub { font-size: 11px; font-weight: 600; color: var(--accent); margin-top: 1px; }
.topbar .logo {
  width: 38px; height: 38px; border-radius: 10px; margin-left: auto; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; box-shadow: 0 6px 14px rgba(99,102,241,.40);
}
.role-badge { margin-left: auto; font-size: 9px; font-weight: 800; color: #fff;
  background: var(--accent); border-radius: 99px; padding: 3px 8px; letter-spacing: .04em; }
.role-badge + .logo { margin-left: 8px; }

/* ── сегмент-бар (как в приложении, закреплён сверху) ── */
.segbar { display: flex; gap: 7px; overflow-x: auto; padding: 10px 14px 4px;
  background: var(--bg-top); position: sticky; top: 63px; z-index: 25; scrollbar-width: none; }
.segbar::-webkit-scrollbar { display: none; }
.seg { flex: none; font-size: 13px; font-weight: 700; color: var(--ink);
  padding: 9px 16px; border-radius: 99px; background: var(--card); border: 1px solid var(--line);
  transition: all .15s var(--ease); white-space: nowrap; }
.seg[aria-current="true"] { background: var(--accent); color: #fff; border-color: transparent; }

/* ── контент ── */
.scroll { flex: 1; overflow-y: auto; padding: 14px 14px 110px; }
.view { display: none; animation: fade .2s var(--ease); }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }

/* карточка-стекло */
.card { background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-card); padding: 18px; box-shadow: var(--shadow-card); margin-bottom: 12px; }
.card.tap { transition: transform .12s var(--ease); }
.card.tap:active { transform: scale(.985); }

.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.tiny { font-size: 11px; }
h2.title { font-size: 17px; font-weight: 800; margin: 2px 0 2px; letter-spacing: -.01em; }
.pagesub { color: var(--ink-soft); font-size: 13.5px; margin: 0 0 16px; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--accent); color: #fff; border-radius: var(--r-ctrl); padding: 12px 16px;
  font-weight: 700; font-size: 15px; transition: background .15s, transform .1s; width: 100%; }
.btn:active { transform: scale(.98); }
.btn:hover { background: var(--accent-deep); }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--paper); }
.btn.sm { width: auto; padding: 9px 14px; font-size: 13.5px; border-radius: 11px; }
.btn.ok { background: var(--ok); } .btn.ok:hover { filter: brightness(.94); }

/* поля */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.input, .textarea, select.input {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-ctrl);
  padding: 12px 14px; font-size: 15px; transition: border-color .15s; }
.input:focus, .textarea:focus { border-color: var(--accent); outline: none; }
.textarea { min-height: 84px; resize: vertical; }

/* аватар-кружок */
.av { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent-text); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; }
.av.sm { width: 28px; height: 28px; font-size: 11px; }

/* чипы / пилюли */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  border-radius: 99px; padding: 3px 10px; background: var(--accent-soft); color: var(--accent-text); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  border-radius: 99px; padding: 3px 11px; }
.pill.live { background: var(--accent-soft); color: var(--accent-text); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.muted { background: var(--paper); color: var(--ink-soft); border: 1px solid var(--line); }

/* ── карта кругов (вложенные пузыри) ── */
.map-wrap { display: flex; flex-direction: column; gap: 12px; }
.circle-node { border-radius: var(--r-card); padding: 16px 18px;
  background: var(--card); border: 1px solid var(--line-soft); box-shadow: var(--shadow-card); }
.circle-node .cn-head { display: flex; align-items: center; gap: 12px; }
.circle-node .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); flex: none; opacity: .8; }
.circle-node .cn-name { font-weight: 800; font-size: 16px; }
.circle-node .cn-purpose { color: var(--ink-soft); font-size: 13px; margin-top: 3px; }
.circle-node .cn-meta { margin-left: auto; font-size: 12px; color: var(--ink-soft); font-weight: 600; text-align: right; }
.children { margin: 12px 0 0 16px; padding-left: 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.child { background: var(--paper); border: 1px solid var(--line-soft); border-radius: 16px; padding: 13px 15px; }
.child .cn-name { font-size: 14.5px; }

/* список ролей */
.role-row { display: flex; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.role-row:first-child { border-top: 0; }
.role-row .r-body { flex: 1; min-width: 0; }
.role-row .r-name { font-weight: 700; font-size: 15px; }
.role-row .r-purpose { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.role-row .r-fillers { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.kv { font-size: 13px; margin-top: 6px; }
.kv b { font-weight: 700; }
.bullet { margin: 3px 0 0 0; padding-left: 16px; }
.bullet li { font-size: 13px; color: var(--ink); margin: 2px 0; }

/* ── лента вопросов/предложений ── */
.tl-item { display: flex; gap: 13px; padding: 15px; }
.tl-body { flex: 1; min-width: 0; }
.tl-title { font-weight: 700; font-size: 15.5px; line-height: 1.35; }
.tl-snip { color: var(--ink-soft); font-size: 13px; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-meta { display: flex; align-items: center; gap: 10px; margin-top: 9px; flex-wrap: wrap; font-size: 12px; color: var(--ink-soft); }

/* ── карточка консента (голосование) ── */
.consent .policy { font-size: 16px; font-weight: 700; line-height: 1.4; }
.consent .tension { color: var(--ink-soft); font-size: 13.5px; margin-top: 6px; }
.tally { display: flex; align-items: center; gap: 14px; margin: 16px 0 6px; }
.donut { flex: none; }
.legend { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.legend .lg { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend .sw { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.legend .n { margin-left: auto; font-weight: 700; }
.countdown { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }
.countdown b { color: var(--ink); font-weight: 700; }
.obj { background: var(--danger-soft); border-radius: 12px; padding: 10px 12px; margin-top: 10px; font-size: 13px; }
.obj b { color: var(--danger); }

/* строка задачи (мини-CRM) */
.task { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.task:first-child { border-top: 0; }
.task .box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); flex: none; transition: .15s; }
.task .box.done { background: var(--ok); border-color: var(--ok); }
.task .t-title { font-size: 14.5px; font-weight: 600; }
.task.done .t-title { color: var(--ink-soft); text-decoration: line-through; }
.group-h { font-size: 12.5px; font-weight: 800; color: var(--ink-soft); text-transform: uppercase;
  letter-spacing: .04em; margin: 18px 4px 6px; }

/* ── визард встречи ── */
.wiz-steps { display: flex; gap: 6px; margin-bottom: 14px; }
.wiz-steps .st { flex: 1; text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-soft);
  padding: 8px 4px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.wiz-steps .st.on { background: var(--accent); color: #fff; border-color: transparent; }
.wiz-steps .st.done { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.presence { display: flex; gap: 6px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.agenda-item { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-soft); align-items: flex-start; }
.agenda-item.cur { background: var(--accent-soft); border-radius: 12px; padding: 14px; border-top: 0; }
.agenda-item .a-num { width: 24px; height: 24px; border-radius: 50%; background: var(--paper);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex: none; }
.agenda-item.done .a-num { background: var(--ok); color: #fff; }

/* поиск */
.searchbar { position: relative; margin-bottom: 14px; }
.searchbar input { padding-left: 40px; }
.searchbar svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }

/* пусто */
.empty { text-align: center; color: var(--ink-soft); padding: 40px 20px; font-size: 14px; }
.empty .em-ico { font-size: 30px; margin-bottom: 8px; opacity: .5; }

/* ── нижний таб-бар (плавающий, тёмное стекло — как в iOS) ── */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px;
  width: calc(min(480px, 100vw) - 24px); display: flex; padding: 6px;
  background: rgba(20,22,28,.86); backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,.08); border-radius: 24px;
  box-shadow: 0 12px 30px rgba(0,0,0,.28); z-index: 40; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px; border-radius: 16px; color: var(--chalk-dim); transition: .15s; }
.tab .ti { font-size: 19px; line-height: 1; }
.tab .tt { font-size: 9.5px; font-weight: 700; }
.tab[aria-current="true"] { color: #fff; }
.tab[aria-current="true"] .ti { transform: translateY(-1px); }
.tab .badge { position: absolute; }

/* модалка / шторка снизу */
.sheet-bg { position: fixed; inset: 0; background: rgba(8,9,12,.45); z-index: 50; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet-bg.show { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 50%; transform: translateX(-50%) translateY(100%); bottom: 0;
  width: min(480px, 100vw); background: var(--bg-top); border-radius: 24px 24px 0 0;
  padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); z-index: 51; transition: transform .26s var(--ease);
  max-height: 90dvh; overflow-y: auto; box-shadow: 0 -10px 40px rgba(0,0,0,.2); }
.sheet.show { transform: translateX(-50%) translateY(0); }
.sheet .grip { width: 38px; height: 4px; border-radius: 99px; background: var(--line); margin: 8px auto 14px; }
.sheet h3 { font-size: 18px; font-weight: 800; margin: 0 0 4px; }

/* тост */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 92px; z-index: 60;
  background: var(--board-deep); color: var(--chalk); padding: 13px 18px; border-radius: 14px;
  font-size: 13.5px; box-shadow: var(--shadow-pop); display: flex; align-items: center; gap: 10px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: 90%; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.show.in { transform: translateX(-50%) translateY(-4px); }
.toast .dot-ok { color: #34D399; }

.row { display: flex; gap: 10px; align-items: center; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mt { margin-top: 12px; } .mb { margin-bottom: 12px; }
.wa-note { font-size: 12px; color: var(--ink-soft); display: flex; gap: 7px; align-items: center; margin-top: 10px; }
.wa-note .wa { color: #25D366; font-weight: 800; }

/* ════════════════════════════════════════════════════════════════
   v2.1 · Новая шапка (референс), карта-круги, десктоп-адаптив
   ════════════════════════════════════════════════════════════════ */

/* ── shell: на телефоне sidebar скрыт ── */
.shell { display: block; }
.sidebar { display: none; }

/* ── Шапка в стиле референса (приветствие + аватар + колокольчик) ── */
.topbar { align-items: flex-start; }
.tb-greet { display: flex; flex-direction: column; }
.greet-line { font-size: 12.5px; font-weight: 700; color: var(--accent); letter-spacing: .01em; }
.greet-name { font-size: 24px; font-weight: 800; margin: 1px 0 0; letter-spacing: -.02em; line-height: 1.1; }
.tb-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ic-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; background: var(--card);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card); transition: transform .1s; }
.ic-btn:active { transform: scale(.94); }
.ic-bell { font-size: 17px; filter: grayscale(.2); }
.ic-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%;
  background: #22C55E; border: 2px solid var(--card); }
.av-photo { width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px;
  box-shadow: 0 6px 14px rgba(99,102,241,.40); }

/* ── Поиск-пилюля (референс) ── */
.globalsearch { position: sticky; top: 0; z-index: 24; display: flex; align-items: center; gap: 10px;
  margin: 0; padding: 10px 14px 12px; background: var(--bg-top); }
.globalsearch::before { content: none; }
.globalsearch { }
.globalsearch .gs-ico { position: absolute; margin-left: 16px; color: var(--ink-soft); pointer-events: none; display: flex; }
.globalsearch input { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 99px;
  padding: 14px 16px 14px 46px; font-size: 15px; box-shadow: var(--shadow-card); }
.globalsearch input:focus { outline: none; border-color: var(--accent); }
.gs-btn { width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(99,102,241,.40); transition: transform .1s, background .15s; }
.gs-btn:hover { background: var(--accent-deep); }
.gs-btn:active { transform: scale(.94); }

/* segbar чуть ниже из-за sticky-поиска */
.segbar { top: 0; }

/* ── Карта: SVG-сцена кругов ── */
.map-head { margin-bottom: 6px; }
.map-stage { width: 100%; aspect-ratio: 1 / 1; max-height: 70vh;
  background: radial-gradient(120% 120% at 50% 40%, var(--accent-soft), rgba(99,102,241,0) 60%), var(--card);
  border: 1px solid var(--line-soft); border-radius: var(--r-card); box-shadow: var(--shadow-card);
  overflow: hidden; margin-bottom: 10px; }
.map-stage svg { width: 100%; height: 100%; display: block; touch-action: manipulation; }
.mc-circle { transition: stroke .2s, fill .2s; }
.mc-node:hover .mc-circle { filter: brightness(.985); }
/* подписи кругов: текст темы + контрастное гало (читается на любом фоне круга) */
.mc-label { fill: var(--ink); font-weight: 800; pointer-events: none; font-family: inherit;
  stroke: var(--bg-top); stroke-width: 4px; paint-order: stroke fill; stroke-linejoin: round; }
.mc-sub { fill: var(--ink-soft); font-weight: 600; pointer-events: none;
  stroke: var(--bg-top); stroke-width: 3px; paint-order: stroke fill; stroke-linejoin: round; }
/* подпись роли — белым на цветном кружке роли */
.mc-rolelabel { fill: #fff; font-weight: 700; pointer-events: none; font-family: inherit;
  stroke: rgba(0,0,0,.28); stroke-width: 2px; paint-order: stroke fill; stroke-linejoin: round; }
.map-crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.crumb { font-size: 13px; font-weight: 700; color: var(--ink-soft); padding: 6px 10px; border-radius: 9px; }
.crumb.cur { color: var(--ink); background: var(--paper); }
.crumb.act { margin-left: auto; color: var(--accent); }
.crumb-sep { color: var(--ink-soft); opacity: .5; }
.map-results { margin-top: 4px; }

/* ════════════════════════════════════════════════════════════════
   ДЕСКТОП ≥ 900px: боковая навигация, широкий контент, 2 колонки
   ════════════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100dvh; max-width: 1400px; margin: 0 auto; }

  /* sidebar показываем */
  .sidebar { display: flex; flex-direction: column; gap: 6px;
    border-right: 1px solid var(--sidebar-line); background: var(--sidebar-bg);
    color: var(--sidebar-ink);
    padding: 22px 14px; position: sticky; top: 0; height: 100dvh; }
  .side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; }
  .side-brand .logo { width: 40px; height: 40px; border-radius: 12px;
    background: var(--sidebar-active-bg); color: var(--sidebar-ink);
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px;
    box-shadow: 0 6px 14px rgba(15,23,42,.18); }
  .side-word { font-weight: 800; font-size: 19px; letter-spacing: -.01em; color: var(--sidebar-ink); }
  .side-school { font-size: 11px; color: var(--sidebar-ink-soft); font-weight: 600; margin-top: 1px; }
  .side-nav { display: flex; flex-direction: column; gap: 4px; }
  .snav { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
    padding: 12px 14px; border-radius: 12px; font-weight: 700; font-size: 15px; color: var(--sidebar-ink);
    transition: background .12s; }
  .snav .si { font-size: 18px; width: 22px; text-align: center; color: var(--sidebar-ink-soft); }
  .snav:hover { background: var(--sidebar-hover); }
  .snav[aria-current="true"] { background: var(--sidebar-active-bg); color: var(--sidebar-active-ink); }
  .snav[aria-current="true"] .si { color: var(--sidebar-active-ink); }
  .side-foot { margin-top: auto; padding: 10px 8px 0; }

  /* основная колонка */
  .app { max-width: none; min-height: 100dvh; }
  .tabbar { display: none; }              /* нижний таб-бар не нужен */
  .scroll { padding: 6px 32px 48px; }

  /* единая центрованная колонка контента (шапка/поиск/вьюхи) */
  .topbar, .globalsearch, .view { max-width: 920px; margin-left: auto; margin-right: auto; width: 100%; }
  .topbar { position: static; padding: 26px 0 8px; border-bottom: 0; background: transparent; }
  .greet-name { font-size: 28px; }
  .globalsearch { position: static; padding: 8px 0 18px; background: transparent; }
  .scroll { padding: 6px 40px 56px; }

  .view.active { animation: none; }

  /* карта: компактная по центру, ярлыки не липнут */
  .map-stage { max-height: 60vh; max-width: 640px; margin-left: auto; margin-right: auto; }
  .map-crumbs, .map-head, .map-results { max-width: 640px; margin-left: auto; margin-right: auto; }

  /* лента и «мой фокус» в 2 колонки (masonry через CSS columns) */
  #view-feed, #view-focus { column-count: 2; column-gap: 22px; }
  #view-feed > *, #view-focus > * { break-inside: avoid; }
  /* заголовки секций и шапки экранов — на всю ширину */
  #view-feed > .group-h, #view-feed > div:first-child,
  #view-focus > .group-h, #view-focus > .card:first-child { column-span: all; }
}

/* ── v2.2 · секции сайдбара + метрики (Holaspirit-разделы) ── */
.side-sec { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--sidebar-ink-soft, var(--ink-soft)); opacity: .7; padding: 16px 14px 5px; }
.side-theme { margin-bottom: 6px; opacity: .85; }
.met-card { }
.met-body { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.met-value { display: flex; align-items: baseline; gap: 4px; }
.met-num { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.met-unit { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.met-spark { margin-left: auto; opacity: .9; }
.met-actions { margin-top: 10px; }
.met-title { font-weight: 700; font-size: 15.5px; }

/* ── подсказка «что здесь делать» (плашка над контентом) ── */
.hint { display: flex; align-items: flex-start; gap: 10px;
  background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: 13.5px;
  line-height: 1.45; color: var(--ink); }
.hint-ic { flex: none; font-size: 15px; line-height: 1.3; }
.hint-text { flex: 1; }
.hint-x { flex: none; width: 22px; height: 22px; border-radius: 50%; font-size: 12px;
  color: var(--ink-soft); background: transparent; line-height: 1; }
.hint-x:hover { background: rgba(127,127,127,.15); color: var(--ink); }
/* кнопка «?» онбординга не должна налезать на нижний таб-бар (мобайл) */
@media (max-width: 899px){ .tour-help, #tourHelp { bottom: 86px !important; } }

/* ── баннер тест-режима WhatsApp ── */
.test-banner { margin: 0 14px 10px; padding: 9px 13px; border-radius: 12px;
  background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn);
  font-size: 12.5px; font-weight: 600; text-align: center; }
@media (min-width: 900px){ .test-banner { margin: 0 0 12px; max-width: 920px; margin-left: auto; margin-right: auto; } }
