/* ============================================================
   ТОПДОМ — правки 18.11.2026 (docs/MOBILE-EDITS.md, пачки 1–4).
   Подключается последним. Всё, кроме блока «ПК и телефон», — только телефон (max-width: 900px).
   Откат: убрать подключение m3.css / m3.js из front/*.php.
   ============================================================ */

/* ---------- ПК и телефон ---------- */
.pi--fl { display: none; }
.pcard__area { font-style: normal; }
.m3-only { display: none; }

@media (max-width: 900px) {
  .m3-only { display: revert; }

  /* ---------- 2.7 шапка: телефон (всплывашка) и Telegram ---------- */
  .m3-hq { display: flex; align-items: center; gap: 6px; margin-left: auto; margin-right: 8px; }
  .m3-hq__b { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--paper, #ededed); color: var(--ink, #111); border: 0; padding: 0; cursor: pointer; }
  .m3-hq__b svg { width: 18px; height: 18px; }
  .header--dark .m3-hq__b, .hdr-dark .m3-hq__b { background: rgba(255,255,255,.16); color: #fff; }
  .menu-open .m3-hq { visibility: hidden; }
  .m3-tel { position: fixed; z-index: 160; top: calc(var(--hdr, 64px) + 8px); right: 12px; left: 12px; padding: 16px; border-radius: 20px; background: #fff; color: var(--ink, #111); box-shadow: 0 18px 48px rgba(0,0,0,.22); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .22s ease, transform .22s ease; }
  .m3-tel.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .m3-tel small { display: block; font-size: 12px; color: var(--ink-3, #878787); }
  .m3-tel b { display: block; margin: 2px 0 12px; font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
  .m3-tel__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .m3-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 12px; border-radius: 999px; font-size: 14px; font-weight: 600; border: 1px solid var(--ink, #111); background: var(--ink, #111); color: #fff; cursor: pointer; white-space: nowrap; }
  .m3-btn--o { background: transparent; color: var(--ink, #111); }
  .m3-btn svg { width: 16px; height: 16px; flex: none; }

  /* ---------- 2.12 меню: компактно, без огромной кнопки ---------- */
  .mobile-menu .m-foot { display: grid; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line, #e1e1e1); }
  .mobile-menu .m-foot > a:first-child { font-size: 22px !important; font-weight: 600 !important; letter-spacing: -.01em; }
  .mobile-menu .m-foot > .btn { display: none; }
  .mobile-menu .m-foot .m3-tel__row { order: 1; }
  .mobile-menu .m-foot .header__soc--menu { order: 2; gap: 8px; }
  .mobile-menu .m-foot .scbtn { order: 3; justify-self: start; }
  .mobile-menu .header__soc--menu .soc { width: 40px; height: 40px; }

  /* ---------- 1 карточка проекта (главная и каталог) ---------- */
  .pcard { aspect-ratio: 4 / 4.3; border-radius: 20px; }
  .pcard > .tag { display: none; }
  .pcard::after { opacity: 1 !important; background: linear-gradient(180deg, rgba(0,0,0,.42) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 48%, rgba(0,0,0,.78) 100%) !important; }
  .pcard .pcard__info { top: 0; opacity: 1; transform: none; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 0; padding: 14px 16px 14px; }
  .pcard .pcard__sub { display: contents; }
  .pcard .pcard__note { order: -1; flex: none; margin: 0 auto 0 0; max-width: 88%; font-size: 12.5px; line-height: 1.3; opacity: .92; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .pcard .pcard__note + * { margin-top: 0; }
  .pcard .pcard__top { margin-top: auto; display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid rgba(255,255,255,.5); }
  .pcard .pcard__top b { font-size: 21px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pcard .pcard__top span { font-size: 16px; font-weight: 500; flex: none; }
  .pcard .pcard__info small { display: flex; align-items: center; gap: 12px; margin: 9px 0 0; font-size: 13.5px; justify-content: flex-start; }
  .pcard .pcard__area { margin-right: auto; font-weight: 500; }
  .pcard .pi--fl { display: inline-flex; }
  .pcard .pi svg { opacity: .85; }

  /* ---------- 1–2 «Популярные проекты»: лента с краем следующей карточки, точки, кнопка под рядом ---------- */
  #projects .head .link-btn { display: none; }
  #projects .proj-grid--2 > .pcard, #projects .proj-grid--2 > .pcell { flex: 0 0 86%; scroll-snap-align: start; }
  #projects .pcell { display: block; }
  #projects .pcell .pcard { height: 100%; aspect-ratio: 4 / 4.3; }
  #projects .pcell .btn--wide { display: none; }
  .m3-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
  .m3-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(0,0,0,.18); transition: width .3s ease, background .3s ease; }
  .m3-dots i.on { width: 20px; background: var(--ink, #111); }
  .m3-more { margin-top: 14px; width: 100%; justify-content: space-between; }

  /* ---------- 3 калькулятор: компактно ---------- */
  .calc { padding: 16px; gap: 14px; border-radius: 20px; }
  .calc h3 { font-size: 19px; line-height: 1.15; }
  .calc__ctl { gap: 12px; }
  .calc__lab { margin-bottom: 6px; font-size: 13px; align-items: baseline; }
  .calc__lab output { font-size: 18px; }
  .calc #lvlTabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 999px; background: var(--paper, #ededed); }
  .calc #lvlTabs .pill { height: 34px; min-height: 0; padding: 0 4px; font-size: 12.5px; justify-content: center; white-space: nowrap; border: 0; }
  .calc__res { display: grid; grid-template-columns: 1fr; gap: 0; padding-top: 12px; border-top: 1px solid var(--line, #e1e1e1); text-align: left; }
  .calc__res small { font-size: 12px; }
  .calc__res b { font-size: 28px; margin: 2px 0 12px; }
  .calc__res .btn { width: 100%; min-height: 48px; justify-content: space-between; }

  /* ---------- 4 технологии: заголовок карточки не обрезается ---------- */
  .tc b { font-size: 23px; overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; max-width: 100%; }
  .tc p { -webkit-line-clamp: 3; font-size: 13.5px; }

  /* ---------- 4 «ТопДом в цифрах»: белые плитки 2×3 ---------- */
  #company .num-grid { grid-template-columns: 1fr 1fr; gap: 8px; border-top: 0; }
  #company .num, #company .num:nth-child(n) { padding: 14px 14px 13px; border: 0; border-radius: 16px; background: #fff; display: flex; flex-direction: column; }
  #company .num b { font-size: 34px; font-weight: 300; line-height: 1; letter-spacing: -.04em; }
  #company .num span { margin-top: 8px; font-size: 13px; line-height: 1.2; }
  #company .num p { margin-top: 3px; font-size: 11.5px; line-height: 1.3; color: var(--ink-3, #878787); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }

  /* ---------- 5 / 2.1 посёлки на главной ---------- */
  .vill__stage { background: transparent; }
  .vill__map { height: calc(100vw / 1.4045) !important; min-height: 0 !important; background: transparent !important; }
  .vill__map .mapbox { top: 0 !important; }
  .m3-mapcap { display: flex; align-items: center; gap: 8px; margin: 10px var(--gutter) 0; font-size: 12.5px; line-height: 1.3; color: var(--ink-3, #878787); }
  .m3-mapcap::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--acc, #111); box-shadow: 0 0 0 4px rgba(0,0,0,.08); flex: none; }
  .vill__side { border-top: 0 !important; }
  .vill__side h2 { white-space: nowrap; font-size: 28px; }

  /* ---------- 2.2 «Прозрачность и честность»: короткие карточки этапов с фото ---------- */
  #fix .fix__bgs { display: none; }
  #fix .head .lead { display: none; }
  #fix .fix__chips { margin-top: 12px; gap: 6px; }
  #fix .fix__chips .chip { font-size: 12px; padding: 6px 10px; height: auto; }
  #fix .stages { display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; margin: 18px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 4px; scroll-padding: 0 var(--gutter); border-top: 0; scrollbar-width: none; grid-template-columns: none; }
  #fix .stages::-webkit-scrollbar { display: none; }
  #fix .stage, #fix .stage:nth-child(n), #fix .stage + .stage { flex: 0 0 72%; scroll-snap-align: start; position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 250px; padding: 16px; border: 0; border-radius: 20px; background: #333 center / cover no-repeat; background-image: var(--sbg); color: #fff; opacity: 1; transform: none; }
  #fix .stage::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.8) 100%); }
  #fix .stage em { position: absolute; top: 12px; left: 14px; margin: 0; font-size: 13px; font-weight: 600; line-height: 1; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--ink, #111) !important; letter-spacing: 0; }
  #fix .stage em::before { content: "Этап "; }
  #fix .stage b { font-size: 19px; font-weight: 500; line-height: 1.15; color: #fff !important; }
  #fix .stage__plate { display: block !important; position: static; width: auto; margin-top: 6px; padding: 0; background: none; box-shadow: none; opacity: 1 !important; transform: none !important; visibility: visible !important; pointer-events: none; }
  #fix .stage__plate p { color: rgba(255,255,255,.86); font-size: 12.5px; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
  #fix .fix__list { display: none; }

  /* ---------- 2.3 оплата: подложка секции и фон под активную карточку ---------- */
  #pay { position: relative; isolation: isolate; overflow: hidden; background: #1d1d1d; color: #fff; }
  #pay .h2 { color: #fff; }
  #pay .head .lead { color: rgba(255,255,255,.78); }
  .m3-pbg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
  .m3-pbg i { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transform: scale(1.06); transition: opacity .7s ease, transform 1.6s ease; }
  .m3-pbg i.on { opacity: 1; transform: none; }
  .m3-pbg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,.72), rgba(10,10,10,.5) 45%, rgba(10,10,10,.82)); }
  #pay .pay-grid > .pay { background: rgba(255,255,255,.96); border: 0; color: var(--ink, #111); }
  #pay .mort { margin-top: 14px; }

  /* ---------- 2.4 «Посмотрите вживую»: крупнее, фото + тёмная подплашка ---------- */
  .locs > .loc, .locs > .loc:nth-child(n) { flex: 0 0 86%; aspect-ratio: auto !important; padding: 0 !important; display: flex; flex-direction: column; justify-content: flex-start; background: #2a2a2a; border-radius: 20px; text-align: left; }
  .loc::after { display: none; }
  .loc .m3-ph { position: relative; isolation: isolate; aspect-ratio: 4 / 3; overflow: hidden; display: flex; align-items: flex-end; padding: 14px 16px; }
  .loc .m3-ph img { position: absolute; inset: 0; z-index: -2; }
  .loc .m3-ph::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.6) 100%); }
  .loc .m3-ph h3 { font-size: 24px; line-height: 1.08; }
  .loc .m3-pl { display: grid; gap: 6px; padding: 12px 16px 16px; }
  .loc .m3-pl .tag { position: static; justify-self: start; padding: 4px 9px; font-size: 11px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.85); border: 0; }
  .loc .m3-pl p { margin: 0; font-size: 13px; line-height: 1.35; opacity: .75; }
  .loc .m3-pl .loc__go { margin-top: 4px; font-size: 14px; }

  /* ---------- 2.5 подвал: ничего не вылезает за край ---------- */
  .footer, .footer__grid, .footer__grid > div { min-width: 0; max-width: 100%; }
  .footer__grid > div:last-child { grid-template-columns: 1fr; }
  .footer__grid > div:last-child > * { grid-column: 1 !important; grid-row: auto !important; min-width: 0; }
  .footer__grid > div:last-child p { overflow-wrap: anywhere; white-space: normal !important; }
  .footer__soc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px !important; }
  .footer__soc a { width: 38px; height: 38px; }
  .footer .fv { overflow-wrap: anywhere; }
  .footer__legal { overflow-wrap: anywhere; font-size: 11px; }
}

/* 2.6 поиск по названию в каталоге (ПК — в панели, телефон — в строке под заголовком) */
.psearch { position: relative; display: flex; align-items: center; flex: 0 1 220px; min-width: 150px; height: 40px; border-radius: 999px; background: var(--paper); color: var(--ink-3); transition: box-shadow .2s; }
.psearch svg { position: absolute; left: 13px; width: 17px; height: 17px; pointer-events: none; }
.psearch input { width: 100%; height: 100%; padding: 0 14px 0 38px; border: 0; border-radius: inherit; background: none; font: inherit; font-size: 14px; color: var(--ink); outline: none; -webkit-appearance: none; appearance: none; }
.psearch input::placeholder { color: var(--ink-3); }
.psearch:focus-within { box-shadow: 0 0 0 1.5px var(--ink); }
@media (min-width: 901px) { .pbar .pf--end { margin-left: 0; } .pbar .psearch { margin-left: auto; } }

@media (max-width: 900px) {
  /* каталог: старая полоса фильтров и «найдено» скрыты, вместо них — строка-инструмент */
  #catalog { padding-top: calc(var(--hdr) + 10px) !important; }
  .chead__found { display: none !important; }
  html:not(.m3-pf) .pbar:not(.is-spec) { display: none; }
  .m3-ptool { position: sticky; top: var(--hdr); z-index: 20; display: flex; align-items: center; gap: 8px; margin: 0 calc(-1 * var(--gutter)) 12px; padding: 8px var(--gutter); background: #fff; border-bottom: 1px solid var(--line); }
  .m3-ptool .psearch { flex: 1 1 auto; min-width: 0; height: 44px; }
  .m3-ptool .psearch input { font-size: 16px; }
  .m3-ptool__b { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--ink); }
  .m3-ptool__b svg { width: 21px; height: 21px; }
  .m3-ptool__b i { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent, #e2462b); box-shadow: 0 0 0 2px var(--paper); }
  .m3-ptool__b i[hidden] { display: none; }

  /* полноэкранное меню фильтров */
  html.m3-pf, html.m3-pf body { overflow: hidden; }
  html.m3-pf .pbar:not(.is-spec) { display: block; position: fixed; inset: 0; z-index: 130; background: #fff; pointer-events: auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  html.m3-pf .pbar__eye { display: none; }
  html.m3-pf .pbar__panel { position: static; min-height: 100%; padding: 0 var(--gutter) 96px; border-radius: 0; box-shadow: none; background: #fff; clip-path: none !important; }
  html.m3-pf .m3-pf__h { display: flex; position: sticky; top: 0; z-index: 2; align-items: center; justify-content: space-between; height: 60px; margin: 0 calc(-1 * var(--gutter)) 8px; padding: 0 var(--gutter); background: #fff; border-bottom: 1px solid var(--line); }
  .m3-pf__h b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
  .m3-pf__h button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); }
  .m3-pf__h svg { width: 20px; height: 20px; }
  html.m3-pf .pbar__filters { display: block; }
  html.m3-pf .pbar__row { display: grid !important; grid-template-columns: 1fr; gap: 10px; padding: 0 !important; overflow: visible; -webkit-mask-image: none !important; mask-image: none !important; }
  html.m3-pf .pbar__row--more { margin-top: 10px; }
  html.m3-pf .pbar__row .dd, html.m3-pf .pbar__row .dd__b { width: 100%; }
  html.m3-pf .pbar__row .dd__b { height: 50px; justify-content: space-between; border-radius: 14px; }
  html.m3-pf .pbar__row .pf:not(.pf--end) { grid-column: 1 / -1; display: flex; flex-direction: row; align-items: center; justify-content: space-between; height: 50px; padding: 0 6px 0 14px; border-radius: 14px; background: var(--paper); }
  html.m3-pf #pToggle, html.m3-pf .pf--end, html.m3-pf .pbar .psearch, html.m3-pf .dd[data-dd="sort"] { display: none !important; }
  html.m3-pf .m3-pf__f { display: grid; grid-template-columns: auto 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
  .m3-pf__f .m3-btn { height: 50px; justify-content: center; }
  .m3-pf__f .m3-btn:disabled { opacity: .4; }
}

/* 2.8–2.9 страница проекта (телефон) */
@media (max-width: 900px) {
  /* без тёмной плашки сверху: только маленькая кнопка «назад» поверх фото, остаётся при прокрутке */
  .pbar.is-spec .pbar__panel, .pbar.is-spec .pbar__eye { display: none !important; }
  .pbar.is-spec .pback { display: inline-flex !important; align-items: center; position: fixed; top: calc(var(--hdr) + 10px); left: 12px; z-index: 96; width: 42px; height: 42px !important; padding: 0; gap: 0; justify-content: center; border-radius: 50%; font-size: 0; background: rgba(255, 255, 255, .94) !important; color: var(--ink) !important; box-shadow: 0 4px 18px rgba(0, 0, 0, .2) !important; opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; transform: none !important; }
  .pbar.is-spec .pback svg { width: 20px; height: 20px; }
  .pv-hero { margin-top: var(--hdr) !important; }
  .pv-crumbs { display: none !important; }
  .m3-area { position: absolute; left: 12px; bottom: 12px; z-index: 3; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--ink); font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
  .pv-dots { justify-content: flex-end; }
  /* дом со всех сторон */
  .m3-gal { padding: 8px 0 28px !important; }
  .m3-gal .h2 { font-size: 26px; margin-bottom: 12px; }
  .m3-gal__row { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scroll-padding: 0 var(--gutter); scrollbar-width: none; }
  .m3-gal__row::-webkit-scrollbar { display: none; }
  .m3-gal__row img { flex: 0 0 84%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; scroll-snap-align: start; background: var(--paper); }
  /* планировка: без повторов площади/этажей, помещения — аккордеон */
  #pv-plan .plan-facts { display: none; }
  #pv-plan .plan-rooms { width: 100%; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
  .m3-acc { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 16px; font-size: 15px; font-weight: 600; text-align: left; }
  .m3-acc span { flex: 1; }
  .m3-acc small { min-width: 24px; padding: 2px 8px; border-radius: 999px; background: var(--paper); font-size: 12px; text-align: center; }
  .m3-acc svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
  .plan-rooms.is-open .m3-acc svg { transform: rotate(180deg); }
  #pv-plan .plan-rooms ul { display: none; margin: 0; padding: 0 16px 10px; columns: 1 !important; }
  #pv-plan .plan-rooms.is-open ul { display: block; }
  #pv-plan .plan-rooms li { display: flex; justify-content: space-between; padding: 8px 0 !important; border-top: 1px solid var(--line); font-size: 14px !important; }
  /* комплектации: отдельные карточки, номер кружком, список в столбик; карточка в середине экрана — с фото фоном */
  #pv-kits .levels { display: flex; flex-direction: column; gap: 12px; border: 0; border-radius: 0; background: none; overflow: visible; }
  #pv-kits .level { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "num chip" "h h" "list list" "foot foot"; align-items: center; gap: 4px 12px; min-height: 0; padding: 18px 18px 16px; border: 1px solid var(--line) !important; border-radius: 24px; background: #fff; }
  #pv-kits .level__num { grid-area: num; width: 36px; height: 36px; margin: 0; border-radius: 50%; display: grid; place-items: center; background: var(--paper); font-size: 16px !important; font-weight: 600; line-height: 1; letter-spacing: 0; transition: background .5s, color .5s; }
  #pv-kits .level__chip { grid-area: chip; justify-self: end; align-self: center; }
  #pv-kits .level h3 { grid-area: h; margin: 10px 0 0; font-size: 24px !important; }
  #pv-kits .level__list, #pv-kits .level .lead2 { grid-area: list; display: grid; gap: 7px; margin: 10px 0 4px; font-size: 14.5px; columns: auto !important; grid-template-columns: 1fr !important; }
  #pv-kits .level.is-center .level__bg img { filter: brightness(.5); }
  #pv-kits .level__foot { grid-area: foot; margin-top: 10px; padding-top: 12px; border-top: 1px solid rgba(127, 127, 127, .25); }
  #pv-kits .level__foot b { font-size: 22px; }
  #pv-kits .level.is-center { border-color: transparent !important; }
  #pv-kits .level.is-center .level__num { background: rgba(255, 255, 255, .18); }
  #pv-kits .level--cta { background: var(--ink); border-color: var(--ink) !important; }
  #pv-kits .level--cta .level__num { background: rgba(255, 255, 255, .14); }
  /* 2.9 «Ваш дом начинается здесь»: текст плашек целиком */
  #pv-start .act > span:not(.btn__ic):not(.act__bg) { -webkit-line-clamp: 3; }
  #pv-start .act__bg img { filter: brightness(.48); }
  #pv-start .act > span:not(.btn__ic):not(.act__bg) { color: rgba(255,255,255,.88) !important; }
  #pv-start .act { min-height: 128px; align-items: end !important; }
}

/* 2.10–2.11 построенные дома (телефон) */
@media (max-width: 900px) {
  #bFilter { display: grid; grid-template-columns: .7fr 1fr 1.15fr 1fr; gap: 2px; width: 100%; padding: 3px; }
  #bFilter .pill { height: 34px; padding: 0 4px; font-size: 12.5px; white-space: nowrap; justify-content: center; }
  /* заявка: фото сверху, текст и кнопка — на тёмной подложке под ним */
  .bcta { display: flex !important; flex-direction: column; aspect-ratio: auto !important; min-height: 0 !important; background: var(--ink); border-radius: 24px; }
  .bcta::after { display: none; }
  .bcta .bcard__img { position: relative; inset: auto; z-index: 0; display: block; aspect-ratio: 4 / 3; }
  .bcta .bcard__img img { object-position: 60% 30%; }
  .bcta .bcard__top { z-index: 1; }
  .bcta .bcard__top .tag { background: rgba(255, 255, 255, .94); color: var(--ink); }
  .bcta__b, .bcta.is-narrow .bcta__b { position: static; max-width: none; padding: 20px 18px 18px; }
  .bcta__t { font-size: 27px; }
  .bcta.is-narrow .bcta__s { display: block; }
  .bcta__s { font-size: 14px; opacity: .78; }
  .bcta .btn { width: 100%; justify-content: space-between; margin-top: 18px; background: #fff !important; color: var(--ink) !important; }
  .bcta .btn .btn__ic { background: var(--ink) !important; color: #fff !important; }
}

/* 2.13 общая карта посёлков (телефон): без полос, без «Павловых озёр», аккуратные подписи */
@media (max-width: 900px) {
  .vpage .map-area:not(.opened) { height: auto !important; aspect-ratio: 1.5988; }
  .vpage .map-area:not(.opened) .mapbox { top: 0 !important; }
  .vpage .point[data-s="pavlovy"] { display: none !important; }
  .vpage .point::after { top: 4px; padding: 3px 8px; border-radius: 999px; background: #fff; color: var(--ink, #111); font: 600 10px/1.2 "Manrope", sans-serif; letter-spacing: -.01em; box-shadow: 0 2px 8px rgba(0, 0, 0, .14), 0 0 0 1px rgba(0, 0, 0, .05); }
  .vpage .point[data-l="Алексино"]::after { top: auto; }
  .vpage .point[data-v]::after { background: var(--ink, #111); color: #fff; }
}

/* 2.14 генплан посёлка (телефон) */
@media (max-width: 900px) {
  .vpage .map-area.opened .vsvg { touch-action: none; }
  .vpoi { width: 30px !important; height: 30px !important; margin: -15px 0 0 -15px !important; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .4)); }
  .vpoi::after { font-size: 11px; padding: 4px 9px; }
  .vnums text { opacity: 1; }
  .m3-vbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px var(--gutter, 16px) 4px; background: #fff; position: relative; z-index: 2; }
  .m3-vbar[hidden] { display: none; }
  .m3-vbar .vmap-note { position: static !important; order: 3; width: 100%; margin: 2px 0 0; padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; font-size: 12px; font-weight: 500; color: var(--ink-3, #6f6f6f); }
  .m3-vbar .vmap-note i { width: 6px; height: 6px; }
  .m3-vbar .vmap-legend { position: static !important; display: flex; flex-wrap: wrap; gap: 6px; order: 1; }
  .m3-vbar .vmap-legend span { padding: 5px 10px; font-size: 11.5px; background: var(--paper, #f0f0f0); box-shadow: none; }
  .m3-vbar .vmap-clean { position: static !important; order: 2; padding: 5px 10px; font-size: 11.5px; background: var(--paper, #f0f0f0); box-shadow: none; }
  .m3-vbar .vmap-clean.is-on { background: var(--ink, #111); color: #fff; }
}
@media (max-width: 900px) {
  .vmap-card.m3-sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 138; width: auto; max-height: 82vh; overflow-y: auto; overscroll-behavior: contain; padding: 22px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: #fff; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .38), 0 -10px 40px rgba(0, 0, 0, .2); animation: m3SheetUp .38s cubic-bezier(.2, .8, .2, 1); }
  .vmap-card.m3-sheet::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(0, 0, 0, .15); }
  @keyframes m3SheetUp { from { transform: translateY(100%); } to { transform: none; } }
}
@media (max-width: 900px) {
  .vmap-card.m3-sheet dl > div:has(> dd.is-na) { display: none; }
  .vmap-card.m3-sheet dl { margin: 10px 0 16px; padding: 12px 14px; border-radius: 16px; background: var(--paper, #f2f2f2); }
}

/* 2.15 «Можно выбрать сейчас»: карточки не въезжают анимацией внутри прокрутки — она резала их о край */
@media (max-width: 900px) {
  .mo-on .vsale__track .hs.mo { opacity: 1; translate: none; transition: border-color .25s; }
  .vsale__track { padding-top: 2px; }
}

/* 2.16 «Дома и участки»: серая подложка, компактные карточки, ~1,5 экрана и «Раскрыть всю таблицу» под ними */
@media (max-width: 900px) {
  section.vs.vtable { background: var(--paper) !important; }
  .vtable .vtable__scroll { overflow: hidden; max-height: 150svh; border: 0; border-radius: 0; background: transparent; -webkit-mask-image: linear-gradient(#000 calc(100% - 140px), transparent); mask-image: linear-gradient(#000 calc(100% - 140px), transparent); }
  .vtable .vtable__scroll.is-open { max-height: none; -webkit-mask-image: none; mask-image: none; }
  .vt tbody { display: flex; flex-direction: column; gap: 8px; }
  .vt tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; padding: 14px 16px; border: 0 !important; border-radius: 16px; background: #fff; }
  .vt tbody tr::before, .vt tbody tr::after { content: ""; flex-basis: 100%; height: 0; order: 3; }
  .vt tbody tr::before { order: 5; }
  .vt td:nth-child(1) { order: 1; font-size: 17px; margin-right: 2px; }
  .vt td:nth-child(2) { order: 2; flex: 1 1 0; color: var(--ink-2); margin: 0; font-size: 14px; }
  .vt td:nth-child(3) { order: 2; }
  .vt td:nth-child(n+4):nth-child(-n+8) { order: 4; padding: 4px 10px; border-radius: 999px; background: var(--paper) !important; font-size: 13px; }
  .vt td[data-m3="na"] { display: none; }
  .vt td:nth-child(n+4):nth-child(-n+8)::before { display: inline; margin: 0 4px 0 0; font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 400; color: var(--ink-3); }
  .vt td:nth-child(8)::before { content: none; }
  .vt td:nth-child(9) { order: 6; font-size: 17px; font-weight: 600; }
  .vt td:nth-child(10) { order: 6; margin-left: auto; }
  .vtable__expand.m3-vtex { margin-top: 14px; width: 100%; justify-content: center; }
}

/* 3.2–3.4 страница посёлка */
.gal figcaption p { display: none; }
@media (max-width: 900px) {
  /* 3.2 слайдер глав — меньше, влезает в экран */
  .vdeck__img { height: 168px !important; min-height: 0 !important; aspect-ratio: auto !important; }
  .vdeck__img i { font-size: 40px !important; }
  .vdeck__txt { padding: 16px 18px 18px !important; }
  .vdeck__txt .eyebrow { font-size: 11.5px; margin-bottom: 4px; }
  .vdeck__txt h3 { font-size: 19px !important; line-height: 1.2; margin: 0 0 8px !important; }
  .vdeck__txt p { font-size: 14px !important; line-height: 1.45; margin: 0 0 12px !important; }
  .vdeck__txt .route__chips { gap: 6px; }
  .vdeck__txt .route__chips span { padding: 5px 10px; font-size: 12px; }
  .vdeck__sl { min-height: 0 !important; }
  /* 3.3 «Рядом с домом»: фон у плашки в середине экрана */
  .infra div[style*="--bg"] { min-height: 132px; }
  .infra div[style*="--bg"]::before { transition: opacity .6s var(--ease), transform 1.2s var(--ease); }
  .infra div.is-center[style*="--bg"]::before { opacity: 1; transform: none; }
  .infra div.is-center[style*="--bg"] em, .infra div.is-center[style*="--bg"] p { color: #fff !important; }
  /* 3.4 «Как здесь живут»: плашка с пояснением раскрывается по тапу */
  .gal { grid-template-columns: 1fr !important; gap: 10px; }
  .gal figure { height: 210px; cursor: pointer; }
  .gal figure::after { opacity: .75 !important; transition: opacity .4s, background .4s; }
  .gal figure.is-open::after { background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,.25) 75%); opacity: 1 !important; }
  .gal figcaption { opacity: 1 !important; transform: none !important; left: 12px !important; right: 12px; bottom: 12px !important; display: grid; grid-template-rows: auto 0fr; padding: 0; background: none; transition: grid-template-rows .45s var(--ease); }
  .gal figcaption > span { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.94); font-size: 13px; font-weight: 600; }
  .gal figcaption > span::after { content: "+"; font-weight: 400; font-size: 16px; line-height: 1; transition: transform .35s var(--ease); }
  .gal figure.is-open figcaption { grid-template-rows: auto 1fr; }
  .gal figure.is-open figcaption > span::after { transform: rotate(45deg); }
  .gal figcaption p { display: block; overflow: hidden; min-height: 0; margin: 0; color: #fff; font-size: 14.5px; font-weight: 400; line-height: 1.45; opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .45s var(--ease); }
  .gal figure.is-open figcaption p { padding-top: 10px; opacity: 1; transform: none; transition-delay: .1s; }
  .gal figure.is-open img { transform: scale(1.05); }
}

/* 3.5–3.9 Технологии */
.ly__d { display: none; }
@media (max-width: 900px) {
  /* 3.5 hero во весь экран и темнее (то же у инженера и «О компании») */
  .phero { min-height: calc(100svh - var(--hdr)) !important; }
  .phero::after { background: linear-gradient(0deg, rgba(0,0,0,.86) 0%, rgba(0,0,0,.55) 50%, rgba(0,0,0,.35) 100%) !important; }
  /* 3.6 табы — переносом, без обрезки при прокрутке */
  .wx-tabs, .cmp-m__tabs { flex-wrap: wrap !important; overflow: visible !important; width: auto !important; border-radius: 22px !important; gap: 4px; padding: 5px !important; }
  .wx-tabs .pill, .cmp-m__tabs .pill { flex: 1 1 auto; justify-content: center; height: 38px; font-size: 14px; }
  /* 3.6 разрез стены горизонтально: слой — строка с образцом, названием, толщиной и «зачем» */
  .wx__layers { flex-direction: column; height: auto !important; gap: 0; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
  .wx__layers::before, .wx__layers::after { padding: 8px 14px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); background: var(--paper); }
  .wx__layers::before { content: "↑ Снаружи — улица"; }
  .wx__layers::after { content: "↓ Внутри — дом"; }
  .ly { width: 100% !important; display: grid; grid-template-columns: 54px 1fr; grid-template-rows: auto auto; column-gap: 12px; padding: 0; min-height: 66px; background: #fff !important; box-shadow: none !important; opacity: 0; translate: 0 8px; transition: opacity .5s var(--d), translate .5s var(--d); }
  .wx__layers.is-in .ly { opacity: 1; translate: none; }
  .ly + .ly { border-top: 1px solid var(--line); }
  .ly::before { content: ""; grid-row: 1 / 3; align-self: stretch; }
  .ly--brick::before { background: repeating-linear-gradient(0deg, #9b5a40 0 13px, #d9cfc3 13px 15px); }
  .ly--brick2::before { background: repeating-linear-gradient(0deg, #b0674a 0 13px, #cfc5b9 13px 15px); }
  .ly--air::before { background: #eef1f3; }
  .ly--wool::before { background: repeating-linear-gradient(-45deg, #f0dfa2 0 7px, #e5cd7c 7px 14px); }
  .ly--gas::before { background: radial-gradient(circle at 30% 40%, rgba(0,0,0,.14) 1.5px, transparent 2px) 0 0 / 9px 9px, #e6e5e1; }
  .ly--ceramic::before { background: repeating-linear-gradient(90deg, #c06e4c 0 7px, #9d5034 7px 9px); }
  .ly--concrete::before { background: radial-gradient(circle, #7a7a78 2.5px, transparent 3px) 50% 30% / 28px 40px, #b9b8b3; }
  .ly--poly::before { background: radial-gradient(circle, #fff 2px, transparent 2.6px) 0 0 / 8px 8px, #cfcdc6; }
  .ly--plaster::before { background: #f1ece2; }
  .ly--plaster2::before { background: #e2dccf; }
  .ly__t { position: static !important; transform: none !important; writing-mode: horizontal-tb !important; opacity: 1 !important; display: flex !important; justify-content: space-between; align-items: baseline; gap: 8px; padding: 11px 14px 0 0; font-size: 14.5px !important; font-weight: 600; color: var(--ink) !important; white-space: normal !important; text-shadow: none !important; }
  .ly__t b { margin: 0 !important; flex: none; padding: 2px 9px; border-radius: 999px; background: var(--paper); font-size: 12.5px; font-weight: 600 !important; }
  .ly__d { display: block; padding: 3px 14px 11px 0; font-style: normal; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
  .wx__dims span { display: none; }
  .wx__dims { justify-content: flex-start; }
  .wx__dims b::before { content: "Толщина стены "; font-weight: 400; color: var(--ink-3); }
  /* 3.7 «Не только стены»: без нажатия/наведения, у карточки в центре экрана — фото на фоне */
  .eng__i { position: relative; overflow: hidden; isolation: isolate; min-height: 190px; transform: none !important; }
  .eng__i:hover { background: var(--paper); color: inherit; }
  .eng__i:hover p { color: var(--ink-2); }
  .eng__i:hover .eng__ic { transform: none; }
  .eng__i::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0,0,0,.78), rgba(0,0,0,.2) 75%), var(--eb) center / cover no-repeat; opacity: 0; transform: scale(1.06); transition: opacity .6s var(--ease), transform 1.2s var(--ease); }
  .eng__i:nth-child(1) { --eb: url("/assets/opt/step3.webp"); }
  .eng__i:nth-child(2) { --eb: url("/assets/opt/step4.webp"); }
  .eng__i:nth-child(3) { --eb: url("/assets/opt/step6.webp"); }
  .eng__i:nth-child(4) { --eb: url("/assets/opt/step5.webp"); }
  .eng__i.is-center::before { opacity: 1; transform: none; }
  .eng__i.is-center, .eng__i.is-center p { color: #fff !important; }
  .eng__i b, .eng__i p { transition: color .5s; }
  /* 3.8 картинка-заглушка под квизом — убрана; 3.9 квиз — одной карточкой */
  .quiz__r:not(.is-done) { display: none; }
  .quiz { gap: 12px; }
  .quiz__l { background: #fff; border-radius: 24px; padding: 22px 18px 18px; }
  .quiz__l .h2 { font-size: 28px !important; line-height: 1.12; overflow-wrap: anywhere; }
  .quiz__steps { order: 1; margin-top: 18px; padding-top: 0; }
  .quiz__q { order: 2; margin-top: 18px; }
  .quiz__q h3 { font-size: 21px; line-height: 1.25; }
  .quiz__opts button { background: var(--paper); justify-content: flex-start; gap: 12px; padding: 15px 16px; font-size: 15px; }
  .quiz__opts button::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-3); background: #fff; }
  .quiz__opts button svg { margin-left: auto; }
  .quiz__opts button:active { background: var(--ink); color: #fff; }
  .quiz__r.is-done { min-height: 0; display: flex; flex-direction: column; background: #fff; }
  .quiz__r.is-done img { position: static; height: 190px; z-index: 0; }
  .quiz__r.is-done .quiz__card { position: static; background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* 3.10–3.12 Выездной инженер */
@media (max-width: 900px) {
  /* 3.11 + 3.12: у плашки в центре экрана проявляется фото (как в «Не только стены») */
  .ei__c, .eg__i { position: relative; overflow: hidden; isolation: isolate; transform: none !important; box-shadow: none !important; }
  .ei__c:hover { background: #fff; color: inherit; }
  .ei__c:hover p { color: var(--ink-2); }
  .ei__c:hover .ei__ic { transform: none; }
  .ei__c::before, .eg__i::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0,0,0,.8), rgba(0,0,0,.25) 80%), var(--eb) center / cover no-repeat; opacity: 0; transform: scale(1.06); transition: opacity .6s var(--ease), transform 1.2s var(--ease); }
  .ei__c.is-center::before, .eg__i.is-center::after { opacity: 1; transform: none; }
  .ei__c.is-center, .ei__c.is-center p, .eg__i.is-center, .eg__i.is-center p, .eg__i.is-center::before { color: #fff !important; }
  .ei__c.is-center .ei__n { opacity: .35; }
  .ei__c.is-center h3, .eg__i.is-center b { color: #fff !important; }
  .ei__c b, .ei__c p, .ei__c h3, .eg__i b, .eg__i p { transition: color .5s; }
  .ei__c { min-height: 230px; }
  .ei__c:nth-child(1) { --eb: url("/assets/opt/step2.webp"); }
  .ei__c:nth-child(2) { --eb: url("/assets/opt/lm-4.webp"); }
  .ei__c:nth-child(3) { --eb: url("/assets/opt/planning.webp"); }
  /* 3.12 «Что вы получите»: одна колонка, номер слева, текст во всю ширину — без переносов по слову */
  .eg { grid-template-columns: 1fr !important; gap: 8px; }
  .eg__i, .eg__i:last-child { grid-column: auto; display: grid; grid-template-columns: 44px 1fr; column-gap: 10px; align-content: end; min-height: 132px; padding: 18px 18px 18px 16px; }
  .eg__i::before { grid-row: 1 / 3; align-self: start; padding-top: 3px; font-size: 15px; transition: color .5s; }
  .eg__i b { margin: 0; padding: 0; font-size: 18px; }
  .eg__i p { margin-top: 5px; font-size: 14.5px; line-height: 1.4; }
  .eg__i:nth-child(1) { --eb: url("/assets/opt/lm-1.webp"); }
  .eg__i:nth-child(2) { --eb: url("/assets/opt/step3.webp"); }
  .eg__i:nth-child(3) { --eb: url("/assets/opt/lm-3.webp"); }
  .eg__i:nth-child(4) { --eb: url("/assets/opt/step1.webp"); }
  .eg__i:nth-child(5) { --eb: url("/assets/opt/lm-5.webp"); }
}

/* 3.13–3.15 О компании */
@media (max-width: 900px) {
  /* 3.13 цифры в hero — 4 аккуратные плитки, читаются на фото */
  .phero .facts { gap: 8px; border-top: 0; margin-top: 22px; }
  .phero .facts > div, .phero .facts > div + div, .phero .facts > div:nth-child(n) { padding: 12px 14px 13px; margin: 0; border: 0; border-radius: 16px; background: rgba(255,255,255,.1); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
  .phero .facts b { font-size: 34px; }
  .phero .facts span { font-size: 13px; opacity: .85; margin-top: 4px; }
  /* 3.14 «Путь компании» — вертикальная лента: год на линии, карточка с фото справа */
  .tl { overflow: visible; padding: 0 var(--gutter); cursor: auto; }
  .tl__track { flex-direction: column; width: auto; gap: 0; padding: 4px 0 0 28px; }
  .tl__track::before { left: 6px; right: auto; top: 10px; bottom: 30px; width: 2px; height: auto; background: linear-gradient(var(--acc), var(--line)); }
  .tl__i { width: auto !important; padding-bottom: 22px; }
  .tl__y { font-size: 28px; padding-bottom: 0; }
  .tl__y::after { left: -28px; top: 9px; width: 14px; height: 14px; box-shadow: 0 0 0 5px var(--white); }
  .tl__card { margin-top: 10px; display: grid; grid-template-columns: 104px 1fr; grid-template-rows: auto 1fr; column-gap: 14px; padding: 10px; border-radius: 18px; }
  .tl__card:hover { transform: none; box-shadow: none; }
  .tl__card img, .tl__card img.is-logo { grid-row: 1 / 3; width: 104px; height: 104px; aspect-ratio: auto; border-radius: 12px; }
  .tl__card img.is-logo { padding: 12px; }
  .tl__card b { padding: 4px 0 0; font-size: 17px; line-height: 1.25; }
  .tl__card p { padding: 5px 0 2px; font-size: 13.5px; line-height: 1.4; }
  .tl-sec .head .lead { display: none; }
  .tl__nav { display: none !important; }
  /* 3.15 «Признанный участник рынка ИЖС» — сетка 2×2 вместо карусели: всё видно, листать не нужно */
  .assoc__grid { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; overflow: visible !important; margin: 0 !important; padding: 0 !important; border-top: 0; touch-action: auto !important; }
  .assoc__grid > .assoc__item, .assoc__grid > .assoc__item:nth-child(n) { flex: none; padding: 14px 14px 16px !important; border: 0 !important; border-radius: 18px; background: var(--paper); }
  .assoc__logo { height: 44px; max-width: 100%; margin-bottom: 12px; }
  .assoc__item b { font-size: 42px; }
  .assoc__item span { margin-top: 6px; font-size: 13.5px; line-height: 1.3; }
}

/* ревью: ипотечная плашка на тёмном фоне оплаты — рамка; футер «Посёлки» — без пустот, «Сайт ↗» рядом с названием */
@media (max-width: 900px) {
  #pay .mort { box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
  .footer li.fv { gap: 6px 10px; }
  .footer .fv__b { opacity: 1; transform: none; flex-basis: auto; }
  .footer .fv__b a + a { display: none; }
  .footer .fv__b a::after { content: " ↗"; }
}
@media (max-width: 900px) { .lead { -webkit-line-clamp: 4; } }
