:root{--game-bg:#171a18;--game-safe-top:0px;--game-safe-right:0px;--game-safe-bottom:0px;--game-safe-left:0px;color-scheme:dark}
.game-page{margin:0;overflow:hidden;background:var(--game-bg)}.game-page main{margin:0;padding:0;max-width:none}.game-page #account-panel,.game-page details,.game-page #message,.game-page main>button{display:none}
.game-page #player.game-immersive{box-sizing:border-box;background:var(--game-bg);padding-top:max(env(safe-area-inset-top,0px),var(--game-safe-top));padding-right:max(env(safe-area-inset-right,0px),var(--game-safe-right));padding-bottom:max(env(safe-area-inset-bottom,0px),var(--game-safe-bottom));padding-left:max(env(safe-area-inset-left,0px),var(--game-safe-left))}
.game-page #message:not(:empty){display:block;position:fixed;z-index:4;bottom:0;left:0;margin:0;padding:4px 8px;background:#171a18d9;font-size:12px;max-width:70%;pointer-events:none}.tg-miniapp .game-screen-exit{display:none}
.game-page .game-account-link{visibility:visible!important;position:fixed;z-index:10005;right:max(5px,var(--game-safe-right));bottom:max(5px,var(--game-safe-bottom));padding:5px 8px;border-radius:5px;background:#171a18bc;color:#d9c496;font:12px sans-serif;text-decoration:none}
.game-page .game-screen-exit{display:none}.game-page #message:not(:empty){visibility:visible;z-index:10004}.game-page main>button.game-retry{display:block;visibility:visible!important;position:fixed;z-index:10006;bottom:42px;left:8px}
.auth-main{max-width:440px;padding:24px 16px;padding-top:max(24px,var(--game-safe-top));padding-bottom:max(24px,var(--game-safe-bottom))}.auth-main input{width:100%;box-sizing:border-box}.auth-main label{display:block;margin:12px 0}.auth-main button,.auth-main .telegram-login{display:block;box-sizing:border-box;width:100%;margin:14px 0;text-align:center}.telegram-login{padding:12px;border-radius:5px;background:#278ac4;color:white;text-decoration:none}.auth-main .auth-code{font-size:25px;letter-spacing:5px;color:#e5c780;text-align:center}.auth-main h1{font-size:27px}.auth-main [hidden]{display:none!important}

.account-page main{padding-top:max(20px,var(--game-safe-top));padding-bottom:max(20px,var(--game-safe-bottom))}

/* Static desktop decoration; narrow/touch layouts do not request the image. */
@media (min-width:1100px) and (min-height:600px) and (hover:hover) and (pointer:fine){
 .game-page,.game-page #player,.game-page #player.game-immersive{
  background-image:url(/shell-art/ca8d6113f56f2cfb.png);background-position:center;background-size:cover;background-repeat:no-repeat;
 }
}

/* Landscape Mini App frame: static art in the unused side space. */
@media (orientation:landscape) and (pointer:coarse){
 .game-page #player.game-immersive{background-image:url(/shell-art/mobile-2a0750078a4f3001.webp);background-position:center;background-size:cover;background-repeat:no-repeat}
}

/* Portrait frame uses the two edges of the same art above and below the game. */
@media (orientation:portrait) and (pointer:coarse){
 .game-page #player.game-immersive::before,.game-page #player.game-immersive::after{content:"";position:absolute;left:0;right:0;height:50%;z-index:-1;pointer-events:none;background-image:url(/shell-art/mobile-2a0750078a4f3001.webp);background-size:cover;background-repeat:no-repeat}
 .game-page #player.game-immersive::before{top:0;background-position:left center}
 .game-page #player.game-immersive::after{bottom:0;background-position:right center}
}

/* Landscape controls occupy the side margins; retain physical safe insets. */
@media (orientation:landscape) and (pointer:coarse){
 .tg-miniapp .game-page #player.game-immersive{padding-top:max(env(safe-area-inset-top,0px),var(--game-hardware-safe-top,0px));padding-bottom:max(env(safe-area-inset-bottom,0px),var(--game-hardware-safe-bottom,0px))}
}
