/**
 * =====================================================
 * Herzschild Digital Gacha
 * File    : assets/css/style.css
 * Version : 1.0.0 Build4
 *
 * Front Style
 * Multi Draw Presentation Build
 * =====================================================
 */


/* =====================================================
   Root
===================================================== */

.hdg-gacha {
    --hdg-bg: #ffffff;
    --hdg-panel: #f7f7f8;
    --hdg-text: #1d2327;
    --hdg-subtext: #646970;
    --hdg-border: #dcdcde;

    --hdg-accent: #2271b1;
    --hdg-accent-text: #ffffff;

    --hdg-n: #747b83;
    --hdg-r: #2f8ad2;
    --hdg-sr: #9856d8;
    --hdg-ssr: #e3aa22;

    position: relative;

    width: 100%;
    max-width: 920px;

    margin: 30px auto;
    padding: 28px;

    box-sizing: border-box;

    background:
        var(--hdg-bg);

    border:
        1px solid
        var(--hdg-border);

    border-radius: 20px;

    color:
        var(--hdg-text);

    box-shadow:
        0 12px 32px
        rgba(0, 0, 0, 0.10);

    overflow: hidden;

    isolation: isolate;
}


/* =====================================================
   Presets
===================================================== */

.hdg-gacha--standard {
    --hdg-accent: #2271b1;
}


.hdg-gacha--fantasy {
    --hdg-accent: #7657d5;

    background:
        radial-gradient(
            circle at top,
            rgba(163, 129, 255, 0.16),
            transparent 45%
        ),
        #ffffff;
}


.hdg-gacha--dark {
    --hdg-bg: #16181d;
    --hdg-panel: #22252c;
    --hdg-text: #f7f7f7;
    --hdg-subtext: #c3c4c7;
    --hdg-border: #3c434a;
    --hdg-accent: #8c68ff;

    background:
        radial-gradient(
            circle at top,
            rgba(120, 75, 220, 0.18),
            transparent 45%
        ),
        var(--hdg-bg);
}


.hdg-gacha--pop {
    --hdg-accent: #db4f93;

    background:
        radial-gradient(
            circle at top left,
            rgba(255, 198, 64, 0.14),
            transparent 35%
        ),
        radial-gradient(
            circle at top right,
            rgba(230, 80, 170, 0.14),
            transparent 35%
        ),
        #ffffff;
}


/* =====================================================
   Header
===================================================== */

.hdg-gacha__header {
    position: relative;
    z-index: 3;

    margin-bottom: 28px;
}


.hdg-gacha__main-image {
    width: 100%;

    margin-bottom: 22px;

    overflow: hidden;

    border-radius: 16px;

    background:
        var(--hdg-panel);
}


.hdg-gacha__main-image img {
    display: block;

    width: 100%;
    max-height: 420px;

    object-fit: cover;
}


.hdg-gacha__title-area {
    text-align: center;
}


.hdg-gacha__title {
    margin: 0;

    color:
        var(--hdg-text);

    font-size:
        clamp(
            26px,
            4vw,
            38px
        );

    line-height: 1.3;
}


.hdg-gacha__description {
    max-width: 720px;

    margin:
        14px auto 0;

    color:
        var(--hdg-subtext);

    font-size: 15px;
    line-height: 1.8;
}


.hdg-gacha__description p {
    margin-top: 0;
    margin-bottom: 10px;
}


.hdg-gacha__description p:last-child {
    margin-bottom: 0;
}


/* =====================================================
   Stage
===================================================== */

.hdg-gacha__stage {
    position: relative;
    z-index: 3;

    padding:
        34px
        20px
        26px;

    background:
        var(--hdg-panel);

    border-radius: 18px;

    text-align: center;

    overflow: visible;

    transition:
        background 0.35s ease,
        box-shadow 0.35s ease,
        filter 0.35s ease,
        transform 0.35s ease;
}


/* =====================================================
   Roulette Wrap
===================================================== */

.hdg-gacha__roulette-wrap {
    position: relative;

    width:
        min(
            360px,
            85vw
        );

    height:
        min(
            360px,
            85vw
        );

    max-width: 360px;
    max-height: 360px;

    margin: 0 auto;

    isolation: isolate;
}


/* =====================================================
   Roulette Aura
===================================================== */

.hdg-gacha__roulette-wrap::before {
    content: "";

    position: absolute;
    z-index: -2;

    inset: -30px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(34, 113, 177, 0.20) 0%,
            rgba(34, 113, 177, 0.07) 45%,
            transparent 72%
        );

    opacity: 0;

    transform:
        scale(0.92);

    pointer-events: none;

    transition:
        opacity 0.35s ease,
        transform 0.35s ease,
        filter 0.35s ease;
}


.hdg-gacha.is-drawing
.hdg-gacha__roulette-wrap::before {
    opacity: 1;

    transform:
        scale(1);
}


/* =====================================================
   Pointer
===================================================== */

.hdg-gacha__pointer {
    position: absolute;
    z-index: 12;

    top: -15px;
    left: 50%;

    transform:
        translateX(-50%);

    transform-origin:
        center top;

    color:
        var(--hdg-accent);

    font-size: 36px;
    line-height: 1;

    filter:
        drop-shadow(
            0 4px 5px
            rgba(0, 0, 0, 0.22)
        );

    transition:
        color 0.25s ease,
        filter 0.25s ease;
}


.hdg-gacha.is-drawing
.hdg-gacha__pointer {
    animation:
        hdgPointerTick
        0.15s
        ease-in-out
        infinite alternate;
}


@keyframes hdgPointerTick {

    from {
        transform:
            translateX(-50%)
            rotate(-4deg);
    }

    to {
        transform:
            translateX(-50%)
            rotate(4deg);
    }

}


/* =====================================================
   Roulette
===================================================== */

