/* mobile.css — overrides only (<=768px) */

/* =========================================================
   0) INDEX / HELLO / ACCOUNT — MAP
   ---------------------------------------------------------
   [A] GLOBAL (all pages)
       - header, drawer, generic mobile fixes
   [B] PAGE: / (index)
       - hero spacing, CTA layout, homepage-only tweaks
   [C] PAGE: /hello
       - link page layout + its tuners/controllers
   [D] PAGE: /account (later)
       - кабинет-only mobile tweaks
   ========================================================= */

/* =========================================================
   [A0] GLOBAL — ANTI HORIZONTAL SCROLL (iOS fix) (MOBILE ONLY)
   Причина: слой .page::before с width:100vw (style.css) на iOS может
   давать overflow и страницу начинает "скроллить вправо".
   ========================================================= */

@media (max-width: 768px) {

    /* 1) страховка от горизонтального скролла */
    html,
    body {
        width: 100%;
        overflow-x: hidden;
    }

    /* 2) режем X-оверфлоу внутри контейнера страницы */
    .page {
        overflow-x: clip;
    }

    /* 3) iOS-фикс для фонового слоя с линиями (убираем 100vw) */
    .page::before {
        left: 0;
        width: 100%;
        transform: none;
    }

    /* 4) медиа никогда не должны раздвигать вьюпорт */
    img,
    svg,
    video,
    canvas {
        max-width: 100%;
    }
}

