@media (max-width: 768px) {

    #modal:has(.game-start-wrapper) .modal-dialog,
    #modal:has(.game-wrapper) .modal-dialog {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh;
        margin: 0;
        border-radius: 0;
    }

    #modal:has(.game-start-wrapper) .modal-content,
    #modal:has(.game-wrapper) .modal-content {
        height: 100%;
        border-radius: 0;
        overflow: hidden;
    }

    #modal:has(.game-start-wrapper) .modal-body,
    #modal:has(.game-wrapper) .modal-body {
        height: 100%;
        display: flex;
        flex-direction: column;
        padding: 0;
        overflow: hidden;
    }

    .game-start-wrapper {
        flex: 1;
        justify-content: center;
        padding: 20px;
    }

    .game-start-wrapper .logo-container img {
        max-width: 75vw;
    }

    .game-start-wrapper .logo-container p {
        font-size: 5.5vw;
        bottom: -6vw;
    }

    .game-start-wrapper .start-container {
        margin-top: 100px;
        margin-bottom: 6vw;
    }

    .game-start-wrapper .skip-container {
        padding: 0 20px 20px;
    }

    .game-step-wrapper .step-header {
        padding-top: 12px;
        gap: 6px;
    }

    .step-header p:nth-child(2) {
        font-size: 13px;
    }

    .back-part {
        width: 50vw;
        max-width: 300px;
    }

    .front-part .front-base {
        width: 50vw;
        max-width: 300px;
    }

    .game-wrapper {
        flex: 1;
        height: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .game-wrapper.step-1 {
        justify-content: center;
        gap: 20px;
    }

    .game-wrapper.step-2,
    .game-wrapper.step-3 {
        padding-bottom: 26vw;
    }

    .game-wrapper .help {
        margin-right: 0;
        margin-bottom: 30px;
    }

    .help-container .hand {
        bottom: -30px;
        left: 0;
    }

    .game-wrapper.step-1 .help {
        width: 160px;
        height: 58px;
    }

    .game-wrapper.step-2 .help,
    .game-wrapper.step-3 .help {
        width: 50px;
        min-width: 50px;
        height: 160px;
    }

    .step-2 .help-container .hand {
        bottom: 0;
    }

    .help-container .arrow-left,
    .help-container .arrow-top,
    .help-container .arrow-bottom {
        width: 100%;
        max-width: 60px;
    }

    .help-container .hand,
    .step-2 .help-container .hand,
    .step-3 .help-container .hand {
        max-width: 60px;
    }

    .milk-container {
        height: 26vw;
    }

    @keyframes hand-slide {
        0%   { transform: translateX(0); }
        45%  { transform: translateX(90px); }
        55%  { transform: translateX(90px); }
        100% { transform: translateX(0); }
    }

    @keyframes hand-slide-top {
        0%   { transform: translateY(0); }
        45%  { transform: translateY(-90px); }
        55%  { transform: translateY(-90px); }
        100% { transform: translateY(0); }
    }

    @keyframes hand-slide-bottom {
        0%   { transform: translateY(0); }
        45%  { transform: translateY(90px); }
        55%  { transform: translateY(90px); }
        100% { transform: translateY(0); }
    }

    @keyframes arrow-slide {
        0%   { transform: translateX(0);    opacity: 0; }
        15%  { transform: translateX(0);    opacity: 1; }
        80%  { transform: translateX(55px); opacity: 1; }
        100% { transform: translateX(55px); opacity: 0; }
    }

    @keyframes arrow-slide-top {
        0%   { transform: translateY(0);     opacity: 0; }
        15%  { transform: translateY(0);     opacity: 1; }
        80%  { transform: translateY(-55px); opacity: 1; }
        100% { transform: translateY(-55px); opacity: 0; }
    }

    @keyframes arrow-slide-bottom {
        0%   { transform: translateY(0);    opacity: 0; }
        15%  { transform: translateY(0);    opacity: 1; }
        80%  { transform: translateY(55px); opacity: 1; }
        100% { transform: translateY(55px); opacity: 0; }
    }

    .game-final-container {
        gap: 40px;
        margin-top: 40px;
        margin-bottom: 30px;
        padding: 0 20px;
    }

    .game-final-container p {
        font-size: 16px;
    }

}

@media (max-width: 650px) {

    .back-part {
        max-width: 250px;
    }

    .front-part .front-base {
        max-width: 250px;
    }

}

@media (max-width: 550px) {

    .back-part {
        max-width: 200px;
    }

    .front-part .front-base {
        max-width: 200px;
    }

}

@media (max-width: 450px) {

    .back-part {
        max-width: 150px;
    }

    .front-part .front-base {
        max-width: 150px;
    }

    .game-wrapper.step-1 .help {
        width: 140px;
        height: 50px;
    }

    .game-wrapper.step-2 .help,
    .game-wrapper.step-3 .help {
        width: 40px;
        min-width: 40px;
        height: 120px;
    }

}