/* End overlay som "slidedown" + fade ovenfra */
.end-overlay {
    margin-bottom: 16px;
    /* fordi vi prepender over runden */
    opacity: 0;
    transform: translateY(-6px);
    height: 0;
    /* start for slidedown */
    overflow: hidden;
    /* skjul innhold under slide */
    transition:
        height .65s ease,
        /* slide */
        opacity .75s ease,
        /* fade */
        transform .75s ease;
    /* lett "drop" følelse */
}

.end-overlay.show {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .end-overlay {
        transition: opacity .2s linear;
        /* minimal animasjon */
    }
}

.sum-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
}

.sum-title {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
}

.sum-value {
    font-size: 18px;
}

.leaderboard {
    margin-top: 14px;
}

.lb-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.lb-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lb-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 6px;
    background: #0f141a;
}

.lb-row.me {
    border-color: var(--accent);
}

.lb-rank {
    width: 2ch;
    color: var(--muted);
}

.lb-name {
    flex: 1;
    padding: 0 8px;
}

.lb-score {
    font-variant-numeric: tabular-nums;
}

.lb-input {
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 4px 8px;
    color: var(--ink);
}

.lb-row.me .lb-name {
    min-width: 180px;
    display: inline-block;
}

.end-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}