/* «Слухавка» · «Хвиля»: меню розділів, «Розсилки», «Обдзвін». Макет, не робочий код.
   Підключати після hvylia.css і перед palettes.css.
   Лише змінні з hvylia.css: кожен екран працює з будь-яким набором кольорів (?p=beton-zel тощо).
   Хвиля — лише там, де є запис розмови або дзвінки (обдзвін). У розсилках хвиль немає. */

/* ---------- Ролі й ширини ---------- */
@media (max-width: 999px) { .only-wide { display: none !important; } }
@media (min-width: 1000px) { .only-phone { display: none !important; } }

/* ---------- Меню розділів: телефон — нижня панель ---------- */
.tabbar {
  position: fixed; z-index: 5; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: var(--surface); box-shadow: 0 -1px 0 var(--line), 0 -8px 24px rgba(var(--shade), .06);
}
.tabbar a, .tabbar button { border: 0; background: none; font-family: inherit; cursor: pointer; position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 56px; border-radius: 16px; text-decoration: none; font-size: 13px; font-weight: 600; color: var(--muted); }
.tabbar .ti { display: grid; place-items: center; width: 56px; height: 30px; border-radius: 999px; }
.tabbar a[aria-current] { color: var(--ink); font-weight: 700; }
.tabbar a[aria-current] .ti { background: var(--accent-soft); color: var(--accent); }
.tabbar .badge { position: absolute; top: 3px; left: calc(50% + 8px); display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--miss); color: var(--on-miss); font-size: 12px; font-weight: 800; box-shadow: 0 0 0 2px var(--surface); }
body.tabs .main { padding-bottom: 104px; }
body.tabs.has-player .main { padding-bottom: 248px; }
body.tabs .player { bottom: calc(76px + env(safe-area-inset-bottom)); }
body.form .main { padding-bottom: 128px; }

/* Бокове меню (комп'ютер): розділювач і неактивні пункти */
.snav-sep { display: block; height: 1px; margin: 10px 12px; background: var(--line); }
.snav a[aria-disabled] { cursor: default; }
.biz-card.is-static, .biz-pill.is-static { cursor: default; }
.biz-pill.is-static { padding-right: 16px; }

