body {
  padding: var(--page-top) 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: #c5302d;
  transition: width 300ms ease;
  z-index: 30;
}
.stats {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 720px;
}
.stats-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 4px;
  border-bottom: 1px solid #eee;
}
.stats-row:last-child {
  border-bottom: none;
}
.stats-label {
  flex: 1;
  font-size: 17px;
  font-weight: 500;
  color: #1c1c1c;
}
.stats-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.stats-chip {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  min-width: 140px;
  font-variant-numeric: tabular-nums;
}
.stats-chip:hover {
  background: #f0f0f0;
}
.stats-chip-mode {
  font-size: 12px;
  color: #999;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.stats-chip-score {
  font-weight: 600;
  font-size: 16px;
}
.stats-chip-time {
  font-size: 12px;
  color: #666;
  margin-left: auto;
}
.stats-chip-cta {
  margin-left: auto;
  color: var(--link-color);
  font-weight: 500;
  font-size: 14px;
}
.stats-chip-unplayed {
  background: #fafafa;
  border-style: dashed;
}

@media (max-width: 600px) {
  .stats-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px 0;
  }
  .stats-chips {
    justify-content: stretch;
  }
  .stats-chip {
    flex: 1;
    min-width: 0;
  }
}
.play-timer {
  font-size: 14px;
  color: #666;
  margin: 0 0 12px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
/* Wrong-pick penalty flash in the 60s mode — the -3s jump on the
   countdown is too subtle without it. inline-block lets the transform
   take hold; the keyframes hold red+big at the start then ease back. */
#play-time {
  display: inline-block;
}
#play-time.penalty {
  animation: penalty-flash 600ms ease-out;
}
@keyframes penalty-flash {
  0%   { color: #c5302d; transform: scale(1.5); }
  35%  { color: #c5302d; transform: scale(1.5); }
  100% { color: #666;    transform: scale(1); }
}
.play-mode:not(:empty)::after {
  content: "·";
  padding: 0 8px;
}
.mode-toggle:not(:empty)::after {
  content: "·";
  padding: 0 8px;
}
.mode-toggle a {
  color: var(--link-color);
  text-decoration: none;
}
.mode-toggle a:hover {
  text-decoration: underline;
}
.mode-toggle .mode-current {
  color: #1c1c1c;
  font-weight: 500;
}
.mode-toggle .mode-sep {
  color: #ddd;
  padding: 0 4px;
}
.country-name {
  font-size: 28px;
  font-weight: 500;
  margin: 0 0 40px;
  text-align: center;
}
.choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: min(90vw, 480px);
}
.flag-choice {
  padding: 0;
  border: 2px solid #ddd;
  background: #fff;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  transition: border-color 100ms;
}
.flag-choice:hover:not(:disabled) {
  border-color: #999;
}
.flag-choice:disabled {
  cursor: default;
}
.flag-choice.correct {
  border-color: #2a9d4a;
  animation: pulse-correct 1.1s ease-out infinite;
}
.flag-choice.wrong {
  border-color: #c5302d;
  animation: pulse-wrong 1.1s ease-out infinite;
}
@keyframes pulse-correct {
  0%   { box-shadow: 0 0 0 0 rgba(42, 157, 74, 0.7); }
  100% { box-shadow: 0 0 0 14px rgba(42, 157, 74, 0); }
}
@keyframes pulse-wrong {
  0%   { box-shadow: 0 0 0 0 rgba(197, 48, 45, 0.7); }
  100% { box-shadow: 0 0 0 14px rgba(197, 48, 45, 0); }
}
.flag-choice img {
  width: 100%;
  height: 100%;
  display: block;
}
.feedback {
  margin: 20px 0 12px;
  font-size: 18px;
  min-height: 24px;
  text-align: center;
}
