.game-wrap { max-width: 980px; }
.game-wrap [hidden] { display: none !important; }
.game-panel { background: #fffdf5; border: 2px solid var(--ink); border-radius: 1.25rem; box-shadow: 4px 5px 0 var(--ink); padding: clamp(1rem, 3vw, 2rem); margin-bottom: 1.5rem; color: var(--ink); }
.game-panel h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); line-height: 1.15; }
.game-modes { margin: 1.25rem 0; border: 0; padding: 0; min-width: 0; }
.game-modes legend,.game-filters label { font-weight: 750; }
.game-mode-grid,.game-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.game-mode-grid label { display: grid; grid-template-columns: auto 1fr; align-content: start; align-items: center; gap: .5rem; min-width: 0; cursor: pointer; background: #e5f5e8; border: 2px solid var(--ink); border-radius: .8rem; padding: .85rem; }
.game-mode-grid label:nth-child(2) { background: #fff0c5; }
.game-mode-grid label:nth-child(3) { background: #efe5f8; }
.game-mode-grid label:has(:checked) { box-shadow: 3px 4px 0 var(--ink); }
.game-mode-grid input { accent-color: var(--teal); width: 1.2rem; height: 1.2rem; margin: 0; }
.game-mode-grid .lab-icon { justify-self: end; }
.game-mode-grid strong,.game-mode-grid span { grid-column: 1 / -1; }
.game-mode-grid span,.game-muted,.game-source { color: var(--text); font-size: .92rem; }
.game-filters { grid-template-columns: 1fr minmax(0, 2fr) 1fr; }
.game-filters label { min-width: 0; }
.game-filters select { display: block; font: inherit; font-weight: 550; color: var(--ink); width: 100%; min-height: 44px; margin-top: .3rem; padding: .5rem 2rem .5rem .65rem; border: 1.5px solid var(--ink); border-radius: .55rem; background-color: #fffdf4; }
.game-actions,.game-topline { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.game-actions { margin-top: 1.25rem; }
.game-actions button { cursor: pointer; font-family: inherit; min-height: 44px; }
.game-actions .btn { font-size: 1rem; }
.game-secondary,.game-text-button { font-size: .94rem; font-weight: 750; color: var(--ink); }
.game-secondary { background: #fffdf5; border: 1.5px solid var(--ink); border-radius: .7rem; padding: .5rem .85rem; }
.game-secondary:hover { background: #e5f5e8; }
.game-text-button { background: none; border: none; text-decoration: underline; padding-inline: .4rem; }
.game-chip { padding: .2rem .65rem; background: #e5f5e8; border: 1.5px solid var(--ink); border-radius: 2rem; font-weight: 750; font-size: .87rem; }
.game-team { background: #efe5f8; }
.game-timer { background: #fff0c5; font-variant-numeric: tabular-nums; }
.game-timer[data-urgent] { background: #ffd3c6; }
.game-score { margin-left: auto; }
.game-panel progress { display: block; margin: .8rem 0 1.05rem; width: 100%; height: .55rem; accent-color: var(--teal); }
.game-panel .kicker { margin-bottom: .45rem; }
.game-answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-top: 1.15rem; }
.game-answer { display: flex; align-items: center; gap: .6rem; min-height: 3.25rem; width: 100%; text-align: left; color: var(--ink); background: var(--option-wash, #f8f4e8); border: 2px solid var(--ink); border-radius: .8rem; padding: .65rem .8rem; font: inherit; font-weight: 650; cursor: pointer; }
.game-answer:nth-child(1) { --option-wash: #e4f3e8; }
.game-answer:nth-child(2) { --option-wash: #fce3d9; }
.game-answer:nth-child(3) { --option-wash: #fff0c5; }
.game-answer:nth-child(4) { --option-wash: #ede4f7; }
.game-answer:hover:not([aria-disabled]) { box-shadow: 2px 3px var(--ink); }
.game-answer[aria-disabled] { cursor: default; background: #f8f4e8; }
.game-answer[data-state="correct"] { background: #d0edd8; border-color: #176658; }
.game-answer[data-state="incorrect"] { background: #ffe0d6; border-color: #9d3623; }
.game-answer-letter { display: grid; place-items: center; flex: none; width: 1.75rem; height: 1.75rem; border: 1.5px solid currentColor; border-radius: .45rem; background: #fffdf5; font-size: .9rem; }
.game-feedback { border: 1.5px solid var(--ink); background: #e4f3e8; border-radius: .8rem; margin-top: 1rem; padding: .9rem 1rem; }
.game-feedback[data-correct="false"] { background: #fff0c5; }
.game-feedback p,.game-result-line,.game-review p,.game-panel dialog p { margin-top: .55rem; }
.game-review-title { margin-top: 1.65rem; }
.game-review details { border-bottom: 1px dashed #8da397; padding: .75rem 0; }
.game-review summary { font-weight: 700; }
.game-review details p:last-child { margin-bottom: .3rem; }
.game-source { margin: 1.25rem 0; }
.game-wrap dialog { width: min(90%, 450px); margin: auto; }
.game-wrap dialog::backdrop { background: rgb(36 60 64 / .5); }
@media (max-width: 650px) {
  .game-mode-grid,.game-filters,.game-answer-grid { grid-template-columns: 1fr; }
  .game-mode-grid label { grid-template-columns: auto auto 1fr; }
  .game-mode-grid strong { grid-column: auto; }
  .game-mode-grid span { grid-column: 2/-1; }
  .game-mode-grid .lab-icon { justify-self: start; width: 1.7rem; height: 1.7rem; }
}

.game-topic-filter > span { font-weight: 750; }
.game-topics { position: relative; margin-top: .3rem; }
.game-topics > summary { min-height: 44px; padding: .5rem .65rem; background: #fffdf4; border: 1.5px solid var(--ink); border-radius: .55rem; font-weight: 550; overflow-wrap: anywhere; }
.game-topic-menu { position: absolute; top: calc(100% + .3rem); left: 0; z-index: 5; width: 100%; padding: .6rem; background: #fffdf5; border: 1.5px solid var(--ink); border-radius: .7rem; box-shadow: 3px 4px 0 var(--ink); }
.game-topic-options { max-height: min(44vh, 20rem); overflow-y: auto; margin: .4rem 0; }
.game-topic-options fieldset { min-width: 0; padding: .25rem 0; margin: 0; border: 0; }
.game-topic-options legend { padding: 0 .35rem; font-size: .84rem; font-weight: 750; color: var(--teal); }
.game-topic-options label { display: flex; align-items: center; min-height: 42px; gap: .55rem; padding: .3rem .35rem; font-size: .92rem; font-weight: 550; cursor: pointer; }
.game-topic-options label:hover { background: #e5f5e8; }
.game-topic-options input { flex: none; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--teal); }
.game-topic-options input:focus-visible { outline-offset: 2px; }
.game-topic-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.game-topic-menu button { font: inherit; font-size: .86rem; font-weight: 700; min-height: 38px; cursor: pointer; padding: .25rem .5rem; }
.game-topic-done { width: 100%; }
#game-setup .btn:disabled { opacity: .6; cursor: default; box-shadow: none; transform: none; }