/* ---------- Демо-смуга ---------- */
.demo { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; margin: 0 -16px 10px; padding: 6px 16px; background: var(--neutral-soft); color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.3; text-align: center; }
.demo svg { width: 16px; height: 16px; }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none; text-align: center; cursor: pointer; }
.btn-s { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn-l { min-height: 56px; font-size: 17px; }
.btn-block { display: flex; width: 100%; }
.btn-acc { background: var(--accent); color: var(--on-accent); }
.btn-line { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn[aria-disabled="true"] { background: var(--neutral-soft); color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); cursor: not-allowed; }
.why { display: flex; gap: 8px; margin: 10px 2px 0; font-size: 13px; line-height: 1.35; color: var(--muted); }
.why svg { width: 16px; height: 16px; margin-top: 1px; }

/* ---------- Заголовок розділу, крихти, підрозділи ---------- */
.title-row .btn { flex: none; }
.crumb { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: 0 0 2px -8px; padding: 0 12px 0 6px; border-radius: 999px; font-weight: 700; font-size: 15px; color: var(--accent); text-decoration: none; }
.lead { margin: -6px 0 14px; color: var(--muted); font-size: 15px; }
.subnav { position: relative; display: flex; gap: 8px; margin: 0 -16px 6px; padding: 2px 16px 8px; overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav .chip { flex: none; }
.subnav .chip[aria-current] { background: var(--ink); color: var(--surface); box-shadow: none; }
.chip .dt { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.chip .dt.off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.subnav .chip[aria-current] .dt.off { box-shadow: inset 0 0 0 1.5px var(--chip-count-on); }
.sec-h .act { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; margin-top: -12px; margin-bottom: -12px; }

/* ---------- Значки каналів і статуси ---------- */
/* Назви каналів — текстом, без чужих логотипів. Значок — перша літера. */
.ch { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 18px; flex: none; }
.ch.off { background: var(--neutral-soft); color: var(--muted); }
.ch.s { width: 28px; height: 28px; border-radius: 9px; font-size: 13px; }
.ch.l { width: 56px; height: 56px; border-radius: 16px; font-size: 22px; }
.chain { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.chain svg { width: 14px; height: 14px; color: var(--muted); }

.st { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: 999px; background: var(--neutral-soft); color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.st-ok { background: var(--ok-soft); color: var(--ok-text); }
.st-live { background: var(--accent-soft); color: var(--accent); }
.st-miss { background: var(--miss-soft); color: var(--miss-text); }
.st-plan { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.st svg { width: 14px; height: 14px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: live 1.6s ease-in-out infinite; }
@keyframes live { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ---------- Картки ---------- */
.card { padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.card + .card { margin-top: 12px; }
.card-h { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.card-lead { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.note { margin: 10px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); }

/* Сітка з правою колонкою (комп'ютер) */
.split { display: block; }
.split > aside > .card:first-child, .split > aside > h2:first-child { margin-top: 22px; }

/* ---------- Розсилки: канали ---------- */
.chan-grid { display: grid; gap: 8px; }
.chan { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px; gap: 2px 12px; align-items: center; padding: 14px 14px 14px 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.chan .ch { grid-row: 1 / span 2; }
.chan-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 17px; font-weight: 700; text-decoration: none; }
.chan-name::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.chan .sub { grid-column: 2; font-size: 14px; color: var(--muted); line-height: 1.35; }
.chan .go { grid-column: 3; grid-row: 1 / span 2; color: var(--muted); }
.chan .need { grid-column: 1 / -1; margin: 8px 0 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.chan .btn { grid-column: 1 / -1; position: relative; z-index: 1; margin-top: 10px; }
.chan .mini { grid-column: 1 / -1; display: flex; gap: 16px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.chan .mini b { color: var(--ink); font-weight: 800; }

/* Розсилки: картка розсилки */
.bc-list { display: grid; gap: 8px; }
.bc { display: grid; gap: 10px; padding: 14px 16px 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.bc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.bc h3 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.bc-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0; font-size: 14px; color: var(--muted); }
.bc-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bc-nums b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.bc-nums span { font-size: 13px; color: var(--muted); }
.bc-nums i { display: block; height: 4px; margin-top: 6px; border-radius: 2px; background: var(--neutral-soft); overflow: hidden; }
.bc-nums i::before { content: ""; display: block; width: var(--v); height: 100%; background: var(--accent); }
.bc-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.bc.is-plan { box-shadow: inset 0 0 0 2px var(--accent-soft), var(--shadow); }

/* Автоматичні нагадування: перемикачі */
.auto { display: grid; }
.auto label { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; align-items: center; min-height: 64px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.auto label:first-child { border-top: 0; padding-top: 4px; }
.auto b { font-size: 15px; font-weight: 700; }
.auto small { grid-column: 1; font-size: 14px; line-height: 1.35; color: var(--muted); }
.auto .is-soon { cursor: default; }
.sw { grid-column: 2; grid-row: 1 / span 2; position: relative; width: 52px; height: 32px; flex: none; }
.sw input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sw i { position: absolute; inset: 0; border-radius: 999px; background: var(--solved); transition: background .2s; }
.sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(var(--shade), .3); transition: transform .2s; }
.sw input:checked + i { background: var(--accent); }
.sw input:checked + i::after { transform: translateX(20px); background: var(--on-accent); }
.sw input:focus-visible + i { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Канал: шапка, кроки підключення, статистика ---------- */
.chpage { display: grid; grid-template-areas: "hero" "prev" "rest"; min-width: 0; }
.chpage > .hero { grid-area: hero; }
.chpage > .prev { grid-area: prev; min-width: 0; }
.chpage > .rest { grid-area: rest; min-width: 0; }
.hero { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 18px 16px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.hero .ch { grid-row: 1 / span 2; }
.hero h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.hero .sub { font-size: 15px; color: var(--muted); line-height: 1.35; }
.hero .acts { grid-column: 1 / -1; display: grid; gap: 8px; margin-top: 12px; }
.hero .why { grid-column: 1 / -1; }
.need-steps { grid-column: 1 / -1; list-style: none; display: grid; gap: 12px; margin: 14px 0 2px; padding: 14px 0 0; border-top: 1px solid var(--line); counter-reset: s; }
.need-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; counter-increment: s; font-size: 15px; line-height: 1.4; }
.need-steps li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--neutral-soft); font-weight: 800; font-size: 14px; }
.need-steps b { display: block; font-weight: 700; }
.need-steps span { font-size: 14px; color: var(--muted); }

.fun { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fun > div { min-width: 0; padding: 14px 14px 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.fun span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
.fun b { display: block; margin-top: 6px; font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.fun em { font-style: normal; font-size: 14px; font-weight: 600; color: var(--muted); }
.fun i { display: block; height: 6px; margin-top: 10px; border-radius: 3px; background: var(--neutral-soft); overflow: hidden; }
.fun i::before { content: ""; display: block; width: var(--v); height: 100%; border-radius: 3px; background: var(--accent); }
.fun .na b { color: var(--muted); }
.fun .na small { display: block; margin-top: 8px; font-size: 13px; line-height: 1.35; color: var(--muted); }
.fun.is-empty b { color: var(--solved); }

/* Що натискали (кнопки під повідомленням) */
.split-bar { display: flex; gap: 3px; height: 12px; margin: 4px 0 12px; border-radius: 6px; overflow: hidden; }
.split-bar i { display: block; width: var(--v); background: var(--c); }
.legend { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 40px; border-top: 1px solid var(--line); font-size: 15px; }
.legend li:first-child { border-top: 0; }
.legend .mk { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.legend b { font-weight: 800; }

/* Чекають відповіді й відповіді клієнтів */
.ask-list { display: grid; gap: 8px; }
.ask { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 12px; align-items: center; padding: 14px; border-radius: 18px; background: var(--accent-soft); }
.ask .ava { grid-row: 1 / span 2; background: var(--surface); color: var(--accent); }
.ask b { font-weight: 700; }
.ask .when { grid-column: 2; font-size: 14px; color: var(--muted); }
.ask q { grid-column: 1 / -1; margin-top: 8px; font-size: 16px; line-height: 1.4; quotes: none; }
.ask .btn { grid-column: 1 / -1; margin-top: 10px; }
.ava { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--neutral-soft); font-weight: 700; font-size: 15px; flex: none; }
.reps { display: grid; gap: 8px; }
.rep { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.rep .ava { grid-row: 1 / span 2; }
.rep b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep small { grid-column: 2; font-size: 14px; color: var(--muted); line-height: 1.35; }
.rep time { grid-column: 3; grid-row: 1; justify-self: end; font-size: 14px; color: var(--muted); }
.rep .st { grid-column: 3; grid-row: 2; justify-self: end; }

/* ---------- Перегляд повідомлення («так бачить клієнт») ---------- */
/* Схема, а не копія чужого застосунку: будова повідомлення, кольори — з набору кабінету. */
.prev-h { display: flex; align-items: baseline; gap: 8px; margin: 22px 4px 10px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.chat { max-width: 400px; margin: 0; border-radius: 28px; background: var(--neutral-soft); box-shadow: inset 0 0 0 1.5px var(--line); overflow: hidden; }
.chat-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.chat-h .ava { width: 36px; height: 36px; background: var(--ink); color: var(--surface); font-size: 14px; }
.chat-h .txt { display: grid; line-height: 1.2; }
.chat-h b { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; }
.chat-h b svg { width: 16px; height: 16px; color: var(--accent); }
.chat-h small { font-size: 13px; color: var(--muted); }
.chat-body { display: grid; gap: 6px; padding: 14px 12px 16px; }
.chat-day { justify-self: center; padding: 2px 10px; border-radius: 999px; background: var(--surface); font-size: 13px; color: var(--muted); }
.msg { justify-self: start; max-width: 88%; padding: 10px 12px 6px; border-radius: 18px 18px 18px 6px; background: var(--surface); font-size: 15px; line-height: 1.4; box-shadow: 0 1px 1px rgba(var(--shade), .06); }
.msg.me { justify-self: end; border-radius: 18px 18px 6px 18px; background: var(--accent-soft); }
.msg time { display: block; margin-top: 2px; text-align: right; font-size: 13px; color: var(--muted); }
.msg .hd { display: block; margin-bottom: 4px; font-weight: 800; }
.msg .ft { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.msg .img { display: block; margin: -4px -6px 8px; border-radius: 12px; overflow: hidden; }
.msg .img svg { display: block; width: 100%; height: auto; }
.msg .mbtn { display: grid; place-items: center; min-height: 40px; margin: 8px 0 4px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px; }
.kb { justify-self: start; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 88%; }
.kb span { display: grid; place-items: center; min-height: 40px; border-radius: 12px; background: var(--surface); color: var(--accent); font-weight: 700; font-size: 14px; }
.kb .w { grid-column: 1 / -1; }
.qr-btns { justify-self: start; display: grid; width: 88%; margin-top: -4px; border-radius: 0 0 18px 18px; background: var(--surface); overflow: hidden; }
.qr-btns span { display: grid; place-items: center; min-height: 40px; border-top: 1px solid var(--line); color: var(--accent); font-weight: 700; font-size: 14px; }
.msg.has-qr { border-radius: 18px 18px 0 0; }
.var { padding: 0 5px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 700; white-space: nowrap; }
.chat-cap { margin: 10px 6px 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.promo .p-bg { fill: var(--accent-soft); }
.promo .p-ink { fill: var(--ink); font-family: var(--font); }
.promo .p-acc { fill: var(--accent); font-family: var(--font); }
.promo .p-wave { stroke: var(--accent); stroke-width: 5; stroke-linecap: round; fill: none; }

/* Шаблони WhatsApp */
.tpl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.tpl:first-of-type { border-top: 0; padding-top: 4px; }
.tpl b { font-weight: 700; }
.tpl p { grid-column: 1 / -1; margin: 4px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-size: 14px; line-height: 1.45; }

/* Порожньо / завантаження / помилка: «тиша» замість хвилі */
.empty { display: grid; justify-items: center; gap: 6px; padding: 26px 20px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); text-align: center; }
.empty .flat { width: 140px; margin: 4px 0 12px; }
.empty b { font-size: 17px; font-weight: 700; }
.empty p { margin: 0; max-width: 36ch; font-size: 15px; line-height: 1.4; color: var(--muted); }
.empty .btn { margin-top: 10px; }
.loading-wave { display: flex; align-items: center; gap: 4px; height: 32px; margin: 4px 0 8px; }
.loading-wave i { width: 3px; height: 30%; border-radius: 2px; background: var(--wave-rest); animation: lw 1.2s ease-in-out infinite; }
.loading-wave i:nth-child(2n) { animation-delay: .15s; } .loading-wave i:nth-child(3n) { animation-delay: .3s; } .loading-wave i:nth-child(5n) { animation-delay: .45s; }
@keyframes lw { 50% { height: 100%; background: var(--wave); } }
@media (prefers-reduced-motion: reduce) { .loading-wave i { animation: none; height: 60%; } }
.err-line { padding: 10px 12px; border-radius: 12px; background: var(--miss-soft); color: var(--miss-ink); font-size: 14px; line-height: 1.4; }
.err-line b { color: var(--miss); }

/* ---------- Форми: кроки, вибір, поля ---------- */
.step { margin-top: 12px; padding: 18px 16px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.step-h { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.step-h .n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 15px; font-weight: 800; flex: none; }
.step-lead { margin: 0 0 14px; font-size: 15px; line-height: 1.4; color: var(--muted); }
.lbl { display: block; margin: 16px 0 8px; font-size: 14px; font-weight: 700; }
.lbl small { font-weight: 600; color: var(--muted); }

.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg); }
.seg label { display: grid; place-items: center; min-height: 44px; padding: 0 10px; border-radius: 999px; font-weight: 700; font-size: 15px; line-height: 1.15; text-align: center; color: var(--muted); cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

.opts { display: grid; gap: 8px; }
.opt { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; min-height: 64px; padding: 12px 14px; border-radius: 16px; background: var(--bg); cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .dot { grid-row: 1 / span 2; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--muted); }
.opt b { font-weight: 700; }
.opt small { grid-column: 2; font-size: 14px; line-height: 1.35; color: var(--muted); }
.opt .cnt { grid-column: 3; grid-row: 1 / span 2; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.opt:has(input:checked) { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.opt:has(input:checked) .dot { box-shadow: inset 0 0 0 7px var(--accent); }
.opt:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.opt.is-soon { cursor: default; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.opt.is-soon .dot { box-shadow: inset 0 0 0 2px var(--solved); }
.opt.is-soon b { color: var(--muted); }

.fld { width: 100%; min-height: 48px; padding: 0 14px; border: 1.5px solid transparent; border-radius: 14px; background: var(--bg); font: inherit; font-weight: 600; color: var(--ink); }
.fld:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.sel { position: relative; display: block; }
.sel select { appearance: none; -webkit-appearance: none; width: 100%; min-height: 48px; padding: 0 40px 0 14px; border: 1.5px solid transparent; border-radius: 14px; background: var(--bg); font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.sel select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.sel svg { position: absolute; right: 12px; top: 50%; margin-top: -10px; pointer-events: none; color: var(--muted); }
.sel.inl { display: inline-block; }
.sel.inl select { min-height: 44px; width: auto; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.chk { display: flex; align-items: center; gap: 12px; min-height: 48px; margin-top: 8px; font-size: 15px; cursor: pointer; }
.chk input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex: none; }

.editor { min-height: 128px; padding: 14px 16px; border: 1.5px solid transparent; border-radius: 16px; background: var(--bg); font-size: 16px; line-height: 1.55; }
.editor:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.ed-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.vars { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.vars .chip { min-height: 44px; padding: 0 14px; font-size: 14px; }
.vars .chip b { color: var(--accent); }

/* Черга каналів */
.queue { display: grid; }
.q-step { display: grid; grid-template-columns: 28px 44px minmax(0, 1fr); gap: 2px 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--bg); }
.q-step .n { grid-row: 1 / span 2; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 14px; font-weight: 800; }
.q-step .ch { grid-row: 1 / span 2; }
.q-step b { font-weight: 700; }
.q-step small { grid-column: 3; font-size: 14px; line-height: 1.35; color: var(--muted); }
.q-step.is-off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--solved); }
.q-step.is-off .n { background: var(--neutral-soft); color: var(--muted); }
.q-step.is-off b { color: var(--muted); }
.q-wait { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-left: 27px; padding: 8px 0 8px 22px; border-left: 2px solid var(--wave-rest); font-size: 14px; font-weight: 600; color: var(--muted); }

/* Вартість */
.cost { display: grid; }
.cost-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.cost-row:first-child { border-top: 0; }
.cost-row .ch { grid-row: 1 / span 2; }
.cost-row b { font-weight: 700; font-size: 15px; }
.cost-row small { grid-column: 2; font-size: 13px; color: var(--muted); }
.cost-row .v { grid-column: 3; grid-row: 1 / span 2; font-weight: 800; font-size: 16px; white-space: nowrap; }
.cost-row.is-off b, .cost-row.is-off .v { color: var(--muted); font-weight: 600; }
.cost-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 4px; padding-top: 12px; border-top: 2px solid var(--ink); font-size: 18px; font-weight: 800; }
.cost-total b { font-size: 26px; letter-spacing: -.02em; }
.sum-list { display: grid; gap: 0; margin: 0 0 14px; }
.sum-list div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.sum-list div:first-child { border-top: 0; }
.sum-list dt { color: var(--muted); }
.sum-list dd { margin: 0; font-weight: 700; text-align: right; }

/* Нижня панель дії (телефон, форми) */
.actbar { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) 16px; background: var(--surface); box-shadow: 0 -1px 0 var(--line), 0 -8px 24px rgba(var(--shade), .08); }
.actbar b { display: block; font-size: 16px; font-weight: 800; line-height: 1.2; }
.actbar small { display: block; font-size: 13px; color: var(--muted); line-height: 1.3; }
.actbar .btn { grid-column: 2; grid-row: 1 / span 2; }

/* ---------- Обдзвін ---------- */
.cw { display: block; width: 100%; height: 100%; overflow: visible; }
.cw path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-width: 2.5px; }
.cw .c-ans { stroke: var(--wave); }
.cw .c-int { stroke: var(--accent); stroke-width: 3px; }
.cw .c-no { stroke: var(--miss); stroke-width: 3.5px; }
.cw .c-wait { stroke: var(--wave-rest); stroke-width: 3px; }
.mk { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.mk-ans { background: var(--wave); } .mk-int { background: var(--accent); } .mk-no { background: var(--miss); border-radius: 50%; } .mk-wait { background: var(--wave-rest); border-radius: 50%; }

.camp-list { display: grid; gap: 8px; }
.camp { position: relative; display: grid; gap: 10px; padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.camp-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.camp h3 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; }
.camp h3 a { text-decoration: none; }
.camp h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.camp .sub { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.camp-prog { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--muted); }
.camp-prog b { color: var(--ink); font-size: 16px; font-weight: 800; }
.camp .cwave { height: 34px; }
.cleg { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.cleg li { display: inline-flex; align-items: center; gap: 6px; }
.cleg b { color: var(--ink); font-weight: 800; }

.big-wave { padding: 16px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.big-wave .cwave { height: 64px; margin: 14px 0 6px; }
.big-wave .ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.cstats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.cstats div { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 0 8px; align-items: center; align-content: start; }
.cstats b { grid-column: 2; font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.cstats span { grid-column: 2; font-size: 13px; color: var(--muted); line-height: 1.3; }
.cstats .mk { grid-row: 1; }
.cstats .is-int b { color: var(--accent); } .cstats .is-no b { color: var(--miss); }
.now-line { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.now-line b { color: var(--ink); }
.c-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; }

.lead-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 14px 14px 14px 16px; border-radius: 18px; background: var(--accent-soft); }
.lead-card .num { font-size: 18px; font-weight: 700; }
.lead-card .sub { grid-column: 1; font-size: 14px; color: var(--muted); }
.lead-card .sub b { color: var(--accent); }
.lead-card .btn { grid-column: 1 / -1; margin-top: 8px; }
.row .r-meta .int { color: var(--accent); font-weight: 700; }
.row .r-meta .wait { color: var(--muted); font-weight: 600; }
.row.is-int { box-shadow: inset 4px 0 0 var(--accent), var(--shadow); }
.r-play.is-live { background: var(--accent-soft); color: var(--accent); }
.r-wave .dots { display: block; height: 2px; margin-top: 11px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--wave-rest) 0 3px, transparent 3px 8px); }

/* Завантаження файла */
.drop { display: grid; justify-items: center; gap: 8px; padding: 22px 16px 20px; border-radius: 18px; border: 2px dashed var(--wave); background: var(--bg); text-align: center; }
.drop .ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.drop .ic svg { width: 26px; height: 26px; }
.drop b { font-size: 17px; font-weight: 700; }
.drop p { margin: 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.drop .btn { margin-top: 6px; }
.drop.is-over { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.file { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; margin-top: 10px; padding: 10px 6px 10px 12px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.file .ic { grid-row: 1 / span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); }
.file b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file small { grid-column: 2; font-size: 14px; color: var(--muted); }
.file .act { grid-column: 3; grid-row: 1 / span 2; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; font-weight: 700; font-size: 15px; color: var(--accent); text-decoration: none; }
.paste { margin-top: 6px; }
.paste summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; color: var(--accent); cursor: pointer; list-style: none; }
.paste summary::-webkit-details-marker { display: none; }
.paste textarea { display: block; width: 100%; min-height: 112px; margin-top: 4px; padding: 12px 14px; border: 1.5px solid transparent; border-radius: 14px; background: var(--bg); font: inherit; line-height: 1.5; resize: vertical; }

/* Відповідність колонок: поле → колонка файла */
.map { display: grid; gap: 8px; }
.map-f { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: var(--bg); }
.map-f .t { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.map-f .t b { font-size: 16px; font-weight: 700; }
.map-f .req { font-size: 13px; font-weight: 700; color: var(--miss); }
.map-f .opt-t { font-size: 13px; font-weight: 600; color: var(--muted); }
.map-f small { font-size: 14px; color: var(--muted); line-height: 1.35; }
.map-f small b { color: var(--ok-text); font-weight: 700; }
.map-f.is-key { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.map-f.is-key .sel select { background: var(--surface); }
.map-rest { display: flex; align-items: center; gap: 8px; margin: 10px 2px 0; font-size: 14px; color: var(--muted); }

/* Результат перевірки */
.check-top { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 0 12px; align-items: center; }
.check-top .okc { grid-row: 1 / span 2; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.check-top .okc svg { width: 26px; height: 26px; stroke-width: 2.6; }
.check-top b { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.check-top span { font-size: 15px; color: var(--muted); }
.sbar { display: flex; gap: 2px; height: 12px; margin: 16px 0 4px; border-radius: 6px; overflow: hidden; }
.sbar i { display: block; width: var(--v); min-width: 4px; background: var(--c); }
.ck { display: grid; margin-top: 8px; }
.ck-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.ck-row .mk { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.ck-row b { font-weight: 700; font-size: 15px; }
.ck-row .v { font-size: 18px; font-weight: 800; }
.ck-row ul { grid-column: 2 / -1; margin: 4px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.ck-row li { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.ck-row small { grid-column: 2 / -1; font-size: 14px; color: var(--muted); line-height: 1.35; }
.ck-row .lnk { grid-column: 2 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: -10px; font-weight: 700; font-size: 15px; color: var(--accent); text-decoration: none; }

.ptable { width: 100%; border-collapse: collapse; font-size: 15px; }
.ptable caption { text-align: left; margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.ptable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ptable tr { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.ptable td { display: block; padding: 0; }
.ptable .c-n { grid-row: 1 / span 2; font-size: 13px; font-weight: 700; color: var(--muted); }
.ptable .c-raw { grid-column: 2; font-size: 14px; color: var(--muted); }
.ptable .c-raw::before { content: "у файлі: "; }
.ptable .c-tel { grid-column: 2; grid-row: 1; font-weight: 700; }
.ptable .c-st { grid-column: 3; grid-row: 1 / span 2; }
.ptable tr.is-bad .c-tel { color: var(--muted); font-weight: 600; }

/* Сценарій */
.scn-body { margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.scn-body p { margin: 0; font-size: 15px; line-height: 1.55; }
.rec { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; margin-top: 14px; }
.rec .r-play { grid-area: auto; grid-column: 1; grid-row: 1; align-self: center; }
.rec .rw { display: block; min-width: 0; height: 28px; }
.rec .rw .wave { width: 100%; }
.rec .d { font-weight: 700; font-size: 15px; }
.rec .lnk { grid-column: 2 / -1; justify-self: start; display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 15px; color: var(--accent); text-decoration: none; }
.keys { display: grid; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.key { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 0 12px; align-items: center; font-size: 15px; line-height: 1.35; }
.key kbd { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: var(--surface); font: 800 16px var(--font); }
.key kbd.none { background: var(--neutral-soft); color: var(--muted); font-size: 13px; }
.key span b { font-weight: 700; }
.key small { display: block; font-size: 14px; color: var(--muted); }

/* Налаштування */
.set { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.set:first-of-type { border-top: 0; padding-top: 4px; }
.set-l b { display: block; font-weight: 700; font-size: 16px; }
.set-l small { display: block; margin-top: 2px; font-size: 14px; line-height: 1.35; color: var(--muted); }
.set-c { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--muted); }
.set-c .fld { width: 112px; text-align: center; }
.stepper { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--bg); }
.stepper button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; }
.stepper output { min-width: 36px; text-align: center; font-weight: 800; font-size: 18px; color: var(--ink); }
.days .chip { justify-content: center; font-size: 14px; }

/* ---------- Пропущений: три стани (журнал і «Чекають дзвінка») ----------
   1) чекає — червоний (як було); 2) передзвонює <ім'я>… — бурштиновий, кнопка в інших вимкнена;
   3) ✓ передзвонили / клієнт додзвонився сам — зелена смуга на всю ширину картки, з блоку «Чекають» зникає. */
.claim-hint { grid-column: 1 / -1; margin: 6px 2px 0; font-size: 13px; line-height: 1.35; color: var(--miss-ink); }
.wait-card.is-taken { background: var(--taken-soft); box-shadow: inset 0 0 0 2px var(--taken-line); }
.wait-card.is-taken .sub { color: var(--muted); }
.who { display: inline-flex; align-items: center; gap: 8px; grid-column: 1 / -1; margin-bottom: 2px; font-size: 15px; font-weight: 800; color: var(--taken); }
.who .live-dot { width: 10px; height: 10px; }
.btn-miss[aria-disabled="true"] { background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--taken-line); cursor: not-allowed; }
.wait-card.is-taken .claim-hint { color: var(--muted); }
.row.is-taken { background: var(--taken-soft); box-shadow: inset 0 0 0 2px var(--taken-line), var(--shadow); }
.r-play.is-taken { background: var(--surface); color: var(--taken); }
.r-meta .taken { display: inline-flex; align-items: center; gap: 6px; color: var(--taken); font-weight: 800; }
.r-meta .taken .live-dot { width: 8px; height: 8px; }
.flat.is-taken { background: repeating-linear-gradient(90deg, var(--taken) 0 6px, transparent 6px 11px); }
.flat.is-taken::before { background: var(--taken); }
.row.is-done { grid-template-areas: "play num dur" "play meta meta" "ok ok ok"; }
.row.is-done .r-wave { display: none; }
.r-ok { grid-area: ok; display: flex; align-items: center; gap: 8px; min-height: 40px; margin-top: 10px; padding: 6px 14px; border-radius: 12px; background: var(--done); color: var(--on-done); font-weight: 800; font-size: 15px; line-height: 1.25; }
.r-ok svg { width: 20px; height: 20px; stroke-width: 3; }
.r-ok span { font-weight: 600; }
.r-ok b { font-weight: 800; }
.r-play.is-done { background: var(--neutral-soft); color: var(--muted); }

/* Дрібниці */
.sec-h b, .wait-card .sub b { color: var(--miss-text); }
.sms-field textarea.fld { display: block; min-height: 76px; padding: 12px 14px; line-height: 1.45; font-weight: 500; resize: vertical; }
.file .act { grid-column: 2; grid-row: 3; justify-self: start; margin: 2px 0 -6px -2px; padding: 0 2px; }
.file b { white-space: normal; overflow-wrap: anywhere; }
.days { display: inline-flex; flex-wrap: nowrap; gap: 0; padding: 0; border-radius: 999px; background: var(--bg); }
.days .chip { min-width: 44px; padding: 0; background: transparent; box-shadow: none; color: var(--muted); }
.days .chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.side .logo { min-height: 44px; }
.p-next .r-play { width: 44px; height: 44px; }
.mt { margin-top: 12px; }
.lead-list { display: grid; gap: 8px; }
.biz-item .biz-dot svg { width: 20px; height: 20px; }
.biz-dot.is-out { background: var(--neutral-soft); color: var(--ink); }
.auto .soon { grid-column: 2; grid-row: 1 / span 2; }
.src-b, .when-now { display: none; }
.step:has(.src-file:checked) .src-a { display: none; }
.step:has(.src-file:checked) .src-b { display: block; }
.step:has(.when-now-r:checked) .when-b { display: none; }
.step:has(.when-now-r:checked) .when-now { display: flex; }
.ptable .c-n { grid-column: 1; grid-row: 1 / span 2; }
.ptable .c-tel { grid-column: 2; grid-row: 1; }
.ptable .c-raw { grid-column: 2; grid-row: 2; }
.ptable .c-st { grid-column: 3; grid-row: 1 / span 2; justify-self: end; }
.ptable .empty-cell { font-style: italic; }
.cstats .mk { grid-column: 1; grid-row: 1; }
.cstats .l { grid-column: 2; font-size: 13px; color: var(--muted); line-height: 1.3; }
.map-f .req { color: var(--ink); }
.chat.mini { max-width: none; margin-top: 2px; }
.chat.mini .chat-body { padding-top: 12px; }
.sms-field .fld { font-weight: 500; }
.dnc { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.dnc b { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.dnc span { font-size: 15px; color: var(--muted); }
.line-info { display: grid; gap: 0; margin: 0; }
.line-info div { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.line-info div:first-child { border-top: 0; padding-top: 0; }
.line-info dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.line-info dd { margin: 0; font-weight: 700; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

/* ---------- Від 1000 px ---------- */
@media (min-width: 1000px) {
  .app.two { grid-template-columns: 252px minmax(0, 1fr); }
  .tabbar { display: none; }
  body.tabs .main, body.tabs.has-player .main, body.form .main { padding-bottom: 64px; }
  .actbar { display: none; }
  .snav-sep { margin: 10px 12px; }

  .demo { justify-content: flex-start; width: fit-content; max-width: 100%; margin: -8px 0 18px; padding: 6px 14px; border-radius: 999px; }
  .crumb { margin-top: -12px; }
  .lead { margin: -10px 0 18px; font-size: 16px; }
  .subnav { flex-wrap: wrap; margin: 0 0 6px; padding: 0 0 8px; overflow: visible; }

  .split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0 28px; align-items: start; }
  .split > aside { position: sticky; top: 20px; }
  .split > aside > .card:first-child, .split > aside > h2:first-child { margin-top: 0; }
  .split > aside .sec-h:first-child { margin-top: 0; }

  .chan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .chan { align-content: start; padding: 18px; }
  .bc { grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "top nums" "meta nums" "acts nums"; gap: 6px 24px; padding: 18px 20px; align-items: center; }
  .bc-top { grid-area: top; } .bc-meta { grid-area: meta; } .bc-nums { grid-area: nums; } .bc-acts { grid-area: acts; }
  .bc-top { justify-content: flex-start; flex-wrap: wrap; }

  .chpage { grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "hero prev" "rest prev"; gap: 0 28px; align-items: start; }
  .chpage > .prev { position: sticky; top: 20px; }
  .chpage > .prev .prev-h:first-child { margin-top: 0; }
  .hero { grid-template-columns: 56px minmax(0, 1fr) auto; padding: 22px; }
  .hero .acts { grid-column: 3; grid-row: 1 / span 2; margin: 0; display: flex; }
  .hero .why { grid-column: 2 / -1; margin-top: 0; }
  .need-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .fun { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .ask-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

  .step { padding: 22px 24px; }
  .opts.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .opts.cols3 .opt { grid-template-columns: 22px minmax(0, 1fr); align-content: start; align-items: start; min-height: 104px; }
  .opts.cols3 .opt .dot { grid-row: 1; }
  .opts.cols3 .opt .cnt { grid-column: 2; grid-row: auto; margin-top: 6px; }
  .opts.cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .set { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; }
  .set-c { justify-content: flex-end; }

  .camp { gap: 12px; padding: 20px 24px; }
  .camp .cwave { height: 44px; }
  .big-wave { padding: 22px 24px; }
  .big-wave .cwave { height: 88px; }
  .cstats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .c-acts { display: flex; justify-content: flex-start; }
  .lead-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

  .drop { padding: 34px 24px 30px; }
  .file .act { grid-column: 3; grid-row: 1 / span 2; justify-self: end; margin: 0; padding: 0 12px; }
  .map { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .ptable thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: table-header-group; }
  .ptable tr { display: table-row; padding: 0; }
  .ptable td, .ptable th { display: table-cell; padding: 10px 12px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
  .ptable th { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-top: 0; }
  .ptable td:first-child, .ptable th:first-child { padding-left: 0; }
  .ptable td:last-child, .ptable th:last-child { padding-right: 0; text-align: right; }
  .ptable .c-raw::before { content: none; }
  .row.is-int { box-shadow: inset 4px 0 0 var(--accent), var(--shadow); }
  .row.is-done { grid-template-areas: "play time num wave dur" "play time meta wave dur" "ok ok ok ok ok"; }
  .row.is-done .r-wave { display: block; visibility: hidden; }
  .r-ok { margin-top: 10px; }
}
@media (max-width: 999px) {
  .split > aside { margin-top: 0; }
}
