/* Телефон: ясная иерархия, удобные касания и окна в видимой области экрана. */
body.site-overlay-open #cw-trigger { display: none; }
@media (max-width:1080px) {
  .header__inner { padding-top: max(8px,env(safe-area-inset-top)); }
  .header__phone, .header__burger { width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .header__burger { flex-direction: column; }
  .header__burger span { margin: 4px auto; }
  .header__burger.is-open span:first-child { transform: translateY(5px) rotate(45deg); }
  .header__burger.is-open span:last-child { transform: translateY(-5px) rotate(-45deg); }
  .mobile-menu { top: var(--header-height); bottom: 0; height: calc(100dvh - var(--header-height)); padding: 0; overflow: hidden; }
  .mobile-menu__nav { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px var(--gutter) 22px; -webkit-overflow-scrolling: touch; }
  .mobile-menu nav > a, .mobile-menu__row > a { display: flex; align-items: center; min-height: 54px; padding: 10px 0; font-family: var(--serif); font-size: 27px; color: var(--pine); line-height: 1.2; text-decoration: none; }
  .mobile-menu__group { padding: 0; }
  .mobile-menu__row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
  .mobile-menu__row > a { flex: 1; }
  .mobile-menu__row a[aria-current="page"] { color: var(--gold); }
  .mobile-menu__toggle { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border: 1px solid var(--gold-line); border-radius: 50%; background: var(--card); color: var(--pine); cursor: pointer; }
  .mobile-menu__toggle svg { width: 23px; height: 23px; transition: transform .2s ease; }
  .mobile-menu__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .mobile-menu__sub { padding: 0 0 12px 14px; gap: 0; }
  .mobile-menu__sub[hidden] { display: none; }
  .mobile-menu__sub a { display: flex; align-items: center; min-height: 44px; padding: 10px 0 10px 20px; font-size: 15px; line-height: 1.5; }
  .mobile-menu__sub a::before { top: 10px; }
  .mobile-menu__contact { flex-shrink: 0; background: var(--card); border-top: 1px solid var(--gold-line); padding: 16px var(--gutter) max(20px,env(safe-area-inset-bottom)); }
  .mobile-menu__phone { display: block; font-size: 29px; margin: 0 0 12px; }
  .mobile-menu__contact .btn { width: 100%; margin-top: 0; }
}

@media (max-width:700px) {
  :root { --gutter: clamp(18px,5.1vw,26px); }
  body { font-size: 16px; -webkit-tap-highlight-color: transparent; }
  a, button, [role="button"] { -webkit-tap-highlight-color: transparent; }
  .btn:active { opacity: .86; }
  .certificate:active, .chan:active { border-color: var(--gold); }
  .header__inner { gap: 4px; padding-left: 14px; padding-right: 12px; }
  .header__logo img { width: 40px; }
  .header__logo-text { font-size: 14px; line-height: 1.2; }
  .header__actions { gap: 0; }
  .btn { min-height: 48px; padding: 16px 22px; font-size: 12px; letter-spacing: .055em; }
  .home-hero__inner { position: relative; }
  .home-hero__portrait { position: absolute; top: 0; left: 0; right: 0; width: 100%; height: 620px; padding: 0; z-index: 0; overflow: hidden; pointer-events: none; }
  .home-hero__portrait img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; object-position: center top; }
  .home-hero__portrait::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg,rgba(255,255,255,.04) 0%,rgba(255,255,255,.14) 22%,rgba(255,255,255,.54) 44%,rgba(255,255,255,.94) 64%,#fff 100%); }
  .home-hero__content { grid-row: 1; padding: 270px 0 28px; }
  .home-hero h1 { max-width: 100%; min-height: 0; font-size: clamp(32px,9vw,38px); line-height: 1.08; margin-bottom: 20px; text-wrap: initial; }
  .home-hero__description { font-size: 15px; line-height: 1.65; margin-bottom: 18px; }
  .home-hero__phone { margin-bottom: 18px; }
  .home-hero__phone span { font-size: 12px; margin-bottom: 5px; }
  .home-hero__phone strong { font-size: 32px; }
  .home-hero__action { min-height: 70px; font-size: 14px; padding: 16px 22px; line-height: 1.45; text-transform: none; letter-spacing: 0; }
  .home-hero__values { top: calc(var(--header-height) + 32px); left: var(--gutter); right: var(--gutter); width: auto; height: 240px; padding: 0; gap: 28px; font-size: 36px; text-align: left; overflow: hidden; }
  .home-hero__values span:nth-child(2) { font-size: 23px; }
  .home-hero__facts { grid-row: 2; padding: 24px 0 28px; column-gap: 22px; row-gap: 22px; background: var(--white); }
  .home-hero__facts strong { font-size: 38px; margin-bottom: 7px; }
  .home-hero__facts span { font-size: 12px; line-height: 1.55; }
  .home-hero__facts a { display: block; }
  .home-hero__membership > svg { width: 35px; height: 35px; margin-bottom: 10px; }
  .ticker { padding: 13px 0; }
  .ticker__track { gap: 30px; }
  .ticker__track span { font-size: 18px; }

  .dirs, .approach, .cases, .reviews, .section { padding: 56px 0; }
  .sect { margin-bottom: 32px; }
  .para { font-size: 10px; letter-spacing: .18em; margin-bottom: 13px; }
  .h2 { font-size: clamp(30px,8.6vw,38px); line-height: 1.12; }
  .sect__lead { font-size: 15px; line-height: 1.7; margin-top: 18px; }
  .dirs__grid, .svcs, .tariffs { gap: 18px; }
  .dcol { padding: 26px 24px; border-radius: 18px; }
  .dcol__num { font-size: 34px; margin-bottom: 15px; }
  .dcol__title { font-size: 24px; margin-bottom: 16px; }
  .dcol__list li { font-size: 15px; line-height: 1.55; padding: 9px 0 9px 22px; }
  .dcol__more { padding-top: 16px; margin-top: 18px; font-size: 11px; letter-spacing: .08em; }
  .dirs__note { gap: 22px; padding: 26px 24px; }
  .dirs__note h3 { font-size: 26px; line-height: 1.15; }
  .dirs__note p { font-size: 15px; line-height: 1.7; }
  .approach__intro { font-size: 17px; line-height: 1.7; }
  .plate--float { width: 100%; margin-bottom: 26px; }
  .rule { gap: 16px; padding: 18px 0; }
  .rule h4 { font-size: 23px; line-height: 1.2; }
  .rule p { font-size: 15px; line-height: 1.65; }
  .cases .cnav { gap: 16px; }
  .cnav__btns button { width: 44px; height: 44px; }
  .dossier { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); gap: 16px; }
  .dcase { flex-basis: min(300px,calc(100vw - 2 * var(--gutter) - 18px)); padding: 64px 24px 24px; }
  .dcase__num { font-size: 70px; top: -8px; }
  .dcase__title { font-size: 25px; line-height: 1.18; }
  .dcase__result { font-size: 14px; line-height: 1.6; }
  .dcase__open { min-height: 44px; align-items: center; margin-top: 6px; }
  .cases__cta { gap: 20px; margin-top: 26px; }
  .cases__cta p { font-size: 23px; line-height: 1.35; }
  .cases__cta .btn { width: 100%; }

  .rvw { gap: 30px; }
  .rvw__sub { margin-top: 18px; font-size: 15px; line-height: 1.7; }
  .rvw__nav { gap: 18px; margin-top: 24px; }
  .rvw__nav button { width: 48px; height: 48px; }
  .rvw__actions { margin-top: 24px; gap: 10px; }
  .rvw__deckwrap { display: flex; flex-direction: column; gap: 16px; padding: 0 0 20px; }
  .seal { position: relative; inset: auto; order: -1; align-self: flex-end; width: 80px; height: 80px; transform: none; filter: none; }
  .seal__num { font-size: 26px; }
  .seal svg { animation: none; }
  .deck { height: 450px; touch-action: pan-y; }
  .sheet { padding: 24px 22px; border-radius: 16px; }
  .sheet__head { font-size: 10px; line-height: 1.5; letter-spacing: .07em; gap: 12px; margin-bottom: 15px; }
  .sheet__stars { margin-bottom: 12px; }
  .sheet__text { font-size: 18px; line-height: 1.55; overscroll-behavior-y: contain; }
  .sheet__text.is-clamped { -webkit-line-clamp: 7; }
  .sheet__more { min-height: 44px; font-size: 11px; padding-top: 10px; letter-spacing: .07em; }
  .sheet__sign { gap: 5px; padding-top: 14px; }
  .sheet__name { font-size: 21px; }

  /* Внутренние страницы читаются без портрета поверх текста. */
  .phero { padding-top: calc(var(--header-height) + 30px); }
  .phero__inner { min-height: 0; gap: 0; }
  .phero__content { padding-bottom: 36px; }
  .phero__ghost, .phero__media { display: none; }
  .phero--compact { padding-bottom: 36px; }
  .breadcrumbs { font-size: 10px; letter-spacing: .09em; margin-bottom: 22px; }
  .phero__title { font-size: clamp(36px,10.2vw,48px); line-height: 1.05; margin-bottom: 22px; }
  .phero__lead { font-size: 15.5px; line-height: 1.7; padding-left: 15px; border-left-width: 2px; margin-bottom: 26px; }
  .phero__btns { gap: 10px; }
  .svc { padding: 26px 24px 22px; border-radius: 18px; }
  .svc__title { font-size: 27px; line-height: 1.12; }
  .svc__text { font-size: 15px; line-height: 1.65; margin-bottom: 14px; }
  .svc__btn { min-height: 44px; font-size: 11.5px; letter-spacing: .07em; text-align: left; }
  .consult { padding: 34px 26px 28px; border-radius: 20px; }
  .consult__price { font-size: 48px; padding-bottom: 20px; margin-bottom: 20px; }
  .consult__list li { font-size: 15px; line-height: 1.6; }
  .consult__bonus p, .consult__note { font-size: 14px; line-height: 1.65; }
  .consult__stamp, .tcard__stamp { font-size: 10px; letter-spacing: .09em; padding: 8px 14px; }
  .factors, .payorder, .probono { padding: 26px 24px; border-radius: 18px; }
  .factors__list li, .payorder__list li { font-size: 15px; line-height: 1.6; }
  .factors__heading { line-height: 1.6; letter-spacing: .14em; font-size: 10.5px; }
  .probono__btns { gap: 10px; }
  .probono__btns .link-gold { display: flex; min-height: 44px; align-items: center; white-space: normal; font-size: 11px; }
  .assure { padding: 30px 0; }
  .assure__item p { font-size: 14px; line-height: 1.6; }
  .steps { gap: 0; }
  .step { padding: 24px 0 24px 22px; }
  .step__num { font-size: 36px; margin-bottom: 12px; }
  .step h4 { font-size: 25px; }
  .step p { font-size: 15px; line-height: 1.65; color: rgba(244,239,229,.8); }
  .tcard { padding: 30px 26px 26px; border-radius: 20px; }
  .tcard__title { font-size: 29px; line-height: 1.15; }
  .tcard__price { font-size: 38px; }
  .tcard__list li { font-size: 15px; line-height: 1.6; }
  .chips { flex-direction: column; align-items: stretch; gap: 10px; }
  .chip { min-height: 48px; padding: 13px 20px; text-align: left; font-size: 14px; }
  .chip b { float: right; }
  .saves { grid-template-columns: 1fr; margin-bottom: 0; border-radius: 18px; }
  .save { text-align: left; padding: 20px 24px; display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 16px; }
  .save span { font-size: 25px; margin-bottom: 0; }
  .save p { font-size: 14px; line-height: 1.55; }
  .saves__title { margin-bottom: 26px; }
  .feature-grid, .feature-grid--4 { grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px !important; }
  .feature { padding: 24px 18px; border-radius: 16px; }
  .feature__num { font-size: 38px; margin-bottom: 14px; }
  .feature h3 { font-size: 23px; line-height: 1.1; }
  .feature p { font-size: 13px; line-height: 1.65; }
  .split { gap: 30px; }
  .split__media .plate { max-width: 350px; }
  .prose p { font-size: 16px; line-height: 1.75; }
  .bandlink { padding: 26px 0; }
  .bandlink .link-gold { display: inline-flex; align-items: center; min-height: 44px; font-size: 11px; white-space: normal; }

  .certificates { margin-top: 36px; padding-top: 36px; }
  .certificates__grid { grid-template-columns: 1fr; gap: 14px; }
  .certificate { display: grid; grid-template-columns: 88px minmax(0,1fr); column-gap: 18px; padding: 16px; align-items: start; }
  .certificate__image { grid-column: 1; grid-row: 1 / 5; height: 116px; margin: 0; }
  .certificate__kind, .certificate__title, .certificate__open { grid-column: 2; }
  .certificate__kind { font-size: 10.5px; line-height: 1.4; margin-bottom: 6px; }
  .certificate__title { font-size: 20px; line-height: 1.18; margin-bottom: 12px; overflow-wrap: break-word; }
  .certificate__open { font-size: 10px; line-height: 1.45; padding-top: 10px; align-self: end; }
  .document-viewer { height: calc(var(--visual-height,100dvh) - 16px); }
  .document-viewer__toolbar { padding: 16px; }
  .document-viewer__close, .max-contact__close { width: 44px; height: 44px; }
  .document-viewer__toolbar h2 { font-size: 21px; line-height: 1.2; }
  .document-viewer:not(.is-zoomed) .document-viewer__image { touch-action: pan-y; }
  .document-viewer__controls { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; gap: 8px; padding: 12px 16px max(12px,env(safe-area-inset-bottom)); }
  .document-viewer__controls > * { min-height: 44px; display: flex; align-items: center; justify-content: center; padding: 9px; }
  [data-document-prev] { grid-column: 1; grid-row: 1; }
  [data-document-zoom] { grid-column: 2; grid-row: 1; }
  [data-document-next] { grid-column: 3; grid-row: 1; }
  #document-viewer-original { grid-column: 1 / -1; grid-row: 2; }

  .cpage__inner { gap: 32px; }
  .cpage__hint { margin-bottom: 26px; font-size: 15px; line-height: 1.65; }
  .cpage__channels { margin-bottom: 32px; border-radius: 18px; }
  .chan { min-height: 76px; padding: 18px 22px; }
  .chan__name { font-size: 10px; letter-spacing: .12em; }
  .chan__val { font-size: 23px; line-height: 1.3; }
  .contacts__socials { gap: 10px; }
  .contacts__socials a { min-height: 44px; display: flex; align-items: center; padding: 10px 16px; }
  .plate--map iframe { height: 320px; }
  .lead { padding: 12px; }
  .lead__frame { padding: 38px 20px; border-radius: 22px; }
  .lead__title { font-size: 34px; line-height: 1.1; margin-bottom: 20px; }
  .lead__phone { font-size: 34px; line-height: 1.2; }
  .lead__messengers { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 8px; font-size: 13px; line-height: 1.8; margin-bottom: 26px; }
  .lead__messengers a { display: inline-flex; align-items: center; min-height: 44px; }
  .lead__btns { gap: 10px; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 28px 22px; padding: 42px 0 34px; }
  .footer__brand, .footer__contacts { grid-column: 1 / -1; }
  .footer__brand { display: grid; grid-template-columns: 115px 1fr; gap: 20px; align-items: center; }
  .footer__brand img { width: 115px; margin-bottom: 0; }
  .footer__brand p { font-size: 13px; line-height: 1.65; }
  .footer__heading { font-size: 10px; letter-spacing: .15em; margin-bottom: 10px; }
  .footer__nav { gap: 0; }
  .footer__nav a { display: flex; align-items: center; min-height: 44px; font-size: 14px; line-height: 1.5; }
  .footer__contacts > a { min-height: 44px; display: flex; align-items: center; margin-bottom: 0; }
  .footer__socials { margin-top: 18px; gap: 14px; }
  .footer__bottom { font-size: 12px; line-height: 1.7; gap: 14px; padding: 22px 0 max(28px,env(safe-area-inset-bottom)); color: rgba(244,239,229,.7); }

  /* Нижние окна не выходят за область над клавиатурой. */
  .cmodal, .fmodal, .dmodal { inset: auto 0; top: var(--visual-top,0px); height: var(--visual-height,100dvh); padding: 16px 8px max(8px,env(safe-area-inset-bottom)); align-items: flex-end; }
  .cmodal__sheet, .fmodal__sheet, .dmodal__sheet { padding: 24px 22px 26px; max-height: 100%; border-radius: 24px 24px 16px 16px; overscroll-behavior: contain; scroll-padding-top: 82px; -webkit-overflow-scrolling: touch; }
  .modal-heading { position: sticky; top: -24px; z-index: 3; display: flex; align-items: center; gap: 14px; margin: -24px -22px 22px; padding: 12px 16px 12px 22px; background: var(--white); border-bottom: 1px solid var(--gold-line); }
  .modal-heading .para, .modal-heading .dmodal__case { order: 1; flex: 1; margin: 0; padding: 0; font-size: 10.5px; line-height: 1.6; letter-spacing: .06em; text-transform: none; }
  .modal-heading button { position: static; order: 2; flex-shrink: 0; width: 44px; height: 44px; background: var(--card); border: 1px solid var(--gold-line); border-radius: 50%; font-size: 26px; }
  .cmodal__title, .fmodal__title, .dmodal__title { font-size: 28px; line-height: 1.15; }
  .cmodal__text, .fmodal__sub { font-size: 15px; line-height: 1.65; }
  .cmodal__phone { gap: 10px; padding: 17px 16px; border-radius: 16px; }
  .cmodal__phone svg { width: 24px; height: 24px; }
  .cmodal__phone span { font-size: 28px; }
  .cmodal__phone small { font-size: 10px; letter-spacing: .08em; }
  .lead-form__row { gap: 0; }
  .lead-form__field { margin-bottom: 18px; }
  .lead-form__field label { font-size: 12px; letter-spacing: .04em; text-transform: none; margin-bottom: 5px; }
  .lead-form__field input, .lead-form__field select, .lead-form__field textarea { font-size: 16px; min-height: 48px; padding: 12px 0; border-radius: 0; }
  .lead-form__consent { font-size: 12px; line-height: 1.6; gap: 12px; }
  .lead-form__consent input { width: 20px; height: 20px; margin-top: 2px; }
  .fmodal__alt { font-size: 13px; line-height: 1.85; }
  .fmodal__alt a { display: inline-block; min-height: 36px; }
  .dmodal__content p { font-size: 15px; line-height: 1.7; }
  .dmodal__foot { gap: 16px; margin-top: 24px; padding-top: 20px; }
  .max-contact { max-height: calc(var(--visual-height,100dvh) - 16px); }
  .max-contact, .document-viewer { top: calc(var(--visual-top,0px) + 8px); bottom: auto; margin: 0 auto; }

  #cw-top { padding: max(12px,env(safe-area-inset-top)) 16px 12px !important; }
  #cw-top-x { width: 44px !important; height: 44px !important; }
  #cw-snd { width: 44px !important; height: 44px !important; }
  .cw-tp { min-height: 44px; font-size: 14px !important; }
  .cw-lead input { font-size: 16px !important; min-height: 48px; }
  .cw-lead label { font-size: 12px; line-height: 1.8; }
  #cw-trigger { right: 16px !important; bottom: max(16px,env(safe-area-inset-bottom)) !important; }
  #cw-trigger-btn { animation: none !important; }
  body.mobile-action-at-bottom #cw-trigger { visibility: hidden; pointer-events: none; }
  .home-hero__action, .chan, .svc__btn, .certificate { -webkit-tap-highlight-color: transparent; }
}
@media (max-width:360px) {
  .header__logo-text { font-size: 13px; }
  .home-hero h1 { min-height: 0; font-size: 32px; }
  .home-hero__content { padding-top: 238px; }
  .home-hero__portrait { height: 560px; }
  .home-hero__description { font-size: 14.5px; }
  .certificate { grid-template-columns: 72px minmax(0,1fr); gap: 14px; padding: 14px; }
  .certificate__image { height: 102px; }
  .certificate__title { font-size: 18px; }
  .feature { padding: 22px 14px; }
  .feature h3 { font-size: 21px; }
  .save { grid-template-columns: 88px 1fr; padding: 18px 20px; gap: 12px; }
  .footer__brand { grid-template-columns: 104px 1fr; gap: 16px; }
  .footer__brand img { width: 104px; }
}
@media (hover:none) and (max-width:700px) {
  .dcol:hover, .dcase:hover, .svc:hover { transform: none; box-shadow: none; }
  .dcase:hover .dcase__stamp { opacity: 0; }
  .feature:hover::after { display: none; }
  .feature:hover h3 { color: var(--pine); }
  .feature:hover p { color: var(--muted); }
  .feature:hover .feature__num { -webkit-text-stroke-color: var(--gold); }
}
@media (max-width:700px) and (max-height:500px) and (orientation:landscape) {
  .home-hero h1 { min-height: 0; font-size: 34px; }
  .home-hero__content { padding-top: 155px; }
  .home-hero__portrait { height: 460px; }
  .home-hero__portrait img { object-fit: contain; }
  .home-hero__values { height: 180px; gap: 18px; }
}
