/* Telling time game (/games/telling-time/, public/games/telling-time.js). Uses the tokens in style.css and the shell
   classes in games.css. The time to show and the clock sit at the top of the board so both fit on the first phone
   screen; Larger print (.gm-big) and Big screen (.gm-huge) make the clock and the answers bigger. Hour hand: short,
   thick, red; minute hand: long, thin, blue (they differ in size, not only colour). */
.ck { display: grid; justify-items: center; gap: 10px; padding: 10px 8px 16px; text-align: center; }
.ck p { margin: 0; }
.ck-ask { display: grid; gap: 2px; justify-items: center; }
.ck-q { font-size: var(--t-md); font-weight: 700; color: var(--muted); }
.ck-target { font-size: clamp(1.7rem, 7.5vw, 2.6rem); font-weight: 900; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ck-sub { display: block; font-size: var(--t-md); font-weight: 700; color: var(--muted); }
.ck-face { width: min(100%, 300px); height: auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.ck-rim { fill: #2d6f8f; }
.ck-dial { fill: #fffdf6; }
.ck-tk { stroke: #8a8aa3; stroke-width: 1.2; }
.ck-tk5 { stroke: #1d1d3b; stroke-width: 3; stroke-linecap: round; }
.ck-n { font: 800 19px var(--font, system-ui, sans-serif); fill: #1d1d3b; text-anchor: middle; dominant-baseline: central; }
.ck-hand { transform-origin: 110px 110px; transform-box: view-box; }
.ck-anim .ck-hand { transition: transform .9s ease-in-out; }
.ck-stem { stroke-linecap: round; }
.ck-hour .ck-stem { stroke: #c8372d; stroke-width: 9; }
.ck-hour .ck-knob { fill: #c8372d; }
.ck-minute .ck-stem { stroke: #1f62d6; stroke-width: 5; }
.ck-minute .ck-knob { fill: #1f62d6; }
.ck-hit { stroke: transparent; stroke-width: 30; stroke-linecap: round; }
.ck-cap { fill: #1d1d3b; }
.ck-live { cursor: pointer; }
.ck-live .ck-hand { cursor: grab; outline: none; }
.ck-live .ck-hand.ck-on { cursor: grabbing; }
.ck-live .ck-hand:focus-visible .ck-knob, .ck-live .ck-hand.ck-on .ck-knob { stroke: var(--focus, #1d1d3b); stroke-width: 4; }
.ck-live .ck-hand:focus-visible .ck-hit { stroke: rgba(31, 98, 214, .16); }
.ck-move { display: grid; grid-template-columns: repeat(4, auto); gap: 6px; justify-content: center; }
.ck-move button { min-height: 48px; padding: 6px 10px; font-weight: 800; white-space: nowrap; }
.ck-go .primary { min-height: 52px; min-width: 9rem; font-size: var(--t-lg); }
.ck-fb { min-height: 1.6em; max-width: 34rem; font-size: var(--t-md); font-weight: 600; }
.ck-fb button { margin: 6px 0 0 6px; min-height: 44px; }
.ck-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; width: min(100%, 34rem); }
.ck-opt { min-height: 60px; font-size: var(--t-lg); font-weight: 800; line-height: 1.2; }
.ck-opt .ck-sub { font-size: var(--t-sm); }
.ck-opt.ck-wrong { text-decoration: line-through; opacity: .55; }
.ck-opt.ck-wrong::before { content: '✗ '; }
.ck-opt.ck-right::before { content: '✓ '; }
.ck-type { display: flex; flex-wrap: wrap; align-items: end; justify-content: center; gap: 8px; }
.ck-type label { display: grid; gap: 2px; font-weight: 700; font-size: var(--t-sm); }
.ck-type input { width: 4.2ch; min-height: 56px; font-size: 2rem; font-weight: 800; text-align: center; border: 3px solid var(--line-2); border-radius: 12px; font-variant-numeric: tabular-nums; }
.ck-colon { font-size: 2rem; font-weight: 900; padding-bottom: 8px; }
.ck-type .primary { min-height: 56px; }
.ck-end { gap: 12px; max-width: 34rem; margin: 0 auto; font-size: var(--t-md); }
.ck-score { font-size: clamp(1.5rem, 6vw, 2.1rem); font-weight: 900; line-height: 1.2; }
.ck-prog { margin: 8px 0 0; font-size: var(--t-sm); color: var(--muted); }
.gm-big .ck-face { width: min(100%, 380px); }
.gm-big .ck-target { font-size: clamp(2.1rem, 9vw, 3.2rem); }
.gm-big .ck-opt { min-height: 72px; font-size: 1.5rem; }
.gm-huge .ck-face { width: min(100%, 460px); }
.gm-huge .ck-target { font-size: clamp(2.4rem, 11vw, 4rem); color: #000; }
.gm-huge .ck-rim { fill: #000; }
.gm-huge .ck-dial { fill: #fff; }
.gm-huge .ck-n { fill: #000; }
.gm-huge .ck-move { grid-template-columns: repeat(2, auto); }
@media (max-width: 400px) { .ck-move { grid-template-columns: repeat(2, 1fr); width: 100%; } }
@media (prefers-reduced-motion: reduce) { .ck-anim .ck-hand { transition: none; } }
@media (min-width: 760px) { .ck { padding: 16px 16px 24px; } }
/* Phones: the time and the clock come straight after the score line; the menus and shell buttons move under the
   board, so the game is on the first screen. Wider screens keep the usual order. */
.js .gm[data-game="telling-time"] .gm-stage { min-height: 420px; }
.js .gm[data-game="telling-time"] .gm-stage:has(.ck-end) { min-height: 0; }
@media (max-width: 600px) {
  .gm[data-game="telling-time"] { display: flex; flex-direction: column; }
  .gm[data-game="telling-time"] > * { order: 1; }
  .gm[data-game="telling-time"] > .gm-opts { order: 2; margin: var(--s4) 0 var(--s3); padding-top: var(--s3); border-top: 2px dashed var(--line-2); }
  .gm[data-game="telling-time"] > .gm-tools { order: 3; }
  .gm[data-game="telling-time"] > .gm-tools2 { order: 4; }
}
