/* Christmas Quiz — mobile-first styles */
:root {
    --green: #14532d;
    --green-2: #166534;
    --red: #b91c1c;
    --gold: #d4a017;
    --bg: #f6f4ef;
    --card: #ffffff;
    --text: #1f2421;
    --muted: #6b716d;
    --line: #e3e0d8;
    --good: #15803d;
    --bad: #b91c1c;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.45;
    -webkit-text-size-adjust: 100%;
}

h1 {
    font-size: 1.5rem;
    margin: 0.3em 0 0.5em;
}

h2 {
    font-size: 1.15rem;
    margin: 0 0 0.75em;
}

a {
    color: var(--green-2);
}

code {
    background: #eee;
    padding: 0 4px;
    border-radius: 4px;
    font-size: 0.85em;
}

.page {
    max-width: 560px;
    margin: 0 auto;
    padding: 12px 16px 40px;
}

/* ---------- generic ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    margin: 12px 0;
}

.narrow {
    max-width: 420px;
    margin: 40px auto;
}

.center {
    text-align: center;
}

.pad {
    padding: 40px 0;
}

.muted {
    color: var(--muted);
}

.small-text {
    font-size: 0.875rem;
}

.grow {
    flex: 1 1 auto;
    min-width: 0;
}

.big-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 8px;
}

.error {
    color: var(--bad);
    font-weight: 600;
}

.ok {
    color: var(--good);
    font-weight: 600;
    margin-left: 8px;
}

.good {
    color: var(--good);
    font-weight: 700;
}

.bad {
    color: var(--bad);
    font-weight: 700;
}

.row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin: 8px 0;
}

    .row.spread {
        justify-content: space-between;
    }

.actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.field {
    display: block;
    margin: 10px 0;
    font-weight: 600;
    font-size: 0.9rem;
}

    .field .input {
        margin-top: 4px;
        font-weight: 400;
    }

.inline {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    font-size: 0.9rem;
}

.input {
    width: 100%;
    font: inherit;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.row > .input {
    width: auto;
}

    .row > .input.grow {
        width: auto;
    }

.input.tiny {
    width: 70px;
}

.input.big {
    font-size: 1.15rem;
    padding: 14px;
    margin: 8px 0;
}

.input:focus {
    outline: 2px solid var(--green-2);
    outline-offset: 1px;
}

.btn {
    font: inherit;
    font-weight: 600;
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    text-align: center;
}

    .btn:hover:not(:disabled) {
        border-color: var(--green-2);
    }

    .btn:disabled {
        opacity: 0.45;
        cursor: default;
    }

    .btn.primary {
        background: var(--green);
        border-color: var(--green);
        color: #fff;
    }

    .btn.danger {
        color: var(--bad);
        border-color: #f0c9c9;
    }

    .btn.small {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .btn.tiny {
        padding: 2px 8px;
        font-size: 0.8rem;
    }

    .btn.wide {
        display: block;
        width: 100%;
        margin-top: 10px;
        padding: 14px;
    }

    .btn.big-btn {
        padding: 12px 18px;
        font-size: 1.05rem;
    }

.banner {
    padding: 12px 14px;
    border-radius: 10px;
    background: #ecebe6;
    margin: 10px 0;
    font-weight: 600;
}

    .banner.warn {
        background: #fff4d6;
        color: #7a5300;
    }

    .banner.good {
        background: #dcf3e3;
        color: var(--good);
    }

.pill {
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

    .pill.good {
        background: #dcf3e3;
    }

    .pill.bad {
        background: #fde2e2;
    }

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

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.link-text {
    word-break: break-all;
}

.messages {
    margin: 10px 0 0;
    padding-left: 18px;
    font-size: 0.9rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

    .table th, .table td {
        padding: 8px 6px;
        border-bottom: 1px solid var(--line);
        text-align: left;
        vertical-align: middle;
    }

    .table th {
        font-size: 0.8rem;
        text-transform: uppercase;
        color: var(--muted);
    }

    .table td.actions {
        text-align: right;
    }

    .table.compact td {
        padding: 4px 6px;
        font-size: 0.9rem;
    }

    .table tr.focus td {
        background: #f2f8f3;
    }

    .table .num {
        text-align: right;
    }

    .table .hint {
        color: #7a5300;
        background: #fff8e6;
        font-size: 0.9rem;
    }

.status {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eee;
}

.status-open {
    background: #dcf3e3;
    color: var(--good);
}

.status-closed {
    background: #fff4d6;
    color: #7a5300;
}

.status-published {
    background: #e0e7ff;
    color: #3730a3;
}

.danger-zone {
    border-color: #f0c9c9;
}

/* ---------- player ---------- */
.play-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--green);
    color: #fff;
    margin: -12px -16px 12px;
    padding: 12px 16px;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 5;
}

    .play-header .me {
        background: rgba(255,255,255,0.15);
        padding: 2px 10px;
        border-radius: 999px;
        font-size: 0.9rem;
    }

