/* Shared game presentation. Game-specific bodies keep their own interaction styling. */
.game-shell, .game-controller {
    --game-space: 1rem;
    --game-radius: 1rem;
    --game-shadow: 0 4px 16px rgba(15, 23, 42, .10);
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}
.game-shell { max-width: 1200px; padding-block: 1rem; }
.game-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.game-header h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; }
.game-metadata, .game-shell .small, .game-shell small { font-size: 14px; }
.game-metadata { color: var(--bs-secondary-color, #687585); }
.game-shell .card, .game-preparation { border-radius: var(--game-radius); box-shadow: var(--game-shadow); }
.game-shell .card-body, .game-shell .card.p-3, .game-preparation { padding: 1rem !important; }
.game-shell button, .game-shell a.btn, .game-controller button, .game-controller a.btn { min-height: 44px; min-width: 44px; }
.game-shell .btn, .game-controller .btn { border-radius: .65rem; font-weight: 700; }
.game-shell .btn-primary, .game-controller .btn-primary { background-color: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.game-shell .btn-success, .game-controller .btn-success { background-color: #15803d; border-color: #15803d; color: #fff; }
.game-shell .btn-danger, .game-controller .btn-danger { background-color: #b91c1c; border-color: #b91c1c; color: #fff; }
.game-shell .btn-outline-danger, .game-controller .btn-outline-danger { color: #b91c1c; border-color: #b91c1c; }
.game-shell .btn-outline-danger:hover, .game-controller .btn-outline-danger:hover { background-color: #b91c1c; color: #fff; }
.game-shell .match-row-play { width: 44px; min-width: 44px; }
.game-host-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; padding: .75rem; border: 1px solid var(--bs-border-color, #dee2e6); border-radius: var(--game-radius); background: var(--bs-body-bg, #fff); box-shadow: var(--game-shadow); }
.game-toolbar-actions, .game-action-bar { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.game-toolbar-actions { flex: 1 1 15rem; min-width: 0; }
.game-stop { margin-left: auto; flex-shrink: 0; }
.game-action-bar { margin-block: 1rem; }
.game-preparation { border: 1px solid var(--bs-border-color, #dee2e6); background: var(--bs-tertiary-bg, #f8f9fa); margin-bottom: 1rem; min-width: 0; }
.game-preparation h2 { font-size: 1rem; font-weight: 800; }
.game-scoreboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.game-scoreboard > .scoreboard-team { min-width: 0; padding: 1rem; color: #fff; border: 2px solid transparent; border-radius: var(--game-radius, 1rem); box-shadow: var(--game-shadow, 0 4px 16px rgba(15, 23, 42, .1)); }
.game-scoreboard > .scoreboard-team.active { border-color: #fff; outline: 3px solid #f97316; outline-offset: 1px; }
.team-color-0 { background: linear-gradient(135deg, #15803d, #166534); }
.team-color-1 { background: linear-gradient(135deg, #1d4ed8, #1e3a8a); }
.team-color-2 { background: linear-gradient(135deg, #c2410c, #9a3412); }
.team-color-3 { background: linear-gradient(135deg, #7e22ce, #581c87); }
.team-color-4 { background: linear-gradient(135deg, #be123c, #881337); }
.team-color-5 { background: linear-gradient(135deg, #0f766e, #134e4a); }
.scoreboard-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.game-team-identity { min-width: 0; flex: 1; }
.scoreboard-team-name { font-size: 24px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.scoreboard-team-name-input { width: 100%; max-width: 100%; font-size: 24px; font-weight: 800; min-height: 44px; }
.scoreboard-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; font-size: 14px; }
.scoreboard-meta > span { padding: .15rem .5rem; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; background: rgba(0, 0, 0, .12); }
.scoreboard-meta > .active-team-badge { color: #fff; background: #9a3412; border-color: #fdba74; font-weight: 800; }
.game-team-total { flex: 0 0 auto; text-align: right; font-size: 14px; max-width: 7rem; }
.game-team-total strong { font-size: 24px; font-weight: 800; }
.game-team-identity > .btn { margin-top: .5rem; }
.scoreboard-points { display: flex; flex-wrap: wrap; gap: .5rem; }
.point-badge { display: inline-grid; justify-items: center; align-content: center; gap: .1rem; min-width: 64px; min-height: 64px; padding: .4rem; border: 1px solid rgba(255,255,255,.55); border-radius: .65rem; background: rgba(0,0,0,.15); }
.point-round, .point-label { font-size: 14px; }
.point-value { font-size: 24px; line-height: 1.2; font-weight: 800; }
.point-badge.future { border-style: dashed; }
.point-badge.current { outline: 2px solid #fdba74; outline-offset: 1px; }
.point-badge.scored { background: rgba(0,0,0,.3); }
.game-scoreboard.team-count-many { gap: .75rem; }
.game-scoreboard.team-count-many > .scoreboard-team { padding: .75rem; }
.game-scoreboard.team-count-many .scoreboard-header { margin-bottom: .75rem; }
.game-scoreboard .scoreboard-years { gap: .75rem; }
.game-scoreboard .scoreboard-year { width: auto; min-width: 72px; min-height: 64px; padding: .5rem .75rem; font-size: 24px; }
.game-scoreboard .scoreboard-decade-selector .scoreboard-years { flex-wrap: wrap; }
.game-shell .player-question-title, .game-shell .game-challenge { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.25; }
.game-shell details > summary { min-height: 44px; cursor: pointer; }
.game-controller .controller-root, .game-controller.controller-root, .game-controller.team-controller { font-family: 'Nunito', system-ui, sans-serif; }
.game-controller .controller-header h1, .game-controller .team-controller-card h1 { font-size: clamp(1.5rem, 5vw, 2rem); }
.game-controller .team-controller-card { border-radius: 1rem; }
.game-controller .controller-play-btn:not(:disabled), .game-controller .identify-song-button:not(:disabled) { background: #1d4ed8; color: #fff; border-radius: .65rem; font-family: inherit; }
.game-controller .controller-play-btn:not(:disabled):active, .game-controller .identify-song-button:not(:disabled):active { background: #1e40af; }
.game-controller .controller-title { color: #93c5fd; font-weight: 800; }
.game-controller .controller-hint, .game-controller .controller-status, .game-controller .choice-help { font-size: 14px; }
.game-controller .submit-answer:not(:disabled) { background: #15803d; }
.game-controller button:focus-visible, .game-shell button:focus-visible, .game-shell summary:focus-visible { outline: 3px solid #fbbf24; outline-offset: 3px; }
.game-shell .preparation-overview { display: flex; flex-wrap: wrap; gap: 1rem; }
.game-shell .preparation-overview > .game-preparation { flex: 1 1 22rem; }
.game-preparation h2 { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.scoreboard-points.points-dense { flex-wrap: nowrap; overflow-x: auto; padding: .2rem .2rem .5rem; }
.points-dense .point-badge { flex-shrink: 0; }
@media (max-width: 767.98px) {
    .game-scoreboard { grid-template-columns: minmax(0, 1fr); }
    .game-host-toolbar { align-items: flex-start; }
    .game-toolbar-actions { flex-basis: 100%; }
    .game-stop { align-self: flex-end; }
    .game-action-bar > .btn { flex: 1 1 auto; }
}
@media (max-width: 399.98px) {
    .scoreboard-header { flex-wrap: wrap; }
    .game-team-total { max-width: none; }
}
