/* Shared layout corrections: content gets priority over advertising columns. */
@media(max-width:640px){body[data-page] .home-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;max-width:100%;box-sizing:border-box;gap:12px;padding:16px;margin:18px 0}body[data-page] .home-stats .stat{display:grid;grid-template-columns:24px minmax(0,1fr);gap:4px 8px;min-width:0}body[data-page] .home-stats .stat svg{grid-column:1;grid-row:1/3;width:24px;height:24px}body[data-page] .home-stats .stat b{grid-column:2;grid-row:1;font-size:24px}body[data-page] .home-stats .stat span{grid-column:2;grid-row:2;font-size:10px;overflow-wrap:anywhere}}
body[data-page] .layout{display:block}
.shell .topbar{display:flex;justify-content:flex-end;align-items:center;height:124px;padding-top:0}
.shell .topbar .top-actions{position:static;inset:auto;align-self:center;margin:0;transform:none}
.shell .header-ad.google-ad-slot{width:100%;height:auto;min-height:90px;max-width:970px;margin:18px auto}
.profile-menu nav.nav a,.profile-menu nav.nav button{font-size:13px;line-height:1.4;min-height:40px;padding:10px 12px;white-space:normal}
@media(min-width:1440px){body[data-page] .layout:has(.ad-rail .google-ad-slot:not([hidden])){display:grid;grid-template-columns:160px minmax(0,1fr) 160px;gap:24px}}
@media(max-width:640px){.shell .topbar{height:152px;min-height:152px;padding-top:88px}.shell .topbar .top-actions{align-self:center;margin:0;gap:5px}.shell .top-actions .icon-btn,.shell .top-actions .friends-menu>summary{width:38px;height:38px;min-width:38px;padding:6px}.shell .top-actions .profile-menu>summary{min-height:42px;padding:4px 7px}.shell .top-actions .profile-menu>summary .avatar{width:30px;height:30px}.shell .header-ad.google-ad-slot{min-height:72px}}
.content,.editor,.editor-grid,.editor-grid>*,.shop-options,.shop-preview{min-width:0}
.mini-cover-preview{width:100%;max-width:520px;box-sizing:border-box}
.layout{display:block}.ad-rail{display:none}
.header-ad.google-ad-slot{position:relative;inset:auto;transform:none;width:100%;max-width:970px;min-height:90px;height:auto;margin:18px auto;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;padding:16px}
.google-ad-slot::before,.google-ad-slot::after,.header-ad-size::before,.header-ad-size::after{content:none!important}
.google-ad-slot[hidden]{display:none!important}
.google-ad-slot a{overflow-wrap:anywhere;max-width:100%}
.bottom-ads{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:16px;width:100%;min-width:0}
.bottom-ads .google-ad-slot{width:100%;max-width:100%;box-sizing:border-box}
.topbar{isolation:isolate}.top-actions{position:relative;z-index:45}.friends-popover{right:0;max-width:calc(100vw - 32px);box-sizing:border-box}
.profile-menu .nav{max-width:calc(100vw - 32px);box-sizing:border-box}
.shop-option-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:12px}
.shop-option{min-width:0;white-space:normal;overflow-wrap:anywhere}.shop-option:disabled{opacity:1;cursor:default}
@media(min-width:1440px){.layout{display:grid;grid-template-columns:160px minmax(0,1fr) 160px;gap:24px}.ad-rail:has(.google-ad-slot:not([hidden])){display:block}.layout:not(:has(.ad-rail .google-ad-slot:not([hidden]))){display:block}}
@media(max-width:640px){.topbar .top-actions{gap:5px;max-width:100%;padding:6px}.topbar .icon-btn,.friends-menu>summary{width:38px;height:38px;min-width:38px}.profile-menu summary{padding:4px 7px}.profile-menu summary .avatar{width:30px;height:30px}.friends-popover{position:fixed;top:142px;left:16px;right:16px;width:auto;max-height:calc(100dvh - 170px)}.editor-grid{grid-template-columns:minmax(0,1fr)}.selected-game-name{flex-wrap:wrap}.selected-game-name>b{overflow-wrap:anywhere}.list-head{align-items:flex-start;flex-direction:column}.sort-tabs{flex-wrap:wrap}.home-stats{gap:14px;flex-wrap:wrap}.stat{gap:6px}.stat b{font-size:20px}.filter-top{align-items:flex-start;flex-wrap:wrap}.private-chat{max-height:calc(100dvh - 24px);display:flex;flex-direction:column}.chat-messages{min-height:0;overflow:auto}.connection-card{flex-wrap:wrap}.connection-actions{flex-wrap:wrap}.section-placeholder{padding:24px 16px}.editor footer{flex-wrap:wrap}.modal{max-height:calc(100dvh - 24px);padding:20px}.header-ad.google-ad-slot{min-height:72px;margin:12px auto}.auth-card{box-sizing:border-box;max-width:100%}}
