.minigame-play-heading {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 12px 0;
}
.minigame-play-heading .text-ani,
.rps24-head .text-ani,
.cf24-head .text-ani,
.rtd24-head .text-ani {
    text-shadow: none !important;
}
.minigame-play-heading ~ .mg24-page,
.minigame-play-heading ~ .rcg24,
.minigame-play-heading ~ .rps24,
.minigame-play-heading ~ .cf24,
.minigame-play-heading ~ .rtd24 {
    padding-top: 0 !important;
}
@media (max-width: 575.98px) {
    .minigame-play-heading { padding: 17px 9px 0; }
}
.mg24-stage {
    position: relative;
    overflow: hidden;
    min-height: 330px;
    margin: 4px 0 14px;
    border: 1px solid color-mix(in srgb, var(--main) 23%, var(--bg_border));
    border-radius: 20px;
    background: radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--main) 15%, transparent), transparent 56%), var(--bg_sub);
}
.mg24-stage-note {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 9px;
    transform: translateX(-50%);
    padding: 5px 9px;
    border: 1px solid var(--bg_border);
    border-radius: 99px;
    background: color-mix(in srgb, var(--bg_main) 85%, transparent);
    color: var(--font_sub);
    font-size: 9px;
    white-space: nowrap;
}

/* Rail */
.mg24-rail {
    display: flex;
    align-items: center;
    height: 330px;
    will-change: transform;
    transition: transform 4.3s cubic-bezier(.08, .7, .05, 1);
}
.mg24-rail-item {
    position: relative;
    flex: 0 0 180px;
    height: 235px;
    margin: 0 8px;
    padding: 14px 12px 72px;
    border: 1px solid var(--bg_border);
    border-radius: 17px;
    background: var(--bg_main);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
}
.mg24-rail-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.mg24-rail-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 8px;
    bottom: 8px;
    left: 8px;
    min-height: 54px;
    padding: 7px 8px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--sub) 62%, var(--bg_border));
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg_sub) 90%, transparent);
    color: var(--font_main);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    box-shadow: inset 0 0 16px color-mix(in srgb, var(--sub) 9%, transparent);
}
.mg24-marker {
    position: absolute;
    z-index: 5;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    transform: translateX(-50%);
    background: linear-gradient(transparent, #ff2438 12%, #ff2438 88%, transparent);
    box-shadow: 0 0 8px #ff2438, 0 0 22px rgba(255, 36, 56, .95);
    animation: mg24RedTarget 1.15s ease-in-out infinite;
}
.mg24-marker::before,
.mg24-marker::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-right: 10px solid transparent;
    border-left: 10px solid transparent;
}
.mg24-marker::before {
    top: 7px;
    border-top: 16px solid #ff2438;
}
.mg24-marker::after {
    bottom: 7px;
    border-bottom: 16px solid #ff2438;
}

