/* ============ 鏃烽噹涔嬫伅浜掑姩鍦板浘 鏍峰紡 ============ */
/* ===================== 旷野之息 VI 规范（v1.3.0） =====================
 * 字体：中文 PingFang SC → Microsoft YaHei → Noto Sans CJK SC → system-ui；
 *       数字/代码 Consolas → monospace；emoji 图标回退 Apple/Segoe UI Emoji。
 * 字重：标题 700 / 强调 600 / 正文 400；标题统一不加 letter-spacing。
 * 字号：主标题 15-17px / 组标题 14px / 正文 13px / 辅助 11.5px / 标签 10.5-12px。
 * 用色：底色墨绿黑 #0e1410（面板 #121a14）；主文字 #e8f0e4、次级 #93a68f。
 *       金色系：克洛格金 #f2c94c（标题/激活）→ 浅金 #e6cd8f（次级强调）
 *       → 深金 #a38745（边框/hover）→ 金棕底 #2e2712（激活底）→ 棕 #a98f63（提示）。
 *       进度条填充用浅灰金 #cfc7ad（柔和，避免刺眼）。
 * ===================================================================== */
:root {
  --bg: #0e1410;
  --panel: rgba(18, 26, 20, .92);
  --panel-solid: #121a14;
  --border: #2a3a2c;
  --text: #e8f0e4;
  --text-dim: #93a68f;
  /* 旷野之息金色系（v1.3.0 VI）：克洛格金主强调，浅金次级，深金/金棕底用于边框与激活底色 */
  --accent: #f2c94c;        /* 主强调：克洛格金（大类标题/激活/顶部游戏名） */
  --accent2: #d9c08a;       /* 次级强调：浅金 */
  --gold: #f2c94c;          /* 克洛格金 */
  --gold-lite: #e6cd8f;     /* 浅金：次级强调/进度条填充 */
  --gold-dim: #a38745;      /* 深金：hover/边框 */
  --gold-bg: #2e2712;       /* 金棕底：tab/按钮激活底 */
  --brown: #a98f63;         /* 棕：提示性强调 */
  --gold-soft: #cfc7ad;    /* 浅灰金：进度条填充（柔和） */
  --danger: #e0665f;
  --radius: 10px;
  --shadow: 0 8px 24px rgba(0,0,0,.45);

  /* ===== BOTWmap Design Tokens（V1.6.5 卡片系统重构） ===== */
  --fd-gold: #f2c94c;                /* 克洛格金：主强调色（标题/主按钮/选中） */
  --fd-gold-light: #e6cd8f;          /* 浅金：hover/次级强调 */
  --fd-gold-dim: #a38745;            /* 深金：边框/暗调文字 */
  --fd-gold-bg: #2e2712;             /* 金棕底：激活底色 */
  --fd-shiekah-blue: #4cd4f2;        /* 希卡科技蓝：神庙/塔域/主线专属 */
  --fd-shiekah-blue-bg: rgba(76, 212, 242, .14);
  --fd-ok: #4ade80;                  /* 绿勾完成 */
  --fd-ok-btn: #3aa76d;              /* 完成按钮底色 */
  --fd-danger: #e0665f;              /* 危险/删除/警示 */

  /* 卡片质感（墨绿黑半透明毛玻璃） */
  --fd-bg-card: rgba(14, 20, 16, .96);
  --fd-border-card: rgba(163, 135, 69, .32);
  --fd-border-lt: rgba(255, 255, 255, .08);
  --fd-shadow-card: 0 8px 32px rgba(0,0,0,.55);

  /* 文字五级灰阶（自然绿微冷调） */
  --fd-text-1: #f2f7f0;              /* L1: 面板标题/卡片主名 */
  --fd-text-2: #d2ded0;              /* L2: 正文/值 */
  --fd-text-3: #93a68f;              /* L3: 键名/说明 */
  --fd-text-4: #60715d;              /* L4: 占位/暗辅助 */
  --fd-text-5: rgba(255, 255, 255, .32); /* L5: 缺省/禁用 */

  --fd-r-card: 10px;
  --fd-r-ctl: 6px;
  --fd-r-sm: 4px;
  --fd-r-pill: 20px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

/* 材料图标悬停提示（v1.4.0） */
.map-tip {
  position: fixed; z-index: 60; pointer-events: none;
  max-width: 220px; padding: 5px 10px;
  background: rgba(10, 16, 12, .94); border: 1px solid var(--gold-dim); border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 12.5px; line-height: 1.45; color: var(--text);
  white-space: nowrap; text-align: center;
}
.map-tip b { color: var(--gold); font-weight: 600; }
.map-tip span { display: block; color: var(--text-dim); font-size: 11px; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Helvetica Neue", system-ui, sans-serif;
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}
#app { display: flex; flex-direction: column; height: 100vh; }

/* ---------- 椤舵爮 ---------- */
#topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; background: var(--panel-solid);
  border-bottom: 1px solid var(--border); flex: 0 0 auto;
  z-index: 10;
}
#btnSidebar { display: none; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { font-size: 26px; }
.brand h1 { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.brand h1 { color: var(--gold); letter-spacing: 1px; }
.brand h1 em { color: var(--gold-lite); font-style: normal; }
.brand .sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.tools { display: flex; gap: 8px; }
.tool {
  background: #1c2a1e; color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 5px; transition: .15s;
}
.tool:hover { background: #1d1a10; border-color: var(--gold-dim); }
.tool.active { background: var(--gold-bg); border-color: var(--gold-dim); color: var(--gold); }
.tool .ico { font-size: 15px; }

/* ---------- 布局 ---------- */
/* 侧栏 absolute 浮层后，#app 保持 column：顶栏在上，地图区占满剩余高度 */
#app { flex-direction: column; }
#topbar { width: 100%; flex: none; }
#sidebar {
  width: 300px; flex: none; background: var(--panel);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  position: absolute; top: 58px; left: 0; bottom: 0; z-index: 10;
}
/* 窗帘模式：收起时整条侧栏滑出屏幕左侧，地图容器始终全宽、零 resize，开关不影响地图视图 */
#sidebar.collapsed { transform: translateX(-100%); border-right-color: transparent; }
/* 桌面端侧栏折叠把手：贴在地图区左缘、搜索行高度，文字按钮；展开时贴侧栏右缘，收起时贴屏幕左缘 */
#sideCollapse {
  display: none;
  position: absolute; left: 300px; top: 28px;
  padding: 5px 9px; height: auto; width: auto;
  align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--border); border-left: none;
  border-radius: 0 8px 8px 0; color: var(--text-dim); cursor: pointer; z-index: 11;
  font-size: 12px; line-height: 1; white-space: nowrap;
}
@media (min-width: 761px) {
  #sideCollapse { display: flex; }
}
body.sidebar-collapsed #sideCollapse { left: 0; }
#sideCollapse:hover { color: var(--gold-lite); }
/* 侧栏图层分组：探索收集单列；设施/敌人/任务两列 */
.lg-group .lrows { display: block; }
/* v1.2.1：探索收集也改两列；minmax(0,1fr) 固定轨道不被长名字撑宽，与下组列对齐 */
.lg-group[data-group="探索收集"] .lrows,
.lg-group[data-group="设施地点"] .lrows,
.lg-group[data-group="敌人"] .lrows,
.lg-group[data-group="任务"] .lrows,
.lg-group[data-group="装备"] .lrows,
.lg-group[data-group="宝箱"] .lrows {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 6px;
}
.lg-group[data-group="探索收集"] .lrow,
.lg-group[data-group="设施地点"] .lrow,
.lg-group[data-group="敌人"] .lrow,
.lg-group[data-group="任务"] .lrow,
.lg-group[data-group="装备"] .lrow,
.lg-group[data-group="宝箱"] .lrow {
  flex-wrap: nowrap; column-gap: 6px; row-gap: 0; padding: 6px 6px; align-items: center; min-width: 0;
}
.lg-group[data-group="探索收集"] .lrow .lname,
.lg-group[data-group="设施地点"] .lrow .lname,
.lg-group[data-group="敌人"] .lrow .lname,
.lg-group[data-group="任务"] .lrow .lname,
.lg-group[data-group="装备"] .lrow .lname,
.lg-group[data-group="宝箱"] .lrow .lname {
  flex: 1; white-space: nowrap; min-width: 0; overflow: hidden;
}
.lg-group[data-group="探索收集"] .lrow .lprog,
.lg-group[data-group="设施地点"] .lrow .lprog,
.lg-group[data-group="敌人"] .lrow .lprog,
.lg-group[data-group="任务"] .lrow .lprog,
.lg-group[data-group="装备"] .lrow .lprog,
.lg-group[data-group="宝箱"] .lrow .lprog {
  flex: 0 0 auto; min-width: 0; text-align: right; font-size: 11px;
}
#mapArea { flex: 1; position: relative; height: calc(100vh - 58px); overflow: hidden; }
#mapCanvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#mapCanvas.measuring, #mapCanvas.pinning { cursor: crosshair; }
#mapCanvas.dragging { cursor: grabbing; }

