.ranking-main {
    padding-bottom: 48px;
}

.ranking-intro-panel {
    display: block;
    margin-top: 20px;
    padding: 26px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .045);
}

.ranking-intro-copy h2,
.ranking-panel-header h2 {
    margin: 5px 0 8px;
    color: #111827;
    font-size: 1.25rem;
    line-height: 1.2;
}

.ranking-intro-copy p,
.ranking-panel-header p,
.ranking-explanation p {
    margin: 0;
    color: #64748b;
    font-size: .79rem;
    line-height: 1.65;
}

.ranking-kicker {
    color: #6d28d9;
    font-size: .67rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.ranking-rule {
    padding: 18px;
    border: 1px solid #ddd6fe;
    border-radius: 16px;
    background:
        linear-gradient(
            135deg,
            #faf7ff,
            #f5f3ff
        );
}

.ranking-rule > span,
.ranking-rule > small {
    display: block;
}

.ranking-rule > span {
    margin-bottom: 6px;
    color: #7c3aed;
    font-size: .65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.ranking-rule > strong {
    display: block;
    color: #4c1d95;
    font-size: .95rem;
}

.ranking-rule > small {
    margin-top: 6px;
    color: #6b7280;
    font-size: .7rem;
    line-height: 1.5;
}

.ranking-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.ranking-summary-card {
    padding: 17px;
    border: 1px solid #e5e7eb;
    border-radius: 15px;
    background: #fff;
}

.ranking-summary-card > span,
.ranking-summary-card > small {
    display: block;
}

.ranking-summary-card > span {
    color: #64748b;
    font-size: .64rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.ranking-summary-card > strong {
    display: block;
    margin: 6px 0 4px;
    color: #111827;
    font-size: 1.05rem;
}

.ranking-summary-card > small {
    color: #94a3b8;
    font-size: .65rem;
}

.ranking-update-value {
    font-size: .9rem !important;
}

.ranking-message {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 13px;
    font-size: .76rem;
    line-height: 1.5;
}

.ranking-message-warning {
    border: 1px solid #fde68a;
    color: #92400e;
    background: #fffbeb;
}

.ranking-panel {
    margin-top: 20px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}

.ranking-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.ranking-total-help {
    flex: 0 0 auto;
    padding: 9px 12px;
    border-radius: 10px;
    color: #6b7280;
    background: #f8fafc;
    font-size: .67rem;
}

.ranking-total-help strong {
    color: #4c1d95;
}

.ranking-list {
    display: flex;
    flex-direction: column;
}

.ranking-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    border-bottom: 1px solid #edf0f4;
}

.ranking-item:last-child {
    border-bottom: 0;
}

.ranking-item-top {
    background:
        linear-gradient(
            90deg,
            rgba(109, 40, 217, .035),
            transparent 34%
        );
}

.ranking-position {
    display: flex;
    justify-content: center;
    padding-top: 22px;
}

.ranking-position span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #6d28d9;
    background: #ede9fe;
    font-size: .8rem;
    font-weight: 950;
}

.ranking-item-top .ranking-position span {
    color: #fff;
    background:
        linear-gradient(
            135deg,
            #5b21b6,
            #7c3aed
        );
}

.ranking-content {
    min-width: 0;
    padding: 18px 22px 18px 0;
}

.ranking-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.ranking-item-label {
    display: block;
    margin-bottom: 9px;
    color: #94a3b8;
    font-size: .61rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.ranking-balls {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ranking-ball {
    display: inline-grid;
    place-items: center;
    width: 29px;
    height: 29px;
    border: 1px solid #ddd6fe;
    border-radius: 50%;
    color: #5b21b6;
    background: #f5f3ff;
    font-size: .67rem;
    font-weight: 900;
}

.ranking-total-box {
    flex: 0 0 136px;
    padding: 11px 12px;
    border: 1px solid #d1fae5;
    border-radius: 12px;
    text-align: right;
    background: #f0fdf4;
}

.ranking-total-box span {
    display: block;
    color: #047857;
    font-size: .6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ranking-total-box strong {
    display: block;
    margin-top: 3px;
    color: #065f46;
    font-size: 1.25rem;
}

.ranking-score-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.ranking-score {
    padding: 9px 10px;
    border-radius: 9px;
    background: #f8fafc;
}

.ranking-score span {
    display: block;
    color: #94a3b8;
    font-size: .58rem;
    font-weight: 800;
    text-transform: uppercase;
}

.ranking-score strong {
    display: block;
    margin-top: 3px;
    color: #334155;
    font-size: .78rem;
}

.ranking-explanation {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-top: 18px;
    padding: 18px 20px;
    border: 1px solid #e0e7ff;
    border-radius: 15px;
    background: #f8faff;
}

.ranking-explanation-icon {
    display: grid;
    flex: 0 0 30px;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #fff;
    background: #6d28d9;
    font-family: Georgia, serif;
    font-size: .9rem;
    font-weight: 900;
}

.ranking-explanation strong {
    display: block;
    margin-bottom: 4px;
    color: #312e81;
    font-size: .78rem;
}

@media (max-width: 900px) {
    .ranking-intro-panel {
        grid-template-columns: 1fr;
    }

    .ranking-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ranking-item-head {
        flex-direction: column;
    }

    .ranking-total-box {
        flex-basis: auto;
        width: 100%;
        text-align: left;
    }

    .ranking-score-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .ranking-summary-grid {
        grid-template-columns: 1fr;
    }

    .ranking-panel-header {
        flex-direction: column;
    }

    .ranking-item {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .ranking-position {
        padding-top: 18px;
    }

    .ranking-content {
        padding: 15px 14px 15px 0;
    }

    .ranking-position span {
        width: 30px;
        height: 30px;
    }

    .ranking-ball {
        width: 27px;
        height: 27px;
        font-size: .63rem;
    }

    .ranking-score-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ranking-intro-panel {
        padding: 20px;
    }
}