/* Lucky box */
.mg24-chests {
    display: grid;
    min-height: 330px;
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    align-content: center;
    gap: 15px;
    padding: 28px;
    perspective: 900px;
}
.mg24-chest {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 1 / .78;
    border: 1px solid color-mix(in srgb, var(--sub) 58%, var(--bg_border));
    border-radius: 18px;
    background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--main) 16%, transparent), transparent 42%), linear-gradient(145deg, var(--bg_main), color-mix(in srgb, var(--sub) 13%, var(--bg_sub)));
    color: var(--main);
    font-size: 46px;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--main) 8%, transparent), 0 10px 24px rgba(0, 0, 0, .12);
    transform-style: preserve-3d;
    transition: transform .72s cubic-bezier(.22, .8, .2, 1), border-color .28s, box-shadow .28s, opacity .28s, filter .28s;
}
.mg24-chest::after {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid color-mix(in srgb, var(--main) 12%, transparent);
    border-radius: 13px;
    pointer-events: none;
}
.mg24-chest:hover {
    transform: translateY(-3px);
    border-color: var(--main);
}
.mg24-chests.is-cinematic .mg24-chest {
    pointer-events: none;
}
.mg24-chest.is-opening {
    box-shadow: 0 0 26px color-mix(in srgb, var(--main) 48%, transparent);
    animation: mg24Shake .55s ease-in-out infinite;
}
.mg24-chest.is-revealed {
    border-color: color-mix(in srgb, var(--main) 72%, white);
    box-shadow: 0 0 24px color-mix(in srgb, var(--main) 42%, transparent);
}
.mg24-chest-flipper {
    position: absolute;
    inset: 9px;
    transform-style: preserve-3d;
    transition: transform .76s cubic-bezier(.2, .76, .2, 1);
    transition-delay: var(--flip-delay, 0ms);
}
.mg24-chest.is-revealed .mg24-chest-flipper {
    transform: rotateY(180deg);
}
.mg24-chest.is-closing .mg24-chest-flipper {
    transition-delay: var(--flip-close-delay, 0ms);
}
.mg24-chest-face {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 13px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.mg24-chest-back {
    color: var(--main);
    background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--main) 18%, transparent), transparent 48%);
}
.mg24-chest-front {
    transform: rotateY(180deg);
    background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--main) 22%, transparent), transparent 58%), var(--bg_main);
}
.mg24-chests.is-gathering .mg24-chest {
    z-index: var(--merge-z, 1);
    transform: translate(var(--merge-x, 0), var(--merge-y, 0)) scale(.62) rotate(var(--merge-rotate, 0deg));
    border-color: var(--main);
    box-shadow: 0 0 24px color-mix(in srgb, var(--main) 30%, transparent);
}
.mg24-chests.is-mixing .mg24-chest-flipper {
    animation: mg24ChestMix .36s ease-in-out infinite alternate;
}
.mg24-chests.is-selecting .mg24-chest {
    cursor: pointer;
    border-color: color-mix(in srgb, var(--main) 45%, var(--bg_border));
}
.mg24-chests.is-selecting .mg24-chest:hover,
.mg24-chest.is-selected {
    transform: translateY(-6px) scale(1.035);
    border-color: var(--main);
    box-shadow: 0 0 18px color-mix(in srgb, var(--main) 52%, transparent), 0 14px 28px rgba(0, 0, 0, .18);
}
.mg24-chest.is-dimmed {
    opacity: .42;
    filter: grayscale(.45);
}
.mg24-chest .mg24-preview-img,
.mg24-chest.is-winner img {
    width: 75%;
    height: 75%;
    object-fit: contain;
    filter: drop-shadow(0 7px 12px rgba(0, 0, 0, .28));
}
.mg24-chest.is-winner {
    background: color-mix(in srgb, var(--main) 12%, var(--bg_main));
}