/* 鎵嬫満鐗堜晶鏍忛伄缃╋紙妗岄潰闅愯棌锛?*/
#sideMask { position: absolute; inset: 0; background: rgba(0,0,0,.45); z-index: 15; }
#sideMask.hidden { display: none; }
.side-head { display: none; align-items: center; justify-content: space-between; padding: 10px 14px 4px; font-size: 13px; font-weight: 600; color: var(--gold); }

/* 侧栏 Tab（v1.1.7）：探索/材料切换；CSS 显隐不重建 DOM，图层/搜索/统计逻辑零改动 */
.side-tabs { display: flex; gap: 6px; padding: 10px 12px 0; }
.side-tab {
  flex: 1; padding: 9px 0; font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--panel); color: var(--text-dim); border: 1px solid var(--border);
  border-radius: 8px; letter-spacing: 1px; line-height: 1.2;
}
.side-tab:hover { color: var(--gold-lite); border-color: var(--gold-dim); }
.side-tab.active { background: var(--gold-bg); border-color: var(--gold-dim); color: var(--gold); }
/* 探索 Tab：隐藏材料组与材料搜索 */
#sidebar[data-tab="explore"] #matSearchWrap,
#sidebar[data-tab="explore"] .lg-group[data-group="材料"] { display: none; }
/* 材料 Tab：隐藏探索侧内容，只留材料·采集组 */
#sidebar[data-tab="material"] #exploreSearchWrap,
#sidebar[data-tab="material"] .layer-actions,
#sidebar[data-tab="material"] #statsCollapse,
#sidebar[data-tab="material"] .save-upload,
#sidebar[data-tab="material"] .lg-group:not([data-group="材料"]) { display: none; }

