/* Фирменный стиль «ШтрафовНет» 2.0
   Токены: shtrafovnet.ru (CSS :root), палитра и типографика — из их приложения.
   Шрифт Cera Pro взят с того же домена (woff, 67 КБ на начертание). */

@font-face { font-family: "Cera Pro"; src: url(/assets/CeraPro-400.woff) format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cera Pro"; src: url(/assets/CeraPro-500.woff) format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cera Pro"; src: url(/assets/CeraPro-700.woff) format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cera Pro"; src: url(/assets/CeraPro-900.woff) format("woff"); font-weight: 900; font-style: normal; font-display: swap; }

/* место под полосу прокрутки зарезервировано всегда: страница не прыгает вбок,
   когда контент становится выше/ниже окна (шрифты, анимации, якоря) */
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
/* аккуратная полоса в фирменных цветах вместо системной серой */
* { scrollbar-width: thin; scrollbar-color: #cfd6db transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cfd6db; border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b9c3ca; background-clip: content-box; }
section[id] { scroll-margin-top: 84px; }
@keyframes flashRing { 0% { box-shadow: 0 0 0 0 rgba(99, 197, 86, .55); } 100% { box-shadow: 0 0 0 14px rgba(99, 197, 86, 0); } }
.flash { animation: flashRing 1.3s ease-out 1; border-radius: 16px; }

:root {
  --green: #63c556;
  --green-hover: #54cf43;
  --green-active: #2e9e1f;
  --green-tint: #eaf7e6;
  --green-tint-2: #d9f0d3;
  --navy: #1a3447;
  --red: #fb6342;
  --red-tint: #fdeeea;
  --yellow: #ffcd4b;
  --bg: #f5f5f5;
  --card: #fff;
  --ink: #000;
  --muted: #7c7c7c;
  --line: #ececec;
  --r-card: 16px;
  --r-ctrl: 10px;
  --r-btn: 12px;
  --font: "Cera Pro", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 26px; line-height: 1.2; }
h2 { font-size: 17px; }
.muted { color: var(--muted); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* ── шапка ─────────────────────────────────────────────── */
.site { background: var(--card); border-bottom: 1px solid var(--line); }
.site-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 16px; }
.site img.logo { height: 26px; width: auto; display: block; }
.site .divider { width: 1px; height: 20px; background: var(--line); }
.site .app-name { font-size: 14px; font-weight: 500; color: var(--muted); }
/* :not(.btn) — иначе правило ссылки перебивает цвет кнопки (было: серый текст на зелёной) */
.site nav a:not(.btn) { font-size: 14px; font-weight: 500; text-decoration: none; color: var(--muted); }
.site nav a:not(.btn):hover { color: var(--ink); }

/* ── сетка ─────────────────────────────────────────────── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.wrap.split { grid-template-columns: minmax(0, 1.45fr) minmax(400px, 1fr); align-items: start; }
@media (max-width: 980px) { .wrap.split { grid-template-columns: minmax(0, 1fr); } }
.col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }

.card { background: var(--card); border-radius: var(--r-card); padding: 24px; }
.card.flat { padding: 20px; }

/* ── кнопки ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--r-btn);
  isolation: isolate; /* без смешивания с фоном под кнопкой */
  font: 500 14px/1 var(--font); cursor: pointer; text-decoration: none;
  border: 1px solid transparent; background: var(--bg); color: var(--ink);
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn:disabled { opacity: .45; cursor: default; }
/* кнопки 2.0 — градиент, как на shtrafovnet.ru.
   border:0 + background-clip:padding-box — иначе прозрачная рамка оставляла светлую кайму по скруглению. */
.btn-primary {
  border: 0;
  background-color: var(--green);
  background-image: linear-gradient(267.38deg, #cce370 -7.31%, #63c556 98.83%);
  background-clip: padding-box;
  color: #fff; font-weight: 700;
}
.btn-primary:hover:not(:disabled) { background-image: linear-gradient(267.38deg, #d5f35c -7.31%, #54cf43 98.83%); }
.btn-primary:active:not(:disabled) { background-image: linear-gradient(267.38deg, #acc83d -7.31%, #2e9e1f 98.83%); }
.btn-outline-green { background: #fff; border: 2px solid var(--green); color: var(--green-active); font-weight: 700; }
.btn-outline-green:hover { background: var(--green-tint); }
.btn-outline { background: transparent; border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-danger { background: var(--red); color: #fff; font-weight: 700; }
.btn-danger:hover:not(:disabled) { background: #ff5631; }
.btn-danger-outline { background: transparent; border-color: var(--red); color: var(--red); }
.btn-danger-outline:hover { background: var(--red-tint); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; border-radius: 14px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }

/* ── поля ──────────────────────────────────────────────── */
input[type=text] {
  width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r-ctrl);
  border: 1px solid #e2e2e2; background: #fff; color: var(--ink); font: 400 15px var(--font);
}
input[type=text]:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(99, 197, 86, .15); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; user-select: none; }
.check input { cursor: pointer; }

/* ── статусы ───────────────────────────────────────────── */
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--bg); color: var(--muted); white-space: nowrap; }
.tag.ok { background: var(--green-tint); color: var(--green-active); }
.tag.run { background: #fff6e0; color: #9a6b00; }
.tag.err { background: var(--red-tint); color: var(--red); }

/* ── запись ────────────────────────────────────────────── */
.rec-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.timer { display: inline-flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 900; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.bar { height: 6px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }

video { width: 100%; border-radius: 12px; background: #000; display: block; }

/* ── правка названия на странице записи ──────────────── */
input.title-edit { width: 100%; max-width: 760px; font: inherit; font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: var(--navy); padding: 4px 10px; border: 1px solid var(--green); border-radius: 10px; outline: none; margin-bottom: 6px; }

/* ── правка текста расшифровки ────────────────────────── */
.tr p textarea.seg-edit { width: 100%; font: inherit; font-size: 15px; line-height: 1.5; color: var(--navy); padding: 8px 10px; border: 1px solid var(--green); border-radius: 10px; outline: none; resize: vertical; background: #fff; }
.seg-hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* ── меню «кто это сказал» ───────────────────────────── */
.tr p ::selection, .tr p::selection { background: #d8efcf; color: var(--navy); }
.tr .seg { border-radius: 3px; }
.spk-pick:hover { border-color: var(--green); }
.spk-menu { position: absolute; z-index: 50; min-width: 190px; background: #fff; border: 1px solid #ececec; border-radius: 12px; box-shadow: 0 12px 30px rgba(26, 52, 71, .14); padding: 6px; max-height: min(70vh, 520px); overflow-y: auto; overscroll-behavior: contain; }
.spk-menu-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  padding: 6px 10px 4px;
  /* заголовок отдела остаётся видимым при прокрутке длинного меню */
  position: sticky; top: -6px; z-index: 2;
  background: #fff; border-bottom: 1px solid #f6f6f6;
}
.spk-group-body { display: contents; }
.spk-item { display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit; font-size: 14px; color: var(--navy); padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.spk-item:hover { background: var(--green-tint); }
.spk-item.active { background: var(--green-tint); color: var(--green-active); font-weight: 700; }
.spk-item.ghost { color: var(--muted); font-size: 13px; }
.spk-menu-sep { height: 1px; background: #f1f1f1; margin: 5px 8px; }

/* ── имена участников ────────────────────────────────── */
.spk-edit { cursor: pointer; border: 1px dashed rgba(0, 0, 0, .18); font-family: var(--font); }
.spk-edit:hover { border-color: var(--green); }
input.spk-edit { cursor: text; border: 1px solid var(--green); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; color: var(--navy); outline: none; background: #fff; }

/* ── переименование в строке библиотеки ──────────────── */
.btn.icon { padding: 0 9px; font-size: 15px; line-height: 1; }
.t input.rename { width: 100%; height: 30px; padding: 0 8px; border: 1px solid var(--green); border-radius: 8px; font: inherit; font-size: 14px; color: var(--navy); outline: none; }

/* ── подпись директора с репликой ─────────────────────── */
.founder { display: flex; align-items: center; gap: 22px; margin: 28px 0 0; }
.founder-photo { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 6px 18px rgba(26, 52, 71, .12); }
.founder-text { display: grid; gap: 4px; }
.bubble { position: relative; align-self: start; justify-self: start; width: fit-content; background: #fff; border: 1px solid #ececec; border-radius: 14px; padding: 9px 16px; font-weight: 700; font-size: 16px; line-height: 1.35; color: var(--navy); box-shadow: 0 6px 18px rgba(26, 52, 71, .06); }
.bubble::before { content: ''; position: absolute; left: -7px; top: 22px; width: 13px; height: 13px; background: #fff; border-left: 1px solid #ececec; border-bottom: 1px solid #ececec; transform: rotate(45deg); }
.founder-name { font-weight: 700; margin: 2px 0 0; font-size: 15px; color: var(--navy); }
.founder-role { margin: 0; color: var(--muted); font-size: 13.5px; }
@media (max-width: 640px) { .founder { gap: 16px; } .founder-photo { width: 84px; height: 84px; } }
/* ── протокол встречи ─────────────────────────────────── */
.proto-topic { font-size: 17px; font-weight: 700; margin: 2px 0 4px; }
.proto-sec { margin-top: 18px; }
.proto-sec h3 { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 0 0 8px; }
.proto-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.proto-agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.proto-agenda li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: start; }
.proto-agenda b { display: block; font-weight: 600; font-size: 14.5px; }
.proto-agenda span { display: block; color: var(--muted); font-size: 14px; margin-top: 3px; }
.proto-agenda .at { border: 0; cursor: pointer; background: var(--green-tint); color: var(--green-active); font: 700 11px var(--font); border-radius: 999px; padding: 0; height: 22px; }
.proto-list { margin: 0; padding-left: 18px; display: grid; gap: 7px; font-size: 14.5px; line-height: 1.45; }
.proto-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.proto-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; padding: 0 10px 7px 0; }
.proto-table td { padding: 9px 10px 9px 0; border-top: 1px solid #f0f0f0; vertical-align: top; line-height: 1.4; }

/* ── уведомление на странице записи ───────────────────── */
.notice { border-radius: var(--r-ctrl); padding: 10px 14px; margin: 14px 0 0; font-size: 13.5px; line-height: 1.45; }
.notice.warn { background: #fff4d6; color: #7a5600; }
.notice.err { background: var(--red-tint); color: var(--red); }

/* ── таблица библиотеки ─────────────────────────────────  */
ul.list { list-style: none; margin: 0; padding: 0; }
ul.list li {
  display: grid; grid-template-columns: minmax(0, 1fr) 120px 66px 84px auto auto;
  align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-ctrl);
}
ul.list li:nth-child(even) { background: #fafafa; }
ul.list li:hover { background: var(--bg); }
ul.list li .t { min-width: 0; }
ul.list li .t a { display: block; font-weight: 500; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
ul.list li .t a:hover { color: var(--green-active); }
ul.list li .cell { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
ul.list li .cell.r { text-align: right; }
@media (max-width: 820px) {
  ul.list li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  ul.list li .cell { display: none; }
  ul.list li .cell.dur { display: block; }
}

/* ── расшифровка ───────────────────────────────────────── */
.transcript { margin-top: 8px; max-height: 62vh; overflow: auto; }
.tr { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 9px 10px; border-radius: var(--r-ctrl); cursor: pointer; align-items: start; }
.tr:hover { background: var(--bg); }
.tr.active { background: var(--green-tint); }
.tr.active time { color: var(--green-active); }
.tr time { font-size: 12px; color: #9a9a9a; font-variant-numeric: tabular-nums; padding-top: 3px; }
.tr .txt { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.tr p { margin: 0; font-size: 15px; line-height: 1.5; }
.spk { align-self: flex-start; font-size: 11px; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: var(--green-tint); color: var(--green-active); }
.spk-2 { background: #e9eefb; color: #2c4f9e; }
.spk-3 { background: #fff3d6; color: #8a6100; }
.spk-4 { background: var(--red-tint); color: var(--red); }
.spk-5 { background: #f0e9fb; color: #6b3fa0; }
.spk-6 { background: #e6f6f8; color: #16707d; }

/* ── итоги ─────────────────────────────────────────────── */
.summary { background: var(--navy); color: #fff; border-radius: var(--r-card); padding: 22px 24px; }
.summary h2 { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; opacity: .6; margin-bottom: 12px; }
.summary .body { white-space: pre-wrap; font-size: 14.5px; line-height: 1.6; opacity: .96; }

/* ── печать: фирменный протокол ────────────────────────── */
.print-only, .print-head { display: none; }
@media print {
  .print-only { display: block; }
  .print-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid #e6e6e6; }
  .print-head img { height: 22px; width: auto; }
  .print-head span { font-size: 12px; color: #7c7c7c; }

  /* место под полосу прокрутки зарезервировано всегда: страница не прыгает вбок,
   когда контент становится выше/ниже окна (шрифты, анимации, якоря) */
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
/* аккуратная полоса в фирменных цветах вместо системной серой */
* { scrollbar-width: thin; scrollbar-color: #cfd6db transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cfd6db; border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b9c3ca; background-clip: content-box; }
section[id] { scroll-margin-top: 84px; }
@keyframes flashRing { 0% { box-shadow: 0 0 0 0 rgba(99, 197, 86, .55); } 100% { box-shadow: 0 0 0 14px rgba(99, 197, 86, 0); } }
.flash { animation: flashRing 1.3s ease-out 1; border-radius: 16px; }

:root { --bg: #fff; }
  body { background: #fff; font-size: 12.5px; }
  .no-print { display: none !important; }
  .wrap.split { display: block; padding: 0; }
  .card { padding: 0 0 16px; border-radius: 0; }
  .summary { color: #000; background: #fff; border-left: 3px solid var(--green); border-radius: 0; padding: 0 0 0 14px; margin-bottom: 18px; }
  .summary h2 { color: var(--muted); opacity: 1; }
  .transcript { max-height: none; overflow: visible; }
  .tr { background: none !important; page-break-inside: avoid; padding-left: 0; }
  .spk { background: none !important; color: #000 !important; border: 1px solid #bbb; }
  .proto-agenda .at { background: none !important; color: #000 !important; }
  .proto-table td { border-color: #ddd; }
  .proto-sec h3 { color: #555; }
  .tag { display: none; }
}




/* ── лендинг ───────────────────────────────────────────── */
.shell { max-width: 1200px; margin: 0 auto; padding: 0 24px 48px; }
.hero { padding: 68px 0 46px; }
.hero h1 { font-size: clamp(30px, 4.6vw, 52px); line-height: 1.08; letter-spacing: -.02em; }
.lead { font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 660px; margin: 20px 0 28px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid3 { grid-template-columns: minmax(0, 1fr); } }
.feature h3 { font-size: 16px; margin: 0 0 8px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
/* шаги: три колонки на широком экране, чтобы блок занимал меньше высоты */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: s; }
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; align-items: start; }
  .steps li { row-gap: 4px; }
  .steps li::before { margin-top: 0; }
  .steps span { font-size: 13.5px; line-height: 1.45; }
  .steps b { font-size: 14.5px; }
}
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: start; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--green-tint); color: var(--green-active); font-weight: 700; font-size: 12px; margin-top: 1px; }
.steps li > b, .steps li > span { grid-column: 2; }
.steps b { display: block; font-size: 15px; line-height: 1.35; }
.steps span { color: var(--muted); font-size: 14px; }
.cta { background: var(--green-tint); border-radius: var(--r-card); padding: 32px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 16px; }
.site-foot { background: #fff; border-top: 1px solid var(--line); }
.foot-inner { max-width: 1200px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
@media (max-width: 720px) {
  .hide-sm { display: none !important; }
  .hero { padding: 36px 0 28px; }
  .cta { padding: 22px; }
}

/* ── вход (по образцу shtrafovnet.ru/signin) ───────────── */
.auth-body { background: var(--bg); }
.auth-layout { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 24px 148px; position: relative; }
.auth-card { width: 360px; max-width: 100%; background: #fff; border-radius: 12px; padding: 36px 24px; display: flex; flex-direction: column; align-items: center; }
.auth-card-logo { display: block; margin: 0 auto 22px; }
.auth-card-logo img { height: 26px; width: auto; display: block; }
.auth-card-subtitle { margin: 0 0 20px; color: var(--muted); font-size: 14px; text-align: center; }
.auth-card .err { width: 100%; background: var(--red-tint); color: var(--red); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 0 0 14px; text-align: left; }
.auth-card form { width: 100%; display: grid; gap: 12px; }
.auth-card .btn { width: 100%; height: 48px; font-size: 15px; border-radius: 10px; }
.field-wrap { position: relative; }
.field-wrap input { width: 100%; height: 48px; padding: 0 44px 0 14px; border-radius: 10px; border: 1px solid #e2e2e2; background: #fff; color: var(--ink); font: 400 15px var(--font); }
.field-wrap input::placeholder { color: #a9a9a9; }
.field-wrap input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(99, 197, 86, .15); }
.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: none; color: #a9a9a9; cursor: pointer; border-radius: 8px; }
.eye:hover { background: var(--bg); color: var(--muted); }
.auth-contacts { position: absolute; left: 0; right: 0; bottom: 40px; display: flex; justify-content: center; gap: 60px; flex-wrap: wrap; padding: 0 24px; font-size: 14px; }
.auth-contacts > span { display: flex; flex-direction: column; gap: 2px; color: var(--muted); }
.auth-contacts .v { color: var(--ink); }
.auth-contacts a.v { text-decoration: none; }
.auth-contacts a.v:hover { color: var(--green-active); }
@media (max-width: 720px) {
  .auth-layout { padding-bottom: 32px; }
  .auth-contacts { position: static; margin-top: 24px; gap: 14px; flex-direction: column; align-items: center; text-align: center; }
}
/* ── мобильная вёрстка: страница записи и библиотека ─── */
@media (max-width: 720px) {
  .wrap { padding: 14px; gap: 12px; }
  .card { padding: 16px; border-radius: 14px; }
  .wrap.split { gap: 12px; }
  h1 { font-size: 21px; line-height: 1.25; }
  .head { flex-wrap: wrap; gap: 8px; }
  .nav, nav { flex-wrap: wrap; gap: 12px; font-size: 14px; }
  .btn { padding: 10px 14px; font-size: 14px; }
  .btn-lg { width: 100%; justify-content: center; }
  .row-actions { flex-wrap: wrap; gap: 8px; }
  video, .player { width: 100%; height: auto; border-radius: 12px; }
  .transcript { max-height: none; }
  .tr { grid-template-columns: 42px minmax(0, 1fr); gap: 10px; }
  .spk-form { flex-wrap: wrap; gap: 8px; }
  .proto-table { display: block; overflow-x: auto; }
  .spk-menu { max-width: calc(100vw - 24px); }
  .ul.list li, ul.list li { padding: 10px 0; }
  .steps li { gap: 10px; }
}
@media (max-width: 480px) {
  .wrap { padding: 10px; }
  .card { padding: 13px; }
  .tag { font-size: 11.5px; padding: 3px 8px; }
  .btn { padding: 9px 12px; font-size: 13.5px; }
  h1 { font-size: 19px; }
  .lead { font-size: 14.5px; }
}
/* ── поиск: подсветка совпадений и найденной реплики ─── */
mark { background: #fff2a8; color: inherit; padding: 0 2px; border-radius: 3px; }
.tr.hit { background: #f4fbef; border-radius: 10px; box-shadow: inset 3px 0 0 var(--green); }
/* ── модальные окна в стиле сервиса ─── */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px;
         background: rgba(26, 52, 71, .38); backdrop-filter: blur(2px); }
.modal.hidden { display: none; }
.modal-card { width: 100%; max-width: 460px; background: #fff; border-radius: 18px; padding: 24px; box-shadow: 0 24px 60px rgba(20, 40, 55, .22); }
.modal-card h3 { margin: 0 0 6px; font-size: 19px; }
.modal-card p { margin: 0 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chips button { border: 1px solid #dcdcdc; background: #fff; border-radius: 10px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; color: var(--navy); }
.chips button.on { border-color: var(--green); background: var(--green-tint); font-weight: 700; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.modal input.share-link { width: 100%; height: 42px; border: 1px solid #dcdcdc; border-radius: 10px; padding: 0 12px; font: inherit; font-size: 13.5px; color: var(--navy); background: #fafafa; }
/* ── библиотека на телефоне: карточки вместо таблицы ─── */
@media (max-width: 720px) {
  .app-name, .divider { display: none; }
  header .nav, header nav { gap: 14px; }

  ul.list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 12px;
  }
  ul.list li .t { flex: 1 1 100%; order: 1; }
  ul.list li .t a {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
  }
  ul.list li .cell.num:not(.r) { display: block; order: 2; font-size: 12.5px; }
  ul.list li .cell.dur { order: 2; font-size: 12.5px; }
  ul.list li > span:nth-last-child(2) { order: 3; }
  ul.list li > span:last-child {
    order: 4;
    flex: 1 1 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start !important;
    gap: 6px;
  }

  /* шапка библиотеки: счётчик, фильтр и поиск в одну колонку */
  #library > div { flex-wrap: wrap !important; row-gap: 10px; }
  #owner-filter { margin-left: 0 !important; }
  #search { flex: 1 1 100%; min-width: 0 !important; }
}
/* ── живое превью записи ─── */
.live-box { margin-top: 14px; display: grid; gap: 8px; max-width: 720px; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--red); text-transform: lowercase; }
.live-badge::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: livePulse 1.4s ease-in-out infinite; }
.live-video { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #0f1720; border: 1px solid #e6e6e6; object-fit: contain; }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
/* ── известные имена в меню спикера ─── */
.spk-known { display: flex; align-items: center; gap: 4px; }
.spk-known .spk-item { flex: 1; text-align: left; }
.spk-forget { border: 0; background: transparent; color: #9aa7b1; font-size: 17px; line-height: 1; padding: 6px 9px; min-width: 30px; min-height: 30px; cursor: pointer; border-radius: 8px; }
.spk-forget:hover { color: var(--red); background: #fdf2f2; }
/* ── справочник сотрудников ─── */
.chip-person { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e6e6e6; background: #fff; border-radius: 999px; padding: 5px 10px 5px 12px; font-size: 13.5px; }
.chip-person .mini { color: var(--muted); font-size: 12px; }
.chip-person button { border: 0; background: transparent; color: #b9c2c8; font-size: 15px; line-height: 1; cursor: pointer; padding: 0 2px; }
.chip-person button:hover { color: var(--red); }
/* ── отделы и роли ─── */
.dir-group { border: 1px solid #ececec; border-radius: 12px; padding: 10px 12px; }
.dir-group-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dir-group-head .spacer { flex: 1; }
.dir-role-input { height: 30px; border: 1px solid #dcdcdc; border-radius: 9px; padding: 0 10px; font: inherit; font-size: 13px; width: 190px; }
.dir-roles { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
/* ── перевод сотрудника в чипе ─── */
.chip-person[data-person] { cursor: pointer; }
.chip-person[data-person]:hover { border-color: var(--green); }
.chip-person select { max-width: 132px; height: 30px; border: 1px solid #dcdcdc; border-radius: 8px; padding: 0 6px; font: inherit; font-size: 13px; }
.chip-person .mv-email { width: 160px; max-width: 42vw; height: 30px; border: 1px solid #dcdcdc; border-radius: 8px; padding: 0 8px; font: inherit; font-size: 13px; }
/* пока чип в режиме правки — он занимает всю строку и не съезжает */
.chip-person:has(select) { flex-wrap: wrap; max-width: 100%; border-radius: 14px; }
/* ── кнопки строки библиотеки: переносятся, не растягивают страницу ─── */
.row-actions { display: flex; gap: 2px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 720px) {
  .row-actions { justify-content: flex-start; gap: 6px; }
  .row-actions .btn { white-space: nowrap; }
}
/* ── правка имени спикера прямо в чипе ─── */
.spk-edit-wrap { display: inline-flex; align-items: center; gap: 4px; }
.spk-edit-wrap input { height: 30px; border: 1px solid var(--green); border-radius: 8px; padding: 0 8px; font: inherit; font-size: 13px; width: 150px; }
.spk-ok, .spk-cancel { border: 0; border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: 15px; line-height: 1; }
.spk-ok { background: var(--green); color: #fff; }
.spk-ok:hover { background: var(--green-active); }
.spk-cancel { background: #f1f3f4; color: var(--muted); }
.spk-cancel:hover { background: #e6e9ea; }
/* ── пауза записи ─── */
.timer.paused .dot { background: var(--muted); animation: none; }
.timer.paused #timer { color: var(--muted); }
/* ── массовые действия в библиотеке ─── */
ul.list li { grid-template-columns: 24px minmax(0, 1fr) 120px 66px 84px auto auto; }
.pickbox { display: grid; place-items: center; cursor: pointer; }
/* свой чекбокс в фирменном зелёном: нативный цвет браузера не совпадал с брендом */
.check input,
.pickbox input {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; margin: 0;
  border: 1.5px solid #cfd6da; border-radius: 5px;
  background-color: #fff; cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease;
}
.check input:hover,
.pickbox input:hover { border-color: var(--green); }
.check input:checked,
.pickbox input:checked {
  border-color: var(--green);
  background-color: var(--green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6.5 9 17.5l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px 13px;
}
.check input:indeterminate,
.pickbox input:indeterminate {
  border-color: var(--green);
  background-color: var(--green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.6' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px 13px;
}
.check input:focus-visible,
.pickbox input:focus-visible { outline: 2px solid rgba(99, 197, 86, .45); outline-offset: 2px; }

.bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 12px; background: var(--green-tint); border-radius: 12px; }
.bulk.hidden { display: none; }
.pick-all { margin-right: 2px; }
.pick-all input { width: 17px; height: 17px; }
.bulk b { background: var(--green-tint); color: var(--green-active); border-radius: 8px; padding: 3px 9px; font-size: 13px; }
@media (max-width: 720px) {
  ul.list li { grid-template-columns: 24px minmax(0, 1fr); }
  .bulk { flex-wrap: wrap; margin-left: 0; }
}
/* ── иконка «переименовать»: тонкий карандаш, как в фирменных иконках ─── */
.btn.icon { display: inline-grid; place-items: center; }
.pencil { display: block; color: var(--muted); }
.btn.icon:hover .pencil { color: var(--navy); }
/* ── правка протокола ─── */
.pe-form { display: grid; gap: 10px; }
.pe-form label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.pe-form input, .pe-form textarea {
  width: 100%; border: 1px solid #dcdcdc; border-radius: 10px; padding: 8px 12px;
  font: inherit; font-size: 14px; color: var(--navy); background: #fff; resize: vertical;
}
.pe-form input:focus, .pe-form textarea:focus { outline: 2px solid rgba(99,197,86,.35); border-color: var(--green); }
.pe-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }