/* Last-loaded shared window constraints. Position against visualViewport, not a filter column. */
:root{--screen-left:0px;--screen-top:0px;--screen-width:100vw;--screen-height:100dvh;--screen-right:0px;--screen-bottom:0px}
html .marketplace .choice-menu[data-viewport-fit]{position:fixed!important;inset:auto!important;left:var(--menu-left,8px)!important;top:var(--menu-top,8px)!important;right:auto!important;bottom:auto!important;transform:none!important;margin:0!important;width:var(--menu-width,calc(var(--screen-width) - 16px))!important;min-width:0!important;max-width:calc(var(--screen-width) - 16px)!important;max-height:var(--menu-height,calc(var(--screen-height) - 16px))!important;box-sizing:border-box;display:flex;flex-direction:column;overflow:auto;overscroll-behavior:contain;z-index:1000;contain:layout;}
html .marketplace .choice-menu[data-viewport-fit][hidden]{display:none!important}
html .marketplace .choice-menu[data-viewport-fit] .choice-query{flex:0 0 auto;width:100%;min-width:0;box-sizing:border-box;font-size:16px;scroll-margin:8px}
html .marketplace .choice-menu[data-viewport-fit] .choice-list{flex:1 1 auto;min-height:0;max-height:240px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
html .marketplace .choice-menu[data-viewport-fit] .choice-count{flex:0 0 auto;overflow-wrap:break-word;font-size:12px;line-height:1.4;margin:8px 0}
html .marketplace .choice-menu[data-viewport-fit] .choice-done{flex:0 0 auto;position:sticky;bottom:0;min-height:44px}
html .marketplace .choice-menu[data-viewport-fit] [role=option]{min-height:40px;white-space:normal;overflow-wrap:break-word}
html .marketplace .choice-menu[data-viewport-fit]::backdrop{background:transparent}
/* Native dialogs remain in the top layer and scroll within the unobscured screen. */
html .marketplace dialog:not(#notification-center):not([data-docked=true]){position:fixed!important;inset:calc(var(--screen-top) + 8px) calc(var(--screen-right) + 8px) calc(var(--screen-bottom) + 8px) calc(var(--screen-left) + 8px)!important;margin:auto!important;box-sizing:border-box;min-width:0!important;min-height:0!important;max-width:calc(var(--screen-width) - 16px)!important;max-height:calc(var(--screen-height) - 16px)!important;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
html .marketplace #modal[data-view=profile][data-docked=true]{top:max(calc(var(--screen-top) + 8px),var(--profile-top,150px))!important;right:calc(var(--screen-right) + var(--gutter))!important;bottom:calc(var(--screen-bottom) + 8px)!important;height:auto!important;max-height:calc(var(--screen-height) - 16px)!important;max-width:calc(var(--screen-width) - 16px)!important;overflow-y:auto}
html .marketplace #notification-center{left:var(--notice-left,calc(var(--screen-left) + 8px))!important;right:auto!important;top:var(--notice-top,calc(var(--screen-top) + 8px))!important;bottom:auto!important;min-width:0;box-sizing:border-box;max-width:calc(var(--screen-width) - 16px)!important;max-height:calc(var(--screen-top) + var(--screen-height) - var(--notice-top,calc(var(--screen-top) + 8px)) - 8px)!important}
html .marketplace dialog input:not([type=checkbox]):not([type=radio]),html .marketplace dialog select,html .marketplace dialog textarea{max-width:100%;box-sizing:border-box}
html .marketplace dialog .modal-top,html .marketplace dialog .linked-player-top{position:sticky;top:0;z-index:5;background:#fffdf8}
html .marketplace dialog .modal-top button,html .marketplace dialog .linked-player-top button{min-width:40px;min-height:40px}
@media(max-width:600px){
 html .marketplace .choice-menu[data-viewport-fit]{border-radius:14px;padding:10px}
 html .marketplace .choice-menu[data-viewport-fit] .choice-list{max-height:280px}
 html .marketplace #notification-center,html .marketplace #notification-center[data-full=true]{inset:auto!important;left:calc(var(--screen-left) + 8px)!important;bottom:calc(var(--screen-bottom) + 8px)!important;top:auto!important;width:calc(var(--screen-width) - 16px)!important;max-height:calc(var(--screen-height) - 16px)!important;border-radius:16px}
 html .marketplace dialog input:not([type=checkbox]):not([type=radio]),html .marketplace dialog select,html .marketplace dialog textarea{font-size:16px!important}
}
