/* HB Battle v57 — mobile viewport + scroll hardening. Loaded LAST in app.html. */

/* 1) One deterministic scroller: the page (html). Never a nested body scroller. */
html{width:100%;max-width:100%;height:auto!important;overflow-x:hidden!important;overflow-y:auto!important;-webkit-text-size-adjust:100%;text-size-adjust:100%;overscroll-behavior-y:auto!important}
body{width:100%;max-width:100%;min-width:0!important;height:auto!important;min-height:100%;overflow-x:clip!important;overflow-y:visible!important;overscroll-behavior-y:auto!important;touch-action:auto!important}

/* 2) Nothing may be wider than the phone. */
.screen:not(.auth-screen){max-width:100%!important;overflow-x:hidden!important;overscroll-behavior:auto!important}
img,video,canvas,iframe,table,pre{max-width:100%}
.bottom-nav{max-width:calc(100vw - 16px)}

/* 3) Cookie / privacy popup: a compact bottom sheet that never locks the page. */
.hb-cookie-overlay{pointer-events:none!important;background:transparent!important;align-items:flex-end!important;justify-content:center!important;padding:0 8px calc(8px + env(safe-area-inset-bottom,0px))!important;overflow:hidden!important}
.hb-cookie-overlay .hb-cookie-card{pointer-events:auto!important;width:100%!important;max-width:520px!important;max-height:min(70vh,560px)!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:16px!important;border-radius:20px!important;box-shadow:0 -8px 40px rgba(0,0,0,.45)!important}
.hb-cookie-card h2{font-size:18px!important;line-height:1.2!important;margin:0 40px 6px 0!important}
.hb-cookie-card p{font-size:13px!important;line-height:1.45!important;margin:0 0 10px!important}
.hb-cookie-kicker{display:none!important}
.hb-cookie-options{margin:10px 0 12px!important;gap:7px!important}
.hb-cookie-options small{font-size:11.5px!important}
.hb-cookie-options b{font-size:14px!important}
.hb-cookie-actions{display:grid!important;grid-template-columns:1fr 1fr 1fr!important;gap:8px!important}
.hb-cookie-actions>*{flex:none!important;width:auto!important;min-width:0!important;padding:10px 6px!important;font-size:13px!important;min-height:42px!important}
.hb-cookie-card.hb-cookie-compact .hb-cookie-options,
.hb-cookie-card.hb-cookie-compact .hb-cookie-note{display:none!important}
@media (max-width:340px){.hb-cookie-actions{grid-template-columns:1fr!important}}

/* 4) Desktop-mode helper banner (shown only when the browser is in "Desktop site" mode). */
#hbDesktopModeBanner{position:fixed;left:8px;right:8px;top:calc(8px + env(safe-area-inset-top,0px));z-index:2147483600;display:flex;gap:10px;align-items:flex-start;background:#1b1f2a;color:#fff;border:1px solid #ff8f5e;border-radius:14px;padding:12px 14px;font:600 13px/1.4 system-ui,sans-serif;box-shadow:0 10px 30px rgba(0,0,0,.5)}
#hbDesktopModeBanner button{margin-left:auto;background:transparent;border:0;color:#ff8f5e;font:700 18px/1 system-ui;padding:0 4px}
#hbVpDebug{position:fixed;left:6px;right:6px;bottom:6px;z-index:2147483601;background:#000c;color:#9f9;font:11px/1.4 monospace;padding:8px;border-radius:8px;white-space:pre-wrap}