@media (max-width: 768px) {

    /* убираем костыль со сдвигом бейджа, который есть в style.css на 420px */
    .tag {
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {

    /* "В разработке" в одну линию с логотипом */
    header {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .logo {
        width: auto;
    }

    .header-right {
        width: auto;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .header-right .account-link {
        display: none;
    }

    .header-right .tag {
        display: inline-flex;
        margin: 0;
        white-space: nowrap;
    }
}

/* ===== Mobile: перенос блока "Что уже умеет" вниз (ТОЛЬКО /index) ===== */

/* сам блок */
body[data-page="index"] .hero-card {
    order: 99;
    margin-top: 32px;
}

/* ===== Mobile Drawer (<=768px only) ===== */

/* ВАЖНО: JS на мобилке снимает hidden у .menu-btn,
   поэтому НЕ прячем её через display:none */
.menu-btn[hidden] {
    display: inline-flex !important;
}

.menu-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    /* минимализм: без квадрата */
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

/* аккуратный фокус (по желанию, но полезно) */
.menu-btn:focus-visible {
    outline: none;
}

.menu-icn {
    display: block;
    /* ← ВАЖНО: чтобы крестик стабильно появлялся */
    width: 18px;
    height: 2px;
    background: rgba(255, 255, 255, .75);
    border-radius: 999px;
    position: relative;
    transition: background .18s ease;
}

.menu-icn::before,
.menu-icn::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: rgba(255, 255, 255, .75);
    border-radius: 999px;
    transition: transform .18s ease, top .18s ease;
}

/* крестик, когда меню открыто */
.menu-btn[aria-expanded="true"] .menu-icn {
    background: transparent;
}

/* дефолтное положение линий */
.menu-icn::before {
    top: -6px;
}

.menu-icn::after {
    top: 6px;
}

/* крестик, когда меню открыто */
.menu-btn[aria-expanded="true"] .menu-icn {
    background: transparent;
}

.menu-btn[aria-expanded="true"] .menu-icn::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-btn[aria-expanded="true"] .menu-icn::after {
    top: 0;
    transform: rotate(-45deg);
}

/* фон-кликер (прозрачный, без затемнения) */
.drawer-backdrop {
    position: fixed;
    top: calc(var(--header-total-h) + 12vh);
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 40;

    pointer-events: none;
}

.drawer-backdrop.is-open {
    pointer-events: auto;
}

.drawer {
    position: fixed;
    top: calc(var(--header-total-h) + 3vh);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;

    background: #0b0e14;
    padding: 24px 16px 16px;
    overflow: auto;

    display: flex;
    flex-direction: column;

    /* CLOSED: меню спрятано снизу */
    transform: translateY(100%);
    transition: transform .59s cubic-bezier(.2, .9, .2, 1);
    will-change: transform;
    pointer-events: none;
}

/* OPEN: меню на месте */
.drawer.is-open {
    transform: translateY(0);
    pointer-events: auto;
}

.menu-overlay {
    background: transparent;
    backdrop-filter: none;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;

    width: 88%;
    max-width: 340px;
    height: 100vh;

    background: #0b0e14;
    /* сплошной, без затемнения экрана */
    box-shadow: 16px 0 32px rgba(0, 0, 0, 0.45);

    z-index: 50;
}

.drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 16px 4px;
    text-decoration: none;
    color: rgba(255, 255, 255, .78);

    border: none;
    background: transparent;
    border-radius: 0;

    border-bottom: 1px solid rgba(255, 255, 255, .08);

    /* типографика */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: 12px;
}

.drawer-link::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid rgba(255, 255, 255, .35);
    border-bottom: 2px solid rgba(255, 255, 255, .35);
    transform: rotate(-45deg);
    margin-left: 12px;
    flex: 0 0 auto;
}

.drawer-link:active {
    opacity: .6;
}

html.drawer-open {
    overflow: hidden;
}

/* когда меню открыто — хедер и кнопка должны быть выше overlay */
html.drawer-open header {
    position: fixed;
    top: 0;
    z-index: 1000;
}

html.drawer-open .menu-btn {
    position: relative;
    z-index: 90;
}

/* ⚠ GLOBAL RULE: влияет на ВСЕ страницы.
   Если что-то "уезжает" — проверяй это место первым. */

body[data-page="hello"] .hero-sub {
    margin-top: -22px;
}

:root {
    --header-h: 64px;
    /* базовая высота шапки */
    --header-safe-top: env(safe-area-inset-top);
    --header-total-h: calc(var(--header-h) + var(--header-safe-top));
}





/* =========================================================
   [B] PAGE: / (index) — CONTENT CONTROLLER (MOBILE ONLY)
   Меняй ТОЛЬКО значения ниже
   ========================================================= */

:root {
    /* ───────── /index: весь контент страницы ───────── */
    --m-index-content-x: 0px;
    --m-index-content-y: -50px;
    --m-index-content-scale: 1;
}

@media (max-width: 768px) {

    /* /index: двигаем ТОЛЬКО контент страницы (без шапки) */
    body[data-page="index"]>.page>main,
    body[data-page="index"]>.page>footer {
        transform:
            translate(var(--m-index-content-x),
                var(--m-index-content-y)) scale(var(--m-index-content-scale));

        transform-origin: top center;
        will-change: transform;
    }
}



/* =========================================================
   [B] PAGE: / (index) — РАСПОЛОЖЕНИЕ КНОПОК
   ========================================================= */

@media (max-width: 768px) {

    /* ЧТО УЖЕ УМЕЕТ... */
    body[data-page="index"] {
        --m-index-card-order: 99;
        --m-index-card-mt: 32px;
        --m-index-card-x: 0px;
        --m-index-card-y: -50px;
        --m-index-card-scale: 0.97;
        /* —————————————————————————————— */

        /* СКАЧАТЬ РАСШИРЕНИЕ... */
        --m-index-cta-order: 10;
        --m-index-cta-mt: 14px;
        --m-index-cta-x: 0px;
        --m-index-cta-y: 5px;
        --m-index-cta-scale: 1;
    }

    /* —————————————————————————————— */

    /* ЭКОСИСТЕМА ИНСТРУМЕНТОВ... */
    body[data-page="index"] .hero-title-balanced {
        text-align: center;
        width: 100%;
        font-size: clamp(22px, 7vw, 32px);
        line-height: 1.08;
    }

    body[data-page="index"] .hero-title-balanced .h1-line {
        display: block;
        white-space: nowrap;
        /* 2 строки как задумано */
    }

    /* —————————————————————————————— */

    /* Первая версия — закрытый релиз... */
    body[data-page="index"] .hero-note {
        margin-top: 22px;
        font-size: 12px;
        line-height: 1.45;
        letter-spacing: 0.02em;

        text-align: center;
        color: rgba(255, 255, 255, 0.55);
    }

    /* —————————————————————————————— */

    /* ===== /index: HERO-CARD (то самое "Что уже умеет") ===== */
    body[data-page="index"] .hero-card {
        order: var(--m-index-card-order);
        margin-top: var(--m-index-card-mt);
        transform: translate(var(--m-index-card-x), var(--m-index-card-y)) scale(var(--m-index-card-scale));
        transform-origin: top center;
        will-change: transform;
    }

    /* ===== /index: HERO-CTA ("Скачать расширение") ===== */
    body[data-page="index"] .hero-cta {
        order: var(--m-index-cta-order);
        margin-top: var(--m-index-cta-mt);

        transform: translate(var(--m-index-cta-x), var(--m-index-cta-y)) scale(var(--m-index-cta-scale));
        transform-origin: top center;
        will-change: transform;
    }

    /* на мобилке пусть CTA занимает всю ширину */
    body[data-page="index"] .hero-cta .btn {
        width: 100%;
    }

    /* iOS Safari: чуть поджать (чтобы не обрезало справа при nowrap) */
    @supports (-webkit-touch-callout: none) {

        body[data-page="index"] .hero-title-balanced {
            font-size: clamp(20px, 6.9vw, 29px);
            letter-spacing: -0.01em;
        }

        body[data-page="index"] .hero-note {
            font-size: 11.5px;
            letter-spacing: 0.015em;
        }
    }

    /* супер-узкие: иначе будет вылезать вправо */
    @media (max-width: 360px) {
        body[data-page="index"] .hero-title-balanced .h1-line {
            white-space: normal;
        }
    }
}




/* =========================================================
   [C] PAGE: /hello — CONTENT CONTROLLER (MOBILE ONLY)
   ========================================================= */

.links {
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.links-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 10px 8px;
}

.links-avatar {
    width: 92px;
    height: 92px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid var(--border-soft);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
}

.links-name {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 0.03em;

    margin-bottom: 2px;
    /* ↓ почти вплотную */
}

.links-role {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 0;
    /* убираем лишний отступ */
    text-transform: lowercase;
}

.links-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.links-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: linear-gradient(145deg, var(--bg-elevated), #060915);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.links-item:hover {
    border-color: var(--accent);
}

.links-ico {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    overflow: hidden;
    flex: 0 0 auto;
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.03);
}

