*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #475569;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --green: #16a34a;
  --red: #dc2626;
  --orange: #d97706;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}



a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}

header h1 { font-size: 1.2rem; font-weight: 700; }
header h1 a { color: var(--text); }
header h1 a:hover { text-decoration: none; color: var(--accent); }

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-menu {
  position: relative;
}

.avatar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  background: none;
  padding: 0;
  transition: border-color 0.15s;
}
.avatar-btn:hover { border-color: var(--accent); }
.avatar-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-fallback {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
  z-index: 60;
}

.dropdown-header {
  padding: 0.625rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.dropdown-item {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.12s;
}
.dropdown-item:hover { background: var(--surface-hover); text-decoration: none; }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.welcome {
  text-align: center;
  padding: 5rem 1rem;
}

.welcome h2 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.welcome p { color: var(--text-muted); margin-bottom: 1.5rem; }

section { margin-bottom: 2.5rem; }

.desc-settings {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.desc-settings h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.25rem 0;
  user-select: none;
}

.toggle-row input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.toggle-row span {
  display: inline-flex;
  flex-direction: column;
  gap: 0.125rem;
}

.toggle-row small {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.challenges-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

section h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.btn-small { padding: 0.375rem 0.75rem; font-size: 0.8rem; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.challenge-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
  color: inherit;
  text-decoration: none;
}
.challenge-card:hover { 
  box-shadow: var(--shadow-hover); 
  text-decoration: none;
}

.challenge-card.joined {
  display: block;
  color: inherit;
  text-decoration: none;
  border-color: var(--accent);
  cursor: pointer;
  grid-column: 1 / -1;
}

.challenge-card.compact { padding: 0.5rem 0.75rem; }
.challenge-card.compact .challenge-header { margin-bottom: 0; justify-content: space-between; }
.challenge-card.compact .challenge-header h3 { font-size: 0.9rem; }
.challenge-card.compact p { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.125rem; }

.challenge-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.challenge-card:not(.compact) .challenge-header { justify-content: space-between; }

.challenge-header h3 { font-size: 1rem; font-weight: 600; }

.badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  background: #f1f5f9;
  color: var(--text-muted);
  font-weight: 600;
}

.progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.3s;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.challenge-hint {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: -0.25rem;
}

.desc-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}

.summit-list, .activity-list {
  list-style: none;
}

