/* Новый личный кабинет (/lk/) — только то, чего нет в общих
   theme.css/components.css/site-header.css. Карточки, кнопки, поля,
   тумблеры, модалки, спиннер — общие (.card, .btn, .field, .switch,
   .user-modal*, .spinner), здесь их не переопределяем. */

body { padding: 104px 20px 60px; }
@media (max-width: 480px) {
    body { padding: 76px 20px 48px; } /* 20px — как у шапки, контент от лого */
}

/* Контент начинается ровно от логотипа в шапке: .site-header-inner —
   max-width 1200px с padding 0 20px, значит лого стоит на 20px правее
   края 1200-колонки; 1160px по центру дают ту же левую границу. На
   узких окнах обе упираются в 20px отступа body/шапки. */
.lk { max-width: 1160px; margin: 0 auto; }
.lk h1 { font-size: 1.8rem; color: var(--text-primary); font-weight: 800; letter-spacing: -0.3px; line-height: 1.2; }
.lk h2 { font-size: 1.15rem; color: var(--text-primary); font-weight: 700; }
.lk-muted { color: var(--text-muted); font-size: 0.9rem; }
.lk-hello { margin-bottom: 22px; }
.lk-hello p { margin-top: 4px; }
.lk-stack { display: flex; flex-direction: column; gap: 18px; }
.lk-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.lk-row-between { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.lk-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.lk-actions .btn { flex: 1 1 160px; }


/* Меню разделов.
   Компьютер (≥1080px): в шапке сайта справа (.lk-hnav, JS вставляет её в
   .site-header-inner), пилюля-выделение переезжает с пункта на пункт.
   Уже 1080px (шесть пунктов с иконками наезжали на логотип) и телефон:
   панель внизу экрана, как в приложениях —
   под большой палец, все пять разделов без прокрутки. */
.lk-hnav { position: relative; display: flex; gap: 4px; } /* без подложки (владелец 2026-11-16) */
.lk-hnav-pill {
    position: absolute; top: 0; bottom: 0; left: 0;
    border-radius: 10px; background: var(--accent-gradient);
    pointer-events: none;
}
.lk-hnav.lk-hnav-ready .lk-hnav-pill { transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), width 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease; }
/* Пункт 40px — высота элементов шапки на всех страницах (колокольчик, «три полоски», блок кнопок
   на странице подписки); подсветка активного — на всю высоту (владелец 2026-11-16). */
.lk-hnav-item {
    position: relative; /* поверх пилюли */
    display: flex; align-items: center; gap: 7px;
    height: 40px; padding: 0 14px; border-radius: 10px; white-space: nowrap;
    color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 0.9rem;
    transition: color 0.2s ease;
}
.lk-hnav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.lk-hnav-item:hover { color: var(--text-primary); }
.lk-hnav-item.active { color: var(--on-accent); }
.lk-hnav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    .lk-hnav.lk-hnav-ready .lk-hnav-pill { transition: none; }
}

.lk-nav-bottom { display: none; }

@media (max-width: 1079px) {
    .lk-hnav { display: none; }
    /* Место под нижнюю панель + "домашний индикатор" iPhone. */
    body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
    .lk-nav-bottom {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--border);
        /* Тот же стеклянный фон, что у шапки сайта (site-header.css). */
        background: var(--header-glass);
        backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
    }
    .lk-nav-item {
        flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        padding: 6px 2px; min-height: 56px; border-radius: 12px;
        color: var(--text-muted); text-decoration: none;
        font-size: 0.7rem; font-weight: 600; text-align: center;
        transition: color 0.15s ease;
    }
    .lk-nav-item .lk-nav-icon { transition: background-color 0.2s ease, transform 0.12s ease; }
    .lk-nav-item:active .lk-nav-icon { transform: scale(0.9); }
    .lk-nav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
    /* Активный пункт — "пилюля" под иконкой (как в Android-приложении). */
    .lk-nav-icon { display: flex; padding: 4px 14px; border-radius: 999px; transition: background-color 0.2s ease; }
    .lk-nav-icon svg { width: 22px; height: 22px; }
    /* Подпись — светлым акцентом (под пилюлей чёрный фон панели), тёмный
       --on-accent только у иконки на градиентной пилюле. */
    .lk-nav-item.active { color: var(--accent-hover); }
    .lk-nav-item.active .lk-nav-icon { background: var(--accent-gradient); color: var(--on-accent); }
    .lk-nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
}

/* Карточки в ряд одной высоты (grid) — кнопки прижаты к низу, чтобы
   стояли на одной линии ("Пополнить" и "Моя ссылка" на главной). */
.lk-card-col { display: flex; flex-direction: column; }
.lk-card-col > .lk-actions { margin-top: auto; padding-top: 18px; }
/* Только телефон / всё, кроме телефона (главная: "Подключить" под
   балансом вместо карточки "Пригласи друзей"). */
.lk-phone-only { display: none; }
@media (max-width: 760px) {
    .lk-hide-phone { display: none; }
    .lk-phone-only { display: block; }
    .lk-connect-phone { text-align: center; text-decoration: none; padding: 14px 20px; }
}
.lk-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }

.lk-inline-link { color: var(--accent); text-decoration: none; }
.lk-inline-link:hover { text-decoration: underline; }
.lk-link-box .btn { flex-shrink: 0; white-space: nowrap; }
/* Телефон: поле на всю строку, кнопки под ним. ".lk .lk-link-box" —
   чтобы перебить базовое ".lk-link-box input { flex: 1 }" ниже по файлу. */
@media (max-width: 480px) {
    .lk .lk-link-box { flex-wrap: wrap; }
    .lk .lk-link-box input { flex: 1 1 100%; }
    .lk .lk-link-box .btn { flex: 1 1 0; }
}
.lk-big { font-size: 2.2rem; font-weight: 800; color: var(--text-primary); line-height: 1.1; letter-spacing: -0.5px; }
.lk-big small { font-size: 1rem; font-weight: 600; color: var(--text-muted); }

/* Статус подписки — та же форма, что у .android-promo-badge на главной. */
.lk-badge {
    display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; flex-shrink: 0;
    color: var(--accent); background: rgba(20, 184, 166, 0.14);
}
.lk-badge.warn { color: #fbbf24; background: rgba(251, 191, 36, 0.14); }
.lk-badge.bad { color: var(--danger); background: rgba(255, 90, 90, 0.14); }
.lk-badge.muted { color: var(--text-muted); background: var(--surface-strong); }

/* Подписка — три отдельные карточки (шапка, цифры, действия) с
   промежутком, свои отступы вместо общего card-pad. */
.lk-sub { display: flex; flex-direction: column; gap: 18px; } /* тот же шаг, что у .lk-stack/.lk-grid-2 */
.lk-sub-sec { --sec-pad: 24px; --sec-pad-y: 20px; padding: var(--sec-pad-y) var(--sec-pad); }
.lk-sub-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; overflow: hidden; }
/* "Ваш тариф:" — серым, само название — белым. */
.lk-tariff-pre { color: var(--text-muted); font-weight: 600; }
/* Строка "Ваша промогруппа" — во всю ширину карточки до самых краёв
   (отрицательные поля = отступы карточки), отделена линией. */