/* ---------- 鎼滅储 ---------- */
.search-wrap { padding: 12px 12px 6px; position: relative; }
.search-wrap input {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: #0f1a12; color: var(--text); font-size: 13px; outline: none;
}
.search-wrap input:focus { border-color: var(--accent); }
#searchResults, #matSearchResults {
  position: absolute; left: 12px; right: 12px; top: 52px; max-height: 320px; overflow-y: auto;
  background: var(--panel-solid); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow); z-index: 30;
}
.sr-item { padding: 8px 10px; cursor: pointer; font-size: 12.5px; border-bottom: 1px solid rgba(255,255,255,.04); display: flex; justify-content: space-between; gap: 8px; }
.sr-item:hover { background: #1d2e20; }
.sr-item .sr-name { color: var(--text); }
.sr-item .sr-meta { color: var(--text-dim); flex-shrink: 0; font-size: 11px; }
.sr-item.done .sr-name { color: var(--text-dim); text-decoration: line-through; }

/* ---------- 鍥惧眰 ---------- */
.layer-actions { padding: 8px 12px; display: flex; align-items: center; gap: 8px; }
.mini {
  background: #1c2a1e; color: var(--text-dim); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer;
}
.mini:hover { color: var(--text); border-color: var(--gold-dim); }
#layerCount { font-size: 11px; color: var(--text-dim); margin-left: auto; }

.layer-list { flex: 1; overflow-y: auto; padding: 4px 8px 8px; scrollbar-gutter: stable; }

/* ---------- 设置弹层（地名样式） ---------- */
#settingsBox {
  position: absolute; z-index: 26; width: 340px; max-width: calc(100vw - 24px); right: 12px; top: 66px;
  background: var(--panel-solid); border: 1px solid var(--gold-dim);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px;
}
.st-group { margin: 10px 0; }
.st-label { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.st-options { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.st-opt {
  padding: 5px 13px; border-radius: 6px; border: 1px solid var(--border);
  background: #0f1a12; color: var(--text); font-size: 12px; cursor: pointer;
}
.st-opt:hover { border-color: var(--gold-dim); }
.st-opt.sel { border-color: var(--gold); color: var(--gold); background: rgba(242,201,76,.12); font-weight: 600; }
.st-picker { position: relative; overflow: hidden; }
.st-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.st-row { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.st-slabel { font-size: 11.5px; color: var(--text-dim); flex: none; }
.st-row input[type="range"] { flex: 1; accent-color: var(--accent); min-width: 0; height: 18px; }
.st-sval { width: 38px; flex: none; font-size: 11px; color: var(--text-dim); text-align: right; font-variant-numeric: tabular-nums; }
.st-foot { margin-top: 12px; display: flex; justify-content: flex-end; }
.lg { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 2px; padding: 4px 8px; font-size: 14px; color: var(--gold); font-weight: 700; }
.lg-btn { background: none; border: 1px solid rgba(255,255,255,.16); border-radius: 3px; color: var(--text-dim); font-size: 10.5px; padding: 1px 7px; cursor: pointer; letter-spacing: 0; white-space: nowrap; }
.lg-btn:hover { color: #fff; border-color: var(--accent); }
.lrow {
  display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 6px;
  cursor: pointer; font-size: 13px; user-select: none; color: #c9d4c9;
}
.lrow:hover { background: rgba(255,255,255,.05); }
.lrow .lg-ic, .lrow .lg-ic-mat { width: 13px; height: 13px; object-fit: contain; flex-shrink: 0; }
.lrow .dot { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.lrow .lname { flex: 1; color: #c9d4c9; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .lcount { color: var(--text-dim); font-size: 11.5px; }
.lrow .lprog { font-size: 11.5px; min-width: 0; text-align: right; color: #9fb0a0; }
.lrow .lsub { color: var(--text-dim); font-size: 10px; margin-left: 6px; white-space: nowrap; }
.lrow.done .lname { color: var(--text-dim); }
/* v1.2.1 激活行：整行点击切换，文字与数字变黄（gamesir 风格），极淡金底 */
.lrow.on { background: rgba(242,201,76,.07); }
.lrow.on:hover { background: rgba(242,201,76,.12); }
.lrow.on .lname, .lrow.on .lprog { color: var(--gold); }

/* ---------- 缁熻 ---------- */
/* 探索度按钮（v1.1.9 弹卡查看） */
.collapsible-head {
  display: flex; align-items: center; gap: 4px; width: 100%;
  background: none; border: none; border-top: 1px solid var(--border);
  color: var(--gold); font-size: 14px; font-weight: 700;
  cursor: pointer; padding: 10px 14px 4px;
}
.collapsible-head:hover { color: var(--gold-lite); }

/* 探索度面板（v1.2.1 内嵌侧栏底部，可展开收起；面板自身滚动避免截断） */
#statsCollapse .stats-body {
  padding: 8px 14px 10px;
  max-height: 42vh; overflow-y: auto;
  border-top: 1px solid var(--border);
}
.stats h4 { font-size: 12px; color: var(--gold); margin-bottom: 8px; letter-spacing: 1px; }

/* 细滚动条（v1.1.9）：全站统一，减轻视觉重量 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }
::-webkit-scrollbar-track { background: transparent; }
.stat-row { display: flex; justify-content: space-between; font-size: 12px; margin: 4px 0; }
.stat-row .k { color: var(--text-dim); }
.stat-row .v { color: var(--text); font-weight: 600; }
.stat-sync { font-size: 10.5px; color: #7dffa0; margin: 2px 0 6px; letter-spacing: .3px; }
.stat-mem .k { padding-left: 0; }
.stat-mem { margin-top: 6px; }
.stat-note { font-size: 10.5px; color: var(--text-dim); margin: -2px 0 4px; padding-left: 10px; line-height: 1.5; }
.stat-note b { color: #ffd166; font-weight: 600; }
.stat-note .warn { color: #ff9b66; }
/* 存档上传入口 */
.save-upload { position: relative; flex: 0 0 auto; padding: 0 14px 8px; border-top: 1px solid var(--border); }
.save-upload .su-row { display: flex; gap: 6px; align-items: center; }
.save-upload button { flex: 1; padding: 6px 8px; font-size: 11.5px; color: var(--gold-lite);
  background: rgba(242,201,76,.10); border: 1px dashed rgba(242,201,76,.4); border-radius: 6px; cursor: pointer; }
.save-upload button:hover { background: rgba(61,106,60,.32); }
.su-help { flex: 0 0 auto; width: 18px; height: 18px; line-height: 16px; text-align: center;
  font-size: 11px; font-weight: 700; color: var(--gold); border: 1px solid rgba(242,201,76,.4);
  border-radius: 50%; cursor: help; user-select: none; }
.su-help:hover, .su-help:focus { background: rgba(61,106,60,.32); outline: none; }
.su-tip { position: absolute; bottom: calc(100% + 8px); left: 0; right: 0; z-index: 30;
  background: #1d1a10; border: 1px solid rgba(242,201,76,.3); border-radius: 8px;
  padding: 10px 12px; font-size: 11px; line-height: 1.65; color: var(--text);
  box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.su-tip b { color: var(--brown); }
.su-tip code { font-family: Consolas, "Courier New", monospace; font-size: 10.5px;
  color: #ffd166; background: rgba(0,0,0,.25); padding: 1px 4px; border-radius: 3px; word-break: break-all; }
.su-tip .su-tip-sub { color: var(--text-dim); margin-top: 4px; }
.stat-bar { height: 4px; background: #20301f; border-radius: 2px; margin: 2px 0 8px; overflow: hidden; }
.stat-bar > i { display: block; height: 100%; background: var(--gold-soft); border-radius: 2px; transition: width .3s; }
.side-foot { padding: 8px 14px; border-top: 1px solid var(--border); font-size: 10.5px; color: var(--text-dim); line-height: 1.5; }
.side-foot .foot-version { color: #d8d3c5; font-weight: 500; }
.side-foot a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }
.side-foot a:hover { color: var(--gold); }
/* 存档区：清空旧探索度按钮（v1.4.2）：圆形扫把，样式与 ? 帮助一致，置于行尾 */
.save-upload .su-clear-wrap { position: relative; flex: 0 0 auto; }
.save-upload .su-clear { display: block; width: 18px; height: 18px; padding: 0; line-height: 16px; text-align: center;
  font-size: 11px; font-weight: 700; color: var(--gold); background: transparent;
  border: 1px solid rgba(242,201,76,.4); border-radius: 50%; cursor: pointer; user-select: none; }
.save-upload .su-clear:hover { background: rgba(192,57,43,.32); border-color: rgba(192,57,43,.6); }
.su-clear-tip { position: absolute; bottom: calc(100% + 6px); right: 0; white-space: nowrap;
  background: #1d1a10; border: 1px solid rgba(242,201,76,.3); border-radius: 6px; padding: 4px 9px;
  font-size: 11px; color: var(--text); box-shadow: 0 4px 12px rgba(0,0,0,.45); z-index: 30; }

/* ---------- 鍦板浘鎺т欢 ---------- */
#zoomControls { position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 6px; z-index: 5; }
#zoomPct {
  text-align: center; font-size: 10px; color: var(--text-dim);
  font-variant-numeric: tabular-nums; user-select: none; line-height: 1.2;
}
#zoomControls button {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text); font-size: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
#zoomControls button:hover { border-color: var(--accent); }
#coordReadout {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 36px; z-index: 5;
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 10px; font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums;
}
/* ---------- live 实时层 ---------- */
#zoomControls .live-follow { color: var(--text-dim); font-size: 15px; }
#zoomControls .live-follow.on {
  color: var(--gold); border-color: var(--gold-dim); background: var(--gold-bg);
  box-shadow: 0 0 8px rgba(255, 209, 102, .35);
}
#liveStatus {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 8px; z-index: 5;
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 10px; font-size: 11.5px; font-variant-numeric: tabular-nums;
  max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#liveStatus.on { color: var(--gold-lite); border-color: rgba(242, 201, 76, .4); }
#liveStatus.warn { color: #ffd166; border-color: rgba(255, 209, 102, .4); }
#liveStatus.off { color: var(--text-dim); }
#cardNav.nav { background: #3a5a17; border-color: #8fbf3a; color: #eaffd0; }
#cardNav.nav:hover { background: #4a7020; }
#modeHint {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 6;
  background: var(--panel); border: 1px solid var(--gold-dim); color: var(--gold-lite);
  border-radius: 20px; padding: 6px 16px; font-size: 12.5px;
}
#toast {
  position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 40;
  background: #1d2e20; border: 1px solid var(--border); border-radius: 8px; padding: 8px 18px;
  font-size: 13px; opacity: 0; transition: opacity .25s; pointer-events: none;
}
#toast.show { opacity: 1; }

/* ---------- 收集模式（回忆 / 克洛格 连续自动导航） ---------- */
#collectBar {
  position: absolute; left: 50%; bottom: 68px; transform: translateX(-50%); z-index: 6;
  background: #1d2e20; border: 1px solid var(--accent); border-radius: 20px;
  padding: 5px 14px; font-size: 12px; color: var(--text);
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,.35); font-variant-numeric: tabular-nums;
  max-width: 88vw; overflow: hidden;
}
#collectBar .dim { color: var(--text-dim); }
#collectBar.arrived { border-color: #ffd166; }
#collectBar.arrived #collectBarCur { color: #ffd166; }
#collectBar.paused { border-color: var(--border); opacity: .85; }
#collectBar.paused #collectBarCur { color: var(--text-dim); }
#collectStop {
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 12px; padding: 2px 10px; font-size: 11.5px; cursor: pointer; flex: none;
}
#collectStop:hover { color: #ff8f8f; border-color: var(--danger); }

/* ---------- 手机镜像面板（V1.5.0） ---------- */
#btnMirror.on { color: var(--gold); border-color: var(--gold-dim); background: var(--gold-bg); }
#mirrorPanel {
  position: absolute; right: 14px; bottom: 90px; z-index: 8; width: 250px;
  background: var(--panel); border: 1px solid var(--accent); border-radius: 10px;
  padding: 10px 12px 12px; box-shadow: 0 4px 18px rgba(0,0,0,.4);
}
#mirrorPanel .mp-head { font-size: 12.5px; color: var(--gold-lite); margin-bottom: 8px; }
#mirrorPanel .mp-qr { text-align: center; margin-bottom: 8px; }
#mirrorPanel .mp-qr img { width: 176px; height: 176px; border-radius: 6px; background: #fff; border: 1px solid #fff; }
#mirrorPanel .mp-url-wrap { display: flex; gap: 6px; }
#mirrorPanel .mp-url-wrap input {
  flex: 1; min-width: 0; background: #14211a; color: var(--text);
  border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; font-size: 11.5px;
}
#mirrorPanel .mp-url-wrap button {
  background: #3a5a17; border: 1px solid #8fbf3a; color: #eaffd0; border-radius: 6px;
  padding: 0 10px; font-size: 11.5px; cursor: pointer; flex: none;
}
#mirrorPanel .mp-hint { margin: 8px 0 0; font-size: 11px; color: var(--text-dim); }
#mirrorPanel .mp-close {
  position: absolute; top: 6px; right: 8px; background: transparent; border: none;
  color: var(--text-dim); font-size: 16px; cursor: pointer; line-height: 1;
}
#mirrorPanel .mp-close:hover { color: #ff8f8f; }

