/* Times tables game (/games/times-tables/, public/games/times-tables.js). Uses the tokens in style.css and the
   shell classes in games.css. The question and the number pad sit at the top of the board so both fit on the
   first phone screen; Larger print (.gm-big) and Big screen (.gm-huge) scale them up. */
.tt { display: grid; justify-items: center; gap: 10px; padding: 12px 8px 16px; text-align: center; }
.tt p { margin: 0; }
.tt-q { font-size: clamp(2.4rem, 11vw, 4rem); font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.tt-ans { display: inline-block; min-width: 2.2ch; padding: 0 .15em; border-bottom: 5px solid var(--coral); color: var(--coral-dark); }
.tt-fb { min-height: 1.6em; font-size: var(--t-lg); font-weight: 700; }
.tt-fb .alt { margin-left: 8px; min-height: 44px; }
.tt-time { font-size: var(--t-lg); font-weight: 800; }
.tt-time strong { display: inline-block; min-width: 2ch; font-variant-numeric: tabular-nums; }
.tt-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 330px); }
.tt-k { min-height: 56px; padding: 0; font-size: 1.7rem; font-weight: 800; border-radius: 14px; font-variant-numeric: tabular-nums; }
.tt-ok { font-size: 1.9rem; }
.tt-ready, .tt-end { gap: 14px; max-width: 34rem; margin: 0 auto; font-size: var(--t-md); }
.tt-big-q, .tt-score { font-size: clamp(1.6rem, 6vw, 2.2rem); font-weight: 900; line-height: 1.2; }
.tt-mix { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 30rem; }
.tt-mix .chip { min-width: 52px; font-weight: 800; }
.tt-prog { margin: 8px 0 0; font-size: var(--t-sm); color: var(--muted); }
.gm-big .tt-q { font-size: clamp(3rem, 14vw, 5rem); }
.gm-big .tt-k { min-height: 66px; font-size: 2rem; }
.gm-big .tt-pad { width: min(100%, 390px); }
.gm-huge .tt-q { font-size: clamp(3.4rem, 16vw, 7rem); }
.gm-huge .tt-k { min-height: 76px; font-size: 2.4rem; }
.gm-huge .tt-pad { width: min(100%, 460px); }
@media (min-width: 760px) { .tt { padding: 20px 16px 24px; } .tt-k { min-height: 62px; } }
/* Phones: the question and number pad come straight after the score line; the table and mode menus and the shell
   buttons move under the board, so the game is on the first screen. Wider screens keep the usual order. */
.js .gm[data-game="times-tables"] .gm-stage { min-height: 330px; }
.js .gm[data-game="times-tables"] .gm-stage:has(.tt-end, .tt-ready) { min-height: 0; }
@media (max-width: 759px) {
  .gm[data-game="times-tables"] { display: flex; flex-direction: column; }
  .gm[data-game="times-tables"] > * { order: 1; }
  .gm[data-game="times-tables"] > .gm-opts { order: 2; margin: var(--s4) 0 var(--s3); padding-top: var(--s3); border-top: 2px dashed var(--line-2); }
  .gm[data-game="times-tables"] > .gm-tools { order: 3; }
  .gm[data-game="times-tables"] > .gm-tools2 { order: 4; }
  .gm[data-game="times-tables"] .gm-bar { margin-bottom: 4px; }
  .tt { padding-top: 4px; gap: 8px; }
  .tt-k { min-height: 52px; }
}
/* In class: ideas by year level (scripts/games.mjs classroomHtml, 11 Nov 2026) */
.gm-years dt { font-weight: 800; margin: 12px 0 2px; }
.gm-years dd { margin: 0; }
