/* Tablet and phone overrides. Breakpoints from the brief: 1120, 900, 760
   (sheet and bottom-sheet switch), 390 design floor. Loaded after site.css. */

@media (max-width: 1120px) {
  :root { --pad: 32px; }
  .wrap--home { padding: 0 32px; }
  .nav__in, .menu__top { padding: 0 32px; }
  .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .ex__grid { grid-template-columns: 1fr; }
  .ex__list { height: auto; max-height: 560px; }
  .nav__right .nav__phone { display: none; }
  .tours { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --pad: 20px; --nav-h: 76px; }
  .wrap--home { padding: 0 20px; }
  .nav__in, .menu__top { padding: 0 16px 0 20px; gap: 8px; }
  .nav__logo img { height: 54px; }
  .nav__menu .label { display: none; }
  .nav__right a:not(.btn) { display: none; }
  .nav .btn { padding: 10px 14px; letter-spacing: .16em; }
  h1 { font-size: clamp(32px, 8.6vw, 46px); line-height: 1.08; }
  h2 { font-size: clamp(25px, 6.2vw, 34px); line-height: 1.12; }
  .hero h1 { font-size: clamp(34px, 8.6vw, 44px); }
  .section { padding: 56px 0 60px; }
  .page-head { padding: 40px 0 26px; }
  .page-head__grid { grid-template-columns: 1fr; gap: 16px; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split--flip > :first-child { order: 0; }
  .split > .photo, .split > .photos { order: -1; }
  .menu__body { grid-template-columns: 1fr; gap: 36px; padding: 8px 20px 48px; }
  .menu__list a { font-size: 28px; padding: 11px 0; }
  .feature { min-height: 0; display: block; }
  .feature > .photo { position: relative; aspect-ratio: 4 / 3; }
  .feature__panel { margin: 0; width: auto; box-shadow: none; padding: 30px 20px 8px; background: transparent; }
  .band { padding: 64px 0; }
  .footer { padding: 56px 0 30px; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__grid > :nth-child(4) { order: 1; }
  .footer__grid > :nth-child(2) { order: 2; }
  .footer__grid > :nth-child(3) { order: 3; }
  .footer__notice { grid-template-columns: 1fr; }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band-head h2 { font-size: 30px; }
  .alist--two { columns: 1; }
  .photo-band { min-height: 460px; }
  .photo-band::after { background: linear-gradient(180deg, rgba(18, 17, 14, .28) 0%, rgba(18, 17, 14, .64) 34%, rgba(18, 17, 14, .86) 100%); } /* holds 4.5:1 behind every line at 375 to 760 (round 4 finding 9) */
  .photo-band__text { padding-bottom: 40px; }
  .team { grid-template-columns: 1fr; }
  .gtile { flex-basis: calc(50% - 5px); flex-grow: 1; }
  .gtile img { aspect-ratio: 4 / 3; }
  .gtile .cap { opacity: 1; }
  .ts__scroll { padding: 32px 22px 0; }
  .ts__bar { padding: 14px 22px 16px; }
}

@media (max-width: 760px) {
  .hero { min-height: 560px; }
  .hero__bar { padding: 0 20px 58px; flex-direction: column; align-items: flex-start; gap: 24px; }
  .offer { left: 0; right: 0; bottom: 0; width: auto; max-width: none; border-width: 1px 0 0; padding: 22px 20px 20px; }
  .collage { grid-template-columns: 1fr 1fr; }
  .collage .photo:first-child { grid-row: auto; grid-column: 1 / -1; }
  /* two photos (amenities): side by side at the same size, never a lone half cell (round 3 finding 1) */
  .collage--pair .photo:first-child { grid-column: auto; }
  .band .btns .btn { width: 100%; }
  .plans { grid-template-columns: 1fr; }
  .plan-card__img { aspect-ratio: 4 / 3; }
  .plan-card--cta .photo { aspect-ratio: 16 / 9; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { min-height: 44px; }
  .filterbar__in { gap: 12px; }
  .result-count { margin-left: 0; }
  .unit-row > button, .units--wide .unit-row > button { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .unit-row img { width: 56px; height: 56px; }
  .unit-row .no-col { display: none; }
  .units--wide .unit-row .extra { display: none; }
  .units--wide .unit-row { grid-template-columns: 1fr; }
  .units--wide .unit-row .no-m { display: inline; }
  .unit-row__acts { display: grid; grid-template-columns: 1fr 1fr; padding: 0 12px 14px; }
  .unit-row__acts .btn { min-height: 44px; }
  .details li { grid-template-columns: 1fr; gap: 2px; }
  .form { grid-template-columns: 1fr; }
  .form .btn { width: 100%; justify-self: stretch; }
  .tours { grid-template-columns: 1fr; }
  .linklist a { font-size: 20px; flex-direction: column; gap: 2px; }
  .linklist a span { text-align: left; }

  /* dialogs become bottom sheets */
  .dlg, .dlg--center { width: 100vw; max-width: 100vw; margin: auto 0 0; max-height: 86dvh; }
  .dlg[open] { animation-name: sheetIn; }
  @keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .dlg__head { padding: 18px 20px 14px; }
  .dlg__head h2 { font-size: 27px; }
  .dlg__body { padding: 16px 20px 20px; }
  .dlg__actions { padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); }
  .ts { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; }
  .ts h2 { font-size: 30px; }
  .ts__days button { min-height: 52px; }
  .ts__homes { max-height: none; overflow: visible; }
  .mp__bar { padding: 8px 8px 8px 16px; }
  .mp__bar h2 { font-size: 20px; }
  .mp__bar .btn { display: none; }
  .lb__stage { padding: 0 8px; }
  .lb__nav { top: auto; bottom: -56px; }

  /* explorer */
  .ex__stage { height: auto; aspect-ratio: 4 / 5; }
  .ex__list { max-height: none; height: auto; border-left: 0; border-right: 0; margin: 0 -20px; }
  .ex__results { overflow: visible; }
  .ex__filtersbtn { display: inline-flex; }
  .ex__filters { position: fixed; inset: auto 0 0; z-index: 70; max-height: 86dvh; overflow: auto; background: var(--paper); box-shadow: 0 -20px 40px -20px rgba(0, 0, 0, .4); transform: translateY(105%); transition: transform .35s var(--ease); visibility: hidden; }
  .ex__filters.is-open { transform: none; visibility: visible; }
  .ex__filters .filterbar__in { display: grid; gap: 18px; padding: 0 20px 20px; }
  .ex__filters .fgroup legend { float: none; display: block; line-height: 1.4; margin-bottom: 8px; }
  .ex__filters .chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  .ex__sheethead { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--hair); position: sticky; top: 0; background: var(--paper); }
  .ex__sheethead h2 { font-size: 26px; }
  .ex__sheetfoot { display: block; position: sticky; bottom: 0; padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--hair); }
  .ex__ladder { left: 8px; top: 8px; gap: 6px; }
  .ex__top .seg { width: 100%; }
  .ex__top .seg button { flex: 1; }
  .ex__controls { left: 8px; bottom: 8px; gap: 4px; }
  .ex__stage .ex__hint { display: none; }
  .ex__hint-m { display: block; }
  .ex__compass { top: 8px; right: 8px; }
}

/* small phones: keep at least 16 px between the logo and Book a tour */
@media (max-width: 400px) {
  .nav__logo img { height: 44px; }
  .nav .btn { padding: 10px 10px; letter-spacing: .1em; }
}