/* ---------- 鑷畾涔夋爣璁拌〃鍗?---------- */
#pinForm {
  position: absolute; z-index: 18; width: 200px;
  background: var(--panel-solid); border: 1px solid var(--gold-dim);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px;
}
.pf-head { font-size: 12.5px; font-weight: 600; color: var(--gold); margin-bottom: 8px; }
#pinForm input {
  width: 100%; padding: 7px 9px; border-radius: 6px; border: 1px solid var(--border);
  background: #0f1a12; color: var(--text); font-size: 13px; outline: none; margin-bottom: 8px;
}
#pinForm input:focus { border-color: var(--accent); }
.pf-colors { display: flex; gap: 5px; margin-bottom: 10px; }
.sw { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.sw.sel { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.pf-actions { display: flex; gap: 8px; }
.pf-actions button { flex: 1; padding: 6px 0; border-radius: 6px; font-size: 12.5px; cursor: pointer; border: 1px solid transparent; }

/* ---------- 鍒嗕韩寮瑰眰 ---------- */
#shareBox {
  position: absolute; z-index: 25; width: 320px; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: var(--panel-solid); border: 1px solid var(--gold-dim);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px;
}
.sb-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; color: var(--gold); margin-bottom: 8px; }
.sb-tip { font-size: 12px; color: var(--text-dim); margin-bottom: 10px; }
#shareUrl {
  width: 100%; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--border);
  background: #0f1a12; color: var(--text); font-size: 12px; margin-bottom: 10px; outline: none;
}
#sbCopy { width: 100%; padding: 9px 0; border-radius: 6px; font-size: 13px; cursor: pointer; }