.lobby h1 {
    margin-top: 0;
}

.round-title {
    margin-bottom: 0.2em;
}

.rule {
    color: var(--muted);
    margin-top: 0;
    font-size: 0.95rem;
}

.slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 14px 0;
}

.slot {
    font: inherit;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    border: 2px solid var(--line);
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    padding: 4px;
}

.slot-num {
    font-size: 1.5rem;
    font-weight: 800;
}

.slot-state {
    font-size: 0.7rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.1;
}

.slot.locked {
    background: #efede8;
    color: #aaa;
    cursor: default;
}

.slot.open {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,160,23,0.15);
}

.slot.answered {
    border-color: var(--green-2);
    background: #f2f8f3;
}

    .slot.answered .slot-state {
        color: var(--green-2);
        font-weight: 700;
    }

.slot.right {
    border-color: var(--good);
    background: #dcf3e3;
}

.slot.wrong {
    border-color: var(--bad);
    background: #fde2e2;
}

.question .q-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.9rem;
}

.question .prompt {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 12px 0;
}

.q-image {
    display: block;
    max-width: 100%;
    max-height: 50vh;
    margin: 8px auto 12px;
    border-radius: 10px;
}

.options {
    display: grid;
    gap: 10px;
    margin: 12px 0;
}

.option {
    font: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    padding: 16px;
    min-height: 56px;
    border-radius: 12px;
    border: 2px solid var(--line);
    background: #fff;
    cursor: pointer;
}

    .option.chosen {
        border-color: var(--green);
        background: var(--green);
        color: #fff;
    }

    .option.right {
        border-color: var(--good);
        box-shadow: inset 0 0 0 2px var(--good);
    }

    .option.wrong {
        border-color: var(--bad);
        background: var(--bad);
        color: #fff;
    }

    .option:disabled {
        cursor: default;
    }

        .option:disabled:not(.chosen):not(.right) {
            opacity: 0.7;
        }

.answer-reveal {
    background: #f2f8f3;
    padding: 10px 12px;
    border-radius: 10px;
}

.leaderboard tr.me td {
    background: #fff8e6;
    font-weight: 700;
}

.rank {
    display: inline-block;
    min-width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    border-radius: 50%;
    background: #eee;
    font-weight: 700;
    font-size: 0.85rem;
}

.rank-1 {
    background: var(--gold);
    color: #fff;
}

.rank-2 {
    background: #a8a9ad;
    color: #fff;
}

.rank-3 {
    background: #b87333;
    color: #fff;
}

/* ---------- admin ---------- */
.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--green);
    padding: 12px 20px;
}

    .admin-nav a {
        color: #fff;
        text-decoration: none;
    }

    .admin-nav .brand {
        font-weight: 800;
    }

.admin-main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 12px 20px 60px;
}

.q-badge {
    background: var(--green);
    color: #fff;
    padding: 4px 10px;
    border-radius: 8px;
}

.options-edit .row {
    margin: 4px 0;
}

.thumb {
    height: 64px;
    border-radius: 6px;
}

