.geoloc-map {
  background: #cfd8dc;
}

.geoloc-map .leaflet-control-container {
  font-family: inherit;
}

.geoloc-map .leaflet-control-zoom a {
  color: #15131d;
}

.geoloc-map .leaflet-control-attribution {
  background: rgba(255, 255, 255, .88);
  color: #333;
  font-size: 10px;
}

.geoloc-map .leaflet-control-attribution a {
  color: #4a2b9a;
}

.geoloc-marker-icon {
  border: 0;
  background: transparent;
}

.geoloc-player-marker,
.geoloc-target-marker {
  display: block;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .45);
}

.geoloc-player-marker {
  width: 22px;
  height: 22px;
  background: #8d5cff;
}

.geoloc-target-marker {
  width: 24px;
  height: 24px;
  background: #d9ff43;
  border-color: #16131d;
}

.map-status {
  margin: 8px 0 0;
  color: #ffcf70;
  font-size: 12px;
  text-align: center;
}

.connection-banner {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  max-width: calc(100% - 24px);
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 198, 92, .45);
  border-radius: 13px;
  background: rgba(20, 15, 12, .96);
  color: #ffe0a0;
  box-shadow: 0 16px 45px rgba(0, 0, 0, .42);
  font-size: 12px;
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.connection-banner > span {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ffc65c;
  box-shadow: 0 0 12px #ffc65c;
  animation: geoloc-connection-pulse 1.2s infinite;
}

.connection-banner.restored {
  border-color: rgba(99, 230, 146, .45);
  background: rgba(8, 28, 18, .96);
  color: #aef5c7;
}

.connection-banner.restored > span {
  background: #63e692;
  box-shadow: 0 0 12px #63e692;
  animation: none;
}

@keyframes geoloc-connection-pulse {
  50% { opacity: .35; }
}

@media (max-width: 520px) {
  .connection-banner {
    top: auto;
    bottom: max(64px, calc(env(safe-area-inset-bottom) + 58px));
    font-size: 10px;
    text-align: center;
  }
}

.geoloc-map-mode {
  height: 100dvh;
  overflow: hidden;
}

.geoloc-map-mode .game-shell {
  width: 100%;
  height: 100dvh;
  padding: 0;
}

.geoloc-map-mode .game-topbar,
.geoloc-map-mode .live-grid > aside {
  display: none;
}

.geoloc-map-mode .live-grid {
  display: block;
  width: 100%;
  height: 100dvh;
  margin: 0;
}

.geoloc-map-mode .live-grid > main {
  position: relative;
  width: 100%;
  height: 100dvh;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
}

.geoloc-map-mode .round-head,
.geoloc-map-mode .timer,
.geoloc-map-mode .map-actions {
  position: absolute;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  z-index: 500;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(8, 7, 17, .88);
  box-shadow: 0 12px 38px rgba(0, 0, 0, .38);
  backdrop-filter: blur(12px);
}

.geoloc-map-mode .round-head {
  top: max(10px, env(safe-area-inset-top));
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  pointer-events: none;
}

.geoloc-map-mode .round-title {
  margin: 2px 0;
  font-size: clamp(22px, 5.5vw, 42px);
}

.geoloc-map-mode .round-copy {
  font-size: 11px;
}

.geoloc-map-mode .timer {
  top: calc(max(10px, env(safe-area-inset-top)) + 92px);
  margin: 0;
  padding: 7px 10px;
  border-radius: 12px;
}

.geoloc-map-mode .timer-row b {
  font-size: 16px;
}

.geoloc-map-mode .timer-track {
  height: 6px;
  margin-top: 4px;
}

.geoloc-map-mode .geoloc-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}

.geoloc-map-mode .leaflet-top {
  top: 145px;
}

.geoloc-map-mode .leaflet-bottom {
  bottom: 86px;
}

.geoloc-map-mode .map-status {
  position: absolute;
  top: 150px;
  left: 50%;
  z-index: 510;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(8, 7, 17, .9);
  transform: translateX(-50%);
}

.geoloc-map-mode .map-actions {
  right: auto;
  width: fit-content;
  max-width: calc(100% - 24px);
  bottom: max(10px, env(safe-area-inset-bottom));
  margin: 0;
  padding: 9px 13px;
  border-radius: 14px;
  transform: translateX(-50%);
  left: 50%;
}

.geoloc-map-mode .map-actions span {
  color: #fff;
}

.geoloc-map-mode #reveal {
  display: none !important;
}

@media (max-width: 520px) {
  .geoloc-map .leaflet-control-attribution {
    max-width: 72%;
    font-size: 8px;
  }

  .geoloc-map-mode .round-head {
    gap: 8px;
  }

  .geoloc-map-mode .round-head .eyebrow {
    display: none;
  }

  .geoloc-map-mode .round-number {
    flex: 0 0 auto;
  }

  .geoloc-map-mode .timer {
    top: calc(max(10px, env(safe-area-inset-top)) + 76px);
  }

  .geoloc-map-mode .map-actions {
    display: block;
    bottom: max(16px, calc(env(safe-area-inset-bottom) + 10px));
    z-index: 900;
    padding: 8px 11px;
  }

  .geoloc-map-mode .map-actions span {
    display: block;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.25;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .geoloc-map-mode .leaflet-bottom {
    bottom: 54px;
  }
}

@media (max-width: 380px) {
  .geoloc-map-mode .map-actions span {
    max-width: 280px;
  }
}

.geoloc-round-results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 16px;
  width: min(1500px, 100%);
  margin: 0 auto;
  text-align: left;
}

.geoloc-results-map {
  width: 100%;
  height: min(54vh, 570px);
  min-height: 350px;
  overflow: hidden;
  border: 1px solid rgba(71, 231, 255, .28);
  border-radius: 18px;
  background: #cfd8dc;
}

.geoloc-round-results-list {
  min-width: 0;
  max-height: min(54vh, 570px);
  overflow: auto;
}

.geoloc-round-results-list .round-score-list {
  grid-template-columns: 1fr !important;
  margin-top: 0;
}

.game-reveal .tv-main {
  grid-template-columns: 1fr !important;
}

.game-reveal .tv-main > aside {
  display: none !important;
}

.game-reveal .tv-game {
  display: block;
}

.geoloc-result-marker {
  overflow: visible !important;
  white-space: nowrap;
}

.geoloc-result-dot {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--marker-color, #8d5cff);
  box-shadow: 0 3px 13px rgba(0, 0, 0, .55);
}

.geoloc-result-target-dot {
  width: 29px;
  height: 29px;
  color: #16131d;
  border-color: #16131d;
  background: #d9ff43;
  font-size: 15px;
}

.geoloc-result-label {
  position: absolute;
  top: 50%;
  left: 31px;
  padding: 4px 7px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 7px;
  background: rgba(8, 7, 17, .9);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .4);
  font: 800 10px/1.1 'Manrope', sans-serif;
  transform: translateY(-50%);
}

.geoloc-result-target-label {
  color: #16131d;
  border-color: rgba(22, 19, 29, .3);
  background: #d9ff43;
}

@media (max-width: 760px) {
  .geoloc-round-results-layout {
    grid-template-columns: 1fr;
  }

  .geoloc-results-map {
    height: 42vh;
    min-height: 290px;
  }

  .geoloc-round-results-list {
    max-height: none;
  }

  .geoloc-result-label {
    max-width: 150px;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
  }
}