/* ---------- 帮助弹窗（Q&A） ---------- */
#helpBox {
  position: absolute; z-index: 27; width: 440px; max-width: calc(100vw - 24px);
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: var(--panel-solid); border: 1px solid var(--gold-dim);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px;
  max-height: min(72vh, 640px); overflow-y: auto;
}
.hq h4 { font-size: 12.5px; color: var(--gold); margin: 14px 0 6px; letter-spacing: .3px; }
.hq h4:first-child { margin-top: 0; }
.hq p { font-size: 12px; line-height: 1.7; color: var(--text); margin: 4px 0; }
.hq p b { color: var(--brown); font-weight: 600; }
.hq code {
  display: block; font-family: Consolas, "Courier New", monospace; font-size: 11px;
  color: #ffd166; background: rgba(0,0,0,.25); padding: 6px 8px; border-radius: 5px;
  margin: 4px 0; word-break: break-all; user-select: text; cursor: text;
  border: 1px dashed rgba(255,209,102,.28);
}
.hq p code { display: inline; padding: 1px 5px; font-size: 10.5px; }
.hq .hq-note { color: var(--text-dim); font-size: 11.5px; }
.hq hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.hq .hq-dot { font-weight: 700; }
.hq .hq-dot.on { color: #7dffa0; }
.hq .hq-dot.warn { color: #e8b04a; }
.hq .hq-dot.off { color: #c97a7a; }

/* ---------- 信息卡片（V1.6.5 卡片系统升级） ---------- */
#infoCard {
  position: absolute; z-index: 20; width: 350px; max-width: calc(100vw - 24px);
  background: var(--fd-bg-card);
  border: 1px solid var(--fd-border-card);
  border-radius: var(--fd-r-card);
  box-shadow: var(--fd-shadow-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 14px 16px 16px;
  font-size: 13px;
  color: var(--fd-text-1);
}
.card-head {
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
  cursor: grab; padding: 2px 0; margin-left: -2px; margin-right: -2px;
  border-bottom: 1px solid var(--fd-border-lt); padding-bottom: 6px;
  touch-action: none;
}
.card-head:active { cursor: grabbing; }
.card-head::before {
  content: ""; flex: 0 0 auto; width: 11px; height: 9px; opacity: .4;
  background-image: radial-gradient(currentColor 1px, transparent 1.1px);
  background-size: 3.5px 3.5px; color: rgba(255,255,255,.9);
}
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: var(--fd-r-pill); font-size: 11px; font-weight: 500;
  background: rgba(242,201,76,.12); color: var(--fd-gold); border: 1px solid rgba(242,201,76,.35);
}
.card-close {
  background: none; border: none; color: var(--fd-text-3); font-size: 19px; cursor: pointer; line-height: 1;
  width: 22px; height: 22px; border-radius: var(--fd-r-sm); transition: .15s;
  display: flex; align-items: center; justify-content: center;
}
.card-close:hover { color: #fff; background: rgba(255,255,255,.1); }
#cardName {
  font-size: 15px; font-weight: 700; margin-bottom: 0; color: var(--fd-text-1);
  line-height: 1.35; word-break: break-word; flex: 1; min-width: 0;
}
#cardEn { font-size: 12px; color: var(--fd-text-3); margin-bottom: 8px; word-break: break-all; }
#cardExtra { display: block; width: 100%; }

/* 材料卡片（TOTK 风格，v1.4.0）：图鉴图 + 区域/坐标/位置 meta + 用途 */
.card-img {
  display: block; width: 150px; height: 150px; margin: 6px auto 6px;
  object-fit: contain; background: rgba(255,255,255,.05);
  border: 1px solid var(--fd-border-lt); border-radius: 8px; padding: 4px;
  cursor: zoom-in;
}
.card-meta { margin: 8px 0 2px; }
.meta-row, .card-body .row {
  display: flex; align-items: baseline; gap: 8px; margin: 3px 0;
  font-size: 12.5px; line-height: 1.65;
}
.meta-label, .card-body .row-label, .card-body .row > span:first-child:not(.korok-zoom) {
  flex: 0 0 44px; color: var(--fd-text-3); letter-spacing: .25em; font-size: 12px; user-select: none;
}
.meta-val, .card-body .row b, .card-body .row > span:last-child {
  flex: 1; min-width: 0; color: var(--fd-text-1); font-weight: normal; word-break: break-word;
}
.card-usage {
  margin: 6px 0 2px; font-size: 12.5px; line-height: 1.65;
  display: flex; align-items: baseline; gap: 8px;
}
.usage-label { flex: 0 0 44px; color: var(--fd-text-3); letter-spacing: .25em; font-size: 12px; user-select: none; }
#cardUsageVal { flex: 1; color: var(--fd-gold); font-weight: 500; word-break: break-word; }
.card-actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.card-actions button {
  flex: 1; min-width: 0; min-height: 40px; border-radius: var(--fd-r-ctl); padding: 9px 4px; font-size: 13px;
  font-weight: 600; cursor: pointer; border: 1px solid transparent; font-family: inherit; transition: .15s;
  display: inline-flex; align-items: center; justify-content: center;
}
.card-actions button:active { transform: scale(.97); }
.primary { background: var(--fd-gold); color: #2e2410; font-weight: 600; border-color: var(--fd-gold) !important; }
.primary:hover { filter: brightness(1.1); }
.ghost { background: transparent; border-color: rgba(255,255,255,.18) !important; color: var(--fd-text-2); }
.ghost:hover { border-color: var(--fd-gold-dim) !important; color: var(--fd-gold); }
.danger { background: transparent; border-color: rgba(224,102,95,.4) !important; color: var(--fd-danger); }
.danger:hover { background: rgba(224,102,95,.15); }
.hidden { display: none !important; }

/* 信息卡三按钮统一层级：导航=绿色主操作 / 收集=金色模式 / 标记完成=中性次操作 */
#cardDone { background: transparent; border-color: rgba(255,255,255,.2); color: var(--fd-text-2); font-weight: 500; }
#cardDone:hover { border-color: var(--fd-gold-dim); color: var(--fd-gold); }
#cardCollect.collect { background: transparent; border-color: var(--fd-gold-dim); color: var(--fd-gold-light); font-weight: 500; }
#cardCollect.collect.on { background: var(--fd-gold-bg); border-color: var(--fd-gold); color: var(--fd-gold); font-weight: 600; box-shadow: 0 0 0 1px rgba(242,201,76,.35); }
#cardCollect.collect:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- 克洛格详情块（v1.1.1） ---------- */
.korok-badge {
  display: inline-block; padding: 1px 9px; border-radius: 10px;
  border: 1px solid; font-size: 11px; line-height: 1.7;
  background: rgba(255,255,255,.05);
}
.korok-shot-wrap { position: relative; margin: 7px 0 3px; }
/* 截图为 200px 源图：按自然尺寸居中显示（不拉伸），灯箱与原图同分辨率，避免"放大反而变小"的错觉 */
.korok-shot {
  display: block; width: auto; max-width: 100%; height: auto;
  margin: 0 auto; border-radius: 8px;
  border: 1px solid var(--border); background: #0b140e;
  cursor: zoom-in; image-rendering: auto;
}
.korok-zoom {
  position: absolute; right: 6px; bottom: 6px; font-size: 10px; color: #fff;
  background: rgba(8,12,8,.72); padding: 2px 8px; border-radius: 8px;
  pointer-events: none;
}
.korok-note { color: var(--text-dim); font-size: 11px; margin-left: 4px; }
.korok-start { flex-wrap: wrap; gap: 4px; }
.korok-nav-start {
  margin-left: 6px; padding: 1px 9px; border-radius: 9px; font-size: 11px;
  background: rgba(255,255,255,.06); border: 1px solid; cursor: pointer;
}
.korok-nav-start:active { transform: scale(.96); }

/* 截图大图灯箱（v1.1.1） */
#imgLightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
#lbBack { position: absolute; inset: 0; background: rgba(5,10,7,.9); cursor: zoom-out; }
#lbImg {
  position: relative; max-width: 92vw; max-height: 86vh;
  border-radius: 8px; box-shadow: 0 6px 30px rgba(0,0,0,.6);
  touch-action: manipulation;
}
#lbMeta {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  font-size: 11px; color: #cfd8cf; background: rgba(8,12,8,.72);
  padding: 3px 10px; border-radius: 9px; white-space: nowrap;
}
#lbClose {
  position: absolute; top: 12px; right: 16px; z-index: 2;
  font-size: 28px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.7);
}

/* 滚动条（v1.1.9 细样式已在上面统一，此处不再重复定义） */

@media (max-width: 760px) {
  /* 椤舵爮绮剧畝锛氶殣钘忓壇鏍囬涓庡伐鍏锋枃瀛楋紝鍙暀鍥炬爣 */
  #topbar { flex-wrap: wrap; padding: 6px 10px 4px; row-gap: 3px; }
  .brand { flex: 1 1 100%; min-width: 0; white-space: nowrap; }
  .brand .logo { font-size: 20px; }
  .brand .sub { display: none; }
  .brand h1 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tools { flex: 1 1 100%; justify-content: space-between; gap: 4px; }
  .tool { flex: 1 1 0; justify-content: center; padding: 8px 2px; min-width: 0; }
  .tool .label { display: inline; font-size: 11px; }
  #btnSidebar { display: inline-flex; }

  /* 渚ф爮 鈫?鎶藉眽锛氶粯璁ゆ敹璧凤紝娴湪鍦板浘涓婃柟 */
  #app { position: relative; }
  #mapArea { flex: 1 1 100%; min-width: 0; height: auto; }
  #sidebar {
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 264px; flex: none; height: auto;
    transform: translateX(-102%);
    transition: transform .22s ease;
    z-index: 20; background: var(--panel-solid);
    box-shadow: var(--shadow);
  }
  #sidebar.open { transform: translateX(0); }
  .side-head { display: flex; }
  #sideMask:not(.hidden) { display: block; }

  #infoCard { left: 8px; right: 8px; bottom: 8px; top: auto; width: auto; max-width: none; max-height: 55vh; overflow-y: auto; border-color: var(--gold-dim); box-shadow: 0 0 0 1px rgba(242,201,76,.25), var(--shadow); }
  #shareBox { width: calc(100vw - 40px); max-width: 320px; }
  #pinForm { width: 190px; }
  #zoomControls { right: 10px; bottom: 14px; }
  #coordReadout { left: 50%; transform: translateX(-50%); bottom: 34px; font-size: 11px; }
  #liveStatus { left: 50%; transform: translateX(-50%); bottom: 8px; font-size: 10.5px; max-width: 56vw; }
  #modeHint { font-size: 11.5px; padding: 5px 12px; }
  #toast { font-size: 12px; width: 86vw; text-align: center; }
  #collectBar { font-size: 11px; bottom: 62px; max-width: 92vw; }
  #mirrorPanel { right: 10px; bottom: 96px; width: min(240px, 86vw); }
}

/* ---------- 图层组合（v1.1.8 已移除） ---------- */

