/* mobile-layout-v1: let header content define its height, never overlap gallery. */
header{height:auto;min-height:104px;padding-block:22px;position:relative;isolation:isolate}
header .brand{flex-shrink:0;min-width:0}
header nav,header .gallery-shortcuts{min-width:0}
header a,header button,.category-pill{touch-action:manipulation}
#dailyTop:before,#dailyTop:after,#allTimeTop:before,#allTimeTop:after,.rank-rosette,.shop-sign-icon{pointer-events:none}
body[data-page=gallery] header .content-tabs{flex-wrap:nowrap;max-width:100%}
body[data-page=gallery] header .gallery-shortcuts{min-width:0}
@media(max-width:1050px){
 body[data-page=gallery] header{height:auto;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;padding:22px 24px}
 body[data-page=gallery] header .content-tabs{margin:0;justify-self:end}
 body[data-page=gallery] header .gallery-shortcuts{grid-column:1/-1;display:flex;flex-wrap:wrap;justify-content:flex-start;gap:8px 12px;width:100%}
 body[data-page=gallery] header .gallery-shortcuts a{display:inline-flex!important;align-items:center;justify-content:center;min-height:44px;padding:10px 12px;background:#fff6fa;border:1px solid #efdae4;border-radius:20px;white-space:normal;text-align:center;line-height:1.3;margin:0!important}
 body[data-page=gallery] header .gallery-shortcuts .header-new{margin-left:auto!important}
 body[data-page=gallery] header .surprise-button{min-height:44px}
 .rankings-split>*{min-width:0}
}
@media(max-width:600px){
 body[data-page=gallery] header{grid-template-columns:minmax(0,1fr);gap:16px;padding:20px max(16px,env(safe-area-inset-left)) 18px}
 body[data-page=gallery] header .brand{justify-self:center;font-size:21px}
 body[data-page=gallery] header .content-tabs{justify-self:stretch;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-radius:24px;padding:4px;gap:4px;margin:0;width:100%}
 .content-tabs .content-type{font-size:18px;padding:10px 4px;min-height:46px;min-width:0;white-space:normal}
 body[data-page=gallery] header .gallery-shortcuts{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
 body[data-page=gallery] header .gallery-shortcuts a{grid-column:span 2;font-size:11px;padding:9px 4px;min-width:0}
 body[data-page=gallery] header .gallery-shortcuts .header-new,body[data-page=gallery] header .surprise-button{grid-column:span 3;margin:0!important;width:100%;font-size:11px;min-height:44px}
 .media-main{max-width:none;width:auto;margin:0 16px;padding:24px 0 40px;min-width:0}
 .category-filters{gap:8px}.category-pill{min-height:44px;padding:10px 15px}
 .content-gallery-heading{gap:10px;margin-top:25px;align-items:center}.content-gallery-heading h2{font-size:27px}
 .content-gallery-heading p{white-space:nowrap}
 .favourites-banner{width:100%;padding:10px 0;overflow:hidden}.favourites-banner iframe{width:min(300px,100%);max-width:100%}
 #viewer{width:calc(100% - 16px);max-width:760px;max-height:calc(100dvh - 16px);padding:52px 12px 16px;overflow:auto;margin:auto}
 #viewer .close{position:absolute;top:4px;right:4px;width:44px;height:44px;display:grid;place-items:center;z-index:5;background:#fff7fb;border-radius:50%;font-size:28px;line-height:1}
 #viewerBody{min-width:0;max-width:100%;display:block!important}
 #viewerBody .viewer-media{max-width:100%;width:100%;max-height:calc(100dvh - 100px);object-fit:contain}
 #viewerBody:has(.viewer-ad)>.viewer-media{max-height:calc(100dvh - 390px)}
 .viewer-ad{width:100%;margin:14px auto 0}.viewer-ad iframe{width:min(300px,100%)}
 .vast-gate{width:100%;padding:0}.vast-stage{border-radius:10px;min-height:150px}.vast-gate button{min-height:46px;white-space:normal;max-width:100%;padding:12px 16px}.vast-gate p{font-size:13px;overflow-wrap:anywhere}
 .admin-heading,.manage-heading,.queue-heading{flex-wrap:wrap;gap:12px}.admin-top-actions{display:flex;flex-wrap:wrap;width:100%;gap:8px}.admin-tab,.admin-top-actions .plain{min-height:44px;padding:10px 13px}.admin-top-actions #logout{margin-left:0}
 .bulk-buttons{width:100%;display:flex;flex-wrap:wrap;gap:8px}.bulk-buttons button,.tile-actions button{min-height:44px;padding:10px 12px!important;font-size:12px!important}
 .bulk-toolbar{align-items:stretch}.bulk-toolbar>*{max-width:100%}.manage-filter{flex-wrap:wrap}.manage-filter select,.manage-category-filter select{min-height:44px}
 .tile-checks label{min-height:38px}.tile-checks input,.tile-select input{width:20px;height:20px}.tile-select{padding:9px}
 .admin-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 9px}.admin-grid>*{min-width:0}
 input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea{font-size:16px!important;max-width:100%;min-width:0}
 .ad-provider-card{padding:20px 14px;min-width:0}.ad-provider-card label{overflow-wrap:anywhere}.video-ad-settings fieldset label{min-height:44px;display:flex;align-items:center;gap:10px}.video-ad-settings input[type=radio],.video-ad-settings input[type=checkbox]{width:20px;height:20px;flex-shrink:0}.video-ad-settings>h2{font-size:27px}
 .queue-category-tools{align-items:stretch}.queue-category-tools label{width:100%}.queue-category-tools select{width:100%}.queue-category-tools button{height:auto;min-height:44px}
 footer{margin:0 16px;max-width:calc(100% - 32px);flex-wrap:wrap;padding:25px 0}footer p{width:100%}footer button{min-height:44px}
}
@media(max-width:360px){.admin-grid{grid-template-columns:minmax(0,1fr)}.content-type span{margin-left:0}.top-heading h1,.top-heading h2{font-size:27px}}
