/* JSV 2.0.160 — presentation-only mobile/tablet app frame.
   Normal reading pages scroll; chat/game keep their own scroll owners.
   Deliberately no rules above 1024 CSS px. */
@media screen and (max-width:1024px){
 :root{--jsv-160-gutter:clamp(8px,1.8vw,18px);--jsv-160-top:64px;--jsv-160-bottom:calc(74px + env(safe-area-inset-bottom,0px));}
 html{width:100%;min-height:100%;overflow-x:clip;}
 html body{width:100%;min-height:100vh;min-height:100dvh;max-width:100%;margin:0!important;overflow-x:clip;}
 html body :is(main,#main,#content,.site-main,.site-content,.content-area,.page-content){min-width:0;max-width:100%;}
 html body :is(.jsf-exact-profile-hub,.jsf-xp-main,.jsf-group-suite-shell,.jsf-gm-page,.jsv-group-page,.jsf-directory-shell,.jsf-business-shell,.jsf-account-shell,.jsf-membership-page,.jsw-shell,.jsw-main,.jsf-newsroom,.jsf-news-page,.jsf-blog-page,.jsf-story-reader,.jsf-events-mockup-page,.jsf-event-detail-page-shell,.jsf-command-center-page,.jsf-gameplay-atlas-page){width:100%!important;max-width:none!important;min-width:0!important;margin-inline:0!important;}
 html body :is(.jsf-newsroom,.jsf-news-page,.jsf-blog-page,.jsf-story-reader,.jsf-events-mockup-page,.jsf-membership-page,.jsw-main,.jsf-directory-shell,.jsv-group-page){min-height:calc(100dvh - var(--jsv-160-top) - var(--jsv-160-bottom));}
 html body :is(.jsf-newsroom,.jsf-news-page,.jsf-blog-page,.jsf-story-reader,.jsf-directory-shell,.jsf-events-mockup-page,.jsf-membership-page,.jsw-main,.jsv-group-page){padding-inline:var(--jsv-160-gutter)!important;}
 html body :is(.jsf-newsroom,.jsf-news-page,.jsf-blog-page,.jsf-story-reader,.jsf-directory-shell,.jsf-events-mockup-page,.jsf-membership-page,.jsw-main,.jsv-group-page) :is(.container,.inner,.main-column,.content-column){min-width:0;max-width:100%;}
 html body :is(.jsf-newsroom,.jsf-news-page,.jsf-blog-page,.jsf-story-reader,.jsf-directory-shell,.jsf-events-mockup-page,.jsf-membership-page,.jsw-main,.jsv-group-page) :is(img,video,iframe){max-width:100%;height:auto;}
 html body :is(.jsf-newsroom,.jsf-news-page,.jsf-blog-page,.jsf-story-reader) :is(h1,h2,h3,p,a){overflow-wrap:break-word;}
 html body :is(.jsf-newsroom,.jsf-news-page,.jsf-blog-page,.jsf-story-reader) :is(.category-tabs,.topic-list,.jsf-news-categories,.jsf-news-topic-row){max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;}
 /* Reuse the existing header and five-tab navigation, without introducing duplicates. */
 html body>header.top.jsf-hybrid-top{width:100%!important;max-width:100%!important;left:0;right:0;}
 html body>nav.mobilebar.jsf-hybrid-mobilebar{left:0!important;right:0!important;width:100%!important;max-width:100%!important;z-index:900!important;}
 html body>nav.mobilebar.jsf-hybrid-mobilebar>:is(a,button){min-width:0!important;flex:1 1 0!important;}
 html body :is(.jsf-xp-tabs,.jsf-xp-feed-filters,.business-page-nav,.jsf-gm-tabs,.jsf-group-inner-tabs,.jsf-membership-subnav){max-width:100%!important;min-width:0;overflow-x:auto!important;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;}
 html body :is(.jsf-account-shell,.jsf-membership-page,.jsw-main,.jsf-business-shell) :is(label:has(input[type=checkbox]),label:has(input[type=radio])){min-height:44px;}
 html body :is(.jsf-account-shell,.jsf-membership-page,.jsw-main,.jsf-business-shell) input[type=checkbox]{min-width:24px!important;width:24px!important;height:24px!important;accent-color:#1b4e79;}
}
@media screen and (max-width:900px){
 html body{padding-bottom:var(--jsv-160-bottom)!important;}
 /* No dead desktop rail slots in narrow app views. */
 html body :is(.jsf-xp-buddypanel,.jsf-xp-right,.site-sponsor-rail,.jsf-sponsor-rail){max-width:100%;}
 html body :is(.jsf-group-suite-shell,.jsv-group-page,.jsf-directory-shell,.jsf-newsroom,.jsf-news-page,.jsf-blog-page,.jsw-shell) :is(.main-content,.main-column,.primary-column){width:100%!important;max-width:none!important;min-width:0!important;}
 /* Full-screen conversations: header and bottom tabs remain, only message pane scrolls. */
 html body :is(.jsf-gm-page.jsf-gm-chat,.jsg-chat-centered-home,.jsf-message-page,.jsf-bmsg-page){height:calc(100dvh - var(--jsv-160-top) - var(--jsv-160-bottom))!important;max-height:calc(100dvh - var(--jsv-160-top) - var(--jsv-160-bottom))!important;min-height:0!important;max-width:100%!important;overflow:hidden!important;display:flex;flex-direction:column;}
 html body :is(.jsf-gm-page.jsf-gm-chat,.jsg-chat-centered-home,.jsf-message-page,.jsf-bmsg-page) :is(.chat-messages,.messages-list,.message-list,.jsf-gm-chat-messages,.jsf-bmsg-messages,.jsf-message-list){flex:1 1 auto;min-height:0!important;overflow-y:auto!important;overscroll-behavior-y:contain;}
 html body :is(.jsf-gm-page.jsf-gm-chat,.jsg-chat-centered-home,.jsf-message-page,.jsf-bmsg-page) :is(.chat-composer,.message-composer,.jsf-gm-chat-compose,.jsf-bmsg-composer){flex:0 0 auto;position:relative!important;bottom:auto!important;max-width:100%;}
 /* Game canvas uses the remaining viewport, not an ordinary article max-width. */
 html body :is(.jsf-gameplay-atlas-page,.jsf-ng-game-v2,.jsf-ng-game){width:100%!important;max-width:none!important;min-width:0!important;min-height:0!important;}
}
@media screen and (max-width:600px){
 :root{--jsv-160-gutter:8px;}
 /* Profile: cover spans the card; avatar overlaps cover, then copy gets full width. */
 html body .jsf-exact-profile-hub{padding-inline:8px!important;gap:8px!important;}
 html body .jsf-xp-main{width:100%!important;min-width:0!important;max-width:none!important;}
 html body .jsf-xp-profile-card{width:100%!important;max-width:none!important;overflow:visible!important;}
 html body .jsf-xp-cover{height:clamp(210px,52vw,290px)!important;width:100%!important;}
 html body .jsf-xp-cover>a{right:10px!important;top:10px!important;max-width:calc(100% - 20px);font-size:12px!important;padding:9px 11px!important;}
 html body .jsf-xp-profile-summary{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-areas:'avatar' 'copy' 'level' 'buttons'!important;gap:0!important;padding:0 14px 14px!important;min-height:0!important;}
 html body .jsf-xp-avatar-wrap{grid-area:avatar!important;width:98px!important;height:98px!important;margin-top:-43px!important;margin-bottom:3px!important;z-index:2;}
 html body .jsf-xp-avatar{width:98px!important;height:98px!important;border-width:4px!important;}
 html body .jsf-xp-profile-copy{grid-area:copy!important;width:100%!important;padding-top:2px!important;min-width:0!important;}
 html body .jsf-xp-profile-copy h1{font-size:clamp(23px,6vw,29px)!important;overflow-wrap:anywhere;}
 html body .jsf-xp-profile-copy p,html body .jsf-xp-profile-copy>div{font-size:clamp(13px,3.6vw,16px)!important;line-height:1.45!important;overflow-wrap:anywhere;}
 html body .jsf-xp-profile-level{grid-area:level!important;justify-self:start!important;padding-top:12px!important;}
 html body .jsf-xp-profile-buttons{grid-area:buttons!important;display:flex!important;justify-content:flex-start!important;flex-wrap:wrap!important;gap:8px!important;margin-top:10px!important;}
 html body .jsf-xp-stats{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
 html body .jsf-xp-stats a{min-width:0!important;}
 /* Panels remain available without covering the member's name or biography. */
 html body .jsf-mobile-context-toggle{bottom:calc(var(--jsv-160-bottom) + 12px)!important;max-width:min(44vw,160px)!important;}
 html body :is(.jsf-xp-tabs,.jsf-xp-feed-filters){padding-inline:6px!important;}
 /* Forms and articles use the phone width while scrolling normally. */
 html body :is(.jsf-account-shell,.jsf-membership-page,.jsw-main,.jsf-newsroom,.jsf-news-page,.jsf-blog-page,.jsf-story-reader,.jsv-group-page){padding-inline:8px!important;}
 html body :is(.jsf-account-shell,.jsf-membership-page,.jsw-main,.jsf-newsroom,.jsf-news-page,.jsf-blog-page,.jsf-story-reader,.jsv-group-page) :is(.card,.panel,.article-card,.story-card){max-width:100%!important;min-width:0!important;}
}
@media screen and (max-width:360px){
 html body .jsf-xp-profile-summary{padding-inline:10px!important;}
 html body .jsf-xp-profile-copy h1{font-size:22px!important;}
}
