/* Mobile adaptation (proxy.house). Активно только при ширине <= 760px и наличии meta viewport. */
.header__burger, .header__close { display: none; }
@media (max-width: 760px) {
    html, body { -webkit-text-size-adjust: 100%; }
    html { overflow-x: hidden; }
    img { max-width: 100%; height: auto; }
    .layout__container { padding: 0 12px; box-sizing: border-box; max-width: 100%; }

    /* Header: бургер, меню поверх страницы */
    .header { height: auto; }
    .header > .layout__container { display: flex; flex-wrap: wrap; align-items: center; min-height: 56px; }
    .header__logo { flex: 1 1 auto; line-height: 56px; padding: 0 4px; font-size: 20px; }
    .header__burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 11px 10px; margin-right: -6px; border: 0; background: none; cursor: pointer; color: #333; -webkit-tap-highlight-color: transparent; }
    .header__burger span { display: block; height: 2px; width: 100%; background: currentColor; border-radius: 2px; }
    html:has(body.menu-open), .menu-open { overflow: hidden; }
    .header__nav { display: none; }
    .menu-open .header__nav { display: flex; flex-direction: column; align-items: stretch; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10000; background: #fff; padding: 72px 20px 32px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; box-sizing: border-box; animation: menuIn .2s ease-out; }
    .menu-open .header__nav::before { content: "proxy.house"; position: absolute; top: 0; left: 20px; line-height: 60px; font-size: 20px; font-weight: 400; color: #222; }
    @keyframes menuIn { from { opacity: 0; } to { opacity: 1; } }
    .header__close { display: none; }
    .menu-open .header__close { display: block; position: absolute; top: 8px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #f3f5f8; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .menu-open .header__close::before, .menu-open .header__close::after { content: ""; position: absolute; left: 13px; right: 13px; top: 21px; height: 2px; background: #333; border-radius: 2px; }
    .menu-open .header__close::before { transform: rotate(45deg); }
    .menu-open .header__close::after { transform: rotate(-45deg); }
    .header__section { display: block; height: auto; line-height: 56px; padding: 0 4px; font-size: 20px; font-weight: 400; color: #222; border-bottom: 1px solid #f0f0f0; }
    .header__section_active { color: #2288dd; border-bottom-color: #f0f0f0; }

    /* Баланс — карточка */
    .header__balance { display: block; position: relative; order: -1; margin: 14px 0 10px; padding: 12px 16px; border: 1px solid #d6e7f7; border-radius: 10px; background: #f4f8fd; color: #1b6fb5; font-size: 22px; font-weight: 400; line-height: 1.3; text-decoration: none; }
    .header__balance::before { content: "Баланс"; display: block; font-size: 12px; color: #7a8ea3; font-weight: 300; text-transform: uppercase; letter-spacing: .04em; }
    .header__balance::after { content: "Пополнить"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); padding: 7px 12px; border-radius: 6px; background: #2288dd; color: #fff; font-size: 14px; }
    html[lang="en"] .header__balance::before { content: "Balance"; }
    html[lang="en"] .header__balance::after { content: "Top up"; }

    /* Аккаунт */
    .header__profile { display: block; order: -2; margin: 0; padding: 0 4px; font-size: 16px; color: #333; font-weight: 400; background: none; max-width: none; cursor: default; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
    .header__profile::before { content: "Аккаунт"; display: block; font-size: 12px; color: #8a98a8; font-weight: 300; text-transform: uppercase; letter-spacing: .04em; }
    html[lang="en"] .header__profile::before { content: "Account"; }
    .header__profile::after { display: none !important; content: none !important; }
    .header__actions { display: block; position: static; opacity: 1; pointer-events: auto; border: 0; transform: none; min-width: 0; background: none; margin-top: 8px; }
    .header__action { display: flex; align-items: center; padding: 0 4px; line-height: 52px; font-size: 18px; color: #444; border-bottom: 1px solid #f0f0f0; }
    .header__action::before { width: 22px; margin-right: 12px; text-align: center; font-size: 16px; color: #8a98a8; }
    .header__action_sign-out { color: #d0453a; border-bottom: 0; }

    /* Заголовки и текст */
    .title_1 { font-size: 22px; }
    .title_2 { font-size: 18px; }
    .page__title { margin: 20px 4px 16px; }
    .page__paragraph, .paragraph { overflow-wrap: anywhere; }

    /* Главная */
    .slide { padding: 20px 0; }
    .slide__container { flex-direction: column; }
    .slide__half { width: 100%; }
    .slide__half + .slide__half { margin-top: 20px; }
    .slide__title { margin-bottom: 20px; }
    .slide__features { display: flex; flex-wrap: wrap; justify-content: center; }
    .feature { width: calc(50% - 16px); margin: 0 8px 16px; }
    .slide__tariffs { flex-direction: column; align-items: center; }
    .tariff { width: 100%; max-width: 360px; margin: 0 0 16px; }
    .message { max-width: 100%; box-sizing: border-box; }
    .slide__form_centered { margin: 0 auto; }

    /* Формы */
    .form_narrow, .form_wide { width: 100%; max-width: 100%; box-sizing: border-box; }
    .form__half { width: 100%; padding-right: 0; }
    .form__select_inline { display: block; margin: 12px 0 0; }
    .input__input { font-size: 16px; } /* без автозума на iOS */
    .button { padding: 10px 16px; }
    .form__submit { width: 100%; box-sizing: border-box; margin-left: 0 !important; margin-right: 0 !important; }

    /* Модальные окна (покупка, пополнение, соглашение) */
    .dialog { align-items: flex-start; overflow-y: auto; -webkit-overflow-scrolling: touch; }
    .dialog__window { transform: none; width: calc(100% - 16px); margin: 8px auto; box-sizing: border-box; }
    .window__content { width: auto !important; max-width: 100%; padding: 12px; box-sizing: border-box; }
    .window__title { margin: 16px 40px 0 12px; }
    .window__exit { font-size: 32px; padding: 10px 12px; color: #999; }
    .dialog .footer-lang { margin: 12px 12px 0 0 !important; }
    .payment-method { margin: 0 4px 8px 0; }
    .form__fieldset { margin: 12px 0; }

    /* Сервисы: вкладки и таблицы */
    .tabs { white-space: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tabs__tab { padding: 8px 12px; margin-right: 4px; font-size: 14px; }
    .table, .page table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .hint { padding: 12px; }
    #map, .myip_map_inner { max-width: 100%; overflow: hidden; }
    .page__form { width: 100%; }

    /* Футер */
    .footer__nav { flex-wrap: wrap; padding: 8px 0; }
    .footer__section { line-height: 32px; }
    .footer__copyright { flex: 1 0 100%; text-align: left; padding: 8px; box-sizing: border-box; }
    .footer-lang { margin-left: 8px; }

    /* Личный кабинет */
    .page__tariffs { flex-wrap: wrap; justify-content: center; }
    .page__tariffs .tariff { width: 100%; max-width: 360px; margin: 0 0 12px; }
    .table { font-size: 13px; }
    .table th, .table td { padding: 6px 8px; }
    /* Панель действий над таблицей прокси */
    .page__actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
    .page__actions .actions__item { margin: 0; }
    .page__actions > .actions__item { align-self: flex-start; min-width: 50%; }
    .actions__buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
    .actions__buttons > span.actions__item { flex: 0 0 auto; padding: 0 2px; }
    .actions__buttons > .select { flex: 1 1 0; min-width: 0; }
    .actions__buttons > .select_button:not(.select_prima) { flex: 1 1 calc(50% - 4px); }
    .page__actions .select__current { display: block; width: 100%; box-sizing: border-box; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .page__actions .select__popup { min-width: 100%; box-sizing: border-box; }
    .page__form, .page form { max-width: 100%; }
    .header__actions { right: 0; left: auto; }
    .window__content textarea, .page textarea { max-width: 100%; box-sizing: border-box; }

    /* Удобные для пальца ссылки */
    .footer-seo { gap: 8px 16px; padding-top: 24px; }
    .footer-seo__col a { line-height: 36px; font-size: 14px; }
    .footer-seo__title { margin: 8px 0 4px; }
    .seo-crumbs { margin-top: 16px; font-size: 14px; }
    .seo-crumbs a { display: inline-block; padding: 8px 0; }
    .seo-tag { padding: 9px 14px; }
    .seo-faq__item summary { padding: 6px 0; }
    .pagination { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 0; }
    .pagination li a, .pagination li span { display: inline-block; min-width: 38px; line-height: 38px; text-align: center; box-sizing: border-box; }
}
