/* =================================================================
   Страница бота (template/v2/pages/bot.twig). Макеты Bot, BotFree, BotNoCheck.

   Этап 1: плашки (SCAM, «MAU заморожен», «продаётся»), «О боте»,
   ключевые показатели, полоса Plus, «Данные обновлены».
   ================================================================= */


/* ---------- Цвета только этой страницы ---------- */

:root {
    --bt-ok-soft: #EEF8F1;   /* светло-зелёная подложка: «продаётся», «нравится» */
    --bt-mid:     #D97706;   /* «Данные обновлены»: от недели до 60 дней */
    --bt-pw-a:    #FFF4E8;   /* полоса Plus: градиент слева… */
    --bt-pw-b:    #E9EFFF;   /* …и справа */
    --bt-pw-line: #FFD9B3;
    --bt-gone-bg:   #E6EAF1;   /* плашка «Бот удалён» */
    --bt-gone-line: #B8C2D3;
    --bt-men:       #B45309;   /* календарь ленты: упоминания – оранжевым */
    --bt-men-soft:  #FFF1E0;
}

:root[data-theme="dark"] {
    --bt-ok-soft: #0F2A1A;
    --bt-mid:     #FBBF24;
    --bt-pw-a:    #2A1C10;
    --bt-pw-b:    #1A2A52;
    --bt-pw-line: #4A3420;
    --bt-gone-bg:   #1F2839;
    --bt-gone-line: #3A4865;
    --bt-men:       #FBBF24;
    --bt-men-soft:  #3A2A12;
}

@media (prefers-color-scheme: dark) {
    :root[data-theme="auto"] {
        --bt-ok-soft: #0F2A1A;
        --bt-mid:     #FBBF24;
        --bt-pw-a:    #2A1C10;
        --bt-pw-b:    #1A2A52;
        --bt-pw-line: #4A3420;
        --bt-gone-bg:   #1F2839;
        --bt-gone-line: #3A4865;
        --bt-men:       #FBBF24;
        --bt-men-soft:  #3A2A12;
    }
}


/* ---------- Страница ---------- */

.bot-page {
    display: flex;
    flex-direction: column;
    gap: 16px;

    padding-top: 20px;
    padding-bottom: 56px;
}


/* ---------- Общие мелочи ---------- */

.bt-link {
    color: var(--accent-ink);
    font-weight: 600;
    text-decoration: none;
}

.bt-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bot-page .is-up {
    color: var(--up);
}

.bot-page .is-down {
    color: var(--down);
}

/* Основная синяя кнопка */
.bt-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 13px 18px;
    border-radius: var(--radius-sm);

    background: var(--accent);
    color: #FFFFFF;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;

    transition: filter .15s ease, transform .1s ease;
}

.bt-btn:hover {
    filter: brightness(1.08);
}

.bt-btn:active {
    transform: translateY(1px);
}

/* Светлая кнопка с рамкой */
.bt-ghost {
    flex: 1 1 0;

    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);

    background: var(--card);
    color: var(--ink-2);
    font: inherit;
    font-weight: 600;

    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.bt-ghost:hover {
    border-color: var(--line-hover);
    background: var(--soft);
}

/* «В сравнении» */
.bt-ghost.is-on {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-ink);
}

.bt-btn:focus-visible,
.bt-ghost:focus-visible,
.bt-vote__btn:focus-visible,
.bt-cat__btn:focus-visible,
.bt-cat__item:focus-visible {
    outline: 3px solid #8FB0FF;
    outline-offset: 2px;
}


/* ---------- Плашки: SCAM, «MAU заморожен», «продаётся» ---------- */

.bt-alert {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;

    padding: 16px 18px;
    border-radius: 14px;
}

.bt-alert__icon {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;
    border-radius: 11px;
}

.bt-alert__text {
    flex: 999 1 420px;

    display: flex;
    flex-direction: column;
    gap: 4px;

    min-width: 0;
    font-size: 13px;
}

.bt-alert__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.bt-alert__title b,
b.bt-alert__title {
    font-family: var(--font-head);
    font-size: 17px;
}

.bt-alert__btn {
    flex: 0 0 auto;

    min-width: 160px;
    padding: 10px 14px;
    border: 0;
    border-radius: 10px;

    /* Бывает и <button> (гостю – окно входа): без рамки и шрифта браузера */
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    font-weight: 700;
    text-align: center;
    text-decoration: none;

    transition: filter .15s ease;
}

.bt-alert__btn:hover {
    filter: brightness(1.08);
}

/* SCAM — красная, белый текст */
.bt-alert--scam {
    background: var(--down);
    color: #FFFFFF;
}

.bt-alert--scam .bt-alert__icon {
    background: rgba(255, 255, 255, .18);
}

.bt-alert--scam .bt-alert__text > span {
    color: rgba(255, 255, 255, .92);
}

.bt-alert--scam .bt-alert__badge {
    padding: 2px 8px;
    border-radius: 6px;

    background: #FFFFFF;
    color: var(--down);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
}

.bt-alert--scam .bt-alert__btn {
    background: #FFFFFF;
    color: var(--down);
}

/* «MAU заморожен» — светло-красная с красной рамкой */
.bt-alert--frozen {
    align-items: flex-start;

    border: 1px solid var(--down);

    background: var(--down-soft);
    color: var(--ink);
}

.bt-alert--frozen .bt-alert__icon {
    background: var(--down);
    color: #FFFFFF;
}

.bt-alert--frozen .bt-alert__title b {
    color: var(--down);
}

.bt-alert--frozen .bt-alert__text > span {
    color: var(--ink-2);
}

.bt-alert--frozen .bt-alert__badge {
    padding: 2px 8px;
    border: 1px solid var(--down);
    border-radius: 999px;

    background: var(--card);
    color: var(--down);
    font-size: 12px;
    font-weight: 700;
}

/* «Бот удалён» — серая: данных больше не будет */
.bt-alert--gone {
    border: 1px solid var(--bt-gone-line);

    background: var(--bt-gone-bg);
    color: var(--ink);
}

.bt-alert--gone .bt-alert__icon {
    background: var(--muted);
    color: #FFFFFF;
}

.bt-alert--gone .bt-alert__text > span {
    color: var(--ink-2);
}

.bt-alert--gone .bt-alert__badge {
    padding: 2px 8px;
    border: 1px solid var(--line-hover);
    border-radius: 999px;

    background: var(--card);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}


/* «Продаётся» — зелёная */
.bt-alert--sale {
    padding: 14px 18px;
    border: 1px solid var(--up);

    background: var(--bt-ok-soft);
    color: var(--ink);
}

.bt-alert--sale .bt-alert__icon {
    background: var(--up);
    color: #FFFFFF;
}

.bt-alert--sale .bt-alert__text {
    flex: 1 1 320px;
    gap: 2px;
}

.bt-alert--sale b.bt-alert__title {
    font-size: 16px;
}

.bt-alert--sale .bt-alert__text > span {
    color: var(--ink-2);
}

.bt-alert--sale .bt-alert__btn {
    min-width: 0;

    background: var(--up);
    color: #FFFFFF;
    white-space: nowrap;
}


/* ---------- О боте ---------- */

.bt-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 28px;

    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);

    background: var(--card);
}

.bt-hero__main {
    flex: 999 1 520px;

    display: flex;
    gap: 18px;

    min-width: 0;
}

.bt-hero__avatar {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 88px;
    height: 88px;
    border-radius: 22px;
    overflow: hidden;

    color: #FFFFFF;
    font-size: 34px;
    font-weight: 800;
}

.bt-hero__avatar img {
    display: block;

    width: 100%;
    height: 100%;
    object-fit: cover;

    background: var(--soft);
}

.bt-hero__info {
    display: flex;
    flex-direction: column;
    gap: 8px;

    min-width: 0;
}

.bt-hero__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.bt-hero__name {
    margin: 0;

    font-family: var(--font-head);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    word-break: break-word;
}

/* Метки у названия: SCAM, «Продаётся» */
.bt-mark {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 3px 8px;
    border-radius: 6px;

    color: #FFFFFF;
    font-size: 12px;
    font-weight: 800;
}

.bt-mark--scam {
    background: var(--down);
    letter-spacing: .04em;
}

.bt-mark--sale {
    padding: 3px 9px;
    background: var(--up);
}

/* Зелёная галочка — пройдена проверка BotSafe */
.bt-check {
    display: inline-flex;
    flex: none;

    color: var(--up);
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

/* Последнее слово названия + галочка – не разрываются переносом; галочка – чуть отступив от слова */
.bt-hero__last {
    white-space: nowrap;
}

.bt-hero__name .bt-check {
    margin-left: 8px;

    vertical-align: -1px;
}

.bt-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;

    font-size: 13px;
}

/* Второе имя бота */
.bt-alt {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 2px 8px;
    border: 1px dashed var(--line-hover);
    border-radius: 999px;

    color: var(--muted);
    font-size: 12px;
}

/* Категория */
.bt-chip {
    padding: 3px 9px;
    border-radius: 999px;

    background: var(--chip);
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.bt-chip:hover {
    color: var(--accent-ink);
}

/* «Категория не указана» — выбрать и отправить на модерацию */
.bt-cat {
    position: relative;

    display: inline-flex;
}

.bt-cat__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 3px 8px 3px 10px;
    border: 1px dashed var(--warm);
    border-radius: 999px;

    background: transparent;
    color: var(--warm);
    font: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}

.bt-cat__btn.is-open {
    background: var(--warm-soft);
}

.bt-cat__list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 40;

    display: flex;
    flex-direction: column;
    gap: 6px;

    box-sizing: border-box;
    width: 320px;
    max-width: calc(100vw - 32px);
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;

    background: var(--card);
    box-shadow: 0 18px 44px rgba(11, 18, 32, .18);
}

.bt-cat__head {
    display: flex;
    flex-direction: column;
    gap: 2px;

    padding: 4px 6px 6px;
}

.bt-cat__head b {
    color: var(--ink);
    font-size: 14px;
}

.bt-cat__head span {
    color: var(--muted);
    font-size: 12px;
}

.bt-cat__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2px;
}

.bt-cat__item {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 8px;
    border: 0;
    border-radius: 9px;

    background: transparent;
    color: var(--ink-2);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    text-align: left;

    cursor: pointer;
}

.bt-cat__item:hover {
    background: var(--soft);
}

.bt-cat__dot {
    flex: 0 0 auto;

    width: 7px;
    height: 7px;
    border-radius: 2px;
}

.bt-cat__sent {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 3px 10px;
    border-radius: 999px;

    background: var(--bt-ok-soft);
    color: var(--up);
    font-size: 12px;
    font-weight: 600;
}

/* «Бот отвечает» / «не отвечает» */
.bt-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    font-weight: 600;
}

.bt-status__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;

    background: currentColor;
}

.bt-status.is-ok {
    color: var(--up);
}

.bt-status.is-bad {
    color: var(--down);
}

.bt-muted {
    color: var(--muted-2);
}

/* «Аудитория не проверялась» */
.bt-unchecked {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 2px 9px;
    border-radius: 999px;

    background: var(--warm-soft);
    color: var(--warm);
    font-weight: 600;
}

.bt-hero__desc {
    max-width: 640px;
    margin: 2px 0 0;

    color: var(--ink-2);
    white-space: pre-line;
    word-break: break-word;
}

/* Ссылки в описании — цветом текста, без подчёркивания; при наведении — подчёркивание */
/* Ссылка в описании и отзывах: цвет текста, но с тонким подчёркиванием – иначе её не отличить (доступность) */
.bt-desc-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
    text-underline-offset: 3px;
}

.bt-desc-link:hover {
    text-decoration-color: currentColor;
}

.bt-hero__links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;

    font-size: 13px;
}

