/* Mobile layout hardening for the main street and portfolio concepts. */

@media (max-width: 1099px) {
  .page-home .seg { width: 100vw; margin-left: 0; margin-right: 0; }
  .page-home .street-line,
  .page-home .colophon { width: 100%; }
}

@media (max-width: 759px) {
  html, body { max-width: 100%; overflow-x: clip; }
  .page-home .seg-entry { display: flex; flex-direction: column; padding-bottom: 0; }
  .page-home .seg-entry svg.scene { order: 1; }

  /* --- сцены крупным кадром: мобильный viewBox -----------------------
     Кадрирование делается подменой viewBox (data-vb-mobile на svg.scene,
     маленький скрипт в index.html). Сцена всегда 100% ширины экрана,
     высота секции выходит из аспекта кадра — пустот и обрезки вслепую
     физически нет. Никаких vw-растяжений и отрицательных полей. */
  .page-home .seg svg.scene { width: 100%; height: auto; margin: 0; }
  .page-home .street-line { padding: 0 16px; }
  .page-home .street-line span { font-size: 9.5px; letter-spacing: .08em; }
  .page-home .legend-plate { order: 2; position: relative; left: auto !important; right: auto; top: auto !important; bottom: auto; width: min(82%, 320px) !important; margin: 10px auto 16px; font-size: 11px; line-height: 1.48; transform: none; }
  .page-home .plaque { position: relative; left: auto !important; top: auto !important; width: min(82%, 320px); margin: 10px auto 16px; transform: none; font-size: 11px; }
  .page-home .plaque h2 { font-size: 16px; }
  .page-home .pl-what { font-size: 11.5px; }
  .page-home .pl-note, .page-home .pl-go { font-size: 11px; }
  .page-home .seg-stroyka, .page-home .seg-stend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 10px 18px; }
  .page-home .seg-stroyka .scene, .page-home .seg-stend .scene { grid-column: 1 / -1; justify-self: stretch; width: calc(100% + 20px); margin: 0 -10px 8px; }
  .page-home .passport, .page-home .sheet { position: relative; left: auto !important; top: auto !important; width: auto !important; height: auto; min-height: 0; margin: 0; padding: 10px; overflow: visible; transform: none; font-size: 10px; line-height: 1.35; }
  .page-home .passport h3 { font-size: 12px; }
  .page-home .passport .pp-b { font-size: 10.5px; }
  .page-home .sheet--hand { grid-column: 1 / -1; width: min(86%, 330px) !important; justify-self: center; font-size: 10.5px; }
  .page-home .seg-post { display: grid; grid-template-columns: 1fr; padding-bottom: 18px; }
  .page-home .seg-post .scene { grid-column: 1; }
  .page-home .postplate, .page-home .lean-plate { position: relative; left: auto !important; top: auto !important; width: min(82%, 320px); margin: 10px auto 0; transform: none; font-size: 11px; }
  .page-home .lean-plate { order: 3; }
  .analytics-consent { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; padding: 21px 13px 12px; gap: 10px; }
  .analytics-consent-copy strong { font-size: 13px; }
  .analytics-consent-copy strong::before { margin-bottom: 4px; font-size: 8px; }
  .analytics-consent-copy p { margin-top: 5px; font-size: 11.5px; line-height: 1.42; }
  .analytics-consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .analytics-consent-actions button { min-height: 42px; padding: 8px 6px; font-size: 9px; letter-spacing: .07em; }
  .page-kreit .top { padding: 9px 12px; }
  .page-kreit .top-phone { margin-left: 0; font-size: 10.5px; }
  .page-kreit .bag { margin-left: auto; }
  .page-kreit .hero, .page-kreit .crates, .page-kreit .how, .page-kreit .cart, .page-kreit .podval { padding-left: 12px; padding-right: 12px; }
  .page-kreit .crate { padding-left: 14px; padding-right: 14px; }
  .page-polustanok .gost { display: table; width: 100%; table-layout: fixed; }
  .page-polustanok .gost .lbl { width: auto; white-space: normal; overflow-wrap: anywhere; }
  .page-polustanok .gost td { padding-left: 5px; padding-right: 5px; overflow-wrap: anywhere; }
  .page-protoka .margin-fig { display: none !important; }
  .page-protoka .book, .page-protoka .wide, .page-protoka .div { width: 100%; padding-left: 16px; padding-right: 16px; }
  .page-protoka .cover { padding-left: 16px; padding-right: 16px; }
  .page-protoka .cover-title { font-size: 32px; letter-spacing: .18em; text-indent: .18em; }
  .page-protoka .cover-line { font-size: 10px; letter-spacing: .14em; }
  .page-protoka .tariff { width: 100%; table-layout: fixed; font-size: 12px; }
  .page-protoka .tariff td:last-child { white-space: normal; overflow-wrap: anywhere; }
  .page-smena .hero-bass { right: -2%; width: 52vw; }
  .page-smena .hero-band, .page-smena .manif-band { max-width: 94vw; }
  .page-voron .hero { min-height: auto; display: block; padding-bottom: 36px; }
  .page-voron .hero-top { display: grid; }
  .page-voron .hero-scope { display: block; margin-top: 30px; }
  .page-voron .hero-h { margin: 44px 0 34px; font-size: clamp(27px, 7.6vw, 34px); line-height: 1.04; }
  .page-voron .hl { overflow: visible; text-align: left; padding-left: 0; }
  .page-voron .hl span { display: block; overflow-wrap: anywhere; }
  .page-voron .stick { position: static; display: inline-block; margin-top: 18px; }
  .page-voron .hero-nav { flex-wrap: wrap; }
  .page-voron .portrait { width: 100%; }
  .page-vysota .hero-topo { right: -12%; width: 115%; max-width: none; }
  .page-vysota .apply-topo { right: -20%; width: 140%; }
  .page-vysota .rrow { grid-template-columns: 84px minmax(0, 1fr); }
  .page-vysota .rprice, .page-vysota .rfiz { grid-column: 2; white-space: normal; }
  .page-vysota .days, .page-vysota .gear { display: block; max-width: 100%; overflow-x: auto; }
}
@media (max-width: 390px) { .analytics-consent-actions { grid-template-columns: 1fr 1fr; } }