.hdg-gacha__roulette {
    position: relative;

    width: 100%;
    height: 100%;

    padding: 10px;

    box-sizing: border-box;

    border-radius: 50%;

    background:
        conic-gradient(
            from 0deg,

            #eadcff
            0deg
            45deg,

            #ffdfe9
            45deg
            90deg,

            #dcf5f0
            90deg
            135deg,

            #e4ddff
            135deg
            180deg,

            #f8dff0
            180deg
            225deg,

            #fff0bb
            225deg
            270deg,

            #dff4e7
            270deg
            315deg,

            #dcecff
            315deg
            360deg
        );

    border:
        7px solid
        var(--hdg-accent);

    box-shadow:
        0 12px 30px
        rgba(0, 0, 0, 0.18),

        inset
        0 0 22px
        rgba(255, 255, 255, 0.75);

    transform-origin:
        center;

    backface-visibility:
        hidden;

    will-change:
        transform;

    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        filter 0.3s ease;
}


.hdg-gacha__roulette::before {
    content: "";

    position: absolute;

    inset: 17px;

    border-radius: 50%;

    border:
        2px solid
        rgba(255, 255, 255, 0.84);

    box-shadow:
        inset
        0 0 15px
        rgba(255, 255, 255, 0.45);

    pointer-events: none;
}


.hdg-gacha__roulette::after {
    content: "";

    position: absolute;

    inset: 0;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 25%,
            rgba(255,255,255,0.32),
            transparent 35%
        );

    pointer-events: none;
}


.hdg-gacha__roulette-inner {
    position: relative;

    width: 100%;
    height: 100%;

    border-radius: 50%;
}


/* =====================================================
   Center
===================================================== */

.hdg-gacha__roulette-center {
    position: absolute;
    z-index: 4;

    top: 50%;
    left: 50%;

    width: 128px;
    height: 128px;

    transform:
        translate(-50%, -50%);

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        var(--hdg-bg);

    border:
        7px solid
        var(--hdg-accent);

    box-shadow:
        0 7px 16px
        rgba(0, 0, 0, 0.18),

        inset
        0 0 12px
        rgba(255,255,255,0.70);

    transition:
        border-color 0.3s ease,
        background 0.3s ease,
        box-shadow 0.3s ease;
}


.hdg-gacha__roulette-label {
    display: inline-block;

    color:
        var(--hdg-accent);

    font-size: 21px;
    font-weight: 800;

    letter-spacing: 0.08em;

    transition:
        color 0.3s ease,
        text-shadow 0.3s ease,
        filter 0.3s ease;
}


/* =====================================================
   Drawing State
===================================================== */

.hdg-gacha.is-drawing
.hdg-gacha__roulette {
    filter:
        saturate(1.12)
        brightness(1.03);

    box-shadow:
        0 16px 36px
        rgba(0, 0, 0, 0.22),

        0 0 28px
        rgba(34, 113, 177, 0.22),

        inset
        0 0 22px
        rgba(255,255,255,0.80);
}


/* =====================================================
   10 Draw Start
===================================================== */

.hdg-gacha.is-multi-start
.hdg-gacha__stage {
    transform:
        scale(1.015);

    box-shadow:
        inset
        0 0 50px
        rgba(34,113,177,0.10),

        0 0 25px
        rgba(34,113,177,0.13);
}


.hdg-gacha.is-multi-start
.hdg-gacha__roulette-wrap::before {
    opacity: 1;

    transform:
        scale(1.08);

    background:
        radial-gradient(
            circle,
            rgba(113,84,221,0.27),
            rgba(34,113,177,0.12) 42%,
            transparent 72%
        );
}


.hdg-gacha.is-multi-start
.hdg-gacha__roulette {
    animation:
        hdgMultiStartRoulette
        0.82s
        ease-in-out
        both;
}


@keyframes hdgMultiStartRoulette {

    0% {
        filter:
            brightness(1);

        box-shadow:
            0 12px 30px
            rgba(0,0,0,0.18);
    }

    40% {
        filter:
            brightness(1.25)
            saturate(1.28);

        box-shadow:
            0 14px 35px
            rgba(0,0,0,0.20),

            0 0 30px
            rgba(104,84,225,0.38);
    }

    100% {
        filter:
            brightness(1.03);

        box-shadow:
            0 12px 30px
            rgba(0,0,0,0.18);
    }

}


.hdg-gacha.is-multi-start
.hdg-gacha__status {
    color:
        var(--hdg-accent);

    font-size: 19px;

    font-weight: 900;

    animation:
        hdgMultiStartText
        0.82s
        ease-out
        both;
}


@keyframes hdgMultiStartText {

    0% {
        opacity: 0;

        transform:
            translateY(8px)
            scale(0.88);
    }

    45% {
        opacity: 1;

        transform:
            translateY(0)
            scale(1.08);
    }

    100% {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }

}


/* =====================================================
   Status
===================================================== */

.hdg-gacha__status {
    position: relative;
    z-index: 5;

    min-height: 28px;

    margin-top: 25px;

    color:
        var(--hdg-subtext);

    font-size: 16px;
    font-weight: 700;

    letter-spacing: 0.02em;

    transition:
        color 0.25s ease,
        text-shadow 0.25s ease,
        transform 0.25s ease;
}


.hdg-gacha.is-drawing
.hdg-gacha__status {
    color:
        var(--hdg-accent);
}


/* =====================================================
   Action Buttons
===================================================== */

.hdg-gacha__actions {
    position: relative;
    z-index: 3;

    display: flex;

    justify-content: center;
    align-items: stretch;

    flex-wrap: wrap;

    gap: 14px;

    margin-top: 24px;
}


.hdg-gacha__button {
    appearance: none;

    position: relative;

    min-width: 210px;

    padding:
        15px
        25px;

    overflow: hidden;

    border: 0;
    border-radius: 14px;

    background:
        var(--hdg-accent);

    color:
        var(--hdg-accent-text);

    box-shadow:
        0 6px 14px
        rgba(0,0,0,0.16);

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        filter 0.15s ease,
        opacity 0.15s ease;
}


.hdg-gacha__button::before {
    content: "";

    position: absolute;

    top: -100%;
    left: -60px;

    width: 48px;
    height: 300%;

    transform:
        rotate(24deg);

    background:
        rgba(255,255,255,0.20);

    transition:
        left 0.45s ease;

    pointer-events: none;
}