.lk-sub-group {
    flex: 1 0 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin: 0 calc(var(--sec-pad) * -1) calc(var(--sec-pad-y) * -1);
    padding: 14px var(--sec-pad); border: 0; border-top: 1px solid var(--border);
    background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
    transition: background-color 0.15s ease;
}
.lk-sub-group:hover { background: var(--surface); }
.lk-sub-group:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lk-sub-group-name { display: inline-flex; align-items: center; gap: 4px; color: var(--text-primary); font-weight: 700; }
.lk-sub-head-main { min-width: 0; }
.lk-renew-btn { min-width: 210px; } /* вдвое шире прежней "Продлить" (~103px) */
.lk-sub-head-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.lk-sub-head-btns .btn { text-align: center; text-decoration: none; }
@media (max-width: 480px) { .lk-sub-head-btns { width: 100%; flex-direction: column; } }
/* Название тарифа — ссылка на тарифы, со стрелкой. */
.lk-tariff-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
.lk-tariff-link .lk-chev { width: 18px; height: 18px; }
.lk-tariff-link:hover { color: var(--accent-hover); }
.lk-tariff-link:hover .lk-chev { color: var(--accent-hover); transform: translateX(2px); }
/* "Продлить" при скором конце — один мягкий пульс после загрузки. */
.lk-pulse { animation: lkPulse 1.4s ease-out 0.5s 1; }
@keyframes lkPulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.6); transform: scale(1); }
    35% { transform: scale(1.04); }
    100% { box-shadow: 0 0 0 16px rgba(34, 211, 238, 0); transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .lk-pulse { animation: none; } }
.lk-sub-head .lk-sub-title { margin-bottom: 4px; }
.lk-sub .lk-facts { margin-top: 0; }
/* Цифры и действия — две карточки в ряд, внутри всё столбиком. */
.lk-sub-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 760px) {
    .lk-sub-row { grid-template-columns: minmax(0, 1fr); }
}
.lk-fact-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
/* Строки делят всю высоту карточки поровну (flex: 1 1 0) — карточка
   растянута по соседней в ряду, и раньше строки стояли кучкой по центру
   с пустотой сверху/снизу. Отступы — у самих строк, у карточки по
   вертикали 0, поэтому линии между строками на равных расстояниях и
   до самого края. */
.lk-sub-sec.lk-sub-list { padding: 0; overflow: hidden; } /* .lk-sub-sec.lk-sub-list — сильнее мобильного ".lk-sub-sec { padding: 18px }" */
.lk-facts-col, .lk-sub-actions { display: flex; flex-direction: column; height: 100%; }
.lk-fact-item, .lk-act { flex: 1 1 0; display: flex; flex-direction: column; justify-content: center; padding: 14px var(--sec-pad); }
.lk-fact-item + .lk-fact-item, .lk-act + .lk-act { border-top: 1px solid var(--border); }
.lk-fact-item .lk-progress { margin-top: 8px; }
/* Кликабельные строки цифр: трафик (докупка), устройства, локации. */
.lk-fact-link {
    width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left;
    text-decoration: none; cursor: pointer; transition: background-color 0.15s ease;
}
.lk-fact-item.lk-fact-link + .lk-fact-item, .lk-fact-item + .lk-fact-item.lk-fact-link { border-top: 1px solid var(--border); }
.lk-fact-link:hover { background: var(--surface); }
.lk-fact-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lk-fact-link .lk-fact-value { display: inline-flex; align-items: center; gap: 4px; }
.lk-chev { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-muted); transition: transform 0.15s ease, color 0.15s ease; }
.lk-fact-link:hover .lk-chev, .lk-sub-group:hover .lk-chev { color: var(--text-primary); transform: translateX(2px); }
.lk-act .btn { width: 100%; padding: 10px 14px; font-size: 0.88rem; display: flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
/* Автопродление — вся строка (и текст, и тумблер) один <label>, без
   рамки: кликабельна целиком. */
.lk-autopay { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; user-select: none; -webkit-user-select: none; }
.lk-autopay:hover .toggle-label { color: var(--text-primary); }
.lk-autopay-text { display: flex; flex-direction: column; }
.lk-autopay .switch { pointer-events: none; } /* клик ловит сам label целиком */
@media (max-width: 480px) {
    .lk-sub-sec { --sec-pad: 18px; --sec-pad-y: 18px; padding: 18px; }
    .lk-sub-head .btn { width: 100%; }
}
.lk-sub-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.lk-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 18px; }
.lk-fact-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; font-weight: 700; }
.lk-fact-value { color: var(--text-primary); font-weight: 600; margin-top: 2px; }

.lk-progress { height: 8px; border-radius: 999px; background: var(--surface-strong); overflow: hidden; margin-top: 8px; }
.lk-progress > span { display: block; height: 100%; background: var(--accent-gradient); border-radius: inherit; transition: width 0.4s ease; }
.lk-progress.warn > span { background: #fbbf24; }
.lk-progress.bad > span { background: var(--danger); }

.lk-divider { height: 1px; background: var(--border); margin: 18px 0; }
.lk-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }

/* Выбор варианта (период, способ оплаты, сумма) — кнопки-плитки. */
.lk-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.lk-choice {
    text-align: left; cursor: pointer; font: inherit; color: var(--text-secondary);
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 14px; transition: border-color 0.15s ease, background-color 0.15s ease;
    min-height: 44px;
}
.lk-choice:hover { border-color: rgba(255, 255, 255, 0.22); }
.lk-choice.selected { border-color: var(--accent); background: var(--surface-strong); }
.lk-choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lk-choice b { display: block; color: var(--text-primary); font-size: 0.98rem; }
.lk-choice span { font-size: 0.82rem; color: var(--text-muted); }
.lk-choice s { color: var(--text-muted); font-size: 0.8rem; margin-left: 4px; }
.lk-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.lk-chips .lk-choice { padding: 8px 14px; min-height: 40px; }

/* Способы оплаты — широкие плитки (названия у них длинные, с эмодзи). */
.lk-choices.lk-methods { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-bottom: 16px; }
.lk-methods .lk-choice { padding: 14px 16px; }