.bt-hero__links .bt-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    font-weight: 500;
}

/* Справа: кнопки и голоса */
.bt-hero__side {
    flex: 1 1 260px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;

    max-width: 360px;
}

.bt-hero__pair {
    display: flex;
    gap: 8px;
}

/* «Открыть сравнение →» под кнопками, когда бот в сравнении */
.bt-compare-link {
    align-self: center;

    font-size: 13px;
    font-weight: 600;
}

.bt-vote {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 10px 12px;
    border-radius: var(--radius-sm);

    background: var(--soft);
}

.bt-vote__btn {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 10px;

    background: var(--card);

    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.bt-vote__btn--down {
    color: var(--down);
}

.bt-vote__btn--up {
    color: var(--up);
}

.bt-vote__btn:hover {
    border-color: var(--line-hover);
}

.bt-vote__btn--up.is-on {
    border-color: var(--up);
    background: var(--bt-ok-soft);
}

.bt-vote__btn--down.is-on {
    border-color: var(--down);
    background: var(--warm-soft);
}

.bt-vote__score {
    display: flex;
    flex-direction: column;
    align-items: center;

    line-height: 1.2;
}

.bt-vote__score b {
    color: var(--muted);
    font-size: 20px;
}

.bt-vote__total {
    color: var(--muted-2);
    font-size: 12px;
}

.bt-vote__error {
    color: var(--down);
    font-size: 12px;
    text-align: center;
}


/* ---------- Ключевые показатели ---------- */

.bt-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

/*
    Карточек бывает 5–8 (часть только у проверенных BotSafe) – без «сирот» во втором ряду:
    5 – в один ряд, 6 – по три, 7 – последняя растягивается на две.
*/
.bt-kpis:has(> :nth-child(5):last-child) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.bt-kpis:has(> :nth-child(6):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bt-kpis > :nth-child(7):last-child {
    grid-column: span 2;
}

.bt-kpi {
    display: flex;
    flex-direction: column;
    gap: 4px;

    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;

    background: var(--card);
}

.bt-kpi__label {
    align-self: flex-start;

    display: inline-flex;
    align-items: center;
    gap: 5px;

    color: var(--muted-2);
    font-size: 12px;
}

.bt-kpi__value {
    font-family: var(--font-head);
    font-size: 24px;
    letter-spacing: -0.02em;
    line-height: 1.2;
    white-space: nowrap;
}

.bt-kpi__sub {
    color: var(--muted-2);
    font-size: 12px;
}

.bt-kpi__sub.is-up,
.bt-kpi__sub.is-down,
.bt-kpi__sub.is-warm {
    font-weight: 600;
}

.bt-kpi__sub.is-warm {
    color: var(--warm);
}


/* ---------- Без Plus: «Часть аналитики скрыта» ---------- */

.bt-plus-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;

    padding: 14px 18px;
    border: 1px solid var(--bt-pw-line);
    border-radius: 16px;

    background: linear-gradient(100deg, var(--bt-pw-a) 0%, var(--bt-pw-b) 100%);
}

.bt-plus-strip__icon {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;
    border-radius: 11px;

    background: linear-gradient(135deg, #FF9F43, #FF6B2C);
    color: #FFFFFF;
}

.bt-plus-strip__text {
    flex: 1 1 320px;

    display: flex;
    flex-direction: column;

    min-width: 0;
}

.bt-plus-strip__text b {
    font-size: 15px;
}

.bt-plus-strip__text span {
    color: var(--muted);
    font-size: 13px;
}

.bt-plus-strip .bt-btn {
    padding: 11px 16px;
    border-radius: 11px;

    font-weight: 700;
}


/* ---------- Данные обновлены ---------- */

.bt-fresh {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;

    color: var(--muted);
    font-size: 12px;
}

.bt-fresh__title {
    color: var(--ink-2);
    font-weight: 600;
}

.bt-fresh__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;

    background: var(--card);
}

.bt-fresh__item b {
    color: var(--ink);
    font-weight: 600;
}

/* Точка свежести: до недели — зелёная, до 60 дней — жёлтая, дальше — красная */
.bt-fresh__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.bt-fresh__dot.is-ok {
    background: var(--up);
}

.bt-fresh__dot.is-mid {
    background: var(--bt-mid);
}

.bt-fresh__dot.is-bad {
    background: var(--down);
}


/* =================================================================
   Этап 2: две колонки и «Динамика аудитории»
   ================================================================= */

/* Две колонки: слева графики и реклама, справа — аудитория и прочее (следующие этапы) */
.bt-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
}

.bt-main {
    flex: 999 1 620px;

    display: flex;
    flex-direction: column;
    gap: 16px;

    min-width: 0;
}

/* Карточка блока */
.bt-card {
    display: flex;
    flex-direction: column;
    gap: 14px;

    min-width: 0;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);

    background: var(--card);
}

.bt-empty {
    margin: 0;
    padding: 40px 0;

    color: var(--muted);
    text-align: center;
}


/* ---------- Вкладки «Динамика / Были в сети» ---------- */

.bt-tabs {
    display: flex;
    gap: 22px;

    border-bottom: 1px solid var(--line);
}

.bt-tabs__tab {
    display: flex;
    align-items: center;
    gap: 7px;

    margin-bottom: -1px;
    padding: 0 0 12px;
    border: 0;
    border-bottom: 2px solid transparent;

    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    /* Название вкладки – одной строкой, не переносим по словам */
    white-space: nowrap;

    cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}

/*
    Телефон: вкладки чуть компактнее, чтобы «Вышедшая реклама 218 · Упоминания 25» влезали в строку;
    если всё равно не влезают – листаются пальцем внутри своей полосы, страница вбок не уезжает
*/
@media (max-width: 520px) {
    .bt-tabs {
        gap: 10px;

        overflow-x: auto;
        scrollbar-width: none;
    }

    .bt-tabs::-webkit-scrollbar {
        display: none;
    }

    .bt-tabs__tab {
        flex: none;
        gap: 5px;

        font-size: 13.5px;
    }

    .bt-tabs__count {
        padding: 1px 6px;
    }
}

.bt-tabs__tab:hover {
    color: var(--accent-ink);
}

.bt-tabs__tab.is-on {
    border-bottom-color: var(--accent);
    color: var(--accent-ink);
}

/* Год давних замеров у вкладки */
.bt-tabs__note {
    padding: 1px 7px;
    border-radius: 999px;

    background: var(--soft);
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 600;
}

.bt-dyn__pane,
.bt-dyn__chart-wrap,
.bt-dyn__body {
    display: flex;
    flex-direction: column;
    gap: 14px;

    min-width: 0;
}


/* ---------- Показатель и период ---------- */

.bt-dyn__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bt-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bt-pill {
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;

    background: var(--card);
    color: var(--ink-2);
    font: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.bt-pill:hover {
    border-color: var(--line-hover);
}

.bt-pill.is-on {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-ink);
}

/* Переключатель периода */
.bt-seg {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;

    padding: 3px;
    border-radius: 10px;

    background: var(--soft);
}

.bt-seg__btn {
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;

    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}

/* Период под замком (без Plus у MAU 90 дней, у живых 365) */
.bt-seg__btn.is-plus {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    color: var(--muted-2);
}

.bt-seg__btn.is-plus svg {
    color: #FF7A2C;
}

.bt-seg__btn.is-on {
    background: var(--card);
    color: var(--ink);
    box-shadow: 0 1px 3px rgba(10, 20, 40, .12);
}

.bt-tabs__tab:focus-visible,
.bt-pill:focus-visible,
.bt-seg__btn:focus-visible {
    outline: 3px solid #8FB0FF;
    outline-offset: 2px;
}


/* ---------- График ---------- */

.bt-chart {
    display: flex;
    gap: 8px;
}

.bt-chart__y {
    position: relative;

    flex: 0 0 auto;

    width: 62px;
    height: 260px;
}

.bt-chart__y span {
    position: absolute;
    right: 0;

    color: var(--muted-2);
    font-size: 11px;
    white-space: nowrap;

    transform: translateY(-50%);
}

.bt-chart__plot {
    position: relative;

    flex: 1 1 auto;

    min-width: 0;
    height: 260px;
}

.bt-chart__plot svg {
    position: absolute;
    inset: 0;

    display: block;
    overflow: visible;
}

.bt-chart__grid {
    position: absolute;
    left: 0;
    right: 0;

    border-top: 1px dashed var(--line);
}

.bt-chart__area {
    fill: var(--accent);
    fill-opacity: .12;
    stroke: none;
}

.bt-chart__line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.2;
    stroke-linejoin: round;
}

/* День с упоминаниями */
.bt-chart__mark {
    position: absolute;

    box-sizing: border-box;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border: 2px solid var(--card);
    border-radius: 50%;

    background: var(--premium);
    pointer-events: none;
}

.bt-chart__cursor {
    position: absolute;
    top: 0;
    bottom: 0;

    border-left: 1px solid var(--line-hover);
    pointer-events: none;
}

.bt-chart__dot {
    position: absolute;

    box-sizing: border-box;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border: 2px solid var(--card);
    border-radius: 50%;

    background: var(--accent);
    pointer-events: none;
}

.bt-chart__tip {
    position: absolute;
    top: 8px;
    z-index: 5;

    min-width: 170px;
    max-width: 240px;
    padding: 10px 12px;
    border-radius: 10px;

    background: var(--tip-bg);
    color: var(--tip-fg);
    font-size: 12px;
    line-height: 1.45;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .25);
    pointer-events: none;
}

.bt-chart__tip-date {
    opacity: .75;
}

.bt-chart__tip-value {
    font-size: 15px;
    font-weight: 700;
}

/* На тёмной подсказке — светлые зелёный и красный */
.bt-chart__tip .is-up {
    color: #4ADE80;
}

.bt-chart__tip .is-down {
    color: #F87171;
}

.bt-chart__tip-mentions {
    display: flex;
    flex-direction: column;
    gap: 6px;

    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, .15);
}

/* Значок в подсказке – на своём месте: правило .bt-chart__plot svg (абсолютно на весь график) его не трогает */
.bt-chart__tip svg {
    position: static;
    inset: auto;

    flex: 0 0 auto;
}

.bt-chart__tip-mhead {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Бот в подсказке: аватарка, название, @username (стили имён – как в ленте) */
.bt-chart__tip-bot {
    display: flex;
    align-items: center;
    gap: 8px;

    min-width: 0;
    max-width: 240px;
}

.bt-chart__tip-bot .bt-feed__ava {
    width: 22px;
    height: 22px;

    background: rgba(255, 255, 255, .12);
    color: #FFFFFF;
    font-size: 10px;
}

.bt-chart__tip-bot .bt-feed__names b {
    color: #FFFFFF;
    font-size: 13px;
}

.bt-chart__tip-bot .bt-feed__names small {
    color: rgba(255, 255, 255, .6);
    font-size: 11px;
}

.bt-chart__tip-more {
    padding-left: 30px;

    color: rgba(255, 255, 255, .6);
    font-size: 12px;
}

.bt-chart__x {
    display: flex;
    justify-content: space-between;

    padding-left: 70px;

    color: var(--muted-2);
    font-size: 11px;
}

.bt-chart__sum {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;

    padding-top: 4px;

    color: var(--muted);
    font-size: 13px;
}

.bt-chart__sum b {
    color: var(--ink);
}

.bt-chart__legend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bt-chart__legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;

    background: var(--premium);
}


/* ---------- Были в сети ---------- */

.bt-online__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 14px;
}

.bt-online__head b {
    font-size: 15px;
}

.bt-online__head span {
    color: var(--muted-2);
    font-size: 12px;
}

.bt-online__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;

    color: var(--muted);
    font-size: 12px;
}