.hdg-gacha__button:hover::before {
    left:
        calc(
            100% + 50px
        );
}


.hdg-gacha__button:hover {
    transform:
        translateY(-2px);

    filter:
        brightness(1.05);

    box-shadow:
        0 9px 20px
        rgba(0,0,0,0.20);
}


.hdg-gacha__button:active {
    transform:
        translateY(0);
}


.hdg-gacha__button:disabled {
    opacity: 0.48;

    cursor:
        not-allowed;

    transform: none;

    filter:
        grayscale(0.15);
}


.hdg-gacha__button-main {
    position: relative;
    z-index: 2;

    display: block;

    font-size: 18px;
    font-weight: 700;
}


.hdg-gacha__button-sub {
    position: relative;
    z-index: 2;

    display: block;

    margin-top: 4px;

    font-size: 11px;

    opacity: 0.82;
}


/* =====================================================
   Rarity List
===================================================== */

.hdg-gacha__rarities {
    position: relative;
    z-index: 3;

    margin-top: 30px;

    padding: 20px;

    background:
        var(--hdg-panel);

    border-radius: 14px;
}


.hdg-gacha__rarities-title {
    margin-bottom: 14px;

    color:
        var(--hdg-subtext);

    text-align: center;

    font-size: 13px;
    font-weight: 700;
}


.hdg-gacha__rarity-list {
    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 9px;
}


.hdg-gacha__rarity {
    display: flex;

    align-items: center;

    gap: 7px;

    padding:
        8px
        13px;

    border:
        1px solid
        var(--hdg-border);

    border-radius: 999px;

    background:
        var(--hdg-bg);

    font-size: 12px;
}


.hdg-gacha__rarity strong {
    font-size: 14px;
}


.hdg-gacha__rarity span {
    color:
        var(--hdg-subtext);
}


.hdg-gacha__rarity--n strong {
    color:
        var(--hdg-n);
}


.hdg-gacha__rarity--r strong {
    color:
        var(--hdg-r);
}


.hdg-gacha__rarity--sr strong {
    color:
        var(--hdg-sr);
}


.hdg-gacha__rarity--ssr strong {
    color:
        var(--hdg-ssr);
}


.hdg-gacha__rarity--ur strong {
    background:
        linear-gradient(
            90deg,
            #eb557d,
            #c55af1,
            #4b82f0,
            #42bd98,
            #e7b52a,
            #eb557d
        );

    background-size:
        250% 100%;

    -webkit-background-clip:
        text;

    background-clip:
        text;

    color:
        transparent;

    animation:
        hdgRainbowText
        2.5s
        linear
        infinite;
}


@keyframes hdgRainbowText {

    to {
        background-position:
            250% 0;
    }

}


/* =====================================================
   Loading
===================================================== */

.hdg-gacha__loading {
    position: absolute;
    z-index: 30;

    top: 50%;
    left: 50%;

    inset: auto;

    min-width: 120px;

    padding:
        10px
        14px;

    transform:
        translate(-50%, -50%);

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 7px;

    border:
        1px solid
        rgba(255,255,255,0.78);

    border-radius: 14px;

    background:
        rgba(255,255,255,0.82);

    color:
        #1d2327;

    font-size: 13px;
    font-weight: 700;

    box-shadow:
        0 8px 22px
        rgba(0,0,0,0.15);

    backdrop-filter:
        blur(4px);

    -webkit-backdrop-filter:
        blur(4px);

    pointer-events: none;
}


.hdg-gacha__loading[hidden] {
    display: none;
}


.hdg-gacha--dark
.hdg-gacha__loading {
    background:
        rgba(24,26,31,0.84);

    border-color:
        rgba(255,255,255,0.12);

    color:
        #ffffff;
}


.hdg-gacha__loading-spinner {
    width: 25px;
    height: 25px;

    border:
        3px solid
        rgba(0,0,0,0.12);

    border-top-color:
        var(--hdg-accent);

    border-radius: 50%;

    animation:
        hdgLoadingSpin
        0.65s
        linear
        infinite;
}


@keyframes hdgLoadingSpin {

    from {
        transform:
            rotate(0deg);
    }

    to {
        transform:
            rotate(360deg);
    }

}


/* =====================================================
   N Result
===================================================== */

.hdg-gacha.hdg-rarity-n
.hdg-gacha__roulette {
    border-color:
        var(--hdg-n);

    box-shadow:
        0 11px 28px
        rgba(0,0,0,0.18),

        0 0 12px
        rgba(116,123,131,0.18);
}


.hdg-gacha.hdg-rarity-n
.hdg-gacha__roulette-center {
    border-color:
        var(--hdg-n);
}


.hdg-gacha.hdg-rarity-n
.hdg-gacha__roulette-label,
.hdg-gacha.hdg-rarity-n
.hdg-gacha__pointer,
.hdg-gacha.hdg-rarity-n
.hdg-gacha__status {
    color:
        var(--hdg-n);
}


/* =====================================================
   R Result
===================================================== */

.hdg-gacha.hdg-rarity-r
.hdg-gacha__roulette {
    border-color:
        var(--hdg-r);

    box-shadow:
        0 12px 30px
        rgba(0,0,0,0.20),

        0 0 24px
        rgba(47,138,210,0.42);
}


.hdg-gacha.hdg-rarity-r
.hdg-gacha__roulette-center {
    border-color:
        var(--hdg-r);

    box-shadow:
        0 7px 16px
        rgba(0,0,0,0.18),

        0 0 18px
        rgba(47,138,210,0.30);
}


.hdg-gacha.hdg-rarity-r
.hdg-gacha__roulette-label,
.hdg-gacha.hdg-rarity-r
.hdg-gacha__pointer,
.hdg-gacha.hdg-rarity-r
.hdg-gacha__status {
    color:
        var(--hdg-r);
}


/* =====================================================
   SR Base
===================================================== */

.hdg-gacha.hdg-rarity-sr
.hdg-gacha__stage {
    box-shadow:
        inset
        0 0 48px
        rgba(152,86,216,0.12);
}


