/* v2-leads.css — дизайн-система v2 (docs/37), слайс «Лиды»: доска, шторка «Фильтры»,
 * шторка/карточка лида, «Разбор». Подключается в index.html ПОСЛЕ app.css — здесь все
 * стили слайса и переопределения legacy-классов, которые сохранены ради тестов/BC
 * (.lead, .lead-tabs, .lead-pane, .block, .dossier-*, .seg--stage …).
 * Цвет несёт смысл: коралл — только главная кнопка; статусы — --st-*; повод — --why-*.
 * Все :hover — только в @media (hover: hover) and (pointer: fine). */

/* ═══════════════════════════ общие примитивы v2 ═══════════════════════════ */

/* статус-чип: точка + текст на --st-*-bg */
.lv-chip {
  --chip-bg: var(--st-lost-bg); --chip-fg: var(--st-lost-fg); --chip-dot: var(--col-lost);
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 26px; padding: 0 10px; border-radius: var(--radius-pill);
  background: var(--chip-bg); color: var(--chip-fg); border: 0;
  font: inherit; font-size: 13px; font-weight: var(--weight-medium); line-height: 1; white-space: nowrap;
}
.lv-chip__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--chip-dot); flex: none; }
.lv-chip__chev { width: 12px; height: 12px; stroke-width: 2.4; margin-right: -2px; }
.lv-chip--btn { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; position: relative; }
.lv-chip--btn::after { content: ""; position: absolute; inset: -9px -4px; } /* тач-зона ≥44 */
.lv-chip--btn:active { transform: scale(0.97); }
.lv-chip--btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.lv-chip--new { --chip-bg: var(--st-new-bg); --chip-fg: var(--st-new-fg); --chip-dot: var(--col-new); }
.lv-chip--contact { --chip-bg: var(--st-contact-bg); --chip-fg: var(--st-contact-fg); --chip-dot: var(--col-contacted); }
.lv-chip--work { --chip-bg: var(--st-work-bg); --chip-fg: var(--st-work-fg); --chip-dot: var(--col-in_progress); }
.lv-chip--meet { --chip-bg: var(--st-meet-bg); --chip-fg: var(--st-meet-fg); --chip-dot: var(--col-meeting); }
.lv-chip--won { --chip-bg: var(--st-won-bg); --chip-fg: var(--st-won-fg); --chip-dot: var(--col-won); }
.lv-chip--lost { --chip-bg: var(--st-lost-bg); --chip-fg: var(--st-lost-fg); --chip-dot: var(--col-lost); }
.lv-chip--overdue { --chip-bg: var(--st-overdue-bg); --chip-fg: var(--st-overdue-fg); --chip-dot: #DC2626; }
/* legacy .status-pill/.badge--overdue на тех же узлах — нейтрализуем их рамку/фон */
.lv-chip.status-pill, .lv-chip.badge--overdue { border: 0; padding: 0 10px; font-size: 13px; background: var(--chip-bg); color: var(--chip-fg); }

.lv-meta { margin: 0; font-size: 13px; line-height: 18px; color: var(--text-faint); }
.lv-spacer { flex: 1 1 auto; }
.lv-label {
  margin: 0; font-size: 12px; font-weight: var(--weight-semibold); line-height: 16px;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-faint);
}
.lv-tag {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 32px; padding: 0 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; color: var(--text-muted); white-space: nowrap;
}
.lv-tag .icon { width: 14px; height: 14px; stroke-width: 2; }
.lv-tag--label { height: 22px; padding: 0 8px; font-size: 12px; }

/* кнопки v2 */
.lv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: var(--radius-md);
  font: inherit; font-size: 15px; font-weight: var(--weight-medium); line-height: 1.2;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none;
  transition: transform var(--dur-instant) var(--ease-out), background var(--dur-fast) var(--ease-out), opacity var(--dur-fast);
}
.lv-btn .icon { width: 18px; height: 18px; }
.lv-btn:active { transform: scale(0.97); }
.lv-btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.lv-btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.lv-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-size: 16px; font-weight: var(--weight-semibold); }
.lv-btn--primary:active { background: var(--accent-hover); }
.lv-btn--secondary { background: var(--surface); }
.lv-btn--tonal { background: var(--surface-sunken); border-color: transparent; min-height: 44px; border-radius: var(--radius-md); }
.lv-btn--lg { min-height: 50px; }
.lv-btn--sm { min-height: 40px; font-size: 14px; padding: 0 14px; border-radius: var(--radius-md); }
@media (hover: hover) and (pointer: fine) {
  .lv-btn--secondary:hover, .lv-btn--tonal:hover { background: var(--surface-hover); }
  .lv-btn--primary:hover { background: var(--accent-hover); }
}
.lv-textbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 8px; border: 0; background: none;
  font: inherit; font-size: 15px; font-weight: var(--weight-medium); color: var(--text-muted);
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.lv-textbtn .icon { width: 16px; height: 16px; }
.lv-textbtn:active { opacity: 0.6; }
.lv-textbtn--accent { color: var(--accent-strong); font-weight: var(--weight-semibold); font-size: 14px; min-height: 32px; padding: 0; position: relative; }
.lv-textbtn--accent::after { content: ""; position: absolute; inset: -6px -8px; }
.lv-textbtn:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-sm); }
@media (hover: hover) and (pointer: fine) { .lv-textbtn:hover { color: var(--text); } }

/* сегмент-контрол: трек --surface-sunken, активный — белый */
.lv-seg {
  display: flex; gap: 4px; padding: 4px; border-radius: var(--radius-md);
  background: var(--surface-sunken); border: 0;
}
.lv-seg__btn, .lead-tabs.lv-seg .lead-tabs__btn {
  flex: 1 1 0; min-width: 0; min-height: 36px; height: 36px; padding: 0 6px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--radius-sm); background: transparent; box-shadow: none;
  font: inherit; font-size: 14px; font-weight: var(--weight-medium); color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.lv-seg__btn.is-active, .lead-tabs.lv-seg .lead-tabs__btn.is-active {
  background: var(--surface); color: var(--text); font-weight: var(--weight-medium);
  box-shadow: var(--shadow-seg);
}

