.country-game {
  --country-ink: #18333d;
  --country-muted: #60737b;
  --country-line: #d5e2e5;
  --country-soft: #f1f7f7;
  --country-accent: #087f72;
  --country-accent-dark: #05675e;
  --country-warm: #f4a340;
  color: var(--country-ink);
}

.country-game,
.country-game * {
  box-sizing: border-box;
}

.country-game [hidden] {
  display: none !important;
}

.country-game button,
.country-game input {
  font: inherit;
}

.country-game button {
  min-height: 44px;
  cursor: pointer;
}

.country-game button:disabled,
.country-game input:disabled {
  cursor: not-allowed;
  opacity: .52;
}

.country-game button:focus-visible,
.country-game input:focus-visible,
.country-game [tabindex="-1"]:focus-visible {
  outline: 3px solid #2aa99a;
  outline-offset: 3px;
}

.country-toolbar {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--country-line);
  background: #fff;
}

.country-mode-tabs,
.country-difficulty {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.country-difficulty {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.country-mode-tabs button,
.country-difficulty button {
  border: 1px solid var(--country-line);
  border-radius: 11px;
  background: #fff;
  color: var(--country-muted);
  font-weight: 800;
}

.country-mode-tabs button:hover,
.country-difficulty button:hover,
.country-mode-tabs button.is-active,
.country-difficulty button.is-active,
.country-mode-tabs button[aria-pressed="true"],
.country-difficulty button[aria-pressed="true"] {
  border-color: var(--country-accent);
  background: #eaf7f5;
  color: var(--country-accent-dark);
}

.country-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--country-line);
  background: var(--country-soft);
}

.country-stats > div {
  min-width: 0;
  padding: 12px 8px;
  text-align: center;
}

.country-stats > div + div {
  border-left: 1px solid var(--country-line);
}

.country-stats span,
.country-stats small {
  display: block;
  overflow: hidden;
  color: var(--country-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-stats strong {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--country-ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-stage {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 4vw, 34px);
}

.country-silhouette-frame {
  display: grid;
  width: min(100%, 620px);
  min-height: 252px;
  place-items: center;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid var(--country-line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 45%, rgba(8, 127, 114, .08), transparent 58%),
    #fbfefe;
}

.country-silhouette-frame svg,
.country-silhouette {
  display: block;
  width: min(100%, 440px);
  height: auto;
  max-height: 250px;
  overflow: hidden;
}

.country-silhouette-frame path,
.country-silhouette path {
  fill: var(--country-ink);
  stroke: rgba(255, 255, 255, .72);
  stroke-width: .65;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.country-hint-copy {
  min-height: 44px;
  margin: 0 auto;
  padding: 11px 15px;
  border-radius: 12px;
  background: #fff5e8;
  color: #715128;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.65;
  text-align: center;
}

.country-form {
  display: grid;
  width: min(100%, 620px);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 0 auto;
}

.country-form input {
  min-width: 0;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #b9cbcf;
  border-radius: 12px;
  background: #fff;
  color: var(--country-ink);
}

.country-form input::placeholder {
  color: #839399;
}

.country-form button,
.country-actions button {
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid var(--country-accent);
  border-radius: 12px;
  background: var(--country-accent);
  color: #fff;
  font-weight: 850;
}

.country-form button:hover,
.country-actions button:hover {
  background: var(--country-accent-dark);
}

.country-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.country-actions button:not(:first-child) {
  border-color: var(--country-line);
  background: #fff;
  color: var(--country-ink);
}

.country-actions button:not(:first-child):hover {
  border-color: #9bb5ba;
  background: var(--country-soft);
}

.country-result {
  width: min(100%, 620px);
  margin: 0 auto;
  padding: 15px 18px;
  border: 1px solid #96cec5;
  border-radius: 14px;
  background: #eaf8f5;
  color: #145d55;
  font-weight: 850;
  line-height: 1.65;
  text-align: center;
}

.country-guesses-wrap {
  width: min(100%, 760px);
  margin: 0 auto;
}

.country-guesses-wrap h3 {
  margin: 4px 0 10px;
  color: var(--country-ink);
  font-size: 15px;
}

.country-guess-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.country-guess-row {
  display: grid;
  min-height: 48px;
  grid-template-columns: minmax(120px, 1.35fr) repeat(3, minmax(84px, 1fr));
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--country-line);
  border-left: 5px solid var(--country-warm);
  border-radius: 11px;
  background: #fff;
  color: var(--country-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.country-guess-row strong {
  overflow: hidden;
  color: var(--country-ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-guess-row span {
  text-align: center;
}

.country-guess-row.is-correct {
  border-color: #8ac8bd;
  border-left-color: var(--country-accent);
  background: #edf9f7;
}

.country-guess-empty {
  padding: 20px 12px;
  border: 1px dashed #b8c9cc;
  border-radius: 11px;
  color: var(--country-muted);
  font-size: 13px;
  text-align: center;
}

.country-status {
  min-height: 22px;
  margin: 0;
  color: var(--country-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

@media (max-width: 640px) {
  .country-toolbar {
    padding: 14px;
  }

  .country-stats strong {
    font-size: 13px;
  }

  .country-stage {
    gap: 13px;
    padding: 18px 12px 22px;
  }

  .country-silhouette-frame {
    min-height: 210px;
    padding: 14px;
    border-radius: 15px;
  }

  .country-form {
    grid-template-columns: 1fr;
  }

  .country-guess-row {
    grid-template-columns: minmax(0, 1fr) repeat(3, auto);
    gap: 5px;
    padding: 9px 8px;
    font-size: 10px;
  }

  .country-guess-row strong {
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .country-mode-tabs,
  .country-difficulty {
    gap: 5px;
  }

  .country-mode-tabs button,
  .country-difficulty button {
    padding-right: 5px;
    padding-left: 5px;
    font-size: 12px;
  }

  .country-stats > div {
    padding-right: 3px;
    padding-left: 3px;
  }

  .country-stats span,
  .country-stats small {
    font-size: 9px;
  }

  .country-stats strong {
    font-size: 11px;
  }

  .country-silhouette-frame {
    min-height: 184px;
  }

  .country-actions button {
    flex: 1 1 calc(50% - 5px);
    padding-right: 8px;
    padding-left: 8px;
    font-size: 12px;
  }

  .country-guess-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .country-guess-row span:nth-of-type(2),
  .country-guess-row span:nth-of-type(3) {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .country-game *,
  .country-game *::before,
  .country-game *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (forced-colors: active) {
  .country-silhouette-frame path,
  .country-silhouette path {
    fill: CanvasText;
    stroke: Canvas;
  }

  .country-guess-row,
  .country-mode-tabs button,
  .country-difficulty button {
    border: 1px solid CanvasText;
  }
}