.hdg-gacha.hdg-rarity-sr
.hdg-gacha__roulette {
    border-color:
        var(--hdg-sr);

    box-shadow:
        0 14px 34px
        rgba(0,0,0,0.22),

        0 0 20px
        rgba(152,86,216,0.58),

        0 0 46px
        rgba(152,86,216,0.30);
}


.hdg-gacha.hdg-rarity-sr
.hdg-gacha__roulette-center {
    border-color:
        var(--hdg-sr);

    box-shadow:
        0 7px 16px
        rgba(0,0,0,0.18),

        0 0 22px
        rgba(152,86,216,0.50);
}


.hdg-gacha.hdg-rarity-sr
.hdg-gacha__roulette-label,
.hdg-gacha.hdg-rarity-sr
.hdg-gacha__pointer,
.hdg-gacha.hdg-rarity-sr
.hdg-gacha__status {
    color:
        var(--hdg-sr);

    text-shadow:
        0 0 12px
        rgba(152,86,216,0.40);
}


/* =====================================================
   SR Reveal
===================================================== */

.hdg-gacha.is-rarity-reveal-sr::before {
    content: "";

    position: absolute;
    z-index: 20;

    inset: 0;

    background:
        radial-gradient(
            circle at center,
            rgba(205,151,255,0.42),
            rgba(151,72,225,0.14) 35%,
            transparent 65%
        );

    pointer-events: none;

    animation:
        hdgSRFlash
        0.65s
        ease-out
        both;
}


@keyframes hdgSRFlash {

    0% {
        opacity: 0;

        transform:
            scale(0.88);
    }

    35% {
        opacity: 1;
    }

    100% {
        opacity: 0;

        transform:
            scale(1.10);
    }

}


.hdg-gacha.is-rarity-reveal-sr
.hdg-gacha__roulette {
    animation:
        hdgSRPulse
        0.42s
        ease-in-out
        2;
}


@keyframes hdgSRPulse {

    0%,
    100% {
        filter:
            brightness(1);
    }

    50% {
        filter:
            brightness(1.28)
            saturate(1.35);
    }

}


/* =====================================================
   SSR Warning
===================================================== */

.hdg-gacha.is-rarity-warning
.hdg-gacha__stage {
    filter:
        brightness(0.62);

    box-shadow:
        inset
        0 0 70px
        rgba(0,0,0,0.30);
}


.hdg-gacha.is-rarity-warning
.hdg-gacha__roulette {
    filter:
        brightness(0.72)
        saturate(0.75);
}


.hdg-gacha.is-rarity-warning
.hdg-gacha__status {
    color:
        #d6a62b;

    text-shadow:
        0 0 12px
        rgba(214,166,43,0.45);

    animation:
        hdgWarningText
        0.45s
        ease-in-out
        infinite alternate;
}


@keyframes hdgWarningText {

    from {
        opacity: 0.65;
    }

    to {
        opacity: 1;
    }

}


/* =====================================================
   SSR Base
===================================================== */

.hdg-gacha.hdg-rarity-ssr
.hdg-gacha__stage {
    background:
        radial-gradient(
            circle at center,
            rgba(255,222,117,0.20),
            transparent 60%
        ),
        var(--hdg-panel);

    box-shadow:
        inset
        0 0 55px
        rgba(227,170,34,0.14);
}


.hdg-gacha.hdg-rarity-ssr
.hdg-gacha__roulette {
    border-color:
        var(--hdg-ssr);

    box-shadow:
        0 15px 36px
        rgba(0,0,0,0.24),

        0 0 25px
        rgba(227,170,34,0.72),

        0 0 58px
        rgba(227,170,34,0.35);
}


.hdg-gacha.hdg-rarity-ssr
.hdg-gacha__roulette-center {
    border-color:
        var(--hdg-ssr);

    box-shadow:
        0 7px 16px
        rgba(0,0,0,0.18),

        0 0 26px
        rgba(227,170,34,0.60);
}


.hdg-gacha.hdg-rarity-ssr
.hdg-gacha__roulette-label,
.hdg-gacha.hdg-rarity-ssr
.hdg-gacha__pointer,
.hdg-gacha.hdg-rarity-ssr
.hdg-gacha__status {
    color:
        var(--hdg-ssr);

    text-shadow:
        0 0 15px
        rgba(227,170,34,0.58);
}


/* =====================================================
   SSR Reveal
===================================================== */

.hdg-gacha.is-rarity-reveal-ssr::before {
    content: "";

    position: absolute;
    z-index: 22;

    inset: 0;

    background:
        radial-gradient(
            circle at center,
            rgba(255,247,199,0.95) 0%,
            rgba(255,205,73,0.62) 20%,
            rgba(227,167,30,0.18) 46%,
            transparent 70%
        );

    pointer-events: none;

    animation:
        hdgSSRFlash
        0.80s
        ease-out
        both;
}


@keyframes hdgSSRFlash {

    0% {
        opacity: 0;
    }

    18% {
        opacity: 1;
    }

    40% {
        opacity: 0.22;
    }

    55% {
        opacity: 0.88;
    }

    100% {
        opacity: 0;
    }

}


.hdg-gacha.is-rarity-reveal-ssr
.hdg-gacha__roulette {
    animation:
        hdgSSRImpact
        0.26s
        ease-in-out
        3;
}


@keyframes hdgSSRImpact {

    0%,
    100% {
        filter:
            brightness(1);
    }

    50% {
        filter:
            brightness(1.45)
            saturate(1.45);
    }

}


/* =====================================================
   UR Base
===================================================== */

.hdg-gacha.hdg-rarity-ur
.hdg-gacha__stage {
    background:
        radial-gradient(
            circle at center,
            rgba(255,255,255,0.60),
            transparent 27%
        ),
        linear-gradient(
            135deg,
            rgba(255,90,130,0.10),
            rgba(180,91,255,0.10),
            rgba(73,145,255,0.10),
            rgba(55,203,155,0.10),
            rgba(255,201,59,0.10)
        ),
        var(--hdg-panel);

    box-shadow:
        inset
        0 0 65px
        rgba(181,102,255,0.16);
}


