/* Generated by build.js — DO NOT EDIT */

/* ===========================================
   Map Page Base — body, header, yellowbar
   =========================================== */

.station-map-page {
  font-family: Arial, sans-serif;
  background: #f0f2f5;
  margin: 0;
  padding: 0;
  background-color: #f0f2f5;
  min-height: 100vh;
  overflow-x: hidden;
  display: block !important;
  flex: none !important;
}

.station-map-page #app {
  min-height: auto;
  display: block;
}

.station-map-page header {
  background: linear-gradient(145deg, #1f3040, #2f4356) !important;
  color: white;
  padding: 20px 0 !important;
  height: 130px !important;
  text-align: center;
  margin-bottom: 8px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
}

.station-map-page .header-content {
  min-height: 100px;
}

.station-map-page .header-content > h1 {
  margin: 0;
  font-size: 2.5rem !important;
  letter-spacing: 1px !important;
  font-weight: normal !important;
  font-family: 'Noto Serif SC', serif;
  text-shadow:
    1px 1px 1px rgba(0,0,0,0.2),
    2px 2px 1px rgba(0,0,0,0.15),
    3px 3px 1px rgba(0,0,0,0.1),
    4px 4px 1px rgba(0,0,0,0.05);
  letter-spacing: 1px;
  color: #fff;
  text-transform: uppercase;
}

.station-map-page .yellowbar,
.station-map-page .main-content > .yellowbar {
  border-bottom: 3px solid rgba(47, 67, 86, 0.8) !important;
  margin: 10px 80px !important;
  position: relative;
  box-shadow:
    0 4px 6px rgba(47, 67, 86, 0.1),
    0 1px 3px rgba(47, 67, 86, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: linear-gradient(to right, rgba(47, 67, 86, 0.1), rgba(47, 67, 86, 0.3)) !important;
  height: 4px !important;
  animation: ybGlow 3s ease-in-out infinite alternate;
}

.station-map-page .yellowbar::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(47, 67, 86, 0.8), transparent);
  opacity: 0.8;
  animation: ybFlow 6s linear infinite;
}

@keyframes ybGlow {
  0% {
    box-shadow:
      0 4px 6px rgba(47, 67, 86, 0.1),
      0 1px 3px rgba(47, 67, 86, 0.08),
      inset 0 1px 1px rgba(255, 255, 255, 0.1);
  }
  100% {
    box-shadow:
      0 8px 12px rgba(47, 67, 86, 0.2),
      0 2px 6px rgba(47, 67, 86, 0.15),
      inset 0 2px 2px rgba(255, 255, 255, 0.15);
  }
}

@keyframes ybFlow {
  0% { background-position: -100% 0; }
  100% { background-position: 100% 0; }
}

@font-face {
  font-family: 'CustomCourierNew';
  src: url('../fonts/CourierNew.ttf') format('truetype');
}
@font-face {
  font-family: 'FangSongGB2312';
  src: url('../fonts/仿宋_GB2312.ttf') format('truetype');
}

.typewriter {
  text-align: center;
}

.typewriter h1 {
  overflow: hidden;
  white-space: nowrap;
  margin: 0 auto;
  margin-top: 10px;
  letter-spacing: 2px;
  font-size: 1.1rem !important;
  font-family: 'Courier New', 'CustomCourierNew', 'FangSongGB2312', Courier, monospace !important;
  min-height: 2rem;
  position: relative;
  text-shadow: none !important;
  text-transform: none !important;
  font-weight: normal !important;
}

.typewriter h1 {
  display: inline-block;
  position: relative;
  padding-right: 3px;
}

.typewriter-cursor {
  position: absolute;
  right: 0;
  width: 2px;
  height: 1.2rem;
  margin-top: 0.4px;
  background-color: #ffffff;
  animation: blink-caret 0.75s step-end infinite;
  display: inline-block;
}

@keyframes blink-caret {
  from, to { opacity: 0; }
  50% { opacity: 1; }
}

/* ===========================================
   Footer — shared footer styles
   =========================================== */

.station-detail-page footer {
  background: linear-gradient(145deg, #1f3040, #2f4356);
  color: white;
  padding: 20px 0;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  margin-top: 0;
}

@media (min-width: 769px) {
  .station-detail-page footer {
    flex-shrink: 0;
    padding: 10px 0;
    min-height: 50px;
  }
}

.station-detail-page .footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.station-detail-page .footer-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.station-detail-page .footer-content a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.station-detail-page .footer-content a:hover {
  color: #ff6f61;
}

.footer-telegram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
  vertical-align: middle;
  line-height: 1;
  gap: 5px;
}

.footer-telegram-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* 车站地图页面布局样式 */

/* 覆盖controls.css中的main-content样式 */
.station-map-page .main-content {
  display: block !important;
  flex: none !important;
  padding: 5px 12px;
  max-width: none !important;
  margin: 0 auto;
  width: 100%;
}

.map-layout {
  display: flex;
  gap: 6px;
  margin: 5px 0;
  height: calc(100vh - 220px);
  min-height: 600px;
  position: relative;
}

/* 地图容器样式 */
.map-container {
  flex: 5;
  position: relative;
  background-color: #f5f5f5;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  min-height: 500px; /* 确保最小高度 */
  border: 1px solid #ddd; /* 添加边框以便调试 */
  overflow: hidden; /* 防止内容溢出 */
}

