/* Wildspur map manager */
.bottom-nav { grid-template-columns: repeat(4, 1fr); width: min(calc(100% - 32px), 520px); }
.live-stats { grid-template-columns: repeat(4, 1fr); }
.live-stats > div:nth-child(3) { border-right: 1px solid var(--line); }

.real-map-card {
  position: relative;
  height: min(58vh, 540px);
  min-height: 410px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #18251c;
  box-shadow: var(--shadow);
}
#real-map { position: absolute; inset: 0; }
#real-map .maplibregl-canvas { outline: none; }
#real-map .maplibregl-ctrl-bottom-right { bottom: 54px; }
#real-map .maplibregl-ctrl-attrib { background: rgba(12, 20, 15, .72); color: #c9d2c8; }
#real-map .maplibregl-ctrl-attrib a { color: var(--lime); }
#real-map .maplibregl-ctrl-group { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: rgba(18, 28, 21, .9); box-shadow: none; }
#real-map .maplibregl-ctrl-group button span { filter: invert(1); }
.map-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 34px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(204, 233, 119, .1), transparent 30%),
    repeating-radial-gradient(ellipse at 40% 50%, transparent 0 30px, rgba(204, 233, 119, .045) 31px 32px),
    #18251c;
}
.map-empty[hidden] { display: none; }

.map-empty .feature-icon { margin: 0; }
.map-empty h2 { margin: 4px 0 8px; font-family: Georgia, serif; font-size: 1.8rem; font-weight: 400; }
.map-empty p:last-child { max-width: 340px; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.real-map-tools {
  position: absolute;
  z-index: 3;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.real-map-tools button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(18, 28, 21, .9);
  color: var(--lime);
  font-size: 1.1rem;
  pointer-events: auto;
  cursor: pointer;
}
.real-map-tools span {
  padding: 6px 9px;
  border-radius: 9px;
  background: rgba(18, 28, 21, .76);
  color: var(--muted);
  font-size: .54rem;
}
.map-manager {
  margin: 16px 0 40px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.map-manager .section-heading { align-items: center; }
.map-manager-intro { max-width: 580px; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.size-badge {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--lime);
  font-size: .64rem;
}
.map-actions { display: flex; gap: 10px; margin: 22px 0; }
.map-actions .btn-primary { flex: 1; }
.map-packages { min-height: 100px; }
.map-package {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 13px;
  align-items: center;
  padding: 14px 6px;
  border-bottom: 1px solid var(--line);
}
.map-package:last-child { border: 0; }
.map-package-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(204, 233, 119, .1);
  color: var(--lime);
}
.map-package h3 { margin: 0 0 4px; font-family: Georgia, serif; font-size: 1rem; font-weight: 400; }
.map-package p { margin: 0; color: var(--muted); font-size: .64rem; }
.map-package-actions { display: flex; gap: 6px; }
.map-package-actions button {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: .62rem;
  cursor: pointer;
}
.map-package-actions button.active { border-color: var(--lime); color: var(--lime); }
.map-package-actions button.delete-map { color: var(--ember); }
.download-progress { margin: 16px 0; }
.download-progress > div { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.download-progress > div span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--lime); transition: width .2s ease; }
.download-progress small { display: block; margin-top: 8px; color: var(--muted); font-size: .62rem; }

@media (max-width: 620px) {
  .live-stats { grid-template-columns: repeat(2, 1fr); }
  .live-stats > div:nth-child(2) { border-right: 0; }
  .live-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .map-actions { flex-direction: column; }
  .map-actions .btn { width: 100%; }
  .map-manager { padding: 18px; }
  .map-package { grid-template-columns: 40px 1fr; }
  .map-package-actions { grid-column: 1 / -1; }
  .real-map-card { min-height: 430px; }
}
