/* ==================== CAD17 MOBILE — compact app-like UX ==================== */

:root {
    --mobile-header-h: 52px;
    --mobile-tabbar-h: 62px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --mobile-pad-x: 16px;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: clip;
}

body.mobile-nav-open,
body.mobile-sheet-open {
    overflow: hidden;
    touch-action: none;
}

/* ==================== COMPACT HEADER ==================== */
@media (max-width: 768px) {
    .header {
        padding-top: var(--safe-top);
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(16px) saturate(180%);
        -webkit-backdrop-filter: blur(16px) saturate(180%);
        border-bottom: 1px solid var(--border-subtle, var(--gray-200));
    }

    .header__inner {
        height: var(--mobile-header-h);
        padding-left: calc(var(--mobile-pad-x) + var(--safe-left));
        padding-right: calc(var(--mobile-pad-x) + var(--safe-right));
        gap: 0;
    }

    .header__logo {
        gap: 10px;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
        border-radius: 11px;
        font-size: 16px;
    }

    .logo-name {
        font-size: 16px;
    }

    .logo-tag {
        display: none;
    }

    .header__nav,
    .header__actions,
    .header__burger {
        display: none !important;
    }

    .container {
        padding-left: calc(var(--mobile-pad-x) + var(--safe-left));
        padding-right: calc(var(--mobile-pad-x) + var(--safe-right));
    }

    #app {
        padding-bottom: calc(var(--mobile-tabbar-h) + var(--safe-bottom));
    }

    .page {
        padding-top: calc(var(--mobile-header-h) + var(--safe-top));
    }

    .hero {
        padding: calc(var(--mobile-header-h) + 20px + var(--safe-top)) 0 28px;
    }

    .about-hero {
        padding: calc(var(--mobile-header-h) + 24px + var(--safe-top)) 0 28px;
    }
}