.links-ico img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.links-txt {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-main);
}

@media (max-width: 420px) {
    .hero-links-buttons .btn {
        width: 100%;
    }

    .hero-links-inner {
        max-width: 360px;
        padding: 0 6px;
    }

    .hero-title {
        font-size: 30px;
        text-align: center;
    }

    .hero-sub {
        text-align: center;
        margin-bottom: 16px;
    }

    .hero-links-avatar {
        width: 88px;
        height: 88px;
    }

    .hero-links-buttons .btn {
        width: 100%;
        padding: 14px 16px;
        font-size: 14px;
    }
}

/* links page */
.hero-links {
    align-items: center;
}

.hero-links-inner {
    max-width: 420px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.hero-links-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;

    position: relative;
    z-index: 1;

    margin-top: 14px;
    /* ↓ аккуратно спускаем аватарку */
}

.hero-links-avatar::before {
    content: "";
    position: absolute;
    inset: -2px;
    /* толщина обводки */
    border-radius: 50%;
    z-index: -1;

    background: linear-gradient(135deg,
            #f5c15b,
            #cfa24a,
            rgba(245, 193, 91, 0.25));

    /* опционально, но красиво */
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
}

.hero-links-avatar>img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    object-fit: cover;
    opacity: 0.95;
}

.hero-links-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;

    /* ↓ опускаем ТОЛЬКО блок кнопок (и всё, что ниже, включая футер) */
    margin-top: 0;
}

