/* ============================================================
   TOTKMAP · 塞尔达传说：王国之泪 互动地图
   UI 1:1 复刻游民星空互动地图（金色 #eac27e 主调、简约半透明面板）
   ============================================================ */

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #171a1f;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#map {
  position: absolute;
  inset: 0;
  background: #1c2118;
  z-index: 0;
}
#map .leaflet-control-zoom {
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
#map .leaflet-control-zoom a {
  background: rgba(30,32,36,.92);
  color: #cfd4da;
  border: 1px solid rgba(255,255,255,.08);
  width: 34px; height: 34px;
  line-height: 34px;
  font-size: 18px;
}
#map .leaflet-control-zoom a:hover { background: rgba(48,52,58,.95); color: #fff; }

/* ---------- 右下角缩放控件（百分比 / ＋－ / 全图 / 定位） ---------- */
#zoomControls {
  position: absolute;
  right: 14px; bottom: 62px;   /* 位于底部工具条(48px)上方 */
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1000;
}
#zoomPct {
  text-align: center;
  font-size: 10.5px;
  color: #aeb6c0;
  background: rgba(30,32,36,.88);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px;
  padding: 3px 2px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  user-select: none;
}
#zoomControls button {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(30,32,36,.92);
  color: #cfd4da;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#zoomControls button:hover { background: rgba(48,52,58,.95); color: #fff; border-color: #eac27e; }
#zoomControls button:active { transform: scale(.94); }
@media (max-width: 720px) {
  #zoomControls { right: 10px; bottom: 56px; gap: 5px; }
  #zoomControls button { width: 34px; height: 34px; }
}

