/* V27: narrow-screen corrections shared by all routes. */
.visit-compact-hours{grid-template-columns:max-content minmax(0,1fr);gap:10px 18px}
.visit-compact-hours>div{display:contents}
.visit-compact-hours dt,.visit-compact-hours dd{font-size:.9375rem;line-height:1.6;white-space:nowrap}
.subpage section[id]{scroll-margin-top:0}
.sub-hero>*,.doctors-cover-heading>*,.two-column>*,.channel-grid>*,.care-steps>*,.detail-checks article>div{min-width:0}

/* Give tablet readers the full column; the article index stays within reach. */
@media(max-width:1024px){
  html:has(body.lip-article){scroll-padding-top:calc(var(--nav-height) + 64px)}
  .detail-layout,.lip-article .lip-layout{display:block;padding:0 0 45px}
  .detail-rail,.lip-article .detail-rail{position:sticky;top:var(--nav-height);padding:0 5%;background:rgba(246,243,237,.96);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);z-index:35;max-height:none;overflow:visible;border-bottom:1px solid var(--line)}
  .detail-rail .detail-back,.detail-rail>.eyebrow,.detail-rail>.text-link{display:none}
  .detail-rail nav{display:flex;gap:24px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
  .detail-rail nav.has-motion-marker,.lip-article .detail-rail nav.has-motion-marker{padding-left:0}
  .detail-rail .reading-marker{display:none}
  .detail-rail nav a,.lip-article .detail-rail nav a{position:relative;flex-shrink:0;white-space:nowrap;gap:8px;padding:18px 0;border:0;font-size:13px}
  .detail-rail nav a[aria-current=true]:after{content:"";position:absolute;bottom:0;left:0;right:0;height:2px;background:#8e6056}
  .detail-content .editorial-section,.lip-article .detail-content .lip-section{padding:50px 6%}
  .lip-article .detail-content .lip-method{margin:10px 0;padding:40px 6%}
}

/* Three narrow booking columns make the descriptions unnecessarily fragmented. */
@media(min-width:701px) and (max-width:900px){
  .channel-grid-three{grid-template-columns:1fr;gap:32px}
  .channel-grid-three .channel{display:grid;grid-template-columns:40px minmax(0,1fr);gap:0 20px}
  .channel-grid-three .booking-icon{grid-row:1/3;margin:0}
  .channel-grid-three .channel>*:not(.booking-icon){grid-column:2}
  .channel-grid-three .channel-note{margin-top:0}
}

@media(max-width:600px){
  /* Reserve the final film height before deferred motion initialization. */
  .home-editorial .hero{height:max(800px,100svh);max-height:none}
  body{padding-bottom:calc(68px + env(safe-area-inset-bottom))}
  .mobile-contact-bar{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 80px}
  .mobile-contact-bar a{height:68px;gap:12px;font-size:13px}
  .mobile-contact-bar a:last-child{grid-column:2}
  .floating-contact{right:12px;bottom:calc(6px + env(safe-area-inset-bottom))}
  .contact-orb{width:56px;height:56px;box-shadow:inset 0 0 0 4px #fffaf455,0 3px 14px #34201e20}
  .contact-symbol{width:20px;height:31px}
  .floating-channels{bottom:72px;max-height:calc(100dvh - var(--nav-height) - 90px);overflow-y:auto;overscroll-behavior:contain;padding:3px}
  .detail-rail,.lip-article .detail-rail{padding-inline:24px}
  .detail-content .editorial-section,.lip-article .detail-content .lip-section{padding:44px 24px}
  .lip-article .detail-content .lip-method{padding:38px 24px}
  .visit-compact-hours{gap:10px 16px}
  .clinic-hours th,.clinic-hours td{overflow-wrap:anywhere}
}

/* The three contact actions must remain reachable below the header in landscape. */
@media(max-height:520px) and (orientation:landscape){
  :root{--nav-height:64px}
  .site-header,.subpage .site-header{height:var(--nav-height)}
  .floating-channels{max-height:calc(100dvh - var(--nav-height) - 104px);overflow-y:auto;overscroll-behavior:contain;gap:6px;padding:3px}
}
@media(min-width:601px) and (max-height:520px) and (orientation:landscape){
  .floating-contact{right:16px;bottom:14px}
  .contact-orb{width:58px;height:58px}
  .contact-symbol{width:21px;height:32px}
  .floating-channels{bottom:72px}
}