/* строка «⚡ повод» (доска) */
.lv-why-line { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 20px; color: #44403C; }
.lv-why-line__ic { width: 16px; height: 16px; margin-top: 2px; flex: none; color: var(--why-icon); stroke-width: 2; }
.lv-why-line__text { min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lv-why-line--rec .lv-why-line__ic { color: var(--col-won); }

/* блок «почему сейчас» — янтарная подложка (повод, не тревога) */
.lv-why {
  display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-lg);
  background: var(--why-bg); border: 1px solid var(--why-border);
}
.lv-why__ic { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--why-icon); stroke-width: 2; }
.lv-why__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lv-why__text { margin: 0; font-size: 15px; line-height: 21px; color: var(--text); }
.lv-why__src { margin: 0; font-size: 12px; line-height: 16px; color: var(--text-faint); }
.lv-why--titled { flex-direction: column; gap: 10px; padding: 16px; }
.lv-why__head { display: flex; align-items: center; gap: 8px; }
.lv-why__title { font-size: 15px; font-weight: var(--weight-semibold); flex: 1 1 auto; }
.lv-why__ago { font-size: 13px; color: var(--text-faint); white-space: nowrap; }
.lv-why--titled .lv-why__text { line-height: 22px; }
.lv-why--titled .lv-why__src { font-size: 13px; }

/* чеки «почему подходит» + риск */
.lv-checks { display: flex; flex-direction: column; gap: 8px; }
.lv-check, .lv-card .lv-check.reason-chip {
  display: flex; gap: 10px; align-items: flex-start; padding: 0; border: 0;
  font-size: 14px; line-height: 20px; color: #44403C;
}
.lv-check .lv-check__ic, .lv-check.reason-chip .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--col-won); stroke-width: 2.2; }
.lv-check--risk { color: var(--text-faint); }
.lv-check.lv-check--risk .lv-check__ic { color: #A8A29E; stroke-width: 2; }

/* быстрые кнопки Сайт / Звонок / Письмо */
.lv-quick-row { display: flex; gap: 8px; }
.lv-quick {
  flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 8px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
  font: inherit; font-size: 14px; font-weight: var(--weight-medium); color: var(--text); text-decoration: none;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.lv-quick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-quick .icon { width: 16px; height: 16px; flex: none; }
.lv-quick:active { transform: scale(0.97); background: var(--surface-hover); }
.lv-quick:disabled { opacity: 0.4; cursor: default; transform: none; }
.lv-quick:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
@media (hover: hover) and (pointer: fine) { .lv-quick:not(:disabled):hover { background: var(--surface-hover); text-decoration: none; } }

.lv-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* переключатель (switch) */
.lv-switch {
  position: relative; flex: none; width: 44px; height: 26px; padding: 0;
  border: 0; border-radius: 13px; background: var(--border); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.lv-switch::after { content: ""; position: absolute; inset: -9px -4px; }
.lv-switch__knob {
  position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-knob);
  transition: transform var(--dur-base) var(--ease-out);
}
.lv-switch.is-on { background: var(--text); }
.lv-switch.is-on .lv-switch__knob { transform: translateX(18px); }
.lv-switch:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* ═══════════════════════════ шторка v2 (js/v2/sheet.js) ═══════════════════════════ */
html.v2-sheet-open, html.v2-sheet-open body { overflow: hidden; }
.v2-sheet-overlay { position: fixed; inset: 0; z-index: 70; overscroll-behavior: contain; }
.v2-sheet-overlay.is-closing { pointer-events: none; }
.v2-sheet-scrim {
  position: absolute; inset: 0; background: rgba(28, 25, 23, 0.32); opacity: 0;
  touch-action: none; -webkit-tap-highlight-color: transparent;
}
.v2-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 640px;
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-overlay); outline: none;
  transform: translate3d(0, 100%, 0); will-change: transform;
}
.v2-sheet--tall { top: calc(env(safe-area-inset-top, 0px) + 34px); }
.v2-sheet--auto { max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 34px); overflow: hidden; }
.v2-sheet__handle {
  flex: none; display: flex; justify-content: center; padding: 10px 0 6px; min-height: 22px;
  cursor: grab; touch-action: none;
}
.v2-sheet__bar { width: 36px; height: 5px; border-radius: 3px; background: var(--border-strong); }
.v2-sheet__drag { touch-action: none; }
.v2-sheet__scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.v2-sheet.is-dragging { cursor: grabbing; }
/* десктоп-панель справа (docs/37 H): на всю высоту, въезд по X, без ручки */
.v2-sheet--side {
  top: 0; bottom: 0; left: auto; right: 0; margin: 0; width: min(520px, 92vw); max-width: none;
  border-radius: var(--radius-xl) 0 0 var(--radius-xl); transform: translate3d(100%, 0, 0);
}
.v2-sheet--side > .v2-sheet__handle { display: none; }
.v2-sheet--side { padding-top: 14px; }
.v2-sheet-overlay:has(.v2-sheet--side) .v2-sheet-scrim { background: rgba(28, 25, 23, 0.16); }
.lv-sheet-title-row { display: flex; align-items: center; gap: 8px; }
.lv-sheet-title { margin: 0; flex: 1 1 auto; font-size: 20px; line-height: 26px; font-weight: var(--weight-semibold); color: var(--text); }

/* ═══════════════════════════ доска (#/) ═══════════════════════════ */
.lv-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; min-height: 38px; }
.lv-head__title.page-head__title { flex: 1 1 auto; min-width: 0; font-size: 28px; font-weight: var(--weight-semibold); letter-spacing: -0.02em; line-height: 34px; }
.lv-triage-pill {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: var(--weight-medium);
  cursor: pointer; position: relative; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.lv-triage-pill::after { content: ""; position: absolute; inset: -4px 0; }
.lv-triage-pill .icon { width: 16px; height: 16px; stroke-width: 1.8; }
.lv-triage-pill:active { transform: scale(0.97); }
.lv-triage-pill:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.lv-triage-pill__count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: var(--weight-semibold);
}
@media (hover: hover) and (pointer: fine) { .lv-triage-pill:hover { background: var(--surface-hover); } }

