/* Components use semantic tokens; seasonal themes only need to supply new tokens/assets. */
.screen-kicker { display: none; }

html.quiz-themed body {
    background: var(--quiz-star-pattern, none) center / 260px 260px repeat fixed,
        var(--quiz-background) var(--quiz-background-image) center / cover fixed;
    color: var(--quiz-text);
    font-family: var(--quiz-font-body);
    letter-spacing: 0;
}

html.quiz-themed body::before,
html.quiz-themed .mc-panel::before,
html.quiz-themed .mc-background-mark {
    display: none;
}

html.quiz-themed .game-shell {
    width: min(70rem, calc(100% - 2rem));
    padding: 1.75rem 0;
}

html.quiz-themed .mc-header {
    margin-bottom: 1.25rem;
}

html.quiz-themed .screen-kicker {
    display: block;
    margin: 0 0 .65rem;
    color: var(--quiz-gold);
    font-size: .8rem;
    font-weight: 900;
    text-transform: uppercase;
}

html.quiz-themed body .game-shell .mc-header h1 {
    display: block;
    margin: 0;
    padding: .08em .1em;
    color: var(--quiz-text);
    font-family: var(--quiz-font-display);
    font-style: var(--quiz-display-style);
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    text-shadow: var(--quiz-title-shadow);
    transform: none;
}

html.quiz-themed .screen-subtitle {
    margin: .55rem 0 0;
    color: var(--quiz-muted);
    font-size: 1.1rem;
    font-weight: 700;
}

html.quiz-themed .mc-panel {
    border: 1px solid var(--quiz-line);
    border-radius: var(--quiz-radius);
    background: var(--quiz-surface);
    color: var(--quiz-text);
    padding: 1.5rem;
    box-shadow: var(--quiz-shadow);
}

html.quiz-themed button {
    min-height: 44px;
    border-radius: var(--quiz-radius);
    font-weight: 900;
    cursor: pointer;
    letter-spacing: 0;
}

html.quiz-themed :is(button, input):focus-visible {
    outline: 3px solid var(--quiz-focus);
    outline-offset: 3px;
}

html.quiz-themed .login-game {
    width: min(32rem, calc(100% - 2rem));
    justify-content: center;
}

html.quiz-themed .login-game label {
    color: var(--quiz-text);
    font-size: .95rem;
    font-weight: 800;
    text-transform: none;
}

html.quiz-themed body .login-game input:not([type="checkbox"]) {
    border: 1px solid var(--quiz-line);
    border-radius: var(--quiz-radius);
    background: var(--quiz-input);
    color: var(--quiz-text);
    min-height: 48px;
    padding: .75rem .9rem;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: none;
}

html.quiz-themed .login-game input::placeholder {
    color: var(--quiz-muted);
    opacity: .8;
}

html.quiz-themed .login-game #gameCode {
    text-transform: uppercase;
}

html.quiz-themed .login-game .join-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .65rem;
    margin-bottom: 1.25rem;
}

html.quiz-themed .login-game .spectator-choice {
    gap: .7rem;
    min-height: 36px;
    margin: .4rem 0;
    font-size: .9rem;
    font-weight: 700;
}

html.quiz-themed .login-game .spectator-choice input {
    accent-color: var(--quiz-primary);
    border-color: var(--quiz-line);
}

html.quiz-themed #teamNameFields { margin-top: 1rem; }

html.quiz-themed body .login-game .join-row button,
html.quiz-themed .login-start-button,
html.quiz-themed .scoreboard-next,
html.quiz-themed .submit-multiple-answers {
    border: 1px solid var(--quiz-primary);
    border-radius: var(--quiz-radius);
    background: var(--quiz-primary-deep);
    color: var(--quiz-text);
    padding: .85rem 1.25rem;
    font-size: 1rem;
    text-shadow: none;
    box-shadow: var(--quiz-button-shadow);
    transform: none;
}

html.quiz-themed body .login-game .join-row button:hover,
html.quiz-themed .login-start-button:hover,
html.quiz-themed .scoreboard-next:hover,
html.quiz-themed .submit-multiple-answers:hover {
    background: var(--quiz-primary-hover);
}

html.quiz-themed .login-game #feedback {
    color: var(--quiz-muted);
    font-size: .95rem;
    line-height: 1.4;
}

html.quiz-themed .multiple-choice-game .question {
    color: var(--quiz-text);
    font-size: 1.75rem;
    line-height: 1.3;
    font-weight: 900;
    text-shadow: none;
    margin: 1rem 0 .75rem;
}

