/* Puppy Snake — viewport-adaptive 750×440 board */

@media screen and (max-height: 640px) {
    #psnPlayShell .container.container-single {
        padding-top: 3px !important;
    }
}

#psnPlayShell.game-worlds-play-shell {
    min-height: 0;
    box-sizing: border-box;
}

#psnPlayShell.game-worlds-play-shell:not([data-casual-sized]) {
    height: 0;
    min-height: 0;
    max-height: none;
    overflow: hidden;
}

#psnPlayShell .casual-outer-shell {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.game-worlds-body #psnPlayShell #gamebox.psn-gamebox,
#psnPlayShell #gamebox.psn-gamebox {
    --psn-scale-x: 1;
    --psn-scale-y: 1;
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    background-color: #000;
}

#psnPlayShell .header {
    flex: 0 0 auto;
    position: relative;
    top: auto;
    width: 100%;
    padding: 8px 16px;
    box-sizing: border-box;
    text-align: center;
    z-index: 2;
}

#psnPlayShell .header .current {
    font-size: clamp(22px, 3vw, 30px);
    color: #fff;
}

#psnPlayShell .header .record {
    font-size: 16px;
    color: #fff;
}

#psnPlayShell .psn-playfield {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

#psnPlayShell #gamemain {
    position: absolute;
    left: 0;
    top: 0;
    width: 750px;
    height: 440px;
    margin: 0;
    overflow: hidden;
    background-image: url("/play/puppy-snake/images/bg.png");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(var(--psn-scale-x, 1), var(--psn-scale-y, 1));
    transform-origin: top left;
}

#psnPlayShell .ball {
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    background-image: url("/play/puppy-snake/images/ball.png");
}

#psnPlayShell .pet {
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 0;
    transition: transform 0s linear;
}

#psnPlayShell .pet_head {
    background-size: cover;
    border-radius: 50%;
    background-color: transparent;
}

#psnPlayShell .gameover {
    display: block;
    margin: 0 auto;
    width: 100%;
    height: 100%;
    text-align: center;
    background-color: rgba(22, 28, 28, 0.9);
    position: absolute;
    inset: 0;
    z-index: 2;
}

#psnPlayShell .gameover p.msg {
    font-family: Arial, sans-serif;
    font-size: 24px;
    color: grey;
    margin: 150px auto 0;
}

#psnPlayShell .gameover span {
    font-family: Arial, sans-serif;
    font-size: 40px;
    color: white;
    margin: 20px auto;
}

#psnPlayShell #restartgamebutton,
#psnPlayShell #continuegamebutton {
    display: block;
    margin: 16px auto;
    width: 120px;
    padding: 6px;
    background-color: #00BB00;
    font-family: Arial, sans-serif;
    font-size: 24px;
    color: red;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
}

#psnPlayShell #restartgamebutton:hover,
#psnPlayShell #continuegamebutton:hover {
    background-color: #9f8b77;
}

#psnPlayShell .pause {
    display: block;
    margin: 0 auto;
    width: 100%;
    height: 100%;
    text-align: center;
    position: absolute;
    inset: 0;
    background-color: rgba(22, 28, 28, 0.9);
    z-index: 2;
}

#psnPlayShell .pause p {
    font-family: Arial, sans-serif;
    font-size: 24px;
    color: grey;
    margin: 150px auto 0;
}

#psnPlayShell #tips {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-weight: bold;
}