/* Устройства */
.lk-device { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.lk-device + .lk-device { border-top: 1px solid var(--border); }
.lk-device-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: var(--surface-strong); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.lk-device-icon svg { width: 20px; height: 20px; }
.lk-device-main { flex: 1; min-width: 0; }
.lk-device-main .lk-tx-date { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Степпер количества: "−  7 устройств  +" */
.lk-stepper { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 18px; }
.lk-step {
    width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0; cursor: pointer;
    font: inherit; font-size: 1.6rem; line-height: 1; color: var(--text-primary);
    background: var(--surface-strong); border: 1px solid var(--border);
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}
.lk-step:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.lk-step:active:not(:disabled) { transform: scale(0.94); }
.lk-step:disabled { opacity: 0.35; cursor: default; }
.lk-step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lk-step-value { min-width: 120px; text-align: center; display: flex; flex-direction: column; }
.lk-step-value b { font-size: 2.2rem; font-weight: 800; color: var(--text-primary); line-height: 1.1; font-variant-numeric: tabular-nums; }
.lk-step-value span { font-size: 0.82rem; color: var(--text-muted); }

.lk-limit-tail { transition: opacity 0.15s ease; }
.lk-limit-tail.lk-pending .lk-sum b { opacity: 0.45; }
/* Строка-пояснение всегда занимает место (даже пустая) — высота блока
   одинаковая во всех состояниях, страница не дёргается. */
.lk-limit-note { min-height: 1.5em; font-size: 0.86rem; color: var(--text-muted); margin-top: 6px; }

/* Поддержка */
.lk-ticket {
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    padding: 14px 12px; margin: 0 -12px; border-radius: 10px;
    text-decoration: none; transition: background-color 0.15s ease;
}
.lk-ticket + .lk-ticket { border-top: 1px solid var(--border); }
.lk-ticket:hover { background: var(--surface-strong); }
.lk-ticket:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lk-ticket-main { min-width: 0; }
/* Обращения сеткой плашек (раздел «Помощь»). */
.lk-section-label { margin-bottom: 10px; }
.lk-tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
@media (max-width: 760px) { .lk-tickets { grid-template-columns: 1fr; gap: 12px; } }
.lk-ticket-tile { display: flex; flex-direction: column; gap: 8px; padding: 18px; text-decoration: none; color: var(--text-primary); min-width: 0; }
.lk-ticket-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lk-ticket-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lk-ticket-top .lk-tx-date { white-space: nowrap; }
.lk-ticket-tile .lk-ticket-title { line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lk-ticket-last { color: var(--text-muted); font-size: 0.86rem; line-height: 1.4; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Статусы обращений — сплошные цвета, белый текст (владелец). */
.lk-badge.lk-tbadge { color: #fff; }
.lk-tbadge.blue { background: #2563eb; }
.lk-tbadge.red { background: #dc2626; }
.lk-tbadge.yellow { background: #ca8a04; }
.lk-tbadge.grey { background: #52525b; }
.lk-ticket-title { color: var(--text-primary); font-weight: 600; }
.lk-ticket .lk-tx-date { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Обращение — ровно на высоту экрана: заголовок сверху, переписка
   занимает всё оставшееся место и прокручивается сама, поле ответа
   всегда видно внизу — листать страницу до кнопки "Отправить" не нужно.
   164px = отступы body (104 сверху под шапку + 60 снизу); на телефоне
   76 сверху + 96 под нижнюю панель + "домашний индикатор". На совсем
   низких окнах — не меньше 460px, тогда уже листается вся страница. */
.lk-ticket-view { display: flex; flex-direction: column; height: calc(100vh - 164px); height: calc(100dvh - 164px); min-height: 460px; }
.lk-ticket-view .lk-hello { margin-bottom: 16px; }
.lk-ticket-view .back-link { margin-bottom: 12px; }
.lk-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.lk-thread {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column; gap: 12px;
    overflow-y: auto; overscroll-behavior: contain;
    padding-right: 6px; margin-right: -6px;
}
.lk-thread > .lk-msg:first-child { margin-top: auto; } /* мало сообщений — прижаты к низу, у поля ответа */
.lk-reply { display: flex; gap: 10px; align-items: flex-end; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.lk-reply textarea {
    flex: 1; min-width: 0; height: 46px; min-height: 46px; max-height: 160px; padding: 11px 14px;
    /* line-height ПОСЛЕ font: шорткат font сбрасывает его на унаследованные
       1.6 — пустое поле было на 2px выше своего окна и прокручивалось. */
    font: inherit; font-size: 0.93rem; line-height: 1.4; color: var(--text-primary);
    overflow-y: hidden; /* прокрутка — только когда текст упёрся в max-height (JS) */
    background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border); border-radius: 10px; outline: none;
}
.lk-reply textarea:focus { border-color: var(--accent); }
.lk-reply .btn { flex-shrink: 0; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; }
.lk-reply .btn svg { margin-right: 8px; }
@media (max-width: 480px) {
    /* На телефоне — только иконка, поле ответа получает ширину. */
    .lk-reply .btn { width: 46px; padding: 0; }
    .lk-reply .btn svg { margin: 0; width: 20px; height: 20px; }
    .lk-reply-label { display: none; }
}
.lk-chat .error-msg { margin-top: 8px; }
@media (max-width: 1079px) {
    .lk-ticket-view { height: calc(100vh - 104px - 96px - env(safe-area-inset-bottom)); height: calc(100dvh - 104px - 96px - env(safe-area-inset-bottom)); min-height: 400px; }
}
@media (max-width: 480px) {
    .lk-ticket-view { height: calc(100dvh - 76px - 96px - env(safe-area-inset-bottom)); }
    .lk-ticket-view h1 { font-size: 1.35rem; }
}
.lk-msg { max-width: 80%; align-self: flex-end; padding: 10px 14px; border-radius: 14px 14px 4px 14px; background: rgba(20, 184, 166, 0.16); border: 1px solid rgba(20, 184, 166, 0.3); }
.lk-msg.admin { align-self: flex-start; border-radius: 14px 14px 14px 4px; background: var(--surface-strong); border-color: var(--border); }
.lk-msg-meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 3px; }
.lk-msg-text { color: var(--text-primary); white-space: pre-wrap; word-break: break-word; font-size: 0.93rem; }
.lk-msg-media { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }
@media (max-width: 480px) {
    .lk-msg { max-width: 92%; }
}

/* Тарифы — по два в ряд (на телефоне по одному). Карточки в ряду одной
   высоты, сроки/кнопка прижаты к низу — стоят на одной линии. */
.lk-tariff-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 760px) {
    .lk-tariff-grid { grid-template-columns: minmax(0, 1fr); }
}
.lk-tariff { display: flex; flex-direction: column; }
.lk-tariff-actions { margin-top: auto; }
.lk-tariff-actions .lk-actions { margin-top: 0; }
/* Сроки — плитки равной ширины, по возможности все в одну строку. */
.lk-tariff-actions .lk-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }
.lk-tariff-actions .lk-chips .lk-choice { padding: 10px 12px; }

/* Тарифы — облегчённая версия карточек главной (.tariff-card). */
.lk-tariff { position: relative; }
.lk-tariff.current { border-color: rgba(20, 184, 166, 0.5); }
.lk-tariff-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.lk-tariff-name { font-size: 1.25rem; color: var(--text-primary); font-weight: 700; line-height: 1.25; }
.lk-tariff-desc { color: var(--text-muted); font-size: 0.9rem; margin-top: 6px; }
.lk-tariff-features { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }

.lk-link-box { display: flex; gap: 8px; }
.lk-link-box input {
    flex: 1; min-width: 0; padding: 11px 12px; font: inherit; font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.25); color: var(--text-primary);
    border: 1px solid var(--border); border-radius: 10px;
}
.lk-qr { display: flex; justify-content: center; margin: 16px 0 4px; }
.lk-qr img { width: 220px; height: 220px; border-radius: 12px; background: #fff; padding: 10px; image-rendering: pixelated; }

.lk-tx { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.lk-tx:last-child { border-bottom: none; }
.lk-tx-desc { color: var(--text-primary); font-size: 0.92rem; }
.lk-tx-date { color: var(--text-muted); font-size: 0.8rem; }
.lk-tx-amount { font-weight: 700; white-space: nowrap; color: var(--text-primary); }
.lk-tx-amount.plus { color: var(--success); }

.lk-empty { text-align: center; padding: 26px 10px; color: var(--text-muted); }

/* Профиль */
.lk-avatar {
    width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0;
    background: var(--surface-strong); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; font-weight: 800;
}
.lk-kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; margin-top: 18px; }
/* Строки разделены линией на всю ширину, как тумблеры уведомлений (.lk-notify-row) — владелец 2026-11-16. */
.lk-kv dt, .lk-kv dd { display: flex; align-items: center; min-width: 0; margin: 0; padding: 12px 0; border-top: 1px solid var(--border); }
.lk-kv dt:first-of-type, .lk-kv dd:first-of-type { border-top: 0; }
.lk-kv dt { color: var(--text-muted); font-size: 0.88rem; }
.lk-kv dd { padding-left: 16px; color: var(--text-primary); font-size: 0.92rem; overflow-wrap: anywhere; }

/* Вход — узкая карточка по центру, как окно входа на /app. */
/* Карточка входа — точно по центру области под шапкой: отступ body
   снизу равен воздуху над карточкой сверху (104px сверху = 64px шапки +
   40px → 40px снизу; на телефоне 76px = 56px шапки + 20px → 20px), а
   обёртка занимает всю оставшуюся высоту. Нижней панели разделов на
   экране входа нет — её отступ (96px) тут не нужен. */
body.lk-auth-mode { padding-bottom: 40px; }
/* Столбиком: форма, под ней строка документов (на узких экранах). В ряд
   документы вставали справа и сжимали форму в узкую колонку. */
.lk-auth-wrap { min-height: calc(100vh - 144px); min-height: calc(100dvh - 144px); display: flex; flex-direction: column; align-items: center; justify-content: center; }
@media (max-width: 480px) {
    body.lk-auth-mode { padding-bottom: 20px; }
    .lk-auth-wrap { min-height: calc(100vh - 96px); min-height: calc(100dvh - 96px); }
}
.lk-auth { width: 100%; max-width: 420px; text-align: center; }
.lk-auth .field { text-align: left; }
.lk-auth h1 { font-size: 1.5rem; margin-bottom: 6px; }
.lk-auth-divider { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.78rem; margin: 18px 0; }
.lk-auth-divider::before, .lk-auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.lk-auth-switch { display: flex; justify-content: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.lk-linkbtn { background: none; border: none; color: var(--text-muted); font: inherit; font-size: 0.86rem; cursor: pointer; padding: 6px 2px; }
.lk-linkbtn:hover, .lk-linkbtn:focus-visible { color: var(--accent); }
.lk-tg-wait { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-muted); font-size: 0.88rem; margin-top: 12px; }
.lk-tg-wait .spinner { width: 18px; height: 18px; border-width: 2px; margin: 0; }
.btn svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }

.lk-note { font-size: 0.86rem; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.lk-note b { color: var(--text-secondary); }
.lk-ok { color: var(--success); }

/* Свои модалки кабинета (подключение, продление, покупка) — общий
   .user-modal-overlay.hk-anim-overlay + анимация из dialog.js, только
   шире стандартных 420px. */
.user-modal.lk-modal { max-width: 520px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; }
.user-modal.lk-modal { transition: max-width 0.38s cubic-bezier(0.22, 1, 0.36, 1), transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.16s ease; }
/* 520 (обычное окно) + 18 промежуток + ~560 под скидки. */
@media (min-width: 761px) { .user-modal.lk-modal.lk-modal-wide { max-width: min(1100px, calc(100vw - 40px)); } }
/* Непрозрачная подложка под полупрозрачным --surface-strong: на
   телефонах/тач общий theme.css снимает блюр с .card, и без неё сквозь
   окно читалась страница под ним. "body .user-modal.lk-modal" — чтобы
   перебить тот же "body .card" из theme.css. */
/* Общий диалог dialog.js (hkAlert/hkConfirm): отступы — общие из
   components.css, здесь только текст и подложка кабинета. */
#hk-dialog-modal #hk-dialog-message { font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 0; }
#hk-dialog-modal .btn-row { margin-top: 20px; }
body #hk-dialog-modal { background: linear-gradient(var(--surface-strong), var(--surface-strong)), var(--background); }
body .user-modal.lk-modal { background: linear-gradient(var(--surface-strong), var(--surface-strong)), var(--background); }
.lk-sum { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 0.92rem; }
.lk-sum b { color: var(--text-primary); }

/* Смена раздела (route): старый гаснет (.lk-leaving, 0,13 с), новый
   проявляется со сдвигом снизу (.lk-fade, 0,26 с). Дробная opacity у
   ПРЕДКА .card с backdrop-filter отключает размытие под плашкой (фон
   берётся только из предка, там пусто) — раньше на время анимации блюр
   у плашек просто выключали, но под чётким «созвездием» это видно
   (репорт владельца 2026-11-16). Теперь сам .lk-view только сдвигается,
   а проявляются по отдельности плашки (своя opacity блюру не мешает) и
   блоки без плашек внутри. .lk-fade снимается по animationend .lk-view.
   Экран входа (.lk-auth.lk-fade) — сама плашка, не предок: ей можно. */
.lk-fade { animation: lkFade 0.26s cubic-bezier(0.22, 1, 0.36, 1) both; }
.lk-view.lk-fade { animation: lkSlide 0.26s cubic-bezier(0.22, 1, 0.36, 1) both; }
.lk-view.lk-fade .card:not(.card .card), .lk-view.lk-fade > :not(.card):not(:has(.card)) { animation: lkFadeIn 0.26s ease both; }
.lk-view.lk-leaving { animation: lkLeaveSlide 0.13s ease both; pointer-events: none; }
.lk-view.lk-leaving .card:not(.card .card), .lk-view.lk-leaving > :not(.card):not(:has(.card)) { animation: lkFadeOut 0.13s ease both; }
@keyframes lkFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes lkSlide { from { transform: translateY(10px); } to { transform: none; } }
@keyframes lkFadeIn { from { opacity: 0; } }
@keyframes lkLeaveSlide { to { transform: translateY(-4px); } }
@keyframes lkFadeOut { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .lk-fade, .lk-view.lk-leaving, .lk-view.lk-fade *, .lk-view.lk-leaving * { animation: none; }
}

/* Карточка баланса — как BalanceHeroCard в приложении (redesign-2.0):
   градиент бирюза -> морская волна -> фиолет, радиус 28, без обводки.
   По нему плавают три пятна по эллиптическим орбитам (как в Compose:
   центр ± 55% ширины по X и ± 65% высоты по Y) с разными периодами —
   циан 9 с, розовое 14 с в обратную сторону, бирюза 11 с. Орбита
   собрана из двух гармоник: <i> качает X, вложенный <u> — Y со сдвигом
   на четверть периода (ease-in-out alternate ≈ синусоида). Само пятно —
   квадрат со стороной в ширину карточки (u::before), центрируется
   свойством translate, а анимация идёт в transform, они не мешают
   друг другу. ".lk-hero" в селекторе фона — чтобы мобильное
   "body .card" (theme.css) его не перебило. */
body .card.lk-hero {
    position: relative; overflow: hidden; isolation: isolate;
    padding: 23px;
    border-radius: var(--lk-radius);
    background: var(--hero-gradient);
    /* Не "transparent": под прозрачной рамкой просвечивал базовый
       градиент, а пятна (overflow:hidden режет по padding-box) до неё не
       доходят — по краю была видна синяя каёмка. */
    border: 0;
    box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.6);
}
.lk-hero > :not(.lk-hero-fx) { position: relative; z-index: 1; }
.lk-hero-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.lk-hero-fx i, .lk-hero-fx u { position: absolute; inset: 0; will-change: transform; }
.lk-hero-fx i { --t: 9s; --d: 0s; animation: lkOrbX calc(var(--t) / 2) ease-in-out var(--d) infinite alternate; }
.lk-hero-fx u { animation: lkOrbY calc(var(--t) / 2) ease-in-out calc(var(--d) - var(--t) / 4) infinite alternate; }
.lk-hero-fx u::before {
    content: ''; position: absolute; left: 50%; top: 50%;
    width: var(--r); aspect-ratio: 1; translate: -50% -50%;
    background: radial-gradient(circle closest-side, var(--c), transparent);
}
.lk-hero-fx i:nth-child(1) { --t: 9s; --d: 0s; }
.lk-hero-fx i:nth-child(1) u::before { --c: rgba(34, 211, 238, 0.75); --r: 120%; }
.lk-hero-fx i:nth-child(2) { --t: 14s; --d: -3s; animation-direction: alternate-reverse; }
.lk-hero-fx i:nth-child(2) u::before { --c: rgba(244, 114, 182, 0.55); --r: 110%; }
.lk-hero-fx i:nth-child(3) { --t: 11s; --d: -6s; }
.lk-hero-fx i:nth-child(3) u::before { --c: rgba(20, 184, 166, 0.70); --r: 115%; }
@keyframes lkOrbX { from { transform: translateX(-55%); } to { transform: translateX(55%); } }
@keyframes lkOrbY { from { transform: translateY(-65%); } to { transform: translateY(65%); } }
@media (prefers-reduced-motion: reduce) {
    .lk-hero-fx i, .lk-hero-fx u { animation: none; }
}
.lk-hero-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: rgba(255, 255, 255, 0.82); font-weight: 800; font-size: 1rem; }
.lk-hero-head svg { width: 22px; height: 22px; color: #fff; flex-shrink: 0; }
.lk-hero-sum { margin-top: 6px; font-size: 2.3rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.5px; color: #fff; }
.lk-hero .lk-actions { padding-top: 16px; }
/* Тёмная кнопка на градиенте (как "Быстрое пополнение"): высота 50,
   радиус 17, белый жирный текст и иконка. */
.lk-hero-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; min-height: 50px; padding: 0 16px; border-radius: 17px;
    background: var(--on-accent); color: #fff; text-decoration: none;
    font-weight: 800; font-size: 0.98rem;
    transition: background-color 0.15s ease, transform 0.12s ease;
}
.lk-hero-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.lk-hero-btn:hover { background: #0a262a; }
.lk-hero-btn:active { transform: scale(0.98); }
.lk-hero-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Вход через Telegram — фирменная синяя кнопка, белый текст, заполненный
   самолётик. */
.btn-telegram { background: #2aabee; border-color: transparent; color: #fff; box-shadow: 0 8px 24px -8px rgba(42, 171, 238, 0.55); text-decoration: none; }
.btn-telegram:hover { background: #229ed9; border-color: transparent; color: #fff; }
.btn-telegram svg { width: 20px; height: 20px; vertical-align: -4px; margin-right: 8px; }

/* Плашки документов (docsBannersHtml): три в ряд, на телефоне — столбиком. */
.lk-docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .lk-docs { grid-template-columns: 1fr; gap: 12px; } }
.lk-doc {
    display: flex; align-items: center; gap: 14px; padding: 16px 18px;
    text-decoration: none; color: var(--text-primary);
}
.lk-doc:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lk-doc-icon {
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 14px;
    background: rgba(20, 184, 166, 0.14); color: var(--accent);
}
.lk-doc-icon svg { width: 22px; height: 22px; }
.lk-doc-text { display: flex; flex-direction: column; min-width: 0; }
.lk-doc-text b { font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.lk-doc-text small { color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }

/* Плашки кабинета: одно закругление у всех (баланс был 28, остальные 12 —
   владелец попросил среднее) и плавный подъём при наведении, как у
   кнопок. Только там, где есть мышь: на телефоне :hover залипает после
   касания. Модалки (.lk-modal) — вне .lk-view, их не трогает. */
.lk { --lk-radius: 20px; }
.lk-view .card { border-radius: var(--lk-radius); transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease, box-shadow 0.22s ease; }
@media (hover: hover) {
    .lk-view .card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.18); }
    .lk-view .card:not(.lk-hero):hover { box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.7); }
}
@media (prefers-reduced-motion: reduce) {
    .lk-view .card:hover { transform: none; }
}

/* Локации, куда привела "Локации" с главной, — двойная подсветка. */
.lk-flash { animation: lkFlash 1.6s ease-in-out; }
@keyframes lkFlash {
    0%, 50%, 100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0); border-color: var(--border); }
    25%, 75% { box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.55), 0 0 28px rgba(34, 211, 238, 0.35); border-color: var(--accent); }
}

.lk-chip {
    display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
    background: var(--surface-strong); border: 1px solid var(--border);
    color: var(--text-primary); font-size: 0.85rem; font-weight: 600;
}

/* Дорожка промогрупп (openGroups): шаги сверху вниз, линия слева,
   пройденные — с закрашенной точкой, своя — с подсветкой. Скидки по
   шагам — по кнопке "Подробнее о скидках". */
.lk-road { list-style: none; margin: 0 0 4px; padding: 0; }
.lk-road-step { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.lk-road-step:last-child { padding-bottom: 6px; }
.lk-road-step::before { content: ''; position: absolute; left: 8px; top: 20px; bottom: -2px; width: 2px; background: var(--border); }
.lk-road-step:last-child::before { display: none; }
.lk-road-step.done::before { background: rgba(20, 184, 166, 0.5); }
.lk-road-dot { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--border); background: var(--background); }
.lk-road-step.done .lk-road-dot { border-color: transparent; background: var(--accent-gradient); }
.lk-road-step.mine .lk-road-dot { box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.25); }
.lk-road-main { min-width: 0; flex: 1; }
.lk-road-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lk-road-head b { color: var(--text-primary); }
.lk-road-step:not(.done) .lk-road-head b { color: var(--text-secondary); }
.lk-road-disc { display: none; flex-direction: column; gap: 6px; margin-top: 8px; }
.lk-road-disc .lk-chips { gap: 6px; }
.lk-road-open .lk-road-disc { display: flex; }
.lk-road-disc .lk-chip { font-size: 0.78rem; padding: 4px 10px; }
.lk-road-open .lk-road-disc { animation: lkDiscIn 0.25s ease both; }
@keyframes lkDiscIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
/* Широкое окно: имя, бейдж и порог слева колонкой РОВНО прежней ширины
   (окно 520 − поля 2×22 − точка 18 − промежуток 14 = 444px), чтобы при
   раскрытии ничего не переносилось; скидки — справа в той же строке. */
@media (min-width: 761px) {
    .lk-road-open .lk-road-main { display: grid; grid-template-columns: 444px minmax(0, 1fr); column-gap: 18px; align-items: center; }
    /* Две строки по 20px + 4px = 44px — не выше блока слева. */
    .lk-road-open .lk-road-disc { margin-top: 0; gap: 4px; }
    .lk-road-open .lk-road-disc .lk-chips { gap: 5px; flex-wrap: nowrap; }
    .lk-road-open .lk-road-disc .lk-chip { font-size: 0.72rem; padding: 0 8px; line-height: 18px; white-space: nowrap; }
}
.lk-actions > .lk-link-box { flex: 1 1 100%; min-width: 0; }
/* Кнопка копирования — по своему тексту, поле забирает остальное (общее
   ".lk-actions .btn { flex: 1 1 160px }" растягивало кнопку шире ссылки). */
.lk-actions .lk-link-box .btn { flex: 0 0 auto; }
.lk-actions .lk-link-box input { flex: 1 1 auto; min-width: 0; }

/* Знак "!" в углу «Помощи» (setHelpAlert): поддержка ответила, тикет не
   закрыт. Белый на красном, в правом верхнем углу пункта меню. */
.lk-alert-dot {
    display: none; position: absolute; top: -3px; right: -3px;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--danger); color: #fff; box-shadow: 0 0 0 2px var(--background);
    font-size: 11px; font-weight: 800; line-height: 16px; text-align: center; font-style: normal;
    pointer-events: none;
}
.lk-alert .lk-alert-dot { display: block; }
.lk-nav-icon { position: relative; }
.lk-hnav-item .lk-alert-dot { top: 2px; right: 2px; }
.lk-nav-icon .lk-alert-dot { top: -2px; right: 6px; }

/* Флаги локаций (flagEmoji): шрифт только на региональные индикаторы
   (unicode-range) — остальной текст им не задевается. Локально, без CDN. */
@font-face {
    font-family: "Twemoji Country Flags";
    unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
    src: url('/lk/vendor/TwemojiCountryFlags.woff2') format('woff2');
    font-display: swap;
}
.lk-flag { font-family: "Twemoji Country Flags", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-weight: 400; line-height: 1; }
.lk-chip .lk-flag { margin-right: 6px; font-size: 1.05em; }
.lk-status-name .lk-flag { margin-right: 8px; font-size: 1.1em; }
/* Каждый флаг — свой span, между ними gap (letter-spacing на эмодзи не работал). */
.lk-flags { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; font-size: 1.05em; }

/* Плашка «Тарифы» в «Подписке» — выделена как рекомендуемый тариф на
   главной сайта: непрозрачный тёмный фон с лёгким оттенком и
   градиентная рамка 2px. Рамка — ::before-кольцо (маска) ровно по краю
   карточки (inset 0, тот же радиус), своей рамки у карточки нет — так
   внешний и внутренний контуры концентричны. backdrop-filter выключен:
   размытая подложка на скруглениях давала светлую бахрому за рамкой. */
.lk-view .card.lk-tariffs-cta {
    position: relative;
    border: 0; padding: 25px; /* 24 + бывшая рамка 1px — размер прежний (кольцо 2px рисуется поверх края, внутрь) */
    backdrop-filter: none; -webkit-backdrop-filter: none;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.14), rgba(124, 92, 255, 0.12)), var(--background);
}
.lk-tariffs-cta::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 2px; /* 2px — на 1px углы выглядели жидко */
    background: var(--accent-gradient); pointer-events: none;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.lk-tariffs-cta-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.lk-tariffs-cta-head .card-label { margin-bottom: 2px; }