.host-q {
    border-top: 1px solid var(--line);
    padding: 10px 0;
}

    .host-q.unrevealed {
        opacity: 0.55;
    }

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.chip {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    background: #eee;
}

    .chip.done {
        background: #dcf3e3;
        color: var(--good);
        font-weight: 600;
    }

    .chip.waiting {
        background: #fff4d6;
        color: #7a5300;
    }

@media (max-width: 640px) {
    .admin-main {
        padding: 8px 12px 40px;
    }

    .table td.actions {
        text-align: left;
    }
}

/* ---------- Blazor error UI ---------- */
#blazor-error-ui {
    background: #fff4d6;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* ---------- question builder ---------- */
.qb-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
    align-items: start;
}

.qb-rounds {
    position: sticky;
    top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qb-round {
    font: inherit;
    text-align: left;
    cursor: pointer;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
}

    .qb-round:hover {
        border-color: var(--green-2);
    }

    .qb-round.active {
        border-color: var(--green);
        background: #f2f8f3;
        box-shadow: inset 3px 0 0 var(--green);
    }

.qb-round-num {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--green);
    color: #fff;
    font-weight: 800;
}

.qb-round-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .qb-round-text strong {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .qb-round-text small {
        color: var(--muted);
    }

.qb-round-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.qb-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin: 8px 0;
    overflow: hidden;
}

    .qb-card.open {
        border-color: var(--green-2);
        box-shadow: 0 2px 10px rgba(20, 83, 45, 0.08);
    }

.qb-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
}

    .qb-summary:hover {
        background: #fafaf7;
    }

.qb-type {
    width: 22px;
    text-align: center;
    color: var(--muted);
}

.qb-prompt {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qb-answer {
    flex: 0 1 auto;
    max-width: 35%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--good);
    font-size: 0.9rem;
    font-weight: 600;
}

    .qb-answer.warn {
        color: #a16207;
    }

.qb-chevron {
    color: var(--muted);
    font-size: 0.75rem;
}

.qb-body {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 18px;
    padding: 4px 16px 16px;
    border-top: 1px solid var(--line);
}

.qb-save {
    color: var(--muted);
    font-size: 0.85rem;
    text-align: right;
}

.qb-option {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 6px 0;
}

    .qb-option.correct .input {
        border-color: var(--good);
        background: #f2faf4;
    }

.qb-tick {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--line);
    background: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    color: var(--muted);
}

    .qb-tick:hover {
        border-color: var(--good);
        color: var(--good);
    }

.qb-option.correct .qb-tick {
    background: var(--good);
    border-color: var(--good);
    color: #fff;
}

.qb-toolbar {
    border-top: 1px solid var(--line);
    padding-top: 10px;
    margin-top: 14px;
}

.dropzone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 10px;
    border: 2px dashed var(--line);
    border-radius: 12px;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
    cursor: pointer;
}

    .dropzone:hover {
        border-color: var(--green-2);
        color: var(--green-2);
    }

    .dropzone input[type=file] {
        position: absolute;
        inset: 0;
        opacity: 0;
        cursor: pointer;
        width: 100%;
        height: 100%;
    }

.qb-preview {
    align-self: start;
    position: sticky;
    top: 12px;
}

.phone {
    margin-top: 6px;
    border: 10px solid #1f2421;
    border-radius: 28px;
    background: var(--bg);
    padding: 6px;
    max-height: 560px;
    overflow-y: auto;
    pointer-events: none;
}

    .phone .card {
        margin: 0;
    }

    .phone .question .prompt {
        font-size: 1.05rem;
    }

    .phone .option {
        padding: 12px;
        min-height: 44px;
        font-size: 0.95rem;
    }

.qb-add {
    border-style: dashed;
}

.qb-paste summary {
    cursor: pointer;
}

