.geography-page {
  background: radial-gradient(ellipse at 75% 0%, #622344, transparent 56%), #210819;
}

.geography {
  width: min(100% - 2rem, 83rem);
  margin: 0 auto;
  padding: clamp(1.05rem, 3vw, 2rem) 0 1.5rem;
}

.geo-header {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  gap: .75rem;
  margin-bottom: clamp(1rem, 3vw, 1.85rem);
  padding-right: 5.85rem;
  text-align: center;
}

.geo-header h1 {
  border: 0;
  background: none;
  padding: 0;
  font-size: clamp(1.7rem, 3.8vw, 3rem);
}

.geo-back { justify-self: start; text-decoration: none; white-space: nowrap; }

.geo-count {
  justify-self: end;
  min-width: 4.2rem;
  padding: .5rem .65rem;
  border: 1px solid #ffc79779;
  border-radius: 999px;
  color: #ffe2af;
  background: #44132e;
  font-size: .92rem;
  text-align: center;
}

.geo-game {
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) minmax(0, 2.45fr);
  align-items: start;
  gap: clamp(.85rem, 2.4vw, 1.65rem);
}

.geo-photo { margin: 0; min-width: 0; }

.geo-photo-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid #facc9f88;
  border-radius: 1.05rem;
  color: #fff0ef;
  background: #290c22;
  box-shadow: 0 .4rem 1.4rem #19071188;
  cursor: zoom-in;
}

.geo-photo-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 34rem;
  object-fit: contain;
}

.geo-photo-caption {
  position: absolute;
  right: .6rem;
  bottom: .6rem;
  padding: .4rem .65rem;
  border-radius: 999px;
  background: #24091ce8;
  font: 600 .78rem system-ui, sans-serif;
}

.geo-board {
  display: grid;
  gap: .7rem;
  min-width: 0;
  padding: clamp(.7rem, 2vw, 1.15rem);
  border: 1px solid #ffc79764;
  border-radius: 1.15rem;
  background: #361124;
  box-shadow: 0 .4rem 1.4rem #19071188;
}

.geo-question-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem;
}

.geo-question-row h2 { margin: 0; color: #ffe1d0; font: normal clamp(1.1rem, 2.3vw, 1.55rem)/1.18 Georgia, serif; }
.geo-zoom { display: flex; flex-wrap: wrap; gap: .32rem; }
.geo-zoom button { padding: .37rem .58rem; min-width: 2rem; }
.geo-zoom button:disabled { opacity: .48; cursor: default; }
.geo-zoom button:disabled:hover { background: #44132e; }

.geo-viewport {
  position: relative;
  border: 1px solid #e6a3bc5e;
  border-radius: .75rem;
  background: radial-gradient(ellipse at 52% 43%, #682747, #381327 76%);
  overflow: hidden;
}

.geo-map {
  display: block;
  width: 100%;
  height: auto;
  min-height: 13rem;
  touch-action: none;
}

.geo-map.is-panning, .geo-map.is-panning * { cursor: grabbing; }

.geo-countries path {
  fill: #efa7c1;
  stroke: #713852;
  vector-effect: non-scaling-stroke;
  stroke-width: .8;
  stroke-linejoin: round;
}

.geo-countries [role="button"] { cursor: pointer; outline: 0; }
.geo-countries .geo-background-land { fill: #aa7490; cursor: default; }

.geo-countries [role="button"]:hover,
.geo-countries [role="button"]:focus-visible {
  fill: #ffe0af;
  stroke: #ffedc5;
  stroke-width: 1.5;
}

.geo-countries .is-wrong { fill: #ac3858; stroke: #ffd2e0; }
.geo-countries .is-correct { fill: #9ce4b5; stroke: #e7ffe6; stroke-width: 1.4; }

.geo-hover-name {
  position: absolute;
  left: .65rem;
  bottom: .6rem;
  padding: .36rem .6rem;
  border-radius: 999px;
  color: #ffe6d7;
  background: #2a0a20eb;
  font-size: .84rem;
  pointer-events: none;
}

.geo-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .55rem;
  min-height: 2.5rem;
}

.geo-feedback { margin: 0; color: #ffd9eb; }
.geo-feedback[data-result="correct"] { color: #b6efc6; }
.geo-source { justify-self: end; color: #eab9d4; font-size: .75rem; }
.geo-game[hidden], .geo-finish[hidden] { display: none; }
.geo-finish { display: grid; justify-items: center; gap: .7rem; padding: 1.5rem .8rem; text-align: center; }
.geo-finish img { width: min(16rem, 57vw); height: auto; }
.geo-finish h2 { margin: .2rem 0 0; color: #ffe0b6; font: normal clamp(1.5rem, 5vw, 2.4rem) Georgia, serif; }
.geo-finish p { margin: 0 0 .25rem; }
.geo-finish a { text-decoration: none; }
.geo-photo-button:focus-visible { outline: 2px solid #fff3ae; outline-offset: 3px; }

.geo-lightbox {
  width: min(70rem, calc(100% - 1.5rem));
  padding: .75rem;
  border: 1px solid #ffc7979c;
  border-radius: 1rem;
  background: #2a0b20;
}

.geo-lightbox::backdrop { background: #180613da; }
.geo-lightbox form { display: flex; justify-content: end; margin-bottom: .6rem; }
.geo-lightbox img { display: block; width: 100%; max-height: 76dvh; object-fit: contain; }

@media (max-width: 48rem) {
  .geography { width: min(100% - 1.1rem, 40rem); }
  .geo-header { grid-template-columns: 1fr 1fr; row-gap: 1rem; padding-right: 0; }
  .geo-header h1 { grid-column: 1 / -1; grid-row: 2; }
  .geo-count { grid-column: 2; grid-row: 1; margin-right: 6.7rem; }
  .geo-back { padding-inline: .5rem; }
  .geo-game { grid-template-columns: minmax(0, 1fr); }
  .geo-photo-image { height: clamp(9rem, 29dvh, 15rem); }
}
