/* ===== 지도 페이지 (6모드) ===== */

/* --- 헤더 --- */
.map-header {
  margin-bottom: 16px;
}

.map-title-row {
  margin-bottom: 8px;
}

.map-page-title {
  margin-bottom: 0 !important;
}

/* === 모드 선택 버튼 === */
.map-mode-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.mode-btn {
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.mode-btn:hover {
  background: var(--bg-hover);
  border-color: var(--gold-dim);
  color: var(--text-primary);
}

.mode-btn.active {
  background: linear-gradient(135deg, var(--navy), var(--navy-light, #1a2744));
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(212, 168, 67, 0.2);
}

/* --- 컨트롤 행 --- */
.map-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

/* 시대 선택 */
.era-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.era-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-right: 4px;
}

.era-btn {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.era-btn:hover {
  background: var(--bg-hover);
  border-color: var(--gold-dim);
  color: var(--text-primary);
}

.era-btn.active {
  background: var(--navy);
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 600;
}

/* 검색 */
.map-search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 320px;
}

.map-search {
  width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.map-search:focus {
  border-color: var(--gold-dim);
}

.map-search::placeholder {
  color: var(--text-muted);
}

.map-search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 1000;
}

.map-search-results.visible {
  display: block;
}

.search-result-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-result-item:hover {
  background: var(--bg-hover);
}

.search-result-name {
  color: var(--text-primary);
  font-size: 0.9rem;
}

.search-result-hanja {
  color: var(--gold-dim);
  font-size: 0.8rem;
}

.search-result-type {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: auto;
  padding: 2px 6px;
  background: var(--bg-card);
  border-radius: 3px;
}

.search-no-result {
  padding: 12px;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.85rem;
}

/* 필터 */
.map-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 4px;
  align-items: center;
}

.filter-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-right: 4px;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s;
}

.filter-label:hover {
  color: var(--text-primary);
}

.filter-label input[type="checkbox"] {
  accent-color: var(--gold);
  width: 14px;
  height: 14px;
}

.filter-resource {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
  transition: all 0.15s;
}

.filter-resource:has(input:checked) {
  border-color: var(--gold-dim);
  background: var(--navy);
  color: var(--gold);
}

/* --- 지도 + 패널 래퍼 --- */
.map-page-wrapper {
  position: relative;
  display: flex;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

/* Leaflet 지도 컨테이너 */
.map-leaflet {
  width: 100%;
  height: calc(100vh - 260px);
  min-height: 500px;
  max-height: 800px;
}

/* --- Leaflet 다크 테마 오버라이드 --- */
.leaflet-control-zoom a {
  background: var(--bg-secondary) !important;
  color: var(--gold) !important;
  border-color: var(--border) !important;
}

.leaflet-control-zoom a:hover {
  background: var(--bg-hover) !important;
}

.leaflet-control-attribution {
  background: rgba(10, 10, 15, 0.7) !important;
  color: var(--text-muted) !important;
  font-size: 10px !important;
}

.leaflet-control-attribution a {
  color: var(--gold-dim) !important;
}

/* 툴팁 */
.map-tooltip {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  padding: 3px 8px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
}

.map-tooltip-province {
  font-family: var(--font-serif) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--gold-light) !important;
  background: rgba(17, 17, 24, 0.9) !important;
  border-color: var(--gold-dim) !important;
}

/* 경제 모드 툴팁 */
.map-tooltip-economy {
  max-width: 250px !important;
}

/* 인물 모드 툴팁 */
.map-tooltip-characters {
  max-width: 280px !important;
}

/* 작위 모드 툴팁 */
.map-tooltip-official {
  font-weight: 600 !important;
  max-width: 220px !important;
}

.map-tooltip-official-province {
  font-family: var(--font-serif) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--gold-light) !important;
  background: rgba(17, 17, 24, 0.93) !important;
  border-color: var(--gold-dim) !important;
  padding: 5px 10px !important;
}

.leaflet-tooltip-top:before {
  border-top-color: var(--border) !important;
}

.leaflet-tooltip-bottom:before {
  border-bottom-color: var(--border) !important;
}

/* 마커 아이콘 */
.pass-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: none !important;
  border: none !important;
}

.terrain-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: none !important;
  border: none !important;
}

.terrain-mountain {
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
}

.terrain-river {
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
  color: #5599dd;
}

/* --- 범례 --- */
.map-legend {
  background: rgba(17, 17, 24, 0.92) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  color: var(--text-primary) !important;
  font-size: 11px;
  min-width: 140px;
  max-height: 350px;
  overflow-y: auto;
}

.legend-title {
  font-weight: 700;
  color: var(--gold);
  font-size: 12px;
  margin-bottom: 6px;
  font-family: var(--font-serif);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  color: var(--text-secondary);
}