#station-map {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 500px; /* 确保最小高度 */
  background-color: #e8f4f8; /* 添加背景色以便调试 */
  z-index: 1; /* 确保正确的层级 */
}

/* 加载状态 */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 2000;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #2f4356;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-overlay p {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

.panels-hidden .map-controls,
.panels-hidden .stats-panel {
  display: none;
}

.show-panels-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.show-panels-btn:hover {
  background: #f0f0f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
} 
/* 控制面板样式 */

/* 控制面板样式 */
.map-controls {
  width: 170px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-height: 100%;
  min-height: 400px; /* 添加最小高度确保有足够空间 */
  overflow-y: auto;
  
  /* 自定义滚动条样式 */
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(39, 81, 160, 0.3) transparent; /* Firefox */
}

/* Webkit浏览器的自定义滚动条样式 */
.map-controls::-webkit-scrollbar {
  width: 8px;
}

.map-controls::-webkit-scrollbar-track {
  background: rgba(248, 249, 250, 0.5);
  border-radius: 4px;
  margin: 4px 0;
}

.map-controls::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(39, 81, 160, 0.6), rgba(39, 81, 160, 0.4));
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.map-controls::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(39, 81, 160, 0.8), rgba(39, 81, 160, 0.6));
  transform: scaleX(1.1);
}

.map-controls::-webkit-scrollbar-thumb:active {
  background: linear-gradient(135deg, rgba(39, 81, 160, 1), rgba(39, 81, 160, 0.8));
}

.map-controls::-webkit-scrollbar-corner {
  background: transparent;
}

.control-group {
  margin-bottom: 20px; /* 从15px增加到20px */
}

.control-group:last-child {
  margin-bottom: 0;
}

.control-label {
  font-weight: bold;
  margin-bottom: 8px;
  color: #2d3748;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.control-label::before {
  content: '';
  width: 4px;
  height: 4px;
  background: #2f4356;
  border-radius: 50%;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 200px; /* 从150px增加到200px */
  overflow-y: auto;
  
  /* 筛选按钮区域滚动条样式 */
  scrollbar-width: thin;
  scrollbar-color: rgba(39, 81, 160, 0.3) transparent;
  user-select: none; /* 防止文本被选中 */
  -webkit-user-select: none; /* Safari支持 */
  -moz-user-select: none; /* Firefox支持 */
  -ms-user-select: none; /* IE支持 */
}

.filter-buttons::-webkit-scrollbar {
  width: 6px;
}

.filter-buttons::-webkit-scrollbar-track {
  background: rgba(248, 249, 250, 0.3);
  border-radius: 3px;
  margin: 2px 0;
}

.filter-buttons::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(39, 81, 160, 0.5), rgba(39, 81, 160, 0.3));
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.filter-buttons::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(39, 81, 160, 0.7), rgba(39, 81, 160, 0.5));
}

.filter-buttons::-webkit-scrollbar-corner {
  background: transparent;
}

.filter-btn {
  padding: 8px 14px; /* 从6px 12px增加到8px 14px */
  border: 1px solid #ddd;
  background: white;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  color: #666;
  box-sizing: border-box; /* 确保padding和border包含在尺寸内 */
  flex-shrink: 0; /* 防止按钮被压缩 */
}

.filter-btn:hover {
  background: #f0f0f0;
  border-color: #ccc;
}

.filter-btn.active {
  background: #2f4356;
  color: white;
  border-color: #999;
  /* 确保激活状态不会改变按钮尺寸 */
  box-sizing: border-box;
}

/* 归属筛选按钮特殊样式 */
.affiliation-btn {
  padding: 8px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px; /* 添加最大宽度限制 */
  max-height: 36px; /* 添加最大高度限制 */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-sizing: border-box; /* 确保padding和border包含在尺寸内 */
}

/* 归属筛选按钮容器特殊高度 */
#affiliation-filters {
  max-height: 400px; /* 为归属筛选设置更大的高度 */
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start; /* 确保按钮从顶部对齐 */
  justify-content: flex-start; /* 确保按钮从左侧开始排列 */
  align-content: flex-start;
  padding: 2px 0;
  
  /* 归属筛选滚动条样式 */
  scrollbar-width: thin;
  scrollbar-color: rgba(39, 81, 160, 0.3) transparent;
}

#affiliation-filters::-webkit-scrollbar {
  width: 6px;
}

#affiliation-filters::-webkit-scrollbar-track {
  background: rgba(248, 249, 250, 0.3);
  border-radius: 3px;
  margin: 2px 0;
}

#affiliation-filters::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(39, 81, 160, 0.5), rgba(39, 81, 160, 0.3));
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

#affiliation-filters::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(39, 81, 160, 0.7), rgba(39, 81, 160, 0.5));
}

#affiliation-filters::-webkit-scrollbar-corner {
  background: transparent;
}

.affiliation-btn .affiliation-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.affiliation-btn .affiliation-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* 活跃状态的归属按钮 */
.affiliation-btn.active {
  background: white;
  color: #2f4356;
  border-color: #2f4356;
  border-width: 2px;
  /* 移除box-shadow，使用outline避免影响布局 */
  /* box-shadow: 0 0 0 2px rgba(39, 81, 160, 0.2); */
  /* 确保激活状态不会改变按钮尺寸 */
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  box-sizing: border-box;
  /* 使用outline代替box-shadow，避免影响布局 */
  outline: 2px solid rgba(39, 81, 160, 0.2);
  outline-offset: -2px;
}

