/* Leaderboard: paper background, big type, readable on a projector. */

body.ranking-page {
    min-height: 100%;
    background: var(--paper);
    color: var(--ink);
}

.ranking-page .brand {
    color: var(--ink);
}

.ranking-page .bar {
    position: absolute;
}

.ranking__play {
    min-height: 44px;
    padding: 0 22px;
    font-size: 0.9688rem;
}

.ranking {
    width: min(100% - 48px, 980px);
    margin: 0 auto;
    padding: calc(var(--bar) + 40px) 0 64px;
}

.ranking__title {
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.055em;
}

.ranking__status {
    margin-top: 16px;
    color: var(--muted-dark);
    font-size: clamp(1rem, 1.6vw, 1.25rem);
}

.ranking__status strong {
    color: var(--ink);
    font-weight: 650;
}

.ranking__list {
    display: grid;
    gap: 8px;
    margin-top: 40px;
}

.entry {
    display: grid;
    grid-template-columns: 4.5ch minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    padding: 16px 24px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: 0 0 0 1px var(--line-light);
}

.entry__place {
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--muted-dark);
}

.entry__who {
    min-width: 0;
    overflow: hidden;
    font-size: clamp(1rem, 1.7vw, 1.25rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entry__host {
    margin-left: 10px;
    padding: 3px 10px;
    border-radius: var(--pill);
    background: var(--ink);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    vertical-align: 0.15em;
}

.entry__score {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

/* The podium: bigger rows in gold, silver and bronze */
.entry--1,
.entry--2,
.entry--3 {
    padding: 22px 28px;
    box-shadow: none;
}

.entry--1 {
    background: var(--gold);
}

.entry--2 {
    background: var(--silver);
}

.entry--3 {
    background: var(--bronze);
}

.entry--1 .entry__place,
.entry--2 .entry__place,
.entry--3 .entry__place {
    color: var(--ink);
    font-size: 1.75rem;
    font-weight: 800;
}

.entry--1 .entry__who,
.entry--2 .entry__who,
.entry--3 .entry__who {
    font-size: clamp(1.125rem, 2.2vw, 1.625rem);
    font-weight: 700;
}

.entry--1 .entry__score,
.entry--2 .entry__score,
.entry--3 .entry__score {
    font-size: clamp(2rem, 4vw, 3rem);
}

.entry.is-new {
    animation: highlight 1.6s var(--ease);
}

@keyframes highlight {
    0% { outline: 3px solid var(--ink); outline-offset: 2px; }
    100% { outline: 3px solid transparent; outline-offset: 6px; }
}

.ranking__empty,
.ranking__error {
    margin-top: 32px;
    font-size: 1.125rem;
}

.ranking__error {
    color: #b42318;
    font-weight: 600;
}

.ranking__foot {
    margin-top: 28px;
    color: var(--muted-dark);
    font-size: 0.875rem;
}

@media (max-width: 760px) {
    .ranking {
        width: min(100% - 28px, 980px);
        padding-top: calc(var(--bar) + 24px);
    }

    .entry {
        grid-template-columns: 3ch minmax(0, 1fr) auto;
        gap: 12px;
        padding: 12px 16px;
        border-radius: 18px;
    }

    .entry--1,
    .entry--2,
    .entry--3 {
        padding: 16px 18px;
    }

    .entry__place {
        font-size: 1rem;
    }

    .entry--1 .entry__place,
    .entry--2 .entry__place,
    .entry--3 .entry__place {
        font-size: 1.25rem;
    }
}