.qb-paste-body {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.qb-paste-help ul {
    margin: 4px 0 0;
    padding-left: 18px;
}

.qb-paste-help p {
    margin: 0;
}

.mono {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .qb-layout {
        grid-template-columns: 1fr;
    }

    .qb-rounds {
        position: static;
        flex-direction: row;
        overflow-x: auto;
    }

    .qb-round {
        flex: none;
        max-width: 220px;
    }

    .qb-rounds .btn.wide {
        width: auto;
        margin: 0;
        flex: none;
    }

    .qb-body {
        grid-template-columns: 1fr;
    }

    .qb-preview {
        position: static;
    }

    .qb-answer {
        display: none;
    }
}

.qb-del {
    flex: none;
}

/* ---------- reconnect banner (replaces Blazor's full-screen overlay) ---------- */
#components-reconnect-modal {
    display: none;
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 2000;
    background: #1f2421;
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

    #components-reconnect-modal[data-state="show"],
    #components-reconnect-modal[data-state="failed"] {
        display: block;
    }

    #components-reconnect-modal .reconnect-failed {
        display: none;
    }

    #components-reconnect-modal[data-state="failed"] .reconnect-text {
        display: none;
    }

    #components-reconnect-modal[data-state="failed"] .reconnect-failed {
        display: inline;
    }

/* ---------- finale: final results reveal ---------- */
.confetti-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 3000;
}

.finale {
    position: relative;
    text-align: center;
}

.finale-kicker {
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .8;
    font-size: .85rem;
}

.finale-title {
    margin: .2em 0 .3em;
}

.finale-sub {
    opacity: .8;
    animation: finale-pulse 2.4s ease-in-out infinite;
}

.finale-list {
    list-style: none;
    padding: 0;
    margin: 16px auto 0;
    max-width: 560px;
    display: grid;
    gap: 8px;
}

.finale-row {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 12px;
    text-align: left;
    background: rgba(255,255,255,.9);
    border: 2px solid var(--line);
    color: var(--text);
}

    .finale-row.hidden {
        background: rgba(255,255,255,.35);
        border-style: dashed;
        color: var(--muted);
    }

        .finale-row.hidden .finale-name {
            letter-spacing: .3em;
        }

    .finale-row.revealed .finale-name,
    .finale-row.revealed .finale-score {
        animation: finale-pop .7s cubic-bezier(.2,1.4,.4,1) both;
        animation-delay: var(--d, 0s);
    }

    .finale-row.revealed {
        animation: finale-flash 1.2s ease-out both;
        animation-delay: var(--d, 0s);
    }

    .finale-row.first.revealed {
        background: linear-gradient(90deg, #fff4c2, #ffe48a);
        border-color: var(--gold);
    }

    .finale-row.mine {
        box-shadow: 0 0 0 3px var(--green-2);
    }

.finale-rank {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--green);
}

.finale-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.finale-score {
    font-weight: 800;
    font-size: 1.2rem;
}

.finale-winner {
    margin: 10px auto 6px;
    max-width: 560px;
    padding: 18px 16px 20px;
    border-radius: 18px;
    background: radial-gradient(circle at 50% 0%, #fff7d1, #f2c94c 70%, #d4a017);
    color: #3b2a00;
    box-shadow: 0 10px 40px rgba(212,160,23,.45);
    animation: finale-winner-in 1s cubic-bezier(.2,1.5,.4,1) both;
    animation-delay: var(--d, 0s);
}

    .finale-winner .trophy {
        font-size: 3.2rem;
        line-height: 1;
        animation: finale-bounce 1.6s ease-in-out infinite;
        animation-delay: calc(var(--d, 0s) + 1s);
    }

.winner-label {
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 800;
    font-size: .8rem;
    margin-top: 6px;
}

.winner-names {
    font-size: 1.9rem;
    font-weight: 900;
    line-height: 1.15;
    margin: 4px 0;
}

.winner-score {
    font-weight: 700;
}

.finale-you {
    margin: 12px auto 0;
    max-width: 560px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--green);
    color: #fff;
    font-weight: 700;
    animation: finale-pop .7s both;
    animation-delay: var(--d, 0s);
}

.drumroll {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10, 30, 18, .97);
    color: #fff;
    font-size: 1.6rem;
    font-weight: 800;
    animation: finale-drumroll 3.3s linear both;
    animation-delay: var(--back, 0s);
    pointer-events: none;
}

    .drumroll .drum {
        font-size: 4rem;
        animation: finale-shake .18s linear infinite;
    }

