/* v297 global layout QA: keep every section/card/frame inside viewport */
*,*::before,*::after{box-sizing:border-box!important}
html,body{max-width:100%!important;min-width:0!important;overflow-x:hidden!important}
body{width:100%!important}
img,video,canvas,svg,iframe{max-width:100%!important}
input,textarea,select,button{max-width:100%!important;min-width:0!important}
main,.page,.wrapper,.wrap,.layout,.content-area,.container,.container-fluid,.profile-shell,.profile-card,.profile-panel,.card,.panel,.box,.section,.section-card,.content-box,.surface,.sheet,.forum-card,.topic-list,.market-card,.announcement-card,.news-card,.social-card,.feed-card,.notification-card,.friend-card,.user-card,.admin-card,.admin-section,.rules-card,.chatbox,.chat-layout,.messages,.profile-sections-host{width:auto!important;max-width:100%!important;min-width:0!important}
[class*="grid"],.grid,.layout,.profile-head,.profile-stats,.profile-content,.albums-grid,.album-photo-grid{min-width:0!important;max-width:100%!important}
[class*="grid"]>* ,.grid>*,.layout>*,.profile-head>*,.profile-stats>*,.profile-content>*,.albums-grid>*,.album-photo-grid>*{min-width:0!important;max-width:100%!important}
.topnav{max-width:100%!important;min-width:0!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important}
.topnav a,.profile-nav a,.mobile-nav a,.profile-section-nav a{max-width:100%!important;min-width:0!important}
pre,code,.long-text,.message-text,.post-text,.wall-post-text,.topic-title,.profile-name-row,.profile-status-row{overflow-wrap:anywhere!important;word-break:break-word!important}
.profile-modern .profile-card{overflow:hidden!important}
.profile-modern .profile-sections-host{overflow:hidden!important;contain:layout style!important}
.profile-modern .profile-section-nav{max-width:100%!important;min-width:0!important;overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important}
.profile-modern .profile-section-nav a{flex:0 0 auto!important;white-space:nowrap!important}
.profile-modern .profile-content,.profile-modern .profile-panel,.profile-modern .profile-story-block{overflow:hidden!important}
.profile-modern .profile-content>* ,.profile-modern .profile-panel>* ,.profile-modern .profile-story-block>*{min-width:0!important;max-width:100%!important}
.profile-modern .profile-head{display:grid!important;grid-template-columns:minmax(0,auto) minmax(0,1fr)!important}
.profile-modern .profile-head-actions,.profile-modern .profile-stats,.profile-modern .profile-actions,.profile-modern .contact-list,.profile-modern .profile-links{display:flex!important;flex-wrap:wrap!important;min-width:0!important;max-width:100%!important}
.profile-modern .profile-stats>*,.profile-modern .profile-head-actions>*,.profile-modern .profile-actions>*{min-width:0!important;max-width:100%!important}
.profile-modern .albums-grid,.profile-modern .album-photo-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
@media(max-width:700px){
  main{padding-left:8px!important;padding-right:8px!important}
  .profile-modern .profile-card{width:100%!important;margin:0!important}
  .profile-modern .profile-head{grid-template-columns:56px minmax(0,1fr)!important;gap:10px!important}
  .profile-modern .profile-head-actions,.profile-modern .profile-stats,.profile-modern .profile-actions{justify-content:flex-start!important}
  .profile-modern .profile-content{display:block!important;width:100%!important}
  .profile-modern .albums-grid,.profile-modern .album-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .profile-modern .album-cover{height:110px!important}
  .profile-modern .profile-section-nav{position:sticky!important;top:0!important;z-index:200!important;width:100%!important;background:#101823!important}
  .profile-modern .profile-sections-host{width:100%!important;margin:0!important;padding:0!important}
  .profile-modern .profile-sections-host>*{width:100%!important;margin:10px 0!important}
  .mobile-nav{left:8px!important;right:8px!important;bottom:max(8px,env(safe-area-inset-bottom))!important;width:auto!important;max-width:calc(100vw - 16px)!important}
  /* Never leave a desktop top navigation stranded below page content. */
  body>.topnav,main~.topnav,footer~.topnav{display:none!important}
}
@media(max-width:420px){
  .profile-modern .profile-head{grid-template-columns:48px minmax(0,1fr)!important}
  .profile-modern .albums-grid,.profile-modern .album-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .profile-modern .profile-card,.profile-modern .profile-panel{border-radius:14px!important}
}