/* ===== Two-line link buttons ===== */

.btn-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    /* ВОЗДУХ между "Telegram" и "Основной канал" */
    gap: 6px;

    /* ПОДЖАТЬ ПРЯМОУГОЛЬНИКИ ПО ВЫСОТЕ */
    padding: 10px 20px;
    min-height: 56px;

    position: relative;
}

.btn-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #f5c76a;
}

.btn-sub {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.03em;
    color: rgba(245, 199, 106, 0.65);
}

.hero-links-buttons .btn {
    border: 1px solid rgba(245, 199, 106, 0.25);
}

/* ===== Link cards (only for link.html buttons) ===== */
.btn.btn-card {
    display: grid;
    grid-template-columns: 26px 1fr 26px;
    /* иконка | текст | пустой спейсер (чтобы центр был честный) */
    align-items: center;

    width: 100%;
    min-height: 46px;
    /* поджали прямоугольники по высоте */
    padding: 10px 18px;
    /* меньше воздуха внутри */
    gap: 12px;

    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;

    /* оставляю твою логику стиля (градиент/бордер/тень) */
}

.btn.btn-card .btn-txt {
    justify-self: start;
}

.btn.btn-card .btn-ico {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
}

.btn.btn-card .btn-ico img {
    height: 22px;
    width: 40px;
    max-width: 35px;
    display: block;
    object-fit: contain;
    opacity: .95;
}

.btn.btn-card .btn-ico.is-empty {
    visibility: hidden;
    /* место остаётся, чтобы текст всегда был по центру */
}

.btn.btn-card .btn-txt {
    text-align: left;
    line-height: 1.1;
}

.btn.btn-card .btn-title {
    display: block;
    font-size: 12.8px;
    font-weight: 700;
    letter-spacing: .065em;
    /* ← поджали межбуквку */
    text-transform: uppercase;
}

.btn.btn-card .btn-sub {
    display: block;
    margin-top: 6.5px;
    /* воздух между "Telegram" и "Основной канал" */
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .065em;
    text-transform: uppercase;
    opacity: .9;
}

/* ===== Nakoval icon (special case) ===== */

.btn-ico-nakoval {
    width: 32px;
    height: 32px;
}

.btn-ico-nakoval img {
    width: 35px;
    height: 31px;
    display: block;
}

/* -------------------------
   /hello — TUNERS (ONLY)
   ------------------------- */

/* =========================================================
   MOBILE TUNER (override block) — меняй значения ТУТ
   ========================================================= */

:root {
    /* ширина и поля кнопок на /hello */
    --hello-btn-side-pad: 12px;
    /* меньше = шире визуально */
    --hello-btn-minh: 56px;

    /* расстояния под ником/ролью */
    --hello-sub-mt: -21px;
    /* Motion Designer... ближе к @ */
    --hello-buttons-mt: -0.6vh;
    /* сдвиг блока кнопок вниз (если нужно) */

    /* вертикальные ритмы */
    --hello-gap: 12px;
    /* расстояние между кнопками */
}

/* /hello: расстояние между @ и описанием */
.hero.hero-links .hero-sub {
    margin-top: var(--hello-sub-mt);
}

/* /hello: контейнер */
.hero-links-inner {
    gap: var(--hello-gap);
}

/* /hello: блок кнопок (ширина/позиция) */
.hero-links-buttons {
    margin-top: var(--hello-buttons-mt);
}

/* /hello: сами кнопки — растянуть по ширине */
.hero-links-buttons .btn {
    width: 100%;
}

/* /hello: внутренняя геометрия кнопки */
.btn-link {
    min-height: var(--hello-btn-minh);
    padding: 12px var(--hello-btn-side-pad);
}

/* /hello: сдвинуть вниз ник + роль */
.hero.hero-links .hero-title {
    margin-top: -12px;
}

/* /hello: сдвинуть ТОЛЬКО аватарку, не трогая остальное */
.hero-links-avatar {
    transform: translateY(-15px);
}





