/* Controles táctiles y cuadros ajustados al espacio visible del teléfono. */
@media (max-width:767px), (max-width:1000px) and (max-height:500px) {
  .menu-toggle{width:44px;min-width:44px;height:44px;justify-content:center}
  .desktop-nav a{min-width:44px;justify-content:center}
  .gallery-filters button,.chat-suggestions button,.lead-later{min-height:44px}
  .chat-form input{font-size:16px}
  .chat-form button,.image-expand,.close-button{min-width:44px;min-height:44px}
  .chat-header,.chat-form,.chat-footer,.chat-suggestions{flex-shrink:0}
  .chat-messages{min-height:0;overscroll-behavior:contain}
  .lead-dialog,.chat-dialog,.lightbox{
    --dialog-top-gap:max(8px,env(safe-area-inset-top,0px));
    --dialog-bottom-gap:max(8px,env(safe-area-inset-bottom,0px));
    position:fixed;
    top:calc(var(--phone-viewport-top,0px) + var(--dialog-top-gap));
    bottom:auto;
    max-height:calc(var(--phone-viewport-height,100dvh) - var(--dialog-top-gap) - var(--dialog-bottom-gap));
    margin-block:0;
    overscroll-behavior:contain;
  }
  .lead-dialog,.lightbox{margin-inline:auto}
  .chat-dialog{height:min(670px,calc(var(--phone-viewport-height,100dvh) - var(--dialog-top-gap) - var(--dialog-bottom-gap)))}
  .lightbox{height:min(700px,calc(94vw + 156px),calc(var(--phone-viewport-height,100dvh) - var(--dialog-top-gap) - var(--dialog-bottom-gap)))}
  .phone-keyboard-open .chat-header{padding-block:12px}
  .phone-keyboard-open .chat-header h2{font-size:1.7rem}
  .phone-keyboard-open .chat-suggestions{display:none}
}
@media (max-width:370px) {
  .header,.home-page .header{padding-inline:16px;column-gap:8px}
  .home-page .header .brand{width:88px}
}

/* En el teléfono las fotos tienen prioridad; las rutas se reúnen en el menú. */
@media (max-width:767px) {
  html{scroll-padding-top:88px}
  .header,.home-page .header,.legal-page .header{height:72px;flex-wrap:nowrap;padding-block:0;align-items:center}
  .header .brand,.home-page .header .brand{width:98px;height:auto}
  .header .desktop-nav,.home-page .desktop-nav,.header .header-contact{display:none}
  .header .menu-toggle{margin-left:auto;padding:10px;gap:6px}
  .mobile-nav:not([hidden]),.home-page .mobile-nav:not([hidden]){top:72px;max-height:calc(100dvh - 72px);padding:12px 24px 24px}
  .mobile-nav a{display:flex;align-items:center;min-height:44px}
  .mobile-omit,.hero-delivery small,.hero-address small{display:none}
  .home-page .hero{height:100svh;min-height:600px;padding-top:96px;gap:16px}
  .home-page .hero-layout{padding-bottom:64px}
  .home-page .hero .eyebrow{margin-bottom:12px}
  .hero-playback{display:none}
  .home-page .residence-copy>.small-label,.home-page .residence-copy>h3,.home-page .residence-copy>p{display:none}
  .amenities .section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
  .amenities .section-heading h2{font-size:clamp(1.85rem,7.4vw,2.2rem)}
  .amenities .section-heading p{display:none}
  .amenities .section-heading>.text-link{flex-shrink:0;font-size:.78rem;gap:10px;margin-top:0}
  .amenity-stage{height:clamp(310px,100vw,420px)}
  .amenity-stage:after{background:linear-gradient(0deg,rgba(21,29,34,.7),transparent 45%)}
  .amenity-overlay{left:18px;right:18px;bottom:20px}
  .amenity-overlay>span,.amenity-overlay>p{display:none}
  .amenity-overlay h3{font-size:clamp(1.6rem,6.5vw,2rem);line-height:1.15;margin:0}
  .amenity-stage>.photo-collection-button{width:44px;height:44px;min-width:44px;padding:0;justify-content:center;gap:0;right:12px;top:12px}
  .amenity-stage>.photo-collection-button [data-photo-count]{display:none}
  .amenity-stage>.photo-collection-button>span[aria-hidden]{font-size:1.45rem}
  .amenities>.caption{margin-top:12px}
}