.affiliation-btn.active .affiliation-icon img {
  filter: none; /* 移除之前的白色滤镜 */
}

.search-box {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
  background: white;
}

.search-box:focus {
  border-color: #2f4356;
}

/* 国家筛选按钮容器优化 */
#nation-filters {
  max-height: 180px; /* 为国家筛选设置合适的高度 */
  overflow-y: auto;
  
  /* 国家筛选滚动条样式 */
  scrollbar-width: thin;
  scrollbar-color: rgba(39, 81, 160, 0.3) transparent;
}

#nation-filters::-webkit-scrollbar {
  width: 6px;
}

#nation-filters::-webkit-scrollbar-track {
  background: rgba(248, 249, 250, 0.3);
  border-radius: 3px;
  margin: 2px 0;
}

#nation-filters::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(39, 81, 160, 0.5), rgba(39, 81, 160, 0.3));
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

#nation-filters::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(39, 81, 160, 0.7), rgba(39, 81, 160, 0.5));
}

#nation-filters::-webkit-scrollbar-corner {
  background: transparent;
}

.filter-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  outline: none;
  background: white;
  font-family: inherit;
  color: #333;
  transition: border-color 0.2s ease;
}

.filter-select:focus {
  border-color: #2f4356;
}

.line-search-wrap {
  position: relative;
}

.line-sug-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 1000;
  margin-top: 2px;
}

.line-sug-item {
  padding: 8px 12px;
  font-size: 0.85rem;
  color: #333;
  cursor: pointer;
  transition: background 0.15s;
}

.line-sug-item:hover {
  background: #f0f4f8;
  color: #2f4356;
}

.line-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.line-selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(47,67,86,0.08);
  border-radius: 4px;
  font-size: 0.78rem;
  color: #2f4356;
}

.line-tag-remove {
  background: none;
  border: none;
  color: #999;
  font-size: 1rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.line-tag-remove:hover {
  color: #c0392b;
} 
/* 统计面板样式 */

.stats-panel {
  width: 150px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  
  /* 自定义滚动条样式 */
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(39, 81, 160, 0.3) transparent; /* Firefox */
}

/* Webkit浏览器的自定义滚动条样式 */
.stats-panel::-webkit-scrollbar {
  width: 8px;
}

.stats-panel::-webkit-scrollbar-track {
  background: rgba(248, 249, 250, 0.5);
  border-radius: 4px;
  margin: 4px 0;
}

.stats-panel::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(39, 81, 160, 0.6), rgba(39, 81, 160, 0.4));
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.stats-panel::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(39, 81, 160, 0.8), rgba(39, 81, 160, 0.6));
  transform: scaleX(1.1);
}

.stats-panel::-webkit-scrollbar-thumb:active {
  background: linear-gradient(135deg, rgba(39, 81, 160, 1), rgba(39, 81, 160, 0.8));
}

.stats-panel::-webkit-scrollbar-corner {
  background: transparent;
}

/* 返回按钮样式 */
.back-button {
  padding: 10px 16px;
  background: #2f4356;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #ffffff;
  text-decoration: none;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  user-select: none; /* 防止文本被选中 */
  -webkit-user-select: none; /* Safari支持 */
  -moz-user-select: none; /* Firefox支持 */
  -ms-user-select: none; /* IE支持 */
}

.back-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background: #1e3f7a;
}

/* 统计信息容器 */
.stats-container {
  background: rgba(248, 249, 250, 0.8);
  border-radius: 6px;
  border: 1px solid #e9ecef;
  padding: 12px;
  margin-bottom: 15px;
}

.stats-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.stat-item:last-child {
  margin-bottom: 0;
}

.stat-label {
  color: #666;
  font-weight: 500;
}

