.section--ranking {
    --ranking-blue: #1a75ff;
    --ranking-light: #e1f1fe;
    --ranking-row: #f3f6fd;
    --ranking-level: #e4e9ff;
    --ranking-text: #333;
    --ranking-yellow: #ffdc38;
    padding: 100px 24px;
    background: var(--ranking-light);
}

.section--ranking .section__inner {
    gap: 32px;
}

.section--ranking .section__header {
    gap: 14px;
}

.section--ranking .section__tag {
    padding: 8px 14px;
    color: var(--ranking-blue);
    font-weight: 600;
}

.section--ranking .section__title {
    font-weight: 700;
}

.section--ranking .section__body {
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
}

.ranking__podium,
.ranking__list-card {
    flex: 0 0 calc((100% - 20px) / 2);
    min-width: 0;
    height: 424px;
    border-radius: 25px;
    overflow: hidden;
    box-sizing: border-box;
}

.ranking__podium {
    position: relative;
    background: linear-gradient(180deg, #2014ff, #269dff);
    box-shadow: 0 17px 35px rgba(56, 49, 138, 0.21);
    color: #fff;
}

.ranking__podium-title {
    position: absolute;
    z-index: 3;
    top: 24px;
    left: 24px;
    margin: 0;
    color: var(--ranking-yellow);
    font-size: 20px;
    font-weight: 800;
}

.ranking__stage {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
    justify-content: center;
}

.ranking__winner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 0 0 110px;
    text-align: center;
    opacity: 0;
    transform: translateY(110px);
}

.ranking__winner--first {
    flex-basis: 130px;
}

.ranking__medal {
    display: block;
    flex: 0 0 auto;
    width: 68px;
    height: 100px;
}

.ranking__winner--first .ranking__medal {
    position: relative;
    z-index: 1;
    width: 90px;
    height: 120px;
}

.ranking__medal-wrap {
    position: relative;
    display: block;
    width: 90px;
    height: 120px;
}

.ranking__halo {
    position: absolute;
    top: -66px;
    left: -67px;
    width: 224px;
    height: 211px;
    max-width: none;
    opacity: 0;
}

.ranking__crown {
    position: relative;
    z-index: 2;
    width: 26px;
    height: 18px;
}

.ranking__name,
.ranking__score {
    display: block;
    white-space: nowrap;
    font-weight: 800;
    line-height: 1;
}

.ranking__name {
    font-size: 22px;
}

.ranking__score {
    font-size: 22px;
    line-height: 26px;
    font-weight: 900;
}

.ranking__winner--first .ranking__name {
    font-size: 26px;
}

.ranking__winner--first .ranking__score {
    color: var(--ranking-yellow);
    font-size: 32px;
    line-height: 40px;
}

.ranking__level,
.ranking__row-level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 100px;
    background: var(--ranking-level);
    color: var(--ranking-blue);
    font-weight: 700;
    white-space: nowrap;
}

.ranking__level {
    height: 21px;
    padding: 0 9px;
    font-size: 14px;
}

.ranking__plinth {
    display: block;
    flex: 0 0 auto;
    width: 110px;
    height: auto;
}

.ranking__winner--first .ranking__plinth {
    width: 130px;
}

