/* =====================================================================
   AURUM ESTATE — MOBILE REFINEMENT LAYER
   Подключать последним на всех страницах. Десктоп не затрагивается.
   Цели: убрать горизонтальный вылет, стабилизировать карточки и анимации,
   дать контенту нормальную ширину и сделать элементы удобными для касания.
   ===================================================================== */

@media (max-width: 768px) {
  :root {
    --m-gutter: clamp(16px, 4.5vw, 22px);
    --m-radius: 16px;
    --m-control: 48px;
  }

  html {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    scroll-padding-top: 88px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    font-size: 15px;
    -webkit-tap-highlight-color: transparent;
  }

  main,
  section,
  footer,
  .content-wrapper,
  .rest-of-content,
  .wrap,
  .container,
  .section-inner,
  .section-content {
    min-width: 0;
    max-width: 100%;
  }

  img,
  video,
  iframe,
  canvas,
  svg {
    max-width: 100%;
  }

  img,
  video {
    height: auto;
  }

  h1,
  h2,
  h3,
  h4,
  p,
  a,
  button,
  label,
  li,
  small,
  strong {
    overflow-wrap: anywhere;
  }

  h1,
  .hero-title,
  .bh h1 {
    line-height: 1.02;
    letter-spacing: -.035em;
  }

  section {
    padding-left: var(--m-gutter);
    padding-right: var(--m-gutter);
  }

  /* Шапка: логотип, меню и кнопка не конкурируют за ширину. */
  header,
  #mainHeader {
    left: 0;
    right: 0;
    gap: 10px;
    padding-left: var(--m-gutter);
    padding-right: var(--m-gutter);
  }

  .header-scrolled,
  header.header-scrolled {
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .logo-link {
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc(100% - 98px);
  }

  .logo-img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 36px;
    object-fit: contain;
  }

  .nav-wrapper {
    flex: 0 0 auto;
    min-width: 0;
    gap: 8px;
  }

  .burger {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }

  nav:not(.m-nav) {
    display: none;
  }

  .m-menu {
    max-width: 100vw;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  /* Сдержанная типографика и вертикальный ритм. */
  .section-header {
    min-width: 0;
    flex-wrap: wrap;
    gap: 8px 12px;
    line-height: 1.4;
  }

  .sec-title,
  .bt,
  .projects-title,
  .contact-info h2,
  .mz-h {
    font-size: clamp(1.65rem, 7.2vw, 2.35rem);
    line-height: 1.08;
    letter-spacing: -.025em;
  }

  .sec-lead,
  .bl,
  .bh-sub,
  .hero-subtitle {
    font-size: .96rem;
    line-height: 1.6;
  }

  /* Все обычные CTA доступны пальцем и не выпирают из колонки. */
  .btn-row {
    min-width: 0;
    gap: 10px;
  }

  .btn-lg,
  .btn-ghost,
  .header-btn,
  .submit-btn,
  .sr-cta,
  .sc-all .header-btn,
  .sc-all .btn-ghost {
    max-width: 100%;
    min-height: var(--m-control);
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .btn-row > .btn-lg,
  .btn-row > .btn-ghost {
    min-width: 0;
  }

  input,
  select,
  textarea,
  .aurum-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 48px;
    font-size: 16px !important;
  }

  textarea {
    min-height: 110px;
  }

  /* Reveal-анимации на телефонах больше не держат текст невидимым
     и не создают визуальных скачков при прокрутке. */
  .reveal-text,
  .reveal-text.active,
  .delay-1,
  .delay-2,
  .delay-3 {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
    will-change: auto;
  }

  /* Карточки: без hover-подскоков и масштабирования на тач-экранах. */
  .door,
  .bd,
  .cat-card,
  .proj-card,
  .phil-card,
  .service-card,
  .bkey,
  .pc,
  .sc,
  .cond,
  .kp,
  .mz-adv,
  .mz-lot,
  .cl,
  .sr,
  .scn-out,
  .aurum-form {
    min-width: 0;
    max-width: 100%;
  }

  .door:hover,
  .bd:hover,
  .cat-card:hover,
  .proj-card:hover,
  .phil-card:hover,
  .service-card:hover,
  .pc:hover,
  .sc:hover,
  .mz-lot:hover,
  .door:active,
  .bd:active,
  .cat-card:active,
  .service-card:active,
  .pc:active,
  .sc:active {
    transform: none !important;
  }

  .pc,
  .sc,
  .sr-h,
  .bp,
  .cat-card {
    animation: none !important;
  }

  .pc:hover .pc-m img,
  .sc:hover .sc-m img,
  .cat-card:hover img {
    transform: none !important;
  }

  /* ===================================================================
     КАТАЛОГ — единая сетка, предсказуемая высота медиа и читаемые карточки.
     =================================================================== */
  .catalog {
    padding-top: 34px;
    padding-bottom: 44px;
  }

  .catalog .cat-head {
    min-width: 0;
    display: block;
    margin-bottom: 18px;
  }

  .cat-head h2 {
    font-size: clamp(1.65rem, 7.5vw, 2.1rem);
    line-height: 1.08;
  }

  .cat-head p {
    max-width: 100%;
    margin-top: 10px;
    font-size: .92rem;
    line-height: 1.55;
  }

  .cat-bar {
    position: relative;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    border-radius: var(--m-radius);
  }

  .cat-seg {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    min-width: 0;
  }

  .cat-seg button {
    min-width: 0;
    min-height: 46px;
    padding: 9px 6px;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .cat-tools,
  .cat-meta,
  .cat-filters,
  .cat-chips {
    min-width: 0;
    max-width: 100%;
  }

  .cat-tools {
    gap: 10px;
  }

  .cat-meta {
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .cat-view {
    flex: 0 0 auto;
    max-width: 100%;
  }

  .cat-view button,
  .cat-cx button,
  .cat-filters button {
    min-height: 42px;
  }

  .cat-grid {
    width: 100%;
    min-width: 0;
    gap: 14px;
  }

  /* Обычный вид — одна крупная карточка в строке. */
  .cat-grid:not(.list):not(.mini):not(.compact) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .cat-grid:not(.list) .cat-card,
  .cat-grid:not(.list) .cat-card.lead {
    display: flex;
    flex-direction: column !important;
    grid-column: auto !important;
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-radius: 15px;
  }

  .cat-grid:not(.list) .cat-media,
  .cat-grid:not(.list) .cat-card.lead .cat-media {
    position: relative;
    display: block;
    flex: 0 0 auto !important;
    width: 100%;
    max-width: none !important;
    min-width: 0;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 10 !important;
    overflow: hidden;
  }

  .cat-media img,
  .cat-media picture,
  .cat-media picture img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
  }

  .cat-grid:not(.list) .cat-body,
  .cat-grid:not(.list) .cat-card.lead .cat-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    padding: 15px 15px 16px !important;
  }

  .cat-grid:not(.list) .cat-body h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-bottom: 8px;
    font-size: 1rem;
    line-height: 1.35;
  }

  .cat-grid:not(.list) .cat-place {
    font-size: .78rem;
    line-height: 1.4;
  }

  .cat-grid:not(.list) .cat-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: 8px 0 12px;
    font-size: .78rem;
    line-height: 1.4;
  }

  .cat-grid:not(.list) .cat-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
  }

  .cat-grid:not(.list) .cat-price {
    font-size: 1.08rem;
    line-height: 1.2;
  }

  .cat-grid.compact,
  .cat-grid.mini {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .cat-grid.compact .cat-media,
  .cat-grid.mini .cat-media {
    aspect-ratio: 1 / 1 !important;
  }

  .cat-grid.compact .cat-body,
  .cat-grid.mini .cat-body {
    padding: 10px 10px 12px !important;
  }

  .cat-grid.compact .cat-body h3,
  .cat-grid.mini .cat-body h3 {
    font-size: .78rem;
    line-height: 1.3;
  }

  .cat-grid.compact .cat-price,
  .cat-grid.mini .cat-price {
    font-size: .82rem;
    line-height: 1.2;
  }

  /* Вид «Список» остаётся компактным, но не сжимает текст до узкой полосы. */
  .cat-grid.list {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px;
  }

  .cat-grid.list .cat-card {
    display: flex;
    flex-direction: row !important;
    align-items: stretch;
    min-width: 0;
    min-height: 0;
  }

  .cat-grid.list .cat-media {
    flex: 0 0 38% !important;
    width: 38%;
    max-width: none !important;
    height: auto !important;
    aspect-ratio: 4 / 5 !important;
    min-height: 0;
  }

  .cat-grid.list .cat-body {
    flex: 1 1 0;
    min-width: 0;
    padding: 11px 10px !important;
  }

  .cat-grid.list .cat-body h3 {
    font-size: .82rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .cat-grid.list .cat-price {
    font-size: .85rem;
    line-height: 1.2;
  }

  .cat-grid.list .cat-specs,
  .cat-grid.list .cat-excerpt,
  .cat-grid.list .cat-tag {
    display: none !important;
  }

  .cat-grid.list .cat-foot {
    min-width: 0;
    flex-wrap: wrap;
    gap: 5px;
    padding-top: 8px;
  }

  .cat-card .cat-heart,
  .cat-card .cat-cmp {
    max-width: calc(100% - 12px);
    touch-action: manipulation;
  }

  .cat-note {
    min-width: 0;
    padding: 18px 16px;
    border-radius: var(--m-radius);
  }

  .cat-all {
    width: 100%;
    align-items: stretch;
  }

  .cat-all .header-btn {
    width: 100%;
    justify-content: center;
    min-height: 52px;
    padding: 14px 16px;
    border-radius: 12px;
  }

  /* Главная: карточки каталога и проектов — аккуратные горизонтальные ленты,
     одна большая карточка за раз, без обрезанного текста. */
  #catalog {
    padding-top: 40px;
    padding-bottom: 36px;
  }

  #catGrid.top3 {
    display: flex;
    gap: 12px;
    margin: 0 calc(-1 * var(--m-gutter));
    padding: 2px var(--m-gutter) 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-inline: var(--m-gutter);
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-inline: contain;
    touch-action: auto; /* Не запрещаем вертикальный свайп страницы, начатый на карточке */
    -webkit-overflow-scrolling: touch;
  }

  #catGrid.top3 > .cat-card,
  #catGrid.top3 > .cat-card.lead {
    flex: 0 0 min(calc(100vw - 2 * var(--m-gutter)), 440px);
    width: auto;
    max-width: none;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  #catGrid.top3 > .cat-empty {
    flex: 0 0 100%;
  }

  #catGrid.top3 .cat-card.topc .cat-excerpt {
    display: none !important;
  }

  .projects {
    padding-top: 40px;
    padding-bottom: 36px;
  }

  .projects-title {
    margin-bottom: 18px;
  }

  .projects-grid {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin: 0 calc(-1 * var(--m-gutter));
    padding: 0 var(--m-gutter) 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-inline: var(--m-gutter);
    scroll-snap-type: x mandatory;
    scroll-snap-stop: always;
    overscroll-behavior-inline: contain;
    touch-action: auto; /* Не запрещаем вертикальный свайп страницы, начатый на карточке */
    -webkit-overflow-scrolling: touch;
  }

  .proj-card {
    flex: 0 0 min(84vw, 360px);
    min-width: 0;
    max-width: none;
    padding: 17px;
    scroll-snap-align: start;
    border-radius: 15px;
  }

  .dots {
    min-height: 8px;
  }

  /* Главный экран и CTA: не фиксируем высоту по размеру телефона. */
  .hero {
    height: auto;
    min-height: 0;
  }

  .hero.sub {
    min-height: 0;
    padding-top: calc(var(--hh, 60px) + 28px);
    padding-bottom: 36px;
  }

  .hero.sub .hero-title {
    font-size: clamp(2rem, 10.5vw, 3.1rem);
    line-height: .98;
    letter-spacing: -.035em;
  }

  .hero.sub .btn-row,
  .cta-band .btn-row,
  .scn-out .btn-row {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .hero.sub .btn-row > *,
  .cta-band .btn-row > *,
  .scn-out .btn-row > * {
    width: 100%;
  }

  .hero-stats,
  .bh-stats {
    gap: 12px;
  }

  .cta-band {
    margin-left: var(--m-gutter);
    margin-right: var(--m-gutter);
    margin-bottom: 44px;
    padding: 24px 18px;
    border-radius: var(--m-radius);
    gap: 18px;
  }

  .cta-band h2 {
    font-size: clamp(1.45rem, 7vw, 2rem);
    line-height: 1.12;
  }

  .cta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }

  .chip {
    max-width: 100%;
    font-size: .78rem;
    line-height: 1.35;
  }

  /* Покупателям: шапка, липкий переключатель и сценарии. */
  .bh {
    min-height: 0;
    padding: calc(var(--hh, 64px) + 24px) var(--m-gutter) 28px;
    background-position: center center;
  }

  .bh h1 {
    max-width: 100%;
    font-size: clamp(2rem, 10.5vw, 3rem);
    line-height: 1;
  }

  .bh-sub {
    margin-top: 14px;
    max-width: 100%;
  }

  .bh-doors {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 22px;
  }

  .bd {
    grid-template-columns: 40px minmax(0, 1fr) 12px;
    gap: 12px;
    padding: 15px 14px;
    border-radius: 14px;
  }

  .bd-ico {
    width: 40px;
    height: 40px;
  }

  .bd b {
    font-size: .88rem;
    line-height: 1.25;
  }

  .bd small {
    font-size: .8rem;
    line-height: 1.45;
  }

  .bh-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
  }

  .bh-stats b {
    font-size: 1rem;
  }

  .bh-stats span {
    font-size: .68rem;
    line-height: 1.35;
  }

  .mode {
    position: sticky;
    top: var(--hh, 64px);
    z-index: 80;
    background: rgba(10, 10, 12, .98);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .mode-in {
    display: block;
    padding: 8px var(--m-gutter);
  }

  .seg {
    width: 100%;
    max-width: none;
  }

  .seg button {
    min-width: 0;
    min-height: 44px;
    padding: 7px 8px;
    font-size: .76rem;
    line-height: 1.2;
    white-space: normal;
  }

  .mode-hint {
    display: none;
  }

  .bp[hidden] {
    display: none !important;
  }

  .bp {
    animation: none !important;
  }

  .bs {
    padding: 40px var(--m-gutter) 44px;
  }

  .bt {
    font-size: clamp(1.6rem, 7.2vw, 2.15rem);
  }

  .chs,
  .scn-chips {
    gap: 8px;
    margin-top: 22px;
  }

  .ch,
  .scn-chip {
    min-height: 44px;
    max-width: 100%;
    padding: 10px 14px;
    font-size: .86rem;
    line-height: 1.35;
    white-space: normal;
  }

  .sr,
  .scn-out {
    padding: 18px 16px;
    border-radius: var(--m-radius);
  }

  .pcs,
  .conds,
  .kps,
  .sc-row,
  .bkeys,
  .services-grid,
  .contact-grid,
  .projects-grid-static,
  .bridge-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pcs,
  .kps,
  .conds {
    gap: 12px;
  }

  .pc,
  .sc,
  .kp,
  .cond,
  .bkey {
    border-radius: 14px;
  }

  .pc-t,
  .sc-b,
  .kp,
  .cond,
  .bkey {
    padding: 16px;
  }

  .pc-m,
  .sc-m {
    aspect-ratio: 16 / 10;
  }

  .cl {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px 16px;
  }

  .bform {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 18px 14px;
    border-radius: var(--m-radius);
  }

  .bform .bf {
    min-width: 0;
    padding: 16px 12px;
    gap: 12px;
  }

  .bf-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .bf-scn {
    max-width: 100%;
    white-space: normal;
    border-radius: 12px;
    line-height: 1.45;
  }

  .sc-row {
    display: flex;
    gap: 12px;
    margin: 22px calc(-1 * var(--m-gutter)) 0;
    padding: 2px var(--m-gutter) 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-inline: var(--m-gutter);
    scroll-snap-type: x mandatory;
    scroll-snap-stop: always;
    overscroll-behavior-inline: contain;
    touch-action: auto; /* Не запрещаем вертикальный свайп страницы, начатый на карточке */
    -webkit-overflow-scrolling: touch;
  }

  .sc-row > .sc {
    flex: 0 0 min(86vw, 360px);
    scroll-snap-align: start;
  }

  /* Собственникам: сравнение в столбик на узких экранах и крупные шаги. */
  .bridge-grid {
    display: grid;
    gap: 24px;
  }

  .bstage {
    padding: 18px 12px;
    border-radius: 15px;
  }

  .scene {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .cx {
    min-width: 0;
    padding: 20px 14px 15px;
  }

  .cx b {
    font-size: .78rem;
    line-height: 1.35;
  }

  .cx-st {
    font-size: .8rem;
    line-height: 1.4;
  }

  .cx-lock {
    right: 8px;
    top: 8px;
    width: 32px;
    height: 32px;
  }

  .flow {
    width: 2px;
    height: 18px;
    margin: 0 auto;
    background: repeating-linear-gradient(180deg, rgba(255,255,255,.22) 0 6px, transparent 6px 12px);
  }

  .flow i {
    left: -4px;
    top: 0;
    animation: none !important;
  }

  .cap {
    min-height: 0;
    margin-top: 18px;
    padding: 0 4px;
    text-align: left;
  }

  .cap p {
    margin-left: 0;
    margin-right: 0;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .steps button {
    min-height: 66px;
    padding: 12px 10px 10px;
    font-size: .76rem;
    line-height: 1.3;
    border-radius: 11px;
  }

  .steps button b {
    font-size: .9rem;
  }

  .loss-container,
  .live-ticker-card,
  .total-loss-card,
  .loss-cta-wrap {
    max-width: 100%;
    padding: 18px 16px;
    border-radius: var(--m-radius);
  }

  /* Объектные страницы: герой без лишнего вертикального пустого экрана,
     метрики в 2×2 и удобная галерея. */
  .mz-hero {
    min-height: min(82svh, 720px);
    padding: calc(var(--hh, 64px) + 26px) var(--m-gutter) 30px;
    gap: 22px;
    background-position: center;
  }

  .mz-kick {
    margin-bottom: 14px;
    font-size: .68rem;
    letter-spacing: .14em;
    line-height: 1.5;
  }

  .mz-h {
    max-width: 100%;
    font-size: clamp(1.8rem, 9vw, 2.8rem);
    line-height: 1.02;
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
  }

  .mz-sub {
    max-width: 100%;
    margin-bottom: 24px;
    font-size: .95rem;
    line-height: 1.55;
  }

  .mz-cta,
  .mz-ghost {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

  .mz-toc {
    width: 100%;
    min-width: 0;
    padding-left: 16px;
    font-size: .9rem;
    line-height: 1.5;
  }

  .mz-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
  }

  .mz-stat {
    min-width: 0;
    padding: 20px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .mz-stat:nth-child(odd) {
    border-right: 1px solid var(--border);
  }

  .mz-stat:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .mz-advs,
  .mz-lots {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .mz-adv {
    padding: 22px 18px;
  }

  .mz-sw {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    margin-bottom: 18px;
  }

  .mz-sw button {
    min-width: 0;
    min-height: 44px;
    padding: 9px 8px;
    white-space: normal;
    line-height: 1.25;
  }

  .mz-gal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: clamp(96px, 29vw, 132px);
    gap: 7px;
  }

  .mz-g {
    min-width: 0;
    border-radius: 8px;
  }

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

  .mz-film,
  .video-container {
    max-width: 100%;
    min-width: 0;
    border-radius: 12px;
  }

  .video-container {
    min-height: min(66svh, 420px);
  }

  .video-content {
    padding: 20px 16px 22px;
  }

  .video-content h2 {
    font-size: clamp(1.5rem, 7.5vw, 2rem);
    line-height: 1.1;
  }

  .mz-lot {
    border-radius: 12px;
  }

  .mz-lot:hover {
    transform: none;
  }

  .mz-faq summary {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 0;
    font-size: .94rem;
    line-height: 1.45;
  }

  .mz-faq p {
    padding: 0 0 18px;
    font-size: .9rem;
    line-height: 1.6;
  }

  .mz-final {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  /* Мобильное видео: абсолютный видеослой должен занимать весь контейнер.
     Не меняем URL и не подменяем отсутствующие файлы. */
  .video-container {
    position: relative;
    isolation: isolate;
    overflow: hidden;
  }

  .video-container > video.bg-video,
  .vc-card > video,
  .mz-film > video,
  .mz-film video {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    background: #000;
  }

  .vc-stage {
    /* Avoid division-in-calc() here: it can invalidate the stage height in mobile Safari. */
    height: clamp(500px, calc(147vw + 25px), 610px);
    touch-action: pan-y;
  }

  .vc {
    --vc-w: min(76vw, 300px);
    --vc-step: calc(min(76vw, 300px) + 16px);
  }

  /* Формы, модальные окна и cookie-плашка не выходят за экран. */
  .aurum-form {
    width: 100%;
    padding: 22px 16px;
    gap: 14px;
    border-radius: 15px;
  }

  .form-group {
    min-width: 0;
  }

  .submit-btn {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
  }

  .modal-overlay {
    width: 100%;
    height: 100%;
    height: 100dvh;
    padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .modal-content {
    width: 100%;
    max-width: 560px;
    min-width: 0;
    max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    margin: auto;
    padding: 22px 16px;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 16px;
  }

  .close-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    top: 8px;
    right: 8px;
    cursor: pointer;
    touch-action: manipulation;
  }

  .cookie-banner,
  .cookieBanner {
    left: 12px;
    right: 12px;
    bottom: calc(-100vh - 48px);
    bottom: calc(-100dvh - 48px);
    width: auto;
    max-width: none;
    padding: 16px;
    border-radius: 14px;
    z-index: 10000;
    transition: bottom .35s cubic-bezier(.22,1,.36,1);
    pointer-events: none;
  }

  /* Важно: без .show плашка уходит за пределы экрана.
     Иначе нижний отступ мобильной версии перебивает старое bottom:-200px. */
  .cookie-banner.show {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    pointer-events: auto;
  }

  .cookie-banner:not(.show) {
    bottom: calc(-100vh - 48px) !important;
    bottom: calc(-100dvh - 48px) !important;
    pointer-events: none;
  }

  .cookie-content {
    gap: 12px;
  }

  .cookie-btn,
  .cookie-actions button {
    min-height: 42px;
    max-width: 100%;
  }

  .contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .office-map {
    min-width: 0;
    max-width: 100%;
    min-height: 220px;
    height: 220px;
    border-radius: 12px;
  }

  .social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .social-btn {
    min-height: 44px;
    max-width: 100%;
  }

  /* Скрытые/переключаемые панели не должны занимать место в потоке. */
  [hidden] {
    display: none !important;
  }
}

@media (max-width: 420px) {
  :root {
    --m-gutter: 16px;
  }

  .nav-wrapper > .header-btn {
    display: none;
  }

  .logo-link {
    max-width: calc(100% - 60px);
  }

  .hero.sub .hero-title {
    font-size: clamp(1.85rem, 10vw, 2.5rem);
    letter-spacing: -.03em;
  }

  .cat-seg b {
    font-size: .72rem;
  }

  .cat-grid.compact,
  .cat-grid.mini {
    gap: 8px;
  }

  .cat-grid.compact .cat-body,
  .cat-grid.mini .cat-body {
    padding: 9px !important;
  }

  .cat-grid.list .cat-media {
    flex-basis: 36% !important;
    width: 36%;
  }

  .cat-grid.list .cat-body {
    padding: 9px 8px !important;
  }

  .cat-grid.list .cat-price {
    font-size: .8rem;
  }

  .bh-stats {
    gap: 8px;
  }

  .bh-stats span {
    font-size: .64rem;
  }

  .steps button {
    padding: 10px 8px;
    font-size: .72rem;
  }

  .mz-stat {
    padding: 18px 12px;
  }

  .mbar a {
    min-width: 0;
    padding-left: 4px;
    padding-right: 4px;
    font-size: .68rem;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 768px) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