.bt-online__legend > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bt-online__sw {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

/* Цвета визитов: недавно — зелёный, неделя — синий, месяц — жёлтый, давно — серый */
.is-recently { background: var(--up); }
.is-week     { background: var(--accent); }
.is-month    { background: var(--bt-mid); }
.is-ago      { background: var(--line-hover); }

.bt-online__bars {
    display: flex;
    align-items: flex-end;
    gap: 10px;

    height: 250px;
    padding-top: 6px;
}

.bt-online__col {
    flex: 1 1 0;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;

    min-width: 0;
    height: 100%;
}

.bt-online__bar {
    flex: 1 1 auto;

    display: flex;
    flex-direction: column;

    border-radius: 6px;
    overflow: hidden;
    outline-offset: 2px;

    transition: opacity .15s ease;
}

/* Навели на столбик — остальные бледнее */
.bt-online__bars:hover .bt-online__bar:not(:hover) {
    opacity: .45;
}

.bt-online__bar span {
    display: block;
}

.bt-online__label {
    color: var(--muted-2);
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
}

.bt-online__last {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    padding: 12px 14px;
    border-radius: 12px;

    background: var(--soft);
    color: var(--ink-2);
    font-size: 13px;
}


/* ---------- Дата-центры аккаунтов (вкладка «Были в сети», под графиком) ---------- */

.bt-dc {
    display: flex;
    flex-direction: column;
    gap: 12px;

    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.bt-dc__rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Название · полоска · процент и число */
.bt-dc__row {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;

    font-size: 13px;
}

.bt-dc__name {
    color: var(--ink);
}

.bt-dc__name small {
    color: var(--muted-2);
    font-size: 11px;
}

.bt-dc__bar {
    height: 8px;
    border-radius: 4px;
    background: var(--soft);
    overflow: hidden;
}

.bt-dc__bar > span {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: var(--accent);
}

.bt-dc__val {
    min-width: 120px;
    color: var(--muted);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.bt-dc__val b {
    color: var(--ink);
}

.bt-dc__note {
    color: var(--muted-2);
    font-size: 12px;
}

/* Телефон: полоска на свою строку под названием */
@media (max-width: 560px) {
    .bt-dc__row {
        grid-template-columns: 1fr auto;
        row-gap: 6px;
    }

    .bt-dc__bar {
        grid-column: 1 / -1;
        order: 3;
    }

    .bt-dc__val {
        min-width: 0;
    }
}


/* ---------- Замок «доступно в Plus» ---------- */

.bt-card.is-locked {
    position: relative;
    overflow: hidden;

    /*
        Замок и размытое содержимое – в одной ячейке сетки: блок по высоте
        как большее из двух (короткий блок вырастает до замка, у длинного замок по центру)
    */
    display: grid;
}

.bt-card.is-locked > * {
    grid-area: 1 / 1;

    min-width: 0;
}

/* Под замком — размыто и не нажимается */
.bt-card.is-locked > .bt-lockable {
    filter: blur(7px) saturate(.7);
    opacity: .55;
    user-select: none;
    pointer-events: none;
}

.bt-lock {
    position: relative;
    z-index: 3;

    display: flex;
    align-items: center;
    justify-content: center;

    /* Перекрывает и поля карточки (20px 22px), чтобы подложка шла до краёв */
    margin: -20px -22px;
    padding: 28px 22px;

    background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, .75));
}

:root[data-theme="dark"] .bt-lock {
    background: linear-gradient(180deg, rgba(18, 26, 42, .35), rgba(18, 26, 42, .7));
}

@media (prefers-color-scheme: dark) {
    :root[data-theme="auto"] .bt-lock {
        background: linear-gradient(180deg, rgba(18, 26, 42, .35), rgba(18, 26, 42, .7));
    }
}

.bt-lock__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    max-width: 380px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);

    background: var(--card);
    text-align: center;
    box-shadow: 0 18px 44px rgba(11, 18, 32, .16);
}

.bt-lock__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;
    border-radius: 13px;

    background: linear-gradient(135deg, #FF9F43, #FF6B2C);
    color: #FFFFFF;
    box-shadow: 0 8px 20px rgba(255, 107, 44, .35);
}

.bt-lock__title {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 800;
}

.bt-lock__text {
    color: var(--muted);
    font-size: 13px;
}

.bt-lock__btn {
    margin-top: 4px;
    padding: 11px 18px;

    font-size: 14px;
    font-weight: 700;
}

.bt-lock__plus {
    padding: 2px 6px;
    border-radius: 5px;

    background: rgba(255, 255, 255, .2);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
}


/* =================================================================
   Этап 3: «Движение аудитории»
   ================================================================= */

.bt-flow__body,
.bt-flow__data {
    display: flex;
    flex-direction: column;
    gap: 14px;

    min-width: 0;
}

.bt-flow__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.bt-flow__title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bt-flow__title b {
    font-family: var(--font-head);
    font-size: 17px;
}

.bt-flow__title span {
    color: var(--muted);
    font-size: 13px;
}

.bt-flow__wait {
    margin: 0;
    padding: 24px 0;

    color: var(--muted);
    text-align: center;
}

.bt-flow__wait.is-error {
    color: var(--down);
}

/* Было · Ушли · Пришли · Удержание */
.bt-flow__steps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
    gap: 10px;
}

.bt-flow__step {
    display: flex;
    flex-direction: column;
    gap: 2px;

    min-width: 0;
    padding: 12px 14px;
    border-radius: 12px;
}

.bt-flow__step-label {
    color: var(--muted);
    font-size: 12px;
}

.bt-flow__step-value {
    font-family: var(--font-head);
    font-size: 20px;
    line-height: 1.25;
    white-space: nowrap;
}

.bt-flow__step-sub {
    color: var(--muted-2);
    font-size: 12px;
}

.bt-flow__step.is-was  { background: var(--soft); }
.bt-flow__step.is-left { background: var(--down-soft); }
.bt-flow__step.is-came { background: var(--bt-ok-soft); }
.bt-flow__step.is-keep { background: var(--accent-soft); }

.bt-flow__step.is-left .bt-flow__step-value { color: var(--down); }
.bt-flow__step.is-came .bt-flow__step-value { color: var(--up); }
.bt-flow__step.is-keep .bt-flow__step-value { color: var(--accent-ink); }

/* Полоса: остались · новые · ушли */
.bt-flow__bar {
    display: flex;
    gap: 2px;

    height: 12px;
    border-radius: 999px;
    overflow: hidden;
}

.bt-flow__bar .is-left {
    flex: 1;
}

.bt-flow__bar .is-keep,
.bt-flow__sw.is-keep {
    background: var(--accent);
}

.bt-flow__bar .is-new,
.bt-flow__sw.is-new {
    background: var(--up);
}

.bt-flow__bar .is-left,
.bt-flow__sw.is-left {
    background: var(--down);
    opacity: .85;
}

.bt-flow__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;

    color: var(--muted);
    font-size: 12px;
}