html.quiz-themed .question-points {
    background: transparent;
    color: var(--quiz-gold);
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0 0 .75rem;
    font-size: .9rem;
    box-shadow: none;
}

html.quiz-themed body:not(.spectator-display) .player-timer-sticky:has(.question-meta:not(.hidden), .timer-bar:not(.hidden)) {
    background: var(--quiz-surface);
    border-radius: 0;
    padding: .15rem 0 .5rem;
    box-shadow: none;
}

html.quiz-themed .multiple-choice-game .question-meta {
    color: var(--quiz-muted);
    font-size: .9rem;
}

html.quiz-themed .multiple-choice-game .question-meta strong {
    width: 3rem;
    height: 3rem;
    border: 3px solid transparent;
    background: linear-gradient(var(--quiz-input), var(--quiz-input)) padding-box,
        conic-gradient(var(--quiz-primary) var(--quiz-timer-progress, 100%), var(--quiz-line) 0) border-box;
    color: var(--quiz-text);
    box-shadow: var(--quiz-timer-shadow);
    font-size: 1.3rem;
    font-variant-numeric: tabular-nums;
}

html.quiz-themed .timer-bar {
    height: .45rem;
    border: 0;
    margin-bottom: .8rem;
    background: var(--quiz-input);
    box-shadow: none;
}

html.quiz-themed .timer-bar-fill {
    background: linear-gradient(90deg, var(--quiz-primary), var(--quiz-secondary), var(--quiz-gold));
}

html.quiz-themed .revealing-mode .timer-bar-fill {
    background: var(--quiz-success);
}

html.quiz-themed .multiple-choice-game #answerStatus {
    color: var(--quiz-muted);
    font-size: 1rem;
    line-height: 1.45;
    min-height: 0;
    margin: .75rem 0 0;
    font-weight: 700;
}

html.quiz-themed .multiple-choice-game .choice-grid {
    gap: .85rem;
    padding: .2rem;
}

html.quiz-themed .multiple-choice-game .choice-button {
    min-height: 88px;
    border: 1px solid var(--quiz-line);
    background: var(--quiz-surface-raised);
    color: var(--quiz-text);
    padding: 1rem;
    box-shadow: none;
    outline: 0;
    transform: none;
    transition: background .15s, border-color .15s, box-shadow .15s;
}

html.quiz-themed .multiple-choice-game .choice-button:hover:not(:disabled) {
    background: var(--quiz-hover-surface);
    border-color: var(--quiz-primary);
    box-shadow: none;
    transform: none;
}

html.quiz-themed .multiple-choice-game .choice-button strong {
    color: var(--quiz-text);
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-shadow: none;
}

html.quiz-themed .multiple-choice-game .choice-button span {
    flex-shrink: 0;
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid var(--quiz-line);
    background: var(--quiz-input);
    color: var(--quiz-text);
    font-size: 1rem;
}

html.quiz-themed .multiple-choice-game .choice-grid.answer-selection .choice-button.selected:not(.correct):not(.wrong),
html.quiz-themed .multiple-choice-game .choice-button.selected {
    background: var(--quiz-selected-surface);
    border-color: var(--quiz-primary);
    outline: 2px solid var(--quiz-primary);
    outline-offset: 0;
    box-shadow: var(--quiz-selected-shadow);
    opacity: 1;
    transform: none;
}

html.quiz-themed .multiple-choice-game .choice-grid.answer-selection .choice-button.selected:not(.correct):not(.wrong) span {
    background: var(--quiz-text);
    color: var(--quiz-primary-deep);
}

html.quiz-themed .multiple-choice-game .choice-grid.answer-selection .choice-button.selected:not(.correct):not(.wrong) span::after {
    border-color: var(--quiz-primary-deep);
}

html.quiz-themed .multiple-choice-game .choice-button.correct {
    background: var(--quiz-success-surface);
    border-color: var(--quiz-success);
    outline: 2px solid var(--quiz-success);
    outline-offset: 0;
    box-shadow: var(--quiz-success-shadow);
    opacity: 1;
}

html.quiz-themed .multiple-choice-game .choice-button.wrong {
    background: var(--quiz-danger-surface);
    border-color: var(--quiz-danger);
    outline: 2px solid var(--quiz-danger);
    outline-offset: 0;
    box-shadow: none;
    opacity: 1;
}

html.quiz-themed .answer-explanation {
    border: 1px solid var(--quiz-line);
    background: var(--quiz-input);
    color: var(--quiz-text);
    border-radius: var(--quiz-radius);
    box-shadow: none;
    font-size: 1rem;
    line-height: 1.5;
    text-shadow: none;
}