/* Скоро конец подписки (expiryLevel): цветная обводка карточки. В конце
   файла — чтобы общий :hover плашек (рамка/тень) её не перебивал. */
.lk-view .card.lk-expiring.warn, .lk-view .card.lk-expiring.warn:hover { border-color: rgba(251, 191, 36, 0.7); box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.35), 0 10px 30px -14px rgba(251, 191, 36, 0.45); }
.lk-view .card.lk-expiring.bad, .lk-view .card.lk-expiring.bad:hover { border-color: rgba(255, 90, 90, 0.75); box-shadow: 0 0 0 1px rgba(255, 90, 90, 0.4), 0 10px 30px -14px rgba(255, 90, 90, 0.5); }

/* Скрытая ссылка подписки с глазиком внутри поля (subLinkHtml). */
.lk-secret { position: relative; flex: 1 1 auto; min-width: 0; display: flex; }
.lk-secret input { flex: 1 1 auto; min-width: 0; padding-right: 44px; }
.lk-eye {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 8px; background: none; color: var(--text-muted); cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.lk-eye:hover { color: var(--text-primary); background: var(--surface-strong); }
.lk-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.lk-eye svg { width: 20px; height: 20px; }
@media (max-width: 480px) { .lk .lk-link-box .lk-secret { flex: 1 1 100%; } }
.lk-secret input.lk-masked { color: var(--text-muted); letter-spacing: 1px; } /* скрытая ссылка — серые точки */

/* Настройки → Уведомления: тумблер на всю строку (как автопродление),
   под ним — выбор срока/порога, пока тумблер выключен — приглушён. */
.lk-notify { display: flex; flex-direction: column; }
.lk-notify-row { padding: 12px 0; }
.lk-notify-row + .lk-notify-row { border-top: 1px solid var(--border); }
.lk-notify-sub { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 0.85rem; color: var(--text-muted); transition: opacity 0.15s ease; }
.lk-notify-sub.off { opacity: 0.45; }
.lk-notify-sub select { padding: 6px 30px 6px 10px; font-size: 0.85rem; font-weight: 600; background-color: rgba(0, 0, 0, 0.25); background-position: right 10px center; }
.lk-notify-status { min-height: 1.3em; margin-top: auto; padding-top: 8px; font-size: 0.82rem; color: var(--accent); }

/* Настройки → Способы входа: строка = иконка, название + статус, кнопки. */
.lk-provs { display: flex; flex-direction: column; }
.lk-prov { display: flex; align-items: center; gap: 14px; padding: 14px 0; }
.lk-prov + .lk-prov { border-top: 1px solid var(--border); }
.lk-prov-icon {
    width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; color: #fff;
}
.lk-prov-icon svg { width: 22px; height: 22px; }
.lk-prov-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lk-prov-main b { color: var(--text-primary); font-weight: 700; }
.lk-prov-main small { color: var(--text-muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.lk-prov-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.lk-warn-text { color: #fbbf24; }
@media (max-width: 760px) {
    .lk-prov { flex-wrap: wrap; }
    .lk-prov-actions { width: 100%; justify-content: flex-start; padding-left: 58px; }
}

/* Настройки → Аккаунт: строки разнесены на равные расстояния по всей
   высоте плашки (она тянется по соседней «Уведомлениям»). */
/* space-evenly — тот же промежуток и от профиля сверху, и до кнопки
   снизу; свои отступы списка/кнопки и row-gap обнулены, чтобы не
   добавлялись к нему. */
.lk-card-col > .lk-kv-fill { flex: 1; align-content: stretch; margin: 0; padding: 4px 0; }
.lk-card-col > .lk-kv-fill + .lk-actions { margin-top: 0; padding-top: 0; }

/* Экран входа: документы. В шапке (≥1080px) — на месте меню разделов
   (.lk-hnav-docs, без пилюли-выделения); уже — строкой под формой. */
.lk-auth-docs { display: none; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 18px; width: 100%; max-width: 420px; }
.lk-auth-docs a { color: var(--text-muted); font-size: 0.85rem; text-decoration: none; }
.lk-auth-docs a:hover { color: var(--text-primary); text-decoration: underline; }
@media (max-width: 1079px) { .lk-auth-docs { display: flex; } }

/* Колокольчик в шапке (bellButtonHtml/openBell в lk.js): квадрат той же
   высоты и того же стекла, что меню разделов; на телефоне — справа в
   шапке, где меню нет. Красный счётчик — непрочитанное. */
.site-header-inner .lk-hnav { margin-left: auto; }
.lk-bell, .lk-burger {
    position: relative; flex-shrink: 0; margin-left: -6px;
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.lk-bell svg, .lk-burger svg { width: 20px; height: 20px; }
.lk-bell:hover, .lk-bell[aria-expanded="true"], .lk-burger:hover, .lk-burger[aria-expanded="true"] { color: var(--text-primary); background: var(--surface-strong); }
/* Меню «три полоски» — справа от колокольчика; подсвечено, когда открыт его раздел (новости, информация). */
.site-header-inner .lk-burger { margin-left: -10px; } /* вплотную к колокольчику: 16px gap шапки − 10 = 6px */
.lk-burger.active { color: var(--accent); }
.lk-bell.has-unread { color: var(--text-primary); }
.lk-bell:focus-visible, .lk-burger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lk-bell:active svg, .lk-burger:active svg { transform: scale(0.9); }
.lk-bell-count {
    display: none; position: absolute; top: -6px; right: -6px;
    min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
    background: var(--danger); color: #fff; box-shadow: 0 0 0 2px var(--background);
    font-size: 11px; font-weight: 800; line-height: 20px; text-align: center;
}
.lk-bell.has-unread .lk-bell-count { display: block; }
.lk-bell-ring svg { animation: lkRing 0.7s ease; transform-origin: 50% 3px; }
@keyframes lkRing { 0%, 100% { transform: none; } 20% { transform: rotate(16deg); } 40% { transform: rotate(-14deg); } 60% { transform: rotate(9deg); } 80% { transform: rotate(-5deg); } }
@media (max-width: 1079px) { .lk-bell { margin-left: auto; } }
@media (max-width: 480px) {
    .lk-bell svg, .lk-burger svg { width: 19px; height: 19px; }
}

/* Окно уведомлений — в <body> (из шапки position:fixed не работает),
   место считает positionBell. Фон непрозрачный: поверх контента. */
.lk-bell-panel, .lk-menu-panel {
    position: fixed; z-index: 70; width: 400px; max-width: calc(100vw - 24px);
    display: flex; flex-direction: column; padding: 0; overflow: hidden;
    background: #0d1012; border: 1px solid var(--border); border-radius: 16px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: none; -webkit-backdrop-filter: none;
    opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.97); transform-origin: top right;
    transition: opacity 0.14s ease, transform 0.14s ease, visibility 0s linear 0.14s;
}
.lk-bell-panel.open, .lk-menu-panel.open {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
}
@media (max-width: 760px) { .lk-bell-panel, .lk-menu-panel { width: auto; max-width: none; } }
/* На телефонах theme.css даёт всем карточкам «body .card { background: --surface-strong }» (полупрозрачный,
   вместо блюра) — у окон, которые лежат поверх страницы, фон должен остаться сплошным (живой репорт). */
body .lk-bell-panel.card, body .lk-menu-panel.card { background: #0d1012; }
@media (prefers-reduced-motion: reduce) { .lk-bell-panel, .lk-bell-panel.open, .lk-menu-panel, .lk-menu-panel.open { transition: none; } .lk-bell-ring svg { animation: none; } }
.lk-bell-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--border); }
.lk-bell-head h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.lk-bell-readall { background: none; border: 0; padding: 4px 0; color: var(--accent); font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; }
.lk-bell-readall:disabled { color: var(--text-muted); opacity: 0.6; cursor: default; }
.lk-bell-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px; }
.lk-bell-list .loading-state { padding: 28px 0; }
.lk-bell-item { position: relative; display: flex; gap: 12px; padding: 12px; border-radius: 12px; transition: background-color 0.15s ease; }
.lk-bell-item + .lk-bell-item { margin-top: 2px; }
.lk-bell-item.clickable { cursor: pointer; }
.lk-bell-item.clickable:hover { background: var(--surface); }
.lk-bell-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lk-bell-item.unread { background: rgba(20, 184, 166, 0.07); }
.lk-bell-item.unread.clickable:hover { background: rgba(20, 184, 166, 0.11); }
.lk-bell-ico { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.lk-bell-ico svg { width: 19px; height: 19px; }
.lk-bell-ico.tone-ok { color: var(--accent-hover); background: rgba(20, 184, 166, 0.14); }
.lk-bell-ico.tone-warn { color: #fbbf24; background: rgba(251, 191, 36, 0.14); }
.lk-bell-ico.tone-bad { color: var(--danger); background: rgba(255, 90, 90, 0.14); }
.lk-bell-ico.tone-info { color: var(--text-secondary); background: var(--surface-strong); }
.lk-bell-main { flex: 1 1 auto; min-width: 0; }
.lk-bell-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.lk-bell-title b { font-size: 0.92rem; font-weight: 700; color: var(--text-primary); line-height: 1.35; }
.lk-bell-item.unread .lk-bell-title b::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-radius: 50%; background: var(--accent); vertical-align: 2px; }
.lk-bell-title time { flex-shrink: 0; font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.lk-bell-main > p { margin-top: 3px; font-size: 0.85rem; color: var(--text-muted); line-height: 1.45; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lk-bell-main > p.error-msg { display: none; -webkit-line-clamp: unset; }
.lk-bell-act { margin-top: 10px; padding: 8px 14px; font-size: 0.85rem; }
.lk-bell-item:has(.lk-bell-x) .lk-bell-main { padding-right: 22px; }
.lk-bell-x {
    position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: 0; color: var(--text-muted); cursor: pointer;
}
.lk-bell-x svg { width: 16px; height: 16px; }
.lk-bell-x:hover { color: var(--text-primary); background: var(--surface-strong); }
.lk-bell-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 0; color: var(--text-muted); }
.lk-bell-empty svg { width: 34px; height: 34px; opacity: 0.6; }
.lk-bell-foot { display: flex; align-items: center; gap: 12px; padding: 12px 18px 14px; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }
.lk-bell-foot span { flex: 1 1 auto; }
.lk-bell-foot .btn { flex-shrink: 0; padding: 8px 14px; font-size: 0.85rem; }
.lk-news-text { margin-top: 12px; white-space: pre-line; color: var(--text-secondary); line-height: 1.55; }


/* ── Меню «три полоски» (окно — общее с колокольчиком, выше) ───────
   Во всю ширину экрана, как шапка, вплотную под ней (top ставит positionMenu) и выезжает из неё:
   раскрывается сверху вниз (clip-path), содержимое съезжает следом. Содержимое — по ширине шапки
   (.lk-menu-inner = .site-header-inner): слева «Новости» и последняя новость, справа все разделы
   в две колонки, внизу «Выйти из аккаунта». На телефоне — одной колонкой. Владелец 2026-11-16. */
.lk-menu-panel {
    left: 0; right: 0; width: auto; max-width: none;
    border: 0; border-bottom: 1px solid var(--border); border-radius: 0;
    box-shadow: 0 28px 48px rgba(0, 0, 0, 0.45);
    opacity: 1; transform: none; clip-path: inset(0 0 100% 0);
    transition: clip-path 0.2s cubic-bezier(0.4, 0, 1, 1), visibility 0s linear 0.2s;
}
.lk-menu-panel.open {
    transform: none; clip-path: inset(0 0 -80px 0); /* −80px — чтобы не срезать тень снизу */
    transition: clip-path 0.36s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
}
@media (min-width: 761px) {
    /* Тот же стеклянный фон, что у шапки, — продолжение шапки. На телефоне — сплошной (правило выше). */
    body .lk-menu-panel.card { background: var(--header-glass); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); }
}
.lk-menu-inner {
    display: flex; flex-direction: column; width: 100%; max-width: 1200px; min-height: 0; margin: 0 auto; padding: 0 20px;
    opacity: 0; transform: translateY(-14px); transition: opacity 0.16s ease, transform 0.2s ease;
}
.lk-menu-panel.open .lk-menu-inner { opacity: 1; transform: none; transition: opacity 0.26s ease 0.05s, transform 0.36s cubic-bezier(0.22, 1, 0.36, 1) 0.05s; }
@media (prefers-reduced-motion: reduce) { .lk-menu-panel, .lk-menu-panel.open, .lk-menu-inner, .lk-menu-panel.open .lk-menu-inner { transition: none; } }
.lk-menu-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px 16px; padding: 14px 0; overflow-y: auto; min-height: 0; }
.lk-menu-news { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lk-menu-latest {
    display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--border); text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.lk-menu-latest:hover, .lk-menu-latest:focus-visible { background: var(--surface-strong); border-color: var(--accent); outline: none; }
/* Обложка новости — миниатюрой слева (владелец 2026-11-16); нет обложки — только текст. */
.lk-menu-latest-img { width: 96px; height: 72px; flex-shrink: 0; object-fit: cover; border-radius: 10px; background: var(--surface-strong); }
.lk-menu-latest-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lk-menu-latest .lk-news-excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lk-menu-latest-empty { margin: 0 16px 8px; font-size: 0.85rem; }
.lk-menu-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 2px; }
.lk-menu-foot { display: flex; justify-content: flex-end; padding: 12px 0 14px; border-top: 1px solid var(--border); flex-shrink: 0; }
.lk-menu-logout { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; font-size: 0.9rem; }
.lk-menu-logout svg { width: 18px; height: 18px; }
@media (max-width: 760px) {
    .lk-menu-body { grid-template-columns: 1fr; }
    .lk-menu-list { grid-template-columns: 1fr; }
    .lk-menu-foot { justify-content: stretch; }
    .lk-menu-logout { width: 100%; justify-content: center; }
}
.lk-menu-item {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
    color: var(--text-secondary); text-decoration: none; transition: background-color 0.15s ease, color 0.15s ease;
}
.lk-menu-item:hover, .lk-menu-item:focus-visible { background: var(--surface-strong); color: var(--text-primary); outline: none; }
.lk-menu-item.active { color: var(--text-primary); background: var(--surface); }
.lk-menu-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--accent); }
.lk-menu-icon svg { width: 20px; height: 20px; }
.lk-menu-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lk-menu-text b { font-weight: 600; color: var(--text-primary); }
.lk-menu-text small { font-size: 0.8rem; color: var(--text-muted); }