.bt-flow__legend > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bt-flow__sw {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

/* Уникальность: кольцо с долей и подпись */
.bt-flow__unique {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.bt-flow__donut {
    --pct: 0;

    flex: 0 0 auto;

    width: 44px;
    height: 44px;
    border-radius: 50%;

    background: conic-gradient(var(--accent) 0 calc(var(--pct) * 1%), var(--soft) calc(var(--pct) * 1%) 100%);
}

/* Пока считаем — кольцо крутится */
.bt-flow__donut.is-wait {
    background: conic-gradient(var(--accent) 0 25%, var(--soft) 25% 100%);
    animation: bt-spin 1.2s linear infinite;
}

@keyframes bt-spin {
    to { transform: rotate(360deg); }
}

.bt-flow__unique-text {
    display: flex;
    flex-direction: column;
}

.bt-flow__unique-text b {
    font-size: 15px;
}

.bt-flow__unique-text span {
    color: var(--muted);
    font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
    .bt-flow__donut.is-wait {
        animation: none;
    }
}


/* =================================================================
   Этап 4: «По дням»
   ================================================================= */

.bt-days__body {
    display: flex;
    flex-direction: column;
    gap: 12px;

    min-width: 0;
}

.bt-days__top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.bt-days__type {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: var(--muted);
    font-size: 13px;
}

.bt-days__type select {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;

    background: var(--card);
    color: var(--ink);
    font: inherit;
    font-size: 13px;
}

/* Строка: дата · значение · изменение */
.bt-days__row {
    position: relative;

    display: grid;
    grid-template-columns: minmax(96px, 1fr) minmax(110px, 1.2fr) minmax(150px, 1.6fr);
    align-items: center;

    padding: 9px 10px;
    border-bottom: 1px solid var(--line);

    font-variant-numeric: tabular-nums;
    transition: background .15s ease;
}

.bt-days__row:not(.bt-days__head):hover {
    background: var(--soft);
}

.bt-days__head {
    padding-top: 0;

    color: var(--muted-2);
    font-size: 12px;
}

.bt-days__date {
    color: var(--muted);
}

.bt-days__delta {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Кнопка «упоминания в этот день» */
.bt-days__m {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 3px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;

    background: var(--card);
    color: var(--premium);
    font: inherit;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.bt-days__m:hover,
.bt-days__m.is-on {
    background: var(--soft);
}

/* Список ботов с упоминаниями */
.bt-days__pop {
    position: absolute;
    top: calc(100% - 4px);
    right: 0;
    z-index: 10;

    display: flex;
    flex-direction: column;
    gap: 2px;

    width: 300px;
    max-width: calc(100vw - 48px);
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;

    background: var(--card);
    box-shadow: 0 18px 44px rgba(11, 18, 32, .18);
}

.bt-days__pop-head {
    display: flex;
    flex-direction: column;
    gap: 2px;

    padding: 2px 4px 8px;
}

.bt-days__pop-head span {
    color: var(--muted);
    font-size: 12px;
}

/* Ряд: имя (обрезается многоточием) | ×N | глаз – столбцы ровные во всех рядах */
.bt-days__pop-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 26px;
    align-items: center;
    gap: 8px;

    padding: 6px 4px;
    border-radius: 8px;
}

.bt-days__pop-row > a {
    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.bt-days__pop-row:hover {
    background: var(--soft);
}

.bt-days__cnt {
    justify-self: end;

    padding: 1px 7px;
    border-radius: 999px;

    background: var(--soft);
    color: var(--muted-2);
    font-size: 12px;
    font-weight: 700;
}

.bt-days__cnt.is-multi {
    background: var(--accent-soft);
    color: var(--accent-ink);
}

.bt-days__more {
    align-self: center;

    flex: 0 0 auto;

    margin-top: 12px;
    padding: 9px 16px;
}


/* =================================================================
   Этап 4: «Эффект упоминаний», «Реклама внутри бота», лента
   ================================================================= */

.bt-effect__body,
.bt-inads__body,
.bt-feed__body,
.bt-inads__part {
    display: flex;
    flex-direction: column;
    gap: 12px;

    min-width: 0;
}

/* Заголовок блока с пояснением */
.bt-block-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bt-block-head b {
    font-family: var(--font-head);
    font-size: 17px;
}

.bt-block-head span {
    color: var(--muted);
    font-size: 13px;
}

.bt-block-note {
    color: var(--muted-2);
    font-size: 12px;
}

/* ---------- Эффект упоминаний ---------- */

.bt-effect__wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bt-effect__rows {
    display: flex;
    flex-direction: column;
}

.bt-effect__row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1.4fr) minmax(0, 1fr) 64px;
    align-items: center;
    gap: 12px;

    padding: 9px 4px;
    border-bottom: 1px solid var(--line);
}

.bt-effect__date {
    color: var(--muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

/* Без overflow: hidden у самой колонки — иначе срезается всплывающая подсказка (.tip) */
.bt-effect__who {
    display: flex;
    align-items: baseline;
    gap: 6px;

    min-width: 0;

    white-space: nowrap;
}

/* Длинное имя бота — многоточие */
.bt-effect__bot {
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bt-effect__who span {
    flex: 0 0 auto;
}

.bt-effect__who > span {
    color: var(--muted-2);
    font-size: 12px;
}

/* Полоска от середины */
.bt-effect__bar {
    position: relative;

    height: 8px;
    border-radius: 999px;

    background: var(--soft);
}

.bt-effect__axis {
    position: absolute;
    top: -3px;
    bottom: -3px;
    left: 50%;

    border-left: 1px solid var(--line-hover);
}

.bt-effect__fill {
    position: absolute;
    top: 0;
    bottom: 0;

    border-radius: 999px;
}

.bt-effect__fill.is-up   { background: var(--up); }
.bt-effect__fill.is-down { background: var(--down); }
.bt-effect__fill.is-flat { background: var(--line-hover); }

.bt-effect__pct {
    text-align: right;
    font-variant-numeric: tabular-nums;
}


/* ---------- Реклама внутри бота ---------- */

.bt-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
    gap: 10px;
}

.bt-tile {
    display: flex;
    flex-direction: column;
    gap: 2px;

    padding: 12px 14px;
    border-radius: 12px;

    background: var(--soft);
}

.bt-tile span {
    color: var(--muted);
    font-size: 12px;
}

.bt-tile b {
    font-family: var(--font-head);
    font-size: 20px;
    line-height: 1.25;
}

.bt-inads__cap {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

/* Столбики по неделям */
.bt-weeks {
    display: flex;
    align-items: flex-end;
    gap: 3px;

    height: 64px;
}

.bt-weeks span {
    flex: 1 1 0;

    min-width: 0;
    border-radius: 3px 3px 0 0;

    background: var(--soft);
}

.bt-weeks span.is-on {
    background: var(--accent);
}

/* Тепловая полоса по часам */
.bt-hours {
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    gap: 3px;
}

.bt-hours span {
    height: 26px;
    border-radius: 4px;

    background: rgba(var(--heat-rgb), var(--a));
    box-shadow: inset 0 0 0 1px var(--line);
}

.bt-hours__axis {
    display: flex;
    justify-content: space-between;

    color: var(--muted-2);
    font-size: 11px;
}

.bt-inads__cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 16px 24px;
}

/* Форматы и цели: подпись · полоса · число */
.bt-mix {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 32px;
    align-items: center;
    gap: 10px;

    font-size: 13px;
}

.bt-mix > span:first-child {
    color: var(--ink-2);
}

.bt-mix b {
    text-align: right;
}

.bt-mix__bar {
    height: 8px;
    border-radius: 999px;
    overflow: hidden;

    background: var(--soft);
}

.bt-mix__bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
}

.bt-mix__bar .is-f0 { background: var(--accent); }
.bt-mix__bar .is-f1 { background: #6A3FD6; }
.bt-mix__bar .is-f2 { background: var(--line-hover); }
.bt-mix__bar .is-k0 { background: var(--bt-mid); }
.bt-mix__bar .is-k1 { background: var(--up); }
.bt-mix__bar .is-k2 { background: var(--muted-2); }
.bt-mix__bar .is-k3 { background: #0E7C86; }

/* Кто покупает рекламу: строки плотнее, чем остальные части блока */
.bt-inads__part--list {
    gap: 2px;
}

.bt-inads__part--list .bt-inads__cap {
    margin-bottom: 6px;
}

.bt-buyer {
    display: flex;
    align-items: center;
    gap: 10px;

    margin: 0 -6px;
    padding: 5px 6px;
    border-radius: 10px;

    color: var(--ink);
    text-decoration: none;
}

.bt-buyer:hover {
    background: var(--soft);
}

.bt-buyer__ava {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;
    border-radius: 9px;

    color: #FFFFFF;
    font-weight: 700;
}

.bt-buyer__info {
    flex: 1 1 auto;

    display: flex;
    flex-direction: column;

    min-width: 0;
}

.bt-buyer__info b {
    overflow: hidden;

    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bt-buyer__info span,
.bt-buyer__n {
    color: var(--muted-2);
    font-size: 12px;
}

.bt-buyer__n {
    white-space: nowrap;
}


/* ---------- Лента «Реклама и упоминания» ---------- */

.bt-tabs__count {
    padding: 1px 8px;
    border-radius: 999px;

    background: var(--chip);
    color: var(--muted);
    font-size: 12px;
}

.bt-tabs__count.is-on {
    background: var(--accent);
    color: #FFFFFF;
}

.bt-feed__search {
    display: flex;
    align-items: center;
    gap: 10px;

    /* На всю ширину блока; серая подложка — как в макете страницы бота */
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;

    background: var(--soft);
    color: var(--muted-2);

    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.bt-feed__search input {
    flex: 1 1 auto;

    min-width: 0;
    height: 40px;
    border: 0;
    outline: none;

    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
}

/* В фокусе — белое поле с синей рамкой */
.bt-feed__search:focus-within {
    border-color: var(--accent);
    background: var(--card);
    box-shadow: 0 0 0 3px var(--accent-soft);
}


/* Пока грузится новая страница или поиск — старые строки на месте, но бледнее */
.bt-feed__rows {
    transition: opacity .15s ease;
}

.bt-feed__rows.is-busy {
    opacity: .45;
    pointer-events: none;
}

/* Строка: когда · кто · пост */
.bt-feed__row {
    position: relative;

    display: grid;
    grid-template-columns: 112px minmax(140px, 1fr) minmax(0, 2.4fr);
    align-items: center;
    gap: 0 14px;

    padding: 10px 4px;
    border-bottom: 1px solid var(--line);

    font-size: 13px;
}

.bt-feed__row:not(.bt-feed__head):hover {
    background: var(--soft);
}

.bt-feed__head {
    padding-top: 0;

    color: var(--muted-2);
    font-size: 12px;
}

.bt-feed__when {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.bt-feed__who {
    display: flex;
    align-items: center;
    gap: 6px;

    min-width: 0;
}

.bt-feed__who .bt-link {
    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.bt-feed__multi {
    flex: 0 0 auto;

    padding: 1px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;

    background: var(--card);
    color: var(--muted);
    font: inherit;
    font-size: 11px;
    font-weight: 700;

    cursor: pointer;
}

.bt-feed__post {
    display: flex;
    align-items: center;
    gap: 8px;

    min-width: 0;
}

.bt-feed__type {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;
    border-radius: 7px;

    background: var(--soft);
    color: var(--muted);
}

.bt-feed__text {
    overflow: hidden;

    color: var(--ink-2);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bt-feed__pop {
    left: 126px;
    right: auto;

    gap: 6px;
}

.bt-feed__pop-title {
    color: var(--muted);
    font-size: 12px;
}

.bt-feed__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    color: var(--muted);
    font-size: 13px;
}

/* Навигация по страницам списка: она внутри обёртки списка (x-show="view === 'list'"),
   а не прямо в карточке – отступ карточки (gap 14px у .bt-card) до неё не доходит */
.bt-feed .pager {
    margin-top: 14px;
}

.bt-pager {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bt-pager__btn {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 9px;

    background: var(--card);
    color: var(--ink-2);
    font: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.bt-pager__btn:hover:not(:disabled) {
    border-color: var(--line-hover);
}

.bt-pager__btn:disabled {
    color: var(--line-hover);
    cursor: default;
}

.bt-pager__btn.is-on {
    border-color: var(--accent);
    background: var(--accent);
    color: #FFFFFF;
}

.bt-pager__gap {
    padding: 0 4px;
    color: var(--muted-2);
}


/* =================================================================
   Этап 4: «Пересечения» (вкладка в «По дням»)
   ================================================================= */

.bt-cross,
.bt-cross__data {
    display: flex;
    flex-direction: column;
    gap: 12px;

    min-width: 0;
}

.bt-cross__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.bt-cross__head .bt-block-head {
    flex: 1 1 320px;
}

.bt-cross__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;

    color: var(--muted);
    font-size: 12px;
}

.bt-cross__legend > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bt-cross__sw {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.bt-cross__sw.is-bot,
.bt-cross__bar .is-bot {
    background: var(--accent);
}

.bt-cross__sw.is-own,
.bt-cross__bar .is-own {
    background: var(--bt-mid);
}

/* Строка: бот · две полосы · общих из живых */
.bt-cross__row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) 120px;
    align-items: center;
    gap: 14px;

    padding: 9px 4px;
    border-bottom: 1px solid var(--line);
}

/* Результаты из поля «Сравнить с другим ботом» – над полем, в рамке с подсветкой */
.bt-cross__mine {
    display: flex;
    flex-direction: column;
    gap: 6px;

    margin-top: 14px;
}

.bt-cross__row.is-mine {
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
    border-radius: 12px;

    background: var(--accent-soft);

    animation: bt-fresh 1.2s ease;
}

@keyframes bt-fresh {
    0%   { background: color-mix(in srgb, var(--accent) 26%, transparent); }
    100% { background: var(--accent-soft); }
}

.bt-cross__who {
    display: flex;
    flex-direction: column;
    gap: 3px;

    min-width: 0;
}

.bt-cross__who .bt-desc-link {
    overflow: hidden;

    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bt-cross__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;

    color: var(--muted-2);
    font-size: 12px;
}

.bt-cross__rel {
    padding: 1px 7px;
    border-radius: 999px;

    font-size: 11px;
    font-weight: 600;
}

.bt-cross__rel.is-owner   { background: var(--bt-ok-soft); color: var(--up); }
.bt-cross__rel.is-mention { background: var(--accent-soft); color: var(--accent-ink); }
.bt-cross__rel.is-manual  { background: var(--soft); color: var(--muted); }

.bt-cross__bars {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bt-cross__bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    align-items: center;
    gap: 8px;

    font-size: 12px;
}

.bt-cross__bar > span:first-child {
    height: 6px;
    border-radius: 999px;
}

.bt-cross__bar b,
.bt-cross__bar > span:last-child {
    text-align: right;
}

.bt-cross__bar > span:last-child {
    color: var(--muted);
}

.bt-cross__count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;

    font-variant-numeric: tabular-nums;
}

.bt-cross__count span {
    color: var(--muted-2);
    font-size: 12px;
}

/* «Сравнить с другим ботом» */
.bt-cross__form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;

    padding-top: 4px;
}

.bt-cross__form label {
    flex: 0 0 100%;

    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
}

.bt-cross__form input {
    flex: 1 1 200px;

    max-width: 280px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;

    background: var(--soft);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
}

.bt-cross__form input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--card);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Кнопка-<button>: без рамки браузера, по высоте поля */
.bt-cross__form .bt-btn {
    height: 40px;
    padding: 0 18px;
    border: 0;

    font: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}

/* Пока имя не введено – спокойная серая, а не бледно-синяя */
.bt-cross__form .bt-btn:disabled {
    border: 1px solid var(--line);

    background: var(--soft);
    color: var(--muted-2);

    cursor: default;
    filter: none;
    transform: none;
}

.bt-cross__note {
    flex: 0 0 100%;

    color: var(--muted-2);
    font-size: 12px;
}

.bt-cross__note.is-error {
    color: var(--down);
}


/* =================================================================
   Этап 5: правая колонка, отзывы, «ещё не проверяли»
   ================================================================= */

/* Правая колонка: под левой на узком экране */
.bt-side {
    flex: 1 1 320px;

    display: flex;
    flex-direction: column;
    gap: 16px;

    min-width: 0;
}

/* Без Plus блоки под замком – в конец колонки, чтобы открытые данные шли подряд */
.bt-side > .bt-card.is-locked {
    order: 1;
}

.bt-side .bt-card {
    gap: 12px;
    padding: 20px;
}

.bt-side__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 10px;
}

.bt-side__head b {
    font-family: var(--font-head);
    font-size: 17px;
}

.bt-side__head span {
    color: var(--muted-2);
    font-size: 12px;
}

.bt-side__btn {
    flex: 0 0 auto;

    text-align: center;
    text-decoration: none;
}

/* ---------- Аудитория ---------- */

.bt-aud__list {
    display: flex;
    flex-direction: column;

    margin: 0;
}

.bt-aud__list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;

    padding: 7px 0;
    border-bottom: 1px solid var(--line);
}

.bt-aud__list > div:last-child {
    border-bottom: 0;
}

.bt-aud__list dt {
    color: var(--muted);
    font-size: 13px;
}

.bt-aud__list dd {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    margin: 0;

    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.bt-aud__list dd.is-down {
    color: var(--down);
}

.bt-aud__list dd.is-muted {
    color: var(--muted-2);
    font-weight: 500;
    font-size: 13px;
}

.bt-aud__split-head {
    display: flex;
    justify-content: space-between;

    margin-bottom: 6px;

    color: var(--muted);
    font-size: 12px;
}

.bt-aud__split-bar {
    display: flex;
    gap: 2px;

    height: 8px;
    border-radius: 999px;
    overflow: hidden;
}

.bt-aud__split-bar .is-live { background: var(--up); }
.bt-aud__split-bar .is-dead { flex: 1; background: var(--down); }

/* ---------- Языки ---------- */

.bt-langs__row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bt-langs__line {
    display: flex;
    justify-content: space-between;
    gap: 10px;

    font-size: 13px;
}

.bt-langs__line > span {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;

    color: var(--ink-2);
}

.bt-langs__code {
    min-width: 22px;

    color: var(--muted-2);
    font-size: 11px;
}

.bt-langs__bar {
    display: block;

    height: 6px;
    border-radius: 999px;
    overflow: hidden;

    background: var(--soft);
}

.bt-langs__bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
}

.is-l0 { background: #2457E6; }
.is-l1 { background: #0E7C86; }
.is-l2 { background: #6A3FD6; }
.is-l3 { background: #C2410C; }
.is-l4 { background: #15803D; }
.is-l5 { background: #BE185D; }
.is-l6 { background: #A16207; }
.is-l7 { background: var(--line-hover); }

/* ---------- Пол ---------- */

.bt-gender__labels {
    display: flex;
    justify-content: space-between;

    font-size: 13px;
    font-weight: 700;
}

.bt-gender__labels .is-m { color: var(--sex-m); }
.bt-gender__labels .is-f { color: var(--sex-f); }

.bt-gender__bar {
    display: flex;
    gap: 2px;

    height: 10px;
    border-radius: 999px;
    overflow: hidden;
}

.bt-gender__bar .is-m { background: var(--sex-m); }
.bt-gender__bar .is-f { flex: 1; background: var(--sex-f); }

/* ---------- Портрет ---------- */

.bt-portrait__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bt-portrait__age {
    display: flex;
    gap: 2px;

    height: 12px;
    border-radius: 999px;
    overflow: hidden;
}

.is-a0 { background: #2457E6; }
.is-a1 { background: #0E7C86; }
.is-a2 { background: #6A3FD6; }
.is-a3 { background: #C2410C; }

.bt-portrait__legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;

    color: var(--muted);
    font-size: 12px;
}

.bt-portrait__legend > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bt-portrait__legend b {
    margin-left: auto;
    color: var(--ink);
}

.bt-portrait__sw {
    width: 9px;
    height: 9px;
    border-radius: 3px;
}

.bt-portrait__trait {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 46px;
    align-items: center;
    gap: 10px;

    font-size: 13px;
}

.bt-portrait__trait > span:first-child {
    color: var(--ink-2);
}

.bt-portrait__trait b {
    text-align: right;
}

/* ---------- Расширенная проверка ---------- */

.bt-safe {
    font-size: 13px;
}

.bt-safe > span {
    color: var(--muted);
}

.bt-safe__title {
    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--up);
    font-size: 15px;
}

/* ---------- Правая колонка, вторая половина ---------- */

.bt-side__head--col {
    flex-direction: column;
    gap: 2px;
}

.bt-side__title {
    font-family: var(--font-head);
    font-size: 17px;
}

.bt-bench__body,
.bt-rebrand__body,
.bt-inbot__body,
.bt-owner__body,
.bt-bench__part {
    display: flex;
    flex-direction: column;
    gap: 10px;

    min-width: 0;
}

.bt-bench__part {
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

/* Сравнение: строка — подпись, «лучше N%», полоса с чертой медианы */
.bt-bench__row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bt-bench__line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;

    font-size: 13px;
}

.bt-bench__line > span {
    color: var(--muted);
}

.bt-bench__line .is-good { color: var(--up); }
.bt-bench__line .is-mid  { color: var(--bt-mid); }
.bt-bench__line .is-bad  { color: var(--down); }

.bt-bench__bar {
    position: relative;

    height: 6px;
    border-radius: 999px;

    background: var(--soft);
}

.bt-bench__bar > span {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;

    border-radius: 999px;
}

.bt-bench__bar .is-good { background: var(--up); }
.bt-bench__bar .is-mid  { background: var(--bt-mid); }
.bt-bench__bar .is-bad  { background: var(--down); }

/* Черта медианы посередине */
.bt-bench__bar i {
    position: absolute;
    top: -3px;
    bottom: -3px;
    left: 50%;

    width: 2px;

    background: var(--line-hover);
}

.bt-bench__cap {
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
}

.bt-bench__now {
    font-family: var(--font-head);
    font-size: 18px;
}

.bt-bench__rank {
    display: block;

    width: 100%;
    height: 70px;
}

.bt-bench__rank path {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linejoin: round;
}

.bt-bench__axis {
    display: flex;
    justify-content: space-between;
    gap: 6px;

    color: var(--muted-2);
    font-size: 11px;
}

/* Сезонность: столбики от средней линии */
.bt-season {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;

    height: 70px;
}

.bt-season > span {
    position: relative;
    height: 100%;
}

.bt-season i {
    position: absolute;
    left: 15%;
    right: 15%;

    border-radius: 3px;
}

.bt-season i.is-up   { background: var(--up); }
.bt-season i.is-down { background: var(--down); }

.bt-season__days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;

    color: var(--muted-2);
    font-size: 11px;
    text-align: center;
}

/* Ребрендинги: три плитки */
.bt-rebrand__tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.bt-rebrand__tiles > div {
    display: flex;
    flex-direction: column;
    gap: 2px;

    padding: 10px;
    border-radius: 10px;

    background: var(--soft);
}

.bt-rebrand__tiles b {
    font-family: var(--font-head);
    font-size: 20px;
}

.bt-rebrand__tiles span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.3;
}

/* Реклама в боте: таблица неделя / месяц / всего */
.bt-inbot__grid {
    display: grid;
    grid-template-columns: auto repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 8px 10px;

    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.bt-inbot__grid b {
    text-align: right;
}

.bt-inbot__h {
    color: var(--muted-2);
    font-size: 12px;
    text-align: right;
}

.bt-inbot__l {
    color: var(--muted);
}

.bt-inbot__price {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;

    padding-top: 10px;
    border-top: 1px solid var(--line);

    font-size: 13px;
}

.bt-inbot__price > span:first-child {
    color: var(--muted);
}

.bt-inbot__price b {
    font-size: 16px;
}

.bt-inbot__none {
    color: var(--muted-2);
}

.bt-inbot__terms {
    display: flex;
    flex-direction: column;
    gap: 6px;

    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;

    background: var(--soft);
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.bt-inbot__terms-cap {
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: normal;
}

/* Кнопка «Связаться с владельцем» (директ BotStat) */
.bt-inbot__body > .bt-btn {
    padding: 11px 14px;

    text-align: center;
    text-decoration: none;
}

.bt-inbot__buy {
    display: flex;
    flex-direction: column;
    gap: 8px;

    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.bt-buy {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;

    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.bt-buy:hover {
    border-color: var(--line-hover);
    background: var(--soft);
}

.bt-buy > span:nth-child(2) {
    flex: 1;
}

.bt-buy__icon {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.bt-buy__icon.is-views { background: var(--accent-soft); color: var(--accent-ink); }
.bt-buy__icon.is-op    { background: var(--bt-ok-soft); color: var(--up); }

/* Боты владельца */
.bt-owner__list {
    display: flex;
    flex-direction: column;

    max-height: 380px;
    margin: 0 -6px;
    overflow-y: auto;

    scrollbar-width: thin;
    scrollbar-color: var(--line-hover) transparent;
}

.bt-owner__row {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 8px 6px;
    border-radius: 10px;

    color: var(--ink);
    text-decoration: none;
}

a.bt-owner__row:hover {
    background: var(--soft);
}

.bt-owner__ava {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;
    border-radius: 10px;
    overflow: hidden;

    color: #FFFFFF;
    font-weight: 700;
}

.bt-owner__ava img {
    display: block;

    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bt-owner__info {
    flex: 1 1 auto;

    display: flex;
    flex-direction: column;

    min-width: 0;
}

.bt-owner__info b {
    overflow: hidden;

    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bt-owner__info span,
.bt-owner__num span {
    overflow: hidden;

    color: var(--muted-2);
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bt-owner__num {
    flex: 0 0 auto;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.bt-owner-none {
    gap: 8px;
}


/* ---------- Похожие боты (внизу страницы, видят все) ---------- */

.bt-similar {
    margin-top: 20px;
}

.bt-similar__title {
    margin: 0;

    font-family: var(--font-head);
    font-size: 17px;
}

.bt-similar__all {
    color: var(--accent-ink);
    font-size: 13px;
    text-decoration: none;
}

.bt-similar__all:hover {
    text-decoration: underline;
}

/* Две колонки на широком экране, одна – на телефоне */
.bt-similar__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 16px;

    margin: 0 -6px;
}

@media (max-width: 640px) {
    .bt-similar__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* ---------- Отзывы ---------- */

.bt-rev__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bt-rev__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bt-rev__head .bt-btn {
    padding: 10px 16px;
}

.bt-rev__wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Карточки в ряду — одной высоты */
.bt-rev__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 12px;
    align-items: stretch;
}

.bt-rev__more {
    flex: 0 0 auto;
    align-self: center;

    padding: 9px 16px;
}

.bt-rev__more:disabled {
    opacity: .6;
}

.bt-rev__item {
    display: flex;
    flex-direction: column;
    gap: 10px;

    margin: 0;
    padding: 14px;
    border-radius: 14px;

    background: var(--soft);
}

.bt-rev__item.is-pos { background: var(--review-pos); }
.bt-rev__item.is-neg { background: var(--review-neg); }

.bt-rev__who {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bt-rev__who > span:last-child {
    display: flex;
    flex-direction: column;

    min-width: 0;
}

.bt-rev__who > span:last-child span {
    color: var(--muted-2);
    font-size: 12px;
}

.bt-rev__ava {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;
    border-radius: 50%;

    color: #FFFFFF;
    font-weight: 700;
}

.bt-rev__text {
    margin: 0;

    color: var(--ink-2);
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-line;
    word-break: break-word;
}

.bt-rev__text.is-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bt-rev__toggle {
    align-self: flex-start;
    margin-top: auto;

    padding: 0;
    border: 0;

    background: transparent;
    color: var(--accent-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.bt-rev__none {
    margin: 0;
    color: var(--muted);
}

.bt-rev__all {
    align-self: flex-start;
    font-size: 13px;
}

/* ---------- Всплывающее окно (полный отзыв) ---------- */

.bt-modal {
    position: fixed;
    inset: 0;
    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 16px;

    background: rgba(6, 10, 18, .55);
}

.bt-modal__box {
    position: relative;

    box-sizing: border-box;
    width: 100%;
    max-width: 560px;
    max-height: min(640px, calc(100vh - 32px));
    overflow-x: hidden;
    overflow-y: auto;
    padding: 22px;

    /* Тонкий скролл без стрелок */
    scrollbar-width: thin;
    scrollbar-color: var(--line-hover) transparent;

    box-shadow: 0 24px 60px rgba(6, 10, 18, .35);
}

/* В окне фон чуть плотнее, чем у карточки в списке */
.bt-modal__box.bt-rev__item {
    background: var(--card);
}

.bt-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 10px;

    background: var(--card);
    color: var(--muted);

    cursor: pointer;
}

.bt-modal__close:hover {
    border-color: var(--line-hover);
}


/* ---------- Этап 6: окна страницы бота ---------- */

/* Кнопка, которая выглядит как ссылка */
.bt-linkbtn {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 0;
    border: 0;

    background: transparent;
    color: var(--accent-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 500;

    cursor: pointer;
}

.bt-linkbtn:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/*
    Ссылки-кнопки под описанием бота («История описаний», «Статистика одной картинкой»):
    у кнопки текст по умолчанию по центру и переносится – на телефоне «Статистика одной
    картинкой» вставала в две строки по центру. Теперь – как у обычных ссылок: по левому краю
    (на самых узких экранах перенос остаётся, но слева), значок не сжимается.
*/
.bt-hero__links .bt-linkbtn {
    text-align: left;
}

.bt-hero__links .bt-link svg {
    flex-shrink: 0;
}

/* Рамка фокуса – только с клавиатуры и скруглённая, а не квадрат браузера */
.bt-linkbtn:focus {
    outline: none;
}

.bt-linkbtn:focus-visible {
    border-radius: 6px;
    outline: 2px solid #8FB0FF;
    outline-offset: 3px;
}

.bt-vote__total.bt-linkbtn {
    color: var(--muted-2);
    font-size: 12px;
}

/* Глаз «Показать пост» в ленте и в упоминаниях */
.bt-feed__eye {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 8px;

    background: var(--card);
    color: var(--muted);

    cursor: pointer;
}

.bt-feed__eye:hover {
    border-color: var(--line-hover);
    color: var(--accent-ink);
}

/* Вторая кнопка («Открыть в боте») – вплотную к первой */
.bt-feed__eye + .bt-feed__eye {
    margin-left: 4px;
}

.bt-days__pop-row .bt-feed__eye {
    margin-left: 0;
    width: 26px;
    height: 26px;
}

/* Окно: шапка */
.bt-modal__head {
    display: flex;
    flex-direction: column;
    gap: 2px;

    padding-right: 40px;
    margin-bottom: 14px;
}

.bt-modal__head b {
    font-family: var(--font-head);
    font-size: 18px;
}

.bt-modal__head span {
    color: var(--muted);
    font-size: 13px;
}

.bt-modal__box:not(.bt-rev__item) {
    border-radius: var(--radius);

    background: var(--card);
}

.bt-modal__box.is-hist {
    max-width: 620px;
}

/* Окна со списком: шапка стоит, прокручивается только тело */
.bt-modal__box:not(.bt-rev__item) {
    display: flex;
    flex-direction: column;

    overflow: hidden;
}

.bt-modal__body {
    flex: 1 1 auto;

    min-height: 0;
    margin-right: -14px;
    padding-right: 14px;
    overflow-x: hidden;
    overflow-y: auto;

    scrollbar-width: thin;
    scrollbar-color: var(--line-hover) transparent;
}

/* Скролл в WebKit: узкий, скруглённый, без дорожки */
.bt-modal__box::-webkit-scrollbar,
.bt-modal__body::-webkit-scrollbar {
    width: 6px;
}

.bt-modal__box::-webkit-scrollbar-thumb,
.bt-modal__body::-webkit-scrollbar-thumb {
    border-radius: 999px;

    background: var(--line-hover);
}

.bt-modal__box::-webkit-scrollbar-track,
.bt-modal__body::-webkit-scrollbar-track {
    background: transparent;
}

.bt-modal__plus {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    padding: 8px 0 4px;

    text-align: center;
}

/* Окно без Plus – узкое, как карточка замка */
.bt-modal__box.is-plusbox {
    max-width: 420px;
}


/* Кто голосовал */
.bt-votes {
    display: flex;
    flex-direction: column;
}

.bt-votes__bar {
    display: flex;

    height: 8px;
    margin-bottom: 8px;
    border-radius: 999px;
    overflow: hidden;

    background: var(--down);
}

.bt-votes__bar span {
    background: var(--up);
}

.bt-votes__row {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.bt-votes__who {
    flex: 1 1 auto;

    display: flex;
    flex-direction: column;

    min-width: 0;
}

.bt-votes__who span {
    color: var(--muted-2);
    font-size: 12px;
}

/* Голос: пилюля с иконкой, зелёная или красная */
.bt-votes__val {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 4px 10px;
    border-radius: 999px;

    font-size: 12px;
    font-weight: 600;
}

.bt-votes__val.is-up {
    background: color-mix(in srgb, var(--up) 12%, transparent);
    color: var(--up);
}

.bt-votes__val.is-down {
    background: color-mix(in srgb, var(--down) 12%, transparent);
    color: var(--down);
}

/* Метка «вы» у своего голоса */
.bt-votes__me {
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;

    background: var(--soft);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    vertical-align: 2px;
}

/* История описаний: лента с точками */
.bt-hist {
    display: flex;
    flex-direction: column;
}

.bt-hist__item {
    position: relative;

    display: flex;
    gap: 12px;

    padding-bottom: 16px;
}

/* Вертикальная линия между точками: от низа точки до следующей, с зазором */
.bt-hist__item::before {
    content: '';

    position: absolute;
    top: 20px;
    bottom: 2px;
    left: 5px;

    border-left: 2px solid var(--line);
}

.bt-hist__item:last-child::before {
    display: none;
}

.bt-hist__dot {
    position: relative;
    z-index: 1;

    flex: 0 0 auto;

    width: 12px;
    height: 12px;
    margin-top: 4px;
    border-radius: 50%;

    background: var(--line-hover);
}

.bt-hist__dot.is-first {
    background: var(--accent);
}

.bt-hist__content {
    display: flex;
    flex-direction: column;
    gap: 4px;

    min-width: 0;
}

.bt-hist__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;

    font-size: 13px;
}

.bt-hist__tag {
    padding: 1px 8px;
    border-radius: 999px;

    background: var(--soft);
    color: var(--muted);
    font-size: 11px;
}

.bt-hist__title {
    font-size: 14px;
}

.bt-hist__text {
    color: var(--ink-2);
    font-size: 13px;
    white-space: pre-line;
    word-break: break-word;
}

/* Статистика одной картинкой */
.bt-chartcard {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bt-chartcard img {
    display: block;

    width: 100%;
    height: auto;
    border-radius: 12px;
}

.bt-chartcard__theme {
    align-self: flex-start;
}

/* Картинка 1200 px – окну нужно место */
.bt-modal__box.is-chart {
    max-width: 760px;
}

.bt-chartcard__actions {
    display: flex;
    gap: 8px;
}

.bt-chartcard__actions .bt-btn {
    flex: 1 1 0;
    padding: 11px 14px;
}

/* Пост: пузырь как в Telegram – общие стили в css/post.css (страница бота и лента рекламы) */
.bt-modal__box.is-post {
    max-width: 480px;
}

/* Динамика языков и пола: столбики по проверкам */
.bt-dynbars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bt-dynbars__bars {
    display: flex;
    align-items: stretch;
    gap: 4px;

    min-width: 0;

    height: 220px;
}

/* Подсказка над столбиком: дата и значения, не перехватывает мышь */
.bt-dynbars__bars {
    position: relative;
}

.bt-dynbars__tip {
    position: absolute;
    z-index: 5;
    top: 8px;

    display: flex;
    flex-direction: column;
    gap: 4px;

    min-width: 170px;
    padding: 10px 12px;
    border: 1px solid var(--tip-line);
    border-radius: 9px;

    background: var(--tip-bg);
    box-shadow: 0 10px 28px rgba(6, 10, 18, .18);
    color: var(--tip-fg);
    font-size: 12px;

    pointer-events: none;

    /* Правая половина графика – подсказка левее столбика, левая – правее */
    transform: translateX(calc(-100% - 14px));
}

.bt-dynbars__tip.is-left {
    transform: translateX(14px);
}

.bt-dynbars__tip > span {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
}

/* Строка подписей одной высоты у всех столбиков – иначе столбики без подписи длиннее */
.bt-dynbars .bt-online__label {
    flex: 0 0 14px;

    height: 14px;
    line-height: 14px;
    overflow: visible;
}

/* Подпись шире столбика: по центру, первая – от левого края, последняя – к правому */
.bt-dynbars .bt-online__label {
    display: flex;
    justify-content: center;
}

.bt-dynbars .bt-online__label.is-first {
    justify-content: flex-start;
}

.bt-dynbars .bt-online__label.is-last {
    justify-content: flex-end;
}

.bt-dynbars__sum {
    display: flex;
    flex-direction: column;
    gap: 6px;

    font-size: 13px;
}

.bt-dynbars__sum > div {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.bt-dynbars__sum > div > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.is-sexm { background: var(--sex-m); }
.is-sexf { background: var(--sex-f); }


/* ---------- Нет проверки BotSafe ---------- */

.bt-nocheck {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 24px;

    padding: 22px;
    border: 1px dashed var(--line-hover);
    border-radius: var(--radius);

    background: var(--card);
}

.bt-nocheck__icon {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 56px;
    height: 56px;
    border-radius: 16px;

    background: var(--accent-soft);
    color: var(--accent-ink);
}

.bt-nocheck__text {
    flex: 999 1 380px;

    display: flex;
    flex-direction: column;
    gap: 6px;

    min-width: 0;
}

.bt-nocheck__text > b {
    font-family: var(--font-head);
    font-size: 17px;
}

.bt-nocheck__text > span {
    color: var(--muted);
    font-size: 13px;
}

.bt-nocheck__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;

    margin-top: 4px;
}

.bt-nocheck__chips span {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 3px 9px;
    border-radius: 999px;

    background: var(--soft);
    color: var(--muted);
    font-size: 12px;
}

.bt-nocheck__cta {
    flex: 1 1 200px;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;

    text-align: center;
}

.bt-nocheck__cta span {
    color: var(--muted-2);
    font-size: 12px;
}


/* ---------- Пустое состояние блока: нейтрально — тонкая рамка, без заливки ---------- */

.bt-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;

    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;

    text-align: center;
}

.bt-empty-state__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 4px;

    color: var(--muted-2);
}

.bt-empty-state__icon svg {
    width: 20px;
    height: 20px;
}

.bt-empty-state__title {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

.bt-empty-state__sub {
    max-width: 340px;

    color: var(--muted-2);
    font-size: 12px;
}


/* ---------- Заготовка на время загрузки (скелетон) ---------- */

.bt-skel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Каждая полоска — серая, по ней пробегает светлый блик */
.bt-skel i {
    display: block;

    height: 10px;
    border-radius: 6px;

    background: linear-gradient(90deg, var(--soft) 0%, var(--line) 50%, var(--soft) 100%);
    background-size: 200% 100%;

    animation: bt-shimmer 1.4s ease-in-out infinite;
}

@keyframes bt-shimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.bt-skel__tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
    gap: 10px;
}

.bt-skel__tile {
    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.bt-skel i.is-big {
    height: 18px;
}

.bt-skel i.bt-skel__bar {
    height: 12px;
    border-radius: 999px;
}

.bt-skel__row {
    display: flex;
    align-items: center;
    gap: 16px;

    padding: 6px 4px 12px;
    border-bottom: 1px solid var(--line);
}

.bt-skel__row i {
    flex: 0 0 auto;
}

.bt-skel__row i:last-child {
    flex: 0 1 auto;
}

@media (prefers-reduced-motion: reduce) {
    .bt-skel i {
        animation: none;
    }
}


/* ---------- Планшет и телефон ---------- */

@media (max-width: 900px) {
    .bt-kpis,
    .bt-kpis:has(> :nth-child(5):last-child),
    .bt-kpis:has(> :nth-child(6):last-child) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* По две в ряд: нечётная последняя – на всю ширину */
    .bt-kpis > :last-child:nth-child(odd) {
        grid-column: span 2;
    }

    .bt-kpis > :nth-child(7):last-child {
        grid-column: span 2;
    }
}

@media (max-width: 760px) {
    .bt-hero {
        padding: 18px;
    }

    .bt-hero__name {
        font-size: 22px;
    }

    .bt-hero__avatar {
        width: 64px;
        height: 64px;
        border-radius: 18px;
    }

    .bt-hero__side {
        max-width: none;
    }

    .bt-card {
        padding: 16px;
    }

    /* Ось Y уже, столбики «Были в сети» теснее */
    .bt-chart__y {
        width: 48px;
    }

    .bt-chart__x {
        padding-left: 56px;
    }

    .bt-online__bars {
        gap: 4px;
    }

    .bt-online__label {
        font-size: 10px;
    }

    /*
        «По дням» на телефоне: дата слева, значение – по правому краю своей колонки,
        изменение с колокольчиком – блоком постоянной ширины у правого края.
        Так строка заполняет всю ширину, а не жмётся влево.
    */
    .bt-days__row {
        /* Колонки постоянной ширины: каждая строка – своя сетка, с «auto» колонки гуляли бы от строки к строке */
        grid-template-columns: 72px minmax(0, 1fr) calc(7.5ch + 66px);
        column-gap: 14px;
    }

    .bt-days__row > :nth-child(2) {
        text-align: right;
    }

    .bt-effect__row {
        grid-template-columns: 78px minmax(0, 1fr) 56px;
    }

    .bt-effect__bar {
        display: none;
    }

    .bt-cross__row {
        grid-template-columns: minmax(0, 1fr) 96px;
    }

    .bt-cross__bars {
        grid-column: 1 / -1;
        order: 3;
    }

    /* Лента на телефоне: время и действие — сверху, кто и пост — ниже */
    .bt-feed__row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .bt-feed__head {
        display: none;
    }

    .bt-feed__pop {
        left: 0;
    }

}


/*
    Таблица «По дням» на узком телефоне (до 420px): колонке с числом не хватало места –
    «1 042 521» наезжал на изменение. Уже дата и отступы, мельче шрифт, колонка изменения –
    под число и колокольчик впритык.
*/
@media (max-width: 420px) {
    .bt-days__row {
        grid-template-columns: 58px minmax(0, 1fr) calc(7.5ch + 46px);
        column-gap: 8px;

        padding: 9px 4px;

        font-size: 13px;
    }

    .bt-days__delta {
        gap: 6px;
    }

    .bt-days__m {
        gap: 3px;

        padding: 2px 6px;

        font-size: 11px;
    }
}

/*
    Замки «доступно в Plus» на телефонах (до 760px):
      – подложка замка шла на 6px за края карточки: её поля были от компьютера (20px 22px),
        а у карточки на телефоне 16px;
      – высокие блоки (движение аудитории, реклама в боте) оставались на всю высоту
        размытой заглушки – по 200–300px пустоты над и под окном замка. Заглушку обрезаем:
        блок под замком не выше 340px, окно замка – по центру.
*/
@media (max-width: 760px) {
    .bt-card.is-locked > .bt-lock {
        margin: -16px;
        padding: 18px 12px;
    }

    .bt-card.is-locked > .bt-lockable {
        max-height: 340px;
        overflow: hidden;
    }

    /*
        Окно замка на телефоне – без своей рамки и тени: карточка в карточке
        вплотную к краям выглядела обрезанной. Содержимое лежит прямо на подложке,
        подложку делаем плотнее, чтобы текст читался поверх размытой заглушки.
    */
    .bt-card.is-locked .bt-lock__card {
        max-width: none;
        padding: 6px 4px;
        border: 0;

        background: transparent;
        box-shadow: none;
    }

    .bt-card.is-locked > .bt-lock {
        background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .9));
    }

    :root[data-theme="dark"] .bt-card.is-locked > .bt-lock {
        background: linear-gradient(180deg, rgba(18, 26, 42, .55), rgba(18, 26, 42, .88));
    }
}

@media (max-width: 760px) and (prefers-color-scheme: dark) {
    :root[data-theme="auto"] .bt-card.is-locked > .bt-lock {
        background: linear-gradient(180deg, rgba(18, 26, 42, .55), rgba(18, 26, 42, .88));
    }
}

/* Самые узкие телефоны (до 360px): ещё уже дата и мельче шрифт */
@media (max-width: 360px) {
    .bt-days__row {
        grid-template-columns: 50px minmax(0, 1fr) calc(7.5ch + 40px);
        column-gap: 6px;

        padding: 8px 2px;

        font-size: 12px;
    }
}


@media (prefers-reduced-motion: reduce) {
    .bt-btn,
    .bt-ghost,
    .bt-vote__btn {
        transition: none;
    }
}


/* ---------- Бот без данных (макет BotEmpty) ---------- */

/* Плашка «данные ещё собираются» под шапкой */
.bt-blank {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;

    padding: 16px 18px;
    border-radius: 14px;

    background: var(--accent-soft);
    color: var(--ink);
}

/* SCAM: статистика скрыта – в тон плашке SCAM */
.bt-blank--scam {
    background: var(--down-soft);
}

/* Значок – после общего .bt-blank__icon, иначе его синяя подложка перебьёт */
.bt-blank__icon {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;
    border-radius: 10px;

    background: var(--accent);
    color: #FFFFFF;
}

.bt-blank--scam .bt-blank__icon {
    background: var(--down);
}

.bt-blank__text {
    flex: 1 1 380px;

    display: flex;
    flex-direction: column;
    gap: 2px;

    font-size: 14px;
    line-height: 1.45;
}

.bt-blank__text span {
    color: var(--ink-2);
}

.bt-blank__btn {
    flex: 0 0 auto;

    padding: 10px 14px;
    font-size: 14px;
}

/* Пустой график: пунктирная кривая на сетке и подсказка поверх */
.bt-blankdyn {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bt-blankdyn__chart {
    position: relative;

    height: 220px;
    border-radius: 12px;
    overflow: hidden;

    background-image: linear-gradient(var(--line) 1px, transparent 1px);
    background-size: 100% 55px;
}

.bt-blankdyn__line {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
}

.bt-blankdyn__line path {
    fill: none;
    stroke: var(--line-hover);
    stroke-width: 2;
    stroke-dasharray: 6 7;
    vector-effect: non-scaling-stroke;
}

.bt-blankdyn__msg {
    position: absolute;
    top: 50%;
    left: 50%;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;

    max-width: calc(100% - 32px);
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 12px;

    background: var(--card);
    box-shadow: 0 6px 20px rgba(11, 18, 32, .06);
    text-align: center;

    transform: translate(-50%, -50%);
}

.bt-blankdyn__msg b {
    font-size: 14px;
}

.bt-blankdyn__msg span {
    color: var(--muted);
    font-size: 13px;
}

/* Реклама и упоминания / история: заголовок и пустые плитки */
.bt-blankads {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bt-block-title {
    font-family: var(--font-head);
    font-size: 17px;
}

.bt-blankads__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.bt-blankads .bt-empty-state {
    padding: 22px 12px;
}

.bt-blank__small {
    flex: 0 0 auto;

    margin-top: 8px;
    padding: 8px 14px;

    font-size: 13px;
    text-decoration: none;
}

/* Аудитория: серые заглушки вместо цифр */
.bt-blankaud {
    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 4px 0;
}

.bt-blankaud > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    color: var(--muted);
    font-size: 13px;
}

.bt-blankaud i {
    width: 70px;
    height: 8px;
    border-radius: 4px;

    background: var(--soft);
}

.bt-blank__aud {
    align-self: flex-start;

    padding: 10px 14px;
    font-size: 14px;
}


/* Данные могли устареть: последний замер давно */
.bt-stale {
    display: flex;
    align-items: flex-start;
    gap: 8px;

    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--warn, #B45309) 30%, var(--line));
    border-radius: 10px;

    background: color-mix(in srgb, var(--warn, #B45309) 8%, transparent);
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.45;
}

.bt-stale svg {
    flex: 0 0 auto;

    margin-top: 2px;

    color: var(--warn, #B45309);
}


/* Правая колонка узкая: замок компактнее, чтобы не упирался в края блока */
.bt-side .bt-lock {
    padding: 22px 16px;
}

.bt-side .bt-lock__card {
    gap: 8px;

    padding: 16px 14px;
}

.bt-side .bt-lock__icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
}

.bt-side .bt-lock__title {
    font-size: 16px;
}

.bt-side .bt-lock__btn {
    padding: 9px 12px;

    font-size: 13px;
    white-space: normal;
}




/* ---------- Гость: вход вместо Plus ---------- */

.bt-lock__note {
    color: var(--muted-2);
    font-size: 12px;
}

.bt-guest {
    gap: 10px;
}

.bt-guest__btn {
    align-self: flex-start;

    padding: 10px 14px;
    font-size: 14px;
}

/* Гость: размытые ненастоящие цифры под одним замком входа */
.bt-lock__icon.is-login {
    background: linear-gradient(135deg, #3B82F6, #2457E6);
    box-shadow: 0 8px 20px rgba(36, 87, 230, .3);
}


/* «По дням» без Plus: ссылка вместо списка ботов в окне колокольчика */
.bt-days__pop-plus {
    padding: 6px 4px;

    color: var(--accent-ink);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.bt-days__pop-plus:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Вкладка под замком (без Plus) */
.bt-tabs__tab.is-plus {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    color: var(--muted-2);
}

.bt-tabs__tab.is-plus svg {
    color: #FF7A2C;
}


/* ---------- Бот-пример ---------- */

/* «Как это выглядит →» под кнопкой на замке */
.bt-lock__example {
    color: var(--accent-ink);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.bt-lock__example:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Плашка «Это пример» под шапкой бота-примера */
.bt-example {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;

    padding: 16px 18px;
    border: 1px solid color-mix(in srgb, #8B5CF6 30%, var(--line));
    border-radius: 14px;

    background: color-mix(in srgb, #8B5CF6 8%, var(--card));
}

.bt-example__icon {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;
    border-radius: 10px;

    background: #7C3AED;
    color: #FFFFFF;
}

.bt-example__text {
    flex: 1 1 380px;

    display: flex;
    flex-direction: column;
    gap: 2px;

    font-size: 14px;
    line-height: 1.45;
}

.bt-example__text span {
    color: var(--ink-2);
}

.bt-example .bt-btn {
    flex: 0 0 auto;

    padding: 10px 14px;
    font-size: 14px;
}


/* ---------- Соседи по группам ---------- */

.bt-groups__body,
.bt-groups__data {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Тематика соседей: одна полоса из долей категорий и подписи */
.bt-groups__cats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bt-groups__catbar {
    display: flex;

    height: 10px;
    border-radius: 999px;
    overflow: hidden;

    background: var(--soft);
}

.bt-groups__catbar span {
    height: 100%;
}

.bt-groups__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;

    color: var(--muted);
    font-size: 12px;
}

.bt-groups__legend > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bt-groups__legend b {
    color: var(--ink);
}

.bt-groups__sw {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

/* Цвета категорий – как у языков */
.bt-groups .is-c0 { background: #2457E6; }
.bt-groups .is-c1 { background: #0E7C86; }
.bt-groups .is-c2 { background: #6A3FD6; }
.bt-groups .is-c3 { background: #C2410C; }
.bt-groups .is-c4 { background: var(--line-hover); }

/* Строки соседей */
.bt-groups__rows {
    display: flex;
    flex-direction: column;
}

.bt-groups__row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;

    padding: 9px 6px;
    border-bottom: 1px solid var(--line);
    border-radius: 10px;

    color: inherit;
    text-decoration: none;

    transition: background .15s ease;
}

a.bt-groups__row:hover {
    background: var(--soft);
}

.bt-groups__ava {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;
    border-radius: 10px;
    overflow: hidden;

    color: #FFFFFF;
    font-weight: 700;
}

.bt-groups__ava img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.bt-groups__who {
    display: flex;
    flex-direction: column;
    gap: 3px;

    min-width: 0;
}

.bt-groups__name {
    display: flex;
    align-items: center;
    gap: 6px;

    min-width: 0;
}

.bt-groups__name b {
    overflow: hidden;

    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bt-groups__name .bt-scam {
    flex: 0 0 auto;

    padding: 1px 6px;
    border-radius: 5px;

    background: var(--down);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 800;
}

.bt-groups__meta {
    overflow: hidden;

    color: var(--muted-2);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bt-groups__bar {
    height: 5px;
    border-radius: 999px;
    overflow: hidden;

    background: var(--soft);
}

.bt-groups__bar span {
    display: block;

    height: 100%;
    border-radius: 999px;

    background: var(--accent);
}

.bt-groups__count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;

    font-variant-numeric: tabular-nums;
}

.bt-groups__count span {
    color: var(--muted-2);
    font-size: 12px;
}

.bt-groups__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bt-groups__foot .bt-block-note {
    flex: 1 1 320px;
}

.bt-groups__more {
    flex: 0 0 auto;
}

/* Три плитки – в ряд на всю ширину */
.bt-groups .bt-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 560px) {
    .bt-groups .bt-tiles {
        grid-template-columns: 1fr;
    }
}


/* ---------- Лента: бот в колонке «Кого / Где» – аватарка, название, @username ---------- */

.bt-feed__bot {
    display: flex;
    align-items: center;
    gap: 8px;

    min-width: 0;

    color: var(--ink);
    text-decoration: none;
}

.bt-feed__ava {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;

    background: var(--soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.bt-feed__ava img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.bt-feed__names {
    display: flex;
    flex-direction: column;

    min-width: 0;
    line-height: 1.25;
}

.bt-feed__names b,
.bt-feed__names small {
    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.bt-feed__names b {
    color: var(--accent);
    font-weight: 600;
}

.bt-feed__names small {
    color: var(--muted);
    font-size: 12px;
}

.bt-feed__bot:hover b {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* В списке «+N»: боты столбиком */
.bt-feed__pop .bt-feed__bot {
    padding: 2px 0;
}


/* «Кто покупает»: настоящая аватарка вместо буквы */
.bt-buyer__ava.is-img {
    overflow: hidden;

    background: var(--soft);
}

.bt-buyer__ava.is-img img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* «Общая аудитория»: бот – аватарка, название, @username (стили имён – как в ленте, .bt-feed__names) */
.bt-cross__bot {
    display: flex;
    align-items: center;
    gap: 8px;

    min-width: 0;

    color: var(--ink);
    text-decoration: none;
}

.bt-cross__bot b {
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
}

.bt-cross__bot:hover b {
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* ---------- «Упоминания в ботах»: до 50 ботов – окно со скроллом, заголовок не уезжает ---------- */

.bt-days__pop:not(.bt-feed__pop) {
    max-height: 360px;
    overflow-y: auto;
    overscroll-behavior: contain;

    /* Скролл – узкий, скруглённый, без дорожки (как в окнах страницы) */
    scrollbar-width: thin;
    scrollbar-color: var(--line-hover) transparent;
}

.bt-days__pop:not(.bt-feed__pop)::-webkit-scrollbar {
    width: 6px;
}

.bt-days__pop:not(.bt-feed__pop)::-webkit-scrollbar-thumb {
    border-radius: 999px;

    background: var(--line-hover);
}

.bt-days__pop:not(.bt-feed__pop)::-webkit-scrollbar-track {
    background: transparent;
}

/* Заголовок «Упоминания в ботах · N» – прилипает сверху при прокрутке */
.bt-days__pop-head {
    position: sticky;
    top: -10px;
    z-index: 1;

    margin: -10px -10px 0;
    padding: 12px 14px 8px;

    background: var(--card);
}


/* «По дням»: изменение – постоянной ширины (цифры одной ширины), колокольчики – на одной вертикали */
.bt-days__dv {
    display: inline-block;

    min-width: 7.5ch;

    font-variant-numeric: tabular-nums;
}


/* «Эффект упоминаний»: бот с аватаркой и названием – по центру строки; правило .bt-effect__who span – только для «и ещё N» */
.bt-effect__who {
    align-items: center;
}

.bt-effect__who .bt-feed__names,
.bt-effect__who .bt-feed__ava span {
    flex: initial;
}

/* Аватарка не сжимается, когда название длинное – всегда ровный круг 28×28 */
.bt-effect__who .bt-feed__ava {
    flex: 0 0 28px;

    width: 28px;
    height: 28px;
}

.bt-effect__who .bt-feed__names {
    min-width: 0;
}

.bt-effect__bot b {
    color: var(--ink);
    font-weight: 700;
}

/* @username и «и ещё N» под названием – обычным начертанием */
.bt-effect__bot small {
    font-weight: 500;
}


/* Бот в плитке – ссылкой: значение («Самый близкий») – как обычное число плитки, подпись – как подпись */
.bt-tile__link {
    overflow: hidden;

    color: var(--ink);
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bt-tile__sublink {
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
}

.bt-tile__link:hover,
.bt-tile__sublink:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* Пост без текста: «Текст отсутствует» – приглушённо */
.bt-feed__text.is-media {
    color: var(--muted-2);
}


/* ---------- Лента «Реклама и упоминания»: вид «Список / Календарь» ---------- */

/* Переключатель – справа в строке вкладок */
.bt-view {
    display: flex;
    align-self: center;
    gap: 2px;

    margin-left: auto;
    /* Отступ от линии вкладок снизу */
    margin-bottom: 8px;
    padding: 3px;
    border-radius: 10px;

    background: var(--soft);
}

.bt-view__btn {
    display: flex;
    align-items: center;
    gap: 6px;

    padding: 5px 10px;
    border: 0;
    border-radius: 8px;

    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.bt-view__btn.is-on {
    background: var(--card);
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(11, 18, 32, 0.08);
}

/* Телефон: переключатель – отдельной строкой над вкладками, на всю ширину, с подписями */
@media (max-width: 640px) {
    .bt-feed .bt-tabs {
        flex-wrap: wrap;
    }

    .bt-view {
        order: -1;

        flex: 0 0 100%;
        margin: 0 0 6px;
    }

    .bt-view__btn {
        flex: 1 1 0;
        justify-content: center;

        padding: 7px 10px;
    }
}

/* Плашка выбранного дня */
.bt-cal__chip {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;

    padding: 5px 6px 5px 12px;
    border-radius: 999px;

    background: var(--accent-soft);
    color: var(--accent-ink);
    font-size: 13px;
    font-weight: 600;
}

.bt-cal__chip button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;

    background: transparent;
    color: inherit;
    cursor: pointer;
}

.bt-cal__chip button:hover {
    background: var(--card);
}

/* Шапка: ‹ Ноябрь 2026 ›  и легенда */
.bt-cal__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;

    margin-bottom: 12px;
}

.bt-cal__month {
    min-width: 140px;

    font-family: var(--font-head);
    font-size: 16px;
    text-align: center;
}

.bt-cal__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;

    margin-left: auto;

    font-size: 13px;
}

.bt-cal__key {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    color: var(--muted);
}

.bt-cal__key::before {
    content: "";

    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.bt-cal__key.is-out::before { background: var(--accent); }
.bt-cal__key.is-men::before { background: var(--bt-men); }

/* Сетка: 7 колонок, Пн–Вс; карточка дня позиционируется внутри неё */
.bt-cal__grid {
    position: relative;

    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.bt-cal__wd {
    padding-bottom: 2px;

    color: var(--muted-2);
    font-size: 12px;
    text-align: center;
    text-transform: capitalize;
}

.bt-cal__day {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;

    min-height: 62px;
    padding: 6px 7px;
    border: 1px solid var(--line);
    border-radius: 10px;

    background: var(--card);
    color: var(--muted-2);
    font: inherit;
    text-align: left;
}

.bt-cal__day.is-blank {
    border-color: transparent;
    background: transparent;
}

.bt-cal__day.has-posts {
    color: var(--ink);
    cursor: pointer;
}

.bt-cal__day.has-posts:hover {
    border-color: var(--accent);
}

.bt-cal__day.is-on {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.bt-cal__day.is-today {
    border-color: var(--line-hover);
    box-shadow: inset 0 0 0 1px var(--line-hover);
}

.bt-cal__num {
    font-size: 13px;
    font-weight: 600;
}

.bt-cal__marks {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.bt-cal__mark {
    padding: 1px 6px;
    border-radius: 6px;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.bt-cal__mark.is-out {
    background: var(--accent-soft);
    color: var(--accent-ink);
}

.bt-cal__mark.is-men {
    background: var(--bt-men-soft);
    color: var(--bt-men);
}

.bt-cal__empty {
    margin: 10px 0 0;

    color: var(--muted);
    font-size: 14px;
}

/* Телефон: клетки ниже, отметки мельче */
@media (max-width: 640px) {
    .bt-cal__grid {
        gap: 3px;
    }

    .bt-cal__day {
        min-height: 48px;
        padding: 4px;
        border-radius: 8px;
    }

    .bt-cal__mark {
        padding: 0 4px;
        font-size: 11px;
    }
}


/* Карточка дня в календаре: посты по времени */
.bt-cal__pop {
    position: absolute;
    z-index: 30;

    display: flex;
    flex-direction: column;

    width: min(320px, 100%);
    max-height: 340px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;

    background: var(--card);
    box-shadow: 0 12px 32px rgba(11, 18, 32, 0.16);

    /* Тонкая полоса прокрутки без серой дорожки – как у списка ботов владельца */
    scrollbar-width: thin;
    scrollbar-color: var(--line-hover) transparent;
}

.bt-cal__pop::-webkit-scrollbar {
    width: 6px;
}

.bt-cal__pop::-webkit-scrollbar-track {
    margin: 10px 0;
    background: transparent;
}

.bt-cal__pop::-webkit-scrollbar-thumb {
    border-radius: 6px;
    background: var(--line-hover);
}

.bt-cal__pop::-webkit-scrollbar-thumb:hover {
    background: var(--muted-2);
}

.bt-cal__pop > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bt-cal__pop-title {
    padding: 2px 6px 6px;

    font-size: 13px;
}

.bt-cal__post {
    display: flex;
    flex-direction: column;
    gap: 3px;

    padding: 7px 8px;
    border: 0;
    border-radius: 8px;

    background: transparent;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.bt-cal__post:hover {
    background: var(--soft);
}

.bt-cal__post-head {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.bt-cal__post-time {
    color: var(--muted-2);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.bt-cal__post-who {
    overflow: hidden;

    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bt-cal__post-text {
    display: -webkit-box;
    overflow: hidden;

    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bt-cal__post-text.is-media {
    font-style: italic;
}

.bt-cal__pop-all {
    margin-top: 4px;
    padding: 7px 8px;
    border: 0;
    border-top: 1px solid var(--line);

    background: transparent;
    color: var(--accent-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