.stat-value {
  font-weight: bold;
  color: #2f4356;
  background: rgba(26, 115, 232, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.85rem;
}

/* 坐标精度提示 */
.coordinate-notice {
  margin-top: auto;
  padding: 10px;
  background: rgba(255, 248, 220, 0.8);
  border: 1px solid #ffeaa7;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #856404;
  text-align: center;
  line-height: 1.4;
}

.coordinate-notice p {
  margin: 0;
  font-style: italic;
} 
/* 弹出窗口样式 */
.station-marker {
  background: #2f4356;
  border: 2px solid white;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}
.station-marker:hover {
  transform: scale(1.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.station-marker.highlighted {
  background: #ff6f61;
  transform: scale(1.4);
  box-shadow: 0 6px 16px rgba(255, 111, 97, 0.6);
}

.station-popup {
  font-family: 'Noto Serif SC', serif;
  padding: 0;
  text-align: left;
  min-width:0;
}

.leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  min-width: 200px;
  max-width: 280px !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0 !important;
  font-size: 0.85rem;
  line-height: 1.5;
}

.leaflet-popup-tip-container { margin-top: -1px; }
.leaflet-popup-tip { box-shadow: none; }

.leaflet-popup-close-button {
  top: 6px !important;
  right: 8px !important;
  color: rgba(255,255,255,0.8) !important;
  font-size: 16px !important;
}
.leaflet-popup-close-button:hover { color: #fff !important; }

.station-popup h3 {
  margin: 0;
  padding: 10px 28px 8px 12px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  background: linear-gradient(135deg, #2f4356, #2f4356);
  text-align: left;
  word-break: break-word;
}

.station-popup .popup-body {
  padding: 10px 12px 6px;
}

.station-popup .remark-line {
  margin: 0 0 8px;
  font-size: 0.75rem;
  color: #888;
  font-style: italic;
  line-height: 1.3;
}

.station-popup .aff-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 8px;
}

.station-popup .aff-row img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.station-popup .aff-row img:hover {
  transform: scale(1.2);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.station-popup .aff-row .aff-text {
  font-size: 0.72rem;
  color: #666;
}

.station-popup .location {
  display: inline-block;
  font-size: 0.7rem;
  color: #999;
  background: #f0f2f5;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 2px;
}

.station-popup .popup-buttons {
  display: flex;
  gap: 0;
  margin: 0;
  border-top: 1px solid #eee;
}

.station-popup .view-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 9px 12px;
  background: #fff;
  color: #2f4356;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
  text-align: center;
  border: none;
  cursor: pointer;
}
.station-popup .view-btn:hover {
  background: #e8f0fe;
  color: #1557b0;
}

.aff-modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.aff-modal-overlay img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.aff-modal-close {
  position: absolute;
  top: 20px; right: 30px;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  z-index: 10001;
  line-height: 1;
}

/* 工具栏样式 */

/* 地图工具栏样式 */
.map-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: rgba(248, 249, 250, 0.8);
  border-radius: 6px;
  border: 1px solid #e9ecef;
  max-height: 200px;
  overflow-y: auto;
  
  /* 工具栏滚动条样式 */
  scrollbar-width: thin;
  scrollbar-color: rgba(39, 81, 160, 0.3) transparent;
  user-select: none; /* 防止文本被选中 */
  -webkit-user-select: none; /* Safari支持 */
  -moz-user-select: none; /* Firefox支持 */
  -ms-user-select: none; /* IE支持 */
}

.map-toolbar::-webkit-scrollbar {
  width: 6px;
}

.map-toolbar::-webkit-scrollbar-track {
  background: rgba(248, 249, 250, 0.3);
  border-radius: 3px;
  margin: 2px 0;
}

.map-toolbar::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(39, 81, 160, 0.5), rgba(39, 81, 160, 0.3));
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.map-toolbar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(39, 81, 160, 0.7), rgba(39, 81, 160, 0.5));
}

.map-toolbar::-webkit-scrollbar-corner {
  background: transparent;
}

.toolbar-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  color: #666;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.toolbar-btn:hover {
  background: rgba(26, 115, 232, 0.1);
  border-color: #2f4356;
  color: #2f4356;
}

.toolbar-btn.active {
  background: #2f4356;
  color: white;
  border-color: #2f4356;
}

/* 地图切换器样式 */
.map-switcher {
  margin-bottom: 15px;
}

.switcher-label {
  font-weight: bold;
  margin-bottom: 8px;
  color: #2d3748;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.switcher-label::before {
  content: '';
  width: 4px;
  height: 4px;
  background: #2f4356;
  border-radius: 50%;
}

.switcher-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.switcher-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  color: #666;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  user-select: none; /* 防止文本被选中 */
  -webkit-user-select: none; /* Safari支持 */
  -moz-user-select: none; /* Firefox支持 */
  -ms-user-select: none; /* IE支持 */
}

.switcher-btn:hover {
  background: #f8f9fa;
  border-color: #2f4356;
  color: #2f4356;
}

.switcher-btn.active {
  background: #2f4356;
  color: white;
  border-color: #2f4356;
}

.switcher-btn .map-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.switcher-btn.active .map-icon {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
}

.switcher-btn span {
  font-size: 1rem;
} 
/* 全屏模式样式 */

/* 地图全屏样式 */
.map-container.fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: none !important;
  background: #000 !important;
}

.map-container.fullscreen #station-map {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  background-color: #000 !important;
}

/* 全屏时的控制面板隐藏 */
.map-container.fullscreen ~ .map-controls,
.map-container.fullscreen ~ .stats-panel {
  display: none !important;
}

/* 全屏时的工具栏 */
.map-container.fullscreen .map-toolbar {
  position: absolute !important;
  top: 20px !important;
  right: 20px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
  z-index: 10000 !important;
  backdrop-filter: blur(10px) !important;
}

/* 全屏时的加载覆盖层 */
.map-container.fullscreen .loading-overlay {
  background: rgba(0, 0, 0, 0.8) !important;
  color: white !important;
}

/* 全屏时的工具栏按钮 */
.map-container.fullscreen .toolbar-btn {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  color: #333 !important;
}

.map-container.fullscreen .toolbar-btn:hover {
  background: rgba(255, 255, 255, 1) !important;
  transform: translateY(-1px) !important;
}

/* 全屏时的全屏按钮特殊样式 */
.map-container.fullscreen .toolbar-btn#fullscreen-btn {
  background: rgba(220, 53, 69, 0.9) !important;
  color: white !important;
}