/* =========================================================
   MOBILE HEADER TUNER — меняй значения ТУТ
   ========================================================= */

:root {
    /* ЛОГО в шапке: позиция + масштаб */
    --m-header-logo-x: -10px;
    --m-header-logo-y: 0px;
    --m-header-logo-scale: 0.98;
}

@media (max-width: 768px) {

    /* высоту header задаёт ТОЛЬКО блок sticky ниже */
    header {
        height: auto;
        min-height: 0;
        max-height: none;
        box-sizing: border-box;
    }

    /* "призрак" menu-btn */
    .menu-btn[data-ghost="true"] {
        visibility: visible;
        pointer-events: auto;
    }

    /* ЛОГО: строго в одну строку */
    header .logo a {
        display: inline-flex;
        align-items: baseline;
        gap: 6px;
        white-space: nowrap;
        /* ключевое */
        line-height: 1;
    }

    /* ЛОГО: контроллер масштаба + сдвиг */
    header .logo {
        transform: translate(var(--m-header-logo-x), var(--m-header-logo-y)) scale(var(--m-header-logo-scale));
        transform-origin: left center;
        will-change: transform;
    }
}



.drawer-link.is-active {
    opacity: 1;
    color: #f5c15b;
}


/* =========================================================
   [B] PAGE-SCOPED CONTROLLERS (index / hello)
   ========================================================= */

:root {
    /* ───────── HEADER (общий) ───────── */
    --m-header-shift-x: 0px;
    --m-header-shift-y: 0px;

    /* ───────── /hello ───────── */
    --m-hello-shift-x: 0px;
    --m-hello-shift-y: -30px;
    --m-hello-scale: 1;

    /* ───────── / (index) ───────── */
    --m-index-hero-sub-mt: 10px;
    /* опустить "Downloader..." */
}

@media (max-width: 768px) {

    /* ───────── HEADER (общий) ───────── */
    header {
        transform: none;
        will-change: auto;
    }

    /* ───────── /hello: двигаем ТОЛЬКО контент страницы ───────── */
    body[data-page="hello"]>.page>main,
    body[data-page="hello"]>.page>footer {
        transform: translate(var(--m-hello-shift-x), var(--m-hello-shift-y)) scale(var(--m-hello-scale));
        transform-origin: top center;
        will-change: transform;
    }

    /* / (index) — HERO spacing */
    body[data-page="index"] .hero>div>.hero-sub {
        margin-top: var(--m-index-hero-sub-mt);
    }
}

/* =========================================================
   [A] GLOBAL — MONOLITH HEADER CONTROLLERS (ALL PAGES)
   ШАПКА
   ========================================================= */

:root {
    /* вся шапка целиком */
    --m-hdr-x: 0px;
    /* (горизонт) */
    --m-hdr-y: 0px;
    /* (вертикаль) */

    /* ОТДЕЛЬНО ЭЛЕМЕНТЫ ШАПКИ */

    /* МЕНЮ */
    --m-hdr-menu-x: -5px;
    /* (горизонт) */
    --m-hdr-menu-y: 0px;
    /* (вертикаль) */

    /* ЛОГОТИП */
    --m-hdr-logo-x: -10px;
    /* (горизонт) */
    --m-hdr-logo-y: -2px;
    /* (вертикаль) */
    --m-hdr-logo-scale: 0.98;

    /* В РАЗРАБОТКЕ */
    --m-hdr-tag-x: -3px;
    /* (горизонт) */
    --m-hdr-tag-y: 0px;
    /* (вертикаль) */
    --m-hdr-tag-scale: 1;
}

@media (max-width: 768px) {

    /* старые тюнеры ВЫКЛ, чтобы не рушили 3-слотовую сетку */
    .menu-btn,
    header .logo,
    header .header-right,
    header .header-right .tag {
        transform: none !important;
        will-change: auto !important;
    }
}

/* =========================================================
   MOBILE ONLY — HEADER (LOCKED, STABLE LAYOUT)
   ========================================================= */
