/* Number Wilds — "rounds": different ways of asking the same math (js/rounds.js).
   Same chunky outlined sticker look as style.css; every selector lives under .round. */

.round {
  display: flex; flex-direction: column; gap: 8px;
  height: 100%; min-height: 0; overflow-y: auto;
  padding: 2px 6px 12px 2px;
  animation: roundIn .28s ease-out;
}
@keyframes roundIn { from { transform: translateY(14px); opacity: .3; } }

.round-head { display: flex; align-items: baseline; gap: 12px; flex: none; max-width: 900px; width: 100%; margin: 0 auto; flex-wrap: wrap; }
.round-head .round-badge { align-self: center; }
.head-ask { font-size: clamp(18px, 1.7vw, 23px); font-weight: 600; }
.round-badge {
  display: inline-block; font-size: 16px; font-weight: 700; letter-spacing: .3px;
  padding: 4px 14px; border-radius: 999px; background: var(--sun);
  border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
}
.round-body { display: flex; flex-direction: column; gap: 8px; max-width: 900px; width: 100%; margin: 0 auto; }
.round-qcard { position: static; padding: 12px 16px; }
.round .question { font-size: clamp(21px, 2vw, 27px); }
/* a question picture shares the panel with the choices, so it never gets the whole height */
.round-qcard svg { max-height: 200px; width: auto; max-width: 100%; }
.round-ask { font-size: clamp(19px, 1.8vw, 24px); font-weight: 600; }
.round-sub { font-size: 16px; color: var(--ink-soft); margin-top: -4px; }
.round-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.round-actions:empty { display: none; }
.round-go { margin-left: auto; }

/* choice buttons inside a round: always one readable column, never below a 56px tap target */
.round .choices { grid-template-columns: 1fr; gap: 8px; }
.round .choice {
  min-height: 58px; font-size: 19px; line-height: 1.3; font-weight: 500;
  text-align: left; justify-content: flex-start; padding: 10px 14px 10px 40px;
}

/* ---------- spot the mistake ---------- */
.round-claim {
  margin-top: 8px; padding: 8px 12px; font-size: 19px;
  background: var(--oops-bg); border: 3px dashed #a78bfa; border-radius: 16px;
}
.round-claim .claim-val {
  display: inline-block; font-size: 24px; font-weight: 700; color: var(--oops);
  background: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 1px 10px; margin-left: 4px;
}

/* ---------- estimate first ---------- */
/* the three sizes are short, so they sit side by side and leave the picture its room */
.round-estimate .choices { grid-template-columns: repeat(3, 1fr); }
.round-estimate .choice { font-size: 23px; font-weight: 600; justify-content: center; text-align: center; padding: 10px 8px 10px 34px; }
.round-estimate .choice .choice-key { left: 7px; }

/* ---------- order them ---------- */
.order-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.order-slot {
  position: relative; min-height: 78px; border-radius: 18px; background: #fff;
  border: 3px dashed var(--ink-soft); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; padding: 6px;
}
.order-slot .slot-n { font-size: 13px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .4px; }
.order-slot .slot-val { font-size: 28px; font-weight: 700; line-height: 1.1; }
.order-slot.filled { border-style: solid; border-color: var(--ink); background: var(--card); box-shadow: 0 4px 0 var(--ink); }
.order-slot.right { background: var(--good-bg); border-color: var(--good); animation: pop .3s; }
.order-slot.wrong { animation: rd-shake .5s; border-color: var(--oops); background: var(--oops-bg); }
@keyframes rd-shake { 20% { transform: translate(-5px, 1px); } 40% { transform: translate(5px, -1px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(3px, 0); } }

.order-tray { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.order-chip {
  position: relative; min-height: 68px; font-size: 28px; font-weight: 700;
  background: var(--card); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink);
  display: flex; align-items: center; justify-content: center; padding: 8px 10px 8px 14px;
  transition: transform .06s, box-shadow .06s, opacity .18s;
}
.order-chip:hover:not(:disabled) { background: #f0f9ff; }
.order-chip:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.order-chip .choice-key { position: absolute; left: 7px; top: 6px; font-size: 12px; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--ink-soft); display: grid; place-items: center; color: var(--ink-soft); }
.order-chip.used { opacity: .3; box-shadow: 0 2px 0 var(--ink); transform: translateY(3px); }
.order-buttons { justify-content: flex-start; }
.order-buttons .order-check { margin-left: auto; }

/* ---------- flurry ---------- */
.flurry-chain { display: flex; align-items: center; gap: 10px; flex: none; }
.flurry-chain .link {
  width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--ink); background: #fff;
  display: grid; place-items: center; font-size: 22px; font-weight: 700; color: var(--ink-soft);
  position: relative; transition: background .2s, color .2s;
}
.flurry-chain .link + .link::before {
  content: ''; position: absolute; left: -13px; top: 50%; width: 10px; height: 4px;
  background: var(--ink); transform: translateY(-50%); border-radius: 2px;
}
.flurry-chain .link.now { background: var(--sun); color: var(--ink); box-shadow: 0 0 0 5px rgba(255, 210, 63, .35); }
.flurry-chain .link.done { background: var(--go); color: var(--ink); animation: pop .3s; }
.flurry-chain .link.shown { background: var(--oops-bg); color: var(--oops); }
.flurry-stage { display: flex; flex-direction: column; gap: 10px; }
.flurry-count { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-soft); margin-bottom: 4px; }
.round-flurry .choices { grid-template-columns: 1fr 1fr; }
.round-flurry .choice { font-size: 26px; font-weight: 600; justify-content: center; text-align: center; min-height: 66px; padding-left: 40px; }
.round-flurry .choices.long { grid-template-columns: 1fr; }
.round-flurry .choices.long .choice { font-size: 21px; text-align: left; justify-content: flex-start; }

/* shorter screens (1024x700): trim the padding rather than the tap targets */
@media (max-height: 760px) {
  .round { gap: 6px; }
  .round .question { font-size: clamp(19px, 2vw, 24px); }
  .round-qcard { padding: 9px 13px; }
  .round-qcard svg { max-height: 160px; }
  .round-claim { font-size: 18px; padding: 6px 10px; }
  .round .choice { min-height: 56px; font-size: 18px; }
  .order-slot { min-height: 66px; }
  .order-slot .slot-val { font-size: 24px; }
  .order-chip { min-height: 60px; font-size: 24px; }
  .flurry-chain .link { width: 40px; height: 40px; font-size: 19px; }
  .round-flurry .choice { min-height: 60px; font-size: 23px; }
}