.hdg-gacha.hdg-rarity-ur
.hdg-gacha__roulette {
    border-color:
        #ffffff;

    box-shadow:
        0 16px 40px
        rgba(0,0,0,0.26),

        0 0 15px
        rgba(255,82,129,0.68),

        0 0 30px
        rgba(176,83,255,0.64),

        0 0 48px
        rgba(75,145,255,0.54),

        0 0 72px
        rgba(56,203,151,0.40);
}


.hdg-gacha.hdg-rarity-ur
.hdg-gacha__roulette-wrap::before {
    opacity: 1;

    background:
        conic-gradient(
            from 0deg,
            rgba(255,91,126,0.30),
            rgba(189,82,255,0.30),
            rgba(72,145,255,0.30),
            rgba(54,205,157,0.30),
            rgba(255,203,63,0.30),
            rgba(255,91,126,0.30)
        );

    filter:
        blur(18px);

    animation:
        hdgURHalo
        1.65s
        linear
        infinite;
}


@keyframes hdgURHalo {

    from {
        transform:
            scale(1.10)
            rotate(0deg);
    }

    to {
        transform:
            scale(1.10)
            rotate(360deg);
    }

}


.hdg-gacha.hdg-rarity-ur
.hdg-gacha__roulette-center {
    border-color:
        #ffffff;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #fff8ff
        );

    box-shadow:
        0 7px 16px
        rgba(0,0,0,0.18),

        0 0 18px
        rgba(255,87,132,0.55),

        0 0 28px
        rgba(168,81,255,0.48),

        0 0 40px
        rgba(61,149,255,0.38);
}


.hdg-gacha.hdg-rarity-ur
.hdg-gacha__roulette-label {
    background:
        linear-gradient(
            90deg,
            #ec4775,
            #bd55ef,
            #447ff0,
            #36b993,
            #e9b628,
            #ec4775
        );

    background-size:
        250% 100%;

    -webkit-background-clip:
        text;

    background-clip:
        text;

    color:
        transparent;

    animation:
        hdgRainbowText
        1.35s
        linear
        infinite;
}


.hdg-gacha.hdg-rarity-ur
.hdg-gacha__pointer {
    color:
        #c45ce8;

    filter:
        drop-shadow(
            0 0 9px
            rgba(187,80,235,0.72)
        );
}


.hdg-gacha.hdg-rarity-ur
.hdg-gacha__status {
    background:
        linear-gradient(
            90deg,
            #de4778,
            #a952e6,
            #397fd3,
            #2d9d81,
            #c69119
        );

    -webkit-background-clip:
        text;

    background-clip:
        text;

    color:
        transparent;

    font-weight: 900;
}


/* =====================================================
   UR Restart
===================================================== */

.hdg-gacha.is-ur-restart::before {
    content: "";

    position: absolute;
    z-index: 24;

    inset: 0;

    background:
        radial-gradient(
            circle at center,
            rgba(255,255,255,0.92) 0%,
            rgba(191,124,255,0.32) 28%,
            rgba(80,145,255,0.16) 48%,
            transparent 70%
        );

    pointer-events: none;

    animation:
        hdgURRestartFlash
        0.85s
        ease-out
        both;
}


@keyframes hdgURRestartFlash {

    0% {
        opacity: 0;
    }

    25% {
        opacity: 1;
    }

    45% {
        opacity: 0.25;
    }

    65% {
        opacity: 0.88;
    }

    100% {
        opacity: 0;
    }

}


.hdg-gacha.is-ur-restart
.hdg-gacha__stage {
    animation:
        hdgURStageShake
        0.15s
        linear
        5;
}


@keyframes hdgURStageShake {

    0% {
        transform:
            translateX(0);
    }

    25% {
        transform:
            translateX(-3px);
    }

    50% {
        transform:
            translateX(3px);
    }

    75% {
        transform:
            translateX(-2px);
    }

    100% {
        transform:
            translateX(0);
    }

}


.hdg-gacha.is-ur-restart
.hdg-gacha__roulette {
    filter:
        brightness(1.25)
        saturate(1.35);

    box-shadow:
        0 0 18px
        rgba(255,255,255,0.88),

        0 0 34px
        rgba(206,102,255,0.65),

        0 0 55px
        rgba(75,145,255,0.50);
}


/* =====================================================
   UR Reveal
===================================================== */

.hdg-gacha.is-rarity-reveal-ur::before {
    content: "";

    position: absolute;
    z-index: 26;

    inset: 0;

    background:
        radial-gradient(
            circle at center,
            rgba(255,255,255,1) 0%,
            rgba(255,106,143,0.54) 18%,
            rgba(190,90,255,0.45) 31%,
            rgba(78,146,255,0.34) 44%,
            rgba(64,202,153,0.24) 56%,
            transparent 74%
        );

    pointer-events: none;

    animation:
        hdgURRevealFlash
        1s
        ease-out
        both;
}


@keyframes hdgURRevealFlash {

    0% {
        opacity: 0;

        transform:
            scale(0.88);
    }

    18% {
        opacity: 1;

        transform:
            scale(1);
    }

    38% {
        opacity: 0.28;
    }

    55% {
        opacity: 0.92;
    }

    100% {
        opacity: 0;

        transform:
            scale(1.14);
    }

}


.hdg-gacha.is-rarity-reveal-ur
.hdg-gacha__roulette {
    animation:
        hdgURImpact
        0.20s
        ease-in-out
        5;
}


@keyframes hdgURImpact {

    0%,
    100% {
        filter:
            brightness(1.05)
            saturate(1.15);
    }

    50% {
        filter:
            brightness(1.60)
            saturate(1.60);
    }

}


/* =====================================================
   Result Overlay
===================================================== */