@media (max-width: 768px) {

    /* 0) родитель не должен добавлять "воздух" сверху */
    .page {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* 1) header fixed и с правильными внутренними полями */
    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;

        z-index: 1000;

        transform: none !important;
        margin: 0 !important;

        background: none;
        box-shadow: none;

        height: var(--header-total-h);
        min-height: var(--header-total-h);
        max-height: var(--header-total-h);

        padding-top: var(--header-safe-top);
        padding-bottom: 0;

        /* ← ВОТ ЭТО чиниит "расползание" (поля + safe-area) */
        padding-left: calc(12px + env(safe-area-inset-left));
        padding-right: calc(12px + env(safe-area-inset-right));

        box-sizing: border-box;

        display: flex;
        align-items: center;

        /* НЕ space-between, иначе всё разъедется */
        justify-content: flex-start;
        gap: 10px;
    }

    /* 2) 3-слотовая раскладка: [menu] [logo-center] [right] */
    header .menu-btn {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        margin: 0;
    }

    header .logo {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        justify-content: center;
    }

    header .logo a {
        display: inline-flex;
        align-items: baseline;
        gap: 6px;
        white-space: nowrap;
        line-height: 1;
    }

    header .header-right {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0;
    }

    /* 3) убираем любые микро-сдвиги, чтобы геометрия была железной */
    .menu-btn,
    header .logo,
    header .header-right .tag {
        transform: none !important;
        will-change: auto;
    }

    /* 4) контент ВСЕХ страниц стартует ниже шапки */
    body>.page>main {
        padding-top: calc(var(--header-total-h) + 16px) !important;
    }

    /* full-bleed фон шапки (liquid glass) */
    header::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        z-index: -1;

        background: #0d0e139a;
        -webkit-backdrop-filter: blur(16px) saturate(140%);
        backdrop-filter: blur(16px) saturate(140%);
    }

    /* тонкий стеклянный край снизу */
    header::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 0;
        width: 100vw;
        height: 1px;
        transform: translateX(-50%);
        pointer-events: none;

        background: linear-gradient(90deg,
                transparent,
                rgba(255, 255, 255, 0.14),
                rgba(245, 193, 91, 0.18),
                rgba(255, 255, 255, 0.14),
                transparent);

        opacity: 0.6;
    }
}

/* ===== Shared: back-link pill (mobile) ===== */
@media (max-width: 768px) {
    .back-link {
        position: absolute;
        left: calc(12px + env(safe-area-inset-left));
        top: 20px;

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

        height: 28px;
        padding: 0 10px;

        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, .08);
        background: rgba(0, 0, 0, .22);
        backdrop-filter: blur(6px);

        text-decoration: none;
        color: #dadada;
    }

    .back-link:active {
        transform: translateY(1px);
    }

    .back-arrow {
        width: 18px;
        height: 18px;
        display: inline-block;
        opacity: .9;
        /* если у тебя иконка стрелки рисуется через background — оставь как на /hello */
    }

    .back-text {
        font-size: 12px;
        letter-spacing: .12em;
        text-transform: uppercase;
        opacity: .9;
    }
}

/* =========================================================
   MOBILE — HEADER: HARD OVERRIDE CONTROLLER (LAST BLOCK)
   Меняй ТОЛЬКО переменные ниже.
   ========================================================= */
@media (max-width: 768px) {

    :root {
        --hdr-all-x: 0px;
        --hdr-all-y: 0px;

        --hdr-menu-x: -3px;
        --hdr-menu-y: 0px;

        --hdr-logo-x: -15px;
        --hdr-logo-y: -1.5px;
        --hdr-logo-scale: 1;

        --hdr-tag-x: -5px;
        --hdr-tag-y: 0px;
        --hdr-tag-scale: 1;
    }

    /* header */
    body>.page>header,
    body header {
        transform: translate(var(--hdr-all-x), var(--hdr-all-y)) !important;
    }

    /* menu */
    body header .menu-btn {
        transform: translate(var(--hdr-menu-x), var(--hdr-menu-y)) !important;
    }

    /* logo */
    body header .logo {
        transform: translate(var(--hdr-logo-x), var(--hdr-logo-y)) scale(var(--hdr-logo-scale)) !important;
        transform-origin: center !important;
    }

    /* right tag */
    body header .header-right .tag {
        transform: translate(var(--hdr-tag-x), var(--hdr-tag-y)) scale(var(--hdr-tag-scale)) !important;
        transform-origin: right center !important;
    }
}

