/* Geometry is shared; authored content colours and media are preserved. */
html{scroll-padding-top:calc(var(--portal-header-height,80px) + 16px)}
html:root[data-palette] body .site-footer{--ft-bg:var(--ui-panel);--ft-ink:var(--ui-ink);--ft-muted:var(--ui-muted);--ft-line:var(--ui-border)}
.site-footer :is(.footer-inner,.footer-bottom)>*{min-width:0;max-width:100%}
html .site-footer :is(a,p,span){overflow-wrap:anywhere;white-space:normal}
html .site-footer .footer-contact-links>a{white-space:normal;min-height:44px;display:inline-flex;align-items:center}
.site-footer .footer-bottom{flex-wrap:wrap;gap:14px 24px}
.site-footer .parish-motion-setting{max-width:100%;min-width:0}
.site-footer .parish-motion-line{flex-wrap:wrap}
.site-footer input[type=range]{max-width:100%;min-width:0}
html .site-header #main-menu :is(a,button){min-height:44px}
.site-header #main-menu .nav-sub-toggle{min-width:44px;flex-shrink:0}
.site-header:not(.nav-collapsed) #main-menu .nav-sub{transform:translateX(var(--submenu-shift,0px));max-height:calc(100dvh - var(--portal-header-bottom,100px) - 20px);overflow-y:auto;overscroll-behavior:contain}
.site-header.nav-collapsed #main-menu.wrap{max-height:calc(100dvh - var(--portal-header-bottom,80px) - 16px);overscroll-behavior:contain;scrollbar-gutter:stable;box-sizing:border-box}
.site-header.nav-collapsed #main-menu .nav-sub{min-width:0;transform:none}
.site-header #main-menu :is(a,small){overflow-wrap:anywhere;white-space:normal}
.site-header .header-actions :is(button,a):not([hidden]){min-width:44px;min-height:44px;flex-shrink:0}
.site-header .mobile-tools:empty{display:none}
html:root body .visitor-center{top:calc(var(--portal-header-bottom,80px) + 8px);max-height:calc(100dvh - var(--portal-header-bottom,80px) - 24px);bottom:auto}
html:root body .visitor-center :is(button,select){min-height:44px}
html:root body .visitor-toast{top:calc(var(--portal-header-bottom,80px) + 8px)}
.site-header .social-subbar .social-subbar-inner{max-height:min(50dvh,360px);overflow-y:auto;overscroll-behavior:contain}
.mini-site .ms-nav details>div{max-height:50dvh;overflow-y:auto;overscroll-behavior:contain}
.mini-site .ms-brand>div{min-width:0}
.mini-site .ms-footer>*{min-width:0;overflow-wrap:anywhere}
.modern-home :is(.home-contact,.home-contact-fields,.home-contact-layout,.community-section-head)>*{min-width:0}
.modern-home :is(input,textarea,select){max-width:100%;min-width:0}
.modern-home .home-contact a{overflow-wrap:anywhere}
@media(max-width:760px){
 .site-header.topbar-balanced.topbar-inline .nav-inner.wrap{grid-template-columns:minmax(0,1fr);gap:8px;padding-block:10px;width:calc(100% - 28px)}
 .site-header.topbar-balanced .brand{width:auto;max-width:100%;gap:10px}
 .site-header.topbar-balanced .brand-title{font-size:clamp(17px,4.5vw,22px);white-space:normal;overflow-wrap:anywhere;line-height:1.18}
 .site-header.topbar-balanced .brand .parish-logo{width:40px;height:40px;min-width:40px}
 .site-header.topbar-balanced.topbar-inline .header-actions{flex-wrap:wrap;justify-content:flex-end;gap:8px!important;padding:0}
 .site-header.topbar-balanced .header-actions [data-header-button]{min-width:44px;min-height:44px;width:44px;height:44px}
 .site-header.topbar-balanced .header-actions [data-header-button] svg{width:20px;height:20px}
 .site-header.nav-collapsed #main-menu.wrap{left:12px;right:12px;width:auto;padding:12px;margin:0}
 .site-header .mobile-tools{gap:10px}
 .mini-site .ms-nav details>div{position:static;min-width:0;max-width:100%;width:100%;box-shadow:none}
 .mini-site .ms-nav-family{flex-wrap:wrap;min-width:0;max-width:100%}
 .mini-site .ms-nav-family details[open]{flex-basis:100%}
 .mini-site .ms-brand>div{min-width:0}
 .mini-site .ms-parish{white-space:normal}
 .site-footer .footer-inner{grid-template-columns:minmax(0,1fr);gap:28px}
}
@media(forced-colors:active){.site-header :focus-visible,.site-footer :focus-visible{outline:3px solid Highlight!important}.site-header #main-menu,.site-footer{border-color:CanvasText!important}}
@media print{html:root[data-palette] body .site-footer{--ft-bg:#fff;--ft-ink:#111;--ft-muted:#333;--ft-line:#777}}

/* Bottom sheets must cover the viewport without inheriting generic dialog margins. */
html:root body dialog.practical-sheet-host{inset:0!important;margin:0!important;padding:0!important;width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}

/* A single external rhythm: header -> quick links -> opening -> homily scene. */
html:root:root body.home-desktop-surface #main>.modern-home.home-layout{margin-block-start:24px!important;--home-box-gap:24px;row-gap:24px!important}
html:root:root body.home-desktop-surface .modern-home #home-scene>.home-scene-section{padding-block-start:0!important}