html.quiz-themed .scoreboard-game {
    max-width: 56rem;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    min-height: 0;
}

html.quiz-themed .scoreboard-game > .mc-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
    overflow: hidden;
}

html.quiz-themed .scoreboard {
    min-height: 0;
    overflow-y: auto;
    gap: .7rem;
    padding: .2rem;
}

html.quiz-themed .score-row {
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    min-height: min(76px, 10dvh);
    gap: .9rem;
    padding: .65rem 1rem;
    border: 1px solid var(--quiz-line);
    border-radius: var(--quiz-radius);
    background: var(--quiz-surface-raised);
    box-shadow: none;
    color: var(--quiz-text);
}

html.quiz-themed .score-row.own-team {
    border: 3px solid var(--quiz-primary);
    background: var(--quiz-own-team-surface);
    padding: calc(.65rem - 2px) calc(1rem - 2px);
    box-shadow: var(--quiz-selected-shadow);
}

html.quiz-themed .score-row strong {
    font-size: 1.1rem;
    font-weight: 800;
    overflow-wrap: anywhere;
    white-space: normal;
    text-shadow: none;
}

html.quiz-themed .scoreboard-game .score-row span {
    text-shadow: none;
}

html.quiz-themed .rank {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--quiz-line);
    background: var(--quiz-input);
    color: var(--quiz-text);
    font-size: 1rem;
    box-shadow: none;
    font-variant-numeric: tabular-nums;
}

html.quiz-themed .score-row:first-child .rank {
    border-color: var(--quiz-gold);
    color: var(--quiz-gold);
}

html.quiz-themed .score-row .score-value {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    color: var(--quiz-gold);
    font-size: 1.5rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

html.quiz-themed .score-row .score-unit {
    display: block;
    color: var(--quiz-muted);
    font-size: .75rem;
    font-weight: 700;
}

html.quiz-themed .own-team-label {
    display: block;
    margin-top: .2rem;
    color: var(--quiz-primary-text);
    font-size: .75rem;
    font-weight: 900;
}

@media (min-width: 42.01rem) {
    html.quiz-themed body.spectator-display .multiple-choice-game .question { font-size: 2.2rem; }
    html.quiz-themed body.spectator-display .multiple-choice-game .choice-button strong { font-size: 1.35rem; }
    html.quiz-themed body.spectator-display .score-row strong { font-size: 1.25rem; }
}

@media (max-width: 42rem) {
    html.quiz-themed .game-shell {
        width: calc(100% - 1.25rem);
        padding: 1rem 0;
    }
    html.quiz-themed body .game-shell .mc-header h1 { font-size: 2rem; }
    html.quiz-themed body .login-game .mc-header h1 { font-size: 2.65rem; }
    html.quiz-themed .mc-header { margin-bottom: 1rem; }
    html.quiz-themed .mc-panel { padding: 1rem; }
    html.quiz-themed .multiple-choice-game .question { font-size: 1.25rem; }
    html.quiz-themed .multiple-choice-game .choice-grid { gap: .65rem; }
    html.quiz-themed .multiple-choice-game .choice-button { min-height: 68px; padding: .65rem; gap: .55rem; }
    html.quiz-themed .multiple-choice-game .choice-button strong { font-size: .95rem; }
    html.quiz-themed .multiple-choice-game .choice-button span { width: 1.7rem; height: 1.7rem; font-size: .85rem; }
    html.quiz-themed .score-row { grid-template-columns: 2rem minmax(0, 1fr) auto; gap: .65rem; padding: .75rem; }
    html.quiz-themed .score-row.own-team { padding: calc(.75rem - 2px); }
    html.quiz-themed .rank { width: 1.9rem; height: 1.9rem; }
    html.quiz-themed .score-row strong { font-size: 1rem; }
    html.quiz-themed .score-row .score-value { font-size: 1.3rem; }
}

@media (max-height: 650px) {
    html.quiz-themed .game-shell { padding-top: .5rem; padding-bottom: .5rem; }
    html.quiz-themed .mc-header { margin-bottom: .65rem; }
    html.quiz-themed .screen-kicker { margin-bottom: .3rem; }
    html.quiz-themed .login-game .spectator-choice { margin: .15rem 0; min-height: 32px; }
    html.quiz-themed .login-game .join-row { margin-bottom: .65rem; }
    html.quiz-themed body.spectator-display .multiple-choice-game .question { font-size: 1.6rem; }
    html.quiz-themed body.spectator-display .multiple-choice-game .choice-button strong { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
    html.quiz-themed *,
    html.quiz-themed *::before,
    html.quiz-themed *::after { animation: none !important; transition: none !important; }
}