.legend-color {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-marker {
  display: inline-block;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.legend-marker-lg {
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
}

.legend-marker-md {
  width: 10px;
  height: 10px;
}

.legend-marker-sm {
  width: 6px;
  height: 6px;
}

.legend-icon {
  font-size: 14px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.legend-divider {
  border-top: 1px solid var(--border);
  margin: 6px 0;
}

/* --- 상세 패널 --- */
.region-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 340px;
  height: 100%;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  padding: 0;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  z-index: 800;
}

.region-panel.open {
  transform: translateX(0);
}

.detail-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.detail-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--gold-dim);
}

.detail-header {
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--border);
}

.detail-name-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.detail-hanja {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--gold);
  font-weight: 700;
}

.detail-name {
  font-size: 1.1rem;
  color: var(--text-primary);
}

.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-type-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border: 1px solid;
  border-radius: 4px;
}

.detail-subtype {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 3px;
}

.detail-pinyin {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.detail-section {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.detail-section-title {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.detail-row-tags {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.detail-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.detail-value {
  font-size: 0.85rem;
  color: var(--text-primary);
  text-align: right;
}

.detail-link {
  cursor: pointer;
  color: var(--gold-dim) !important;
  text-decoration: underline;
  transition: color 0.15s;
}

.detail-link:hover {
  color: var(--gold) !important;
}

.detail-faction-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

/* 바 차트 */
.detail-bar-group {
  margin: 6px 0;
}

.detail-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.detail-bar-track {
  width: 100%;
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
}

.detail-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* 태그 */
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.detail-tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
}

.detail-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 시대별 세력 변화 */
.detail-era-timeline {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.era-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s;
}

.era-row-current {
  background: var(--bg-card);
}

.era-row-year {
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 50px;
  flex-shrink: 0;
}

.era-row-faction {
  font-size: 0.85rem;
}

/* === 인물 모드 상세 === */
.detail-char-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  border-radius: 4px;
  transition: background 0.15s;
}

.detail-char-item:hover {
  background: var(--bg-card);
}

.detail-char-name {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.detail-char-hanja {
  font-size: 0.75rem;
  color: var(--gold-dim);
  font-family: var(--font-serif);
}

.detail-char-stat {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 1px 6px;
  border-radius: 3px;
}

/* === 작위 모드 타임라인 === */
.official-timeline {
  position: relative;
  padding-left: 12px;
}

.official-timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.official-timeline-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  position: relative;
}

.official-timeline-current {
  background: rgba(212, 168, 67, 0.08);
  border-radius: 6px;
  padding: 6px 8px;
}

.official-timeline-year {
  font-size: 0.78rem;
  color: var(--text-muted);
  width: 42px;
  flex-shrink: 0;
  font-weight: 600;
}

.official-timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  z-index: 1;
  border: 2px solid var(--bg-secondary);
}

.official-timeline-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.official-timeline-title {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.official-timeline-holder {
  font-size: 0.88rem;
  font-weight: 600;
}

/* === 세력 영역 모드 === */

/* 세력 라벨 (지도 위 주 이름 + 세력명) */
.territory-label {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.territory-label-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  pointer-events: none;
}

.territory-label-province {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light, #e8d5a0);
  text-shadow: 0 0 6px rgba(0,0,0,0.9), 0 0 3px rgba(0,0,0,0.9), 1px 1px 2px rgba(0,0,0,0.8);
  white-space: nowrap;
}

.territory-label-faction {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary, #aaa);
  text-shadow: 0 0 4px rgba(0,0,0,0.9), 0 0 2px rgba(0,0,0,0.9);
  white-space: nowrap;
}

/* 세력 모드 — 군 라벨 */
.territory-cmd-label {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.territory-cmd-label-inner {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-secondary, #ccc);
  text-shadow: 0 0 4px rgba(0,0,0,0.95), 0 0 2px rgba(0,0,0,0.95);
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
}

/* 세력 모드 — 세력장 본거지 라벨 */
.territory-capital-label {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.territory-capital-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  border-bottom: 2px solid;
  padding-bottom: 2px;
}

.capital-flag {
  font-size: 16px;
  filter: drop-shadow(0 0 3px rgba(0,0,0,0.8));
}

.capital-name {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 0 6px rgba(0,0,0,0.95), 0 0 3px rgba(0,0,0,0.95), 1px 1px 2px rgba(0,0,0,0.9);
  white-space: nowrap;
}

.capital-title {
  font-size: 9px;
  color: var(--text-secondary, #aaa);
  text-shadow: 0 0 4px rgba(0,0,0,0.9);
  white-space: nowrap;
}

/* 세력 모드 툴팁 */
.map-tooltip-territory {
  font-size: 13px !important;
  font-weight: 600 !important;
  max-width: 250px !important;
}

/* 재생 버튼 */
.territory-play-btn {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.territory-play-btn:hover {
  background: var(--bg-hover);
  border-color: var(--gold-dim);
  color: var(--gold);
}

/* 범례 주 수 카운트 */
.legend-count {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 1px 5px;
  border-radius: 3px;
}

/* 폴리곤 트랜지션 (Leaflet SVG) */
.leaflet-interactive {
  transition: fill 0.5s ease, fill-opacity 0.3s ease, stroke 0.5s ease;
}

/* === 이민족(tribes) 모드 === */

/* 이민족 영역 폴리곤 */
.tribe-polygon {
  transition: fill-opacity 0.3s ease, stroke-width 0.2s ease;
}

/* 한족 경계 툴팁 */
.map-tooltip-han-border {
  font-size: 11px !important;
  opacity: 0.7 !important;
}

/* 이민족 라벨 */
.tribe-label-icon {
  background: none !important;
  border: none !important;
}

.tribe-label {
  text-align: center;
  padding: 3px 8px;
  background: rgba(10, 10, 15, 0.85);
  border: 1px solid;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  pointer-events: none;
}

.tribe-label-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 12px;
}

.tribe-label-leader {
  font-size: 9px;
  opacity: 0.7;
}

/* 전투 마커 */
.battle-marker-icon {
  background: none !important;
  border: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.battle-marker {
  font-size: 18px;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.9));
  cursor: pointer;
}

/* 전투 툴팁 */
.map-tooltip-battle {
  max-width: 250px !important;
  font-weight: 600 !important;
}

/* 이민족 툴팁 */
.map-tooltip-tribe {
  font-family: var(--font-serif) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  max-width: 250px !important;
}

/* === 이민족 상세 패널 === */

/* 시대별 상태 타임라인 */
.detail-tribe-timeline {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-tribe-era-item {
  display: flex;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 4px;
  transition: background 0.15s;
}

.detail-tribe-era-current {
  background: rgba(212, 168, 67, 0.08);
}

.detail-tribe-era-year {
  font-size: 0.78rem;
  color: var(--text-muted);
  width: 42px;
  flex-shrink: 0;
  font-weight: 600;
  padding-top: 2px;
}

.detail-tribe-era-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-tribe-era-status {
  font-size: 0.85rem;
}

.detail-tribe-era-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.detail-tribe-era-leader {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 지도자 */
.detail-tribe-leader-item {
  padding: 5px 8px;
  border-radius: 4px;
  transition: background 0.15s;
  margin-bottom: 4px;
}

.detail-tribe-leader-item:hover {
  background: var(--bg-card);
}

.detail-tribe-leader-name {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.detail-tribe-leader-info {
  display: flex;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.detail-tribe-leader-title {
  background: var(--bg-card);
  padding: 1px 6px;
  border-radius: 3px;
}

.detail-tribe-leader-period {
  color: var(--text-muted);
}

/* 관계 */
.detail-tribe-relation {
  padding: 4px 8px;
  margin-bottom: 6px;
}

.detail-tribe-relation-faction {
  font-size: 0.85rem;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.detail-tribe-relation-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: block;
}

/* 전투 */
.detail-tribe-battle {
  padding: 6px 8px;
  margin-bottom: 8px;
  border-left: 2px solid var(--border);
  padding-left: 12px;
}

.detail-tribe-battle-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 3px;
}

.detail-tribe-battle-year {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.detail-tribe-battle-name {
  font-size: 0.88rem;
  font-weight: 700;
}

.detail-tribe-battle-result {
  font-size: 0.8rem;
  color: var(--gold-dim);
  margin-bottom: 3px;
}

.detail-tribe-battle-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 사건 */
.detail-tribe-event {
  display: flex;
  gap: 8px;
  padding: 4px 8px;
  border-bottom: 1px solid var(--border);
}

.detail-tribe-event:last-child {
  border-bottom: none;
}

.detail-tribe-event-year {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
  width: 40px;
}

.detail-tribe-event-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- 모바일 반응형 --- */
@media (max-width: 768px) {
  .map-controls-row {
    flex-direction: column;
    align-items: stretch;
  }

  .map-search-wrap {
    max-width: none;
  }

  .era-group {
    flex-wrap: wrap;
  }

  .map-mode-row {
    gap: 4px;
  }

  .mode-btn {
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  .map-leaflet {
    height: calc(100vh - 320px);
    min-height: 350px;
  }

  /* 상세 패널 → 하단 시트 */
  .region-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60vh;
    max-height: 60vh;
    transform: translateY(100%);
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    z-index: 1100;
  }

  .region-panel.open {
    transform: translateY(0);
  }

  .region-panel::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    margin: 10px auto 0;
  }

  .map-legend {
    max-height: 200px !important;
    font-size: 10px !important;
    padding: 8px 10px !important;
    min-width: 120px !important;
  }

  .map-filters {
    gap: 8px;
  }

  .filter-label {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .era-btn {
    padding: 4px 10px;
    font-size: 0.8rem;
  }

  .mode-btn {
    padding: 5px 8px;
    font-size: 0.78rem;
  }

  .map-leaflet {
    height: calc(100vh - 360px);
    min-height: 280px;
  }
}
