/* Shared layout constraints. Appearance continues to own colours and type. */
body.sc-site-ui :is(#content-wrap,#primary,#content,.entry-content,.sc-live-search-wrap,.sc-live-search-text,.mobile-nav-section,.sc-community-feed-content,.sc-members-main,.sc-members-control-row,.sc-member-profile-content){min-width:0;max-width:100%;box-sizing:border-box}
body.sc-site-ui :is(.entry-content,.mw-parser-output) :is(img,video,iframe,embed,object){max-width:100%;box-sizing:border-box}
body.sc-site-ui :is(.entry-content,.mw-parser-output)>:is(p,figure)>img,
body.sc-site-ui :is(.entry-content,.mw-parser-output) video{height:auto}
body.sc-site-ui :is(.entry-content,#buddypress) :is(fieldset,form){min-width:0;max-width:100%;box-sizing:border-box}
body.sc-site-ui :is(.sc-community-feed-title,.sc-community-feed-byline,.sc-cc-source strong,.sc-member-card__name,.sc-member-profile-hero__name,.sc-live-search-title,.sc-live-search-excerpt){overflow-wrap:anywhere}
body.sc-site-ui .sc-community-feed-top{flex-wrap:wrap}
body.sc-site-ui .sc-community-feed-source{min-width:0;max-width:100%;overflow-wrap:anywhere}
body.sc-site-ui .sc-ui-table-scroll{display:block;width:100%;max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
body.sc-site-ui .sc-ui-table-scroll>table{margin-block:0}
body.sc-site-ui :is(.entry-content,.mw-parser-output) pre{max-width:100%;overflow:auto;white-space:pre;box-sizing:border-box}

/* The shared header must paint above page heroes and following content. */
body.sc-site-ui .custom-header{position:relative;z-index:200}
body.sc-site-ui #user-panel{width:min(400px,100vw)!important;max-width:100%!important;height:100vh;height:100dvh;box-sizing:border-box;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding-bottom:env(safe-area-inset-bottom)}
body.sc-site-ui #user-panel :is(.user-info,.panel-section,.user-panel-content){min-width:0;max-width:100%;overflow-wrap:anywhere}
body.sc-site-ui #user-panel :is(input,select,textarea){max-width:100%;box-sizing:border-box}
body.sc-site-ui .mobile-two-column{min-width:0;max-width:100%}
body.sc-site-ui :is(.scs-shop-container,.scs-shop-hero-copy,.scs-shop-hero-stats,.scs-shop-filter-form,.scs-shop-filter-form>label,.scs-shop-card-body,.scs-shop-product-copy,.sc-search-shell,.sc-search-card__content){min-width:0;max-width:100%;box-sizing:border-box}
body.sc-site-ui :is(.scs-shop-card-title,.scs-shop-product-title,.scs-shop-card-source,.scs-shop-product-source){overflow-wrap:anywhere}
body.sc-site-ui .scs-shop-filter-form :is(input,select){min-width:0;max-width:100%;box-sizing:border-box}
body.sc-site-ui .scs-shop-product-layout--sidebar-only .scs-shop-product-sidebar{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))}
body.sc-site-ui .scs-shop-product-meta{grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr))}
body.sc-site-ui :is(.sc-radio,.sc-radio-now,.sc-radio-stations,.sc-radio-community,.sc-radio-chat){min-width:0;max-width:100%;box-sizing:border-box}
body.sc-site-ui .sc-radio-player{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr)}
body.sc-site-ui :is(.sc-now-title,.sc-next-title){overflow-wrap:anywhere}
body.sc-site-ui #scAudio{min-width:0;max-width:100%;box-sizing:border-box}

/* Popovers stay in their original DOM position so native delegated actions work.
   The browser top layer escapes card clipping and ancestor stacking contexts. */
html body.sc-site-ui .sc-ui-floating{position:fixed!important;inset:auto!important;margin:0!important;transform:none!important;min-width:0!important;max-width:calc(100vw - 16px)!important;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);overflow:auto!important;box-sizing:border-box!important;overscroll-behavior:contain;z-index:1000010!important;overflow-wrap:anywhere;white-space:normal}
html body.sc-site-ui .sc-ui-floating[popover]:not(:popover-open){display:none!important}
html body.sc-site-ui .sc-ui-floating:popover-open{display:block}
html body.sc-site-ui .sc-ui-floating :is(a,button,[role=option]){min-height:44px;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box}
body.sc-site-ui .sc-ui-hover-dismissed>.nested-submenu{display:none!important}
body.sc-site-ui .sc-community-feed-item:has(details[open]){position:relative;z-index:30;overflow:visible}
body.sc-site-ui :is(.sc-community-item-menu,.sc-community-repost-control)[open]{z-index:40}
body.sc-site-ui :is(.sc-community-item-menu,.sc-community-repost-control)>summary{min-width:44px;min-height:44px}
body.sc-site-ui :is(.sc-ui-floating,.sc-ui-table-scroll):focus-visible,
body.sc-site-ui :is(.custom-header,#user-panel,.sc-connected-city,#buddypress) :is(a,button,input,select,textarea,summary):focus-visible{outline:2px solid var(--sc-a-link,#0049d6);outline-offset:3px}

@media(max-width:1024px){body.sc-site-ui .sc-radio-player{grid-template-columns:minmax(0,1fr)}}
@media(max-width:767px){
  body.sc-site-ui :is(.entry-content,.mw-parser-output){overflow-wrap:anywhere}
  body.sc-site-ui :is(.entry-content,#buddypress,#user-panel,.sc-live-search-wrap) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:16px!important;min-width:0;max-width:100%;box-sizing:border-box}
  body.sc-site-ui .mobile-nav-section{flex:1 1 0;min-width:0}
  body.sc-site-ui .mobile-main-menu :is(a,button,.mobile-menu-item){white-space:normal;overflow-wrap:anywhere;min-height:44px}
  body.sc-site-ui .mobile-slideout{max-width:100%;box-sizing:border-box}
  body.sc-site-ui .scs-shop-filter-form :is(input,select){font-size:16px!important;min-height:44px}
  body.sc-site-ui .scs-shop-filter-actions{min-width:0;max-width:100%}
  body.sc-site-ui .sc-cc-thread-head{flex-wrap:wrap}
  body.sc-site-ui .sc-cc-thread-head>div{min-width:0;flex:1 1 140px;overflow-wrap:anywhere}
  body.sc-site-ui :is(.sc-cc-reply-form>div:last-child,.sc-community-composer-actions,.sc-community-composer-tools){flex-wrap:wrap;min-width:0;max-width:100%}
  body.sc-site-ui :is(.sc-cc-source,.sc-community-source-reference){min-width:0;max-width:100%;box-sizing:border-box}
}
@media(prefers-reduced-motion:reduce){
  body.sc-site-ui :is(#user-panel,.sc-ui-floating){transition:none!important;scroll-behavior:auto}
}