.summit-item, .activity-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  transition: background 0.15s;
}
.summit-item:hover, .activity-item:hover { background: #fafbfc; }

.region {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.date, .activity-date {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.activity-type {
  font-size: 0.75rem;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  background: #f1f5f9;
  color: var(--text-muted);
  font-weight: 600;
}

.activity-name { color: inherit; text-decoration: none; }
.activity-name:hover { text-decoration: underline; }

.summit-count { color: var(--green); font-size: 0.85rem; }

.summit-activity-link {
  font-size: 0.75rem;
  opacity: 0.5;
  transition: opacity 0.15s;
  margin-left: 0.25rem;
}
.summit-activity-link:hover { opacity: 1; }
.no-summits { color: var(--text-muted); font-size: 0.8rem; }
.analysing { color: var(--text-muted); font-size: 0.8rem; font-style: italic; }

.empty { color: var(--text-muted); text-align: center; padding: 1.5rem; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

.modal h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.modal > p { color: var(--text-muted); margin-bottom: 1rem; font-size: 0.9rem; }

.btn-block {
  width: 100%;
  justify-content: center;
  margin-bottom: 0.375rem;
}

.modal-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.modal-label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.375rem;
  color: var(--text);
}

.modal-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  transition: border-color 0.15s, background 0.15s;
}

.modal-option.active {
  border-color: var(--accent);
  background: #eff6ff;
}

.modal-option input { accent-color: var(--accent); }

.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.gpx-section .hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.gpx-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 0.8rem;
  padding: 0.75rem;
  resize: vertical;
  margin-bottom: 0.75rem;
}

.gpx-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.gpx-result {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.gpx-result h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.gpx-result > p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* Admin */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.admin-header h2 {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.admin-slug {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Menlo', monospace;
  margin-right: 0.5rem;
}
.admin-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.admin-actions {
  display: flex;
  gap: 0.375rem;
}
.admin-form.card {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.admin-form.card h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
}
.form-group {
  margin-bottom: 0.875rem;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-muted);
}
.form-group input[type="text"],
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  padding: 0.5rem 0.625rem;
  font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-group textarea { resize: vertical; }
.radio-group {
  display: flex;
  gap: 0.5rem;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.radio-label.active {
  border-color: var(--accent);
  background: #eff6ff;
}
.radio-label input { accent-color: var(--accent); }
.form-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}
.admin-section-mt {
  margin-top: 3rem;
}

.admin-card + .admin-card {
  margin-top: 0.75rem;
}

.error {
  color: var(--red);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.challenge-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.challenge-title-row h2 { flex: 1; }

.btn-icon-leave {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  border-radius: 6px;
  transition: background 0.15s, opacity 0.15s;
  opacity: 0.5;
  line-height: 1;
}
.btn-icon-leave:hover { background: var(--surface-hover); opacity: 1; }

.toggle-row-challenge small {
  font-style: italic;
}

.desc-preview {
  margin-top: 0.75rem;
  padding: 0.625rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.desc-preview h4 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.desc-preview-text {
  font-size: 0.8rem;
  color: var(--text);
  white-space: pre-wrap;
  font-family: inherit;
  margin: 0;
  line-height: 1.5;
}

.map-orient-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.25rem;
  pointer-events: auto;
  transition: all 0.15s;
  line-height: 1;
  width: 28px;
  height: 28px;
}
.map-orient-btn:hover { border-color: var(--accent); }

.popup-activity-link {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.peak-activity-link {
  font-size: 0.8rem;
  color: var(--accent);
  margin-left: 0.25rem;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.peak-item:hover .peak-activity-link { opacity: 1; }

.back-link {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.back-link:hover { color: var(--accent); text-decoration: none; }

.challenge-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
  align-items: center;
}

.filter-buttons {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.filter-input {
  flex: 1;
  min-width: 180px;
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.filter-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.filter-input::placeholder { color: #94a3b8; }

.peak-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.peak-section-header h2 {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.peak-list {
  list-style: none;
}

a.peak-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  transition: background 0.15s;
  color: inherit;
  text-decoration: none;
}
a.peak-item:hover { background: #fafbfc; text-decoration: none; color: inherit; }
.peak-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  transition: background 0.15s;
}
.peak-item:hover { background: #fafbfc; }
.peak-item.completed { opacity: 0.6; }
.peak-item.completed .peak-name { text-decoration: line-through; }

.peak-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.peak-name {
  font-weight: 500;
}

.peak-region {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.peak-elevation {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.peak-done { font-size: 0.85rem; }
.peak-todo { font-size: 0.85rem; }

.settings-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.setting-select {
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}
.setting-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.nav-link:hover { background: var(--surface-hover); text-decoration: none; color: var(--text); }

.map-container {
  position: relative;
  height: calc(100vh - 57px);
  width: 100%;
}

.map-element {
  width: 100%;
  height: 100%;
}

.map-info {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  pointer-events: none;
}

.map-overlay-select {
  position: relative;
  pointer-events: auto;
}

.map-select-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  font-family: inherit;
  padding: 0;
  white-space: nowrap;
}
.map-select-btn:hover { color: var(--accent); }
.map-select-btn:disabled { color: var(--text); cursor: default; }

.map-select-arrow {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1;
}

.map-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
  z-index: 60;
  display: none;
}
.map-select-menu-open { display: block; }

.map-select-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.map-select-option:hover { background: var(--surface-hover); }
.map-select-option.active { background: #eff6ff; color: var(--accent); font-weight: 600; }

.map-select-option-name { flex: 1; }

.map-select-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}
.map-select-option.active .map-select-count { color: var(--accent); }

.map-select-section {
  padding: 0.375rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.map-select-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

.map-peak-count {
  color: var(--text-muted);
  font-weight: 500;
}

.map-loading {
  color: var(--accent);
  font-weight: 500;
}

.map-3d-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: inherit;
  padding: 0.25rem 0.5rem;
  pointer-events: auto;
  transition: all 0.15s;
  line-height: 1;
  white-space: nowrap;
}
.map-3d-btn:hover { border-color: var(--accent); color: var(--accent); }
.map-3d-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.map-legend {
  position: absolute;
  bottom: 1.5rem;
  left: 0.75rem;
  z-index: 10;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  pointer-events: none;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.completed { background: #22c55e; }

.legend-dot.todo {
  background: #94a3b8;
  border: 1px solid #64748b;
}

.map-popup { font-size: 0.9rem; line-height: 1.5; }
.popup-elevation { color: var(--text-muted); font-size: 0.85rem; }
.popup-status { font-size: 0.8rem; font-weight: 600; }

.maplibregl-popup-content {
  border-radius: var(--radius) !important;
  padding: 0.75rem !important;
  box-shadow: var(--shadow-hover) !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.maplibregl-popup-close-button {
  font-size: 1.1rem !important;
  padding: 0.25rem 0.5rem !important;
  color: var(--text-muted) !important;
}

.challenge-map-section {
  margin-bottom: 1.5rem;
}

.challenge-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.challenge-map-container {
  width: 100%;
  height: 260px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}

.challenge-map-element {
  width: 100%;
  height: 100%;
}

.challenge-map-element .maplibregl-control-container {
  display: none;
}

.map-actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  box-shadow: var(--shadow);
  pointer-events: none;
}

.map-actions button {
  pointer-events: auto;
}

.popup-challenges {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  line-height: 1.5;
}
.popup-challenges a {
  font-weight: 600;
}