/* Slot */
.mg24-slot-machine {
    position: relative;
    width: min(390px, 90%);
    margin: 4px auto 0;
    padding: 42px 30px 27px;
    border: 2px solid color-mix(in srgb, var(--main) 55%, var(--bg_border));
    border-radius: 34px 34px 24px 24px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--main) 16%, var(--bg_main)), var(--bg_main) 45%, color-mix(in srgb, var(--sub) 10%, var(--bg_main)));
    box-shadow: 0 20px 45px rgba(0, 0, 0, .18), inset 0 0 0 6px color-mix(in srgb, var(--main) 7%, transparent);
}
.mg24-stage-slot {
    border: 0;
    background: transparent;
}
.mg24-stage-slot .mg24-slot-machine {
    padding-top: 42px;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.mg24-slot-marquee {
    display: flex;
    align-items: center;
    position: absolute;
    z-index: 6;
    top: 9px;
    left: 50%;
    gap: 7px;
    transform: translateX(-50%);
    padding: 6px 16px;
    border: 1px solid color-mix(in srgb, var(--main) 60%, transparent);
    border-radius: 99px;
    background: var(--bg_sub);
    color: var(--main);
    box-shadow: 0 0 18px color-mix(in srgb, var(--main) 34%, transparent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    white-space: nowrap;
}
.mg24-slot-bezel {
    position: relative;
    overflow: hidden;
    border: 5px solid color-mix(in srgb, var(--main) 30%, var(--bg_border));
    border-radius: 24px;
    background: #05070d;
    box-shadow: inset 0 0 25px rgba(0, 0, 0, .8), 0 8px 20px rgba(0, 0, 0, .18);
}
.mg24-slot-window {
    position: relative;
    width: 100%;
    height: 292px;
    margin: auto;
    overflow: hidden;
    background: radial-gradient(circle, color-mix(in srgb, var(--main) 9%, #090d18), #05070d 68%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%);
}
.mg24-slot-reel {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    will-change: transform;
}
.mg24-slot-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
    padding: 15px;
}
.mg24-slot-card {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 120px;
    padding: 11px;
    border: 1px solid color-mix(in srgb, var(--main) 22%, #222);
    border-radius: 18px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--bg_main) 94%, #05070d), color-mix(in srgb, var(--main) 8%, #070a12));
    box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
}
.mg24-slot-card img {
    width: 88px;
    height: 88px;
    object-fit: contain;
}
.mg24-slot-center {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: 50%;
    width: min(320px, 86%);
    height: 130px;
    transform: translate(-50%, -50%);
    border: 2px solid var(--main);
    border-radius: 22px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--main) 5%, transparent), transparent 24% 76%, color-mix(in srgb, var(--main) 5%, transparent));
    box-shadow: 0 0 10px color-mix(in srgb, var(--main) 75%, transparent), 0 0 32px color-mix(in srgb, var(--main) 35%, transparent), inset 0 0 22px color-mix(in srgb, var(--main) 14%, transparent);
    pointer-events: none;
    animation: mg24SlotTarget 1.6s ease-in-out infinite;
}
.mg24-slot-center::before,
.mg24-slot-center::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    filter: drop-shadow(0 0 6px var(--main));
}
.mg24-slot-center::before {
    left: -3px;
    border-left: 15px solid var(--main);
}
.mg24-slot-center::after {
    right: -3px;
    border-right: 15px solid var(--main);
}
.mg24-slot-label {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 9px;
    border: 1px solid var(--main);
    border-radius: 99px;
    background: var(--bg_main);
    color: var(--main);
    box-shadow: 0 0 12px color-mix(in srgb, var(--main) 45%, transparent);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.2px;
}
.mg24-slot-lights {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin-top: 15px;
}
.mg24-slot-lights i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--main);
    box-shadow: 0 0 10px var(--main);
    animation: mg24Bulb 1.2s ease-in-out infinite;
}
.mg24-slot-lights i:nth-child(2) { animation-delay: .2s; }
.mg24-slot-lights i:nth-child(3) { animation-delay: .4s; }
.mg24-slot-lights i:nth-child(4) { animation-delay: .6s; }
.mg24-slot-lights i:nth-child(5) { animation-delay: .8s; }
.mg24-slot-lever {
    position: absolute;
    z-index: 8;
    top: 90px;
    right: -14px;
    width: 34px;
    height: 128px;
}
.mg24-slot-lever::before {
    content: "";
    position: absolute;
    z-index: -1;
    bottom: 13px;
    left: -15px;
    width: 22px;
    height: 31px;
    border: 2px solid color-mix(in srgb, var(--main) 38%, #333);
    border-right: 0;
    border-radius: 9px 0 0 9px;
    background: linear-gradient(90deg, #11141b, #343a48);
    box-shadow: 0 0 12px color-mix(in srgb, var(--main) 18%, transparent);
}
.mg24-slot-lever-base {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 29px;
    height: 57px;
    border: 3px solid color-mix(in srgb, var(--main) 45%, #333);
    border-radius: 10px;
    background: linear-gradient(90deg, #171a22, #3a4050, #151820);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .35);
}
.mg24-slot-lever-arm {
    position: absolute;
    bottom: 45px;
    left: 12px;
    width: 9px;
    height: 82px;
    border-radius: 99px;
    background: linear-gradient(90deg, #757d8d, #e1e4eb, #626978);
    box-shadow: 0 0 8px rgba(255, 255, 255, .2);
    transform-origin: 50% 100%;
    transform: rotate(0) translateY(0);
}
.mg24-slot-lever-knob {
    position: absolute;
    top: -15px;
    left: 50%;
    width: 28px;
    height: 28px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ff8490, #e71932 48%, #8b0717);
    box-shadow: 0 0 14px rgba(255, 36, 56, .75);
}
.mg24-slot-machine.is-pulled .mg24-slot-lever-arm {
    animation: mg24LeverPull .82s cubic-bezier(.2, .72, .2, 1) both;
}
.mg24-slot-machine.is-result .mg24-slot-center {
    border-color: #ff2438;
    background: rgba(255, 36, 56, .07);
    box-shadow: 0 0 12px #ff2438, 0 0 40px rgba(255, 36, 56, .85), inset 0 0 28px rgba(255, 36, 56, .22);
    animation: mg24SlotWin .72s ease-in-out infinite;
}
.mg24-slot-machine.is-result .mg24-slot-center::before { border-left-color: #ff2438; }
.mg24-slot-machine.is-result .mg24-slot-center::after { border-right-color: #ff2438; }
.mg24-slot-machine.is-result .mg24-slot-label {
    border-color: #ff2438;
    color: #ff2438;
    box-shadow: 0 0 15px rgba(255, 36, 56, .75);
}

@keyframes mg24Rotate { to { transform: rotate(360deg); } }
@keyframes mg24Shake {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-5deg) scale(1.03); }
    75% { transform: rotate(5deg) scale(1.03); }
}
@keyframes mg24RedTarget {
    50% { opacity: .72; box-shadow: 0 0 13px #ff2438, 0 0 31px #ff2438; }
}
@keyframes mg24SlotTarget {
    50% { box-shadow: 0 0 15px color-mix(in srgb, var(--main) 90%, transparent), 0 0 40px color-mix(in srgb, var(--main) 45%, transparent), inset 0 0 28px color-mix(in srgb, var(--main) 20%, transparent); }
}
@keyframes mg24Bulb {
    50% { opacity: .35; transform: scale(.72); }
}
@keyframes mg24SlotWin {
    50% { transform: translate(-50%, -50%) scale(1.025); filter: brightness(1.35); }
}
@keyframes mg24LeverPull {
    0%, 100% { transform: rotate(0) translateY(0); }
    42%, 62% { transform: rotate(68deg) translateY(28px); }
    78% { transform: rotate(15deg) translateY(7px); }
}
@keyframes mg24ChestMix {
    from { transform: translateX(-7px) rotate(-5deg) scale(.96); filter: brightness(.9); }
    to { transform: translateX(7px) rotate(5deg) scale(1.04); filter: brightness(1.2); }
}
@media (max-width: 767px) {
    .mg24-stage {
        min-height: 275px;
    }
    .mg24-rail {
        height: 275px;
    }
    .mg24-rail-item {
        flex-basis: 145px;
        height: 195px;
    }
    .mg24-chests {
        min-height: 275px;
        gap: 9px;
        padding: 22px 12px;
    }
    .mg24-chest {
        font-size: 35px;
    }
    .mg24-slot-machine {
        width: 84%;
        padding: 39px 19px 22px;
    }
    .mg24-slot-window {
        height: 260px;
    }
    .mg24-slot-item {
        height: 122px;
    }
    .mg24-slot-card {
        height: 98px;
    }
    .mg24-slot-card img {
        width: 72px;
        height: 72px;
    }
    .mg24-slot-center {
        height: 104px;
    }
    .mg24-slot-lever {
        top: 78px;
        right: -30px;
        transform: scale(.88);
    }
}