
/* V6.9 - Frontend + game mobile stability */
html,body{max-width:100%;overflow-x:hidden}
img,video,canvas,svg{max-width:100%}
main{min-width:0}
.game-header,.game-footer{box-sizing:border-box}
.game-header>*{min-width:0}
.table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.shop-shell,.play-shell,.page-shell,.pro-profile-shell,.profile-extra-shell,.community-shell,.mini-game-shell{width:min(100% - 28px,1180px);max-width:1180px;margin-left:auto;margin-right:auto;box-sizing:border-box}
.package-grid,.profile-game-grid,.profile-community-grid,.pro-content-grid,.mini-game-layout{min-width:0}
.package-card,.pro-card,.mini-game-card,.mini-side-card{min-width:0;max-width:100%;box-sizing:border-box}
.arcade-arena-card{max-width:100%;box-sizing:border-box}
.arcade-board,.water-sort-board{max-width:100%;box-sizing:border-box}
.ws-flying-bottle,.ws-waterfall,.ws-pour-splash{pointer-events:none}
.arcade-arena-card:fullscreen{box-sizing:border-box;max-width:none!important;width:100vw!important;height:100vh!important;overflow:hidden!important}
.arcade-arena-card:fullscreen .arcade-board{min-height:0!important;height:calc(100vh - 150px);overflow:auto;display:flex;align-content:center;justify-content:center}
.arcade-arena-card:fullscreen .water-sort-board{overflow:visible!important}
.arcade-arena-card:fullscreen .ws-flying-bottle,
.arcade-arena-card:fullscreen .ws-waterfall,
.arcade-arena-card:fullscreen .ws-pour-splash{z-index:2147482000!important}

@media(max-width:900px){
 .game-header{padding:10px 14px;gap:10px;flex-wrap:wrap}
 .game-header .game-logo{flex:1 1 auto}
 .game-header nav{order:3;width:100%;display:flex;gap:6px;overflow-x:auto;padding:2px 0 4px;scrollbar-width:none}
 .game-header nav::-webkit-scrollbar{display:none}
 .game-header nav>a,.portal-nav-item>a{white-space:nowrap;padding:8px 10px}
 .portal-submenu{position:fixed!important;left:12px!important;right:12px!important;top:112px!important;min-width:0!important}
 .header-player{margin-left:auto;gap:6px}
 .wallet-chip{padding:7px 8px}
 .game-footer{margin-top:32px;padding-left:14px;padding-right:14px;gap:16px;flex-wrap:wrap}
 .footer-right{width:100%}
 .package-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .pro-content-grid,.profile-community-grid,.mini-game-layout{grid-template-columns:1fr!important}
 .community-topic-layout{grid-template-columns:1fr!important}
 .community-author-card{position:static!important}
}
@media(max-width:640px){
 .shop-shell,.play-shell,.page-shell,.pro-profile-shell,.profile-extra-shell,.community-shell,.mini-game-shell{width:calc(100% - 20px)}
 .game-logo strong{font-size:14px}
 .wallet-chip b{font-size:12px}
 .package-grid{grid-template-columns:1fr!important}
 .package-card{padding-left:16px!important;padding-right:16px!important}
 .subpage-head,.play-top,.mini-game-top{align-items:flex-start!important;flex-direction:column!important}
 .arcade-outside-top{gap:9px}
 .arcade-arena-card{border-radius:18px!important}
 .arcade-toolbar{padding:10px!important;gap:7px}
 .arcade-level-title strong{font-size:22px!important}
 .arcade-level-title span{font-size:10px!important}
 .arcade-icon-btn,.arcade-power-btn{transform:scale(.88);transform-origin:center}
 .arcade-board{padding:18px 8px 70px!important}
 .water-sort-board{gap:12px 8px!important}
 .water-bottle{max-width:62px}
 .ws-level-panel{width:min(94vw,430px)!important}
 .community-edit-shell{padding-left:10px!important;padding-right:10px!important}
 .community-edit-card{border-radius:18px!important}
 .ck.ck-editor{max-width:100%!important}
 .ck.ck-toolbar{flex-wrap:wrap!important}
 .ck.ck-editor__editable{word-break:break-word}
 .reaction-strip,.topic-reactions,.quick-reactions{max-width:100%;overflow-x:auto;flex-wrap:nowrap!important;padding-bottom:4px}
}
@media(max-width:430px){
 .header-player .wallet-chip{font-size:0}
 .header-player .wallet-chip b{font-size:11px}
 .game-header{padding-left:10px;padding-right:10px}
 .arcade-toolbar-left,.arcade-toolbar-right{gap:3px!important}
 .arcade-power-btn span{display:none!important}
 .arcade-power-btn{min-width:44px!important;width:44px!important;padding:0!important}
 .arcade-level-title{min-width:0}
 .water-sort-board{transform-origin:top center}
}

/* V7.0 extra mobile polish */
@media(max-width:700px){
 .game-footer{display:grid!important;grid-template-columns:1fr!important;gap:14px!important;padding:22px 14px 28px!important}
 .game-footer .footer-left,.game-footer .footer-right{width:100%!important;display:flex!important;flex-wrap:wrap!important;gap:8px 14px!important;align-items:flex-start!important}
 .game-footer .footer-right{justify-content:flex-start!important}
 .game-footer .footer-copy{width:100%!important;margin-top:4px!important}
 .subpage-head h1,.page-hero h1{font-size:34px!important;line-height:1.08!important}
}
