/* ====== 全局 ====== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Microsoft YaHei','PingFang SC',sans-serif; background: #1a1a2e; overflow: hidden; }
#map { height: 100vh; width: 100vw; }

/* 瓦片暗色滤镜 */
.map-tile-dark {
  filter: invert(0.92) hue-rotate(180deg) brightness(0.55) contrast(1.15) saturate(0.4);
  -webkit-filter: invert(0.92) hue-rotate(180deg) brightness(0.55) contrast(1.15) saturate(0.4);
}

/* ====== 面板外层容器 (定位+动画，无裁剪) ====== */
#panel-wrapper {
  position: fixed; top: 12px; right: 12px; z-index: 1000;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(0);
}
#panel-wrapper.collapsed {
  transform: translateX(320px);
}

/* ====== 面板内层 (滚动容器) ====== */
#panel {
  background: rgba(18,18,35,0.95); backdrop-filter: blur(14px);
  border-radius: 14px; padding: 16px 16px 16px 20px; color: #d0d0d0;
  width: 340px; max-height: calc(100vh - 30px); overflow-y: auto;
  box-shadow: 0 8px 36px rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.07);
  font-size: 12px; scrollbar-width: thin;
}
#panel::-webkit-scrollbar { width: 4px; }
#panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

/* ====== 收缩箭头按钮 (独立 fixed，确保不被任何元素裁剪) ====== */
.panel-toggle-btn {
  position: fixed;
  right: 356px;  /* 12px wrapper margin + 340px panel + 4px gap */
  top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 52px;
  background: rgba(25,25,45,0.95);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;  /* 全圆角，与移动端一致 */
  cursor: pointer; z-index: 1001;
  display: flex; align-items: center; justify-content: center;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s, box-shadow 0.2s;
  padding: 0; outline: none;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}
.panel-toggle-btn:hover {
  background: rgba(45,45,75,0.95);
  box-shadow: 0 0 14px rgba(0,0,0,0.5);
}

/* 收起态：按钮移到面板左边缘，保持4px间距 */
.panel-toggle-btn.collapsed {
  right: 36px;
}