/* =========================================================
   SITE FOOTER — MOBILE (one column, centered, stable)
   Put this at the VERY END of mobile.css
   ========================================================= */
@media (max-width: 768px) {

    footer.site-footer {
        margin: 56px 0 0 !important;
        padding: 28px 0 34px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
        text-align: center !important;
    }

    /* Вместо grid — вертикальный стек (железно) */
    footer.site-footer .sf-wrap {
        width: 100% !important;
        max-width: 520px !important;
        margin: 0 auto !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;

        gap: 16px !important;

        padding-left: calc(16px + env(safe-area-inset-left)) !important;
        padding-right: calc(16px + env(safe-area-inset-right)) !important;
        box-sizing: border-box !important;
    }

    /* Каждая колонка — по центру и одинаковой ширины */
    footer.site-footer .sf-col {
        width: 100% !important;
        max-width: 360px !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;

        text-align: center !important;
    }

    /* Порядок блоков как в рефе */
    footer.site-footer .sf-left {
        order: 1 !important;
    }

    footer.site-footer .sf-center {
        order: 2 !important;
    }

    footer.site-footer .sf-right {
        order: 3 !important;
    }

    /* Бренд */
    footer.site-footer .sf-brand {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        text-decoration: none !important;
    }

    footer.site-footer .sf-copy {
        margin-top: 8px !important;
        font-size: 12px !important;
        line-height: 1.35 !important;
        color: rgba(159, 163, 181, 0.55) !important;
    }

    /* Ссылки */
    footer.site-footer .sf-center {
        display: grid !important;
        gap: 5px !important;
        justify-items: center !important;
    }

    footer.site-footer .sf-center a {
        display: inline-block !important;
        padding: 6px 0 !important;
        font-size: 13px !important;
        line-height: 1.45 !important;
        color: rgba(159, 163, 181, 0.75) !important;
        text-decoration: none !important;
    }

    /* Контакты */
    footer.site-footer .sf-phone {
        font-weight: 800 !important;
        font-size: clamp(22px, 7.2vw, 28px) !important;
        line-height: 1.05 !important;
        letter-spacing: 0.02em !important;
        color: var(--text-main) !important;

        /* ключ: не даём телефону ломаться по пробелам */
        white-space: nowrap !important;
    }

    footer.site-footer .sf-hours {
        margin-top: 10px !important;
        font-size: 12.5px !important;
        line-height: 1.45 !important;
        color: rgba(159, 163, 181, 0.62) !important;
        max-width: 320px !important;
    }

    footer.site-footer .sf-mail {
        margin-top: 12px !important;
        display: inline-block !important;
        font-weight: 700 !important;
        font-size: 16px !important;
        line-height: 1.1 !important;
        color: var(--accent) !important;
        text-decoration: none !important;

        /* если почта длинная — пусть аккуратно переносится */
        max-width: 320px !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }
}

/* Extra-tight phones */
@media (max-width: 360px) {
    footer.site-footer .sf-phone {
        font-size: 24px !important;
    }

    footer.site-footer .sf-mail {
        font-size: 15px !important;
    }
}

/* =========================================
   Breadcrumbs — MOBILE: hide
   ========================================= */

@media (max-width: 768px) {
    body[data-page="offer"] .breadcrumbs {
        display: none !important;
    }
}

/* =========================================================
   MOBILE: hide DESKTOP nav (does not affect burger/drawer)
   ========================================================= */
@media (max-width: 768px) {
    .site-nav {
        display: none !important;
    }
}