/* Pick them all: a setup card (same as the Family quiz), then a question over a grid of 6 to 12 big tiles that fits the
   screen without scrolling. Palette from the shared frame plus the quiz's accents for the two teams. */
.bq-main {
  --bq-kids: #e08a2c; --bq-parents: #2f6f8f; --bq-key: #2a8c9a;
  background:
    radial-gradient(circle at 8% 92%, rgba(42,140,154,0.10) 0 14vmin, transparent 14.2vmin),
    radial-gradient(circle at 94% 12%, rgba(224,138,44,0.12) 0 11vmin, transparent 11.2vmin),
    radial-gradient(circle at 86% 88%, rgba(181,100,154,0.09) 0 8vmin, transparent 8.2vmin);
}
.bq-main [hidden] { display: none !important; }

/* ---------- setup ---------- */
.bq-setup {
  display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2.2vh, 22px);
  padding: clamp(20px, 4vh, 44px) clamp(24px, 4vw, 64px); border-radius: 28px;
  background: var(--sand); box-shadow: 0 10px 40px rgba(22,44,51,0.10);
  max-width: min(1100px, 100%);
}
.bq-hello { font-size: 2.6rem; color: var(--sea-deep); }
.bq-label { margin: 0; font-family: var(--serif); font-size: 1.6rem; color: var(--sea-deep); }
.bq-choice { background: var(--cream); flex-wrap: wrap; justify-content: center; }
.bq-choice button { min-height: var(--tap); font-size: 1.2rem; padding: 0 1.4em; }
.bq-note { margin: 0; font-size: 1.1rem; color: #4a5157; text-align: center; max-width: 40em; }
.bq-start { min-height: 80px; padding: 0 2.4em; font-size: 1.5rem; border-radius: 20px; margin-top: 4px; }

/* ---------- playing: top row, question, grid (takes what is left), message row ---------- */
.bq-play {
  width: min(1500px, 100%); flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; align-items: stretch; gap: clamp(6px, 1.4vh, 16px);
}
.bq-top { flex: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: 1rem; }
.bq-turn, .bq-cat, .bq-count { padding: 0.3em 0.9em; border-radius: 999px; white-space: nowrap; }
.bq-turn { background: var(--sea-deep); color: var(--cream); font-weight: 500; }
.bq-play[data-team="kids"] .bq-turn { background: var(--bq-kids); color: #fff; }
.bq-play[data-team="parents"] .bq-turn { background: var(--bq-parents); color: #fff; }
.bq-cat { background: var(--sand); color: var(--sea-deep); }
.bq-count { color: #4a5157; }
.bq-score {
  display: inline-flex; align-items: center; gap: 0.5em; padding: 0.15em 0.3em 0.15em 0.9em; border-radius: 999px;
  background: var(--sand); border: 3px solid transparent; transition: border-color 0.2s;
}
.bq-score b { display: inline-grid; place-items: center; min-width: 1.8em; height: 1.8em; border-radius: 999px; color: #fff; font-weight: 600; }
.bq-score-kids b { background: var(--bq-kids); }
.bq-score-parents b { background: var(--bq-parents); }
.bq-play[data-team="kids"] .bq-score-kids { border-color: var(--bq-kids); }
.bq-play[data-team="parents"] .bq-score-parents { border-color: var(--bq-parents); }

.bq-question {
  flex: none; text-align: center; font-size: clamp(1.5rem, 4.2vh, 2.8rem); line-height: 1.12; color: var(--sea-deep);
  max-width: 32em; margin: 0 auto; text-wrap: balance;
}
.bq-question.is-long { font-size: clamp(1.35rem, 3.6vh, 2.4rem); }

/* Rows share the height that is left (at least a tap target, at most a comfortable tile), so 12 tiles never scroll. */
.bq-grid {
  --cols: 4; --rows: 3;
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows), minmax(var(--tap), 190px));
  align-content: center; gap: clamp(8px, 1.4vh, 16px);
}
.bq-tile {
  position: relative; min-width: 0; min-height: var(--tap);
  display: flex; align-items: center; gap: 0.6em; text-align: left; overflow: hidden;
  padding: 0.3em 0.8em 0.3em 0.5em;
  border: 4px solid transparent; border-radius: 20px; cursor: pointer; touch-action: manipulation;
  background: #fff; box-shadow: 0 4px 0 rgba(22,44,51,0.12), 0 6px 20px rgba(22,44,51,0.06);
  font-size: clamp(1.05rem, 3vh, 1.75rem); font-weight: 400; line-height: 1.12;
  transition: background-color 0.15s, color 0.15s, opacity 0.2s, transform 0.1s;
}
.bq-tile.is-long { font-size: clamp(0.95rem, 2.6vh, 1.5rem); }
.bq-text { min-width: 0; overflow-wrap: anywhere; }
.bq-key {
  flex: none; display: grid; place-items: center; width: 1.8em; height: 1.8em; border-radius: 14px;
  background: var(--bq-key); color: #fff; font-weight: 600; font-family: var(--sans);
}
.bq-tile:hover { border-color: var(--bq-key); }
.bq-tile:active { transform: translateY(2px); }

/* picked, before checking */
.bq-tile.is-on { background: var(--sea-deep); color: var(--cream); border-color: var(--sea-deep); box-shadow: 0 2px 0 rgba(22,44,51,0.25); }
.bq-tile.is-on .bq-key { background: var(--coral); }

/* after checking */
.bq-tile[aria-disabled="true"] { cursor: default; }
.bq-tile[aria-disabled="true"]:hover { border-color: transparent; }
.bq-tile.is-right, .bq-tile.is-right:hover { background: var(--good); color: #fff; border-color: var(--good); }
.bq-tile.is-right .bq-key { background: #fff; color: var(--good); }
.bq-tile.is-wrong, .bq-tile.is-wrong:hover { background: var(--bad); color: #fff; border-color: var(--bad); }
.bq-tile.is-wrong .bq-key { background: #fff; color: var(--bad); }
.bq-tile.is-missed, .bq-tile.is-missed:hover { background: #e3f1e8; border: 4px dashed var(--good); }
.bq-tile.is-missed .bq-key { background: var(--good); }
.bq-tile.is-none { opacity: 0.45; }
.bq-grid.is-pop .bq-tile.is-right { animation: bq-pop 0.4s ease-out; }
@keyframes bq-pop { 0% { transform: scale(1); } 40% { transform: scale(1.05); } 100% { transform: scale(1); } }

.bq-after {
  flex: none; display: flex; align-items: center; justify-content: center; gap: clamp(12px, 2vw, 28px);
  min-height: clamp(76px, 12vh, 120px);
}
.bq-words { flex: 0 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bq-message { font-size: 1.45rem; min-height: 0; }
.bq-play.is-checked .bq-message { text-align: left; }
.bq-why { margin: 0; font-size: 1.02rem; line-height: 1.3; color: #3c4349; max-width: 52em; }
.bq-why:empty { display: none; }
.bq-go { flex: none; min-height: 72px; min-width: 9em; padding: 0 2em; font-size: 1.3rem; }
.bq-go:disabled { opacity: 0.45; cursor: default; }
.bq-go:disabled:active { transform: none; }

/* Portrait or very short screens: let the message row wrap under the button. */
@media (max-aspect-ratio: 1/1) { .bq-after { flex-wrap: wrap; } }

@media (prefers-reduced-motion: reduce) {
  .bq-tile, .bq-score { transition: none; }
  .bq-grid.is-pop .bq-tile.is-right { animation: none; }
}