.hdg-gacha__result {
    position: fixed;
    z-index: 999999;

    inset: 0;

    padding:
        30px
        20px;

    box-sizing: border-box;

    overflow-y: auto;

    background:
        rgba(8,9,12,0.92);

    color:
        #ffffff;

    text-align: center;

    opacity: 0;

    backdrop-filter:
        blur(7px);

    -webkit-backdrop-filter:
        blur(7px);

    transition:
        opacity 0.28s ease;
}


.hdg-gacha__result[hidden] {
    display: none;
}


.hdg-gacha__result.is-visible {
    opacity: 1;
}


/* =====================================================
   Result Background
===================================================== */

.hdg-gacha__result--n {
    background:
        rgba(20,22,25,0.95);
}


.hdg-gacha__result--r {
    background:
        radial-gradient(
            circle at center,
            rgba(47,138,210,0.20),
            transparent 56%
        ),
        rgba(10,16,23,0.95);
}


.hdg-gacha__result--sr {
    background:
        radial-gradient(
            circle at center,
            rgba(152,86,216,0.25),
            transparent 56%
        ),
        rgba(14,9,20,0.95);
}


.hdg-gacha__result--ssr {
    background:
        radial-gradient(
            circle at center,
            rgba(227,170,34,0.27),
            transparent 56%
        ),
        rgba(20,15,5,0.96);
}


.hdg-gacha__result--ur {
    background:
        radial-gradient(
            circle at 28% 28%,
            rgba(237,74,121,0.19),
            transparent 37%
        ),
        radial-gradient(
            circle at 72% 34%,
            rgba(177,85,235,0.20),
            transparent 39%
        ),
        radial-gradient(
            circle at 55% 76%,
            rgba(70,145,237,0.20),
            transparent 43%
        ),
        rgba(9,8,16,0.96);
}


/* =====================================================
   Result Content
===================================================== */

.hdg-gacha__result-content {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 960px;

    margin:
        40px auto 20px;
}


.hdg-gacha__result-effects {
    position: absolute;

    inset: 0;

    pointer-events: none;
}


/* =====================================================
   Result Heading
===================================================== */

.hdg-result-heading {
    margin-bottom: 28px;

    animation:
        hdgResultHeadingIn
        0.48s
        ease
        both;
}


@keyframes hdgResultHeadingIn {

    from {
        opacity: 0;

        transform:
            translateY(-15px)
            scale(0.96);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }

}


.hdg-result-heading__rarity {
    margin-bottom: 5px;

    font-size:
        clamp(
            24px,
            6vw,
            46px
        );

    font-weight: 900;

    letter-spacing: 0.10em;
}


.hdg-result-heading__title {
    margin: 0;

    color:
        #ffffff;

    font-size:
        clamp(
            24px,
            5vw,
            38px
        );

    line-height: 1.25;
}


.hdg-result-heading--n
.hdg-result-heading__rarity {
    color:
        #b7bec6;
}


.hdg-result-heading--r
.hdg-result-heading__rarity {
    color:
        #52aaf0;

    text-shadow:
        0 0 20px
        rgba(52,157,240,0.48);
}


.hdg-result-heading--sr
.hdg-result-heading__rarity {
    color:
        #bf78ff;

    text-shadow:
        0 0 24px
        rgba(174,91,244,0.62);
}


.hdg-result-heading--ssr
.hdg-result-heading__rarity {
    color:
        #ffd058;

    text-shadow:
        0 0 25px
        rgba(255,197,50,0.72);
}


.hdg-result-heading--ur
.hdg-result-heading__rarity {
    background:
        linear-gradient(
            90deg,
            #ff668e,
            #d66cff,
            #5d9bff,
            #55ddb1,
            #ffd75c,
            #ff668e
        );

    background-size:
        240% 100%;

    -webkit-background-clip:
        text;

    background-clip:
        text;

    color:
        transparent;

    filter:
        drop-shadow(
            0 0 8px
            rgba(202,100,255,0.52)
        );

    animation:
        hdgRainbowText
        1.5s
        linear
        infinite;
}


/* =====================================================
   Multi Result Notice
===================================================== */

.hdg-multi-result-notice {
    position: relative;

    display: inline-block;

    margin:
        -10px auto
        25px;

    padding:
        9px
        22px;

    overflow: hidden;

    border:
        1px solid
        rgba(255,255,255,0.32);

    border-radius: 999px;

    background:
        rgba(255,255,255,0.10);

    color:
        #ffffff;

    font-size: 14px;
    font-weight: 900;

    letter-spacing: 0.10em;

    box-shadow:
        0 5px 16px
        rgba(0,0,0,0.18);

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}


.hdg-multi-result-notice::before {
    content: "";

    position: absolute;

    top: -100%;
    left: -50px;

    width: 38px;
    height: 300%;

    transform:
        rotate(26deg);

    background:
        rgba(255,255,255,0.25);

    animation:
        hdgMultiNoticeShine
        2.2s
        ease-in-out
        infinite;
}


@keyframes hdgMultiNoticeShine {

    0%,
    30% {
        left: -50px;
    }

    70%,
    100% {
        left:
            calc(
                100% + 50px
            );
    }

}


.hdg-gacha__result.is-multi-complete
.hdg-multi-result-notice {
    transform:
        scale(1.08);

    background:
        rgba(255,255,255,0.20);

    box-shadow:
        0 0 22px
        rgba(255,255,255,0.22);
}


/* =====================================================
   Result List
===================================================== */

.hdg-result-list {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                170px,
                1fr
            )
        );

    gap: 16px;
}


.hdg-result-list--multi {
    grid-template-columns:
        repeat(
            5,
            minmax(
                0,
                1fr
            )
        );

    max-width: 960px;

    margin:
        0 auto;
}


/* =====================================================
   Result Card
===================================================== */

.hdg-result-card {
    position: relative;

    padding: 14px;

    overflow: hidden;

    border-radius: 16px;

    background:
        #ffffff;

    color:
        #1d2327;

    opacity: 0;

    transform:
        translateY(18px)
        scale(0.96);

    box-shadow:
        0 10px 24px
        rgba(0,0,0,0.28);

    animation:
        hdgResultCardIn
        0.42s
        ease
        forwards;
}