/* Full-screen version for sharing on Teams */
.finale-screen {
    min-height: 100vh;
    padding: 4vh 4vw;
    box-sizing: border-box;
    background: radial-gradient(ellipse at 50% -10%, #1f7a45 0%, #14532d 45%, #0b2e19 100%);
    color: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

    .finale-screen .finale {
        width: 100%;
        max-width: 1100px;
    }

.finale-wait {
    text-align: center;
    margin-top: 18vh;
    font-size: 1.3rem;
}

    .finale-wait .trophy {
        font-size: 5rem;
    }

.finale.big .finale-kicker {
    font-size: 1.1rem;
}

.finale.big .finale-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    color: #fff;
}

.finale.big .finale-sub {
    font-size: 1.4rem;
}

.finale.big .finale-list {
    max-width: 900px;
    gap: 1.2vh;
}

.finale.big .finale-row {
    grid-template-columns: 110px 1fr auto;
    padding: 1.3vh 28px;
    font-size: clamp(1rem, 2.2vh, 1.6rem);
}

.finale.big .finale-name {
    font-size: clamp(1.3rem, 3vh, 2.2rem);
}

.finale.big .finale-score, .finale.big .finale-rank {
    font-size: clamp(1.3rem, 3vh, 2.2rem);
}

.finale.big .finale-winner {
    max-width: 900px;
    padding: 3vh 20px;
}

.finale.big .winner-names {
    font-size: clamp(2.4rem, 7vh, 5rem);
}

.finale.big .finale-winner .trophy {
    font-size: clamp(4rem, 10vh, 7rem);
}

.finale.big .drumroll {
    font-size: clamp(2rem, 6vh, 4rem);
}

    .finale.big .drumroll .drum {
        font-size: clamp(5rem, 14vh, 10rem);
    }

/* Phone version sits inside the normal player page */
.finale.compact .finale-title {
    color: var(--green);
}

.finale.compact .finale-row {
    grid-template-columns: 48px 1fr auto;
    padding: 8px 12px;
}

@keyframes finale-pop {
    0% {
        opacity: 0;
        transform: scale(.6) translateY(8px);
    }

    100% {
        opacity: 1;
        transform: none;
    }
}

@keyframes finale-flash {
    0% {
        box-shadow: 0 0 0 0 rgba(244,211,94,.9);
    }

    100% {
        box-shadow: 0 0 0 18px rgba(244,211,94,0);
    }
}

@keyframes finale-winner-in {
    0% {
        opacity: 0;
        transform: scale(.4) rotate(-4deg);
    }

    100% {
        opacity: 1;
        transform: none;
    }
}

@keyframes finale-bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes finale-pulse {
    0%, 100% {
        opacity: .55;
    }

    50% {
        opacity: 1;
    }
}

@keyframes finale-shake {
    0% {
        transform: rotate(-8deg);
    }

    50% {
        transform: rotate(8deg);
    }

    100% {
        transform: rotate(-8deg);
    }
}

@keyframes finale-drumroll {
    0% {
        opacity: 0;
    }

    8% {
        opacity: 1;
    }

    88% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    .finale *, .finale {
        animation-duration: .01s !important;
        animation-iteration-count: 1 !important;
    }
}

/* Big screen once the winner is out: winner card beside the table, so it all fits a 16:9 share */
.finale-screen .finale.has-winner {
    max-width: 1400px;
}

.finale.big.has-winner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 0 4vw;
    align-items: center;
}

    .finale.big.has-winner .finale-head {
        grid-column: 1 / -1;
    }

    .finale.big.has-winner .finale-winner {
        margin: 2vh 0 0;
        max-width: none;
        padding: 5vh 20px;
    }

    .finale.big.has-winner .finale-list {
        margin: 2vh 0 0;
        max-width: none;
    }

    .finale.big.has-winner .finale-row {
        padding: 1vh 24px;
    }
