/* Responsive corrections for the isolated v3 preview. Preserve the brand/motion. */
:root { color-scheme: dark; }
:is(.topbar, .legal-topbar) .nav { flex-shrink: 0; }
:is(.topbar, .legal-topbar) .brand { min-width: 0; }
.legal-main :is(h1, h2, p, address, a) { overflow-wrap: anywhere; }
.legal-main h1 { line-height: 1.06; }
.legal-main { scroll-margin-top: 6rem; }
.legal-topbar { padding-top: max(1rem, env(safe-area-inset-top)); padding-left: max(var(--page-x), env(safe-area-inset-left)); padding-right: max(var(--page-x), env(safe-area-inset-right)); }
.hours-dialog { overflow: auto; overscroll-behavior: contain; border-radius: 1rem; max-height: calc(100dvh - 2rem - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.hours-dialog-card { container-type: inline-size; }
.hours-dialog .section-kicker { padding-right: 3rem; }
.hours-dialog h2 { max-width: 100%; font-size: clamp(1.9rem, 14cqw, 3.9rem); overflow-wrap: anywhere; }
.gallery-archive-card:focus-visible { outline: 3px solid var(--amber-bright); outline-offset: 6px; }
body:has(.fb-lightbox[open]) { overflow: hidden; }
.fb-lightbox { overscroll-behavior: contain; }
.fb-lightbox figcaption { overflow-wrap: anywhere; }
.fb-lb-close { top: max(1.25rem, env(safe-area-inset-top)); right: max(1.25rem, env(safe-area-inset-right)); }
.fb-lb-count { top: max(1.6rem, env(safe-area-inset-top)); left: max(1.5rem, env(safe-area-inset-left)); }

@media (min-width: 981px) {
  .services-stage-copy > h1 { font-size: clamp(2.7rem, 4.35vw, 6rem); }
  .services { height: auto; min-height: calc(var(--stable-viewport-h) - var(--header-h)); }
  .services-editorial-layout { height: auto; min-height: calc(var(--stable-viewport-h) - var(--header-h) - 10dvh); grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); }
  .services .price-list, .price-row-featured > * { min-width: 0; }
  .price-row-featured { grid-template-columns: minmax(0, 1fr) minmax(0, .5fr) auto; }
  .price-row-featured .price-name { font-size: clamp(1.15rem, 1.8vw, 2.7rem); }
  .price-scissors-visual { max-width: 24%; }
  .lounge { height: auto; min-height: calc(var(--stable-viewport-h) - var(--header-h)); grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .lounge-copy { min-width: 0; }
  .lounge-image { align-self: stretch; height: auto; min-height: 28rem; }
  .coffee-card { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .gallery { height: max(42rem, var(--stable-viewport-h)); }
}
@media (min-width: 981px) and (max-width: 1180px) {
  .topbar { padding-inline: 1.25rem; gap: 1rem; }
  .topbar .brand { width: 10rem; }
  .nav-links { gap: .8rem; }
  .nav-links a { font-size: .68rem; white-space: nowrap; }
  .lounge h2 { font-size: clamp(3rem, 5vw, 4rem); }
  .coffee-card h3 { font-size: 2.5rem; }
  .coffee-card { height: 23.75rem; }
}
@media (min-width: 721px) and (max-width: 980px) {
  .services-stage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services-stage-copy { min-width: 0; }
  .services-stage-copy > h1 { font-size: clamp(2.35rem, 5vw, 3.1rem); }
  .pole-feature { min-width: 0; }
  .barber-pole-stage { width: 100%; }
}
@media (max-width: 980px) {
  /* The final screen must grow when mobile browser chrome retracts.
     Keep stable svh sizing elsewhere; only this end-of-page panel follows dvh. */
  .closing-shell { min-height: 100vh; min-height: 100dvh; }
  .nav-links { position: absolute; top: calc(100% + .5rem); left: 0; right: 0; width: auto; max-height: calc(100dvh - 6rem - var(--action-bar-h)); overflow-y: auto; overscroll-behavior: contain; }
  .topbar { padding-left: max(.875rem, env(safe-area-inset-left)); padding-right: max(.625rem, env(safe-area-inset-right)); }
}
@media (max-width: 720px) {
  .closing-shell > .footer { flex-basis: auto; height: auto; min-height: calc(11.75rem + env(safe-area-inset-bottom, 0px)); }
  .topbar { gap: .5rem; height: calc(4rem + env(safe-area-inset-top)); padding-top: calc(.5rem + env(safe-area-inset-top)); }
  .topbar .brand { width: clamp(7.5rem, 32vw, 9.25rem); flex-shrink: 1; }
  .topbar .nav { gap: .375rem; }
  .topbar .burger { flex-shrink: 0; }
  .nav-links { top: 100%; max-height: calc(100dvh - 4rem - env(safe-area-inset-top) - var(--action-bar-h)); }
  .gallery .section-head h2 { font-size: clamp(2.8rem, 14vw, 4.5rem); }
  .legal-main h1 { font-size: clamp(3rem, 17vw, 5.5rem); }
  .legal-topbar { gap: .75rem; padding-inline: max(1.125rem, env(safe-area-inset-left)) max(1.125rem, env(safe-area-inset-right)); }
  .legal-topbar .brand { width: clamp(7rem, 32vw, 9.25rem); }
  .legal-topbar-actions { flex-shrink: 0; }
  .fb-lightbox[open] { grid-template-columns: 1fr; }
  .fb-lightbox figure { padding: 4.75rem 1.25rem calc(5rem + env(safe-area-inset-bottom)); }
  .fb-lightbox img { max-height: calc(100dvh - 14rem - env(safe-area-inset-bottom)); }
  .fb-lightbox figcaption { font-size: .78rem; line-height: 1.4; max-height: 4.5rem; overflow-y: auto; }
  .fb-lb-prev, .fb-lb-next { display: block; position: absolute; bottom: max(1rem, env(safe-area-inset-bottom)); }
  .fb-lb-prev { left: calc(50% - 4rem); }
  .fb-lb-next { right: calc(50% - 4rem); }
}
@media (orientation: landscape) and (max-width: 980px) and (max-height: 500px) {
  .services-stage { min-height: var(--stable-viewport-h); padding-top: calc(5rem + env(safe-area-inset-top)); padding-bottom: calc(4rem + env(safe-area-inset-bottom)); gap: 1.25rem; align-items: center; }
  .services-stage-copy { padding: 0; }
  .services-stage-copy > h1 { font-size: clamp(1.8rem, 3.8vw, 2.4rem); }
  .services-stage-actions { margin-top: 1.25rem; gap: .5rem; }
  .services-stage-actions .button { min-height: 2.75rem; padding-inline: .875rem; font-size: .7rem; }
  .pole-feature { min-height: 0; height: 18rem; }
  .barber-pole-stage { height: 18rem; }
  .lounge { height: auto; min-height: 36rem; }
  .lounge-copy { height: auto; min-height: 36rem; padding-top: 2.25rem; padding-bottom: calc(var(--action-bar-h) + 1.5rem); }
  .lounge h2 { font-size: 3rem; }
  .coffee-card { margin-top: 2rem; }
  .nav-links { top: 100%; max-height: calc(100dvh - 4rem - var(--action-bar-h)); }
  .mobile-actions button { min-width: 0; min-height: 2.75rem; display: flex; align-items: center; justify-content: center; gap: .4375rem; border: 0; border-radius: .5625rem; color: rgba(255,255,255,.82); background: transparent; font: inherit; font-size: .65rem; font-weight: 760; }
  .fb-lightbox figure { padding: 3.75rem 1rem 1rem; }
  .fb-lightbox img { max-height: calc(100dvh - 8rem); }
  .fb-lightbox figcaption { font-size: .7rem; max-width: 65vw; }
}