/* ── Новости ─────────────────────────────────────────────────── */
.lk-news { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.lk-news-tile { display: flex; flex-direction: column; padding: 0; overflow: hidden; color: inherit; text-decoration: none; transition: transform 0.2s ease, border-color 0.2s ease; }
.lk-news-tile:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.22); }
.lk-news-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-strong); }
.lk-news-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; }
.lk-news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.lk-news-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-secondary); }
.lk-news-cat i { width: 8px; height: 8px; border-radius: 50%; }
.lk-news-title { font-weight: 700; color: var(--text-primary); line-height: 1.35; }
.lk-news-excerpt { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.5; }
.lk-article { padding: 0; overflow: hidden; margin-top: 12px; }
.lk-article-cover { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; background: var(--surface-strong); } /* целиком, без обрезки */
.lk-article-head { padding: 22px 24px 18px; }
.lk-article-head h1 { margin: 10px 0 0; font-size: 1.5rem; line-height: 1.25; }
.lk-article-body { padding: 22px 24px 26px; }
.lk-rich { color: var(--text-secondary); line-height: 1.65; overflow-wrap: anywhere; }
.lk-rich > :first-child { margin-top: 0; }
.lk-rich h2, .lk-rich h3, .lk-rich h4 { color: var(--text-primary); margin: 1.2em 0 0.5em; line-height: 1.3; }
.lk-rich h2 { font-size: 1.2rem; } .lk-rich h3 { font-size: 1.05rem; }
.lk-rich p { margin: 0 0 0.9em; }
.lk-rich ul, .lk-rich ol { margin: 0 0 0.9em; padding-left: 1.4em; }
.lk-rich li { margin-bottom: 0.3em; }
.lk-rich a { color: var(--accent); }
.lk-rich strong, .lk-rich b { color: var(--text-primary); }
.lk-rich blockquote { margin: 0 0 0.9em; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; }
.lk-rich code { padding: 1px 6px; border-radius: 6px; background: var(--surface-strong); font-size: 0.88em; }
.lk-rich img { max-width: 100%; height: auto; border-radius: 12px; }
.lk-rich table { width: 100%; border-collapse: collapse; margin: 0 0 0.9em; display: block; overflow-x: auto; }
.lk-rich th, .lk-rich td { padding: 6px 10px; border: 1px solid var(--border); text-align: left; }
@media (max-width: 600px) { .lk-article-head { padding: 18px 16px 14px; } .lk-article-body { padding: 18px 16px 20px; } .lk-article-head h1 { font-size: 1.25rem; } }
@media (prefers-reduced-motion: reduce) { .lk-news-tile { transition: none; } .lk-news-tile:hover { transform: none; } }