/* ---------- 标记点标签（标点名称） ---------- */
.mk-label {
  background: rgba(10,12,14,.62);
  color: #e8ecf1;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.mk-label.done-label { opacity: .55; }

/* ---------- 区域名标签（贴合游戏：米黄地图字色 + 深色描边，参考游戏内地图） ---------- */
.area-label {
  background: none;
  color: #bfae68;
  border: none;
  border-radius: 0;
  padding: 0;
  font-weight: 600;
  font-family: "PingFang SC", "Microsoft YaHei", "SimSun", sans-serif;
  text-shadow:
    -1.5px -1.5px 0 #3f3010, 1.5px -1.5px 0 #3f3010,
    -1.5px 1.5px 0 #3f3010, 1.5px 1.5px 0 #3f3010,
    0 2px 4px rgba(0,0,0,.5),
    0 0 3px rgba(30,20,0,.75), 0 0 6px rgba(30,20,0,.55);
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: .5px;
}

.area-label-wrap {
  display: inline-block;
  transform: translate(-50%, -50%);
}
.area-label-inner {
  display: inline-block;
  white-space: nowrap;
  line-height: 1.15;
}

/* ---------- 左侧面板 ---------- */
.panel {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 352px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  background: rgba(13,15,18,.78);
  border-right: 1px solid rgba(255,255,255,.07);
  color: #d7d7d9;
  transition: transform .25s ease;
  backdrop-filter: blur(6px);
}
.panel.collapsed { transform: translateX(-100%); }

.panel-top {
  padding: 16px 16px 14px;
  border-bottom: 1px solid #45454d;
}
.panel-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  margin-bottom: 4px;
}
.panel-title { font-size: 15px; font-weight: 600; line-height: 24px; color: #fff; white-space: nowrap; }

/* 显示标点名称开关（gamersky 金色滑块） */
.name-switch {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 12px;
  color: #eac27e;
  cursor: pointer;
}
.name-switch input { display: none; }
.name-switch .switch {
  padding: 1px;
  width: 24px; height: 12px;
  background: #505052;
  border-radius: 6px;
  box-sizing: border-box;
  transition: all .2s;
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.name-switch .switch i {
  display: block;
  width: 10px; height: 10px;
  background: #222220;
  border-radius: 50%;
  transition: all .2s;
}
.name-switch.cur .switch { background-color: #eac27e; }
.name-switch.cur .switch i { transform: translateX(12px); }

/* 图层切换（天空/地上/地下） */
.layer-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 6px;
}
.layer-switch button {
  height: 32px;
  line-height: 32px;
  text-align: center;
  background: #46464c;
  color: #d7d7d9;
  border-radius: 4px;
  border: none;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.layer-switch button.active { background: #eac27e; color: #222; font-weight: 600; }
.layer-switch button.locked { box-shadow: inset 0 0 0 2px #ffb703; color: #ffd166; }
.layer-switch button.locked.active { background: #eac27e; color: #222; box-shadow: inset 0 0 0 2px #b45309; }

/* 地图标点区 */
.marker-section {
  padding: 12px 16px;
  border-bottom: 1px solid #45454d;
}
.marker-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.section-title {
  font-size: 14px;
  font-weight: 400;
  color: #fff;
  letter-spacing: .5px;
}
.su-load-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  background: #eac27e;
  color: #222;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.su-load-btn:hover { background: #f5d494; }
.su-load-btn.busy { opacity: .5; pointer-events: none; }

/* 存档帮助（? 图标 + 悬停气泡 + 帮助弹窗） */
.su-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  margin-left: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #cfd4da;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: all .15s;
  outline: none;
}
.su-help:hover, .su-help:focus { background: #eac27e; color: #222; }
.su-help-wrap { position: relative; display: inline-flex; }
.su-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  right: -2px;
  width: 300px;
  padding: 10px 12px;
  background: rgba(20,24,30,.98);
  border: 1px solid rgba(234,194,126,.35);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  font-size: 12px;
  line-height: 1.65;
  color: #cfd6df;
  z-index: 60;
  text-align: left;
  white-space: normal;
}
.su-tip b { color: #eac27e; }
.su-tip code {
  display: inline-block;
  max-width: 100%;
  padding: 1px 5px;
  background: rgba(255,255,255,.08);
  border-radius: 3px;
  font-size: 11px;
  color: #ffd9a0;
  word-break: break-all;
}
.su-tip-sub { margin-top: 5px; color: #9aa3ae; }

/* 帮助弹窗（Q&A） */
.help-box {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 560px;
  max-width: calc(100vw - 32px);
  max-height: 82vh;
  overflow-y: auto;
  z-index: 850;
  background: rgba(18,22,28,.98);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  box-shadow: 0 14px 44px rgba(0,0,0,.6);
  padding: 18px 20px;
  color: #d6dbe2;
  user-select: text;
  -webkit-user-select: text;
  cursor: auto;
}
.help-box h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  color: #fff;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.help-close {
  width: 26px; height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #cfd4da;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.help-close:hover { background: rgba(255,255,255,.24); color: #fff; }
.hq { margin-bottom: 14px; }
.hq h4 { font-size: 13.5px; color: #eac27e; margin-bottom: 5px; font-weight: 600; }
.hq p, .hq li { font-size: 12.5px; line-height: 1.8; color: #cfd6df; }
.hq code {
  display: inline-block;
  padding: 1px 6px;
  background: rgba(255,255,255,.08);
  border-radius: 3px;
  font-size: 11.5px;
  color: #ffd9a0;
  word-break: break-all;
}
.hq ul { padding-left: 18px; }
.hq .hl { color: #eac27e; }


/* 搜索（与下方图层工具条构成一个紧凑模块：间距收紧、无中间分隔线） */
.search-box {
  position: relative;
  padding: 12px 16px 6px;
}
.search-box input {
  width: 100%;
  height: 32px;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.3);
  color: #e8ecf1;
  font-size: 13px;
  outline: none;
  user-select: text;
}
.search-box input:focus { border-color: #eac27e; }
.search-box input::placeholder { color: #7c8591; }
.search-result {
  position: absolute;
  top: 50px; left: 16px; right: 16px;
  max-height: 260px;
  overflow-y: auto;
  background: rgba(24,28,34,.98);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  z-index: 20;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.search-result .sr-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: #d6dbe2;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.search-result .sr-item:last-child { border-bottom: none; }
.search-result .sr-item:hover { background: rgba(255,255,255,.08); }
.search-result .sr-item img { width: 18px; height: 18px; flex: 0 0 auto; }
.search-result .sr-item .sr-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result .sr-item .sr-cat { font-size: 11.5px; color: #7c8591; flex: 0 0 auto; }
.search-result .sr-empty { padding: 10px 12px; color: #7c8591; font-size: 13px; text-align: center; }

/* 分类列表 */
.catalog-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 16px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.14) transparent;
}
.catalog-body::-webkit-scrollbar { width: 3px; }
.catalog-body::-webkit-scrollbar-track { background: transparent; }
.catalog-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }
.catalog-body::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.22); }

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  line-height: 1;
  color: #a7a7ad;
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 10px;
  margin-top: 6px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 10px 17px;
  margin-bottom: 12px;
}
.cat-item {
  display: flex;
  align-items: center;
  height: 20px;
  line-height: 1;
  font-size: 14px;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  min-width: 0;
  transition: color .15s;
}
.cat-item img {
  display: block;
  width: 20px; height: 20px;
  margin-right: 5px;
  opacity: .8;
  border-radius: 4px;
  flex: 0 0 auto;
  object-fit: contain;
}
.cat-item .cat-name {
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.cat-item .cat-count {
  margin-left: 5px;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}
.cat-item:hover { color: rgba(255,255,255,.85); }
.cat-item.active { color: #eac27e; }
.cat-item.active img { opacity: 1; }

/* 探索度（存档加载后显示） */
.progress-section {
  border-top: 1px solid #45454d;
  padding: 10px 16px 8px;
  max-height: 224px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.14) transparent;
}
.progress-section::-webkit-scrollbar { width: 3px; }
.progress-section::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }
.progress-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  user-select: none;
}
.progress-head:hover .progress-title { color: #eac27e; }
.progress-toggle {
  font-size: 12px;
  color: #8a93a0;
  line-height: 1;
  transition: transform .18s ease;
  transform-origin: center;
}
.progress-section.collapsed .progress-toggle { transform: rotate(-90deg); }
.progress-title { font-size: 14px; font-weight: 400; color: #fff; }
.progress-list { display: flex; flex-direction: column; gap: 5px; }
.progress-section.collapsed .progress-list { display: none; }
.progress-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(255,255,255,.65);
  min-width: 0;
}
.progress-item .pi-name { color: #a7a7ad; flex: 0 0 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-item .pi-bar {
  flex: 1 1 auto;
  height: 6px;
  background: rgba(255,255,255,.12);
  border-radius: 3px;
  overflow: hidden;
  min-width: 24px;
  max-width: 132px;
}
.progress-item .pi-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #eac27e, #f5d494);
}
.progress-item .pi-val { color: #eac27e; font-variant-numeric: tabular-nums; flex: 0 0 56px; text-align: right; }
.progress-empty { font-size: 12px; color: #7c8591; padding: 3px 0; line-height: 1.6; }

/* 加载存档 */
.save-upload {
  border-top: 1px solid #45454d;
  padding: 10px 16px;
}
.su-row { position: relative; display: flex; align-items: center; gap: 8px; }

/* 侧栏底部：版本 + 声明 */
.side-foot {
  border-top: 1px solid #45454d;
  padding: 8px 16px;
}
.side-foot p { font-size: 11.5px; color: #8a93a0; line-height: 1.7; }
.side-foot .foot-version { color: #a7a7ad; font-weight: 500; }

/* 面板收起把手 */
.panel-toggle {
  position: absolute;
  top: 14px; left: 352px;
  z-index: 501;
  width: 26px; height: 44px;
  border: none;
  border-radius: 0 8px 8px 0;
  background: rgba(13,15,18,.8);
  color: #d7d7d9;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 2px 0 8px rgba(0,0,0,.3);
  transition: left .25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.panel.collapsed + .panel-toggle { left: 0; }
.panel-toggle:hover { background: rgba(48,52,58,.95); color: #fff; }

/* ---------- 详情卡片（点击标点/材料弹出，BOTWmap 信息卡风格） ---------- */
.detail {
  position: absolute;
  z-index: 600;
  width: 300px;
}
.detail-card {
  background: rgba(20,22,26,.97);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 12px;
  box-shadow: 0 10px 34px rgba(0,0,0,.55);
  padding: 14px 16px;
  font-size: 13px;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  cursor: move;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  background: rgba(234,194,126,.10);
  color: #eac27e;
  border: 1px solid rgba(234,194,126,.35);
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-close {
  background: none;
  border: none;
  color: #8a93a0;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  flex: 0 0 auto;
}
.detail-close:hover { color: #fff; }
.card-name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 2px;
  color: #f2f5f9;
  word-break: break-all;
}
/* 材料卡片高清大图（居中，点击查看 256px 原图） */
.card-img {
  display: block;
  width: 180px;
  height: 180px;
  margin: 10px auto 6px;
  object-fit: contain;
  background: rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 6px;
  cursor: zoom-in;
}
/* 区域 / 坐标 / 位置 meta 区（克洛格卡同款） */
.card-meta { margin: 8px 0 2px; }
.meta-row {
  display: flex;
  align-items: center;
  margin: 3px 0;
  font-size: 12.5px;
}
.meta-label { color: #8a93a0; flex: 0 0 44px; }
.meta-val { color: #e8ecf1; word-break: break-all; }
/* 用途区 */
.card-usage {
  margin: 8px 0 2px;
  font-size: 12.5px;
}
.usage-label { color: #8a93a0; margin-right: 6px; }
#detailUsage { color: #eac27e; }
.card-body .row { margin: 3px 0; color: #8a93a0; }
.card-body .row b { color: #e8ecf1; font-weight: 500; margin-left: 4px; }
#detailDesc {
  white-space: pre-wrap;
  line-height: 1.65;
  font-size: 13px;
  color: #cfd6df;
}
.card-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.card-actions .btn {
  flex: 1;
  min-width: 0;
  border-radius: 8px;
  padding: 10px 4px;
  font-size: 13px;
}
.btn {
  flex: 1;
  padding: 8px 0;
  border: none;
  border-radius: 6px;
  font-size: 13.5px;
  cursor: pointer;
  transition: all .15s;
}
.btn.primary { background: #eac27e; color: #222; font-weight: 600; }
.btn.primary:hover { background: #f5d494; }
.btn.primary.done { background: #3aa76d; color: #fff; font-weight: 400; }
.btn.primary.done:hover { background: #45bd7c; }
.btn.ghost {
  background: rgba(255,255,255,.08);
  color: #c8cfd8;
  border: 1px solid rgba(255,255,255,.14);
}
.btn.ghost:hover { background: rgba(255,255,255,.14); }

/* ---------- 底部工具条 ---------- */
.bottom-bar {
  position: absolute;
  left: 362px; right: 0; bottom: 0;
  height: 48px;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.55));
  transition: left .25s ease;
  pointer-events: none;
}
.panel.collapsed ~ .bottom-bar { left: 0; }
.bar-btn {
  pointer-events: auto;
  padding: 5px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(26,30,36,.9);
  color: #cfd4da;
  font-size: 12.5px;
  cursor: pointer;
  transition: all .15s;
}
.bar-btn:hover { background: rgba(48,52,58,.95); color: #fff; }

/* ---------- 新增标点弹窗 ---------- */
.modal {
  position: absolute;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.5);
}
.modal-card {
  width: 320px;
  background: rgba(20,22,26,.98);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 10px 34px rgba(0,0,0,.55);
}
.modal-card h3 { color: #f2f5f9; font-size: 16px; margin-bottom: 14px; }
.modal-card input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.35);
  color: #e8ecf1;
  font-size: 13.5px;
  margin-bottom: 10px;
  outline: none;
  user-select: text;
}
.modal-card input:focus { border-color: #eac27e; }
.modal-actions { display: flex; gap: 8px; margin-top: 4px; }
.modal-tip { font-size: 12px; color: #7c8591; margin-top: 12px; text-align: center; }

/* ---------- Toast ---------- */
.toast {
  position: absolute;
  bottom: 70px; left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  background: rgba(13,15,18,.95);
  color: #e8ecf1;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  box-shadow: 0 6px 20px rgba(0,0,0,.5);
  white-space: nowrap;
  transition: opacity .25s;
}
.toast b { color: #eac27e; }

/* 材料原图预览（点击卡片图标查看 256px 原图，克洛格卡「查看原图」同款） */
.img-preview {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.78);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: zoom-out;
}
.img-preview img {
  width: 256px;
  height: 256px;
  object-fit: contain;
  background: rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 8px;
}
.img-preview-hint { color: #9aa3af; font-size: 13px; }
.hidden { display: none !important; }

/* ---------- 移动端适配 ---------- */
@media (max-width: 720px) {
  .panel { width: min(88vw, 352px); }
  .panel-toggle { left: min(88vw, 352px); }
  .panel.collapsed + .panel-toggle { left: 0; }
  .bottom-bar { left: 0; padding: 0 10px; }
  .detail { left: 8px; right: 8px; bottom: 62px; top: auto; width: auto; max-width: none; max-height: 55vh; overflow-y: auto; }
  .cat-item .cat-name { max-width: 104px; }
}

@media (max-width: 420px) {
  .bar-btn { padding: 4px 10px; font-size: 12px; }
  .cat-item .cat-name { max-width: 88px; }
}


/* 图层工具栏（全选图层 / 清空图层 / 图层计数，gamersky 式）——与上方搜索框紧凑衔接 */
.layer-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 10px;
  border-bottom: 1px solid #45454d;
}
.lt-btn {
  height: 26px;
  padding: 0 12px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 4px;
  color: #d7d7d9;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.lt-btn:hover { background: rgba(234,194,126,.18); border-color: rgba(234,194,126,.45); color: #eac27e; }
.lt-count {
  margin-left: auto;
  font-size: 12px;
  color: #8a93a0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 存档路径复制按钮（帮助弹窗内） */
.path-line { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.path-line code { flex: 1; }
.copy-btn {
  flex: 0 0 auto;
  height: 22px;
  padding: 0 8px;
  background: rgba(234,194,126,.14);
  border: 1px solid rgba(234,194,126,.45);
  border-radius: 4px;
  color: #eac27e;
  font-size: 11px;
  cursor: pointer;
  transition: all .15s;
}
.copy-btn:hover { background: rgba(234,194,126,.3); }
.copy-btn.copied { color: #222; background: #eac27e; }

/* 帮助气泡内路径也可选中 */
.su-tip { user-select: text; -webkit-user-select: text; }
/* 探索度进度条已内联于 .progress-item 中 */

/* ============ 区域轮廓覆盖层 ============ */
.area-overlay-section {
  padding: 8px 12px 4px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 4px;
}
.area-overlay-section .group-title {
  font-size: 12px;
  color: #bfae68;
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.area-overlay-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.area-overlay-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #ccc;
  cursor: pointer;
  user-select: none;
}
.area-overlay-item input {
  margin: 0;
  cursor: pointer;
}

/* 顶部双开关并排 */
.top-switches {
  display: flex;
  gap: 14px;
  align-items: center;
}

/* ============ 探索/材料 Tab ============ */
.side-tabs {
  display: flex;
  margin: 8px 12px 0;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
}
.side-tabs button {
  flex: 1;
  padding: 8px 0;
  background: transparent;
  border: none;
  color: #bbb;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.side-tabs button.active {
  background: linear-gradient(180deg,#eac27e,#c89a4a);
  color: #222;
  font-weight: 700;
}

/* 材料手风琴分类 —— 与探索页 cat-grid/cat-item 风格一致 */
.mat-cat { border-bottom: 1px solid rgba(255,255,255,.06); }
.mat-cat-head {
  display: flex; align-items: center; height: 32px; line-height: 1;
  cursor: pointer; user-select: none; font-size: 16px; color: #a7a7ad;
  margin-bottom: 10px; margin-top: 6px;
}
.mat-cat-head:hover { color: rgba(255,255,255,.85); }
.mat-cat-head .mat-cat-arrow { display: inline-block; width: 12px; transition: transform .15s; color: #999; font-size: 12px; }
.mat-cat.collapsed .mat-cat-arrow { transform: rotate(-90deg); }
.mat-cat-head .mat-cat-name { flex: 1; font-weight: 400; }
.mat-cat-head .mat-cat-count { color: #888; font-size: 12px; margin-right: 0; }
.mat-cat-body {
  display: grid; grid-template-columns: repeat(2, 1fr);
  grid-gap: 10px 17px; margin-bottom: 12px;
}
.mat-cat.collapsed .mat-cat-body { display: none; }
.mat-item {
  display: flex; align-items: center; height: 20px; line-height: 1;
  font-size: 14px; color: rgba(255,255,255,.6);
  cursor: pointer; min-width: 0; transition: color .15s;
}
.mat-item:hover { color: rgba(255,255,255,.85); }
.mat-item.checked { color: #eac27e; }
.mat-item .mat-item-name {
  max-width: 110px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; flex: 1;
}
.mat-item .mat-item-count {
  margin-left: 5px; flex: 0 0 auto; font-variant-numeric: tabular-nums;
  font-size: 12px; color: #888;
}

/* 材料聚合点 */
.mat-cluster {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.mat-cluster img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.6));
}
.mat-cluster span {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  background: rgba(10,14,10,.88); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 13px;
  padding: 0 5px; border-radius: 7px; white-space: nowrap;
  border: 1px solid rgba(255,255,255,.35);
  z-index: 2;
}
.mat-leaf {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.mat-leaf img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.6));
}

#explorePane, #materialPane { flex: 1; display: flex; flex-direction: column; min-height: 0; }
#explorePane .catalog-body, #materialPane .catalog-body { flex: 1; }
/* 材料星标收藏 */
.mat-star {
  flex: 0 0 auto; cursor: pointer; font-size: 12px; line-height: 1;
  color: #666; margin-right: 4px; user-select: none;
}
.mat-star:hover { color: #ffd700; }
.mat-item.fav .mat-star { color: #ffd700; }
.mat-item.fav { background: rgba(255, 215, 0, .06); }

/* 收藏筛选条 */
.mat-fav-filter {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; margin: 4px 8px; border-radius: 6px;
  background: rgba(255,255,255,.04); cursor: pointer;
  font-size: 12px; color: #aaa; user-select: none;
  border: 1px solid transparent;
}
.mat-fav-filter:hover { background: rgba(255,255,255,.08); }
.mat-fav-filter.on { border-color: rgba(255,215,0,.4); color: #ffd700; }
.mat-fav-filter .mat-fav-star { font-size: 14px; }

/* 地图点击 -> 侧栏闪烁高亮 */
.mat-item.flash { animation: matFlash 1.2s ease-out; }
@keyframes matFlash {
  0%, 100% { background: transparent; }
  20% { background: rgba(234, 194, 126, .35); }
  50% { background: rgba(234, 194, 126, .15); }
}



/* ============ 实时导航面板（V1.8.0 M2） ============ */
.nav-panel {
  position: fixed; left: 366px; bottom: 52px; z-index: 1100;
  width: 270px; max-width: calc(100vw - 28px);
  background: rgba(13,15,18,.92); border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.45);
  color: #e8e6e0; font-size: 12px; overflow: hidden;
}
.np-head { display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 8px; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.10); }
.np-title { font-size: 13px; font-weight: 600; color: #fff; }
.np-status { margin-left: auto; padding: 1px 8px; border-radius: 9px; font-size: 11px; }
.np-status.on { background: rgba(76,175,80,.25); color: #7edc82; }
.np-status.warn { background: rgba(255,183,3,.22); color: #ffd166; }
.np-status.off { background: rgba(255,255,255,.10); color: #9aa0a6; }
.np-status.paused { background: rgba(90,120,255,.22); color: #9db4ff; }
.np-min { margin-left: 2px; background: none; border: none; color: #9aa0a6;
  cursor: pointer; font-size: 13px; padding: 0 4px; }
.np-min:hover { color: #fff; }
.np-body { padding: 8px 10px 10px; }
.np-body.collapsed { display: none; }
.np-row { line-height: 1.6; word-break: break-all; }
.np-row.np-arrive { color: #7edc82; font-weight: 600; }
.np-opts { display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; color: #c9c7c0; }
.np-opt input[type=number] { width: 52px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18); color: #fff; border-radius: 4px;
  padding: 1px 4px; font-size: 12px; }
.np-chk { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 4px; cursor: pointer; }
.np-actions { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 6px; margin-top: 8px; }
.np-btn { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14); color: #e8e6e0; border-radius: 6px;
  padding: 4px 0; font-size: 12px; cursor: pointer; }
.np-btn:hover { background: rgba(255,255,255,.16); }
#navBtn.active { background: #eac27e; color: #222; border-color: #eac27e; }
.lv-dist { font: 600 12px "PingFang SC","Microsoft YaHei",sans-serif; color: #ffd166;
  text-shadow: 0 1px 2px #000, 0 0 3px #000; white-space: nowrap; text-align: center; }
@media (max-width: 720px) {
  .nav-panel { left: 8px; right: 8px; width: auto; bottom: 50px; }
}


/* ---------- V1.8.0 M3 返工：独立探索卡片（BOTW 风格，与材料卡片完全分离、无图） ---------- */
.explore-card {
  position: absolute;
  z-index: 610;
  width: 300px;
}
.ec-card {
  background: rgba(13,29,22,.98);
  border: 1px solid rgba(96,168,128,.55);
  border-radius: 8px;
  box-shadow: 0 10px 34px rgba(0,0,0,.55);
  padding: 10px 14px 12px;
  font-size: 13px;
}
.ec-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  cursor: move;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.ec-head .chip {
  background: rgba(96,168,128,.22);
  color: #8fd4a6;
  border: 1px solid rgba(96,168,128,.45);
  border-radius: 4px;
  font-size: 11px;
  padding: 2px 8px;
}
#ecName {
  font-size: 16px;
  color: #f0f6f1;
  margin: 4px 0 8px;
}
.ec-row {
  display: flex;
  margin: 2px 0;
  color: #93a89c;
  line-height: 1.7;
}
.ec-label {
  flex: 0 0 42px;
  color: #a8c0b0;
}
.ec-value { color: #eef4ef; }
#ecTrialRow .ec-value { color: #e8d9a8; }
.card-actions { display: flex; gap: 8px; margin-top: 10px; }
.card-actions .btn { flex: 1; font-size: 12px; padding: 7px 0; }

/* 移动端：探索卡片底部通栏 */
@media (max-width: 720px) {
  .explore-card {
    left: 8px !important;
    right: 8px;
    top: auto !important;
    bottom: 64px;
    width: auto;
  }
}

/* V1.8.3 视图跟随激活态（定位我 / 🎯 高亮） */
#zoomLocate.active, #npLocate.active { background: #ffb703 !important; color: #222 !important; }
