/* Final mobile geometry contract, loaded after the visual theme. */
.game[data-game-mode="JOURNEY"] .game-panel>.badge{display:none!important}
.game[data-game-mode="JOURNEY"] .game-panel>.score+small{display:flex!important;width:100%;justify-content:center;text-align:center}
.game[data-game-mode="JOURNEY"] .game-panel>.score+small::before{display:none!important}
.gameplay-page .game-abandon-form .button::after{content:none!important}
@media(max-width:700px){
.gameplay-page .game{display:flex;height:calc(100svh - 66px);min-height:0;padding:3px 2px 4px;align-items:center;justify-content:center;overflow:hidden}
.gameplay-page .gameplay-touch-zone{display:flex;width:100%;max-width:100%;max-height:100%;gap:3px;align-items:flex-start;justify-content:center;overflow:hidden}
.gameplay-page .board-shell{flex:0 0 auto;padding:2px}.gameplay-page .board-shell canvas#board{width:min(calc(100vw - 108px),calc((100svh - 150px)/2),300px)!important;height:auto!important;max-height:calc(100svh - 150px)}
.gameplay-page .mobile-gesture-hint{height:9px;margin:2px 0 0;font-size:6px;line-height:9px}.gameplay-page .mobile-controls-toggle{display:inline-flex;min-height:26px;margin-top:3px;padding:3px 9px;align-items:center;justify-content:center;gap:5px;line-height:1}.gameplay-page .mobile-controls-toggle::before{content:"✥";display:grid;width:14px;height:14px;place-items:center;border-radius:5px;background:rgba(167,139,250,.14);color:#c4b5fd;font-size:10px;line-height:1}
.gameplay-page .game-panel{display:flex!important;box-sizing:border-box;flex:0 0 88px!important;width:88px!important;min-width:88px!important;max-width:88px!important;max-height:calc(100svh - 72px);padding:4px 3px;gap:0;overflow:hidden;flex-direction:column!important;align-items:stretch!important}
.gameplay-page .game-panel>*{box-sizing:border-box;max-width:100%!important;flex:0 0 auto}
.gameplay-page .game[data-game-mode="JOURNEY"] .game-panel>.badge{display:none!important}
.gameplay-page .game-panel>.score+small{display:block!important;width:100%;justify-content:center;text-align:center}
.gameplay-page .game-panel>.score+small::before{display:none!important}
.gameplay-page .game-panel>.badge{padding:2px 3px;font-size:5.5px}.gameplay-page .game-panel h2{max-height:18px;margin:2px 0;font-size:7px;line-height:1.15}
.gameplay-page .game-panel .next-piece-preview{margin:0 0 2px;padding:1px}.gameplay-page .game-panel .next-piece-preview #next,.gameplay-page .game[data-game-mode=JOURNEY] .game-panel .next-piece-preview #next{width:36px!important;height:36px!important;min-width:36px;min-height:36px}
.gameplay-page .game-panel .score{font-size:17px}.gameplay-page .game-panel .stats{grid-template-columns:1fr 1fr;gap:2px;margin-top:2px;font-size:6px}.gameplay-page .game-panel .stats span{padding:2px 1px}
.gameplay-page .game[data-game-mode=JOURNEY] .game-panel .journey-star-progress{margin:3px 0 0!important;padding:2px!important}.gameplay-page .game[data-game-mode=JOURNEY] .journey-progress-row{min-height:0!important;padding:1px!important}.gameplay-page .game[data-game-mode=JOURNEY] .journey-progress-row span,.gameplay-page .game[data-game-mode=JOURNEY] .journey-progress-row b{font-size:5.5px!important}
.gameplay-page .game[data-game-mode=JOURNEY] .journey-powerups{position:static!important;width:100%!important;margin:3px 0 0!important;padding:2px!important}.gameplay-page .game[data-game-mode=JOURNEY] .journey-powerups>strong{display:none!important}.gameplay-page .game[data-game-mode=JOURNEY] .journey-powerup-dock{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:2px!important}.gameplay-page .game[data-game-mode=JOURNEY] .journey-powerup{display:grid!important;width:100%!important;min-height:29px!important;padding:0!important;grid-template-columns:1fr!important;place-items:center!important;border-radius:6px!important}.gameplay-page .game[data-game-mode=JOURNEY] .journey-powerup i{width:27px!important;margin:auto!important}.gameplay-page .game[data-game-mode=JOURNEY] .journey-powerup b{min-width:12px;height:12px;font-size:6px}.gameplay-page .game[data-game-mode=JOURNEY] .journey-powerup-message{display:none!important}
.gameplay-page .game-abandon-form{margin-top:3px}.gameplay-page .game-abandon-form .button{min-height:24px;padding:2px;font-size:6px}
.gameplay-page .mobile-controls:not([hidden]){position:fixed!important;z-index:210!important;left:6px!important;right:6px!important;bottom:max(6px,env(safe-area-inset-bottom))!important;width:auto!important;max-width:none!important;margin:0!important;padding:7px!important;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:5px!important;border:1px solid rgba(167,139,250,.45)!important;border-radius:14px!important;background:rgba(8,10,24,.96)!important;box-shadow:0 14px 40px rgba(0,0,0,.7)!important;backdrop-filter:blur(14px)}
.gameplay-page .mobile-controls:not([hidden]) button{min-width:0!important;min-height:44px!important;padding:6px 2px!important}
}
@media(max-width:350px),(max-height:620px) and (max-width:700px){.gameplay-page .board-shell canvas#board{width:min(calc(100vw - 104px),calc((100svh - 138px)/2),270px)!important;max-height:calc(100svh - 138px)}.gameplay-page .game-panel{flex-basis:84px!important;width:84px!important;min-width:84px!important;max-width:84px!important}.gameplay-page .game-panel .next-piece-preview #next,.gameplay-page .game[data-game-mode=JOURNEY] .game-panel .next-piece-preview #next{width:31px!important;height:31px!important;min-width:31px;min-height:31px}.gameplay-page .game[data-game-mode=JOURNEY] .journey-powerup{min-height:25px!important}.gameplay-page .game[data-game-mode=JOURNEY] .journey-powerup i{width:23px!important}}