.ranking__confetti {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.ranking__decoration {
    position: absolute;
    display: block;
    max-width: none;
    opacity: 0;
}

.ranking__decoration--star-a {
    top: 66px;
    left: 396px;
    width: 72px;
    height: 73px;
}
.ranking__decoration--star-b {
    top: 218px;
    left: 9px;
    width: 49px;
    height: 50px;
}
.ranking__decoration--star-c {
    top: 18px;
    left: 129px;
    width: 32px;
    height: 33px;
}
.ranking__decoration--ribbon-a {
    top: 145px;
    left: 335px;
    width: 10px;
    height: 17px;
}
.ranking__decoration--ribbon-b {
    top: 29px;
    left: 314px;
    width: 24px;
    height: 14px;
}
.ranking__decoration--ribbon-c {
    top: 80px;
    left: 81px;
    width: 27px;
    height: 25px;
}

.ranking__podium--revealed .ranking__winner {
    animation: ranking-rise 650ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.ranking__podium--revealed .ranking__winner--third {
    animation-delay: 0ms;
}
.ranking__podium--revealed .ranking__winner--second {
    animation-delay: 330ms;
}
.ranking__podium--revealed .ranking__winner--first {
    animation-delay: 660ms;
}
.ranking__podium--revealed .ranking__halo {
    animation: ranking-halo 650ms ease-out 1180ms forwards;
}
.ranking__podium--revealed .ranking__decoration {
    animation: ranking-confetti 5s ease-in-out 1500ms infinite;
}
.ranking__podium--revealed .ranking__decoration--star-b,
.ranking__podium--revealed .ranking__decoration--ribbon-b {
    animation-delay: 1750ms;
}
.ranking__podium--revealed .ranking__decoration--star-c,
.ranking__podium--revealed .ranking__decoration--ribbon-c {
    animation-delay: 1950ms;
}

@keyframes ranking-rise {
    from {
        opacity: 0;
        transform: translateY(110px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ranking-halo {
    from {
        opacity: 0;
        transform: scale(0.65);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes ranking-confetti {
    0% {
        opacity: 0;
        transform: translateY(-65px) rotate(-12deg);
    }
    15% {
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(95px) rotate(22deg);
    }
}

.ranking__list-card {
    padding: 24px;
    background: #fff;
    box-shadow: 0 13px 30px rgba(92, 145, 203, 0.08);
}

.ranking__list-title {
    margin: 0 0 20px;
    color: var(--ranking-blue);
    font-size: 20px;
    font-weight: 800;
    line-height: 24px;
}

.ranking__list-window {
    height: 332px;
    overflow: hidden;
}

.ranking__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    will-change: transform;
}

.ranking__row {
    display: flex;
    align-items: center;
    gap: 13px;
    flex: 0 0 60px;
    min-width: 0;
    padding: 0 20px;
    border-radius: 15px;
    background: var(--ranking-row);
    box-sizing: border-box;
    color: var(--ranking-text);
    font-size: 22px;
    white-space: nowrap;
}

.ranking__position {
    width: 16px;
    flex: 0 0 16px;
    font-size: 18px;
    font-weight: 800;
    text-align: center;
}

.ranking__person {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.ranking__person img {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
}

.ranking__person strong,
.ranking__row-score {
    font-weight: 800;
}

.ranking__row-level {
    height: 24px;
    padding: 0 9px;
    font-size: 16px;
}

.ranking__row-score {
    margin-left: auto;
}

.ranking__note {
    margin: 0;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

@media (max-width: 768px) {
    .section--ranking {
        padding: 60px 20px;
    }
    .section--ranking .section__inner {
        max-width: 335px;
        gap: 20px;
    }
    .section--ranking .section__header {
        gap: 14px;
    }
    .section--ranking .section__tag {
        font-size: 16px;
    }
    .section--ranking .section__title {
        font-size: 28px;
        letter-spacing: -0.04em;
    }
    .section--ranking .section__desc {
        font-size: 16px;
        line-height: 1.4;
    }
    .section--ranking .section__body {
        flex-direction: column;
        gap: 20px;
    }
    .ranking__podium,
    .ranking__list-card {
        flex: none;
        width: 100%;
    }
    .ranking__podium {
        height: 360px;
    }
    .ranking__podium-title {
        top: 20px;
        left: 20px;
    }
    .ranking__stage {
        transform: scale(0.783);
        transform-origin: center bottom;
    }
    .ranking__decoration--star-a {
        top: 93px;
        left: 246px;
        width: 56px;
        height: 57px;
    }
    .ranking__decoration--star-b {
        top: 255px;
        left: 0;
        width: 38px;
        height: 39px;
    }
    .ranking__decoration--star-c {
        top: 56px;
        left: 97px;
        width: 25px;
        height: 26px;
    }
    .ranking__decoration--ribbon-a {
        top: 170px;
        left: 239px;
        width: 8px;
        height: 13px;
    }
    .ranking__decoration--ribbon-b {
        top: 79px;
        left: 218px;
        width: 19px;
        height: 11px;
    }
    .ranking__decoration--ribbon-c {
        top: 120px;
        left: 46px;
        width: 21px;
        height: 20px;
    }
    .ranking__list-card {
        height: 416px;
        padding: 20px;
    }
    .ranking__list-title {
        color: #1a75ff;
        font-size: 20px;
        line-height: 24px;
        margin-bottom: 20px;
    }
    .ranking__list-window {
        height: 332px;
    }
    .ranking__row {
        gap: 8px;
        padding: 0 16px;
        color: #1d2844;
        font-size: 20px;
    }

    .ranking__row-level {
        color: #1a75ff;
        font-size: 12px;
    }
    .ranking__note {
        font-size: 12px;
    }
}

@media (max-width: 374px) {
    .ranking__stage {
        left: 10px;
        transform: scale(0.72);
    }
    .ranking__row {
        gap: 5px;
        padding: 0 10px;
        font-size: 17px;
    }
    .ranking__person {
        gap: 4px;
    }
    .ranking__row-level {
        padding: 0 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ranking__winner,
    .ranking__halo,
    .ranking__decoration {
        opacity: 1;
        transform: none;
        animation: none !important;
    }
    .ranking__list {
        transition: none !important;
    }
}
