/**
 * Hide scrollbars while keeping overflow scroll (Firefox + WebKit + legacy Edge).
 * v10: hub html is the only scroller; body stays overflow:visible.
 * Grow with content — never lock to one viewport (that caused stripe seams).
 */
html {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    min-height: 100%;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    height: auto !important;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-x: clip;
    -webkit-overflow-scrolling: touch;
    /* Match the gradient (not near-black) so browser chrome / home area doesn't look like a black bar. */
    background-color: var(--euromaja-bg-base, #2a5298);
    background-image: none !important;
}

/* Fixed viewport paint: covers the largest mobile viewport (lvh) incl. areas under browser UI. */
html::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    height: 100lvh;
    min-height: -webkit-fill-available;
    z-index: -1;
    pointer-events: none;
    background: var(
        --theme-gradient,
        linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%)
    );
}

html::-webkit-scrollbar {
    width: 0 !important;
    background: transparent !important;
}

body {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-x: clip;
    -webkit-overflow-scrolling: touch;
    /* Transparent so the fixed html::before shows through the whole scroll height. */
    background: transparent !important;
    background-image: none !important;
}

body::-webkit-scrollbar {
    width: 0 !important;
    background: transparent !important;
}

*,
*::before,
*::after {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

/* Game shell palette on the same fixed backdrop */
html:has(body.eu-game-theme)::before {
    background: var(
        --eu-bg,
        linear-gradient(100deg, #0c4a5c 0%, #0d3d5c 22%, #1a3080 55%, #4c1d95 82%, #581c87 100%)
    );
}

/* Hub pages: body must not be a scroll container (Samsung one-finger pan). */
html.hub-root {
    overflow-x: hidden !important;
    overflow-y: scroll !important;
    touch-action: manipulation;
}
html.hub-root::before {
    pointer-events: none !important;
}
html.hub-root body {
    overflow: visible !important;
    touch-action: auto !important;
    -webkit-overflow-scrolling: auto;
}