/* 材料组双列：对齐任务/设施组，grid 两列，数字右对齐，星星在名字后 */
/* v1.2.1 材料大类行：更大字号 + 蓝色，与材料行区分（去掉图标） */
.lg-group[data-group="材料"] .mat-cat-head {
  font-size: 14px; font-weight: 700; color: var(--accent2);
  padding: 7px 6px 3px; cursor: pointer; gap: 6px;
}
.lg-group[data-group="材料"] .mat-cat-head .lname { color: var(--gold); font-size: 14px; font-weight: 700; }
.lg-group[data-group="材料"] .mat-cat-head .lprog { color: var(--text-dim); font-size: 11px; }
.lg-group[data-group="材料"] .mat-cat-body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 6px;
}
.lg-group[data-group="材料"] .mat-item {
  flex-wrap: nowrap; padding: 4px 2px; align-items: center; white-space: nowrap; min-width: 0; overflow: hidden;
}
.lg-group[data-group="材料"] .mat-item .lname { flex: 1 1 0%; min-width: 0; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.lg-group[data-group="材料"] .mat-item .lprog {
  flex: 0 0 auto; min-width: 30px; text-align: right; font-size: 11px; color: var(--text-dim);
}

/* ============ 任务板块（V1.6.0） ============ */
/* 探索面板 · 任务组（与材料组同构：lg 分组头 + lrow 行） */
.lg-group[data-group="任务"] .lrow { cursor: pointer; }
/* V1.6.2：任务/宝箱分类图标（卡通图标含透明边距，侧栏放到 22px 才与别行小图标视觉齐平） */
.lg-group[data-group="任务"] .lrow .lg-ic,
.lg-group[data-group="宝箱"] .lrow .lg-ic { width: 22px; height: 22px; }

/* ---------- 悬停名称条（V1.6.1）：地图左上角统一显示当前悬停目标名称 ---------- */
#hoverName {
  position: absolute; left: 0; top: 0; z-index: 45; pointer-events: none;
  max-width: min(50vw, 460px); padding: 5px 12px; border-radius: 8px;
  background: var(--panel-solid); border: 1px solid var(--gold-dim);
  box-shadow: 0 4px 14px rgba(0,0,0,.45);
  font-size: 13px; line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#hoverName.hidden { display: none; }
#hoverName .hn-kind { color: var(--brown); font-size: 11.5px; margin-right: 8px; }
#hoverName .hn-name { color: var(--gold-lite); font-weight: 600; }

/* ---------- 定位光圈（V1.6.1）：从 canvas 提到 DOM 层，z-index 压过所有卡片 ---------- */
.mk-locate-ring {
  position: absolute; z-index: 940; pointer-events: none; border-radius: 50%;
  border: 2.5px solid rgba(255, 209, 102, .95);
  box-shadow: 0 0 0 1px rgba(255, 233, 168, .55);
  animation: mk-ring-pulse 1.6s ease-out forwards;
}
.mk-locate-ring.static { animation: none; transform: scale(1.15); opacity: .9; }
@keyframes mk-ring-pulse {
  0%   { transform: scale(.35); opacity: 0; }
  18%  { opacity: 1; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* ============ 任务卡片 / 装备卡片 / 宝箱卡片 / 营地卡片（BOTWmap 联邦视觉） ============ */
#questCard, #equipCard, #chestCard, #campCard {
  position: absolute; z-index: 21; width: 350px; max-width: calc(100vw - 24px);
  max-height: 78vh; overflow-y: auto; pointer-events: auto;
  background: var(--fd-bg-card);
  border: 1px solid var(--fd-border-card);
  border-radius: var(--fd-r-card);
  box-shadow: var(--fd-shadow-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 14px 16px 16px; font-size: 13px; color: var(--fd-text-1);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent;
}
#questCard.hidden, #equipCard.hidden, #chestCard.hidden, #campCard.hidden { display: none; }
#questCard::-webkit-scrollbar, #equipCard::-webkit-scrollbar, #chestCard::-webkit-scrollbar, #campCard::-webkit-scrollbar { width: 3px; }
#questCard::-webkit-scrollbar-thumb, #equipCard::-webkit-scrollbar-thumb, #chestCard::-webkit-scrollbar-thumb, #campCard::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }
#questCardBody, #equipCardBody, #chestCardBody, #campCardBody { padding: 0; }

/* 顶部：tk-grip 抓手 + 分类徽章 + 操作 */
.tk-grip {
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
  cursor: grab; padding: 2px 0; margin-left: -2px; margin-right: -2px;
  border-bottom: 1px solid var(--fd-border-lt); padding-bottom: 6px;
  touch-action: none;
}
.tk-grip:active { cursor: grabbing; }
.tk-grip::before {
  content: ""; flex: 0 0 auto; width: 11px; height: 9px; opacity: .4;
  background-image: radial-gradient(currentColor 1px, transparent 1.1px);
  background-size: 3.5px 3.5px; color: rgba(255,255,255,.9);
}
.tk-chip {
  font-size: 11px; padding: 2px 7px; border-radius: 4px;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.7);
  white-space: nowrap;
}
.tk-chip-main { background: rgba(242,201,76,.12); color: var(--fd-gold); }
.tk-chip-imp  { background: rgba(126,200,169,.16); color: #7ec8a9; }
.tk-chip-sub  { background: var(--fd-shiekah-blue-bg); color: var(--fd-shiekah-blue); }
.tk-chip-mini { background: rgba(184,160,232,.16); color: #c4b0f0; }
.tk-close {
  margin-left: auto; width: 22px; height: 22px; line-height: 1;
  border: none; background: transparent; color: var(--fd-text-3);
  font-size: 19px; cursor: pointer; border-radius: 4px; flex: 0 0 auto;
}
.tk-grip-acts { display: flex; align-items: center; gap: 3px; margin-left: auto; }
.tk-grip-acts .tk-close { margin-left: 0; }
.tk-icon-btn {
  width: 22px; height: 22px; padding: 0; line-height: 1;
  border: 1px solid rgba(255,255,255,.28); background: transparent;
  color: rgba(255,255,255,.65); font-size: 13px; border-radius: 5px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.tk-icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.45); }
.tk-grip-acts .tk-nav { width: 22px; height: 22px; font-size: 13px; }
.tk-close:hover { background: rgba(255,255,255,.1); color: #fff; }

/* 标题行：档内序号徽标（金底黑字）+ 名称 + 复制 */
.tk-title-row {
  display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px;
}
.tk-name {
  font-size: 16px; font-weight: 600; line-height: 1.4; color: #f0f1f3;
  margin: 0; min-width: 0; flex: 1; word-break: break-word;
}
.tk-no-badge {
  background: var(--fd-gold); color: #2e2410; font-weight: bold; font-size: 12px;
  padding: 2px 7px; border-radius: 4px; flex: 0 0 auto; margin-top: 1px;
  font-variant-numeric: tabular-nums;
}
.tk-copy {
  display: inline-block; border: none; background: none; padding: 0 2px;
  margin-left: 6px; color: #9a8a6c; font-size: 11px; font-weight: normal;
  line-height: 1; cursor: pointer; vertical-align: baseline;
}
.tk-copy:hover { color: var(--fd-gold); }

/* 关键信息（★ 区域一行、位置一行：block 纵向排列，TOTKmap 卡片结构） */
.tk-meta { margin-bottom: 4px; display: block; }
.tk-mrow { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.7; }
.tk-mk { color: rgba(255,255,255,.42); flex: 0 0 52px; }
.tk-mv { color: rgba(255,255,255,.85); flex: 1; }
.co-link { color: var(--fd-gold); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none; letter-spacing: .3px; }
.co-link:hover { text-decoration: underline; }
.tk-plabel { color: var(--fd-gold); font-weight: 600; font-size: 13px; letter-spacing: .3px; flex: 0 0 auto; margin-right: 8px; }
.tk-mtag {
  display: inline-block; font-size: 11.5px; line-height: 1.6;
  padding: 1px 7px; border-radius: 4px; flex: 0 0 auto;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.7);
}

/* kv 行（前置/后续/注意/奖励） */
.tk-kv { display: flex; gap: 8px; margin-bottom: 5px; font-size: 12.5px; }
.tk-kv-div { border-top: 1px solid rgba(255,255,255,.07); padding-top: 8px; margin-top: 8px; }
.tk-sec-b + .tk-kv { margin-top: 6px; }
.tk-k { color: rgba(255,255,255,.42); flex: 0 0 56px; }
.tk-v { flex: 1; color: rgba(255,255,255,.85); }
.tk-req { color: var(--fd-gold); }
.tk-req .tk-none2 { color: rgba(242,201,76,.6); }
.tk-req-link { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.tk-none2 { color: var(--fd-text-5); font-size: 11px; }
.tk-dash { color: var(--fd-text-5); font-weight: bold; }
.tk-kv b, .tk-note b { color: #fff; font-weight: 600; }

/* 分区（任务要点/流程地点） */
.tk-sec { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--fd-border-lt); }
.tk-sec-t {
  font-size: 11.5px; color: var(--fd-gold-dim); margin-bottom: 5px;
  display: flex; align-items: center; gap: 6px; letter-spacing: .2em;
}
.tk-src {
  font-size: 10px; color: rgba(255,255,255,.35);
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--fd-r-pill); padding: 0 5px;
}
.tk-sec-b { font-size: 12.5px; line-height: 1.65; color: var(--fd-text-2); }

/* 官方分步（编号圆点） */
.tk-steps { list-style: none; margin: 0; padding: 0; }
.tk-step { display: flex; gap: 8px; margin-bottom: 6px; }
.tk-step-no {
  flex: 0 0 17px; height: 17px; line-height: 17px; text-align: center;
  font-size: 10.5px; border-radius: 50%;
  background: rgba(242,201,76,.18); color: var(--fd-gold);
  font-variant-numeric: tabular-nums; margin-top: 2px;
}
.tk-step-tx { flex: 1; }
.tk-pending { color: var(--fd-text-4); font-style: italic; }
.tk-none {
  font-size: 12.5px; color: var(--fd-text-4);
  background: rgba(255,255,255,.04); border-radius: 6px;
  padding: 7px 9px; line-height: 1.6;
}

/* 流程地点坐标网格 */
.tk-flow-t {
  font-size: 11.5px; color: var(--fd-gold-dim); font-weight: bold;
  letter-spacing: .2em; margin-bottom: 4px; flex: 1 1 100%; display: block;
}
.flow-pts { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; flex: 1 1 100%; }
.fp {
  display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.05);
  border: 1px solid var(--fd-border-lt); border-radius: 8px; padding: 6px 9px; cursor: pointer;
  font-size: 12px; position: relative; min-width: 0; transition: .15s;
}
.fp:hover { border-color: var(--fd-gold); background: rgba(242,201,76,.08); }
.fp .num { color: var(--fd-gold); font-weight: bold; font-size: 13px; flex: 0 0 16px; text-align: center; font-variant-numeric: tabular-nums; }
.fp .txt { color: var(--fd-text-2); line-height: 1.45; white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.fp .tip { display: none; position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%);
  background: rgba(14,20,16,.98); border: 1px solid var(--fd-border-card); border-radius: 6px; padding: 4px 8px;
  font-size: 11px; color: var(--fd-gold); white-space: nowrap; z-index: 9; box-shadow: var(--fd-shadow-card); }
.fp:hover .tip { display: block; }
.fp .tip .xy { color: var(--fd-text-3); font-variant-numeric: tabular-nums; }

/* 流程点序号着色 */
.flow-pts .fp.fp-t-take .num, .flow-pts .fp.fp-t-deliver .num { color: #7dd3a0; }
.flow-pts .fp.fp-t-battle .num { color: #ff8a8a; }
.flow-pts .fp.fp-t-npc .num { color: var(--fd-gold); }
.flow-pts .fp.fp-t-other .num { color: #9fc6ff; }

/* 装备卡片：获取点点击高亮 + 大师模式宝箱（紫） */
.flow-pts .fp.is-cur { border-color: var(--fd-gold); background: rgba(242,201,76,.14); }
.flow-pts .fp.fp-hard { border-color: rgba(139,92,246,.5); }
.flow-pts .fp.fp-hard .num { color: #b18cff; }
.flow-pts .fp.fp-hard.is-cur { border-color: #8a5cf6; background: rgba(139,92,246,.16); }
.eq-obtain-h.fp-hard-h { color: #b18cff; }

/* 底部操作：金色统一操作栏 */
.tk-actions { display: flex; gap: 8px; margin-top: 14px; }
.tk-actions .btn {
  flex: 1; min-height: 40px; border-radius: var(--fd-r-ctl); padding: 9px 4px; font-size: 13px;
  cursor: pointer; border: 1px solid var(--fd-gold); font-family: inherit;
  background: var(--fd-gold); color: #2e2410; font-weight: bold; transition: .15s;
  display: inline-flex; align-items: center; justify-content: center;
}
.tk-actions .btn:active { transform: scale(.97); }
.tk-actions .btn.act:hover { filter: brightness(1.1); }
.tk-actions .btn.act.tk-ghost {
  background: transparent; color: var(--fd-gold-light); border: 1px solid rgba(163,135,69,.5); font-weight: bold;
}
.tk-actions .btn.act.tk-ghost:hover { background: rgba(242,201,76,.12); border-color: var(--fd-gold); color: #fff; }
.tk-actions .btn.act.is-on { background: rgba(242,201,76,.16); border-color: var(--fd-gold); color: var(--fd-gold); }
.tk-actions .btn.act.is-off { opacity: .36; cursor: not-allowed; }
.tk-actions .btn.done { border: 1px solid var(--fd-gold); background: var(--fd-gold); color: #2e2410; font-weight: bold; }
.tk-actions .btn.done:hover { filter: brightness(1.1); }
.tk-actions .btn.done.is-done { background: rgba(58,167,109,.16); border-color: rgba(74,222,128,.42); color: #8fd79c; cursor: default; }
.tk-actions .btn.done.is-done:disabled { opacity: 1; }

/* 完成勾（绿色实心 + 白勾） */
.tk-done-tick {
  display: inline-flex; align-items: center; justify-content: center;
  width: 19px; height: 19px; border-radius: 50%; flex: 0 0 auto;
  background: #3f9c52; color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
}

/* 装备专属：分类行图标 + 获取来源坐标 */
.eq-lrow-ic { width: 18px; height: 18px; object-fit: contain; flex: 0 0 auto; align-self: center; }
.eq-obtain-h {
  font-size: 11.5px; color: var(--fd-text-3);
  display: flex; align-items: center; gap: 6px; margin: 4px 0 6px;
}
.qcard-en { font-size: 12px; color: var(--fd-text-3); margin-bottom: 10px; word-break: break-all; }
.q-badge-hard {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: var(--fd-r-pill);
  font-size: 10.5px; background: rgba(192,132,217,.14); border: 1px solid #8a5aa8; color: #c084d9;
}
.qcard-src {
  margin-top: 10px; font-size: 11px; color: var(--fd-text-4);
  padding-top: 8px; border-top: 1px dashed var(--fd-border-lt);
}
.q-obtain-more { font-size: 11px; color: var(--fd-text-4); margin-top: 3px; }
.q-hard-note {
  margin-top: 8px; font-size: 11px; color: var(--fd-text-4);
  padding-top: 8px; border-top: 1px dashed var(--fd-border-lt);
}

/* 手机端：全站卡片统一底部抽屉（≤760px 贴底） */
@media (max-width: 760px) {
  #infoCard, #questCard, #equipCard, #chestCard, #campCard {
    left: 8px; right: 8px; bottom: 8px; top: auto; width: auto; max-width: none;
    max-height: 55vh; overflow-y: auto;
    border-color: var(--fd-gold-dim);
    box-shadow: 0 0 0 1px rgba(242,201,76,.25), var(--fd-shadow-card);
  }
}

/* =====================================================================
 * BOTWmap 卡片联邦体系（V1.6.5 重构）
 * 遵循六段骨架：Grip → Head → Title → Meta(fd-row) → Body(fd-sec) → Actions
 * ===================================================================== */

/* 卡片通用外壳（毛玻璃墨绿黑） */
.fd-card {
  --card-bg: var(--fd-bg-card);
  --card-bd: var(--fd-border-card);
  --card-accent: var(--fd-gold);
  --card-label: var(--fd-text-3);
  --card-value: var(--fd-text-1);

  background: var(--card-bg);
  border: 1px solid var(--card-bd);
  border-radius: var(--fd-r-card);
  box-shadow: var(--fd-shadow-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 14px 16px 16px;
  font-size: 13px;
  color: var(--card-value);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.14) transparent;
}

/* 头部：分类 Chip + 翻页 + 关闭 */
.fd-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; user-select: none;
}
.fd-card-head-left { display: flex; align-items: center; gap: 6px; }
.fd-card-head-acts { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.fd-card-close {
  width: 22px; height: 22px; padding: 0; line-height: 1; border: none;
  background: transparent; color: var(--fd-text-3); font-size: 19px;
  cursor: pointer; border-radius: var(--fd-r-sm); transition: .15s;
  display: flex; align-items: center; justify-content: center;
}
.fd-card-close:hover { color: #fff; background: rgba(255,255,255,.1); }

/* 标题行：序号/徽章 + 主名称 + 复制 */
.fd-card-titlerow {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px;
}
.fd-card-name {
  font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--fd-text-1);
  word-break: break-word; flex: 1; min-width: 0; margin: 0;
}
.fd-copy {
  flex: 0 0 auto; padding: 1px 6px; border-radius: var(--fd-r-sm); cursor: pointer;
  background: transparent; font-size: 11px; line-height: 1.5; transition: .15s;
  border: 1px solid rgba(163,135,69,.45); color: var(--fd-gold-light);
}
.fd-copy:hover { color: #fff; border-color: var(--fd-gold); background: rgba(242,201,76,.12); }
.fd-card-en { font-size: 12px; color: var(--fd-text-3); margin-top: -4px; margin-bottom: 8px; word-break: break-all; }

/* 翻页微按钮（‹ ›） */
.fd-nav-btn {
  width: 22px; height: 22px; padding: 0; line-height: 1;
  border: 1px solid rgba(255,255,255,.2); background: transparent;
  color: var(--fd-text-3); font-size: 13px; border-radius: var(--fd-r-sm);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: .15s;
}
.fd-nav-btn:hover { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.4); }

/* 零件 1：FD-ROW · 键值行（统一 44px label，彻底消除犬牙交错） */
.fd-row {
  display: flex; align-items: baseline; gap: 8px; margin: 3px 0;
  font-size: 12.5px; line-height: 1.65;
}
.fd-l {
  flex: 0 0 44px; color: var(--card-label);
  letter-spacing: .25em; user-select: none; font-size: 12px;
}
.fd-v {
  flex: 1; min-width: 0; color: var(--card-value); word-break: break-word;
}
.fd-v-accent { color: var(--fd-gold); font-weight: 500; }
.fd-v-blue   { color: var(--fd-shiekah-blue); font-weight: 500; }
.fd-empty    { color: var(--fd-text-5); }
.fd-dim      { color: var(--fd-text-4); font-size: 11.5px; margin-left: 4px; }
.fd-num      { font-variant-numeric: tabular-nums; }
.fd-arrow    { color: #7ec8a9; font-weight: 600; margin: 0 2px; }

/* 零件 2：FD-SEC · 二级分区 */
.fd-sec {
  border-top: 1px solid var(--fd-border-lt); padding: 8px 0 2px; margin-top: 8px;
}
.fd-sec:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.fd-sec-t {
  display: flex; align-items: center; gap: 6px; margin-bottom: 5px;
  font-size: 11.5px; letter-spacing: .2em; color: var(--fd-gold-dim);
}
.fd-sec-b { font-size: 12.5px; line-height: 1.65; color: var(--fd-text-2); }
.fd-src {
  margin-left: auto; padding: 1px 5px; border-radius: var(--fd-r-pill); letter-spacing: 0;
  font-size: 10px; color: rgba(255,255,255,.35); border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
}

/* 零件 3：FD-CHIP · 分类标签 */
.fd-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--fd-r-pill); white-space: nowrap;
  font-size: 11px; line-height: 1.5; font-weight: 500;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.75);
  border: 1px solid transparent;
}
.fd-chip-gold    { background: rgba(242,201,76,.12); color: var(--fd-gold); border-color: rgba(242,201,76,.35); }
.fd-chip-shiekah { background: var(--fd-shiekah-blue-bg); color: var(--fd-shiekah-blue); border-color: rgba(76,212,242,.35); }
.fd-chip-blue    { background: rgba(111,179,224,.16); color: #6fb3e0; border-color: rgba(111,179,224,.35); }
.fd-chip-green   { background: rgba(126,200,169,.16); color: #7ec8a9; border-color: rgba(126,200,169,.35); }
.fd-chip-purple  { background: rgba(184,160,232,.16); color: #c4b0f0; border-color: rgba(184,160,232,.35); }
.fd-chip-warn    { background: rgba(224,102,95,.15); color: #ffa49e; border-color: rgba(224,102,95,.35); }

/* 零件 4：FD-ACT · 底部统一操作栏 */
.fd-actions { display: flex; gap: 8px; margin-top: 12px; }
.fd-actions .btn, .fd-actions button {
  flex: 1; min-width: 0; min-height: 40px; padding: 9px 4px;
  border-radius: var(--fd-r-ctl); font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; font-family: inherit;
  transition: .15s; display: inline-flex; align-items: center; justify-content: center;
}
.fd-actions .btn:active, .fd-actions button:active { transform: scale(.97); }
.fd-actions .btn.primary {
  background: var(--fd-gold); color: #2e2410; border-color: var(--fd-gold);
}
.fd-actions .btn.primary:hover { filter: brightness(1.1); }
.fd-actions .btn.ghost {
  background: transparent; border-color: rgba(255,255,255,.18); color: var(--fd-text-2);
}
.fd-actions .btn.ghost:hover { border-color: var(--fd-gold-dim); color: var(--fd-gold); }
.fd-actions .btn.done-btn {
  background: rgba(58,167,109,.16); border-color: rgba(74,222,128,.4); color: #8fd79c;
}
.fd-actions .btn.danger {
  background: transparent; border-color: rgba(224,102,95,.4); color: var(--fd-danger);
}
.fd-actions .btn.danger:hover { background: rgba(224,102,95,.15); }