@keyframes hdgResultCardIn {

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }

}


/* =====================================================
   Multi Result Card
===================================================== */

.hdg-result-card--multi {
    opacity: 0;

    transform:
        translateY(28px)
        scale(0.72)
        rotateX(22deg);

    animation: none;

    transition:
        opacity 0.38s ease,
        transform 0.42s
        cubic-bezier(
            0.15,
            0.85,
            0.25,
            1.12
        );
}


.hdg-result-card--multi.is-revealed {
    opacity: 1;

    transform:
        translateY(0)
        scale(1)
        rotateX(0deg);

    animation:
        hdgMultiCardPop
        0.42s
        cubic-bezier(
            0.15,
            0.85,
            0.25,
            1.15
        )
        both;
}


@keyframes hdgMultiCardPop {

    0% {
        opacity: 0;

        transform:
            translateY(28px)
            scale(0.72);
    }

    70% {
        opacity: 1;

        transform:
            translateY(-4px)
            scale(1.05);
    }

    100% {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }

}


.hdg-result-card__image {
    position: relative;

    width: 100%;

    aspect-ratio:
        1 / 1;

    margin-bottom: 12px;

    overflow: hidden;

    border-radius: 11px;

    background:
        #f0f0f1;
}


.hdg-result-card__image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


.hdg-result-card__placeholder {
    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    color:
        #8c8f94;

    font-size: 34px;
    font-weight: 900;
}


.hdg-result-card__rarity {
    margin-bottom: 6px;

    font-size: 13px;
    font-weight: 800;
}


.hdg-result-card__name {
    font-size: 15px;
    font-weight: 700;

    line-height: 1.5;
}


.hdg-result-card__description {
    margin-top: 7px;

    color:
        #646970;

    font-size: 12px;
    line-height: 1.55;
}


/* =====================================================
   Result Rarity Card
===================================================== */

.hdg-result-card--n
.hdg-result-card__rarity {
    color:
        var(--hdg-n);
}


.hdg-result-card--r {
    border:
        2px solid
        rgba(47,138,210,0.55);

    box-shadow:
        0 0 16px
        rgba(47,138,210,0.28),

        0 10px 26px
        rgba(0,0,0,0.28);
}


.hdg-result-card--r
.hdg-result-card__rarity {
    color:
        var(--hdg-r);
}


.hdg-result-card--sr {
    border:
        2px solid
        rgba(152,86,216,0.72);

    box-shadow:
        0 0 18px
        rgba(152,86,216,0.48),

        0 10px 26px
        rgba(0,0,0,0.30);
}


.hdg-result-card--sr
.hdg-result-card__rarity {
    color:
        var(--hdg-sr);
}


.hdg-result-card--ssr {
    border:
        2px solid
        rgba(227,170,34,0.84);

    box-shadow:
        0 0 22px
        rgba(227,170,34,0.62),

        0 10px 28px
        rgba(0,0,0,0.32);
}


.hdg-result-card--ssr
.hdg-result-card__rarity {
    color:
        var(--hdg-ssr);
}


.hdg-result-card--ur {
    border:
        2px solid
        rgba(209,96,236,0.84);

    box-shadow:
        0 0 15px
        rgba(239,85,125,0.58),

        0 0 27px
        rgba(180,85,246,0.54),

        0 0 40px
        rgba(68,145,235,0.36),

        0 12px 30px
        rgba(0,0,0,0.34);
}


.hdg-result-card--ur::before {
    content: "";

    position: absolute;
    z-index: 2;

    inset: 0;

    background:
        linear-gradient(
            125deg,
            transparent 20%,
            rgba(255,255,255,0.42) 42%,
            transparent 62%
        );

    transform:
        translateX(-120%);

    pointer-events: none;

    animation:
        hdgURCardShine
        2.2s
        ease-in-out
        infinite;
}


@keyframes hdgURCardShine {

    0%,
    35% {
        transform:
            translateX(-120%);
    }

    75%,
    100% {
        transform:
            translateX(120%);
    }

}


.hdg-result-card--ur
.hdg-result-card__rarity {
    background:
        linear-gradient(
            90deg,
            #e94f7b,
            #bd59ed,
            #4381eb,
            #38ad8c,
            #d5a21b
        );

    -webkit-background-clip:
        text;

    background-clip:
        text;

    color:
        transparent;
}


/* =====================================================
   Multi SR Hit
===================================================== */

.hdg-gacha__result.is-multi-sr-hit::before {
    content: "";

    position: fixed;
    z-index: 1000000;

    inset: 0;

    background:
        radial-gradient(
            circle at center,
            rgba(187,114,250,0.36),
            transparent 62%
        );

    pointer-events: none;

    animation:
        hdgMultiSRHit
        0.28s
        ease-out
        both;
}


@keyframes hdgMultiSRHit {

    0% {
        opacity: 0;
    }

    40% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }

}


/* =====================================================
   Multi SSR Hit
===================================================== */

.hdg-gacha__result.is-multi-ssr-hit::before {
    content: "";

    position: fixed;
    z-index: 1000000;

    inset: 0;

    background:
        radial-gradient(
            circle at center,
            rgba(255,244,189,0.78) 0%,
            rgba(237,184,48,0.32) 30%,
            transparent 67%
        );

    pointer-events: none;

    animation:
        hdgMultiSSRHit
        0.36s
        ease-out
        both;
}


@keyframes hdgMultiSSRHit {

    0% {
        opacity: 0;
    }

    25% {
        opacity: 1;
    }

    50% {
        opacity: 0.28;
    }

    100% {
        opacity: 0;
    }

}


/* =====================================================
   Multi UR Hit
===================================================== */

.hdg-gacha__result.is-multi-ur-hit::before {
    content: "";

    position: fixed;
    z-index: 1000000;

    inset: 0;

    background:
        radial-gradient(
            circle at center,
            rgba(255,255,255,0.95) 0%,
            rgba(255,99,143,0.48) 20%,
            rgba(190,91,255,0.42) 34%,
            rgba(74,147,255,0.34) 48%,
            rgba(61,201,154,0.24) 62%,
            transparent 76%
        );

    pointer-events: none;

    animation:
        hdgMultiURHit
        0.48s
        ease-out
        both;
}