.panel-toggle-btn .arrow {
  width: 0; height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid rgba(255,255,255,0.8);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s;
}
.panel-toggle-btn:hover .arrow { border-left-color: #fff; }

/* 收起时箭头翻转 */
.panel-toggle-btn.collapsed .arrow { transform: rotate(180deg); }

/* ====== 面板标题 ====== */
#panel h2 {
  font-size: 17px; font-weight: 700; margin-bottom: 5px;
  background: linear-gradient(135deg, #ff6b6b, #ffa502); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; text-align: center;
}
.panel-sub { text-align: center; font-size: 10px; color: #777; margin-bottom: 4px; }
.guide-link { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 14px; }
.guide-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  height: 20px; padding: 0 6px;
  font-size: 11px; cursor: pointer; color: #ffa502;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s; line-height: 1; white-space: nowrap;
  text-decoration: none; font-weight: 600;
}
.guide-btn:hover { background: rgba(255,255,255,0.18); color: #ffbe4d; }

.theme-toggle-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  height: 20px; padding: 0 6px;
  font-size: 11px; cursor: pointer; color: #c8c8d4;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.2s; line-height: 1; white-space: nowrap;
}
.theme-toggle-btn:hover { background: rgba(255,255,255,0.18); }

/* ====== 统计卡片 ====== */
.stats-row { display: flex; gap: 6px; margin-bottom: 12px; }
.stat-card { flex: 1; background: rgba(255,255,255,0.04); border-radius: 8px; padding: 8px 6px; border: 1px solid rgba(255,255,255,0.06); text-align: center; }
.stat-card .v { font-size: 16px; font-weight: 700; color: #ffa502; }
.stat-card .l { font-size: 9px; color: #777; margin-top: 1px; }

/* ====== 分区 ====== */
.section { margin-bottom: 13px; }
.section h3 { font-size: 12px; margin-bottom: 7px; color: #bbb; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 4px; }

/* ====== 开关 ====== */
.heatmap-toggle-row { display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,0.04); border-radius: 8px; padding: 8px 10px; border: 1px solid rgba(255,255,255,0.08); margin-bottom: 4px; }
.heatmap-toggle-row .label { font-size: 12px; color: #bbb; display: flex; align-items: center; gap: 6px; }
.toggle-switch { position: relative; width: 44px; height: 24px; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #444; border-radius: 24px; transition: 0.3s; }
.toggle-slider:before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.3s; }
.toggle-switch input:checked + .toggle-slider { background: #e74c3c; }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }

.heat-legend-container { margin-top: 8px; transition: opacity 0.3s; }
.heat-legend { height: 16px; border-radius: 8px; margin-bottom: 5px; background: linear-gradient(to right,#2ecc71,#7dcea0,#f1c40f,#f39c12,#e67e22,#e74c3c,#c0392b,#8e44ad); }
.heat-labels { display: flex; justify-content: space-between; font-size: 9px; color: #888; }

/* ====== 加载 ====== */
.loading-indicator { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(255,165,2,0.1); border-radius: 6px; margin-bottom: 8px; font-size: 11px; color: #ffa502; }
.loading-indicator .spinner { width: 14px; height: 14px; border: 2px solid rgba(255,165,2,0.3); border-top-color: #ffa502; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ====== 地铁按钮 ====== */
.line-toggles { display: flex; flex-wrap: wrap; gap: 3px; }
.lbtn { border: none; border-radius: 5px; padding: 2px 7px; font-size: 10px; cursor: pointer; color: #fff; font-weight: 600; transition: all 0.15s; opacity: 0.88; }
.lbtn:hover { opacity: 1; transform: scale(1.06); }
.lbtn.off { opacity: 0.3; }

/* ====== 房型选择器 ====== */
.room-type-row { display: flex; gap: 6px; }
.room-btn {
  flex: 1; padding: 5px 0; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px; background: rgba(255,255,255,0.04);
  color: #999; font-size: 11px; cursor: pointer;
  transition: all 0.2s; font-family: inherit;
}
.room-btn:hover { background: rgba(255,255,255,0.08); color: #ccc; }
.room-btn.active {
  background: rgba(255,165,2,0.18); color: #ffa502;
  border-color: rgba(255,165,2,0.4); font-weight: 600;
}

/* ====== 地铁全部按钮 ====== */
.subway-btn-group {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.subway-all-btn {
  font-size: 10px; padding: 1px 8px;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 4px;
  background: rgba(255,255,255,0.05); color: #888;
  cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.subway-all-btn:hover { background: rgba(255,255,255,0.12); color: #ccc; }

/* ====== 片区标注点按钮 ====== */
.label-points-btn {
  float: right; font-size: 10px; padding: 1px 8px;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 4px;
  background: rgba(255,255,255,0.05); color: #888;
  cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.label-points-btn:hover { background: rgba(255,255,255,0.12); color: #ccc; }

/* ====== 站名显示按钮 ====== */
.station-name-btn {
  font-size: 10px; padding: 1px 8px;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 4px;
  background: rgba(255,255,255,0.05); color: #888;
  cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.station-name-btn:hover { background: rgba(255,255,255,0.12); color: #ccc; }

/* ====== 站名 tooltip ====== */
.station-name-tooltip {
  background: rgba(18,18,35,0.9) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  border-radius: 6px !important;
  padding: 3px 6px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
}
.station-name-tooltip::before {
  border-top-color: rgba(18,18,35,0.9) !important;
}
.station-name-label {
  font-size: 10px; font-weight: 600; color: #e0e0e0;
  white-space: nowrap;
}
.station-lines-label {
  font-size: 9px; font-weight: 500; color: #aaa;
  white-space: nowrap; line-height: 1.3;
}

/* ====== 区域列表 ====== */
.area-row { display: flex; align-items: center; padding: 4px 6px; border-radius: 4px; margin-bottom: 2px; cursor: pointer; font-size: 11px; transition: background 0.15s; }
.area-row:hover { background: rgba(255,255,255,0.06); }
.area-row .dot { width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; flex-shrink: 0; }
.area-row .nm { flex: 1; color: #ccc; }
.area-row .pr { font-weight: 600; color: #ffa502; text-align: right; min-width: 75px; font-size: 10px; }

/* 大区标题可折叠 */
.district-header {
  font-size: 12px; color: #aaa; margin: 6px 0 2px 0; padding: 4px 6px;
  cursor: pointer; border-radius: 4px; transition: background 0.15s;
  display: flex; align-items: center; gap: 4px;
  user-select: none; font-weight: 600;
}
.district-header:hover { background: rgba(255,255,255,0.05); }
.district-header .darr {
  display: inline-block; width: 10px; font-size: 10px; transition: transform 0.25s;
}
.district-header.collapsed .darr { transform: rotate(-90deg); }
.district-header .dcount { font-weight: 400; color: #666; font-size: 10px; }
.district-header .davg { font-weight: 400; color: #888; font-size: 10px; margin-left: auto; }

/* 默认收起：隐藏区域行 */
.district-group.collapsed .area-row,
.district-group.collapsed .street-group { display: none; }

/* ====== 街道分组 - 可折叠 ====== */
.street-group { margin: 0 0 1px 0; }
.street-header {
  display: flex; align-items: center; padding: 3px 6px 3px 10px;
  cursor: pointer; border-radius: 4px; font-size: 11px; color: #bbb;
  transition: background 0.15s; user-select: none;
}
.street-header:hover { background: rgba(255,255,255,0.05); }
.street-header .sarr {
  display: inline-block; width: 8px; font-size: 8px;
  transition: transform 0.25s; margin-right: 4px; color: #666;
}
.street-header.collapsed .sarr { transform: rotate(-90deg); }
.street-header .sname { flex: 1; color: #ccc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.street-header .spric { font-size: 10px; color: #ffa502; margin-right: 8px; font-weight: 600; }
.street-header .scount { font-size: 9px; color: #555; }

/* 小区行 */
.compound-row {
  display: flex; align-items: center;
  padding: 2px 6px 2px 26px; border-radius: 3px;
  cursor: pointer; font-size: 10px; transition: background 0.12s;
}
.compound-row:hover { background: rgba(255,255,255,0.04); }
.compound-row .cdot {
  width: 5px; height: 5px; border-radius: 50%;
  margin-right: 5px; flex-shrink: 0; opacity: 0.7;
}
.compound-row .cname { flex: 1; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compound-row .cpric { color: #ffa502; font-weight: 600; font-size: 9px; min-width: 80px; text-align: right; }

/* 收起时隐藏小区行 */
.street-group.collapsed .compound-row { display: none; }
/* 展开时隐藏街道均价 */
.street-group:not(.collapsed) .street-header .spric { display: none; }

/* ====== 脚注 ====== */
.footnote { font-size: 9px; color: #555; text-align: center; margin-top: 8px; }
.footnote .privacy-link { color: #888; text-decoration: none; transition: color 0.2s; }
.footnote .privacy-link:hover { color: #ffa502; }

/* ====== Leaflet 弹窗 ====== */
.leaflet-popup-content-wrapper { background: rgba(18,18,35,0.96); color: #d0d0d0; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); }
.leaflet-popup-tip { background: rgba(18,18,35,0.96); }

/* ====== 片区标签 ====== */
.area-label { background: none !important; border: none !important; box-shadow: none !important; font-size: 10px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.85); text-align: center; white-space: nowrap; font-weight: 600; }
.area-label::before { display: none; }
.leaflet-tooltip.area-label { background: transparent; border: none; box-shadow: none; }

/* ======================================================================== */
/* ====== 移动端适配 (宽度 ≤ 768px 或触摸设备) ====== */
/* ======================================================================== */
@media (max-width: 768px), (pointer: coarse) and (max-width: 1024px) {
  /* wrapper 变为底部悬浮 */
  #panel-wrapper {
    top: auto; bottom: 0; right: 0; left: 0;
    transform: translateY(0);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* 收起：向下滑出 */
  #panel-wrapper.collapsed {
    transform: translateY(calc(100% - 38px));
  }

  /* 面板内层全宽 */
  #panel {
    width: 100%; max-height: 42vh;
    border-radius: 16px 16px 0 0;
    padding: 14px 16px 16px 16px;
    border-bottom: none;
  }

  /* 箭头按钮：面板顶部上方 6px */
  .panel-toggle-btn {
    right: auto; left: 50%;
    top: auto; bottom: calc(42vh + 6px);  /* 面板顶部(42vh) + 6px 间距 */
    transform: translateX(-50%);
    width: 52px; height: 22px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.3);
    transition: bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s, box-shadow 0.2s;
  }
  .panel-toggle-btn.collapsed {
    right: auto; left: 50%;
    bottom: 42px;  /* 38px visible strip + 4px gap */
  }
  .panel-toggle-btn .arrow {
    width: 0; height: 0;
    border-bottom: 0;                                /* 清除桌面端 border-bottom */
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid rgba(255,255,255,0.8);     /* 展开态(非collapsed)：↑ */
  }
  .panel-toggle-btn.collapsed .arrow {
    transform: none;                                 /* 禁用桌面端 rotate(180deg) */
    border-top: 0;
    border-bottom: 8px solid rgba(255,255,255,0.8);  /* 收起态：↓ */
  }
  .panel-toggle-btn:hover .arrow {
    border-top-color: #fff;
    border-left-color: transparent;                  /* 抑制桌面端 border-left-color */
  }
  .panel-toggle-btn.collapsed:hover .arrow {
    border-bottom-color: #fff;
    border-left-color: transparent;                  /* 抑制桌面端 border-left-color */
  }

  /* 缩小面板字号 */
  #panel h2 { font-size: 15px; }
  .panel-sub { font-size: 9px; margin-bottom: 2px; }
  .guide-btn { height: 18px; font-size: 10px; padding: 0 5px; }
  .theme-toggle-btn { height: 18px; font-size: 10px; padding: 0 5px; }
  .stats-row { gap: 4px; margin-bottom: 8px; }
  .stat-card { padding: 6px 4px; }
  .stat-card .v { font-size: 13px; }
  .section { margin-bottom: 8px; }
  .section h3 { font-size: 11px; }

  /* 地图缩放控件上移，避免被面板遮挡 */
  .leaflet-control-zoom { margin-bottom: 50px !important; }

  /* attribution 移到左上角 + 缩小 */
  .leaflet-control-attribution {
    position: fixed !important;
    top: 6px; left: 6px; bottom: auto; right: auto;
    font-size: 9px;
    background: rgba(18,18,35,0.75) !important;
    color: #888 !important;
    border-radius: 4px;
    padding: 2px 6px !important;
    z-index: 1000;
  }
  .leaflet-control-attribution a { color: #888 !important; }
  .leaflet-control-attribution a[style*="color:#ffa502"] { color: #ffa502 !important; }
}

/* 窄屏手机的额外调整 */
@media (max-width: 480px) {
  #panel { max-height: 38vh; padding: 10px 12px 12px 12px; }
  #panel h2 { font-size: 13px; }
  .stat-card .v { font-size: 12px; }
  .stat-card .l { font-size: 8px; }
  .panel-toggle-btn { width: 44px; height: 18px; bottom: calc(38vh + 6px); }
  .panel-toggle-btn .arrow { border-top-width: 5px; border-left-width: 5px; border-right-width: 5px; }
  .panel-toggle-btn.collapsed .arrow { border-bottom-width: 5px; }
  .panel-toggle-btn.collapsed { bottom: 36px; }  /* 32px visible strip + 4px gap */
  #panel-wrapper.collapsed { transform: translateY(calc(100% - 32px)); }
}

/* ======================================================================== */
/* ====== 浅色模式 ====== */
/* ======================================================================== */

body.light-mode { background: #eef1f5; }

/* 瓦片无暗色滤镜 */
body.light-mode .map-tile-dark {
  filter: none !important;
  -webkit-filter: none !important;
}

/* 面板 */
body.light-mode #panel {
  background: rgba(255,255,255,0.94);
  color: #2c2c2c;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 8px 36px rgba(0,0,0,0.1);
}
body.light-mode #panel::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); }

body.light-mode .panel-sub { color: #999; }

/* 主题切换按钮 */
body.light-mode .guide-btn {
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.12);
  color: #d4740b;
}
body.light-mode .guide-btn:hover { background: rgba(0,0,0,0.1); color: #b8630a; }
body.light-mode .theme-toggle-btn {
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.12);
  color: #333;
}
body.light-mode .theme-toggle-btn:hover { background: rgba(0,0,0,0.1); }

/* 统计卡片 */
body.light-mode .stat-card {
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.06);
}
body.light-mode .stat-card .v { color: #d4740b; }
body.light-mode .stat-card .l { color: #999; }

/* 分区标题 */
body.light-mode .section h3 {
  color: #555;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

/* 热力图开关行 */
body.light-mode .heatmap-toggle-row {
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.08);
}
body.light-mode .heatmap-toggle-row .label { color: #555; }

/* 开关滑块 */
body.light-mode .toggle-slider { background: #c0c0c0; }

/* 图例标签 */
body.light-mode .heat-labels { color: #999; }

/* 加载指示器 */
body.light-mode .loading-indicator {
  background: rgba(212,116,11,0.08);
  color: #d4740b;
}

/* 地铁按钮 */
body.light-mode .lbtn.off { opacity: 0.35; }

/* 房型选择器 */
body.light-mode .room-btn {
  background: rgba(0,0,0,0.03);
  color: #777;
  border: 1px solid rgba(0,0,0,0.1);
}
body.light-mode .room-btn:hover { background: rgba(0,0,0,0.06); color: #555; }
body.light-mode .room-btn.active {
  background: rgba(212,116,11,0.12);
  color: #d4740b;
  border-color: rgba(212,116,11,0.3);
}

/* 地铁全部按钮 */
body.light-mode .subway-all-btn {
  background: rgba(0,0,0,0.04);
  color: #777;
  border: 1px solid rgba(0,0,0,0.1);
}
body.light-mode .subway-all-btn:hover { background: rgba(0,0,0,0.08); color: #555; }

/* 片区标注点按钮 */
body.light-mode .label-points-btn {
  background: rgba(0,0,0,0.04);
  color: #777;
  border: 1px solid rgba(0,0,0,0.1);
}
body.light-mode .label-points-btn:hover { background: rgba(0,0,0,0.08); color: #555; }

/* 站名显示按钮 */
body.light-mode .station-name-btn {
  background: rgba(0,0,0,0.04);
  color: #777;
  border: 1px solid rgba(0,0,0,0.1);
}
body.light-mode .station-name-btn:hover { background: rgba(0,0,0,0.08); color: #555; }

/* 站名 tooltip */
body.light-mode .station-name-tooltip {
  background: rgba(255,255,255,0.95) !important;
  border: 1px solid rgba(0,0,0,0.15) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}
body.light-mode .station-name-tooltip::before {
  border-top-color: rgba(255,255,255,0.95) !important;
}
body.light-mode .station-name-label {
  color: #333;
}
body.light-mode .station-lines-label {
  color: #666;
}

/* 区域列表 */
body.light-mode .area-row:hover { background: rgba(0,0,0,0.04); }
body.light-mode .area-row .nm { color: #444; }
body.light-mode .area-row .pr { color: #d4740b; }

/* 大区标题 */
body.light-mode .district-header { color: #555; }
body.light-mode .district-header:hover { background: rgba(0,0,0,0.04); }
body.light-mode .district-header .dcount { color: #999; }
body.light-mode .district-header .davg { color: #777; }

/* 街道标题 */
body.light-mode .street-header { color: #555; }
body.light-mode .street-header:hover { background: rgba(0,0,0,0.04); }
body.light-mode .street-header .sname { color: #444; }
body.light-mode .street-header .sarr { color: #999; }
body.light-mode .street-header .spric { color: #d4740b; }
body.light-mode .street-header .scount { color: #aaa; }

/* 小区行 */
body.light-mode .compound-row:hover { background: rgba(0,0,0,0.03); }
body.light-mode .compound-row .cname { color: #666; }
body.light-mode .compound-row .cpric { color: #d4740b; }

/* Leaflet 弹窗 */
body.light-mode .leaflet-popup-content-wrapper {
  background: rgba(255,255,255,0.96);
  color: #333;
  border: 1px solid rgba(0,0,0,0.1);
}
body.light-mode .leaflet-popup-tip { background: rgba(255,255,255,0.96); }

/* 脚注 */
body.light-mode .footnote { color: #aaa; }
body.light-mode .footnote .privacy-link { color: #bbb; }
body.light-mode .footnote .privacy-link:hover { color: #e67e22; }

/* 面板收缩按钮 */
body.light-mode .panel-toggle-btn {
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 0 8px rgba(0,0,0,0.08);
}
body.light-mode .panel-toggle-btn:hover {
  background: rgba(245,245,245,0.94);
  box-shadow: 0 0 14px rgba(0,0,0,0.12);
}
body.light-mode .panel-toggle-btn .arrow { border-left-color: rgba(0,0,0,0.55); }
body.light-mode .panel-toggle-btn:hover .arrow { border-left-color: #222; }

/* ====== 浅色模式 - 移动端 ====== */
@media (max-width: 768px), (pointer: coarse) and (max-width: 1024px) {
  body.light-mode .leaflet-control-attribution {
    background: rgba(255,255,255,0.88) !important;
    color: #777 !important;
  }
  body.light-mode .leaflet-control-attribution a { color: #777 !important; }
  body.light-mode .leaflet-control-attribution a[style*="color:#ffa502"] { color: #ffa502 !important; }

  body.light-mode .panel-toggle-btn .arrow {
    border-left-color: transparent;
    border-right-color: transparent;
    border-top-color: rgba(0,0,0,0.55);
  }
  body.light-mode .panel-toggle-btn:hover .arrow {
    border-top-color: #222;
    border-left-color: transparent;
    border-right-color: transparent;
  }
  body.light-mode .panel-toggle-btn.collapsed .arrow {
    border-top-color: transparent;
    border-bottom-color: rgba(0,0,0,0.55);
  }
  body.light-mode .panel-toggle-btn.collapsed:hover .arrow {
    border-bottom-color: #222;
    border-left-color: transparent;
    border-right-color: transparent;
  }
}