.map-container.fullscreen .toolbar-btn#fullscreen-btn:hover {
  background: rgba(220, 53, 69, 1) !important;
}

/* 移动端全屏特殊处理 */
@media (max-width: 768px) {
  .map-container.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
  }
  
  /* 防止移动端全屏时页面滚动 */
  .map-container.fullscreen ~ * {
    display: none !important;
  }
  
  /* 移动端全屏时隐藏其他元素 */
  .map-container.fullscreen ~ .map-controls,
  .map-container.fullscreen ~ .stats-panel,
  .map-container.fullscreen ~ .main-content > *:not(.map-container) {
    display: none !important;
  }
  
  .map-container.fullscreen .map-toolbar {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    padding: 8px !important;
    gap: 6px !important;
    flex-direction: row !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
  }
  
  .map-container.fullscreen .toolbar-btn {
    padding: 6px 10px !important;
    font-size: 0.75rem !important;
    min-width: auto !important;
  }
  
  .map-container.fullscreen .toolbar-btn span {
    font-size: 0.9rem !important;
  }
  
  /* 移动端全屏时的地图控件优化 */
  .map-container.fullscreen .leaflet-control-zoom {
    top: 10px !important;
    left: 10px !important;
  }
  
  .map-container.fullscreen .leaflet-control-attribution {
    bottom: 5px !important;
    right: 5px !important;
    font-size: 0.7rem !important;
  }
}

/* 横屏模式下的全屏优化 */
@media (max-width: 768px) and (orientation: landscape) {
  .map-container.fullscreen .map-toolbar {
    top: 5px !important;
    right: 5px !important;
    padding: 6px !important;
    gap: 4px !important;
  }
  
  .map-container.fullscreen .toolbar-btn {
    padding: 4px 8px !important;
    font-size: 0.7rem !important;
  }
  
  /* 横屏时隐藏工具栏文字，只显示图标 */
  .map-container.fullscreen .toolbar-btn span:not(:first-child) {
    display: none !important;
  }
  
  .map-container.fullscreen .toolbar-btn {
    min-width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
} 
/* 响应式设计样式 */

/* 桌面端布局 (1068px以上) */
@media (min-width: 1068px) {
  .map-layout {
    display: flex;
    flex-direction: row;
    height: calc(100vh - 200px);
    gap: 20px;
    min-height: 600px;
  }

  .map-controls {
    width: 200px;
    order: 1;
    flex-shrink: 0;
  }

  .map-container {
    order: 2;
    flex: 1;
    height: 100%;
    position: relative;
  }

  .stats-panel {
    width: 180px;
    order: 3;
    flex-shrink: 0;
  }

  #station-map {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    z-index: 1;
  }
}

/* 移动端布局 (768px以下) — 侧边栏样式 */
@media (max-width: 767px) {
  /* --- Header 缩小 --- */
  .station-map-page header {
    height: 100px !important;
    padding: 12px 0 !important;
  }

  .station-map-page .header-content {
    min-height: auto;
  }

  .station-map-page .header-content > h1 {
    font-size: 1.8rem !important;
    letter-spacing: 0.5px !important;
  }

  .typewriter h1 {
    font-size: 1rem !important;
  }

  /* --- 地图右上角浮动按钮组 --- */
  .mobile-fab-group {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1500;
    display: flex;
    gap: 6px;
    transition: opacity 0.2s ease;
  }

  .fab-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2f4356;
  }

  .fab-btn:active {
    transform: scale(0.92);
  }

  /* --- 地图容器 --- */
  .map-layout {
    position: relative;
    height: calc(100vh - 215px);
    min-height: 400px;
    gap: 0;
  }

  .panel-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1999;
  }

  .panel-close-btn {
    display: block;
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
  }

  .panel-close-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #333;
  }

  /* --- 侧边栏面板 --- */
  .map-controls {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    max-width: 85vw;
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border-radius: 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    padding: 16px;
    padding-top: 40px;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(39, 81, 160, 0.3) transparent;
  }

  .map-controls.open {
    transform: translateX(0);
  }

  .stats-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 280px;
    max-width: 85vw;
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-radius: 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    padding: 16px;
    padding-top: 40px;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(39, 81, 160, 0.3) transparent;
  }

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

  /* 移动端隐藏 back-button */
  .stats-panel .back-button {
    display: none;
  }

  .show-panels-btn {
    display: none;
  }

  /* 归属筛选区域放大 */
  .map-controls #affiliation-filters {
    max-height: none;
  }

  .map-container {
    width: 100%;
    height: 100%;
    min-height: auto;
    flex: none;
  }

  #station-map {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: auto;
    z-index: 1;
  }

  .panels-hidden .map-controls,
  .panels-hidden .stats-panel {
    display: block !important;
  }

  #darkToggle {
    display: none !important;
  }
}

/* 移动端以外的样式重置 */
@media (min-width: 768px) {
  .mobile-fab-group,
  .panel-toggle-btn,
  .panel-close-btn,
  .panel-backdrop {
    display: none !important;
  }
}