@keyframes hdgMultiURHit {

    0% {
        opacity: 0;

        transform:
            scale(0.9);
    }

    22% {
        opacity: 1;

        transform:
            scale(1);
    }

    45% {
        opacity: 0.30;
    }

    65% {
        opacity: 0.88;
    }

    100% {
        opacity: 0;

        transform:
            scale(1.08);
    }

}


/* =====================================================
   Multi Complete
===================================================== */

.hdg-gacha__result.is-multi-complete
.hdg-result-list--multi {
    animation:
        hdgMultiCompleteGrid
        0.5s
        ease-out
        both;
}


@keyframes hdgMultiCompleteGrid {

    0% {
        filter:
            brightness(1);
    }

    45% {
        filter:
            brightness(1.20);
    }

    100% {
        filter:
            brightness(1);
    }

}


/* =====================================================
   Result Close
===================================================== */

.hdg-gacha__result-close {
    position: relative;
    z-index: 3;

    min-width: 180px;

    margin:
        24px auto 40px;

    padding:
        13px
        22px;

    border:
        1px solid
        rgba(255,255,255,0.40);

    border-radius: 10px;

    background:
        rgba(255,255,255,0.12);

    color:
        #ffffff;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}


.hdg-gacha__result-close:hover {
    background:
        rgba(255,255,255,0.20);

    transform:
        translateY(-1px);
}


/* =====================================================
   Message
===================================================== */

.hdg-gacha-message {
    max-width: 760px;

    margin:
        24px auto;

    padding:
        18px
        20px;

    box-sizing: border-box;

    border:
        1px solid
        #dcdcde;

    border-radius: 10px;

    background:
        #f6f7f7;

    color:
        #3c434a;

    text-align: center;

    font-size: 14px;
}


/* =====================================================
   Focus
===================================================== */

.hdg-gacha__button:focus-visible,
.hdg-gacha__result-close:focus-visible {
    outline:
        3px solid
        rgba(34,113,177,0.38);

    outline-offset: 3px;
}


/* =====================================================
   Tablet
===================================================== */

@media screen and (max-width: 782px) {

    .hdg-gacha {
        margin:
            20px auto;

        padding: 20px;

        border-radius: 16px;
    }


    .hdg-gacha__stage {
        padding:
            30px
            10px
            24px;
    }


    .hdg-gacha__actions {
        flex-direction: column;
    }


    .hdg-gacha__button {
        width: 100%;

        min-width: 0;
    }


    .hdg-result-list--multi {
        grid-template-columns:
            repeat(
                3,
                minmax(
                    0,
                    1fr
                )
            );
    }

}


/* =====================================================
   Smartphone
===================================================== */

@media screen and (max-width: 480px) {

    .hdg-gacha {
        margin:
            12px auto;

        padding:
            16px
            12px;

        border-radius: 14px;
    }


    .hdg-gacha__header {
        margin-bottom: 20px;
    }


    .hdg-gacha__main-image {
        margin-bottom: 16px;

        border-radius: 11px;
    }


    .hdg-gacha__title {
        font-size: 25px;
    }


    .hdg-gacha__description {
        font-size: 14px;

        line-height: 1.7;
    }


    .hdg-gacha__stage {
        padding:
            27px
            5px
            20px;

        border-radius: 14px;
    }


    .hdg-gacha__roulette-wrap {
        width:
            min(
                285px,
                82vw
            );

        height:
            min(
                285px,
                82vw
            );
    }


    .hdg-gacha__roulette {
        border-width: 5px;
    }


    .hdg-gacha__roulette-center {
        width: 98px;
        height: 98px;

        border-width: 5px;
    }


    .hdg-gacha__roulette-label {
        font-size: 17px;
    }


    .hdg-gacha__pointer {
        top: -10px;

        font-size: 28px;
    }


    .hdg-gacha__status {
        margin-top: 20px;

        font-size: 14px;
    }


    .hdg-gacha.is-multi-start
    .hdg-gacha__status {
        font-size: 16px;
    }


    .hdg-gacha__actions {
        margin-top: 18px;
    }


    .hdg-gacha__button {
        min-height: 62px;

        padding:
            12px
            16px;

        border-radius: 12px;
    }


    .hdg-gacha__button-main {
        font-size: 17px;
    }


    .hdg-gacha__rarities {
        margin-top: 22px;

        padding:
            15px
            10px;
    }


    .hdg-gacha__rarity {
        padding:
            7px
            10px;
    }


    .hdg-gacha__loading {
        min-width: 104px;

        padding:
            8px
            11px;

        font-size: 11px;
    }


    .hdg-gacha__loading-spinner {
        width: 20px;
        height: 20px;

        border-width: 2px;
    }


    .hdg-gacha__result {
        padding:
            20px
            10px;
    }


    .hdg-gacha__result-content {
        margin-top: 20px;
    }


    .hdg-result-heading {
        margin-bottom: 20px;
    }


    .hdg-multi-result-notice {
        margin-bottom: 18px;

        padding:
            8px
            16px;

        font-size: 12px;
    }


    .hdg-result-list {
        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );

        gap: 10px;
    }


    .hdg-result-list--multi {
        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );

        gap: 10px;
    }


    .hdg-result-card {
        padding: 9px;

        border-radius: 12px;
    }


    .hdg-result-card__image {
        margin-bottom: 8px;

        border-radius: 8px;
    }


    .hdg-result-card__name {
        font-size: 13px;
    }


    .hdg-result-card__description {
        font-size: 11px;
    }

}


/* =====================================================
   Reduced Motion
===================================================== */

@media (
    prefers-reduced-motion:
    reduce
) {

    .hdg-gacha *,
    .hdg-gacha *::before,
    .hdg-gacha *::after,
    .hdg-gacha__result *,
    .hdg-gacha__result *::before,
    .hdg-gacha__result *::after {
        animation-duration:
            0.01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            0.01ms !important;
    }

}