/* ── Информация и статусы ────────────────────────────────────── */
.lk-status { display: flex; flex-direction: column; margin-top: 12px; }
.lk-status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.lk-status-row:first-child { border-top: 0; }
.lk-status-name { color: var(--text-primary); font-weight: 500; }
.lk-status-badge { padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.lk-status-badge.ok { color: #86efac; background: rgba(34, 197, 94, 0.12); }
.lk-status-badge.down { color: #ff8a8a; background: rgba(255, 90, 90, 0.12); }
.lk-status-badge.unknown { color: var(--text-muted); background: var(--surface-strong); }
.lk-status-note { margin-top: 8px; font-size: 0.82rem; }
.lk-info-emoji { font-size: 1.15rem; line-height: 1; }


/* ── Объявления из админки (над разделом, на всех страницах кабинета) ── */
.lk-announce { display: flex; flex-direction: column; gap: 10px; }
.lk-announce:not(:empty) { margin-bottom: 18px; }
.lk-ann { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: #0d1012; line-height: 1.5; font-size: 0.92rem; color: var(--text-primary); }
.lk-ann-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lk-ann-text a { color: var(--accent); font-weight: 600; }
.lk-ann.tone-info { border-color: rgba(34, 211, 238, 0.4); background: rgba(34, 211, 238, 0.08); }
.lk-ann.tone-ok { border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.08); }
.lk-ann.tone-warn { border-color: rgba(251, 191, 36, 0.45); background: rgba(251, 191, 36, 0.08); }
.lk-ann.tone-danger { border-color: rgba(255, 90, 90, 0.45); background: rgba(255, 90, 90, 0.09); }
.lk-ann-close { flex-shrink: 0; display: inline-flex; padding: 2px; margin: -2px -4px 0 0; border: 0; border-radius: 8px; background: none; color: var(--text-muted); cursor: pointer; }
.lk-ann-close:hover { color: var(--text-primary); background: var(--surface-strong); }
.lk-ann-close svg { width: 18px; height: 18px; }

/* Заставка входа (hk-intro) поднимает прямых детей <body>: окна уведомлений и меню туда же
   добавляются при открытии — открытые во время заставки не должны въезжать с задержкой. */
html.hk-intro body > .lk-bell-panel, html.hk-intro body > .lk-menu-panel { animation: none; }

/* Отказ от подписки — неброская, но заметная кнопка под действиями подписки. */
.lk-cancel-sub { color: var(--danger); border-color: rgba(255, 90, 90, 0.35); }
.lk-cancel-sub:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