/* 小屏幕移动端 (480px以下) */
@media (max-width: 479px) {
  .main-content {
    padding: 10px;
  }

  .station-map-page header {
    height: 85px !important;
    padding: 8px 0 !important;
  }

  .station-map-page .header-content > h1 {
    font-size: 1.5rem !important;
  }

  .typewriter h1 {
    font-size: 0.85rem !important;
  }

  .map-layout {
    height: calc(100vh - 195px);
  }

  .map-layout .panel-toggle-btn {
    width: 32px;
    height: 32px;
    top: 8px;
    font-size: 1rem;
  }

  .filter-buttons {
    gap: 6px;
  }

  .filter-btn {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  .map-toolbar {
    bottom: 10px;
    padding: 6px 12px;
    border-radius: 20px;
  }

  .toolbar-btn {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  /* --- popup 优化 --- */
  .leaflet-popup-content-wrapper {
    max-width: 260px !important;
    min-width: 200px;
    border-radius: 10px;
  }

  .leaflet-popup-close-button {
    top: 4px !important;
    right: 6px !important;
    font-size: 20px !important;
    width: 28px !important;
    height: 28px !important;
    color: rgba(255,255,255,0.9) !important;
  }

  .station-popup {
    max-width: none;
  }

  .station-popup h3 {
    font-size: 0.9rem;
    padding: 10px 32px 8px 12px;
  }

  .station-popup .popup-body {
    padding: 10px 12px 6px;
  }

  .station-popup .remark-line {
    font-size: 0.8rem;
    margin-bottom: 8px;
  }

  .station-popup .aff-row {
    gap: 4px;
    margin-bottom: 8px;
  }

  .station-popup .aff-row img {
    width: 22px;
    height: 22px;
  }

  .station-popup .aff-row .aff-text {
    font-size: 0.78rem;
  }

  .station-popup .location {
    font-size: 0.75rem;
    padding: 3px 8px;
  }

  .station-popup .view-btn {
    padding: 10px 16px;
    font-size: 0.82rem;
    min-width: 60px;
  }

  .station-popup .popup-buttons {
    margin-top: 6px;
    border-top: 1px solid #eee;
  }
}

/* 工具类样式 */

/* 确保Leaflet缩放控件正常工作 */
.leaflet-control-zoom {
  pointer-events: auto !important;
  z-index: 1000 !important;
}

.leaflet-control-zoom a {
  pointer-events: auto !important;
  cursor: pointer !important;
  user-select: none !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
  pointer-events: auto !important;
  cursor: pointer !important;
  user-select: none !important;
}

/* 确保缩放控件按钮可以正常点击 */
.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover {
  background-color: #f4f4f4 !important;
}

.leaflet-control-zoom-in:active,
.leaflet-control-zoom-out:active {
  background-color: #e6e6e6 !important;
}

/* 被屏蔽的链接样式 */
a[data-disabled="true"] {
  pointer-events: none !important;
  cursor: default !important;
  text-decoration: none !important;
  color: inherit !important;
  opacity: 0.7 !important;
  position: relative;
}

/* 被保护的链接样式 */
a[data-protected="true"] {
  pointer-events: auto !important;
  cursor: pointer !important;
  text-decoration: none !important;
  opacity: 1 !important;
  position: relative;
}

/* 调试模式：显示被屏蔽的链接 */
a[data-disabled="true"]::after {
  content: '🔒';
  position: absolute;
  top: -2px;
  right: -2px;
  font-size: 8px;
  color: #ff0000;
  background: white;
  border-radius: 50%;
  width: 8px;
  height: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* 调试模式：显示被保护的链接 */
a[data-protected="true"]::after {
  content: '✅';
  position: absolute;
  top: -2px;
  right: -2px;
  font-size: 8px;
  color: #00ff00;
  background: white;
  border-radius: 50%;
  width: 8px;
  height: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* 确保弹出窗口中的链接不受影响 */
.leaflet-popup-content-wrapper a,
.station-popup a,
.popup-buttons a,
.view-btn {
  pointer-events: auto !important;
  cursor: pointer !important;
  text-decoration: none !important;
  opacity: 1 !important;
}

.leaflet-popup-content-wrapper a::after,
.station-popup a::after,
.popup-buttons a::after,
.view-btn::after {
  display: none !important;
}

/* 确保Leaflet控件中的链接正常工作 */
.leaflet-control a {
  pointer-events: auto !important;
  cursor: pointer !important;
}

.leaflet-control a::after {
  display: none !important;
}

/* 专门屏蔽版权信息控件中的链接 */
.leaflet-control-attribution a {
  pointer-events: none !important;
  cursor: default !important;
  text-decoration: none !important;
  color: inherit !important;
  opacity: 0.7 !important;
}

.leaflet-control-attribution a::after {
  content: '🔒';
  position: absolute;
  top: -2px;
  right: -2px;
  font-size: 8px;
  color: #ff0000;
  background: white;
  border-radius: 50%;
  width: 8px;
  height: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* 完全隐藏版权信息控件 */
.leaflet-control-attribution {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* 确保缩放控件正常工作 */
.leaflet-control-zoom a {
  pointer-events: auto !important;
  cursor: pointer !important;
}

.leaflet-control-zoom a::after {
  display: none !important;
}

/* 确保自定义控件中的链接正常工作 */
.map-toolbar a,
.stats-panel a,
.map-controls a,
.back-button,
.switcher-btn,
.filter-btn,
.toolbar-btn {
  pointer-events: auto !important;
  cursor: pointer !important;
}

.map-toolbar a::after,
.stats-panel a::after,
.map-controls a::after,
.back-button::after,
.switcher-btn::after,
.filter-btn::after,
.toolbar-btn::after {
  display: none !important;
}

/* 防止地图缩放控件的"+"和"-"号被选中和复制 */
.leaflet-control-zoom {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

.leaflet-control-zoom a {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  -khtml-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  -khtml-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

/* 防止缩放控件内的文本被选中 */
.leaflet-control-zoom-in::before,
.leaflet-control-zoom-out::before {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* 确保地图容器本身也不可选中 */
#station-map {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* 全屏模式下也保持不可选中 */
.map-container.fullscreen #station-map {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

.map-container.fullscreen .leaflet-control-zoom {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent !important;
} 
/* ===========================================
   Dark Mode — overrides via html[data-theme="dark"]
   =========================================== */

/* --- Body & global backgrounds --- */
html[data-theme="dark"] html,
html[data-theme="dark"] body,
html[data-theme="dark"] body::before {
  background: #1a1d21 !important;
}
html[data-theme="dark"] .station-map-page {
  background: #1a1d21;
}
html[data-theme="dark"] .station-detail-page {
  background: #1a1d21;
}

/* --- Header & Footer --- */
html[data-theme="dark"] .station-map-page header,
html[data-theme="dark"] .station-detail-page header {
  background: #111418 !important;
}
html[data-theme="dark"] footer {
  background: #111418;
  color: #889;
}
html[data-theme="dark"] .station-map-page footer,
html[data-theme="dark"] .station-detail-page footer {
  background: #111418 !important;
}

/* --- Main content areas --- */
html[data-theme="dark"] .main-content {
  color: #d0d4da;
}

/* --- Panels & cards --- */
html[data-theme="dark"] .map-controls,
html[data-theme="dark"] .stats-panel,
html[data-theme="dark"] .detail-layout,
html[data-theme="dark"] .station-info,
html[data-theme="dark"] .mdx-content-container,
html[data-theme="dark"] .disclaimer-box,
html[data-theme="dark"] .station-map-container {
  background: #22262b !important;
  border-color: #333840 !important;
  color: #d0d4da;
}

/* --- Panel text --- */
html[data-theme="dark"] .control-label,
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .info-label,
html[data-theme="dark"] .switcher-label {
  color: #a0a8b4;
}
html[data-theme="dark"] .stat-value {
  background: rgba(47, 67, 86, 0.3) !important;
  color: #7ba4cc !important;
}

/* --- Inputs & buttons --- */
html[data-theme="dark"] .search-box,
html[data-theme="dark"] .filter-select,
html[data-theme="dark"] .filter-btn,
html[data-theme="dark"] .switcher-btn,
html[data-theme="dark"] .toolbar-btn,
html[data-theme="dark"] .show-panels-btn,
html[data-theme="dark"] .panel-toggle-btn {
  background: #2a2f36;
  border-color: #444a52;
  color: #c0c6ce;
}
html[data-theme="dark"] .filter-btn:hover,
html[data-theme="dark"] .switcher-btn:hover,
html[data-theme="dark"] .toolbar-btn:hover,
html[data-theme="dark"] .panel-toggle-btn:hover {
  background: #353b44;
}
html[data-theme="dark"] .filter-btn.active,
html[data-theme="dark"] .switcher-btn.active,
html[data-theme="dark"] .toolbar-btn.active {
  background: #2f4356;
  color: #fff;
  border-color: #2f4356;
}
html[data-theme="dark"] .line-sug-dropdown {
  background: #22262b;
  border-color: #333840;
}
html[data-theme="dark"] .line-sug-item {
  color: #c0c6ce;
}
html[data-theme="dark"] .line-sug-item:hover {
  background: #2a2f36;
  color: #7ba4cc;
}
html[data-theme="dark"] .line-selected-tag {
  background: rgba(47,67,86,0.2);
  color: #7ba4cc;
}
html[data-theme="dark"] .line-tag-remove {
  color: #666;
}
html[data-theme="dark"] .line-tag-remove:hover {
  color: #e06c75;
}
html[data-theme="dark"] .back-button {
  background: #2f4356 !important;
  color: #fff !important;
}

html[data-theme="dark"] .panel-close-btn {
  color: #888;
}
html[data-theme="dark"] .panel-close-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #ccc;
}

html[data-theme="dark"] .fab-btn {
  background: #353b44;
  color: #c0c6ce;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

html[data-theme="dark"] .fab-btn:active {
  transform: scale(0.92);
}

/* --- Stats container --- */
html[data-theme="dark"] .stats-container {
  background: rgba(255,255,255,0.05);
  border-color: #333840;
}

/* --- Toolbar --- */
html[data-theme="dark"] .map-toolbar {
  background: rgba(255,255,255,0.04);
  border-color: #333840;
}

/* --- Coordinate notice --- */
html[data-theme="dark"] .coordinate-notice {
  background: rgba(255,248,220,0.1);
  color: #a09050;
  border-color: #554820;
}

/* --- Popup --- */
html[data-theme="dark"] .leaflet-popup-content-wrapper {
  background: #22262b;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
html[data-theme="dark"] .leaflet-popup-tip {
  background: #22262b;
}
html[data-theme="dark"] .station-popup .popup-body {
  color: #c0c6ce;
}
html[data-theme="dark"] .station-popup p {
  color: #a0a8b4;
}
html[data-theme="dark"] .station-popup .location {
  background: #333840;
  color: #889;
}
html[data-theme="dark"] .station-popup .view-btn {
  background: #2a2f36;
  color: #7ba4cc;
  border-color: #333840;
}
html[data-theme="dark"] .station-popup .view-btn:hover {
  background: #353b44;
}
html[data-theme="dark"] .station-popup .popup-buttons {
  border-color: #333840;
}

html[data-theme="dark"] .aff-row img,
html[data-theme="dark"] .affiliation-btn .affiliation-icon img,
html[data-theme="dark"] .affiliation-icon {
  filter: drop-shadow(0 0 1px rgba(255,255,255,0.7));
}
html[data-theme="dark"] .info-value.affiliation .affiliation-icon {
  filter: drop-shadow(0 0 1px rgba(255,255,255,0.7));
}
html[data-theme="dark"] .aff-row .aff-text {
  color: #889;
}

/* --- Detail page specific --- */
html[data-theme="dark"] .station-header h2 {
  color: #d0d4da;
  text-shadow: none;
}
html[data-theme="dark"] .station-header .remark {
  color: #889;
}
html[data-theme="dark"] .station-detail-content,
html[data-theme="dark"] .info-grid {
  color: #c0c6ce;
}
html[data-theme="dark"] .info-value {
  color: #d0d4da;
}
html[data-theme="dark"] .info-value.coordinates {
  background: #2a2f36;
  color: #c0c6ce;
}
html[data-theme="dark"] .mdx-content {
  color: #c0c6ce;
}
html[data-theme="dark"] .mdx-content h1,
html[data-theme="dark"] .mdx-content h2,
html[data-theme="dark"] .mdx-content h3,
html[data-theme="dark"] .mdx-content h4,
html[data-theme="dark"] .mdx-content h5,
html[data-theme="dark"] .mdx-content h6 {
  color: #d0d4da;
}
html[data-theme="dark"] .mdx-content strong { color: #e0e4ea; }
html[data-theme="dark"] .mdx-content code {
  background: #2a2f36;
  color: #e083a0;
  border-color: #333840;
}
html[data-theme="dark"] .mdx-content blockquote {
  background: rgba(47,67,86,0.15);
  border-color: rgba(47,67,86,0.5);
  color: #a0a8b4;
}
html[data-theme="dark"] .code-block {
  background: #1d2025;
  border-color: #333840;
}
html[data-theme="dark"] .disclaimer-box {
  background: rgba(255,193,7,0.08) !important;
  border-color: #554820 !important;
  color: #a09050;
}
html[data-theme="dark"] .disclaimer-title,
html[data-theme="dark"] .disclaimer-text {
  color: #a09050;
}
html[data-theme="dark"] .image-error {
  background: #1d2025;
  border-color: #444;
}
html[data-theme="dark"] .empty-state {
  background: #22262b;
  color: #889;
}
html[data-theme="dark"] .error-container h2 {
  color: #d0d4da;
}

/* --- Headings in MDX --- */
html[data-theme="dark"] .mdx-content-container {
  background: #1d2025;
  border-color: #333840;
}

/* --- Info item borders --- */
html[data-theme="dark"] .map-header-bar {
  background: linear-gradient(135deg, #14191e 0%, #1f2833 100%);
}

html[data-theme="dark"] .map-header-bar h3 {
  color: #d0d6de;
}

html[data-theme="dark"] .station-info h3 {
  border-color: rgba(47,67,86,0.5);
  color: #d0d4da;
}

/* --- Yellowbar --- */
html[data-theme="dark"] .yellowbar {
  opacity: 0.6;
}

/* --- Map switcher --- */
html[data-theme="dark"] .detail-map-switcher .switcher-btn {
  background: #2a2f36;
  border-color: #444a52;
  color: #c0c6ce;
}
html[data-theme="dark"] .detail-map-switcher .switcher-btn:hover {
  background: #353b44;
}
html[data-theme="dark"] .detail-map-switcher .switcher-btn.active {
  background: #2f4356;
  color: #fff;
  border-color: #2f4356;
}

/* --- Dark mode toggle button --- */
.dark-toggle {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 5000;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #555;
  background: rgba(34,38,43,0.85);
  color: #d0d4da;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
  backdrop-filter: blur(6px);
}
.dark-toggle:hover {
  background: rgba(47,67,86,0.85);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
html[data-theme="dark"] .dark-toggle {
  background: rgba(255,255,255,0.1);
  border-color: #666;
  color: #f0c040;
}

html[data-theme="dark"] .leaflet-container {
  background: #1a1d21 !important;
}

html[data-theme="dark"] .osm-dark-filter {
  filter: invert(0.85) hue-rotate(180deg) brightness(0.95) contrast(1.1) saturate(0.7) !important;
}

html[data-theme="dark"] .leaflet-control-zoom a {
  background: #2a2f36 !important;
  color: #c0c6ce !important;
  border-color: #444a52 !important;
}

html[data-theme="dark"] .leaflet-control-zoom a:hover {
  background: #353b44 !important;
}

html[data-theme="dark"] .leaflet-control-attribution {
  background: rgba(34,38,43,0.7) !important;
  color: #889 !important;
}
