html,
body {
  min-height: 100%;
}

.atlas-page {
  --soot: #041c14;
  --clay: #15392d;
  --ash: #31594c;
  min-height: 100svh;
  padding: 105px 35px 35px;
}

.atlas-shell {
  position: relative;
  width: min(570px, 100%);
}

#globe {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 1;
}

#globe .mapboxgl-canvas-container,
#globe .mapboxgl-canvas {
  background: #fff;
}

#globe .mapboxgl-canvas {
  cursor: grab;
  outline: none;
}

#globe .mapboxgl-canvas:active {
  cursor: grabbing;
}

#globe .mapboxgl-ctrl-attrib,
#globe .mapboxgl-ctrl-logo {
  display: none;
}

.mapbox-token-message {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% - 40px);
  margin: 0;
  color: var(--clay);
  font: 9px/1.7 var(--font-sans);
  letter-spacing: .08em;
  text-align: center;
  transform: translate(-50%, -50%);
}

.mapbox-token-message small {
  display: block;
  color: var(--ash);
  font-size: 7px;
  letter-spacing: 0;
}

.country-photo {
  width: 175px;
  margin: 0;
  padding: 6.25px;
  border: 1px solid var(--cement);
  color: var(--soot);
  background: #fff;
  box-shadow: 7.5px 7.5px 0 #1f1f1d1f;
  clip-path: polygon(7.5px 0, 100% 0, 100% calc(100% - 7.5px), calc(100% - 7.5px) 100%, 0 100%, 0 7.5px);
}

.country-photo[hidden] {
  display: none;
}

.country-photo__frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--cement);
  background: var(--enamel);
  aspect-ratio: 4 / 3;
}

.country-photo__frame.is-portrait {
  aspect-ratio: 3 / 4;
}

.country-photo picture {
  display: block;
  width: 100%;
  height: 100%;
}

.country-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 140ms ease-out;
}

.country-photo.is-loading img,
.country-photo.is-error img {
  opacity: 0;
  transition: none;
}

.country-photo__status {
  position: absolute;
  inset: 0;
  display: grid;
  color: var(--ash);
  font: 8.75px/1 var(--font-sans);
  letter-spacing: .08em;
  place-items: center;
}

.country-photo__status:empty {
  display: none;
}

.country-photo figcaption {
  display: flex;
  padding: 8.75px 2.5px 2.5px;
  color: var(--clay);
  font: 8.75px/1 var(--font-sans);
  letter-spacing: .05em;
  text-transform: uppercase;
  justify-content: space-between;
  gap: 7px;
}

.country-photo figcaption span:first-child {
  overflow: hidden;
  color: var(--soot);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.atlas-key-hint {
  position: absolute;
  right: 0;
  bottom: 47px;
  left: 0;
  z-index: 4;
  margin: 0;
  color: #080808;
  font: 12px/1 var(--font-sans);
  letter-spacing: .08em;
  text-align: center;
  opacity: 0;
  pointer-events: none;
}

.atlas-key-hint.is-visible {
  animation: atlas-key-hint 5.2s ease-out forwards;
}

.atlas-key-hint__mobile {
  display: none;
}

@media (max-width: 700px), (pointer: coarse) {
  .atlas-key-hint__desktop {
    display: none;
  }

  .atlas-key-hint__mobile {
    display: inline;
  }
}

@keyframes atlas-key-hint {
  0%, 8% {
    opacity: 0;
    transform: translateY(2px);
  }
  20%, 68% {
    opacity: .82;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(0);
  }
}

.atlas-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 700px) {
  .atlas-page {
    padding: 84px 28px 28px;
  }

}

@media (max-width: 420px) {
  .atlas-page {
    padding: 68px 20px 20px;
  }

  .country-photo {
    width: 120px;
    padding: 5px;
  }

  .country-photo__status,
  .country-photo figcaption {
    font-size: 7px;
  }

  .country-photo figcaption {
    padding: 7px 2px 2px;
  }

  .atlas-key-hint {
    bottom: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .country-photo img {
    transition: none;
  }

  .atlas-key-hint.is-visible {
    opacity: .82;
    animation: none;
  }
}
