/* ==========================================================================
   Quick Draw — only what's unique to this game.
   Shared game styles are in /assets/css/game-shell.css.
   ========================================================================== */

.game[data-game="quick-draw"] {
  --game-color: var(--cat-brain);   /* color of the score bar */
  max-width: 640px;
}

/* The whole board is one big tap target, and it changes color with the phase */
.qd {
  --qd-bg: var(--bg-raised);
  --qd-text: var(--text);
  min-height: clamp(380px, 95vw, 440px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-3);
  background: var(--qd-bg);
  color: var(--qd-text);
  cursor: pointer;
  transition: background 90ms;
}
.qd[data-phase="wait"]   { --qd-bg: color-mix(in srgb, var(--mustard) 28%, var(--bg-raised)); }
.qd[data-phase="go"]     { --qd-bg: var(--teal); --qd-text: #FFFFFF; transition: none; }
.qd[data-phase="early"]  { --qd-bg: var(--tomato-dk); --qd-text: #FFFFFF; }

.qd__clock { width: clamp(120px, 34vw, 160px); height: auto; overflow: visible; }
.qd[data-phase="wait"] .qd__clock { animation: qd-tick 1s steps(2) infinite; }
.qd[data-phase="go"] .qd__clock { animation: qd-ring 0.12s linear infinite; }
.qd[data-phase="go"] .qd__bells { animation: qd-bells 0.08s linear infinite; }
@keyframes qd-tick { 50% { transform: rotate(2deg); } }
@keyframes qd-ring { 25% { transform: rotate(-7deg) translateY(-2px); } 75% { transform: rotate(7deg) translateY(-2px); } }
@keyframes qd-bells { 50% { transform: translateY(-2px); } }

.qd__big {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 11vw, 3.6rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.qd[data-phase="go"] .qd__big { font-size: clamp(3rem, 16vw, 5rem); }
.qd__small {
  min-height: 1.4em;
  margin: 0;
  font-weight: 700;
  text-align: center;
  opacity: 0.85;
}

/* Five little slots showing each try's time */
.qd__dots {
  display: flex;
  gap: clamp(6px, 2vw, 10px);
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
}
.qd-dot {
  display: grid;
  place-items: center;
  width: clamp(48px, 14vw, 60px);
  height: 34px;
  border: 2.5px dashed color-mix(in srgb, currentColor 45%, transparent);
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.qd-dot.is-now { border-style: solid; border-color: currentColor; }
.qd-dot.is-done { border: 2.5px solid var(--ink-900); background: var(--cream-50); color: var(--ink-900); }

@media (prefers-reduced-motion: reduce) {
  .qd__clock, .qd__bells { animation: none !important; }
}
