/* Tablet and phone overrides, loaded after site.css.
   Breakpoints from the brief: 1120, 900, 760 (explorer sheet), 560. */

@media (max-width: 1120px) {
  .nav__phone { display: none; }
  .nav__inner { padding: 0 28px; }
  :root { --gutter: 32px; }
  .explorer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
  .wall__row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wall__groups-2 { grid-template-columns: 1fr; }
  .wall__groups-2 .wall__row--t { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lc { grid-template-columns: 1fr; }
  .lc__figure { border-right: 0; border-bottom: 1px solid var(--line); }
  .lc__img { min-height: 260px; }
  .lc__img img { max-height: 320px; }
  .tours__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  :root { --nav-h: 64px; --gutter: 20px; }
  h1 { font-size: 40px; }
  h2 { font-size: 31px; }
  h3 { font-size: 26px; }
  h4 { font-size: 21px; }
  .nav__inner { padding: 0 12px 0 16px; column-gap: 10px; grid-template-columns: auto 1fr auto; }
  .nav__logo { justify-self: center; }
  .nav__logo img { height: 30px; }
  .nav__word { display: none; }
  .nav__toggle { min-width: 44px; justify-content: center; }
  .nav__apply { display: none; }
  .nav__tour { padding: 0 12px; font-size: 10.5px; letter-spacing: .14em; min-height: 40px; }
  .menu__inner { grid-template-columns: 1fr; gap: 28px; padding: calc(var(--nav-h) + 20px) 22px 36px; align-items: start; }
  .menu__nav a { font-size: 26px; padding: 9px 0; }
  .section { padding: 64px var(--gutter); }
  .intro { padding: 40px var(--gutter) 24px; }
  .split, .am { grid-template-columns: 1fr; gap: 28px; }
  .split--photo-first .photo, .am .photo { order: -1; }
  .am--rev .am__copy { order: 0; }
  .band { display: block; min-height: 0; padding: 0; }
  .band__photo { position: relative; aspect-ratio: 4 / 3; }
  .band__panel { max-width: none; margin: 0; box-shadow: none; border-left: 0; border-right: 0; padding: 36px var(--gutter) 40px; }
  .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: auto; height: auto; }
  .mosaic .photo { aspect-ratio: 4 / 3; height: auto; }
  .mosaic .photo:first-child { grid-row: auto; grid-column: 1 / -1; }
  .closing { padding: 72px var(--gutter); }
  .pair { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; gap: 40px; }
  .contact__form { order: -1; }
  .form { padding: 28px 20px; }
  .ruled--2 { columns: 1; }
  .amlist--2 { grid-template-columns: minmax(0, 1fr); }
  .amlist--2 li:nth-child(2) { border-top: 0; }
  .jitem { height: 160px; }
  /* Neighborhood, as the reference stacks it: map first, the categories as a wrapped
     chip row under it, then the places list (closed until a category is tapped). */
  .nb { display: flex; flex-direction: column; height: auto; min-height: 0; overflow: visible; }
  .nb__map { order: 1; height: 64vh; height: 64svh; min-height: 360px; flex: none; }
  .nb__rail { order: 2; flex: none; padding: 14px 16px; border-right: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: visible; }
  .nb__head { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nb__note { display: none; }
  .nb__cats { display: flex; flex-wrap: wrap; gap: 8px; }
  .nb__cat { width: auto; min-height: 44px; padding: 8px 13px; border: 1px solid var(--line); gap: 9px; transition-duration: .12s; }
  .nb__cat[aria-pressed="true"] { border-color: var(--nb-panel); border-left-width: 1px; }
  .nb__panel { order: 3; width: 100%; max-height: 42vh; max-height: 42svh; flex: none; padding: 18px 16px 12px; transition: none; }
  .nb[data-open="closed"] .nb__panel, .nb[data-open="auto"] .nb__panel { display: none; }
  .nb[data-open="auto"] .nb__cat[aria-pressed="true"] { background: transparent; border-color: var(--line); }
  .nb[data-open="auto"] .nb__cat[aria-pressed="true"] .nb__cat-ic { color: var(--stone-2); }
  .nb__panel h2 { font-size: 22px; margin-bottom: 8px; }
  .nb__place { padding: 6px 2px; transition-duration: .12s; }
  .nb__badge { left: 12px; top: 12px; padding: 10px 13px; }
  .nb__recentre { right: 12px; top: 12px; min-height: 44px; }
  /* The place card becomes a bottom sheet on the viewport, since the list sits below the map. */
  .nb__card { position: fixed; left: 0; right: 0; bottom: 0; top: auto; max-width: none; padding: 18px 20px calc(22px + env(safe-area-inset-bottom)); border: 0; border-top: 2px solid var(--nb-panel); box-shadow: 0 -18px 44px -26px rgba(24, 20, 14, .5); z-index: 3800; animation: sheetIn .35s var(--ease); }
  .nb__card-close { min-width: 44px; min-height: 44px; margin: -12px -14px 0 0; }
  .nb__card-links a { min-height: 46px; flex: 1 1 100%; justify-content: center; padding: 0 18px; border: 0; background: var(--nb-panel); color: #fff; }
  .nb__card-links a[data-web] { background: transparent; color: var(--nb-panel); border: 1px solid var(--nb-panel); }
  .hero__mark img { width: min(70vw, 440px); }
  .highlights__row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 28px var(--gutter); gap: 24px 20px; }
  .foot__inner { padding: 0 20px; }
  .foot__top { gap: 32px; padding: 52px 0 36px; }
  .dlg__body { padding: 22px 20px 28px; }
  .dlg__bar { padding: 10px 12px 10px 20px; }
  .dlg__bar h2 { font-size: 22px; }
}

/* Explorer on phones: filters in a sheet, the plan wall as a snap strip, cards as bottom sheets. */
@media (max-width: 760px) {
  .filters { position: sticky; top: var(--nav-h); z-index: 20; }
  .filters__inner { padding: 10px var(--gutter); gap: 0; }
  .filters__bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .filters__bar .chip { min-height: 44px; }
  .filters__chips { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12.5px; }
  .filters__chips span { padding: 3px 8px; background: var(--row-active); color: var(--ink); }
  .filters__groups { display: none; }
  .filters__foot { display: none; }
  .filters.is-sheet .filters__groups { display: flex; flex-direction: column; align-items: stretch; gap: 18px; position: fixed; inset: auto 0 0 0; z-index: 4100; max-height: 86svh; overflow-y: auto; background: var(--paper); padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 50px -20px rgba(24, 20, 14, .55); animation: sheetIn .35s var(--ease); }
  .filters.is-sheet::before { content: ""; position: fixed; inset: 0; z-index: 4090; background: rgba(33, 29, 21, .45); }
  .sheet__head { display: flex; justify-content: space-between; align-items: center; }
  .sheet__head h2 { font-size: 26px; }
  .fgroup--sort { margin-left: 0; }
  .field-money input { width: 100%; }
  .fgroup__range { flex-wrap: nowrap; }
  .fgroup__range .field-money { flex: 1 1 0; min-width: 0; }
  .field-date, .field-date input { width: 100%; }
  .field-money, .field-date, .field-money input, .field-date input { min-height: 44px; }
  .sheet__done { width: 100%; margin-top: 4px; }
  .explorer { display: block; padding: 18px 0 0; }
  .wall { min-height: 0; display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x proximity; padding: 0 var(--gutter) 8px; scroll-padding: 0 var(--gutter); scrollbar-width: thin; }
  .wall__groups-2 { display: contents; }
  .wall__group, .wall__groups-2 .wall__group, .wall__group + .wall__group { flex: none; margin: 0; }
  .wall__head { margin-bottom: 6px; scroll-snap-align: start; }
  .wall__head h2 { font-size: 19px; }
  .wall__row, .wall__groups-2 .wall__row--b, .wall__groups-2 .wall__row--t { display: flex; grid-template-columns: none; gap: 8px; }
  .wall__row > * { flex: 0 0 132px; scroll-snap-align: start; }
  .tile__img { aspect-ratio: 1 / 1; padding: 40px 6px 6px; } /* square well: the badge band costs no drawing size */
  .tile__body { padding: 6px 8px 8px; line-height: 1.35; }
  .tile__name { font-size: 22px; }
  .tile__spec, .tile__live { font-size: 12px; }
  .tile__tour { width: 32px; height: 32px; top: 4px; right: 4px; }
  .tile__tour svg { width: 22px; height: 22px; }
  .list { position: static; max-height: none; padding: 8px var(--gutter) 0; }
  .list__body { overflow: visible; }
  .row__btn { gap: 12px; padding: 12px 50px 12px 4px; }
  .row__tour { right: 4px; }
  .status { padding: 0 var(--gutter); }
  .lcard { position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; max-height: 92svh; overflow-y: auto; border: 0; box-shadow: 0 -20px 50px -20px rgba(24, 20, 14, .55); }
  .lcard[open] { animation: sheetIn .35s var(--ease); }
  .lc { min-height: 0; display: flex; flex-direction: column; }
  .lc::before { content: ""; display: block; width: 44px; height: 4px; background: var(--line-2); margin: 10px auto 2px; flex: none; }
  .lc__body { display: contents; }
  .lc__body > * { margin-left: 20px; margin-right: 20px; }
  .lc__top { margin-top: 6px; }
  .lc__top h2 { font-size: 32px; }
  .lc__figure { order: 5; border-bottom: 0; border-top: 1px solid var(--line); margin-top: 16px; }
  .lc__img { min-height: 220px; padding: 14px; }
  .lc__img img { max-height: 260px; }
  .lc__actions { order: 10; position: sticky; bottom: 0; z-index: 2; background: var(--paper); margin: 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
  .lc__actions .btn { flex: 1 1 100%; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tours__grid { gap: 12px; }
  .poster__play { left: 8px; bottom: 8px; padding: 0 10px; font-size: 10.5px; }
}
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 560px) {
  .hero { min-height: 560px; }
  .hero__bar { padding: 0 20px 58px; flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero h1 { font-size: 44px; }
  .actions .btn { flex: 1 1 100%; }
  .closing .actions .btn { flex: 1 1 100%; }
  .fgrid { grid-template-columns: 1fr; }
  .jrows { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .jitem { width: auto !important; height: 132px; }
  .tours__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .poster__cap { font-size: 13px; }
  .foot__top { grid-template-columns: 1fr; }
  .foot__bar { flex-direction: column; align-items: flex-start; }
  .ts__times { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dlg { max-width: none; width: 100vw; max-height: none; height: 100dvh; margin: 0; }
  .vt__tool .lbl { display: none; }
  .vt__foot { padding: 8px 16px; }
  .lb__stage { padding: 0 8px; }
  .lb__nav { display: none; }
  .faq summary { font-size: 21px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .utable .b { display: none; }
}