/* ==================== BOTTOM TAB BAR ==================== */
.mobile-tabbar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-tabbar {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        height: calc(var(--mobile-tabbar-h) + var(--safe-bottom));
        padding: 6px calc(8px + var(--safe-right)) calc(6px + var(--safe-bottom)) calc(8px + var(--safe-left));
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-top: 1px solid var(--border-subtle, rgba(0, 76, 174, 0.1));
        box-shadow: 0 -4px 24px rgba(0, 29, 59, 0.06);
    }

    .mobile-tabbar__item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 48px;
        padding: 4px 6px;
        border: none;
        background: none;
        color: var(--gray-500);
        font-family: inherit;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.02em;
        text-decoration: none;
        border-radius: var(--radius);
        -webkit-tap-highlight-color: transparent;
        transition: color 0.15s ease, background 0.15s ease;
    }

    .mobile-tabbar__item i {
        font-size: 18px;
        line-height: 1;
    }

    .mobile-tabbar__item.active {
        color: var(--primary);
    }

    .mobile-tabbar__item:active {
        background: var(--primary-bg);
    }

    .mobile-tabbar__item--primary {
        color: white;
        margin-top: -18px;
    }

    .mobile-tabbar__item--primary .mobile-tabbar__fab {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: var(--gradient-primary, linear-gradient(135deg, #004CAE, #358DFF));
        box-shadow: 0 6px 20px rgba(0, 76, 174, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
    }

    .mobile-tabbar__item--primary.active .mobile-tabbar__fab {
        box-shadow: 0 6px 24px rgba(0, 76, 174, 0.55);
    }

    .mobile-tabbar__item--primary span:last-child {
        color: var(--primary);
        margin-top: 2px;
    }
}

/* ==================== MORE SHEET ==================== */
.mobile-sheet {
    display: none;
}

@media (max-width: 768px) {
    .mobile-sheet {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 950;
        pointer-events: none;
        visibility: hidden;
    }

    .mobile-sheet.open {
        pointer-events: auto;
        visibility: visible;
    }

    .mobile-sheet__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(15, 23, 42, 0.4);
        opacity: 0;
        transition: opacity 0.25s ease;
    }

    .mobile-sheet.open .mobile-sheet__backdrop {
        opacity: 1;
    }

    .mobile-sheet__panel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: min(75dvh, 520px);
        background: white;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        padding-bottom: var(--safe-bottom);
        box-shadow: 0 -8px 40px rgba(0, 29, 59, 0.15);
        transform: translateY(100%);
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        flex-direction: column;
    }

    .mobile-sheet.open .mobile-sheet__panel {
        transform: translateY(0);
    }

    .mobile-sheet__handle {
        width: 36px;
        height: 4px;
        background: var(--gray-300);
        border-radius: 2px;
        margin: 10px auto 0;
        flex-shrink: 0;
    }

    .mobile-sheet__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 20px 8px;
        flex-shrink: 0;
    }

    .mobile-sheet__title {
        font-size: 17px;
        font-weight: 700;
        color: var(--gray-900);
    }

    .mobile-sheet__close {
        width: 40px;
        height: 40px;
        border: none;
        background: var(--gray-100);
        border-radius: 50%;
        color: var(--gray-600);
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-sheet__body {
        overflow-y: auto;
        padding: 8px 16px 20px;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-sheet__link {
        display: flex;
        align-items: center;
        gap: 14px;
        min-height: 52px;
        padding: 0 14px;
        margin-bottom: 4px;
        border-radius: var(--radius-lg);
        color: var(--gray-800);
        font-size: 15px;
        font-weight: 600;
        text-decoration: none;
        border: none;
        background: none;
        width: 100%;
        font-family: inherit;
        text-align: left;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-sheet__link i {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: var(--primary-bg);
        color: var(--primary);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        flex-shrink: 0;
    }

    .mobile-sheet__link:active {
        background: var(--gray-50);
    }

    .mobile-sheet__link--danger {
        color: var(--danger);
    }

    .mobile-sheet__link--danger i {
        background: var(--danger-bg);
        color: var(--danger);
    }

    .mobile-sheet__user {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 14px 16px;
        margin-bottom: 8px;
        border-bottom: 1px solid var(--gray-100);
    }

    .mobile-sheet__avatar {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: var(--gradient-primary);
        color: white;
        font-weight: 700;
        font-size: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .mobile-sheet__user-name {
        font-size: 15px;
        font-weight: 700;
        color: var(--gray-900);
    }

    .mobile-sheet__user-role {
        font-size: 12px;
        color: var(--gray-500);
        margin-top: 2px;
    }
}

/* Legacy backdrop (unused with tab bar) */
.mobile-nav-backdrop {
    display: none;
}

/* ==================== TYPOGRAPHY & SECTIONS ==================== */
@media (max-width: 768px) {
    .section {
        padding: 32px 0;
    }

    .section__header {
        margin-bottom: 20px;
    }

    .section__tag {
        font-size: 11px;
        padding: 4px 10px;
        margin-bottom: 8px;
    }

    .section__title {
        font-size: clamp(19px, 5.2vw, 22px);
        letter-spacing: -0.4px;
        line-height: 1.2;
        margin-bottom: 6px;
    }

    .section__subtitle {
        font-size: 13px;
        line-height: 1.55;
    }

    .card {
        padding: 14px;
        border-radius: var(--radius-lg);
    }

    .grid {
        gap: 10px;
    }

    .grid--2,
    .grid--3,
    .grid--4 {
        grid-template-columns: 1fr;
    }
}

/* ==================== HERO ==================== */
@media (max-width: 768px) {
    .hero__badge {
        font-size: 10px;
        padding: 4px 10px;
        margin-bottom: 12px;
    }

    .hero__title {
        font-size: clamp(22px, 6vw, 28px);
        line-height: 1.12;
        margin-bottom: 10px;
    }

    .hero__desc {
        font-size: 13px;
        line-height: 1.55;
        margin-bottom: 16px;
    }

    .hero__actions {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 18px;
    }

    .hero__actions .btn {
        width: 100%;
        min-height: 46px;
        font-size: 14px;
    }

    .hero__actions .btn--outline {
        order: 2;
    }

    /* Override pro-max column stats → compact 3-col row */
    .hero__stats {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 0 !important;
        padding: 12px 8px !important;
        text-align: center;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid var(--border-subtle, var(--gray-200));
        border-radius: var(--radius-lg);
    }

    .hero__stats > div {
        padding: 0 4px !important;
        border: none !important;
    }

    .hero__stats > div:not(:last-child) {
        border-right: 1px solid var(--border-subtle, var(--gray-200)) !important;
    }

    .hero__stat-value {
        font-size: 15px !important;
        font-weight: 800;
    }

    .hero__stat-label {
        font-size: 9px !important;
        line-height: 1.25;
        margin-top: 3px !important;
    }
}

/* ==================== KB17 STRIP ==================== */
@media (max-width: 768px) {
    .kb17-footer-strip {
        padding: 10px 0;
    }

    .kb17-footer-strip__inner {
        flex-direction: column;
        gap: 4px;
        text-align: center;
        font-size: 11px;
    }

    .kb17-footer-strip__divider {
        display: none;
    }

    .kb17-footer-strip__item i {
        display: none;
    }
}

/* ==================== APPROACH — compact stack ==================== */
@media (max-width: 768px) {
    .approach-grid {
        max-width: none;
        gap: 8px;
    }

    .approach-grid__connector {
        display: none;
    }

    .approach-card {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        padding: 14px !important;
        text-align: left;
    }

    .approach-card--engineer {
        transform: none !important;
        border-width: 1px;
    }

    .approach-card__step {
        display: none;
    }

    .approach-card__icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 17px !important;
        margin-bottom: 0 !important;
        border-radius: 12px;
    }

    .approach-card__title {
        font-size: 14px !important;
        margin-bottom: 4px;
    }

    .approach-card__text {
        font-size: 12px !important;
        line-height: 1.45;
    }
}

/* ==================== STEPS — numbered list ==================== */
@media (max-width: 768px) {
    .step-card {
        padding: 12px;
        gap: 10px;
        align-items: center;
    }

    .step-card__num {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .step-card__title {
        font-size: 14px;
    }

    .step-card__text {
        font-size: 12px;
        line-height: 1.4;
    }
}

/* ==================== FORMATS — stacked cards ==================== */
@media (max-width: 768px) {
    .formats-comparison {
        max-width: none;
        gap: 10px;
    }

    .formats-comparison__divider span {
        width: 32px;
        height: 32px;
        font-size: 10px;
    }

    .format-card__head,
    .format-card__intro,
    .format-card__features-block,
    .format-card__action {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .format-card__head {
        padding-top: 16px !important;
    }

    .format-card__metric {
        margin-left: 16px !important;
        margin-right: 16px !important;
        padding: 10px 12px;
    }

    .format-card__metric-value {
        font-size: 24px !important;
    }

    .format-card__title {
        font-size: 16px;
    }

    .format-card__desc,
    .format-card__features li {
        font-size: 12px;
    }

    .format-card__action {
        padding-bottom: 16px !important;
    }

    .format-card__action .btn {
        width: 100%;
        min-height: 44px;
        font-size: 14px;
    }
}

/* ==================== AUDIENCE — 2-col chips ==================== */
@media (max-width: 768px) {
    .section:has(.audience-card) .grid--3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .audience-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 14px 10px !important;
        gap: 8px;
    }

    .audience-card__icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }

    .audience-card__title {
        font-size: 12px !important;
        margin-bottom: 2px;
    }

    .audience-card__text {
        font-size: 11px !important;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

@media (max-width: 380px) {
    .section:has(.audience-card) .grid--3 {
        grid-template-columns: 1fr;
    }
}

/* ==================== KB17 BANNER & CTA ==================== */
@media (max-width: 768px) {
    .kb17-banner {
        padding: 28px 0;
    }

    .kb17-banner__mark {
        width: 52px;
        height: 52px;
        font-size: 17px;
    }

    .kb17-banner__title {
        font-size: 17px;
    }

    .kb17-banner__text {
        font-size: 13px;
    }

    .kb17-banner__tags {
        flex-wrap: wrap;
        gap: 6px;
    }

    .kb17-banner__tag {
        font-size: 11px;
        padding: 4px 10px;
    }

    .cta-section {
        padding: 32px 0;
        text-align: center;
    }

    .cta-section__title {
        font-size: 19px;
    }

    .cta-section__desc {
        font-size: 13px;
        margin-bottom: 18px;
    }

    .cta-section .btn {
        width: 100%;
        max-width: 320px;
        min-height: 46px;
    }
}

/* ==================== FOOTER — tight mobile layout ==================== */
@media (max-width: 768px) {
    .footer::before,
    .footer::after {
        display: none;
    }

    /* KB17 — одна строка */
    .footer__kb17-bar {
        border-bottom-color: rgba(255, 255, 255, 0.05);
    }

    .footer__kb17-inner {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        padding: 10px 0 !important;
    }

    .footer__kb17-badge {
        gap: 10px;
        flex: 1;
        min-width: 0;
    }

    .footer__kb17-mark {
        width: 34px;
        height: 34px;
        font-size: 10px;
        border-radius: 9px;
    }

    .footer__kb17-label {
        font-size: 10px;
        line-height: 1.2;
    }

    .footer__kb17-link {
        font-size: 13px;
    }

    .footer__kb17-tagline,
    .footer__kb17-divider {
        display: none !important;
    }

    /* Основной блок — минимум секций */
    .footer__main {
        display: flex !important;
        flex-direction: column !important;
        gap: 14px !important;
        padding: 14px 0 10px !important;
        grid-template-columns: none !important;
    }

    .footer__logo,
    .footer__desc,
    .footer__cta-btn,
    .footer__links-grid {
        display: none !important;
    }

    .footer__brand {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
        margin: 0 !important;
        width: 100%;
    }

    .footer__socials {
        margin: 0 !important;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }

    .footer__socials a {
        width: 34px;
        height: 34px;
        font-size: 14px;
        border-radius: 9px;
    }

    /* Контакты — компактная сетка 2+1 */
    .footer__contact-card {
        padding: 10px 12px !important;
        border-radius: var(--radius);
        background: rgba(255, 255, 255, 0.03);
    }

    .footer__contact-card .footer__col-title {
        font-size: 10px;
        letter-spacing: 0.08em;
        margin-bottom: 8px;
        padding-bottom: 6px;
    }

    .footer__contact-list {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px 10px !important;
    }

    .footer__contact-list li {
        gap: 8px;
        align-items: center;
    }

    .footer__contact-list li:last-child {
        grid-column: 1 / -1;
    }

    .footer__contact-icon {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .footer__contact-label {
        font-size: 9px;
        margin-bottom: 0;
        line-height: 1.1;
    }

    .footer__contact-list a,
    .footer__contact-value {
        font-size: 12px;
        line-height: 1.25;
    }

    /* Бейджи — плотная строка */
    .footer__trust {
        gap: 4px !important;
        padding: 0 0 10px !important;
        margin: 0 !important;
        justify-content: center;
        border-bottom: none;
    }

    .footer__trust-badge {
        font-size: 9px !important;
        padding: 4px 7px !important;
        gap: 4px;
    }

    .footer__trust-badge i {
        font-size: 9px !important;
    }

    /* Низ — одна компактная зона */
    .footer__bottom {
        flex-direction: column !important;
        gap: 4px !important;
        padding: 10px 0 2px !important;
        text-align: center;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .footer__copy {
        font-size: 11px;
        line-height: 1.3;
    }

    .footer__legal {
        font-size: 10px;
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer__legal-dot {
        display: none;
    }

    .footer__legal a {
        display: inline-block;
        padding: 2px 0;
    }
}

@media (max-width: 380px) {
    .footer__contact-list {
        grid-template-columns: 1fr !important;
    }

    .footer__contact-list li:last-child {
        grid-column: auto;
    }

    .footer__trust-badge {
        font-size: 8px !important;
        padding: 3px 6px !important;
    }
}

/* ==================== APP PAGES ==================== */
@media (max-width: 768px) {
    .page__header {
        padding: 16px 0 12px;
    }

    .page__header .container > div[style*="flex"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .page__title {
        font-size: 20px;
    }

    .page__subtitle {
        font-size: 13px;
    }

    .page__body {
        padding: 16px 0 20px;
    }

    .page:has(.wizard) .page__header {
        padding: 12px 0 8px;
    }

    .page:has(.wizard) .page__title {
        font-size: 18px;
    }

    .page:has(.wizard) .page__subtitle {
        display: none;
    }

    .page:has(.wizard) .page__body {
        padding-top: 8px;
    }

    .page:has(.wizard) .page__body > .container {
        max-width: none !important;
        padding-left: calc(12px + var(--safe-left));
        padding-right: calc(12px + var(--safe-right));
    }
}

/* ==================== WIZARD — chat-first ==================== */
@media (max-width: 768px) {
    .wizard {
        border-radius: var(--radius-lg);
        min-height: calc(100dvh - var(--mobile-header-h) - var(--mobile-tabbar-h) - var(--safe-top) - var(--safe-bottom) - 100px);
        display: flex;
        flex-direction: column;
    }

    .wizard__header {
        padding: 10px 14px;
        flex-shrink: 0;
    }

    .wizard__avatar {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .wizard__title {
        font-size: 14px;
    }

    .wizard__status {
        font-size: 11px;
    }

    .wizard__messages {
        flex: 1;
        max-height: none;
        min-height: 180px;
        padding: 12px;
    }

    .wizard__msg {
        max-width: 92%;
    }

    .wizard__msg-bubble {
        font-size: 14px;
        padding: 10px 14px;
    }

    .wizard__input-area {
        padding: 8px 10px;
        flex-shrink: 0;
        background: white;
        border-top: 1px solid var(--gray-200);
    }

    .wizard__input {
        font-size: 16px;
    }

    .wizard__send-btn {
        width: 44px;
        height: 44px;
    }

    .wizard__suggestions {
        padding: 0 10px 8px;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .wizard__suggestions::-webkit-scrollbar {
        display: none;
    }

    .wizard__suggestion {
        flex-shrink: 0;
        font-size: 12px;
        padding: 7px 12px;
    }
}

/* ==================== FORMS & INPUTS ==================== */
@media (max-width: 768px) {
    .input,
    .textarea,
    .select,
    .wizard__input {
        font-size: 16px;
    }

    .btn {
        min-height: 44px;
    }

    .order-form__section {
        margin-bottom: 20px;
    }

    .order-form__section-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .upload-zone {
        padding: 24px 16px;
    }

    .login-page {
        min-height: auto;
        padding: 20px 0 24px;
    }

    .login-card {
        padding: 24px 20px;
        border-radius: var(--radius-xl);
    }
}

/* ==================== ORDER CARDS & LISTS ==================== */
@media (max-width: 768px) {
    .order-card {
        padding: 12px 14px;
        gap: 10px;
    }

    .order-card__icon {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }

    .order-card__name {
        font-size: 14px;
    }

    .order-card__meta {
        font-size: 11px;
    }

    .order-detail-header {
        gap: 10px;
    }

    .order-detail-header__info h1 {
        font-size: 17px;
    }

    .status-step__dot {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }

    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }

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

    .tab {
        flex-shrink: 0;
        font-size: 12px;
        padding: 8px 14px;
    }
}

@media (max-width: 640px) {
    .order-card {
        flex-direction: column;
        align-items: stretch;
    }

    .order-card__right {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 8px;
        border-top: 1px solid var(--gray-100);
        text-align: left;
    }
}

/* ==================== MODAL — bottom sheet ==================== */
@media (max-width: 768px) {
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .modal {
        min-height: auto !important;
        max-height: min(90dvh, 640px);
        width: 100%;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
        padding: 24px 18px calc(20px + var(--safe-bottom));
        animation: mobileSheetUp 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .modal::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: var(--gray-300);
        border-radius: 2px;
        margin: -4px auto 16px;
    }

    @keyframes mobileSheetUp {
        from { transform: translateY(100%); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }

    .modal__close {
        width: 40px;
        height: 40px;
    }

    .toast-container {
        left: calc(12px + var(--safe-left));
        right: calc(12px + var(--safe-right));
        bottom: calc(var(--mobile-tabbar-h) + 12px + var(--safe-bottom));
    }

    .toast {
        min-width: 0;
        width: 100%;
    }
}

/* ==================== CABINET MODE ==================== */
@media (max-width: 768px) {
    body.cabinet-mode .toast-container {
        bottom: calc(12px + var(--safe-bottom));
    }
}

/* ==================== ADMIN ==================== */
@media (max-width: 768px) {
    .admin-stat-card {
        padding: 14px;
    }

    .card:has(.admin-table) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px;
    }

    .admin-table {
        font-size: 11px;
        min-width: 560px;
    }

    .eng-review-card {
        padding: 14px;
    }

    #orderActions {
        flex-direction: column !important;
        gap: 8px !important;
    }

    #orderActions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==================== TOUCH ==================== */
@media (hover: none) and (pointer: coarse) {
    .card:hover,
    .feature-card:hover,
    .step-card:hover,
    .audience-card:hover,
    .format-card:hover,
    .approach-card:hover,
    .order-card:hover,
    .pricing-card:hover {
        transform: none !important;
        box-shadow: inherit;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-sheet__panel,
    .modal {
        transition: none;
        animation: none;
    }
}