/* плитки-счётчики */
.lv-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lv-tile {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 66px; text-align: left;
  padding: 10px 12px; border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--border); color: var(--text); font: inherit; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-instant) var(--ease-out);
}
.lv-tile:active { transform: scale(0.98); }
.lv-tile:disabled { cursor: default; transform: none; }
.lv-tile:disabled .lv-tile__n { color: var(--text-faint); }
.lv-tile.is-active { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.lv-tile:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.lv-tile--skel { min-height: 66px; border: 0; }
.lv-tile__top { display: flex; align-items: center; gap: 6px; }
.lv-tile__ic { width: 22px; height: 22px; border-radius: var(--radius-sm); flex: none; display: flex; align-items: center; justify-content: center; }
.lv-tile__ic .icon { width: 13px; height: 13px; stroke-width: 2.4; }
.lv-tile--new .lv-tile__ic { background: var(--st-new-bg); color: var(--col-new); }
.lv-tile--why .lv-tile__ic { background: var(--st-work-bg); color: var(--why-icon); }
.lv-tile--won .lv-tile__ic { background: var(--st-won-bg); color: var(--col-won); }
.lv-tile__n { font-size: var(--text-title-1); font-weight: var(--weight-bold); line-height: 24px; letter-spacing: -0.02em; }
.lv-tile__label { font-size: 12px; line-height: 15px; color: var(--text-muted); overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { .lv-tile:not(:disabled):hover { border-color: var(--border-strong); } }

/* ряд статус-чипов + «Фильтры» */
.stage-filter.lv-stagebar { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px 0 6px; overflow: visible; }
.lv-chips.seg {
  flex: 1 1 auto; min-width: 0; display: flex; gap: 8px; padding: 6px 2px; margin: -6px -2px;
  background: none; border: 0; border-radius: 0;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.lv-chips.seg::-webkit-scrollbar { display: none; }
/* мягкий край справа — ряд прокручивается, чип не «обрубается» о кнопку фильтров */
.lv-chips.seg { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); padding-right: 18px; }
.lv-chips .lv-fchip.seg__btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 34px; min-height: 34px; padding: 0 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); box-shadow: none;
  font-size: 14px; font-weight: var(--weight-medium); position: relative;
}
.lv-chips .lv-fchip.seg__btn::after { content: ""; position: absolute; inset: -5px -2px; }
.lv-chips .lv-fchip.seg__btn .lv-fchip__n.seg__count {
  margin: 0; padding: 0; background: none; color: #A8A29E; font-size: 14px; font-weight: var(--weight-medium);
}
.lv-chips .lv-fchip.seg__btn.is-active { background: var(--text); border-color: var(--text); color: #fff; font-weight: var(--weight-medium); }
.lv-chips .lv-fchip.seg__btn.is-active .lv-fchip__n { color: rgba(255, 255, 255, 0.62); }
.lv-chips .lv-fchip.seg__btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.lv-filter-btn {
  position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.lv-filter-btn::after { content: ""; position: absolute; inset: -4px; }
.lv-filter-btn .icon { width: 18px; height: 18px; stroke-width: 1.8; }
.lv-filter-btn.has-dot::before {
  content: ""; position: absolute; top: 1px; right: 1px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
}
.lv-filter-btn:active { transform: scale(0.95); }
.lv-filter-btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
@media (hover: hover) and (pointer: fine) {
  .lv-filter-btn:hover { background: var(--surface-hover); }
  .lv-chips .lv-fchip.seg__btn:not(.is-active):hover { color: var(--text); border-color: var(--border-strong); }
}

/* список карточек */
.lead-table-wrap.lv-list-wrap { border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; margin-top: 8px; }
.lead-table.lv-list, .lv-list { display: flex; flex-direction: column; gap: 10px; font-size: inherit; }
.lv-day {
  font-size: 12px; font-weight: var(--weight-semibold); letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-faint); padding: 4px 2px 0;
}
.lv-day--row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lv-day--row .lv-textbtn { text-transform: none; letter-spacing: 0; font-size: 14px; min-height: 36px; }
.lv-row-holder { position: relative; border-radius: var(--radius-lg); }
.lv-row {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 16px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.lv-row:active { background: var(--surface-hover); }
.lv-row:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.lv-row-holder.is-swiping .lv-row { transition: none; }
.lv-row--skel { gap: 10px; cursor: default; }
.lv-row__top { display: flex; gap: 12px; align-items: flex-start; }
.lv-row__title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lv-row__name {
  font-size: 16px; font-weight: var(--weight-semibold); line-height: 22px; color: var(--text);
  overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lv-row__title .lv-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-row__foot { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lv-row__sig { min-width: 0; flex: 1 1 auto; font-size: 13px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-row.just-moved { animation: lv-flash var(--dur-slow) var(--ease-out); }
@keyframes lv-flash { from { box-shadow: 0 0 0 3px var(--accent-ring); } to { box-shadow: 0 0 0 0 transparent; } }
.lv-row-holder.row-in { animation: fade-up var(--dur-base) var(--ease-out) both; animation-delay: calc(var(--row-i, 0) * 24ms); }
@media (hover: hover) and (pointer: fine) { .lv-row:hover { border-color: var(--border-strong); } }

/* кружок фита (fitRing sm → заливка, без дуги) */
.lv-score { flex: none; display: inline-flex; }
.lv-score .fit-ring {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-sunken); color: var(--text-muted);
}
.lv-score .fit-ring__svg { display: none; }
.lv-score .fit-ring__num { font-size: 13px; font-weight: var(--weight-semibold); letter-spacing: 0; }
.lv-score.is-strong .fit-ring { background: var(--st-won-bg); color: var(--st-won-fg); }
.lv-score .fit-ring--capped { background: var(--st-work-bg); color: var(--st-work-fg); }
.lv-score .fit-ring__flag { top: -1px; right: -1px; border-color: var(--surface); }
.lv-score--dots { padding-top: 10px; }

/* свайп-подложки под карточкой */
.lv-swipe-bg {
  position: absolute; inset: 0; z-index: 0; border-radius: var(--radius-lg);
  display: flex; align-items: center; gap: 8px; padding: 0 20px; opacity: 0;
  font-size: 14px; font-weight: var(--weight-semibold);
}
.lv-swipe-bg .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.lv-swipe-bg--work { justify-content: flex-start; background: var(--st-won-bg); color: var(--st-won-fg); }
.lv-swipe-bg--notfit { justify-content: flex-end; background: var(--st-lost-bg); color: var(--st-lost-fg); }
.lv-row-holder.is-armed-work .lv-swipe-bg--work { background: var(--col-won); color: #fff; }
.lv-row-holder.is-armed-notfit .lv-swipe-bg--notfit { background: var(--text-muted); color: #fff; }
.lv-row-holder.is-swiped-out .lv-row { transition: transform 240ms var(--ease-out); }

.lv-list-foot { display: flex; justify-content: center; padding: 8px 0 0; }
.lv-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; }

/* recommendation-карточка lookalike */
.lv-row--rec { gap: 6px; }

/* locked: только экспорт */
.lv-locked-bar.board-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }

/* ═══════════════════════════ шторка «Фильтры» ═══════════════════════════ */
.lv-filters {
  display: flex; flex-direction: column; gap: 20px;
  padding: 4px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto; overscroll-behavior: contain;
}
.lv-filters__groups { display: flex; flex-direction: column; gap: 20px; }
.lv-group { display: flex; flex-direction: column; gap: 8px; }
.lv-group--rows { gap: 2px; }
.lv-group--rows > .lv-label { margin-bottom: 6px; }
.lv-select-wrap { position: relative; }
.lv-select, .lv-select.niche-filter__select {
  display: block; width: 100%; max-width: none; height: 48px; padding: 0 40px 0 14px; appearance: none; -webkit-appearance: none;
  border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); background-image: none;
  font: inherit; font-size: var(--text-input); font-weight: var(--weight-regular); color: var(--text); cursor: pointer;
}
.lv-select:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.lv-select-wrap__chev { position: absolute; right: 14px; top: 16px; width: 16px; height: 16px; color: var(--text-faint); pointer-events: none; stroke-width: 2; }
.lv-toggle-row { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 15px; color: var(--text); cursor: pointer; }
.lv-toggle-row__label { flex: 1 1 auto; min-width: 0; }
.lv-toggle-row__n { color: var(--text-faint); }
.lv-filters__actions { display: flex; gap: 10px; }
.lv-filters__csv { flex: none; padding: 0 16px; border-radius: var(--radius-md); }
.lv-filters__show { flex: 1 1 auto; border-radius: var(--radius-md); }
.lv-filters__crm { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 4px; margin-top: -10px; font-size: 13px; color: var(--text-faint); }
.lv-filters__crm .lv-textbtn { font-size: 13px; min-height: 40px; padding: 0 6px; color: var(--text-muted); }

/* ═══════════════════════════ шторка лида ═══════════════════════════ */
.lv-lsheet-overlay .v2-sheet { background: var(--surface); }
.lv-lsheet { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.lv-peek, .lv-full { min-height: 0; }
.lv-peek.is-in, .lv-full.is-in { animation: lv-fade var(--dur-base) var(--ease-out); }
@keyframes lv-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lv-peek.is-in, .lv-full.is-in { animation: none; } }

/* половина: высота = видимая часть (--v2-half-h минус ручка), низ — панель действий */
.lv-peek {
  height: calc(var(--v2-half-h, 60dvh) - 21px);
  display: flex; flex-direction: column;
}
.lv-peek__head { flex: none; display: flex; gap: 12px; align-items: flex-start; padding: 4px 20px 0; }
.lv-peek__title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lv-peek__name { margin: 0; font-size: 20px; line-height: 26px; font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.lv-peek__head .fit-ring { width: 44px; height: 44px; }
.lv-peek__skel { padding: 14px 20px; }
.lv-peek__body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 14px 20px 12px; }
.lv-peek__more {
  align-self: center; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 8px;
  border: 0; background: none; font: inherit; font-size: 14px; font-weight: var(--weight-medium); color: var(--text-muted);
  cursor: pointer; text-align: center;
}
.lv-peek__more .icon { width: 16px; height: 16px; stroke-width: 2; flex: none; }
.lv-peek__foot {
  flex: none; display: flex; gap: 10px; align-items: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border);
  background: var(--surface);
}
.lv-peek__foot .demo-note { flex: 1 1 auto; margin: 0; }
.lv-peek__primary.btn-move, .lv-bar__main.btn-move { flex: 1 1 auto; display: inline-flex; }
.lv-peek__status { margin: 0 auto; }
.lv-nav-btn {
  flex: none; width: 48px; height: 48px; border-radius: var(--radius-md); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.lv-nav-btn .icon { width: 20px; height: 20px; stroke-width: 2; }
.lv-nav-btn:disabled { opacity: 0.35; cursor: default; }
.lv-nav-btn:not(:disabled):active { transform: scale(0.95); background: var(--surface-hover); }
.lv-nav-btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* полная: скролл-область целиком, шапка+вкладки липнут сверху, панель — снизу */
.lv-full { flex: 1 1 auto; background: var(--bg); }
.lv-lsheet-overlay .v2-sheet[data-x] {}
.lv-lsheet-overlay[data-detent="full"] .v2-sheet { background: var(--bg); }
.lv-lsheet-overlay[data-detent="full"] .v2-sheet__handle { background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0; }

/* ═══════════════════════════ карточка лида (.lead.lv-card) ═══════════════════════════ */
.lead.lv-card { max-width: 680px; margin: 0 auto; gap: 0; animation: none; }
.lv-card .lead__header.lv-card__top { gap: 12px; }
.lv-card--page .lead__header { padding: 0 0 14px; gap: 10px; }
.lv-card--sheet .lead__header {
  position: sticky; top: 0; z-index: 3;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 0 16px 12px;
}
.lv-sheethead { display: flex; gap: 12px; align-items: center; }
.lv-sheethead__name.lead__name { margin: 0; font-size: 20px; line-height: 26px; font-weight: var(--weight-semibold); letter-spacing: 0; overflow-wrap: anywhere; }
.lv-hero__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lv-close {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-sunken);
  color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative;
}
.lv-close::after { content: ""; position: absolute; inset: -4px; }
.lv-close .icon { width: 16px; height: 16px; stroke-width: 2.2; }
.lv-close:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.lv-chiprow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lv-chiprow .lv-chip { height: 30px; padding: 0 10px 0 12px; }
.lv-card--page .lv-chiprow .lv-chip { height: 32px; font-size: 14px; }
.lv-fitchip {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: var(--radius-pill);
  background: var(--surface-sunken); color: var(--text-muted); font-size: 13px; font-weight: var(--weight-semibold);
}
.lv-fitchip.is-strong { background: var(--st-won-bg); color: var(--st-won-fg); }
.lv-pos { font-size: 13px; color: var(--text-faint); }

/* маршрут: «‹ Лиды» + герой */
.lv-backrow { display: flex; align-items: center; gap: 4px; margin: -12px -8px 0; }
.lv-back {
  display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 8px;
  color: var(--text-muted); text-decoration: none; font-size: 15px; font-weight: var(--weight-medium);
}
.lv-back .icon { width: 20px; height: 20px; stroke-width: 2; }
.lv-back:active { opacity: 0.6; }
@media (hover: hover) and (pointer: fine) { .lv-back:hover { text-decoration: none; color: var(--text); } }
.lv-icon-btn {
  width: 44px; height: 44px; border: 0; background: none; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: var(--radius-md);
}
.lv-icon-btn .icon { width: 20px; height: 20px; }
.lv-icon-btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.lead__hero.lv-hero { display: flex; gap: 12px; align-items: flex-start; padding: 4px 0 0; border: 0; margin: 0; }
.lv-hero__name.lead__name { margin: 0; font-size: 24px; line-height: 30px; font-weight: var(--weight-semibold); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.lv-card--page .lv-meta { font-size: 14px; }
.lv-hero__fit { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.lv-hero__fitcap { font-size: 11px; color: var(--text-faint); }
.lv-hero .fit-ring--lg { width: 52px; height: 52px; }
.lv-hero .fit-ring--lg .fit-ring__num { font-size: 15px; }

/* кольцо фита v2: зелёная дуга для сильного фита, иначе графит; трек --surface-sunken */
.lv-card .fit-ring__bar, .lv-peek .fit-ring__bar, .lv-tcard .fit-ring__bar { stroke: var(--col-won); stroke-width: 4; }
.lv-card .fit-ring__track, .lv-peek .fit-ring__track, .lv-tcard .fit-ring__track { stroke-width: 4; }
.lv-card .fit-ring--capped .fit-ring__bar, .lv-peek .fit-ring--capped .fit-ring__bar, .lv-tcard .fit-ring--capped .fit-ring__bar { stroke: var(--warn); }

/* вкладки */
.lv-card .lead-tabs.lv-seg {
  position: static; margin: 0; backdrop-filter: none; -webkit-backdrop-filter: none;
  background: var(--surface-sunken); border: 0; border-radius: var(--radius-md); padding: 4px; gap: 4px;
}
.lv-card--page .lead-tabs.lv-seg {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 3; margin: 0; padding: 4px;
  box-shadow: 0 0 0 4px var(--bg);
}
.lv-card .lead-tabs__btn.has-dot::after { top: 8px; right: 10px; }

/* пейны */
.lv-card .lead-pane { gap: 12px; padding: 14px 0 0; animation: none; }
.lv-card--sheet .lead-pane { padding: 14px 16px 0; }

/* секции-карточки v2 (включая legacy .block внутри карточки) */
.lv-card .block, .lv-card .lv-sec {
  display: flex; flex-direction: column; gap: 10px; margin: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px;
}
.lv-card .block__title {
  margin: 0; font-size: 12px; font-weight: var(--weight-semibold); line-height: 16px;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-faint);
}
.lv-card .block__title .icon { display: none; }
.lv-sec__head { display: flex; align-items: center; gap: 8px; }
.lv-sec__head .block__title { flex: 1 1 auto; }
.lv-card .block--fold { padding: 0; }
.lv-card .block--fold > summary.block__title--fold { padding: 14px 16px; min-height: 48px; box-sizing: border-box; }
.lv-card .block--fold > summary .fold-chev { display: block; }
.lv-card .block--fold > *:not(summary) { margin: 0 16px 14px; }

/* «почему горячий» — спокойная строка без коралла */
.lv-card .why-now.why-hot {
  flex-direction: row; align-items: baseline; gap: 8px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--surface); padding: 12px 14px;
}
.lv-card .why-hot .why-now__cap, .lv-card .why-hot .why-now__cap .icon { color: var(--why-icon); }

/* каналы связи — строки-списки */
.lv-chans.lv-sec { gap: 0; padding: 14px 16px 6px; }
.lv-chans .block__title { margin-bottom: 4px; }
.lv-chan.how-to {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 0; margin: 0;
  border: 0; border-radius: 0; background: none; color: var(--text); text-decoration: none;
}
.lv-chan + .lv-chan { border-top: 1px solid var(--surface-sunken); }
.lv-chan__ic { width: 32px; height: 32px; flex: none; border-radius: 8px; background: var(--surface-sunken); display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.lv-chan__ic .icon { width: 16px; height: 16px; }
.lv-chan__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.lv-chan__title { font-size: 15px; font-weight: var(--weight-medium); }
.lv-chan__sub { font-size: 13px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-chan__sub.is-high { color: var(--st-won-fg); }
.lv-chan__sub.is-low { color: var(--st-work-fg); }
.lv-chan__tail { width: 16px; height: 16px; flex: none; color: #A8A29E; stroke-width: 2; }
.lv-chan:active { opacity: 0.7; }
@media (hover: hover) and (pointer: fine) { a.lv-chan:hover { text-decoration: none; } a.lv-chan:hover .lv-chan__title { color: var(--link); } }

/* реквизиты key/value */
.lv-kvsec.lv-sec { padding: 4px 16px; gap: 0; }
.lv-card .kv { grid-template-columns: 120px 1fr; gap: 8px; min-height: 36px; align-items: center; padding: 6px 0; font-size: 14px; border-bottom: 0; }
.lv-card .kv + .kv { border-top: 1px solid var(--surface-sunken); }
.lv-card .kv__key { color: var(--text-faint); }
.lv-card .kv__key .icon { display: none; }
.lv-card .kv__val { font-weight: var(--weight-medium); }
@media (max-width: 360px) { .lv-card .kv { grid-template-columns: 1fr; gap: 0; } }

/* задачи */
.lv-card .lead-task-form[hidden] { display: none; }
.lv-card .lead-tasks .lead-task { border-color: var(--border-subtle); }
.lv-card .lead-task__due { font-size: 13px; }

/* сводка / ИИ / сигналы / отзыв — внутри карточек-секций */
.lv-card .lead-brief { margin: 0; gap: 8px; }
.lv-card .lead-brief__about { font-size: 15px; line-height: 22px; }
.lv-card .lead-brief__why { background: none; border: 0; padding: 0; color: #44403C; font-size: 14px; line-height: 20px; }
.lv-card .lead-brief__speed { margin: 0; font-size: 13px; color: var(--text-faint); }
.lv-card .lead-brief__share { align-self: flex-start; }
.lv-card .ai-block { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.lv-card .sig-chip { background: var(--surface-sunken); border-color: transparent; }
.lv-card .sig-chip .icon { color: var(--text-faint); }
.lv-card .lead-feedback { margin: 0; padding: 12px 16px; }
/* следующий шаг ИИ: подпись → текст во всю ширину → кнопка «Добавить в задачи» во всю ширину */
.ai-block__step { display: flex; flex-direction: column; gap: 10px; align-items: stretch;
  background: var(--surface-sunken); color: var(--text); padding: 14px 16px; border-radius: var(--radius-md); }
.ai-block__step-cap { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); }
.ai-block__step-cap .icon { width: 14px; height: 14px; margin: 0; }
.ai-block__step-text { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text); }
.ai-block__step .ai-block__to-task { margin: 2px 0 0; width: 100%; min-height: 44px; justify-content: center; }
.ai-block__step-hint { margin: -4px 0 0; font-size: 12px; color: var(--text-faint); text-align: center; }

/* досье: те же белые карточки, без стекла и коралла */
.lv-card .dossier.block { background: none; border: 0; padding: 0; gap: 12px; }
.lv-card .dossier-group, .lv-card .dossier-summary {
  background: var(--surface); border: 1px solid var(--border); box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: var(--radius-lg);
}
.lv-card .dossier-summary { padding: 16px; }
.lv-card .dossier-summary__cap, .lv-card .dossier-insight__cap, .lv-card .dossier-changes__cap { color: var(--text-faint); }
.lv-card .dossier-summary__cap .icon, .lv-card .dossier-insight__cap .icon, .lv-card .dossier-changes__cap .icon { color: var(--text); }
.lv-card .dossier-summary__text { font-style: normal; font-size: 15px; line-height: 22px; color: #44403C; }
.lv-card .dossier-changes { background: var(--surface); border: 1px solid var(--border); }
.lv-card .dossier-group__head { min-height: 48px; box-sizing: border-box; padding: 12px 16px; }
.lv-card .dossier-group__title { font-size: 15px; font-weight: var(--weight-semibold); }
.lv-card .dossier-group__body { padding: 0 16px 8px; border-top-color: var(--surface-sunken); }
.lv-card .dossier-fact { border-bottom-color: var(--surface-sunken); }
.lv-card .dossier-next { background: var(--why-bg); border-color: var(--why-border); }
.lv-card .dossier-next__icon { color: var(--why-icon); background: var(--st-work-bg); }
.lv-card .dossier-next__cap { color: var(--st-work-fg); }
.lv-card .dossier-cta__art { color: var(--text-muted); }

/* письмо */
.lv-card .lv-draft.block { background: none; border: 0; padding: 0; gap: 12px; }
.lv-draft__card.draft__body {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px;
}
.lv-draft__card .draft__text { margin: 0; font-size: 15px; line-height: 23px; color: var(--text); white-space: pre-line; }
.lv-draft .draft__regen { align-self: flex-start; min-height: 40px; font-size: 14px; padding: 0 12px; }
.lv-draft__note.draft__disclaimer { margin: 0; font-size: 12px; color: var(--text-faint); display: block; }

/* нижняя панель карточки */
.lead__statusbar.lv-bar {
  display: flex; gap: 10px; align-items: center; margin: 0; border-radius: 0; box-shadow: none;
  background: rgba(255, 255, 255, 0.96); border: 0; border-top: 1px solid var(--border);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
}
.lv-card--sheet .lead__statusbar.lv-bar { position: sticky; bottom: 0; z-index: 3; margin-top: 16px; }
.lv-card--page .lead__statusbar.lv-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-width: 680px; margin: 0 auto;
}
.lv-card--page { padding-bottom: 96px; }
.lv-bar .lv-btn { min-height: 48px; }
.lv-bar .lv-btn--secondary { flex: none; }
.lv-bar__main { flex: 1 1 auto; min-width: 0; }
.lv-bar__none { flex: 1 1 auto; text-align: center; font-size: 14px; color: var(--text-faint); }
.lv-bar .demo-note { flex: 1 1 auto; margin: 0; }

/* маршрут карточки = полноэкранная задача: таб-бар и общий топбар скрыты (body.is-focus) */
body.is-focus .topbar__nav { display: none; }
body.is-focus:has(.lv-card--page) .topbar { display: none; }
body.is-focus:has(.lv-card--page) .app { padding-top: calc(12px + env(safe-area-inset-top, 0px)); padding-left: 16px; padding-right: 16px; }

/* ═══════════════════════════ «Разбор» (#/triage) ═══════════════════════════ */
.lv-triage {
  position: fixed; inset: 0; z-index: 60; background: var(--bg);
  display: flex; flex-direction: column; overscroll-behavior: contain;
  opacity: 0; transition: opacity var(--dur-base) var(--ease-out);
}
.lv-triage[data-open="true"] { opacity: 1; }
.lv-tri__main {
  flex: 1 1 auto; min-height: 0; width: 100%; max-width: 520px; margin: 0 auto;
  display: flex; flex-direction: column;
}
.lv-tri__top {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 10px;
}
.lv-tri__close {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-sunken);
  color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative;
}
.lv-tri__close::after { content: ""; position: absolute; inset: -2px; }
.lv-tri__close .icon { width: 16px; height: 16px; stroke-width: 2.2; }
.lv-tri__close:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.lv-tri__headcol { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lv-tri__titlerow { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.lv-tri__title { font-size: var(--text-headline); font-weight: var(--weight-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-tri__left { font-size: 13px; color: var(--text-faint); white-space: nowrap; }
.lv-tri__segs { display: flex; gap: 3px; min-height: 4px; }
.lv-tri__seg { flex: 1 1 0; height: 4px; border-radius: 2px; background: var(--border); transition: background var(--dur-base) var(--ease-out); }
.lv-tri__seg.is-fill { background: var(--text); }
.lv-tri__segs.is-solid { gap: 0; background: var(--border); border-radius: 2px; overflow: hidden; }
.lv-tri__segs.is-solid .lv-tri__seg { border-radius: 0; transition: flex-basis var(--dur-slow) var(--ease-out); }
.lv-tri__goal { flex: none; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.lv-triage.is-done .lv-tri__headcol, .lv-triage.is-done .lv-tri__goal { visibility: hidden; }
.lv-tri__goal.is-reached { color: var(--st-won-fg); font-weight: var(--weight-semibold); }

.lv-tri__stack { position: relative; flex: 1 1 auto; min-height: 0; margin: 8px 16px 0; }
.lv-tri__bottom { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 22px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
.lv-tri__actions { display: flex; gap: 10px; }
.lv-tri-act, .lv-tri-act.triage-act--work, .lv-tri-act.triage-act--notfit, .lv-tri-act.triage-act--later {
  flex: 1 1 0; min-width: 0; width: auto; height: 56px; padding: 0 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  font: inherit; font-size: 13px; font-weight: var(--weight-semibold); cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), opacity var(--dur-fast);
}
.lv-tri-act span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-tri-act .icon { width: 20px; height: 20px; stroke-width: 2.2; }
.lv-tri-act.triage-act--work { flex-grow: 1.4; background: var(--accent); border-color: var(--accent); color: #fff; }
.lv-tri-act:active { transform: scale(0.96); }
.lv-tri-act.is-hot { transform: scale(1.04); }
.lv-tri-act.is-dim:not(.triage-act--work) { color: #A8A29E; }
.lv-tri-act:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
@media (hover: hover) and (pointer: fine) {
  .lv-tri-act:not(.triage-act--work):hover { color: var(--text); border-color: var(--border-strong); }
  .lv-tri-act.triage-act--work:hover { background: var(--accent-hover); }
}
.lv-tri__hint { text-align: center; font-size: 12px; line-height: 16px; color: #A8A29E; min-height: 16px; }

/* карточка разбора */
.lv-tcard {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 16px;
  padding: 20px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-card); overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; will-change: transform;
}
.lv-tcard.is-pos1 { inset: 14px 14px -10px; box-shadow: none; pointer-events: none; }
.lv-tcard.is-pos1 > * { visibility: hidden; }
.lv-tcard:not(.is-dragging):not(.is-spring):not(.is-flying) {
  transition: inset 320ms var(--ease-spring), transform 420ms var(--ease-spring), opacity 240ms var(--ease-out), border-color var(--dur-fast);
}
.lv-tcard.is-dragging { cursor: grabbing; transition: none; }
.lv-tcard.is-flying { transition: transform 340ms cubic-bezier(0.2, 0, 0.55, 1), opacity 320ms var(--ease-out); }
.lv-tcard.is-toward-work { border: 2px solid var(--col-won); box-shadow: var(--shadow-overlay); }
.lv-tcard.is-toward-notfit { border: 2px solid var(--text-faint); box-shadow: var(--shadow-overlay); }
.lv-tcard.is-toward-later { border: 2px solid var(--why-icon); box-shadow: var(--shadow-overlay); }
@media (prefers-reduced-motion: reduce) {
  .lv-tcard:not(.is-dragging):not(.is-spring) { transition: opacity 200ms var(--ease-out); }
}
.lv-tcard--skel { gap: 14px; cursor: default; }
.lv-tcard__head { display: flex; gap: 12px; align-items: flex-start; }
.lv-tcard__title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lv-tcard__name { margin: 0; font-size: var(--text-title-2); line-height: 26px; font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.lv-tcard__meta { font-size: 14px; }
.lv-tcard .fit-ring--lg { width: 52px; height: 52px; }
.lv-tcard .fit-ring--lg .fit-ring__num { font-size: 15px; }
.lv-tcard .fit-ring-box { gap: 4px; }
.lv-tcard__sig { margin: 0; font-size: 13px; color: var(--text-faint); }
.lv-tcard__quick { margin-top: auto; }
.lv-tcard__more {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
  border: 0; border-radius: var(--radius-md); background: var(--surface-sunken); color: var(--text);
  font: inherit; font-size: 14px; font-weight: var(--weight-medium); cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.lv-tcard__more .icon { width: 16px; height: 16px; stroke-width: 2; }
.lv-tcard__more:active { transform: scale(0.98); }
.lv-tcard__more:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
/* вердикт-чипы жеста */
.lv-stamp {
  position: absolute; top: 16px; z-index: 2; opacity: 0; pointer-events: none;
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: var(--weight-semibold);
}
.lv-stamp .icon { width: 16px; height: 16px; stroke-width: 2.4; }
.lv-stamp--work { left: 16px; background: var(--st-won-bg); color: var(--st-won-fg); }
.lv-stamp--notfit { right: 16px; background: var(--st-lost-bg); color: var(--st-lost-fg); }
.lv-stamp--later { left: 50%; transform: translateX(-50%); background: var(--st-work-bg); color: var(--st-work-fg); }
/* низкие экраны: вторичное прячем, чтобы кнопки влезали */
@media (max-height: 720px) {
  .lv-tcard { gap: 12px; padding: 16px; }
  .lv-tcard__sig { display: none; }
  .lv-tri__bottom { padding-top: 14px; }
}
@media (max-height: 640px) {
  .lv-tcard .lv-checks { display: none; }
}

/* пустая стопка / ошибка */
.lv-tri__empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 0 24px; }
.lv-tri__empty-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--st-won-bg); color: var(--col-won); display: flex; align-items: center; justify-content: center; }
.lv-tri__empty-ic .icon { width: 26px; height: 26px; stroke-width: 2.4; }
.lv-tri__empty-ic.is-err { background: var(--st-overdue-bg); color: var(--danger); }
.lv-tri__empty-title { margin: 0; font-size: 20px; font-weight: var(--weight-semibold); }
.lv-tri__empty-sub { margin: 0 0 8px; font-size: 15px; color: var(--text-muted); }

/* шторка причины */
.lv-reason { display: flex; flex-direction: column; gap: 16px; padding: 4px 20px calc(24px + env(safe-area-inset-bottom, 0px)); }
.lv-reason__head { display: flex; flex-direction: column; gap: 4px; }
.lv-reason__sub { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-muted); }
.lv-reason__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lv-reason__chip {
  min-height: 44px; padding: 0 16px; border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--surface); font: inherit; font-size: 15px; font-weight: var(--weight-medium); color: var(--text);
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.lv-reason__chip.is-quiet { color: var(--text-muted); }
.lv-reason__chip.is-picked, .lv-reason__chip:active { background: var(--text); border-color: var(--text); color: #fff; }
.lv-reason__chip:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
@media (hover: hover) and (pointer: fine) { .lv-reason__chip:hover { border-color: var(--border-strong); } }
.lv-reason__row { display: flex; align-items: center; gap: 12px; }
.lv-reason__skip { flex: 1 1 auto; }
.lv-reason__undo { flex: none; gap: 6px; padding: 0 16px; font-size: 15px; }
.lv-reason__undo .icon { width: 16px; height: 16px; stroke-width: 2; }
.lv-reason__timer { height: 3px; border-radius: 2px; background: var(--surface-sunken); overflow: hidden; }
.lv-reason__timer-fill { display: block; height: 100%; background: #A8A29E; transform-origin: left center; }

/* финал «Всё разобрано» */
.lv-done { height: 100%; display: flex; flex-direction: column; padding: 0 8px; }
.lv-done__center { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
.lv-done__ring { width: 96px; height: 96px; }
.lv-done__track { stroke: var(--st-won-bg); }
.lv-done__bar { stroke: var(--col-won); }
.lv-done__check { stroke: var(--col-won); }
.lv-done__text { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.lv-done__title { margin: 0; font-size: 28px; font-weight: var(--weight-semibold); }
.lv-done__sub { margin: 0; font-size: 15px; line-height: 22px; color: var(--text-muted); max-width: 32ch; }
.lv-done__stats { display: flex; gap: 8px; width: 100%; }
.lv-done__stat { flex: 1 1 0; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.lv-done__n { font-size: 24px; font-weight: var(--weight-semibold); }
.lv-done__stat.is-work .lv-done__n { color: var(--st-won-fg); }
.lv-done__stat.is-lost .lv-done__n { color: var(--text-muted); }
.lv-done__cap { font-size: 13px; color: var(--text-faint); overflow-wrap: anywhere; }
.lv-done__tip { width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: var(--radius-lg); background: var(--surface-sunken); display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 20px; color: #44403C; }
.lv-done__tip .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.lv-done__actions { flex: none; display: flex; flex-direction: column; gap: 8px; padding-top: 12px; }
.lv-done__actions .lv-btn--primary { width: 100%; }

/* ── правки после визуальной сверки ── */
.lead.lv-card--sheet { min-height: 100%; }
.lv-card--sheet .lead-panes { flex: 1 0 auto; }
.lv-card--sheet .lv-sheethead .lv-meta { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lv-card .dossier__building, .lv-card .dossier__building-spin { color: var(--text-muted); }
.lv-card .why-now.why-hot { flex-direction: column; align-items: stretch; gap: 4px; }
.lv-card .why-hot .why-now__text { font-size: 15px; line-height: 21px; }
.lv-draft .lv-textbtn.draft__regen { width: auto; justify-content: flex-start; align-self: flex-start; }
.lv-card .lv-draft__note.draft__disclaimer { background: none; border: 0; padding: 0; }
.lv-bar .lv-btn { white-space: nowrap; }
.lv-bar .lv-btn span { overflow: hidden; text-overflow: ellipsis; }
.lv-bar .lv-btn--primary { padding: 0 12px; }
.lv-bar .lv-btn--secondary { padding: 0 16px; }
/* маршрут #/lead: без legacy «стеклянной панели» (.app > .lead) — backdrop-filter делал
 * карточку containing-block'ом и fixed-панель уезжала вниз страницы */
.app > .lead.lv-card {
  background: none; border: 0; box-shadow: none; border-radius: 0; padding: 0 0 96px;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}

/* аудит design-v2: «Следующий шаг» в досье — плоская карточка по токенам, без свечения/градиента */
.dossier-next { background: var(--surface); box-shadow: none; }
