/* Root overflow must be hidden, not clip alone: no horizontally scrollable page. */
html { overflow-x:hidden!important; overscroll-behavior-x:none; max-width:100%; }
body { margin-inline:0; min-width:0; max-width:100%; overflow-x:clip!important; }
.wp-site-blocks { min-inline-size:0; max-inline-size:100%; overflow-x:clip; }
@media (max-width:1024px), (pointer:coarse) {
  html, body { width:100%!important; }
  .wp-site-blocks { width:100%; }
  .wp-site-blocks > :is(header,main,footer), .gash-home { min-inline-size:0; max-inline-size:100%!important; }
  .gash-home { width:100%!important; }
  .gash-hero > *, .gash-plan > *, .gash-special > *, .wp-block-columns > .wp-block-column { min-inline-size:0; }
  /* Constrain the known chatbot itself, including the open panel. */
  #gb-chat { position:fixed!important; left:auto!important; right:max(14px,env(safe-area-inset-right,0px))!important; max-width:calc(var(--gbmf-layout-width,100vw) - 28px)!important; box-sizing:border-box; }
  #gb-chat-panel { width:min(350px,calc(var(--gbmf-layout-width,100vw) - 28px))!important; min-width:0!important; max-width:100%!important; box-sizing:border-box; }
  #gb-chat .gb-chat-input-row, #gb-chat-panel header { min-width:0; }
  #gb-chat-input { min-width:0!important; }
  #gb-chat :is(p,a,blockquote) { overflow-wrap:anywhere; }
}
/* Keep the earlier requested page-pinch lock; local swipe tracks retain pan. */
@media (pointer:coarse) { html,body { touch-action:pan-x pan-y!important; } }
/* 1.3: contain descendants at the page boundary, not only the root scroller. */
@media(max-width:1024px), (pointer:coarse) {
 html { width:100%!important; overflow-x:hidden!important; }
 body { width:100%!important; max-width:100%!important; min-width:0!important; overflow-x:hidden!important; position:relative; }
 .wp-site-blocks,.gash-home { box-sizing:border-box!important; width:100%!important; max-width:100%!important; min-width:0!important; overflow-x:clip!important; }
 .gash-home { contain:inline-size; }
 .gash-home :is(section,.gash-container,.gash-wrap), #gash-services { box-sizing:border-box; min-width:0!important; max-width:100%!important; }
 #gash-services .gbpp-service-track { box-sizing:border-box!important; width:100%!important; min-width:0!important; max-width:100%!important; overflow-x:auto!important; overscroll-behavior-x:contain; }
 #gb-chat { transform:none!important; translate:none!important; margin:0!important; inset-inline-start:auto!important; inset-inline-end:14px!important; width:max-content!important; max-width:calc(100% - 28px)!important; }
 #gb-chat-panel { max-width:min(350px,calc(100vw - 28px))!important; }
}

/* Keep navigation attached to the viewport, independent of overflow containers. */
html{scroll-padding-top:calc(var(--gbmf-header-height,100px) + var(--gbmf-admin-height,0px) + 12px)}
body.gbmf-navigation-ready .wp-site-blocks>header.wp-block-template-part{position:fixed!important;top:var(--gbmf-admin-height,0px)!important;left:0!important;right:0!important;width:100%!important;margin:0!important;z-index:9998!important;background:#fff;box-sizing:border-box}
.gbmf-navigation-spacer{height:var(--gbmf-header-height,100px);margin:0!important;pointer-events:none}
body.gbmf-navigation-ready #wpadminbar{position:fixed!important;top:0!important}
