/* Mobile polish: approved header, controls and typography; no new visual system. */
html[data-mobile-ux=true]{scroll-padding-top:0;}
html[data-mobile-ux=true] :is(.stage,.scroll-story){scroll-margin-top:var(--mobile-header-height,112px);}
/* Apply the header offset to content targets, not the global scrollport: sticky controls must never auto-scroll the page. */
html[data-mobile-ux=true] :is(#map,#auction,#raid,#pvp,.auction-conversation){scroll-margin-top:calc(var(--mobile-header-height,112px) + 12px);}
html[data-mobile-ux=true] :is(.scroll-story,section.auction-screen) :is(button,a,input,summary,[tabindex]){scroll-margin-top:calc(var(--mobile-header-height,112px) + 12px);scroll-margin-bottom:12px;}
html[data-mobile-ux=true] body>[data-mobile-site-header=true]{position:sticky;top:0;left:auto;right:auto;width:100%;height:auto;z-index:30;isolation:isolate;flex-wrap:wrap;min-height:0;padding-top:calc(8px + env(safe-area-inset-top,0px));padding-right:max(16px,env(safe-area-inset-right,0px));padding-left:max(16px,env(safe-area-inset-left,0px));background:linear-gradient(#0b110ef5,#0b110eed);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid #9c7a3470;}
html[data-mobile-ux=true] body>[data-mobile-site-header=true] .navigation{display:flex;order:3;flex:0 0 100%;width:100%;margin:0;gap:8px;justify-content:space-between;}
html[data-mobile-ux=true] body>[data-mobile-site-header=true] .navigation button{min-height:44px;}
html[data-mobile-ux=true] :is(#auction,#raid,#pvp)>.auction-header{display:none!important;}
html[data-mobile-ux=true] .stage #ambient-toggle{inset:12px max(16px,env(safe-area-inset-right,0px)) auto auto;}
html[data-mobile-ux=true] .stage .hero>.eyebrow{max-width:calc(100% - 42px);}
/* Never allow the changing label to create a second grid row or shift the glyph. */
html body :is(#ambient-toggle,#auction-video-toggle,#raid-video-toggle,#pvp-video-toggle).ambient-toggle{display:grid;place-items:center;padding:0;min-width:44px;min-height:44px;font-size:0;line-height:0;box-sizing:border-box;}
html body :is(#ambient-toggle,#auction-video-toggle,#raid-video-toggle,#pvp-video-toggle).ambient-toggle[hidden]{display:none;}
html body :is(#ambient-toggle,#auction-video-toggle,#raid-video-toggle,#pvp-video-toggle).ambient-toggle>svg{display:none!important;}
html body :is(#ambient-toggle,#auction-video-toggle,#raid-video-toggle,#pvp-video-toggle).ambient-toggle::after{content:'';position:absolute;display:block;inset:50% auto auto 50%;width:18px;height:18px;border:0;margin:0;padding:0;transform:translate(-50%,-50%);pointer-events:none;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4v16l14-8z'/%3E%3C/svg%3E") center/contain no-repeat;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4v16l14-8z'/%3E%3C/svg%3E") center/contain no-repeat;}
html body :is(#ambient-toggle,#auction-video-toggle,#raid-video-toggle,#pvp-video-toggle).ambient-toggle[data-media-playing=true]::after{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 4h4v16H6zm8 0h4v16h-4z'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 4h4v16H6zm8 0h4v16h-4z'/%3E%3C/svg%3E");}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse){
 .ac-page .ac-topbar{gap:8px;padding-inline:max(16px,env(safe-area-inset-left,0px));}
 .ac-page .ac-topbar>p{flex:1 1 auto;min-width:0;}
 .ac-page .ac-topbar>div{gap:4px;flex:0 0 auto;}
 .ac-page .ac-top-site,.ac-page .ac-mobile-logout{min-width:44px;min-height:44px;flex-shrink:0;}
 .ac-page .ac-table-toolbar .ac-link,.ac-page .ac-table .ac-link,.ac-page [data-action=export]{min-height:44px;}
 .ac-page .ac-footer{padding-bottom:max(18px,env(safe-area-inset-bottom,0px));}
 .ac-modal.modal .ac-dialog-body{min-height:0;}
}
/* Landscape phone / keyboard: use the existing single-column auth layout, not a squeezed desktop illustration. */
@media (max-width:1024px) and (pointer:coarse) and (max-height:600px){
 #ac-auth-dialog .ac-auth-layout{display:block;min-height:0;max-height:calc(var(--ac-vh,100dvh) - 26px);overflow:auto;overscroll-behavior:contain;}
 #ac-auth-dialog .ac-auth-art{display:none;}
 #ac-auth-dialog .ac-auth-form{padding:32px 20px 22px;overflow:visible;min-height:0;}
 #ac-auth-dialog h1{font-size:25px;}
}
@media(prefers-reduced-motion:reduce){html[data-mobile-ux=true]{scroll-behavior:auto;}}

/* Keep the existing keyboard skip link above the mobile sticky header when focused. */
html[data-mobile-ux=true] .skip-flight:focus{z-index:60;}
