/* 暗黑魔兽风 UI */
* { box-sizing: border-box; margin: 0; padding: 0; }
/* overflow:hidden 锁死页面：整页永远不出现滚动条，滚动只发生在内部信息框 */
html, body { height: 100%; overflow: hidden; }
body { background: #0a0a0c; color: #d8c9a3; font-family: "STKaiti", "KaiTi", "SimSun", serif; font-size: 14px; }
/* 游戏主容器：固定 9:16 手机竖屏比例
   - height:100vh 高度锁死占满屏幕（关键！min-height 会让内容撑开页面产生滚动条）
   - width: min(100%, calc(100vh * 9 / 16)) 宽度 = 高度×9/16；窄屏手机则占满全屏
   - overflow:hidden 双保险，容器内任何溢出都不影响页面长度 */
#app { width: min(100%, calc(100vh * 9 / 16)); height: 100vh; margin: 0 auto; display: flex; flex-direction: column; overflow: hidden; border-left: 1px solid #3a2e1a; border-right: 1px solid #3a2e1a; background: linear-gradient(180deg, #14110c 0%, #0a0a0c 100%); }
/* v2.83.0 字体瘦身（主人需求：聊天框与战斗信息区字再小一号、整体更紧凑）
   —— 两处改动：
   ① 字号 11px → 10px（小一号）
   ② 换紧凑字体栈。原来继承 body 的 "STKaiti"/KaiTi/SimSun/serif；
      新栈把「窄体拉丁/数字」放前面（战斗日志里数字最多，窄体最省地方），
      中文仍走 Noto Sans Mono CJK SC（等宽 CJK：中文等宽、数字对齐成一列，
      比比例字体更整齐，且行高可控）。
      注意：不能只写 Mono —— 中文在 Mono 与比例字体里都是全角等宽，
      真正省宽度的是拉丁/数字那半边，窄体字库正好作用在那里（实测数字窄约 28%）。 */
/* ---------- 字体栈（v2.83.2 分流）----------
   v2.83.0 时两者共用一个联合声明。v2.83.2 用户反馈「聊天框字太小」，
   故拆开：聊天框恢复 11px 并换成瘦高字体，战斗区保持 10px 紧凑不动。

   什么叫「瘦高」：字形纵向拉长、横向压窄的字体，视觉上又高又细。
   本机可用的真窄体（fc-list 实测）：
     - Ubuntu Condensed       → 拉丁/数字，明显的瘦高感最强，放最前
     - Liberation Sans Narrow → 备选窄体
     - Nimbus Sans Narrow     → 备选窄体
     - DejaVu Sans Condensed  → 末位兜底
   注意：中文没有窄体字库（本机无任何 condensed CJK 字体），
   中文只能退回 Noto Sans CJK SC 等宽全角。真正的「瘦」来自拉丁/数字那半边，
   而中文笔画偏密，用 Light 字重（Noto Sans CJK SC Light）能进一步减轻视觉重量。 */
#news-bar {
  font-family: "Ubuntu Condensed", "Liberation Sans Narrow", "Nimbus Sans Narrow",
               "DejaVu Sans Condensed", "Noto Sans CJK SC Light", "Noto Sans CJK SC",
               "Noto Sans Mono CJK SC", "STKaiti", "KaiTi", "SimSun", serif;
}
/* 战斗区维持 v2.83.0/v2.83.1 的紧凑窄体（10px + 窄体拉丁），不改 */
#log-list {
  font-family: "Liberation Sans Narrow", "Nimbus Sans Narrow", "DejaVu Sans Condensed",
               "Noto Sans Mono CJK SC", "Noto Sans CJK SC", "STKaiti", "KaiTi",
               "SimSun", "Microsoft YaHei", serif;
}
/* ① 顶部世界聊天框（原 #news-bar 单行新闻条改造）
   - 原来是一行 nowrap + ellipsis 的静态提示条，JS 从不更新它（写死在 HTML 里）。
   - 现在升级为「世界聊天框」：能显示 6 排系统信息，供世界级提示使用
     （奇遇发现 ◆绿 p.enc / 系统公告 ★金 p.alert / 将来接玩家聊天）。
     前缀→类→色的唯一对照表见 开发手册.md「前缀—类—颜色对照」，加新播报先查表。
   - 6 排怎么算（v2.83.2 恢复 11px 后同步回到 124px，别再用 115px）：
       每排 = 行高 11px×1.5 = 16.5px + 段落下边距 2px = 18.5px
       6 排 = 111px，加上下内边距 6+6 = 123px，再加下边框 1px → 高度 124px
     （v2.83.0 是 10px→每排17→115px；v2.83.2 用户嫌字太小，恢复 11px 后必须
       把高度同步调回 124px，否则框里会空 2 排、或反过来挤掉第 6 排。
       这是 v2.83.0 测试③「6排高度自洽」在每次改字号时都必须重跑的原因。）
   - overflow-y:auto：超过 6 排时滚动查看，且自动滚到底（JS 侧追加后处理）。 */
#news-bar {
  background: #1c160c;
  /* v3.140.22：系统播报色由「青 #00cccc」改成亮蓝 #4da6ff ——
     老板反馈原青色太暗看不清。
     v3.140.23：再浅一档 → **浅蓝 #9ed4ff**（老板反馈亮蓝还是偏深，要接近蓝白）。 */
  color: #9ed4ff;
  font-size: 11px;
  line-height: 1.5;
  padding: 6px 10px;
  border-bottom: 1px solid #3a2e1a;
  /* v2.83.2：恢复 11px 后 6 排固定高度 = 111(6×18.5) + 12(padding) + 1(边框) = 124px */
  height: 124px;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
}
/* v6.529.0：聊天框折叠态（Boss m00319「折叠后没用」根治——此前错改聊天弹窗，Boss 指的是这个顶部世界聊天框）。
   折叠 = 124px × 0.6 ≈ 74px（Boss 原话「把聊天框高度缩减 40%」），可见约 3 排，overflow 滚动看其余。 */
#news-bar.chat-fold { height: 74px; }
/* v2.82.0：聊天框内的单条消息（JS 动态 append，不整块重绘） */
#news-bar p { margin: 0 0 2px; word-wrap: break-word; }
/* 醒目级系统提示（★ 前缀）——金色加粗，与普通系统行的亮蓝色区分。
   v6.1028.0 起 ★ 只给全服公告（世界首领/传奇领袖/GM/罪恶/彩票），奇遇改走下面的 .enc */
#news-bar p.alert { color: #ffcc44; font-weight: bold; }
/* 奇遇发现播报（v6.1028.0 Boss m00545，◆ 前缀）——绿色加粗，与「任务进度更新」同款绿 #4fd84f */
#news-bar p.enc { color: #4fd84f; font-weight: bold; }
/* 系统公告行 */
#news-bar p.sys { color: #9ed4ff; }
/* 将来接玩家聊天时，聊天行走这个配色（普通玩家可读色，不用系统青） */
#news-bar p.chat { color: #e8e0c0; }
/* v6.4.5 物品展示：聊天里的物品链接（品质色由 JS 内联，下划线提示可点，手机触屏无悬停） */
.chat-item-link { text-decoration: underline; cursor: pointer; }
/* 空态提示（还没收到任何系统消息时显示） */
#news-bar p.empty { color: #5a6a5a; font-style: italic; }

/* ---------- 聊天输入区（v2.84.0）----------
   频道按钮的颜色由 JS 按 /api/chat/channels 下发的 color 上色（inline style），
   这里只给布局和「未选中」态底色——**不在 CSS 里硬编码频道颜色**，
   否则后端加频道时前端要跟着改，违背单一真源。 */
/* ---------- 聊天弹窗（v2.85.0：聊天搬进独立页签）----------
   v2.84.0 时聊天是常驻主界面的一行（#chat-bar），v2.85.0 改成页签弹窗，
   主界面不再为聊天占位置；以后聊天加功能都往这个弹窗里加。

   【踩坑】下面这条遮罩层样式原本挂在 #equip-modal 上，装备弹窗删掉后
   一并没了，而 #chat-modal 没有任何定位样式 → 弹窗按普通块级元素排在
   文档流里、不居中（实测整个窗贴在页面左下角）。
   **删 CSS 规则前要先看它有没有被新元素复用**，别只盯着被删的那个 id。 */
#chat-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; }
#chat-modal.hidden { display: none; }
.chat-modal-box { display: flex; flex-direction: column; } /* 尺寸统一由 .map-modal-box 的 9:16 固定框决定 */
/* 频道按钮行：颜色由 JS 按 /api/chat/channels 下发的 color 上色（inline style），
   这里只给布局和未选中态底色——不在 CSS 里硬编码频道颜色。 */
.chat-modal-channels { display: flex; gap: 6px; padding: 6px 10px; border-bottom: 1px solid #3a2e1a; flex-shrink: 0; }
.chat-modal-channels .ch-btn {
  background: #241c10;
  color: #8a7a5a;
  border: 1px solid #4a3a1c;
  border-radius: 3px;
  padding: 3px 10px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
/* 选中态：加亮边框 + 底色，文字颜色由 JS inline color 决定 */
.chat-modal-channels .ch-btn.active { border-color: #c9a24a; background: #2e2415; font-weight: bold; }
/* 聊天记录区：可滚动，随聊天框一样用 11px 瘦高字体 */
.chat-modal-log {
  flex: 1;
  min-height: 0;                 /* flex 子项不设这个会撑破容器，滚动失效 */
  overflow-y: auto;
  padding: 6px 10px;
  background: #100d08;
  font-family: "Ubuntu Condensed", "Liberation Sans Narrow", "Nimbus Sans Narrow",
               "DejaVu Sans Condensed", "Noto Sans CJK SC Light", "Noto Sans CJK SC",
               "Noto Sans Mono CJK SC", "STKaiti", "KaiTi", "SimSun", serif;
  font-size: 11px;
  line-height: 1.5;
}
.chat-modal-log p { margin: 0 0 2px; word-wrap: break-word; }
.chat-modal-log p.alert { color: #ffcc44; font-weight: bold; }
.chat-modal-log p.enc { color: #4fd84f; font-weight: bold; }   /* v6.1028.0 奇遇播报绿 */
.chat-modal-log p.sys { color: #9ed4ff; }
.chat-modal-log p.chat { color: #e8e0c0; }
/* 输入行：输入框 + 发送按钮 */
.chat-modal-input-row { display: flex; gap: 6px; padding: 6px 10px; border-top: 1px solid #3a2e1a; flex-shrink: 0; }
#chat-modal-input {
  flex: 1;
  min-width: 0;                  /* flex 子项默认不缩，会把按钮挤出屏外 */
  background: #0e0c08;
  color: #d8c9a3;
  border: 1px solid #4a3a1c;
  border-radius: 3px;
  padding: 4px 8px;
  font-size: 11px;
  font-family: inherit;
}
#chat-modal-input:focus { outline: none; border-color: #c9a24a; }
#chat-modal-send {
  background: #2a2114;
  color: #c9a24a;
  border: 1px solid #6b4a1c;
  border-radius: 3px;
  padding: 4px 14px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
}
#chat-modal-send:hover { background: #3a2e1a; }

/* v2.86.0 私聊收件人行：只有选中「私聊」频道才显示（JS 切 hidden 类） */
.chat-whisper-row {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-top: 1px solid #3a2e1a;
  background: #16110d; flex-shrink: 0;
}
.chat-whisper-row.hidden { display: none; }
.chat-whisper-label { font-size: 11px; color: #ff6ec7; white-space: nowrap; flex-shrink: 0; }
#chat-whisper-target {
  flex: 1; min-width: 0;
  background: #0e0c08; color: #d8c9a3;
  border: 1px solid #6b3a58; border-radius: 3px;
  padding: 3px 7px; font-size: 11px; font-family: inherit;
}
#chat-whisper-target:focus { outline: none; border-color: #ff6ec7; }

/* v2.86.0 好友弹窗 → v5.1.64 社交面板（好友/仇人名单，手机 264px 宽适配） */
.friend-modal-body { padding: 10px 10px 6px; }

/* 子页签行：好友 / 仇人 二选一，选中金色 */
.social-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.social-tab { flex: 1; padding: 7px 0; font-size: 13px; background: #241c0e; color: #b8a97f;
  border: 1px solid #4a3a1a; border-radius: 6px; }
.social-tab.active { background: #3a2c12; color: #ffe9b0; border-color: #8a6a2a; font-weight: bold; }
/* 添加行：输入框 + 添加按钮（一行放下，输入框占余宽） */
.social-add-row { display: flex; gap: 6px; margin-bottom: 6px; }
.social-add-row input { flex: 1; min-width: 0; padding: 7px 8px; font-size: 13px;
  background: #1a140a; color: #f0e6c8; border: 1px solid #4a3a1a; border-radius: 6px; }
.social-add-row button { padding: 7px 14px; font-size: 13px; background: #3a2c12;
  color: #ffe9b0; border: 1px solid #8a6a2a; border-radius: 6px; }
/* 结果提示行（添加/移除的返回消息），固定一行高不跳版 */
.social-msg { min-height: 16px; font-size: 11px; color: #e8c87a; margin-bottom: 4px; }
/* 名单列表：固定高度滚动，行内小字排布 */
.social-list { max-height: 300px; overflow-y: auto; }
.social-empty { color: #8a7a5a; font-size: 12px; text-align: center; padding: 18px 0; }
.social-row { display: flex; align-items: center; gap: 6px; padding: 6px 4px;
  border-bottom: 1px solid #2a2210; }
.social-dot { width: 8px; height: 8px; border-radius: 50%; background: #555; flex: none; }
.social-dot.on { background: #32cd32; box-shadow: 0 0 4px #32cd32; }
.social-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.social-name { font-size: 13px; color: #f0e6c8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* v6.522.0：查询页签玩家名字可点（弹观察/私聊/邀请入队交互框） */
.who-name-click { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
.social-sub { font-size: 10px; color: #9a8a5f; }
/* v6.392.0 查询页签（/who）：在线人数头；行内两行排布复用 social-row/main/sub */
.social-who-head { font-size: 11px; color: #e8c87a; padding: 2px 4px 6px; }
/* v6.392.0（Boss m01681）：社交弹窗高度自适应内容——9:16 固定框在名单少时下半空白=浪费空间；
   盒高改 auto+限高，列表 flex 撑满剩余空间，内容多时列表内滚（好友/仇人/查询三页签通用）。 */
#friend-modal .map-modal-box { height: auto; max-height: calc(100vh - 12px); }
#friend-modal .friend-modal-body { display: flex; flex-direction: column; min-height: 0; }
#friend-modal .social-list { flex: 1; min-height: 0; max-height: none; }
.social-ops { display: flex; gap: 4px; flex: none; }
.social-btn { padding: 4px 8px; font-size: 11px; background: #2c2412; color: #d8cfa8;
  border: 1px solid #4a3a1a; border-radius: 5px; }
.social-btn.danger { color: #e88; border-color: #6a2a2a; }
/* v6.481.0（Boss m02434）：查询页签内子菜单（等级/巅峰/金钱）+ 金钱排行金额浮右 */
.who-subtabs { display: flex; gap: 6px; margin: 4px 0 8px; }
.who-subtab { flex: 1; padding: 5px 0; border: 1px solid #3a3f4b; border-radius: 6px;
  background: #1c2028; color: #b8c0cc; font-size: 12px; }
.who-subtab.active { background: #2b3242; color: #ffe23b; border-color: #8a7a3a; font-weight: bold; }
.social-row .social-gold { margin-left: auto; color: #ffe23b; font-size: 11px; white-space: nowrap; flex: none; }

/* ---------- 大师点界面（v2.91.0）----------
   配色沿用技能面板的暗金体系；"精通"块放在每个技能行右侧。 */
.mastery-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-bottom: 1px solid #3a2e1a; background: #14110c;
  font-size: 11px; flex-shrink: 0;
}
.mastery-bar.locked { opacity: 0.6; }
.mastery-bar-label { color: #c9a24a; font-weight: bold; }
.mastery-bar-points { color: #ffcc44; font-weight: bold; font-size: 13px; }
.mastery-bar-hint { color: #8a7a5a; font-size: 10px; }
/* 每个技能行的精通块（v2.91.2）：独占第二行，在「就绪/无消耗/自动释放」下方。
   flex-basis:100% 强制换行；配合右对齐让它靠右，和上面的操作项视觉上同列。 */
.mastery-box {
  display: flex; flex-direction: row; align-items: center; justify-content: flex-end;
  gap: 8px; flex-basis: 100%; margin-top: 2px; padding-right: 2px;
}
.mastery-lv { color: #9a814e; font-size: 10px; white-space: nowrap; }
.mastery-upgrade-btn {
  background: #2e2415; color: #c9a24a; border: 1px solid #6b4a1c;
  border-radius: 3px; padding: 2px 8px; font-size: 10px; font-family: inherit;
  cursor: pointer; white-space: nowrap;
}
.mastery-upgrade-btn:hover:not(:disabled) { background: #3a2e1a; }
.mastery-upgrade-btn:disabled { opacity: 0.45; cursor: not-allowed; }
/* v4.0.1 BUG7：技能描述里的精通数值行——金色常驻文字，手机上直接可见不靠悬停 */
.mastery-desc-line {
  color: #c9a24a; font-size: 11px; font-weight: bold; margin-top: 2px;
}
/* v4.0.1 BUG7：动作条格子上精通技能的「+Y%」角标（右上角小字） */
.action-cell .ac-mastery {
  position: absolute; top: 0; right: 1px;
  color: #c9a24a; font-size: 8px; font-weight: bold;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;   /* 角标不拦截点击，点了格子照常释放技能 */
}

/* 技能面板稍加高（多了大师点条 + 精通块，给列表留滚动空间） */
.skill-modal-box { max-height: none; } /* 尺寸统一由 .map-modal-box 的 9:16 固定框决定 */

/* ---------- v6.7.28 技能双子菜单页签（主动技能/被动技能） ---------- */
.skill-tabs {
  display: flex; gap: 6px; padding: 6px 12px 0;
  border-bottom: 1px solid #3a2e1a; background: #14110c; flex-shrink: 0;
}
.skill-tab-btn {
  padding: 5px 14px; font-size: 12px; font-family: inherit; cursor: pointer;
  background: transparent; color: #8a7a5a;
  border: 1px solid #3a2e1a; border-bottom: none; border-radius: 6px 6px 0 0;
}
.skill-tab-btn.active { color: #ffe23b; background: #2a2113; border-color: #6b4a1c; font-weight: bold; }

/* ---------- v6.8.12 页签移入技能弹窗头部（Boss 指令：放「技能」标题右侧空白处） ---------- */
/* 头部里的页签改 pill 按钮：去独立行样式（上内边距/底边/背景），紧贴标题排 */
.map-modal-head .skill-tabs { padding: 0; border-bottom: none; background: transparent; gap: 4px; }
.map-modal-head .skill-tab-btn { padding: 4px 9px; border: 1px solid #3a2e1a; border-radius: 6px; }
.map-modal-head .skill-tab-btn.active { border-color: #6b4a1c; }
/* 技能弹窗头部允许换行：战士时姿态条落到第二行独占，✕ 不被挤走；其他弹窗仍固定一行 */
.skill-modal-box .map-modal-head { flex-wrap: wrap; }
.skill-modal-box .map-modal-title { flex: 0 0 auto; }
.skill-modal-box #skill-close-btn { margin-left: auto; }

/* ---------- 背包/装备合并区（v2.85.0）---------- */
.bag-merged-box { display: flex; flex-direction: column; } /* 尺寸统一由 .map-modal-box 的 9:16 固定框决定 */
.bag-equipped-section { flex-shrink: 0; border-bottom: 1px solid #3a2e1a; padding: 4px 10px; }
.bag-panel-title { font-size: 10px; color: #8a6a2c; padding: 3px 0; }
/* v2.82.0 工具栏高度压缩 1/3（主人需求：地名/赶路/地图/☰ 这一横条太高）
   改前：padding 8px 10px + 地名字号 16px + 按钮 padding 4px 10px / 字号 12px → 实测约 40px 高
   改后：内边距与字号一律按「保留 2/3」压缩（8→5、16→11、12→8、4→3）
         → 实测约 27px 高，正好压掉约 1/3
   只动这三个条目，地名/按钮的配色、边框、点击区域逻辑全部不变。 */
/* v2.87.2 Boss 定案（工具栏）：三按钮字 8→10px（line-height:1 锁内容行，按钮 20→18px）
   + padding 5→4px → 工具栏总高 32→28px（-4） */
#toolbar { display: flex; align-items: center; justify-content: space-between; padding: 4px 10px; background: #1a140c; border-bottom: 2px solid #5a3d18; }
#room-title { font-size: 11px; font-weight: bold; color: #e8c87a; }
.toolbar-btns { display: flex; gap: 6px; }
.toolbar-btns button { width: 42px; padding: 3px 0; text-align: center; font-size: 10px; line-height: 1; font-family: inherit; background: #2a2a2a; color: #c9a24a; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; }
.toolbar-btns button:active { background: #3a2a14; color: #ffe9b0; }
#body-split { display: flex; flex: 1; min-height: 0; overflow: hidden; position: relative; }
#npc-panel { width: 18%; min-width: 60px; max-width: 100px; background: #1a140c; border-right: 1px solid #2a2114; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; }
.panel-title { font-size: 10px; color: #8a6a2c; text-align: center; padding: 3px 0; border-bottom: 1px solid #2a2114; background: #14110c; }
/* NPC 列表：间距缩小，能容纳更多 NPC；v1.13.0 起 flex:1 撑满目标栏，副本按钮自然落底 */
#npc-list { display: flex; flex-direction: column; gap: 3px; padding: 3px 2px; flex: 1; }
/* v1.13.0 副本入口按钮：目标栏最下方，数据驱动显隐（房间带 dungeon_entry 才显示）
   v1.13.3 Boss 指令：样式复刻「小地图」(#map-grid .map-cell clickable 态)：
   深褐底 #2a1f10 / 金棕字 #e8c87a / 细边 #6b4a1c / 圆角3px / 9px 小字 / 18px 高，
   与小地图格子完全同款；进/出按钮（dungeon-exit）共用同一套样式 */
#dungeon-entry, #dungeon-exit, #chest-entry { padding: 4px 3px; margin-top: auto; border-top: 1px solid #2a2114; background: #14110c; }
#dungeon-entry.hidden, #dungeon-exit.hidden, #chest-entry.hidden { display: none; }
#dungeon-entry-btn, .dungeon-entry-btn, #dungeon-exit-btn, #chest-btn {
  /* v1.20.4：窄侧栏里「进入死亡矿井」6字会被省略号截断 → 改两排显示。
     单排标签（进入监狱/离开矿井 4字）不受影响：1行12px+4padding+2border=18px，与改动前等高；
     双排标签（超4字拆行）自动长到 30px，因容器 margin-top:Auto 底部吸附，多出来的高度往上涨 = 按钮位置更靠上 */
  width: 100%; min-height: 18px; height: auto; padding: 2px 1px;
  font-size: 8px; line-height: 12px; font-family: inherit;
  background: #2a1f10; color: #e8c87a; border: 1px solid #6b4a1c; border-radius: 3px;
  cursor: pointer; text-align: center; white-space: pre-line; word-break: break-all;
  overflow: hidden; text-overflow: ellipsis;
}
#dungeon-entry-btn:active, .dungeon-entry-btn:active, #dungeon-exit-btn:active, #chest-btn:active { background: #3a2a14; }
#chest-btn:disabled { opacity: .55; cursor: default; color: #9a8052; }
/* NPC 方框：上下 padding 压到最小，整体高度约为原来一半 */
/* v3.41.0：position:relative（右侧竖向读条的定位基准）；gap 2px→3px——
   血条下面多了资源条，多一条缝，方框总高 +2px，显示更宽松 */
.npc-item { width: 100%; min-width: 60px; padding: 2px 3px 3px; font-size: 10px; color: #b89a5c; background: #241c10; border: 1.5px solid #6b4a1c; border-radius: 3px; cursor: pointer; text-align: center; display: flex; flex-direction: column; justify-content: center; gap: 3px; position: relative; }
.npc-item:hover { background: #3a2a14; color: #ffe9b0; }
/* 红名怪（主动攻击）：红边框红字 */
.npc-item.monster { border-color: #d23b2b; color: #ff8866; }
.npc-item.monster:hover { background: #3a1414; color: #ffaaaa; }
/* 黄名怪（中立，需主动攻击）：黄边框黄字 */
.npc-item.neutral { border-color: #b89a2c; color: #e8d48a; }
.npc-item.neutral:hover { background: #322a10; color: #fff2c0; }
/* NPC（绿色名字和血条）*/
.npc-item.npc { border-color: #2e8b57; color: #32cd32; }
.npc-item.npc:hover { background: #1a3a2a; color: #90ee90; }
.npc-item.npc .npc-hp-fill { background: linear-gradient(90deg, #2e8b57, #32cd32); }
.npc-item.npc .npc-name { color: #32cd32; }
/* v6.149.0 集合石（Boss 指令 2026-11-08）：灰色方框，跟 NPC 绿框区分开 */
.npc-item.meeting-stone { border-color: #8a8a8a; color: #c8c8c8; background: #262626; }
.npc-item.meeting-stone:hover { background: #333333; color: #e6e6e6; }
.npc-item.meeting-stone .npc-name { color: #c8c8c8; }
/* 宠物（青蓝色姓名板，友方召唤物 v0.77.0）*/
.npc-item.pet { border-color: #1ba8c0; color: #35d6e8; background: #0e2430; }
.npc-item.pet:hover { background: #123846; color: #8be9f5; }
.npc-item.pet .npc-hp-fill { background: linear-gradient(90deg, #1ba8c0, #35d6e8); }
.npc-item.pet .npc-name { color: #35d6e8; }
/* 精英怪（2026-10-10 Boss 定案）：与普通怪同一红色方框，仅靠「精英·」名字前缀区分
   （紫色方框专属保留给敌对玩家 PvP 系统，强度不再靠框色表达） */
.npc-item.elite { border-color: #d23b2b; }
.npc-item.elite .npc-name { color: #ff8866; }
/* BOSS 怪：红色方框（与普通/精英一致）+ 最外侧 1px 细金圈（金圈=BOSS 标识）。
   用 box-shadow 硬圈（0 0 0 1px）：与 .target 锁定高亮（outline）互不冲突，锁定时两者同显 */
.npc-item.boss { border-color: #d23b2b; box-shadow: 0 0 0 1px #ffd700; }
.npc-item.boss .npc-name { color: #ffb347; }
/* 敌对玩家（PvP）：紫色方框（原 elite 的紫挪给玩家专用，多人在线翻开即用） */
.npc-item.player-hostile { border-color: #a335ee; }
.npc-item.player-hostile:hover { background: #2a1436; color: #e0b3ff; }
.npc-item.player-hostile .npc-name { color: #c77dff; }
.npc-item.player-hostile .npc-hp-fill { background: linear-gradient(90deg, #a335ee, #c77dff); }

/* v4.0.1 Boss bug4：萨满附魔武器/图腾/闪电之盾「附带伤害」战斗日志行 → 紫色加粗 */
/* 官方萨满系别紫（#a335ee 深紫 / #c77dff 亮紫），与普通火焰伤害红区分开 */
p.sham-purple {
  color: #c77dff;
  font-weight: bold;
}
/* 友好玩家（同阵营）：绿色方框（路过不可攻击） */
.npc-item.player-friendly { border-color: #9ed4ff; border-width: 2px; }   /* v6.300.0：玩家友方框=系统提示浅蓝（Boss：深绿不够明显换浅蓝）+ 2px 粗框再强化区分 */
.npc-item.player-friendly .npc-name { color: #32cd32; }
.npc-item .npc-name-suffix, .info-panel-name .npc-name-suffix { font-size: 0.8em; opacity: 0.75; }   /* v6.300.0：「·玩家」小字后缀只保留在点开的目标交互弹窗姓名行（头像框里已删，Boss m00461） */
.npc-item.player-friendly .npc-hp-fill { background: linear-gradient(90deg, #2e8b57, #32cd32); }   /* v6.300.0：血条恢复绿系（血=绿语义），框浅蓝区分 */
/* 当前锁定目标：外发光提示 */
.npc-item.target { outline: 2px solid #ffe9b0; outline-offset: 1px; }
/* ---- 目标交互弹窗（v0.89.0 修正：定位到 #text-area 战斗信息显示区，弹窗形式；#text-area 加 position:relative 作基准，弹窗被其 overflow:hidden 裁切、只盖战斗日志区、不碰左侧目标栏的 NPC 名字）---- */
.info-panel {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  width: 320px;
  max-width: 90%;
  background: #1a140c;
  border: 2px solid #6b4a1c;
  border-radius: 6px;
  /* v6.524.0（Boss m00002）：顶部 padding 挪进 .info-panel-head（sticky 从容器顶贴住），
     左右/底部 padding 留在容器上 */
  padding: 0 10px 10px;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,.6);
  /* v6.283.0（Boss 报障）：飞行点/对话列表最后一行被底部状态栏遮住——面板限高在 #text-area
     （flex 容器，position:relative 定位基准）内滚动，底边永不探进状态栏；内部列表 40vh 滚动保留 */
  max-height: calc(100% - 20px);
  overflow-y: auto;
  display: none;
}
.info-panel.visible { display: block; }
/* v6.524.0（Boss m00002）：头部常驻行 = 等级/状态 + NPC 名字 + 关闭键同一排。
   sticky 贴住滚动容器顶部：任务列表往下滚时关闭键不再被内容顶走，恒久可点。 */
.info-panel-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: #1a140c;          /* 不透明背景：滚过的内容从头部底下穿过时被盖住 */
  margin: 0 -10px;              /* 抵消容器左右 padding，头部背景铺满面板边缘 */
  padding: 10px 10px 6px;
  border-bottom: 1px solid #2a2114;
}
.info-panel-close {
  flex-shrink: 0;               /* 关闭键不被长名字挤扁 */
  padding: 0 2px;
  color: #8a7a5a;
  font-size: 14px;
  cursor: pointer;
  font-weight: bold;
}
.info-panel-close:hover { color: #ff8866; }
.info-panel-name {
  flex: 1;
  min-width: 0;                 /* 允许缩：长名字交给 npc-name-wrap 缩字号/折行 */
  font-size: 14px;
  font-weight: bold;
}
/* v6.524.0（Boss m00002）：原独立等级行（.info-panel-level）取消——等级/状态并入名字行。
   等级=名字前「LV30」前缀；尸体/箱子/掉落物等状态=名字后小字。原 11px 灰色观感保留。 */
.info-panel-level-tag {
  font-size: 11px;
  font-weight: normal;
  color: #8a7a5a;
  margin: 0 4px;
  white-space: nowrap;
}
.info-panel-hp-bar {
  width: 100%;
  height: 14px;
  background: #241c10;
  border: 1px solid #4a3a1c;
  border-radius: 2px;
  position: relative;
  margin-bottom: 8px;
}
.info-panel-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #d23b2b, #ff4444);
  transition: width 0.3s;
  border-radius: 1px;
}
.info-panel-hp-text {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  color: #fff;
  text-align: center;
  text-shadow: 0 0 2px #000;
}
/* v6.x.x（Boss）：目标面板资源槽（法力/怒气/能量），样式同血条槽 */
.info-panel-res-bar {
  width: 100%;
  height: 14px;
  background: #241c10;
  border: 1px solid #4a3a1c;
  border-radius: 2px;
  position: relative;
  margin-bottom: 8px;
}
.info-panel-res-fill {
  height: 100%;
  background: linear-gradient(90deg, #1c3a8a, #2b6bd2);
  transition: width 0.3s;
  border-radius: 1px;
}
.info-panel-res-text {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  color: #fff;
  text-align: center;
  text-shadow: 0 0 2px #000;
}
.info-panel-desc {
  font-size: 11px;
  color: #b8a878;
  line-height: 1.4;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #2a2114;
}
/* v0.94.0：NPC 面板"任务"按钮行（NPC 交互中枢，将来交易/修理同槽位扩展） */
.info-panel-actions {
  display: flex;
  flex-wrap: wrap;              /* v5.1.31：手机窄屏下按钮多时要能换行，不能全挤在一行 */
  align-items: flex-start;      /* v5.1.31：不再把矮按钮拉成和长提示文字一样高（会被撑成竖条） */
  gap: 6px;
  margin-top: 8px;
}
/* v5.1.31（Boss 报障 m00810）：面板里成段的提示文字/输入行必须独占整行。
   以前它们和按钮一样是 flex 子项，被压到最小内容宽（中文可逐字断行=1 字宽），
   又被 align-items:stretch 拉到最高，结果整块文字竖着从上往下排。 */
.info-panel-actions > div {
  flex: 1 0 100%;
  min-width: 0;
}
.info-panel-action-btn {
  flex: 1 1 auto;               /* v5.1.31：按内容宽分配，不再被强行压扁 */
  min-width: 60px;              /* v5.1.31：按钮最小宽，保证两个字能横着放 */
  white-space: nowrap;          /* v5.1.31：按钮文字绝不允许逐字竖排 */
  padding: 4px 8px;
  font-size: 11px;
  font-weight: bold;
  color: #e0c060;
  background: linear-gradient(180deg, #5a4820, #3a2c12);
  border: 1px solid #6b5420;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,233,176,.25), 0 1px 2px rgba(0,0,0,.5);
}
.info-panel-action-btn:hover { color: #ffe9b0; border-color: #8a6f2e; }
.info-panel-action-btn:active { transform: translateY(1px); }
/* NPC 面板内任务列表（复用全局 .quest-item 样式，容器加滚动限高） */
.info-panel-questlist {
  margin-top: 8px;
  max-height: 42vh;
  overflow-y: auto;
}
/* v1.09.3 ④：NPC 对话区（复用 info-panel 子区布局，样式同 questlist 容器 + 对话气泡） */
.info-panel-dialogue {
  margin-top: 8px;
  max-height: 40vh;
  overflow-y: auto;
}
/* 当前对话文本：暗金气泡，左侧金色描边 */
.info-panel-dialogue .dlg-text {
  font-size: 12px;
  color: #e8d48a;
  line-height: 1.6;
  padding: 6px 8px;
  background: rgba(42, 33, 20, 0.6);
  border-left: 3px solid #6b5420;
  border-radius: 3px;
}
/* 响应按钮组：横向换行排列，样式仿 info-panel-action-btn 但收窄为响应式小按钮 */
.info-panel-dialogue .dlg-responses {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.info-panel-dialogue .dlg-response-btn {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: bold;
  color: #e0c060;
  background: linear-gradient(180deg, #2a3a5a, #1a2436);
  border: 1px solid #3a5a8a;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,233,176,.15), 0 1px 2px rgba(0,0,0,.5);
}
.info-panel-dialogue .dlg-response-btn:hover { color: #ffe9b0; border-color: #5a8aca; }
.info-panel-dialogue .dlg-response-btn:active { transform: translateY(1px); }
/* v3.42.0 跨大陆飞行点不再显示（整段不渲染），旧的 flight-unreachable 红色样式已删 */
/* v2.90.7 开通系统：未开通飞行点按钮——灰蓝色锁样式（disabled，不可点，悬停看提示） */
.info-panel-dialogue .dlg-response-btn.flight-locked {
  color: #9aa7b8;
  border-color: #3a4a5a;
  background: linear-gradient(180deg, #1c242e, #10151c);
  cursor: not-allowed;
  opacity: .85;
}
/* v2.90.7 开通系统：「开通此飞行点」按钮——琥珀色醒目（可点击，区别于灰化目的地） */
.info-panel-dialogue .dlg-response-btn.flight-unlock-btn {
  color: #ffd27a;
  border-color: #a8741f;
  background: linear-gradient(180deg, #3a2c10, #221908);
  text-shadow: 0 0 4px rgba(255,210,122,.45);
}
.info-panel-dialogue .dlg-response-btn.flight-unlock-btn:hover {
  color: #ffe6a8;
  border-color: #ffb454;
}
/* 对话区错误/空态 */
.info-panel-dialogue .dlg-error,
.info-panel-dialogue .dlg-empty {
  font-size: 11px;
  color: #c08080;
  padding: 4px 0;
}
/* v1.09.5：NPC 交易弹窗分区（买区/卖区标题 + 区容器；行复用 .shop-row，按钮复用 .shop-buy-btn） */
.npc-trade-section { margin-bottom: 12px; }
.npc-trade-title {
  font-size: 12px;
  font-weight: bold;
  color: #e0c060;
  padding: 4px 6px;
  margin-bottom: 4px;
  background: rgba(42, 33, 20, 0.5);
  border-left: 3px solid #6b5420;
  border-radius: 3px;
}
#npc-shop-list, #npc-sell-list { max-height: 30vh; overflow-y: auto; }
.info-panel-questlist .quest-item {
  margin-bottom: 6px;
  padding: 8px;
}
/* ---- 新版 NPC 方框内部：顶部细血条(等级覆盖其上) + 下方名字(自适应字号) ---- */
/* 细血条容器：只有 6px 高的一条，position:relative 作为等级覆盖的定位基准 */
.npc-hp-top { position: relative; width: 100%; height: 6px; background: #241c10; border: 1px solid #4a3a1c; border-radius: 2px; flex-shrink: 0; }
/* 血量填充：绝对定位铺满细条，宽度由 JS 按当前血量百分比设置 */
.npc-item .npc-hp-fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #d23b2b, #ff4444); transition: width .3s; border-radius: 1px; }
/* 等级：绝对定位压在细血条正中（不占额外高度），白字+双层黑阴影保证红条上清晰可读 */
.npc-item .npc-level { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; font-size: 7px; line-height: 1; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; z-index: 1; }
/* 名字：单行不换行，装不下的由 JS 自动缩字号兜底（ellipsis 保底不溢出） */
/* 右侧留 6px —— 施法时竖向读条贴在方框右边，名字不钻到读条底下去 */
.npc-item .npc-name { font-size: 8px; font-weight: bold; color: inherit; line-height: 1.15; word-break: break-all; overflow: hidden; padding-right: 6px; }   /* v6.319.0：默认就允许折行、永不省略号（Boss m01007「还是有省略号」）；单行缩字号仍由 fitNameToBox 先试 */
/* v6.313.0（Boss m00576）：名字能显示完就显示完——单行缩到 7px 仍放不下时折两行，不用省略号截断 */
.npc-item .npc-name.npc-name-wrap { white-space: normal; word-break: break-all; text-overflow: clip; line-height: 1.15; }
/* v3.84.0 仇恨条：怪物名字下的一行小字（玩家/宠物威胁占比） */
.npc-item .npc-threat { font-size: 7px; line-height: 1.15; color: #ffcf5a; opacity: 0.85; word-break: break-all; overflow: hidden; padding-right: 6px; }   /* v6.319.0：仇恨行不再省略号截断 */
/* v3.41.0 资源条（法力/能量/怒气）：细横条，排在血条**正下方**。
   有资源数据的目标才渲染（术士宠=蓝、猎人宠=黄、法系怪=蓝、战吼怪=红），没有就不占高度 */
.npc-res-top { position: relative; width: 100%; height: 4px; background: #241c10; border: 1px solid #4a3a1c; border-radius: 2px; overflow: hidden; flex-shrink: 0; }
/* 资源填充：绝对定位铺满细条，宽度由 JS 按当前资源百分比设置；按类型上色 */
.npc-item .npc-res-fill { position: absolute; left: 0; top: 0; bottom: 0; transition: width .3s; border-radius: 1px; }
.npc-item .npc-res-fill.mp { background: linear-gradient(90deg, #2b5ec9, #4f8ff5); }      /* 法力：蓝 */
.npc-item .npc-res-fill.energy { background: linear-gradient(90deg, #b8901f, #f5d54f); } /* 能量：黄 */
.npc-item .npc-res-fill.rage { background: linear-gradient(90deg, #8c1a1a, #d33b2b); }   /* 怒气：红 */
/* ★ v3.44.1 法术读条：改回**贴在方框右侧、从下往上读**的竖条（Boss 定案，2026-10-15 第二次改回）。
   为什么不放血条下面：三条挨在一起既难看又白占框高（v3.44.0 试过，Boss 退回）。
   竖条 absolute 定位，完全不占布局高度，血条→资源条→名字的排列不受影响。
   颜色改**亮黄色**：统一玩家与 NPC 读条配色。 */
.npc-cast-bar { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 4px; background: rgba(0,0,0,.55); border: 1px solid #4a3a1c; border-radius: 2px; overflow: hidden; z-index: 2; }
/* 读条填充：贴紧容器底部，**高度**由 JS 每帧插值设置（0→100% 平滑流，从下往上长）。
   ★ 刻意不写 transition —— 动画由 requestAnimationFrame 逐帧驱动，
   CSS 过渡会和逐帧更新打架，反而造成卡顿/回跳 */
.npc-item .npc-cast-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: #ffeb3b; border-radius: 1px; }
.npc-empty { font-size: 11px; color: #6a5a3a; text-align: center; padding: 10px 4px; }
/* 战斗信息滚动区：min-height:0 是 flex 布局关键 ——
   允许它比内容小，这样 overflow-y:auto 才会在框内出滚动条而不是撑大父级 */
#text-area { flex: 1; min-width: 0; min-height: 0; overflow: hidden; padding: 8px; background: #0e0c08; display: flex; flex-direction: column; position: relative; } /* v0.89.0: position:relative 作为目标弹窗定位基准，弹窗只盖战斗日志区 */
/* 环境描述面板：flex-shrink:0 固定不压缩，始终可见于文本区顶部，紧凑多行布局 */
.room-desc-panel {
  flex-shrink: 0;
  background: #1a140c;
  border: 1px solid #3a2a14;
  border-radius: 4px;
  padding: 6px 12px;
  margin-bottom: 8px;
  font-size: 9px;
  line-height: 1.4;
  max-height: 50px;
  overflow-y: auto;
}
.room-desc-panel.hidden { display: none; }
/* 地名：小字号、暗金色、粗体 */
.room-desc-location {
  font-size: 9px;
  color: #a09070;
  font-weight: bold;
  font-family: "STKaiti", "KaiTi", "SimSun", serif;
}
/* 分隔符 */
.room-desc-sep {
  color: #5a4a2a;
  margin: 0 4px;
}
/* 环境描述：9px、米白色、楷体 */
.room-desc-content {
  font-size: 9px;
  color: #f5f0dc;
  font-family: "STKaiti", "KaiTi", "SimSun", serif;
}
/* v2.83.0：字号 11px→10px（小一号）+ 紧凑字体栈（见文件上方 #news-bar/#log-list 联合声明）。
   v2.83.1（主人需求：行间距再缩减一些）：行距与段距继续压缩 ——
     line-height 1.45 → 1.30、段落下边距 2px → 1px
     每行占高：16.5px（v2.83.0）→ 13+1 = **14px**，同高度多显示约 15% 的战斗信息。
     为什么不再压更低：10px 中文在 line-height <1.3 时上下笔画开始粘连，
     实测 1.3 是「还能看清」的下限，再小就得牺牲可读性换空间，不划算。 */
#log-list { font-size: 10px; line-height: 1.3; overflow-y: auto; flex: 1; min-height: 0; }
/* v6.524.0（Boss m00002）：设置「战斗日志字号」中/大档——小号=默认 10px（不另挂类） */
#log-list.log-font-middle { font-size: 12px; }
#log-list.log-font-big { font-size: 14px; }
#log-list p { margin-bottom: 1px; word-wrap: break-word; }
#log-list p.sys { color: #9ed4ff; }
/* v5.1.37（Boss 指令）：跨图区域横幅「—— 你来到了X ——」专属样式（app.js 判 sys area_title 双类）——
   文字水平居中 + 上下各空出一行：13px ≈ 一行文字的行高（10px 字号 × 1.3 行距），
   与前后日志隔开、更醒目；颜色沿用上面的 sys 浅蓝，这里只管排版不重复上色。
   窄屏不溢出：p 是块级元素、宽度即容器宽，#log-list p 自带 word-wrap: break-word 兜底。 */
#log-list p.sys.area_title { text-align: center; margin-top: 13px; margin-bottom: 13px; }
/* v3.140.23 战利品纯白 —— 老板要求「获得战利品纯白色显示」，
   白色在一堆深色战斗行里最跳，一眼就能看到自己捡到了什么 */
#log-list p.loot { color: #ffffff; }
#log-list p.battle { color: #d2703b; }
#log-list p.npc { color: #e8c87a; }
#log-list p.desc { color: #b8a878; }
#log-list p.move { color: #9a814e; }
/* v3.916.0（Boss 指令）：人物升级提示改绿色（原 #c9a24a 金黄，从没被前端接过，就是默认色的原因）。
   用项目标准绿 #4fd84f（与 .heal 治疗恢复绿同色），升级是好事，绿色最直观。 */
#log-list p.level { color: #4fd84f; font-weight: bold; }
/* v3.19.0：BOSS 开战喊话行（亮黄色，比 NPC 的米黄更醒目 + 加粗，战斗界面一眼看出是 BOSS 在喊话） */
#log-list p.boss_shout { color: #ffe23b; font-weight: bold; }
/* v3.109.0：声望跨档晋升行（亮黄加粗；与 BOSS 喊话同色，但语义独立，便于以后单独调色） */
#log-list p.rep_up { color: #ffe23b; font-weight: bold; }
/* v4.7.6 阵营卫兵巡逻喊话（Boss：「台词要符合魔兽世界背景」）：
   橙黄、不加粗 —— 和 BOSS 的亮黄加粗区分开，城里巡逻喊话不抢 BOSS 的戏。
   落在战斗日志常驻区，手机不用悬停也看得见。 */
#log-list p.guard_shout { color: #ffb84d; }
/* v0.82.0 P2 战斗日志增强：箭头行（攻击者 → 目标 结果（技能））配色
   .atk 箭头行基础色 / .dmg 伤害数字红 / .crit 暴击深红加粗 / .heal 治疗恢复绿 / .miss 未命中灰 */
#log-list p.atk { color: #d8c9a0; }
#log-list p .dmg { color: #ff5c5c; font-weight: bold; }
#log-list p .crit { color: #ff2d2d; font-weight: bold; text-shadow: 0 0 4px rgba(255,45,45,0.5); }
#log-list p .heal { color: #4fd84f; font-weight: bold; }
#log-list p .miss { color: #7a7468; }
/* v3.140.2 战斗信息框颜色分层（补两类，让一屏能分出层次，不再一个颜色）
   .kill 击杀行（亮橙加粗）：玩家最关心「打死了/拿到多少经验」，独立成色
   .cast 施法/状态提示（蓝紫）：「你施放X / 你激活了X / 你放置了X」这类战斗动作，
        原来落 .desc（暗米）跟房间描述、移动提示混一起看不出来 */
#log-list p.kill { color: #ff9a3c; font-weight: bold; }
#log-list p.pvp-dmg { color: #c77dff; font-weight: bold; }   /* v6.285.0 PvP 受击行紫（Boss 指令：敌方伤害数值别用暗金） */
#log-list p.cast { color: #a89ce8; }
#bottom-panel { background: #0e0c08; border-top: 1px solid #2a2114; border-bottom: 1px solid #2a2114; display: flex; flex-direction: column; align-items: stretch; }
/* v6.549.0（Boss 指令）玩家反映操作区太挤：整个操作区高度 +10 —— 上下内边距 3→8px（+10px）；
   九宫格与快捷栏每排高度再 +3（九宫格 20→23、快捷栏 24→27），两边总高同步 74→83px 重新对齐
   v6.553.0（Boss 红笔圈图：上边+侧边还有空隙，格子等比放大填满空白）：四周 padding 8/6→2、
   margin 6→4，系数 242→226、cap 44；格子宽高全走 min(44px,(100vw-226px)/4) × 0.81 等比公式，
   九宫格行高同步 h-4 保持两边恒等；375 档格子 33.3×27→37.25×30.16（面积+25%）、总宽 372≤375 */
#map-panel { background: #120f0a; padding: 2px; display: flex; align-items: center; justify-content: center; }   /* v6.553.0（Boss 红笔圈图：上边+侧边都还有空隙，格子等比放大填满空白）：四周统一 8px 6px→2px，挤出的 16px 高/8px 宽全给格子 */

/* v2.84.0 手动技能/物品栏：12 格（九宫格左 6 右 6）
   v2.84.2 每侧改为 3 行×2 列网格，填满九宫格两侧空隙
   关键对齐：九宫格 .map-cell 行高 18px、gap 8px → 总高 3×18+2×8=70px。
   v2.84.3 手机优化：间隙收窄 8px→2px，空间全给格子（列 29px/行 22px），
   单格面积 468→638（+36%），手指更好按；总宽 2×29+2=60px、总高 3×22+2×2=70px
   保持不变，九宫格逐行对齐不破 */
#action-bar-left, #action-bar-right {
  display: grid;
  /* v6.552.0（Boss 回「没有变化」→ 根因：其手机视口在 375 档，v6.550 公式仅 +0.3px 无感）：
     系数 254→242 再挤三处空隙：#map-panel 左右 padding 8→6、中间 margin 8→6、安全余量 8→4。
     242 = 左右 padding 12 + 中间 margin 12 + 九宫格 212 + 栏内 gap 2 + 余 4。
     375 视口 30→33.25px（+11% 可见）、390 →37（+23%）、412 →40（+33%）；352/360 自动收缩防溢出。
     上限 40px：412 视口下 2×40+1=81px 栏宽，再大格子比例失真。 */
  grid-template-columns: repeat(2, min(44px, (100vw - 226px) / 4));
  grid-template-rows: repeat(3, calc(min(44px, (100vw - 226px) / 4) * 0.81));   /* v6.553.0：固定 27px→等比公式（宽×0.81，保持 v6.552 的 33.3:27 宽高比）；与九宫格行高 h-4 严格对齐（3h+2 = 3(h-4)+14） */
  gap: 1px 1px;
}
#action-bar-left { margin-right: 4px; }   /* v6.553.0：6→4px，空间全让给格子 */
#action-bar-right { margin-left: 4px; }   /* v6.553.0：6→4px */
.action-cell {
  width: min(44px, (100vw - 226px) / 4); height: calc(min(44px, (100vw - 226px) / 4) * 0.81); position: relative;   /* v6.553.0：宽高都走等比公式（Boss 指令：格子等比放大填满四周空白），375 档 33.3×27→37.25×30.16（面积 +25%） */
  border: 1px solid #3a2e1a; border-radius: 3px; background: #1a140c;
  display: flex; align-items: center; justify-content: center;
  font-size: 7px; color: #8a7a5a; cursor: pointer; overflow: hidden;   /* v6.316.0：9→7px，格子内要塞下 4 个汉字（4×7=28 = 内容盒宽 28）；v6.290.0 时是 10→9px */
  text-align: center; line-height: 1.05; padding: 0; word-break: break-all; letter-spacing: -0.2px; white-space: pre-line;   /* v6.319.0：pre-line 让 5~6 字技能的「上3下3」换行生效；v6.316.0：去掉 1px 内边距 + 折两行/微收字距 */
  user-select: none;
}
.action-cell:hover { border-color: #8a6a2c; background: #2a1f10; }
/* v6.7.0 手感：按下瞬间格子弹起+提亮（触屏也能触发，配合 pointerdown 即时施法） */
.action-cell:active { transform: scale(0.92); filter: brightness(1.4); }
.action-cell.ac-skill { color: #e8c87a; }
.action-cell.ac-item  { color: #7ddf6b; }
.action-cell.ac-trinket { color: #c9a24a; }
.action-cell.ac-empty { color: #3a2e1a; }
/* CD 遮罩：绝对定位灰罩 + 秒数（由 app.js 更新） */
.action-cell .ac-cd {
  position: absolute; inset: 0; background: rgba(0,0,0,0.65);
  color: #ffe9b0; font-size: 11px; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
}
.action-cell .ac-type {
  position: absolute; top: 0; left: 0; font-size: 7px; color: #6a5a3a;
}

/* ============ v2.87.0 快捷栏配置弹窗容器（修"点按钮没动静"根因）============
   此前漏了容器 CSS：#action-bar-modal 无定位/无遮罩，点"快捷栏"按钮后弹窗掉到
   页面底部流式排版里，看起来像没发生。照 #map-modal 范式补齐：
   fixed 全屏遮罩 + 居中 + .hidden 隐藏规则。内部盒子复用 .map-modal-box。 */
#action-bar-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; }
#action-bar-modal.hidden { display: none; }   /* 与 openActionBarModal() 移除/加回 hidden 类联动 */

/* v2.84.0 配置弹窗：12 格预览 + 主菜单 + 列表
   v6.6.6 BUGFIX：预览从「3 行×4 列大网格」改成左右两组各 2 列×3 行（同战斗界面
   #action-bar-left/right 的排法），中间空隙即九宫格位置——旧版预览「右上角」
   是槽 3，战斗界面槽 3 却在左侧第 2 排第 2 格，配置位置和实战对不上 */
#action-bar-preview { display: flex; justify-content: center; gap: 12px; padding: 8px 0; }
#action-bar-preview .abp-side { display: grid; grid-template-columns: repeat(2, 40px); grid-template-rows: repeat(3, 40px); gap: 5px; }
#action-bar-preview .action-cell { width: 40px; height: 40px; font-size: 8px; }   /* v6.316.0：预览也显示 4 字，40px 格 8px 字号 4 字宽 32px 放得下 */
#action-bar-menu .abm-hint { color: #8a7a5a; font-size: 12px; text-align: center; padding: 14px 0; }
#action-bar-menu .abm-menu-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; margin: 4px 0; cursor: pointer;
  border: 1px solid #3a2e1a; border-radius: 4px; background: #1a140c;
  color: #e8c87a; font-size: 13px;
}
#action-bar-menu .abm-menu-item:hover { background: #2a1f10; border-color: #8a6a2c; }
#action-bar-menu .abm-title { color: #c9a24a; font-size: 12px; font-weight: bold; margin: 8px 4px 4px; }
#action-bar-menu .abm-list-item {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 6px 10px; margin: 2px 0; cursor: pointer;
  border: 1px solid #2a2114; border-radius: 3px; background: #14100a;
  color: #d8c8a0; font-size: 12px;
}
#action-bar-menu .abm-list-item:hover { background: #241c10; border-color: #6b4a1c; }
#action-bar-menu .abm-list-item .sub { color: #8a7a5a; font-size: 10px; }
#action-bar-menu .abm-list-item.disabled { opacity: 0.4; cursor: not-allowed; }
#map-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 7px 10px; max-width: 212px; margin: 0 auto; }
/* v2.84.5 手机优化：单格定 55×20px、gap 2px → 总高 3×20+2×2=64px（与同步为 20px 行高的快捷栏对齐） */
/* v2.84.6 间隙加宽：行间(上下) 2→4px、列间(左右) 2→8px → 总高 3×20+2×4=68px、总宽 3×55+2×8=179px */
/* v2.84.7 左右间隙再加 2：列间 8→10px → 总宽 3×55+2×10=185px（< max-width 190 无溢出），总高 68px 不变 */
/* v2.84.8 单格宽度(长度) 55→57px：总宽 3×57+2×10=189px+边框，max-width 同步 190→191px 防止列被压缩；总高 68px 不变 */
/* v2.84.9 单格宽度再 +2：57→59px，总宽 3×59+2×10=199px，max-width 同步 191→199px；map-panel 整条 60+10+199+10+60=339px < 358px 无溢出 */
/* v2.84.10 单格宽度再 +3：59→62px，总宽 3×62+2×10=206px，max-width 同步 199→206px；面板整条 60+10+206+10+60=346px < 358px 无溢出 */
/* v2.84.11 单格宽度再 +2：62→64px，总宽 3×64+2×10=212px，max-width 同步 206→212px；
   同时行间 gap 4→5px（总高 3×20+2×5=70px，与快捷栏 70px 精确对齐）；
   面板整条 60+10+212+10+60=352px，贴手机 352px 可用宽上限，改完必须 playwright 实测确认不溢出 */
/* v2.84.13 九宫格上下间隙 5→7px（+2），总高 3×20+2×7=74px；快捷栏上下间隙同步 2→4px，总高 3×22+2×4=74px，两边重新对齐 */
/* v6.549.0 Boss 指令：操作区整体加高——九宫格行高 20→23px（总高 3×23+2×7=83px）、
   快捷栏行高 24→27px（总高 3×27+2×1=83px）两边重新对齐；#map-panel 上下内边距 3→8px 整区再 +10px */
.map-cell { width: 64px; height: calc(min(44px, (100vw - 226px) / 4) * 0.81 - 4px);   /* v6.553.0：23px→等比公式 h-4，与快捷栏总高恒等对齐（3c+14=3h+2）；375 档 23→26.16px */ display: flex; align-items: center; justify-content: center; text-align: center; font-size: 10px; padding: 1px 2px; border: 1px solid #3a2e1a; border-radius: 3px; background: #1a140c; color: #8a7a5a; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-cell.current { background: #3a2a10; color: #ffe9b0; font-weight: bold; border-color: #8a6a2c; }
/* v6.970.0（Boss m00002）：九宫格中心格站在飞艇/渡轮航线房——青边 + 艇/船 CSS 角（右上）；
   v6.971.0（Boss m00475）：角标字改 attr(data-tpmark)（艇/船/梯/车任意组合一条规则通吃，
   不再按类写 2^n 条组合） */
.map-cell.transport { position: relative; border-color: #3ac8d8; }
.map-cell.transport[data-tpmark]::after { content: attr(data-tpmark); position: absolute; right: 2px; top: 0; font-size: 9px; font-weight: bold; color: #5adce8; line-height: 1; }
.map-cell.clickable { background: #2a1f10; color: #e8c87a; border-color: #6b4a1c; }
.map-cell.clickable:active { background: #3a2a14; }
.map-cell.empty { background: transparent; border-color: transparent; cursor: default; }
/* v6.881.0（Boss m00002）：长房名/跨图格换行显示，不再用省略号截断（Boss 一贯口径：
   能显示完的就显示完，不许省略号）。.wrap 放开 nowrap，两行时按内容自适应。 */
.map-cell.wrap { white-space: normal; word-break: break-all; line-height: 1.05; overflow: visible; text-overflow: clip; }
/* 跨图格：第一行「→目标图名」青蓝（与图形地图画布上的跨图标记同色），第二行房名小字 */
.map-cell.far { flex-direction: column; gap: 0; font-size: 9px; }
.map-cell.far .far-map { color: #8ac0e8; font-size: 9px; line-height: 1.1; }
.map-cell.far .far-room { color: #b9a06a; font-size: 8px; line-height: 1.1; }
/* v2.93.0 状态栏：5 格**平均分配铺满整条**（生命/资源/连击/经验/等级）。
   Boss 定案五条：
     ① 5 格等宽等分，各占 20%，格与格之间用竖线分隔 → 视觉上是一条完整的横条
     ② 禁止换行（nowrap）+ 0 最小宽 → 物理上不可能折到第二行
     ③ 格子常驻不隐藏（连击点 0 点也显示 5 个空 pip）→ 经验/等级不会来回跳位
     ④ 标签汉字贴到格子最左边，左右内边距和间隙压到最小 → 把空余全让给进度条
     ⑤ **整条状态栏的 8px 内边距也去掉**，标签再负 1px 抵消字体自身留白
        → 「生命」两字真正顶到游戏框最左边，条宽 96px → 101px（+5%） */
#status-bar { background: #1a140c; border-top: 2px solid #5a3d18; padding: 2px 0; height: 22px; display: flex; align-items: center; }
/* v3.141.16：状态栏条目变多后原来单行 18px + overflow:hidden 会把后面的 buff 直接裁掉。
   改为「最少 1 行、最多 3 行自动换行」，超出才出现细滚动条。 */
#buff-bar { background: #0e0c08; border-top: 2px solid #3a2a14; padding: 1px 8px; min-height: 18px; max-height: 46px; overflow-y: auto; overflow-x: hidden; white-space: normal; display: flex; align-items: flex-start; gap: 4px; }
/* v3.15.0 萨满图腾召唤物栏（与 buff-bar 同款结构，青蓝色区分召唤物语义；无图腾时隐藏） */
/* v3.155.0 猎人陷阱召唤物（目标栏）：青绿框；无血条，顶部显示「剩余 N 秒」 */
.npc-item.trap { border-color: #2e8b57; background: #0e2418; }
.npc-item.trap:hover { background: #14382a; }
.npc-item.trap .npc-name { color: #5fe0b0; }
/* v6.42.0 尸体（Boss 指令）：灰框灰名；已剥皮的更暗一档 */
.npc-item.corpse { border-color: #8a8a8a; background: #1c1c1c; }
.npc-item.corpse:hover { background: #262626; }
.npc-item.corpse .npc-name { color: #b0b0b0; }
.npc-item.corpse-skinned { border-color: #5a5a5a; background: #141414; }
.npc-item.corpse-skinned .npc-name { color: #6a6a6a; }
.npc-trap-rem { font-size: 10px; color: #7fd4b0; line-height: 1.3; }
/* v3.155.0 删除：原 #totem-bar / .totem-label / .totem-text / .totem-item / .totem-time
   （陷阱状态栏已移除，陷阱改走目标栏 .npc-item.trap） */
#enemy-buff-bar { background: #1a0e0e; border-top: 2px solid #5a2a2a; padding: 1px 8px; min-height: 18px; max-height: 46px; overflow-y: auto; overflow-x: hidden; white-space: normal; display: flex; align-items: flex-start; gap: 4px; }
.enemy-name { font-size: 9px; color: #ff6b6b; font-weight: bold; margin-right: 6px; flex-shrink: 0; }
.buff-row { display: flex; align-items: center; gap: 6px; }
.buff-label { font-size: 9px; color: #5a4a2a; font-weight: bold; flex-shrink: 0; }
.buff-text { font-size: 10px; color: #c9a24a; line-height: 1.4; flex: 1; min-width: 0; white-space: normal; word-break: break-word; }
.buff-text .buff-item { display: inline-block; margin-right: 8px; white-space: nowrap; }
.buff-text .buff-item.buff { color: #7ddf6b; }
.buff-text .buff-item.debuff { color: #ff6b6b; }
.buff-text .buff-time { color: #8a7a5c; margin-left: 2px; }

/* 骑士圣印/光环状态栏样式 */
#paladin-status-bar { background: #1a1a2e; border-top: 2px solid #4a4a6a; padding: 4px 8px; }
.paladin-status-row { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.paladin-status-label { color: #8a7a5c; font-weight: bold; }
.paladin-status-value { color: #c9a24a; }
.paladin-status-sep { color: #5a4a2a; }
/* v3.112.0 圣印/光环两行改成可点击：按钮外观（去边框去底色）+ 手型光标 + 悬停高亮 */
.paladin-pick {
  background: none; border: none; padding: 0 2px; margin: 0;
  font: inherit; color: #c9a24a; cursor: pointer; text-align: left;
  border-bottom: 1px dashed #6b5420;
}
.paladin-pick:hover { color: #ffe9b0; border-bottom-color: #c9a24a; }
/* v3.112.0 圣印/光环选择器弹窗：列表每行 = 名字 + 说明 + 消耗；当前生效的高亮 */
#paladin-picker-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 70; }
#paladin-picker-modal.hidden { display: none; }
#paladin-picker-close { width: 28px; height: 28px; font-size: 16px; line-height: 1; color: #c9a24a; background: #2a1f10; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; }
#paladin-picker-close:hover { border-color: #c9a24a; color: #ffe9b0; }
.pal-picker-item {
  padding: 6px 8px; margin-bottom: 5px; cursor: pointer;
  background: #1a140c; border: 1px solid #3a2e1a; border-left: 3px solid #6b5420; border-radius: 4px;
}
.pal-picker-item:hover { background: #241c10; border-left-color: #c9a24a; }
.pal-picker-item.active { border-left-color: #7ddf6b; background: #16241a; }
.pal-picker-name { color: #e8c87a; font-size: 13px; font-weight: bold; }
.pal-picker-desc { color: #8a7a5c; font-size: 11px; line-height: 1.4; margin-top: 2px; }
.pal-picker-cost { color: #6a8fc0; font-size: 11px; margin-top: 3px; }
.pal-picker-empty { color: #8a7a5c; font-size: 12px; text-align: center; padding: 14px 0; }
/* v6.1008.0 姿态说明弹窗：遮罩范式同 #paladin-picker-modal，层级要压在技能弹窗（z-index 60）之上 */
#stance-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 70; }
#stance-modal.hidden { display: none; }
#stance-modal-close { width: 28px; height: 28px; font-size: 16px; line-height: 1; color: #c9a24a; background: #2a1f10; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; }
#stance-modal-close:hover { border-color: #c9a24a; color: #ffe9b0; }
/* 行样式复用 .pal-picker-*，这里只补「等级不够」的置灰态 */
.pal-picker-item.locked { opacity: .45; cursor: not-allowed; }
.pal-picker-item.locked:hover { background: transparent; border-left-color: #4a3a1c; }
/* v2.93.0 状态栏：5 格**平均分配铺满整条**（生命/资源/连击/经验/等级）。
     ① 5 格等宽等分，各占 20%，格与格之间用竖线分隔 → 视觉上是一条完整的横条
     ② 禁止换行（nowrap）+ 0 最小宽 → 物理上不可能折到第二行
     ③ 格子常驻不隐藏（连击点 0 点也显示 5 个空 pip）→ 经验/等级不会来回跳位
     ④ 标签汉字贴到格子**最左边**，左右内边距和间隙压到最小 → 把空余全让给进度条
        （原 padding 0 5px + gap 3px = 每格空 13px，条只有 88px；现在空 5px，条 ~96px） */
.stat-row { display: flex; align-items: stretch; gap: 0; flex-wrap: nowrap; overflow: hidden; height: 100%; flex: 1 1 auto; width: 100%; }
.stat-item { display: flex; align-items: center; gap: 2px; flex: 1 1 0; min-width: 0; padding: 0 2px 0 0; box-sizing: border-box; }
.stat-item + .stat-item { border-left: 1px solid #2a1f10; }
/* v2.93.0 标签：margin-left 保持 0（不要负值）。
   ★ 踩坑：试过 margin-left:-1px 想把「生」字顶到 0 列，高倍截图放大后发现
     `#app` 有 overflow:hidden + border-left，字形超出部分**被裁掉一撇**（字不完整）。
     1px 的 CJK 字体留白（side bearing）必须留，这是字形完整性所需，不是浪费。 */
.stat-label { width: auto; font-size: 8px; color: #b89a5c; flex-shrink: 0; white-space: nowrap; }
.stat-bar { position: relative; flex: 1 1 0; height: 12px; min-width: 34px; background: #241c10; border: 1px solid #4a3a1c; border-radius: 2px; overflow: hidden; }
.stat-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; transition: width .3s; }
.stat-bar.hp .fill { background: linear-gradient(90deg, #1e5a2a, #34c04a); }  /* 生命=绿色（v2.92.2 Boss 定案） */
.stat-bar.mp .fill { background: linear-gradient(90deg, #1c3a8a, #2b6bd2); }
.stat-bar.mp.rage .fill { background: linear-gradient(90deg, #8a1c1c, #d23b2b); }  /* 怒气=红色（战士专用，v2.92.2） */
.stat-bar.mp.energy .fill { background: linear-gradient(90deg, #8a6a1c, #d3a32b); }  /* 能量=黄色（盗贼专用，v2.93.0 官方1.12 能量条） */
/* v2.93.0 能量节拍条：细线在条内右侧，表示距离下一次「跳 20 点」还有多远（卡节拍技巧的辅助） */
/* v3.900.2 能量节拍线已删除（Boss 定案：不显示，能量正常回复就行）——
   原来这里是 `.stat-bar.mp.energy .beat-mark`（条内那根 2px 细线），样式一并清掉。 */
/* v3.01.0 删掉「满能量=暗黄」那条：它每 2 秒亮/暗闪一次，能量槽看着一跳一跳。
   现在能量条固定一种黄色，满不满看旁边的数字（100/100）就知道。 */
/* v2.93.0 连击点：最多 5 点，终结技威力倍率（官方第二资源）
   常驻显示（不再按点数隐藏/弹出）：5 个 pip 铺满本格，0 点时全暗、有点时点亮
   v3.900.0 更正：这一格保留（Boss 定案连击点就显示在这里），
   同时去掉状态栏 buff 里那条重复的「连击点:N」 */
#combo-bar { display: flex; align-items: center; justify-content: space-between; gap: 1px; flex: 1 1 0; min-width: 34px; height: 12px; padding: 0 2px; box-sizing: border-box; background: #241c10; border: 1px solid #4a3a1c; border-radius: 2px; }
.combo-pip { flex: 1 1 0; height: 8px; background: #2a2010; border: 1px solid #4a3a1c; border-radius: 1px; }
.combo-pip.on { background: linear-gradient(180deg, #ffe680, #d3a32b); border-color: #d3a32b; box-shadow: 0 0 3px rgba(255,214,96,.55); }
.combo-label { font-size: 8px; color: #b89a5c; }
/* v2.93.0 等级格：删掉 `.stat-bar.level` 空框（等级不是可填充资源，套框是视觉噪音）。
   改为纯文字：占满本格剩余宽度并**右对齐**，让 5 格的数字右端连成一条竖线。
   ⚠️ 格子本身仍是 flex:1 1 0（等宽），去掉框不会导致前面的格子跳位。 */
.stat-val.level { color: #ffe9b0; font-weight: bold; font-size: 10px; flex: 1 1 0; min-width: 0; text-align: right; padding-left: 0; padding-right: 2px; }
.stat-bar.exp .fill { background: linear-gradient(90deg, #5b21b6, #8b5cf6); }
/* v2.97.0→v2.84.x 法师读条格：改为亮黄色（与 NPC 读条统一配色，表示「正在施放」）。
   格子本身用 .stat-bar cast 复用 12px 条结构；未读条时 visibility:hidden 占位（不跳位）。 */
.stat-bar.cast .fill { background: #ffeb3b; }
/* v3.44.0 读条格宽度由全局 rAF 每帧插值（平滑流到 100%），
   继承的 .stat-bar .fill{transition:width .3s} 会和逐帧更新打架造成卡顿/回跳 → 这里单独去掉过渡。 */
.stat-bar.cast .fill { transition: none; }
.stat-bar span { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); font-size: 8px; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; white-space: nowrap; }
.stat-val { font-size: 10px; color: #c9a24a; flex-shrink: 0; padding-left: 4px; }
.stat-val.gold { color: #e8c87a; }

#tabs { display: flex; background: #1a140c; border-top: 1px solid #3a2e1a; }
.tab { flex: 1; padding: 8.5px 0; background: transparent; color: #b89a5c; border: none; border-right: 1px solid #2a2114; font-size: 11px; font-family: inherit; cursor: pointer; } /* v2.84.12 页签高度降低3px：上下 padding 10→8.5px，总高 36→33px（居中对齐） */
.tab:last-child { border-right: none; }
.tab:active { background: #2a1f10; color: #e8c87a; }
#create-modal { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-box { width: 80%; max-width: 320px; max-height: calc(100vh - 24px); overflow-y: auto; background: #1a140c; border: 2px solid #6b4a1c; border-radius: 8px; padding: 20px; text-align: center; } /* v6.373.0：264px 窄屏建号弹窗高 633px 溢出、按钮点不到 → 限高+内部滚动 */
.modal-box h2 { color: #e8c87a; margin-bottom: 14px; }
#class-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0; }
.class-btn { padding: 8px 4px; font-size: 12px; font-family: inherit; background: #1a140c; color: #b89a5c; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; text-align: center; transition: all 0.2s; }
.class-btn:hover { background: #2a1f10; color: #e8c87a; border-color: #8a6a2c; }
.class-btn.selected { background: #3a2a10; color: #ffe9b0; border-color: #e8c87a; box-shadow: 0 0 4px rgba(232,200,122,0.4); }
/* v2.x 阵营系统：阵营选择按钮（联盟=蓝色调，部落=红色调，选中时高亮） */
.faction-btn { flex: 1; padding: 8px 4px; font-size: 14px; font-family: inherit; background: #1a140c; color: #b89a5c; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; transition: all 0.2s; }
.faction-btn:hover { background: #2a1f10; }
.faction-btn.selected[data-faction="alliance"] { background: #10223a; color: #9ecbff; border-color: #4a8ae8; box-shadow: 0 0 4px rgba(90,150,240,0.5); }
.faction-btn.selected[data-faction="horde"] { background: #3a1010; color: #ff9e9e; border-color: #e84a4a; box-shadow: 0 0 4px rgba(240,90,90,0.5); }
#faction-selector { display: flex; gap: 8px; margin: 6px 0; }
/* v2.x 阵营系统：属性面板角色名旁的阵营徽章（联盟蓝 / 部落红） */
.faction-badge { font-size: 11px; padding: 1px 6px; border-radius: 8px; margin-left: 6px; font-weight: bold; }
.faction-badge.alliance { background: rgba(60,120,220,0.25); color: #9ecbff; border: 1px solid #4a8ae8; }
.faction-badge.horde { background: rgba(220,70,70,0.25); color: #ff9e9e; border: 1px solid #e84a4a; }
/* v2.35.0 种族系统：种族选择按钮（联盟种族偏蓝金、部落种族偏红金，选中高亮） */
.race-btn { flex: 1; padding: 7px 4px; font-size: 13px; font-family: inherit; background: #1a140c; color: #b89a5c; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; transition: all 0.2s; }
.race-btn:hover { background: #2a1f10; }
.race-btn.selected { background: #3a2a10; color: #ffe9b0; border-color: #e8c87a; box-shadow: 0 0 4px rgba(232,200,122,0.5); }
#race-selector { display: flex; gap: 6px; margin: 6px 0; flex-wrap: wrap; }
/* v2.35.0 种族系统：职业按钮灰化（官方 1.12 该种族不可选 → 半透明 + 禁点） */
.class-btn.disabled { opacity: 0.3; cursor: not-allowed; border-color: #2a2418; color: #5a4a2a; box-shadow: none; }
/* v2.35.0 种族系统：属性面板角色名旁的种族徽章（金色调） */
.race-badge { font-size: 11px; padding: 1px 6px; border-radius: 8px; margin-left: 6px; font-weight: bold; background: rgba(180,140,60,0.2); color: #ffd87a; border: 1px solid #a8842c; }
/* v2.36.0 种族天赋卡片（建号界面选种族时展开，展示该族 常驻+触发 两条天赋） */
.race-talent-card { margin: 8px 0 4px; padding: 8px 10px; background: rgba(40,32,16,0.6); border: 1px solid #5a4a2c; border-radius: 6px; }
.race-talent-card.hidden { display: none; }
.rtc-head { font-size: 13px; font-weight: bold; color: #ffd87a; margin-bottom: 6px; }
.rtc-row { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; }
.rtc-tag { flex-shrink: 0; width: 34px; text-align: center; font-size: 11px; padding: 2px 0; border-radius: 4px; margin-top: 2px; font-weight: bold; }
.rtc-tag-p { background: rgba(40,120,80,0.25); color: #7fe0a0; border: 1px solid #2e7a52; }   /* 常驻=绿 */
.rtc-tag-t { background: rgba(200,90,40,0.25); color: #ff9e6a; border: 1px solid #a85a2c; }  /* 触发=橙 */
.rtc-body { flex: 1; }
.rtc-body b { color: #ffe9b0; font-size: 13px; }
.rtc-body div { color: #c9b48a; font-size: 12px; line-height: 1.4; margin-top: 2px; }
/* v2.36.0 属性页种族天赋组（attr-list 下方） */
.attr-race-talent { margin-top: 10px; padding: 8px 10px; background: rgba(40,32,16,0.5); border: 1px solid #5a4a2c; border-radius: 6px; }
.attr-race-talent .attr-rt-title { font-size: 13px; font-weight: bold; color: #ffd87a; margin-bottom: 6px; }
.attr-race-talent .attr-rt-line { color: #c9b48a; font-size: 12px; line-height: 1.5; margin-top: 4px; }
.attr-race-talent .attr-rt-line b { color: #ffe9b0; font-size: 12px; }
#name-input { width: 100%; padding: 10px; font-size: 16px; font-family: inherit; background: #0e0c08; color: #e8c87a; border: 1px solid #4a3a1c; border-radius: 4px; margin-bottom: 12px; }
#name-input::placeholder { color: #5a4a2a; }
/* v6.728.0：取消建号格数自选后只留一行提示（选择器相关样式已下线） */
#bag-size-hint { font-size: 11px; color: #9a8a6a; margin-bottom: 8px; }
#create-btn { width: 100%; padding: 10px; font-size: 15px; font-family: inherit; font-weight: bold; background: linear-gradient(90deg, #5a3d18, #8a6a2c); color: #fff; border: none; border-radius: 4px; }
#create-btn:active { background: #6b4a1c; }
#create-modal.hidden { display: none; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: #1a140c; }
::-webkit-scrollbar-thumb { background: #3a2e1a; border-radius: 2px; }

/* ============ 地图弹窗（点工具栏"地图"按钮弹出，展示艾尔文森林全图 + ★ 标当前位置） ============ */
#map-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; }
#map-modal.hidden { display: none; }   /* 加 hidden 类就隐藏 */
/* Boss 定案（2026-11-01）：弹窗统一手机 9:16 固定比例，禁止自适应——
   宽=min(屏宽-12, (屏高-12)*9/16)，高=宽*16/9；手机≈满屏，电脑=居中竖版手机框 */
.map-modal-box { width: min(calc(100vw - 12px), calc((100vh - 12px) * 9 / 16)); height: min(calc(100vh - 12px), calc((100vw - 12px) * 16 / 9)); max-width: none; max-height: none; background: #120f0a; border: 2px solid #6b4a1c; border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; position: relative; }
/* 弹窗头部：标题 + 右上角关闭按钮 */
.map-modal-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 6px; padding: 10px 12px; border-bottom: 1px solid #4a3a1c; background: #1a140c; } /* 固定一行不换行 */
.map-modal-title { color: #e8c87a; font-size: 15px; font-weight: bold; flex: 1 1 auto; min-width: 0; overflow: hidden; word-break: break-all; line-height: 1.25; } /* v6.319.0：标题里的 NPC 名过长改为折行显示（Boss m01007），不再省略号截断 */
/* 弹窗主体：flex:1 撑满剩余高度，overflow:auto 双向可滚动（东西向横向滚、南北向纵向滚）
   position:relative 让"自动滚到高亮位置"时能用 offsetLeft/offsetTop 精确计算 */
.map-modal-body { flex: 1; overflow: auto; padding: 12px; position: relative; }
/* 文字地图：等宽字体（中文全角=2格，保证线段对齐）；white-space:pre 保留空格换行
   min-width:max-content 让图比容器宽时触发横向滚动，不被压行 */
#map-text { margin: 0; font-family: "Menlo", "Consolas", "Courier New", "STKaiti", "KaiTi", "SimSun", monospace; font-size: 12px; line-height: 1.6; white-space: pre; min-width: max-content; color: #c9a24a; }
/* 玩家当前所在房间：高亮发光（span 是行内元素，加底色不影响等宽对齐） */
.map-here { background: #4a3210; color: #ffe9b0; font-weight: bold; border-radius: 3px; box-shadow: 0 0 6px #e8c87a; padding: 0 2px; }
.map-party { color: #3ddc5a; font-weight: bold; text-shadow: 0 0 5px #1d7a2e; }   /* v5.0.3 文字图：队友房间绿色高亮 */
.map-quest-mark { color: #ff5a5a; font-weight: bold; text-shadow: 0 0 6px #c22; }  /* v6.1001.0 文字图：有任务怪/任务物品的房间红色❗ */
/* v5.1.20 文字图五色标识：城镇按阵营着色 + 码头绿（色值与图形图一致，窄屏不依赖悬停） */
.map-town-alliance { color: #6aa8e8; }   /* 联盟城镇：蓝 */
.map-town-horde { color: #e07a70; }      /* 部落城镇：红 */
.map-town-neutral { color: #e8d48a; }    /* 中立城镇：黄（v5.1.39 提对比：#d9c27a 与默认字色 #c9a24a 太近仅 1.37:1） */
.map-dock { color: #5ad08a; }            /* 码头：绿 */
/* v6.970.0（Boss m00002）：飞艇/渡轮航线房——文字图青色（压过码头绿，与画布青框同口径） */
.map-transport { color: #52d3e8; }
/* 底部图例 */
.map-modal-legend { padding: 8px 12px; font-size: 11px; color: #8a6a2c; border-top: 1px solid #2a2114; background: #14110c; text-align: center; }


/* ============ v5.0.0 魔兽式三级地图（Boss 需求）============
   ① 当前地图（房间格子）→ ② 大陆（区域方块）→ ③ 世界（两块大陆），
   每层实时标玩家位置；canvas 可拖拽/滚轮缩放。手机优先：按钮都在头部，不靠悬停。 */
/* .map-fs-box 尺寸已并入 .map-modal-box 统一 9:16 固定框（原 max-width:720px/88vh 作废） */
.map-hbtn { font-size: 13px; padding: 2px 8px; margin-left: 4px; background: #2a2216; color: #c9b48a; border: 1px solid #5a4d33; border-radius: 4px; cursor: pointer; }
.map-hbtn:active { background: #4a3210; }
/* 层级切换条：三个按钮始终可见（手机直接点） */
.map-level-bar { display: flex; gap: 4px; padding: 6px 10px; background: #14110c; border-bottom: 1px solid #2a2114; }
.map-level-btn { flex: 1; font-size: 12px; padding: 5px 4px; background: #1a140c; color: #8a6a2c; border: 1px solid #3a2e1a; border-radius: 4px; cursor: pointer; }
.map-level-btn.on { background: #4a3210; color: #ffe9b0; border-color: #e8c87a; font-weight: bold; }
/* canvas 撑满主体（canvas 模式下主体去掉内边距/滚动），touch-action:none 才能接管双指缩放/拖拽 */
.map-modal-body.canvas-mode { padding: 0; overflow: hidden; }
#map-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#map-canvas.dragging { cursor: grabbing; }
/* v6.840.0（Boss m00002 第4条）：地图右下角常驻放大/缩小按钮（手机没有滚轮）。
   放在 .map-modal-body 右下空白处（主体已是 position:relative），40px 高度便于手机点击。 */
.map-zoomctl { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.map-zoomctl.hidden { display: none; }
.map-zoom-btn { width: 40px; height: 40px; padding: 0; font-size: 20px; line-height: 1; background: rgba(42,34,22,.88); color: #ffe9b0; border: 1px solid #6b4a1c; border-radius: 6px; cursor: pointer; touch-action: manipulation; }
.map-zoom-btn:active { background: #4a3210; border-color: #e8c87a; }
/* 常驻信息条：点击方块后把详情写在这里 */
.map-info { padding: 6px 12px; font-size: 12px; color: #d9c48a; background: #17130d; border-top: 1px solid #2a2114; min-height: 18px; line-height: 1.5; }

/* ============ 坐骑面板（v3.933.0：点工具栏"坐骑"按钮弹出） ============ */
/* 上半「我的坐骑」只占一小块（最多 110px 高，超出内部滚动）；
   下半「骑乘前往」撑满剩余空间，按大陆分段列大地图 */
#mount-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; }
#mount-modal.hidden { display: none; }
/* .mount-box 尺寸已并入统一 9:16 固定框 */
/* ① 我的坐骑（小区域） */
.mount-owned-section { padding: 6px 10px; border-bottom: 1px solid #2a2114; background: #14110c; }
/* 坐骑栏标题行：左边标题 + 右边展开/折叠按钮 */
.mount-owned-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#mount-fold-btn { font-size: 11px; padding: 1px 8px; color: #c9a24a; background: #2a1f10; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; flex: 0 0 auto; }
#mount-fold-btn:hover { border-color: #c9a24a; color: #ffe9b0; }
#mount-fold-btn:active { background: #3a2a14; }
/* v6.9.7：选择器修正（原 .mount-owned-list 匹配不到 id="mount-owned-list"，上限从未生效）*/
#mount-owned-list { max-height: 130px; overflow-y: auto; }
/* 坐骑格：像装备栏一样一排 5 格，一匹坐骑占一格，空着就是空格 */
.mount-grid { display: grid; grid-template-columns: repeat(5, minmax(48px, 1fr)); gap: 4px; }
.mount-cell { min-height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 3px 2px; background: #1a140c; border: 1px solid #3a2e1a; border-radius: 4px; }
.mount-cell.empty { opacity: .35; }
/* 骑不了的坐骑（种族不符）：暗格 + 虚线边，一眼看出这匹不能骑 */
.mount-cell.locked { opacity: .5; border-style: dashed; background: #151109; }
.mount-cell-name { font-size: 10px; line-height: 1.15; text-align: center; max-width: 100%; overflow: hidden; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mount-cell-speed { font-size: 9px; color: #8a6a2c; }
/* 2026-10-23 Boss 指令：坐骑面板内的提示说明也改纯白（原暗金 #8a6a2c 看不清） */
.mount-empty { padding: 6px 2px; font-size: 11px; color: #ffffff; }
/* v6.9.7（Boss 指令）：目的地列表超出弹窗时可上下滚动——弹窗是 9:16 固定框，
   飞行点多时整块被裁在框外看不见；改成列表内部滚动，段头/图例仍固定不动 */
#mount-travel-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 10px 8px; }
/* ② 骑乘前往（大区域）：按大陆分段，每段一个大地图网格 */
.mount-travel-section { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.mount-travel-head { padding: 6px 0 3px; font-size: 11px; color: #8a6a2c; }
.mount-travel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding-bottom: 6px; }
.mount-travel-cell { display: flex; flex-direction: column; align-items: flex-start; padding: 5px 8px; background: #1a140c; border: 1px solid #3a2e1a; border-radius: 4px; cursor: pointer; text-align: left; }
.mount-travel-cell:hover { border-color: #8a6a2c; background: #241c10; }
.mount-travel-name { font-size: 12px; color: #e8c87a; }
.mount-travel-town { font-size: 10px; color: #8a6a2c; }

/* ============ 背包弹窗（2026-09-02 新增：点底部"背包"页签弹出） ============ */
/* 弹窗结构与地图弹窗同风格（复用 map-modal 的盒/头样式），只新增格子网格部分 */
#bag-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; }
#bag-modal.hidden { display: none; }
#bag-grid { display: grid; grid-template-columns: repeat(6, minmax(48px, 1fr)); gap: 4px; } /* 每排6个，48px下限与装备槽格子同尺寸 */
/* v1.09.5⑫：背包上限 200 格——格区超高时内部滚动（.map-modal-box max-height:85vh 会裁掉溢出，必须 flex:1+overflow） */
/* 左右 padding 与上方"已装备"区一致（10px）→ 两区网格同宽 → 背包格与装备槽格完全同尺寸 */
.bag-modal-body { flex: 1; overflow-y: auto; padding: 4px 10px; }
/* 物品格：正方形格子，中间物品 emoji，右下角堆叠数量角标 */
.bag-cell { aspect-ratio: 1; position: relative; display: flex; align-items: center; justify-content: center; font-size: 22px; background: #1a140c; border: 1px solid #3a2e1a; border-radius: 4px; cursor: pointer; }
.bag-cell:hover { border-color: #8a6a2c; background: #241c10; }
.bag-cell:active { background: #2a1f10; }
/* 空格：变暗、禁止点击 */
.bag-cell.empty { opacity: .4; cursor: default; }
.bag-cell.empty:hover { border-color: #3a2e1a; background: #1a140c; }
/* 堆叠数量角标（白字黑阴影，红/黄格上都能看清） */
.bag-cell .bag-count { position: absolute; right: 2px; bottom: 1px; font-size: 10px; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
/* v6.648.0 背包上锁：格子左上角锁角标（手机无悬停，常驻可见） */
.bag-cell .bag-lock-badge { position: absolute; left: 2px; top: 1px; font-size: 10px; line-height: 1; pointer-events: none; text-shadow: 0 0 2px #000, 0 0 2px #000; }
/* v1.09.5⑩：背包格文字显示（消耗品/材料/工具去 emoji，改物品名小字，如"狼皮"；两行内自动换行） */
.bag-cell-text { font-size: 11px; color: #ffffff; text-align: center; line-height: 1.2; max-width: 96%; overflow: hidden; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* v1.09.5⑫：背包弹窗底部信息行（格数 + 金币，原在头部按 Boss 要求移到底部） */
.bag-footer-info { display: flex; align-items: center; gap: 16px; padding: 6px 12px 2px; font-size: 12px; color: #8a7a5c; }
.bag-footer-info .bag-footer-gold { color: #e8c87a; font-weight: bold; }
/* ============ v0.99.1 装备格去 emoji 改上下两行文本（上排等级 / 下排"胸甲（布）"/武器名）============ */
/* 纵向两行容器：fillEquipCell 统一加 bag-equip-cell（背包装备格 + 装备面板两列格子共用）；字体色/边框色由 JS 按品质内联 */
.bag-equip-cell { flex-direction: column; align-items: center; justify-content: center; gap: 0; line-height: 1.15; }
/* v1.02.1 排版定稿（Boss 定）：格子大小不变（48px），内部上中下三行——等级 / 部位 / 种类 */
.bag-equip-lv { font-size: 9px; font-weight: bold; }
.bag-equip-mid { font-size: 12px; font-weight: bold; line-height: 1.1; }
.bag-equip-sub { font-size: 9px; }
/* 背包弹窗关闭按钮：样式与地图弹窗关闭按钮一致 */
#bag-close-btn { width: 28px; height: 28px; font-size: 16px; line-height: 1; color: #c9a24a; background: #2a1f10; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; }
#bag-close-btn:active { background: #3a2a14; color: #ffe9b0; }
/* 技能/商店/天赋/详情/装备/任务 6 面板关闭按钮：统一与背包关闭键同款风格（v0.77.1，消除浏览器默认灰按钮） */
/* v3.24.2：把漏掉的 4 个关闭按钮并进同一条规则（快捷栏/聊天/好友/NPC 交易）
   —— 它们以前没被任何规则覆盖，页面上就是浏览器默认的灰色裸按钮，和别处不一致。 */
#skill-close-btn, #shop-close-btn, #talent-close-btn, #detail-close-btn, #equip-close-btn, #quest-close-btn,
#action-bar-close, #chat-close-btn, #friend-close-btn, #npc-trade-close-btn, #npc-bank-close-btn,
#map-close-btn, #attr-close-btn, #bag-close-btn, #mount-close-btn,
#inspect-close-btn, #trade-close-btn, #setting-close-btn,
#daily-close-btn, #rep-vendor-close-btn, #city-skills-close-btn, #prof-close-btn,   /* v6.7.45 并入：传令官声望技能弹窗关闭键；v6.11.0 并入专业弹窗 */
#mail-close-btn, #welfare-close-btn {   /* v6.212.0 并入：邮件/福利弹窗关闭键 */
  width: 28px; height: 28px; font-size: 16px; line-height: 1; color: #c9a24a; background: #2a1f10;
  border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; flex: 0 0 auto;
}
#skill-close-btn:active, #shop-close-btn:active, #talent-close-btn:active, #detail-close-btn:active,
#equip-close-btn:active, #quest-close-btn:active, #action-bar-close:active, #chat-close-btn:active,
#friend-close-btn:active, #npc-trade-close-btn:active, #npc-bank-close-btn:active,
#map-close-btn:active, #attr-close-btn:active, #bag-close-btn:active, #mount-close-btn:active,
#inspect-close-btn:active, #trade-close-btn:active, #setting-close-btn:active,
#daily-close-btn:active, #rep-vendor-close-btn:active, #city-skills-close-btn:active, #prof-close-btn:active,
#mail-close-btn:active, #welfare-close-btn:active { background: #3a2a14; color: #ffe9b0; }
#skill-close-btn:hover, #shop-close-btn:hover, #talent-close-btn:hover, #detail-close-btn:hover,
#equip-close-btn:hover, #quest-close-btn:hover, #action-bar-close:hover, #chat-close-btn:hover,
#friend-close-btn:hover, #npc-trade-close-btn:hover, #npc-bank-close-btn:hover,
#map-close-btn:hover, #attr-close-btn:hover, #bag-close-btn:hover, #mount-close-btn:hover,
#setting-close-btn:hover, #daily-close-btn:hover, #rep-vendor-close-btn:hover, #city-skills-close-btn:hover, #prof-close-btn:hover,   /* v6.212.0 并入邮件/福利 */
#mail-close-btn:hover, #welfare-close-btn:hover { border-color: #c9a24a; color: #ffe9b0; }

/* ---- 背包自动用药配置区（2026-09-06 新增）---- */
.bag-auto-potions {
  background: #1a140c;
  border: 1px solid #3a2e1a;
  border-radius: 6px;
  margin: 8px 12px;
  padding: 10px;
}
.bag-auto-potions-title {
  color: #e8c87a;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 8px;
  border-bottom: 1px solid #2a2114;
  padding-bottom: 4px;
}
.bag-auto-potions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 11px;
}
.bag-auto-potions-row:last-child {
  margin-bottom: 0;
}
.bag-auto-potions-label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: #c9a24a;
}
.bag-auto-potions-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: #8a6a2c;
}
.bag-auto-potions-hint {
  color: #8a7a5c;
  white-space: nowrap;
}
.bag-auto-potions-input {
  width: 40px;
  padding: 2px 4px;
  font-size: 11px;
  background: #0e0c08;
  border: 1px solid #4a3a1c;
  border-radius: 3px;
  color: #ffe9b0;
  text-align: center;
}
.bag-auto-potions-tier {
  padding: 2px 4px;
  font-size: 11px;
  background: #0e0c08;
  border: 1px solid #4a3a1c;
  border-radius: 3px;
  color: #ffe9b0;
  cursor: pointer;
}
.bag-auto-potions-save {
  width: 100%;
  padding: 6px;
  margin-top: 8px;
  font-size: 12px;
  font-family: inherit;
  background: linear-gradient(180deg, #6a5020, #3a2c10);
  color: #ffe9b0;
  border: 1px solid #8a6a2c;
  border-radius: 4px;
  cursor: pointer;
}
.bag-auto-potions-save:hover {
  background: linear-gradient(180deg, #7a5c28, #4a3818);
}
/* ============ 角色属性页（v3.169.0 重做：双栏卡片 + 实时进度条） ============ */
/* 设计目标：属性条目多（40+ 行），旧版是一条平铺长列表 —— 看着乱、找不到重点。
   新版按「档案条 + 双栏卡片」重排：左栏放最重要的五维与生命/资源，右栏放攻击/防御等细项，
   百分比类属性带比例条，数值全用文字（禁 emoji），颜色沿用暗金魔兽风。 */
/* 弹窗本体：比其他弹窗宽一点，给双栏留出空间；外框加一层暖光 */
#attr-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; }
#attr-modal.hidden { display: none; }
#attr-modal .map-modal-box {
  background: linear-gradient(180deg, #16110b 0%, #0f0c08 100%);
  border: 1px solid #6b4a1c; border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 0 24px rgba(180,130,50,.18), 0 10px 30px rgba(0,0,0,.7);
}
/* 头部：角色名 + 等级 + 职业/种族/阵营徽章 */
#attr-modal .map-modal-head { padding: 9px 12px; background: linear-gradient(180deg, #1e180f, #151009); border-bottom: 1px solid #4a3a1c; }
#attr-modal .map-modal-title { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 13px; }
#attr-name { font-size: 17px; color: #ffe9b0; font-weight: bold; letter-spacing: 1px; }
#attr-level { font-size: 12px; color: #e8c87a; background: rgba(122,90,34,.35); border: 1px solid #6b5220; border-radius: 8px; padding: 0 7px; font-weight: bold; }
/* 职业徽章：与种族徽章（金）区分，用青蓝色 */
.class-badge { font-size: 11px; padding: 1px 7px; border-radius: 8px; font-weight: bold; background: rgba(35,105,120,.28); color: #8fe0e8; border: 1px solid #3a8a96; }

/* 经验条行：紧贴头部下方，一条细长进度条 + 经验文字 */

/* 主体：纵向滚动 */
.attr-modal-body { flex: 1; overflow-y: auto; padding: 9px 10px; }
/* 双栏容器：auto-fit + 最小列宽 —— 容器不够宽时自动塌成单栏（不靠媒体查询，跟随实际宽度） */
.attr-sheet { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; align-items: start; }
.attr-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

/* 卡片：每组属性一个卡片，标题带左侧金色竖条 */
.attr-card { background: linear-gradient(180deg, #1d1710, #171208); border: 1px solid #3a2e1a; border-radius: 6px; box-shadow: inset 0 1px 0 rgba(255,220,150,.05), 0 2px 6px rgba(0,0,0,.35); overflow: hidden; }
.attr-card-title { position: relative; padding: 5px 9px 4px 14px; font-size: 12px; color: #d8b45a; font-weight: bold; letter-spacing: 1px; background: linear-gradient(90deg, rgba(106,80,30,.35), rgba(0,0,0,0)); border-bottom: 1px solid #33280f; }
.attr-card-title::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: linear-gradient(180deg, #e8c87a, #8a6a2c); }
.attr-card-body { padding: 5px 9px 7px; }

/* 属性行：左标签右数值 */
.attr-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 3px 0; border-bottom: 1px dashed rgba(58,45,26,.6); font-size: 12.5px; }
.attr-card-body .attr-row:last-child { border-bottom: none; }
.attr-label { color: #a89570; }
.attr-value { color: #ffe9b0; font-weight: bold; text-align: right; }
/* 说明型数值（desc）：规则说明而非属性值，用暗色常规字重，别抢主体数值的视觉 */
.attr-value-desc { color: #a89570; font-weight: normal; }
.attr-value-danger { color: #ff5555; font-weight: bold; }   /* v6.147.0 罪恶值≥10/通缉/坐牢 */
/* v3.170.0 核心属性行内的 [+] 分配按钮：小方钮，紧贴数值，别把整行撑高 */
.attr-alloc-btn {
  margin-left: 6px;
  width: 18px;
  height: 18px;
  padding: 0;
  line-height: 1;
  font-size: 12px;
  font-weight: bold;
  color: #7ddf6b;
  background: #1a2a14;
  border: 1px solid #3d6b34;
  border-radius: 3px;
  cursor: pointer;
  vertical-align: middle;
}
.attr-alloc-btn:hover { background: #2a3a24; color: #9fef8b; }
/* v6.7.50 荣誉称号聊天前缀开关（荣誉卡底部）：金色小方钮，与荣誉金货同一色系 */
.honor-title-toggle-btn { color: #e8c87a; background: #2a2210; border-color: #6a5030; }
.honor-title-toggle-btn:hover { background: #3a2e1a; color: #ffe9b0; }
/* v3.173.0 核心属性后的括号「（200）」= 本属性投入的自由属性点（洗点可退）。
   用绿色小字跟主数值（金色）拉开层级：一眼看出 300 是总数、200 是其中的自由部分 */
.attr-free-num {
  color: #7ddf6b;
  font-size: 12px;
  font-weight: normal;
  margin-left: 2px;
  cursor: help;
}
/* 带比例条的行：三栏（标签 / 条 / 数值） */
.attr-row-bar { display: grid; grid-template-columns: 4.4em 1fr 4.8em; align-items: center; gap: 6px; }
.attr-bar { height: 6px; background: #241c10; border: 1px solid #3a2e1a; border-radius: 3px; overflow: hidden; }
.attr-bar-fill { display: block; height: 100%; background: linear-gradient(90deg, #7a5c28, #e8c87a); transition: width .3s; }

/* 进度行（生命 / 法力 / 怒气）：上排文字、下排整条进度条 */
.attr-gauge { padding: 3px 0 6px; border-bottom: 1px dashed rgba(58,45,26,.6); }
.attr-card-body .attr-gauge:last-child { border-bottom: none; }
.attr-gauge-top { display: flex; align-items: baseline; justify-content: space-between; font-size: 12.5px; margin-bottom: 3px; }
.attr-gauge-num { color: #ffe9b0; font-weight: bold; }
/* ★ v3.174.0（Boss）：数值与进度条按资源类型上色，与主界面状态栏同一套配色：
     生命=绿（所有职业统一）、怒气=红（战士/熊形态）、能量=黄（盗贼/豹形态）、法力数字沿用金色 */
.attr-gauge-num.hp { color: #5fd46a; }
.attr-gauge-num.rage { color: #ff7a5c; }
.attr-gauge-num.energy { color: #f5d54f; }
.attr-gauge-track { display: block; height: 9px; background: #241c10; border: 1px solid #3a2e1a; border-radius: 3px; overflow: hidden; }
.attr-gauge-fill { display: block; height: 100%; transition: width .3s; }
/* 生命条：绿色，与主界面 .stat-bar.hp .fill 完全同色（Boss：所有职业的生命值用绿色显示） */
.attr-gauge-fill.hp { background: linear-gradient(90deg, #1e5a2a, #34c04a); }
/* 资源条默认=法力蓝；下面两种按职业/形态覆盖 */
.attr-gauge-fill.res { background: linear-gradient(90deg, #1c3a8a, #2b6bd2); }
.attr-gauge-fill.res.rage { background: linear-gradient(90deg, #8a1c1c, #d23b2b); }   /* 怒气=红（主界面 .stat-bar.mp.rage 同色） */
.attr-gauge-fill.res.energy { background: linear-gradient(90deg, #8a6a1c, #d3a32b); } /* 能量=黄（主界面 .stat-bar.mp.energy 同色） */

/* 空组占位 */
.attr-empty { font-size: 12px; color: #6a5a3a; padding: 4px 0; }

/* 组标题（种族天赋 / 自由属性点区沿用旧类名）：改成卡片样式，与上面统一 */
.attr-group-title { color: #d8b45a; font-size: 12px; font-weight: bold; letter-spacing: 1px; margin: 9px 0 4px; border-bottom: 1px solid #33280f; padding: 0 0 4px 12px; position: relative; }
.attr-group-title::before { content: ""; position: absolute; left: 3px; top: 1px; bottom: 5px; width: 3px; border-radius: 2px; background: linear-gradient(180deg, #e8c87a, #8a6a2c); }
.attr-group { margin-top: 8px; padding: 7px 9px; background: linear-gradient(180deg, #1d1710, #171208); border: 1px solid #3a2e1a; border-radius: 6px; }
.attr-group .attr-group-title { margin-top: 0; }


/* 属性弹窗底部按钮区 */
.attr-footer {
  padding: 10px;
  border-top: 1px solid #2a2114;
  text-align: center;
}

/* 巅峰等级按钮 */
.peak-btn {
  background: linear-gradient(135deg, #4a3a1c, #2a1f10);
  color: #e8c87a;
  border: 2px solid #c9a24a;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
}
.peak-btn:hover {
  background: linear-gradient(135deg, #5a4a2c, #3a2f20);
  color: #ffe9b0;
}
.peak-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* v5.0.28 删除：属性面板「洗点」按钮样式（.wash-attr-btn）。
   该按钮已从属性面板移除，洗点统一进「巅峰等级」界面顶部，见下方 .peak-wash-top。 */

/* v5.0.28 巅峰面板顶部的洗点区（Boss 指令：从属性面板挪进来，放最上面防误触）
   下边框把它和下面的巅峰点数分配区分开，视觉上像一个独立的小操作条 */
.peak-wash-top {
  text-align: center;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #2a2114;
}

/* v5.0.28 60 级以下玩家从属性面板进来的「巅峰等级」旁小字提示 */
.peak-locked {
  font-size: 11px;
  color: #8a7a5a;
  margin-left: 6px;
}

/* v3.172.0 巅峰面板洗点按钮上方的「已投入 X 点」说明 */
.peak-wash-hint {
  color: #9a8a6a;
  font-size: 12px;
  margin-bottom: 8px;
  text-align: center;
}

/* 巅峰等级弹窗 */
.peak-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 70;
}
.peak-modal.hidden {
  display: none;
}
.peak-modal-box {
  background: #1a140c;
  border: 2px solid #5a3d18;
  border-radius: 8px;
  width: min(calc(100vw - 12px), calc((100vh - 12px) * 9 / 16));
  height: min(calc(100vh - 12px), calc((100vw - 12px) * 16 / 9));
  max-width: none;
  max-height: none;
  position: relative;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.peak-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #2a2114;
  background: #14110c;
}
.peak-modal-title {
  color: #e8c87a;
  font-size: 16px;
  font-weight: bold;
}
.peak-close-btn {
  width: 28px;
  height: 28px;
  font-size: 16px;
  line-height: 1;
  color: #c9a24a;
  background: #2a1f10;
  border: 1px solid #4a3a1c;
  border-radius: 4px;
  cursor: pointer;
}
.peak-modal-body {
  padding: 16px;
  flex: 1;
}
.peak-info {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 12px;
  background: #241c10;
  border-radius: 6px;
  border: 1px solid #3a2a14;
}
.peak-level-display, .peak-points-display {
  flex: 1;
  text-align: center;
}
.peak-label {
  display: block;
  color: #8a6a2c;
  font-size: 12px;
  margin-bottom: 4px;
}
.peak-value {
  display: block;
  color: #ffe9b0;
  font-size: 24px;
  font-weight: bold;
}
.peak-value.available {
  color: #7ddf6b;
}
.peak-attrs-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.peak-attr-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #241c10;
  border-radius: 6px;
  border: 1px solid #3a2a14;
}
.peak-attr-name {
  color: #b8a888;
  font-size: 14px;
}
/* v2.89.0 巅峰弹窗"每点效果"说明：属性名+说明竖排，数值/按钮仍靠右 */
.peak-attr-info {
  display: flex;
  flex-direction: column;
}
.peak-attr-desc {
  color: #8a7a5a;
  font-size: 11px;
  line-height: 1.3;
  margin-top: 2px;
}
.peak-attr-val {
  color: #ffe9b0;
  font-size: 16px;
  font-weight: bold;
  min-width: 30px;
  text-align: center;
}
.peak-attr-btn {
  width: 32px;
  height: 32px;
  font-size: 18px;
  font-weight: bold;
  color: #7ddf6b;
  background: #1a2a14;
  border: 1px solid #3a5a2c;
  border-radius: 6px;
  cursor: pointer;
}
.peak-attr-btn:hover:not(:disabled) {
  background: #2a3a24;
  color: #9fef8b;
}
.peak-attr-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
/* v5.0.28 删除：.peak-actions（巅峰弹窗底部洗点条的容器），洗点条已移到弹窗顶部 */
.peak-wash-btn {
  background: linear-gradient(135deg, #4a1c1c, #2a1010);
  color: #ff8866;
  border: 1px solid #6b2c2c;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.peak-wash-btn:hover {
  background: linear-gradient(135deg, #5a2c2c, #3a2020);
  color: #ffaaaa;
}

/* ---- 商店弹窗（2026-09-02 商城模块，复用属性弹窗的 attr-modal-body 容器） ---- */
/* 一个商品一行：左信息 + 右（价格/购买按钮），两端对齐 */
.shop-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px dashed #241c10; }
/* v1.09.5⑩：商品去 emoji 图标（.shop-icon 死样式已删，商品只显文字） */
.shop-info { flex: 1; min-width: 0; }        /* 信息区：占满中间，超长省略 */
.shop-name { color: #ffe9b0; font-size: 14px; font-weight: bold; }  /* 商品名：亮金色 */
.shop-desc { color: #8a7a5c; font-size: 11px; margin-top: 2px; line-height: 1.4; }  /* 描述：灰金色小字 */
.shop-act { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }  /* 操作区：价格+按钮纵向 */
.shop-price { color: #e8c87a; font-size: 12px; }  /* 价格：金色 */
.shop-buy-btn { background: linear-gradient(180deg, #6a5020, #3a2c10); color: #ffe9b0; border: 1px solid #8a6a2c; border-radius: 3px; font-size: 12px; padding: 3px 14px; cursor: pointer; }  /* 购买按钮：暗金渐变 */
.shop-buy-btn:hover:not(:disabled) { background: linear-gradient(180deg, #7a5c28, #4a3818); }
.shop-buy-btn:active:not(:disabled) { background: #3a2c10; }
.shop-buy-btn:disabled { opacity: .4; cursor: not-allowed; }  /* 金币不够：变暗不可点 */
/* 属性弹窗关闭按钮：样式与地图弹窗关闭按钮一致 */

/* ---- 技能弹窗（2026-09-02 战士技能系统） ---- */
#skill-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; }
#skill-modal.hidden { display: none; }
/* 通用隐藏类：适用于所有子元素（如圣印/光环状态栏）*/
.hidden { display: none !important; }
/* v2.94.2 战士姿态切换条：「通用技能」标题右侧三个按钮，仅战士显示。
   质感对齐 modal-head 内「自动出售/自动用药」按钮（深棕底+金边），当前姿态 .active 常亮金框。 */
.warrior-stance-bar { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; }
.stance-btn { min-width: 44px; padding: 4px 9px; font-size: 12px; color: #c9b48a; background: #2a1f10; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; line-height: 1.3; transition: all .12s; }
.stance-btn:hover { color: #e8c87a; background: #3a2a14; }
.stance-btn:active { transform: scale(.96); }
/* 当前姿态常亮：金框+亮底+微光，和游戏里其他选中态一致 */
.stance-btn.active { color: #ffe9b0; background: #4a3410; border-color: #c9a24a; box-shadow: 0 0 6px rgba(201,162,74,.55); }
/* 技能列表行 */
/* v2.91.2：允许技能行换行（精通块要落到第二行），并让第一行顶部对齐 */
.skill-row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px; padding: 8px 4px; border-bottom: 1px dashed #241c10; }
/* 等级不足的技能：灰色显示，禁用样式 */
.skill-row.skill-locked { opacity: 0.4; cursor: not-allowed; }
.skill-row.skill-locked .skill-name { color: #6a5a3a; }
/* flex:1 让名称/描述占满剩余宽度，把 meta 与 toggle 顶到同一行右侧 */
.skill-info { flex: 1 1 100%; flex-basis: 100%; min-width: 0; display: block; }
.skill-name { color: #ffe9b0; font-size: 13px; font-weight: bold; display: block; width: 100%; }
.skill-desc { color: #8a7a5c; font-size: 11px; margin-top: 3px; line-height: 1.4; display: block; width: 100%; overflow-wrap: anywhere; white-space: normal; }
.skill-meta { display: flex; gap: 10px; flex-shrink: 0; font-size: 11px; padding-top: 1px; }
.skill-cd { color: #d2703b; }
.skill-mp { color: #4a9ad2; }
/* 自动释放开关 */
.skill-toggle { display: flex; align-items: center; gap: 4px; flex-shrink: 0; cursor: pointer; padding-top: 1px; }
.skill-toggle input[type="checkbox"] { width: 14px; height: 14px; cursor: pointer; accent-color: #8a6a2c; }
.toggle-text { font-size: 10px; color: #c9a24a; white-space: nowrap; }
/* v4.10.5 花钱学技能：未学技能行的「学习」按钮（手机可点，常驻不靠悬停） */
.skill-learn-btn { flex-shrink: 0; padding: 4px 10px; font-size: 12px; color: #ffe23b; background: rgba(138,106,44,0.25); border: 1px solid #8a6a2c; border-radius: 4px; cursor: pointer; }
.skill-learn-btn:active { background: rgba(138,106,44,0.5); }
/* 技能分隔线：天赋技能上方显示 */
.skill-divider { color: #e8c87a; font-size: 12px; font-weight: bold; padding: 8px 4px; border-bottom: 1px solid #5a3d18; margin-top: 4px; text-align: center; letter-spacing: 1px; }
/* 技能弹窗底部设置区
   v1.20.6：flex-wrap 改 nowrap —— 主动攻击中立怪 与 自动释放治疗 必须同一排，只占一行高度；
   说明文字已删（Boss：选项本身已够清楚），标签略缩到 11px 保证手机窄屏（360px 宽 ≈ 内宽 303px）放得下。 */
.skill-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-top: 1px dashed #241c10;
  background: #1a140c;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
}
.skill-footer-label {
  font-size: 11px;
  color: #e8c87a;
  font-weight: bold;
  /* 极窄屏兜底：宁可让文字吃省略号，也不让后面的输入框/百分号被裁掉 */
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.skill-footer-hint {
  font-size: 10px;
  color: #8a6a2c;
  margin-left: auto;
}
/* v0.91.0 自动治疗界限输入框（行内紧跟 footer 标签） */
#heal-threshold-input {
  width: 40px;
  padding: 2px 3px;
  font-size: 11px;
  color: #e8c87a;
  background: #0e0c08;
  border: 1px solid #3a2a14;
  border-radius: 3px;
  text-align: center;
}
#heal-threshold-input:focus { border-color: #6b4a1c; outline: none; }

/* ============ 商店弹窗（2026-09-02 商城模块）============ */
#shop-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 50; }
#shop-modal.hidden { display: none; }

/* ============ v1.09.5③ 任务弹窗 + NPC交易弹窗补浮层定位（此前漏了 position:fixed，弹窗落在文档流里浮不起来，点了"没反应"）============ */
#quest-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 50; }
#quest-modal.hidden { display: none; }
#npc-trade-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; }
#npc-trade-modal.hidden { display: none; }
/* v1.13.0：NPC 银行弹窗（复用交易弹窗 z-60 遮罩 + map-modal 盒） */
#npc-bank-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; }
#npc-bank-modal.hidden { display: none; }
#npc-bank-close-btn { width: 28px; height: 28px; font-size: 16px; line-height: 1; color: #c9a24a; background: #2a1f10; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; }
#npc-bank-close-btn:active { background: #3a2a14; color: #ffe9b0; }
/* v3.88.0 附魔弹窗关闭按钮（与其它弹窗关闭按钮同一套样式） */
#enchant-close-btn { width: 28px; height: 28px; font-size: 16px; line-height: 1; color: #c9a24a; background: #2a1f10; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; }
#enchant-close-btn:active { background: #3a2a14; color: #ffe9b0; }
#enchant-close-btn:hover { border-color: #c9a24a; color: #ffe9b0; }
/* v6.79.0 学习附魔窗口关闭按钮（与货架窗同款视觉） */
#enchant-learn-close-btn { width: 28px; height: 28px; font-size: 16px; line-height: 1; color: #c9a24a; background: #2a1f10; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; }
#enchant-learn-close-btn:active { background: #3a2a14; color: #ffe9b0; }
#enchant-learn-close-btn:hover { border-color: #c9a24a; color: #ffe9b0; }
/* v3.88.0 附魔弹窗遮罩（复用银行弹窗 z-60 层级 + map-modal 盒） */
#enchant-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; }
#enchant-modal.hidden { display: none; }
/* v6.79.0 学习附魔弹窗容器（同货架窗 z-60） */
#enchant-learn-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; }
#enchant-learn-modal.hidden { display: none; }
/* v6.80.0（Boss m01524）学习炼金弹窗：容器+关闭按钮三态，同附魔学习窗范式（v6.20.0 守卫要求） */
#alch-learn-close-btn { width: 28px; height: 28px; font-size: 16px; line-height: 1; color: #c9a24a; background: #2a1f10; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; }
#alch-learn-close-btn:active { background: #3a2a14; color: #ffe9b0; }
#alch-learn-close-btn:hover { border-color: #c9a24a; color: #ffe9b0; }
#alch-learn-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; }
#alch-learn-modal.hidden { display: none; }
/* v5.1.53 拍卖行弹窗遮罩（此前从 v3.90.0 建立起就没有这条，弹窗 remove hidden 后
   按普通块级元素排进文档流底部，视口里完全看不见——Boss 三次报障「点了没反应」的
   真因；请求实际都发出去了。这是本项目第三次踩同一坑，照 #npc-bank-modal 范式补齐） */
#npc-auction-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; }
#npc-auction-modal.hidden { display: none; }

/* v5.1.64 社交弹窗容器：fixed 遮罩 + flex 居中（v5.1.53 拍卖同款坑——容器无定位会落文档流底部视口外） */
#friend-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; }
#friend-modal.hidden { display: none; }
/* 银行/背包两区格网（复用 .bag-cell，5列与背包一致） */
#npc-bank-grid, #npc-bank-bag-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
/* 商店商品列表行 */
.shop-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-bottom: 1px dashed #241c10; }
.shop-row:last-child { border-bottom: none; }
/* v1.09.5⑩：商品去 emoji，.shop-icon 死样式已删 */
/* 左：名称 + 描述 */
.shop-info { flex: 1; min-width: 0; }
.shop-name { color: #ffe9b0; font-size: 13px; font-weight: bold; }
.shop-desc { color: #8a7a5c; font-size: 11px; margin-top: 2px; line-height: 1.4; }
/* 右：价格 + 购买按钮 */
.shop-act { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.shop-price { color: #e8c87a; font-size: 12px; }
.shop-buy-btn { padding: 4px 12px; font-size: 11px; font-family: inherit; background: #2a2a2a; color: #c9a24a; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; }
.shop-buy-btn:hover:not(:disabled) { background: #3a2a14; color: #ffe9b0; }
.shop-buy-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============ 天赋面板（2026-09-03 新增）============ */
#talent-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; }
#talent-modal.hidden { display: none; }
#talent-detail-modal { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; z-index: 70; }
#talent-detail-modal.hidden { display: none; }
/* 天赋点数显示区 */
.talent-points-display { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #c9a24a; }
/* 天赋操作按钮：确认加点、重置天赋（v0.77.2 重做：WoW 金属浮雕风——暗金底+金边+斜面高光，与游戏整体质感一致） */
.talent-action-buttons { display: flex; gap: 6px; flex: 0 0 auto; }
/* Boss 定案：标题栏固定一行不换行（禁自适应；关闭键已固定到弹窗右下角） */
.talent-points-display { flex: 1 1 auto; min-width: 0; }
.talent-action-buttons { gap: 5px; }
/* v3.24.2（Boss：「确认加点/重置天赋按钮 UI 缩小，确认加点给透绿色」）
   手机竖屏优先：两个按钮并排在标题栏右侧，字号/内边距都收窄一档，
   不再在窄屏上占掉整行高度。 */
.talent-action-btn {
  padding: 3px 9px; font-size: 10px; font-weight: bold; font-family: inherit;
  letter-spacing: 0.5px; line-height: 1.2;
  color: #ffd97a;
  background: linear-gradient(180deg, #6a5426 0%, #4a3a18 45%, #382a10 100%);
  border: 1px solid #7a642c;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255,233,176,.35), inset 0 -1px 0 rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.6);
  text-shadow: 0 1px 1px rgba(0,0,0,.8);
  cursor: pointer; transition: all 0.15s;
  flex: 0 0 auto;          /* 窄屏不被挤变形 */
  white-space: nowrap;
}
.talent-action-btn:hover {
  color: #fff0c8;
  background: linear-gradient(180deg, #7d6630 0%, #5a4820 45%, #443414 100%);
  border-color: #c9a24a;
  box-shadow: inset 0 1px 0 rgba(255,233,176,.5), 0 0 6px rgba(201,162,74,.45);
}
.talent-action-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.6);
}
/* 确认加点：透绿色主操作（Boss 定案：「确认加点给它透绿色」，与重置的红形成明确区分） */
.talent-action-btn.confirm-btn {
  color: #c8ffd0;
  background: linear-gradient(180deg, rgba(38,92,48,.85) 0%, rgba(26,68,36,.88) 45%, rgba(18,48,26,.92) 100%);
  border-color: #3f8f52;
}
.talent-action-btn.confirm-btn:hover {
  color: #e8ffe8;
  background: linear-gradient(180deg, rgba(48,118,60,.88) 0%, rgba(34,84,44,.9) 45%, rgba(22,58,32,.94) 100%);
  border-color: #5fc272;
  box-shadow: inset 0 1px 0 rgba(210,255,215,.45), 0 0 8px rgba(95,194,114,.45);
}
/* 重置天赋：半透红破坏性操作（点错了能一眼看出来，Boss 确认保留红色） */
.talent-action-btn.reset-btn {
  color: #ffc4b4;
  background: linear-gradient(180deg, rgba(112,40,32,.82) 0%, rgba(84,28,22,.86) 45%, rgba(58,18,14,.9) 100%);
  border-color: #a05040;
}
.talent-action-btn.reset-btn:hover {
  color: #ffdcd0;
  background: linear-gradient(180deg, rgba(138,52,40,.86) 0%, rgba(104,36,28,.88) 45%, rgba(72,24,18,.92) 100%);
  border-color: #cc6a52;
  box-shadow: inset 0 1px 0 rgba(255,200,160,.3), 0 0 6px rgba(204,106,82,.4);
}
.talent-action-btn.reset-btn:active {
  box-shadow: inset 0 2px 4px rgba(0,0,0,.65);
}
/* v3.935.0 双天赋专精切换条（天赋页签上方一行两个按钮，当前生效的高亮） */
.talent-spec-bar { display: flex; gap: 8px; padding: 8px 12px 0 12px; }
/* v3.951.0 三套装备套装切换条（背包页「已装备」区上方，样式同天赋专精条） */
.equip-set-bar { display: flex; gap: 6px; padding: 4px 0 6px 0; }
.equip-set-btn {
  flex: 1; padding: 4px 6px; font-size: 11px; font-family: inherit; line-height: 1.3;
  color: #9c8352; background: #211a10; border: 1px solid #4a3a1c; border-radius: 4px;
  cursor: pointer; transition: all 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.equip-set-btn:hover { background: #2e2413; color: #e8d3a0; border-color: #6a5426; }
/* v6.7.34 装备槽折叠开关：窄按钮，不与三个套装按钮均分宽度 */
.equip-fold-btn { flex: 0 0 auto; min-width: 42px; }
.equip-set-btn.active {
  color: #ffe9b0; background: linear-gradient(180deg, #4a3a18 0%, #2e2410 100%);
  border-color: #e8c87a; box-shadow: 0 0 5px rgba(232,200,122,.4);
  font-weight: bold;
}
.talent-spec-btn {
  flex: 1; padding: 5px 6px; font-size: 11px; font-family: inherit; line-height: 1.3;
  color: #9c8352; background: #211a10; border: 1px solid #4a3a1c; border-radius: 4px;
  cursor: pointer; transition: all 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.talent-spec-btn:hover { background: #2e2413; color: #e8d3a0; border-color: #6a5426; }
.talent-spec-btn.active {
  color: #ffe9b0; background: linear-gradient(180deg, #4a3a18 0%, #2e2410 100%);
  border-color: #e8c87a; box-shadow: 0 0 5px rgba(232,200,122,.4);
  font-weight: bold;
}
/* 天赋树切换按钮 */
.talent-tree-tabs { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid #4a3a1c; background: #1a140c; }
.talent-tree-tab { flex: 1; padding: 6px 8px; font-size: 12px; font-family: inherit; background: #2a2a2a; color: #c9a24a; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; transition: all 0.2s; }
.talent-tree-tab:hover { background: #3a2a14; color: #ffe9b0; }
.talent-tree-tab.active { background: #3a2a10; color: #ffe9b0; border-color: #e8c87a; box-shadow: 0 0 4px rgba(232,200,122,0.4); }
/* 天赋列表容器 */
#talent-list { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
/* 单个天赋节点 */
.talent-node { display: flex; align-items: center; gap: 10px; padding: 10px; background: #1a140c; border: 1px solid #3a2e1a; border-radius: 6px; transition: all 0.2s; }
.talent-node:hover { border-color: #6b4a1c; background: #241c10; }
.talent-node.learned { border-color: #8a6a2c; background: #2a2a14; }
.talent-node.locked { opacity: 0.5; cursor: not-allowed; }
.talent-node.skill-type { border-color: #4a3a6c; }
.talent-node.skill-type.learned { border-color: #8a6ac9; }
/* 天赋图标（emoji 或标记） */
.talent-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: #2a2a2a; border: 1px solid #4a3a1c; border-radius: 4px; flex-shrink: 0; }
.talent-node.learned .talent-icon { background: #3a2a10; border-color: #8a6a2c; }
.talent-node.skill-type .talent-icon { background: #2a1a3a; border-color: #6a4a8c; }
/* 天赋信息 */
.talent-info { flex: 1; min-width: 0; }
.talent-name { color: #ffe9b0; font-size: 13px; font-weight: bold; }
.talent-node.learned .talent-name { color: #c9a24a; }
.talent-desc { color: #8a7a5c; font-size: 11px; margin-top: 2px; line-height: 1.3; }
.talent-node.locked .talent-desc { color: #5a4a2a; }
/* 天赋等级要求 */
.talent-level-req { font-size: 10px; color: #6a5a3a; margin-top: 2px; }
.talent-level-req.met { color: #8a6a2c; }
/* 学习按钮 */
.talent-actions { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.talent-btn { padding: 4px 10px; font-size: 11px; font-family: inherit; background: linear-gradient(180deg, #6a5020, #3a2c10); color: #ffe9b0; border: 1px solid #8a6a2c; border-radius: 3px; cursor: pointer; transition: all 0.2s; }
.talent-btn:hover:not(:disabled) { background: linear-gradient(180deg, #7a5c28, #4a3818); }
.talent-btn:active:not(:disabled) { background: #3a2c10; }
.talent-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.talent-btn.learn-btn { background: linear-gradient(180deg, #4a2060, #2a1040); border-color: #6a4a8c; }
.talent-btn.learn-btn:hover:not(:disabled) { background: linear-gradient(180deg, #5a2870, #3a1850); }
.talent-btn.take-back-btn { background: linear-gradient(180deg, #604020, #402810); border-color: #8a6a4c; font-size: 10px; padding: 2px 6px; }
.talent-badge { font-size: 10px; color: #8a6a2c; padding: 2px 6px; background: #2a2a14; border: 1px solid #4a3a1c; border-radius: 2px; }
.talent-badge.maxed-badge { color: #ffd700; border-color: #8a6a2c; }

/* 层叠式天赋树样式（2026-09-03 WoW天赋树风格）*/
/* .talent-tree-box 尺寸已并入统一 9:16 固定框 */
.talent-tree-container { max-height: 60vh; overflow-y: auto; padding: 8px; }

/* 层连接竖线 */
.talent-layer-connector { width: 2px; height: 16px; background: linear-gradient(180deg, #4a3a1c, #8a6a2c, #4a3a1c); margin: 0 auto; }

/* 层标题 */
.talent-layer-header { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: #1a140c; border: 1px solid #3a2e1a; border-radius: 4px; margin-top: 4px; font-size: 11px; }
.talent-layer-header.locked { opacity: 0.5; }
.layer-num { color: #ffe9b0; font-weight: bold; }
.layer-req { color: #8a7a5c; }

/* 未解锁提示 */
.talent-layer-locked-msg { font-size: 11px; color: #6a5a3a; text-align: center; padding: 8px; font-style: italic; }

/* 天赋行（横向排列） */
.talent-row { display: flex; justify-content: center; gap: 12px; padding: 8px 4px; }
.talent-row-locked { padding: 12px 4px; }
.talent-row-locked .talent-box { width: 160px; }

/* 天赋方框 */
.talent-box { width: 100px; padding: 8px 6px; background: #1a140c; border: 2px solid #3a2e1a; border-radius: 6px; cursor: pointer; transition: all 0.2s; position: relative; text-align: center; }
.talent-box:hover:not(.locked) { border-color: #8a6a2c; background: #241c10; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(138, 106, 44, 0.3); }
.talent-box.available { border-color: #6b4a1c; }  /* 可用但未投入 */
.talent-box.maxed { border-color: #ffd700; background: #2a2a14; box-shadow: 0 0 8px rgba(255, 215, 0, 0.4); }
.talent-box.locked { opacity: 0.4; cursor: not-allowed; }
.talent-box.skill-type { border-color: #6a4a8c; }

/* 锁定提示文字 */
.talent-box-lock { color: #6a5a3a; font-size: 9px; margin-top: 2px; }

/* 预览样式（与已确认的不同） */
.talent-box.preview { border-color: #4a8acc; box-shadow: 0 0 6px rgba(74, 138, 204, 0.4); }

/* 方框名称 */
.talent-box-name { color: #ffe9b0; font-size: 11px; font-weight: bold; line-height: 1.2; margin-bottom: 4px; }
.talent-box.maxed .talent-box-name { color: #ffd700; }

/* 方框点数标记（右上角） */
.talent-box-points { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; background: #c9a24a; border: 2px solid #1a140c; border-radius: 50%; font-size: 10px; font-weight: bold; color: #1a140c; display: flex; align-items: center; justify-content: center; }
.talent-box.maxed .talent-box-points { background: #ffd700; }

/* 技能标记 */
.talent-box-skill { font-size: 12px; margin-top: 2px; }

/* 详情弹窗样式 */
.detail-content { padding: 12px; }
.detail-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 12px; border-bottom: 1px solid #2a2114; }
.detail-label { color: #8a7a5c; }
.detail-value { color: #ffe9b0; }
.detail-value.met { color: #8a6a2c; }
.detail-desc { color: #c9a24a; font-size: 12px; margin: 10px 0; padding: 8px; background: #1a140c; border-radius: 4px; line-height: 1.4; }
.detail-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }

/* 详情弹窗加减按钮行 */
.detail-row-btns { display: flex; justify-content: center; gap: 12px; padding: 8px 0; border-bottom: none; }
.detail-btn { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #8a6a2c; background: #1a140c; color: #ffe9b0; font-size: 18px; font-weight: bold; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.detail-btn:not(:disabled):hover { background: #2a2a14; border-color: #ffd700; transform: scale(1.1); }
.detail-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.detail-btn-minus { border-color: #c9a24a; }
.detail-btn-plus { border-color: #6b4a1c; }

/* 天赋方框点数进度显示 */
.talent-box-progress { font-size: 10px; color: #8a6a2c; margin-top: 2px; }
.talent-box-progress.locked { font-size: 14px; }

.talent-badge { font-size: 10px; color: #8a6a2c; padding: 4px 8px; background: #2a2a14; border: 1px solid #4a3a1c; border-radius: 3px; }
.talent-badge.maxed-badge { color: #ffd700; border-color: #8a6a2c; }

/* 空状态占位符 */
.talent-empty-msg { padding: 40px 20px; text-align: center; }
.talent-tree-placeholder { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.placeholder-icon { font-size: 48px; opacity: 0.3; }
.placeholder-text { color: #8a7a5c; font-size: 14px; }
.placeholder-hint { color: #6a5a3a; font-size: 12px; font-style: italic; }

/* ============ 购买数量选择弹窗（2026-09-06 新增）============ */
.buy-dialog-mask { position: fixed; inset: 0; background: rgba(0,0,0,.8); display: flex; align-items: center; justify-content: center; z-index: 100; }
.buy-dialog-box { background: #1a140c; border: 2px solid #8a6a2c; border-radius: 8px; max-width: 280px; width: 90%; box-shadow: 0 0 20px rgba(138, 106, 44, 0.5); }
.buy-dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid #3a2e1a; }
.buy-dialog-title { color: #ffe9b0; font-size: 13px; font-weight: bold; }
.buy-dialog-close { width: 22px; height: 22px; font-size: 12px; color: #c9a24a; background: #2a1f10; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; }
.buy-dialog-close:hover { background: #3a2a14; color: #ffe9b0; }
.buy-dialog-body { padding: 12px 14px; }
.buy-dialog-info { display: flex; gap: 10px; margin-bottom: 10px; font-size: 11px; }
/* v2.89.3 Boss 定案：售价颜色要亮黄（黄色）不是金色——#ffe9b0 偏琥珀金，改 #ffff00 纯正亮黄 */
.buy-dialog-price { color: #ffff00; }
.buy-dialog-max { color: #8a7a5c; }
/* v2.89.2 购买弹窗物品介绍行（good.desc，无描述则不渲染） */
/* 2026-10-23 Boss 指令：商店详情页介绍文字改纯白，更明显（原 #9a8a6a 暗黄偏灰看不清） */
/* 2026-10-23 Boss 追加：字号再大一号 10px → 11px（白色 + 稍大，一眼看清） */
.buy-dialog-desc { padding: 8px 14px 0; font-size: 11px; color: #ffffff; line-height: 1.4; }
/* 当前数量显示（大字） */
.buy-dialog-display { text-align: center; padding: 8px 0; border: 1px solid #4a3a1c; border-radius: 4px; margin-bottom: 10px; background: #0d0a06; }
.buy-dialog-count { color: #ffe9b0; font-size: 28px; font-weight: bold; font-family: monospace; }
.buy-dialog-total { display: flex; justify-content: space-between; padding: 6px 0; font-size: 12px; color: #ffe9b0; border-top: 1px dashed #3a2e1a; margin-top: 6px; }
/* v2.89.3 合计行也改亮黄 #ffff00（原 v2.89.2 用的 #ffe9b0 偏金） */
.buy-total-amount { font-weight: bold; color: #ffff00; }
/* 十二宫格键盘：3×3数字 + 底部3键 */
.buy-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.buy-key { padding: 10px 0; font-size: 16px; font-family: inherit; font-weight: bold; background: linear-gradient(180deg, #3a3020, #2a2010); color: #ffe9b0; border: 1px solid #6a5020; border-radius: 4px; cursor: pointer; transition: all 0.15s; }
.buy-key:hover:not(:disabled) { background: linear-gradient(180deg, #4a3c28, #3a2c18); border-color: #8a6a2c; color: #fff; }
.buy-key:active:not(:disabled) { background: #2a2010; transform: scale(0.96); }
.buy-key:disabled { opacity: 0.35; cursor: not-allowed; }
.buy-key-back { color: #d2703b; }
.buy-key-max { color: #7ddf6b; font-size: 13px; }
.buy-dialog-footer { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid #3a2e1a; }
.buy-dialog-cancel { flex: 1; padding: 6px; font-size: 12px; font-family: inherit; background: #2a2a2a; color: #c9a24a; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; }
.buy-dialog-cancel:hover { background: #3a2a14; color: #ffe9b0; }
.buy-dialog-confirm { flex: 1; padding: 6px; font-size: 12px; font-family: inherit; background: linear-gradient(180deg, #6a5020, #3a2c10); color: #ffe9b0; border: 1px solid #8a6a2c; border-radius: 4px; cursor: pointer; }
.buy-dialog-confirm:hover:not(:disabled) { background: linear-gradient(180deg, #7a5c28, #4a3818); }
.buy-dialog-confirm:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============ 装备面板样式（2026-09-05 优化）============ */
#equip-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; }
#equip-modal.hidden { display: none; }
/* .equip-modal-box 尺寸已并入统一 9:16 固定框 */ /* v1.02.1 定稿：格子恢复 48px 原尺寸（720 加宽回退） */
.equip-modal-body { display: flex; flex-direction: column; gap: 8px; padding: 12px; max-height: 90vh; }

/* 已装备区域：网格显示，大小与背包一致 */
.equip-equipped-section { }
/* v2.85.0 背包/装备合并：选择器从 `#equip-equipped-list` 改成 `.equip-slot-list`
   （原装备弹窗已删，元素搬进背包并改 id 为 bag-equipped-list）。
   坑：改 id 没同步改 CSS 选择器 → 样式整条失效，格子退回默认块级流，
   17 个槽位竖着排、把整个弹窗撑爆。**改 id 必须同步查 CSS。** */
.equip-slot-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); /* v1.02.1 定稿：恢复 48px 原尺寸（格内改三行小字，无需加宽） */
  gap: 4px;
  max-height: 22vh;                          /* v2.85.0：合并进背包后必须限高，否则 17 格把背包格和用药区挤出屏幕 */
  overflow-y: auto;
}
/* 兼容：旧装备弹窗 id 若还在（回滚/调试），保持同一样式 */
#equip-equipped-list, #bag-equipped-list { display: grid; grid-template-columns: repeat(6, minmax(48px, 1fr)); gap: 4px; /* 每排6个，与下方背包格同列定义、同容器宽 → 格子同尺寸 */ max-height: 22vh; overflow-y: auto; }
.equip-slot-item {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #241c10;
  border: 1px solid #4a3a1c;
  border-radius: 4px;
  cursor: pointer;
}
.equip-slot-item:hover { background: #3a2a14; border-color: #8a6a2c; }
.equip-slot-item.empty { opacity: 0.4; border-style: dashed; }
/* 已装备槽位名称（无装备时）*/
.equip-slot-name { font-size: 13px; color: #c9a24a; line-height: 1.2; text-align: center; font-weight: bold; }
/* 已装备物品图标（有装备时）*/
.equip-item-icon { font-size: 20px; }

/* 背包区域：网格显示，可滚动 */
.equip-bag-section { flex: 1; min-height: 0; }
#equip-bag-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); /* v1.02.1 定稿：恢复 48px 原尺寸（格内改三行小字，无需加宽） */
  gap: 4px;
  max-height: 40vh;
  overflow-y: auto;
}
.equip-bag-item {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #241c10;
  border: 1px solid #4a3a1c;
  border-radius: 4px;
  cursor: pointer;
  font-size: 24px;
  position: relative;
}
.equip-bag-item:hover { background: #3a2a14; border-color: #8a6a2c; }
.equip-bag-item.empty { opacity: 0.2; cursor: default; }
.equip-bag-count { position: absolute; bottom: 2px; right: 3px; font-size: 10px; color: #c9a24a; font-weight: bold; }

/* ============ 任务系统样式（2026-09-08 新增）============ */
.quest-modal-body {
  padding: 10px;
  overflow-y: auto;
  /* v6.863.0（Boss m00106-5）：旧版写死 max-height:60vh，在 9:16 固定框里只占六成高，
     下半截空一大块。改为 flex:1 + min-height:0 撑满框内剩余高度，空出来的空间全给任务列表
     （口径同 .attr-modal-body）。 */
  flex: 1;
  min-height: 0;
  max-height: none;
}
.quest-item {
  background: #1a140c;
  border: 1px solid #4a3a1c;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 8px;
}
.quest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.quest-name {
  color: #e8c87a;
  font-size: 14px;
  font-weight: bold;
}
.quest-level {
  color: #8a6a2c;
  font-size: 11px;
  margin-bottom: 4px;
}
.quest-desc {
  color: #b89a5c;
  font-size: 11px;
  line-height: 1.4;
  margin-bottom: 6px;
}
.quest-status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: bold;
}
.quest-status-available {
  background: #2a4a2a;
  color: #90ee90;
}
.quest-status-accepted {
  background: #4a3a1c;
  color: #e8c87a;
}
.quest-status-completed {
  background: #1a3a2a;
  color: #32cd32;
}
.quest-status-locked {
  background: #2a2a2a;
  color: #666;
}
.quest-progress {
  color: #c9a24a;
  font-size: 11px;
  margin-bottom: 4px;
}
.quest-progress-complete {
  color: #90ee90;
  font-weight: bold;
}
.quest-objectives {
  margin: 6px 0;
  padding-left: 10px;
}
.quest-objective {
  color: #b89a5c;
  font-size: 10px;
  line-height: 1.6;
}
.quest-objective.done {
  color: #90ee90;
  text-decoration: line-through;
}
/* v6.716.0 目标地点标注小字（Boss m00885）：目标行下方灰字，比目标更淡一档 */
.quest-obj-where {
  color: #8a7a58;
  font-size: 9px;
  line-height: 1.4;
  margin-left: 12px;
}
.quest-rewards {
  color: #8a6a2c;
  font-size: 10px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #2a2114;
}
.quest-btn {
  width: 100%;
  padding: 6px;
  margin-top: 8px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  font-weight: bold;
}
.quest-btn-accept {
  background: #2a4a2a;
  color: #90ee90;
  border: 1px solid #4a7a4a;
}
.quest-btn-accept:hover {
  background: #3a5a3a;
}
.quest-btn-complete {
  background: #4a3a1c;
  color: #e8c87a;
  border: 1px solid #6b4a1c;
}
.quest-btn-complete:hover {
  background: #5a4a2c;
}
/* v1.09.5③ 放弃任务按钮（红色警示风，区别于绿"接取"/金"完成"） */
.quest-btn-abandon {
  background: #4a2a2a;
  color: #ee9090;
  border: 1px solid #7a4a4a;
}
.quest-btn-abandon:hover {
  background: #5a3a3a;
}
/* v5.0.75 待选任务奖励（官方四选一）：金框卡片 + 竖排按钮，手机端一眼看到、直接点 */
.quest-reward-choice {
  border: 1px solid #d4a017;
  background: rgba(212, 160, 23, 0.10);
}
.quest-reward-choice .quest-name {
  color: #ffe23b;
}
.quest-choice-btn {
  text-align: left;
}
.quest-empty {
  text-align: center;
  color: #666;
  padding: 20px;
  font-size: 12px;
}
.quest-error {
  text-align: center;
  color: #d23b2b;
  padding: 20px;
  font-size: 12px;
}

/* ============ v0.98.0 装备品质系统前端样式 ============ */
/* 装备详情弹窗（点背包装备格弹出，复用 #equip-detail-modal）：居中浮层 + 暗金盒 + 内容/按钮样式 */
/* v6.7.53/54：z 70→80——军需官清单（#rep-vendor-modal 72）里点装备名看属性时，详情层必须压在清单之上（Boss：不应被列表挡住）。注意 static/equip_detail.css 也定义了同一选择器且后加载（会覆盖本值），两处必须同步改 */
#equip-detail-modal { position: fixed; inset: 0; background: rgba(0,0,0,.8); display: flex; align-items: center; justify-content: center; z-index: 80; }
.equip-detail-box { width: min(calc(100vw - 12px), calc((100vh - 12px) * 9 / 16)); height: auto; max-height: min(calc(100vh - 12px), calc((100vw - 12px) * 16 / 9)); overflow: hidden; background: #120f0a; border: 2px solid #6b4a1c; border-radius: 8px; padding: 14px; display: flex; flex-direction: column; }   /* v4.9.1：纵向 flex+限高，内容在 #equip-detail-content 内滚动、按钮固定盒底；v6.8.3：高度按内容自适应（height:auto），内容超长才长到 max-height 上限（与 equip_detail.css 同步，两处必须一致） */
.equip-detail-name { font-size: 18px; font-weight: bold; margin-bottom: 4px; }
.equip-detail-sub { font-size: 11px; color: #8a7a5c; margin-bottom: 10px; }
/* v1.03.0：物品描述行（药水效果/材料说明/工具说明，弹窗内查看，斜体暗金区分数值行） */
.equip-detail-desc { font-size: 12px; color: #b8a878; font-style: italic; margin: 6px 0; line-height: 1.5; }
.equip-detail-stat { font-size: 13px; color: #d8c8a0; margin: 3px 0; }
/* v3.41.0 职业限制红框：详情面板「不可装备」红字加粗提示行 */
.equip-detail-noequip { font-size: 13px; font-weight: bold; color: #ff5555; margin: 4px 0; }
.equip-detail-affix { font-size: 13px; color: #1eff00; margin: 2px 0; }   /* 词条绿字 */
/* v6.921.0 装备对比块：物品详情与同部位已穿装备的差值行（绿=提升 红=下降） */
.equip-detail-compare { margin-top: 8px; padding-top: 6px; border-top: 1px dashed #4a3f28; }
.equip-detail-compare-title { font-size: 12px; color: #9a8c68; margin: 2px 0 4px; }
.equip-detail-compare-line { font-size: 13px; margin: 2px 0; }
.equip-detail-compare-line.up { color: #1eff00; }
.equip-detail-compare-line.down { color: #ff5555; }
.equip-detail-compare-same { font-size: 12px; color: #8a7d5e; margin: 2px 0; }
/* v3.115.0 装备绑定：绑定档位行（普通蓝灰；is-bound=已绑定 → 橙黄醒目，提示不可拍卖） */
.equip-detail-bind { font-size: 12px; color: #8fa8c8; margin: 4px 0; }
.equip-detail-bind.is-bound { color: #ffa040; font-weight: bold; }
.equip-detail-actions { flex: 0 0 auto; margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }   /* v4.9.1：固定按钮区，不参与滚动 */
.ed-btn { flex: 1; min-width: 60px; font-size: 12px; padding: 5px 6px; background: #2a2114; color: #d8c8a0; border: 1px solid #5a4d33; border-radius: 4px; cursor: pointer; }
.ed-btn:hover { background: #3a3220; color: #ffe9b0; border-color: #8a6f2e; }

/* 背包"自动出售"展开行（点📤自动出售按钮后，插在背包弹窗头部下方） */
.bag-auto-sell-row { display: block; padding: 6px 10px; background: #1a140c; border-bottom: 1px solid #3a2e1a; font-size: 12px; color: #c9b48a; }
.bas-line1 { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.bas-line2 { display: flex; align-items: center; gap: 5px; margin-top: 5px; }
.bas-hint { font-weight: bold; }
.bas-input { width: 34px; background: #0e0b07; border: 1px solid #5a4d33; border-radius: 3px; color: #d8c8a0; padding: 2px 4px; font-size: 12px; }
.bag-auto-sell-row label { display: inline-flex; align-items: center; gap: 2px; }
.bas-status { flex: 1; color: #8f7f5c; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bas-status[data-on="1"] { color: #9fce7a; }   /* 已开启 → 绿字，一眼分清开关状态 */
.bas-go { font-size: 12px; padding: 3px 10px; background: #3a3220; color: #e8c87a; border: 1px solid #8a6f2e; border-radius: 4px; cursor: pointer; }
.bas-go:hover { background: #4a4030; color: #ffe9b0; }
.bas-once { font-size: 12px; padding: 3px 8px; background: #2a2418; color: #c9b48a; border: 1px solid #5a4d33; border-radius: 4px; cursor: pointer; }
.bas-once:hover { background: #3a3220; color: #e8c87a; }
.bas-off { font-size: 12px; padding: 3px 8px; background: #2a1818; color: #c07a6a; border: 1px solid #6a3a2e; border-radius: 4px; cursor: pointer; }
.bas-off:hover { background: #3a2018; color: #e89a8a; }
/* v6.1010.0（Boss m00276 选项 1）自动出售常驻状态点：背包头部按钮里带一个 6px 圆点，
   开着=绿点、关着=暗点。手机 375px 窄屏塞不下整块状态条（头部是 flex-wrap:nowrap），
   所以用点＋按钮悬浮说明代替，宽度只多 10px。 */
.bas-dot { display: inline-block; width: 6px; height: 6px; margin-left: 4px; border-radius: 50%;
  background: #5a4d33; vertical-align: middle; }
.bas-dot[data-on="1"] { background: #7ac95a; box-shadow: 0 0 4px #7ac95a; }
.bas-go:disabled, .bas-once:disabled, .bas-off:disabled { opacity: .45; cursor: default; }

/* ============ v1.09.5⑦ NPC交易面板方格子（买/卖区同款：4列网格比背包装大一号，右下角按钮）============ */
.npc-trade-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);  /* 背包是5列，这里4列→格子更大 */
  gap: 8px;
}
.npc-trade-cell {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: #1a140c;
  border: 1px solid #3a2e1a;
  border-radius: 6px;
  padding: 16px 4px 4px;   /* v1.09.5⑪：顶部留 16px 给右上角按钮，避免遮挡第1行 */
  overflow: hidden;
}
.npc-trade-cell:hover { border-color: #8a6a2c; background: #241c10; }
/* v1.09.5⑬：商店格（复用 .npc-trade-cell）——无购买小按钮，整格可点弹购买弹窗：手型 cursor + hover 提亮；顶部留白收回（16px 是交易区按钮预留，商店格没按钮） */
.shop-cell { cursor: pointer; padding-top: 4px; }
.shop-cell:hover { border-color: #c9a24a; background: #2a2110; }
/* v1.09.5⑯：商店格名称按背包装备格格式（.bag-cell-text 先例）——允许两行折行，竖屏 5 列窄格"初级生命药水"不再省略号截断：
   ①名称行 white-space 单行 nowrap → normal（中文逐字可折）+ word-break 兜底 + 字号缩一号 11→10px
   ②格子高度自适应（aspect-ratio:1 死锁 → auto + min-height 56px），折两行不被 overflow:hidden 裁掉；
   同行矮格由 grid stretch 拉齐到最高格，视觉不变形 */
.shop-cell .npc-trade-cell-name { font-size: 10px; white-space: normal; word-break: break-all; line-height: 1.2; }
.shop-cell { aspect-ratio: auto; min-height: 56px; }
/* v1.09.5⑭：NPC 交易卖区格——右上角"出售"小按钮（快捷出售）+ 整格点击弹物品详情页；顶部 16px 给按钮预留（v1.09.5⑰ 恢复按钮后留白收回→16px） */
.npc-sell-cell { cursor: pointer; padding-top: 16px; }
/* v6.423.0（Boss 指令）：卖区售价字体调小并钉在格子最底部横排——原 10px 流内行会挤占/盖住物品名，现改 8px 绝对定位钉底，不占内容流 */
.npc-sell-cell { padding-bottom: 13px; }
.npc-sell-cell .npc-trade-cell-price {
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 1px;
  font-size: 8px;
  line-height: 11px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}
.npc-sell-cell:hover { border-color: #c9a24a; background: #2a2110; }
/* v3.41.0 职业限制红框（Boss 指令）：卖区里本职业不可穿的装备 → 红框描边 + 红内发光（同背包装备格口径），hover 提亮为亮红 */
.npc-sell-cell.noequip-cell { border-color: #e5484d; box-shadow: inset 0 0 4px #e5484d88; }
.npc-sell-cell.noequip-cell:hover { border-color: #ff8585; background: #2a2110; }
/* v1.09.5⑰：NPC 交易买区格（同商店格处理）——无"购买"小按钮，整格点击弹数量选择弹窗（showBuyDialog source="npc"），顶部留白收回 */
.npc-buy-cell { padding-top: 4px; }
/* v1.09.5⑰：卖区"出售"小按钮（右上角，金色，悬浮不占内容流；同 v1.09.5⑪ 购买按钮布局位置） */
.npc-trade-cell-btn-sell {
  position: absolute;
  right: 3px;
  top: 3px;
  font-size: 10px;
  font-family: inherit;
  padding: 1px 7px;
  background: #4a3a1c;
  color: #ffd700;
  border: 1px solid #8a6f2e;
  border-radius: 3px;
  cursor: pointer;
  z-index: 2;
}
.npc-trade-cell-btn-sell:hover { background: #5a4a2c; }
/* v1.09.5⑨：emoji 图标已屏蔽（买/卖格子只显文字），删除原 .npc-trade-cell-icon 死样式 */
/* v1.09.5⑪ 第1行：档位（初级/中级/高级）或装备等级（X级），小号灰字；空则自动隐藏（材料/工具无档位） */
.npc-trade-cell-l1 { font-size: 9px; color: #8a7a5c; height: 11px; line-height: 11px; }
.npc-trade-cell-l1:empty { height: 0; margin: 0; }
.npc-trade-cell-name {
  font-size: 11px;
  color: #fff;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* v2.89.3 Boss 定案：售价颜色要亮黄（黄色）不是金色——#ffff00 纯正亮黄 */
.npc-trade-cell-price { font-size: 10px; color: #ffff00; }
/* v1.09.5⑧：点击格子（非按钮区）弹物品详情 → 手型提示 */
.npc-trade-cell { cursor: pointer; }
/* v1.09.5⑪ 操作按钮移右上角（原右下角会遮挡价格行，悬浮不占内容流） */
/* v1.09.5⑰：原 .npc-trade-cell-btn（买区"购买"绿色按钮）死样式已删——买区格子改整格点击弹数量选择弹窗（同商店 .shop-cell 处理），按钮不再渲染；卖区"出售"按钮见下方 .npc-trade-cell-btn-sell */
/* v1.09.5⑰：卖区"出售"小按钮（右上角，金色，悬浮不占内容流；整格点击仍弹物品详情页，点按钮区由 JS closest 排除） */

/* ============ v1.50.0 矿道地铁车厢动画（ride_sec 乘车耗时） ============ */
/* 全屏遮罩 + 隧道灯带横向滚动（车厢前进感） + 文案 + 进度条（width 由 JS 按 ride_sec 走 transition） */
#subway-ride { position: fixed; inset: 0; z-index: 9998; background: #07090d;
  display: flex; align-items: center; justify-content: center; }
#subway-ride.hidden { display: none; }
.subway-ride-inner { text-align: center; width: min(520px, 86vw); }
.subway-ride-tunnel { height: 116px; margin-bottom: 24px; border: 2px solid #2a3345;
  border-radius: 8px; background-color: #0b0f16;
  background-image: repeating-linear-gradient(90deg, #131a26 0 34px, rgba(216,176,74,.2) 34px 38px, #131a26 38px 72px);
  animation: subway-lights .9s linear infinite; }
@keyframes subway-lights { from { background-position-x: 0; } to { background-position-x: -72px; } }
.subway-ride-title { color: #e8c87a; font-size: 20px; font-weight: 700; letter-spacing: 2px; }
.subway-ride-msg { color: #cfd8e6; font-size: 14px; margin: 10px 0 16px; }
.subway-ride-track { height: 8px; background: #1a2230; border-radius: 4px; overflow: hidden; }
.subway-ride-bar { height: 100%; width: 0%;
  background: linear-gradient(90deg, #8a6a2a, #e8c87a); }
.subway-ride-hint { color: #7d8aa0; font-size: 12px; margin-top: 12px; min-height: 15px; }
/* v2.11.0 雷霆崖电梯过场：同一套全屏遮罩，.elev 类把隧道灯带改纵向（竖井升降感） */
#subway-ride.elev .subway-ride-tunnel {
  background-image: repeating-linear-gradient(0deg, #131a26 0 34px, rgba(216,176,74,.2) 34px 38px, #131a26 38px 72px);
  animation: elev-lights .9s linear infinite; }
@keyframes elev-lights { from { background-position-y: 0; } to { background-position-y: -72px; } }
#subway-ride.elev .subway-ride-bar { background: linear-gradient(0deg, #8a6a2a, #e8c87a); }

/* ============ v2.90.10 狮鹫飞行过场（Boss 反馈：全屏天空与文字 MUD 不符，改地铁同款局部卡片） ============ */
/* 与矿道地铁车厢动画同一套交互骨架（暗底全屏 + 中央小卡片 + 进度条 3 秒走满），
   只做两处区分：① 卡片顶部小窗用「蓝色光带横向掠过」（模拟狮鹫穿云/掠过的风），
   替代地铁的金色隧道灯带；② 进度条用蓝色渐变（地铁金色 / 渡船沿用它）——不全屏铺天空 */
#flight-ride { position: fixed; inset: 0; z-index: 9998; background: #0a1120;
  display: flex; align-items: center; justify-content: center; }
#flight-ride.hidden { display: none; }
.flight-ride-inner { text-align: center; width: min(520px, 86vw); }
/* 蓝色光带小窗：与地铁隧道同尺寸（116px），蓝白灯段 1.1s 横向滚动（比地铁 0.9s 稍慢，
   飞行的高空舒展感）；灯段间距/宽度沿用地铁节奏，只把金色 #d0b04a 换成冷蓝 #4a90d8 */
.flight-ride-window { height: 116px; margin-bottom: 24px; border: 2px solid #1f3350;
  border-radius: 8px; background-color: #0c1526;
  background-image: repeating-linear-gradient(90deg, #0c1526 0 34px, rgba(74,144,216,.35) 34px 38px, #0c1526 38px 72px);
  animation: flight-window-lights 1.1s linear infinite; }
@keyframes flight-window-lights { from { background-position-x: 0; } to { background-position-x: -72px; } }
.flight-ride-title { color: #a8cdf0; font-size: 20px; font-weight: 700; letter-spacing: 2px; }
.flight-ride-msg { color: #cfd8e6; font-size: 14px; margin: 10px 0 16px; }
.flight-ride-track { height: 8px; background: #14213a; border-radius: 4px; overflow: hidden; }
.flight-ride-bar { height: 100%; width: 0%;
  background: linear-gradient(90deg, #2a5a8a, #4a90d8, #2a5a8a); }
.flight-ride-hint { color: #7d8aa0; font-size: 12px; margin-top: 12px; min-height: 15px; }

/* ============ v5.0.10 坐骑赶路过场（Boss：按坐骑品质决定过场时长，参考矿道地铁） ============ */
/* 与地铁/飞行同一套交互骨架（暗底全屏 + 中央卡片 + 进度条按 travel_sec 走满），两处区分：
   ① 卡片顶部横条 = 土黄路面 + 草绿草丛向后掠过（坐骑在跑），节奏 0.55s 比地铁 0.9s 更快；
   ② 中段多一行「出发地 ➜ 目的地」，进度条用土黄 → 草绿渐变（60% 慢马也看得出在动） */
#mount-ride { position: fixed; inset: 0; z-index: 9998; background: #0a0c09;
  display: flex; align-items: center; justify-content: center; }
#mount-ride.hidden { display: none; }
.mount-ride-inner { text-align: center; width: min(520px, 88vw); }
/* 地面横条：一个循环 = 56px（路面 26 + 草 8 + 土路 16 + 亮边 6），动画位移正好 -56px → 无缝循环 */
.mount-ride-ground { height: 104px; margin-bottom: 22px; border: 2px solid #3b3a24;
  border-radius: 8px; background-color: #14150e;
  background-image: repeating-linear-gradient(90deg,
    #14150e 0 26px, rgba(126,168,74,.45) 26px 34px, #4a3d22 34px 50px, rgba(232,200,122,.22) 50px 56px);
  animation: mount-gallop .55s linear infinite; }
@keyframes mount-gallop { from { background-position-x: 0; } to { background-position-x: -56px; } }
.mount-ride-title { color: #e8c87a; font-size: 20px; font-weight: 700; letter-spacing: 2px; }
/* 出发地 ➜ 目的地：手机上宽度窄，允许换行居中（不用悬停，常驻可见） */
.mount-ride-route { display: flex; align-items: center; justify-content: center; gap: 8px;
  flex-wrap: wrap; margin: 12px 0 4px; font-size: 15px; }
.mount-ride-from { color: #b9c4d4; }
.mount-ride-arrow { color: #e8c87a; font-size: 15px; }
.mount-ride-to { color: #8ec96a; font-weight: 700; }
.mount-ride-msg { color: #cfd8e6; font-size: 14px; margin: 12px 0 16px; }
.mount-ride-track { height: 8px; background: #221f14; border-radius: 4px; overflow: hidden; }
.mount-ride-bar { height: 100%; width: 0%;
  background: linear-gradient(90deg, #8a6a2a, #e8c87a, #7ea84a); }
.mount-ride-hint { color: #7d8aa0; font-size: 12px; margin-top: 12px; min-height: 15px; }

/* ---- v1.05.0 可交互物件（厄运之锤·北区贡品箱）：白色方框 + 白名，不画血条 ---- */
.npc-item.chest { border-color: #f0f0f0; color: #ffffff; background: rgba(240,240,240,.06); }
.npc-item.chest:hover { background: rgba(255,255,255,.14); color: #ffffff; }
.npc-item.chest .npc-name { color: #ffffff; font-weight: 600; }
/* 箱子没有血条：把顶部血条整条藏掉，名字上移当条目标题 */
.npc-item.chest .npc-hp-top { display: none; }
.npc-item.chest.chest-locked { border-color: #9a9a9a; color: #c8c8c8; }
.npc-item.chest.chest-locked .npc-name { color: #c8c8c8; font-weight: 400; }
.npc-item.chest .npc-chest-tag { display: block; font-size: 10px; color: #cfcfcf; margin-top: 1px; }
/* v6.1002.0（Boss m01234）：训练师 NPC 名字下方「训练师」小字——绿色系，与友好 NPC 名字同色 */
.npc-item.npc .npc-chest-tag { display: block; font-size: 10px; color: #8fd18f; margin-top: 1px; }
.npc-item.chest.chest-locked .npc-chest-tag { color: #a8a8a8; }
/* v6.16.0（Boss m01705）：专业采集点——边框/名字跟随节点类型色（草药绿、矿脉棕、鱼群蓝），
   采空不整块变灰，只把名字压暗一点，玩家仍能看出这是哪种节点。 */
.npc-item.chest.prof-node { background: rgba(255,255,255,.05); }
.npc-item.chest.prof-node .npc-name { color: inherit; font-weight: 600; }
.npc-item.chest.prof-node.chest-locked .npc-name { color: inherit; opacity: .5; }
.npc-item.chest.prof-node.chest-locked .npc-chest-tag { color: inherit; opacity: .6; }
/* ---- v3.987.0 地面掉落物（Boss 需求：丢弃的东西显示在 NPC 栏位，方框颜色随品质） ----
   边框/名字颜色由 JS 按品质内联上色（QUALITY_COLORS），这里只兜底白色 + 定排版 */
.npc-item.ground-item { border-color: #ffffff; background: rgba(255,255,255,.05); }
.npc-item.ground-item:hover { background: rgba(255,255,255,.14); }   /* 悬停给点反馈（边框/名字色仍是品质色） */
.npc-item.ground-item .npc-hp-top { display: none; }        /* 不掉血条 */
.npc-item.ground-item .npc-name { font-size: 10px; line-height: 1.25; }
.npc-item.ground-item .npc-chest-tag { display: block; font-size: 10px; color: #cfcfcf; margin-top: 1px; }   /* 数量 x3 小字 */
/* 背包详情弹窗里的危险按钮（丢弃/摧毁）：红框红字，和出售/装备区分开 */
.ed-btn.danger { border-color: #d9534f; color: #ff8a85; }
.ed-btn.danger:hover { background: rgba(217,83,79,.18); color: #ffb3af; border-color: #d9534f; }
/* ---- v3.988.0 拆分控件（Boss 需求 m00444：堆叠物品可选择数量拆出来）----
   展开在背包详情弹窗按钮行下面的一整行：说明文字 + 数字输入 + 一半/确定/取消 */
.bag-split-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #5a4d33; }
.bag-split-label { font-size: 12px; color: #d8c8a0; }
.bag-split-input { width: 70px; font-size: 13px; padding: 4px 6px; background: #1a1408; color: #ffe9b0; border: 1px solid #5a4d33; border-radius: 4px; text-align: center; }
.bag-split-input:focus { outline: none; border-color: #8a6f2e; }
.bag-split-row .ed-btn { flex: 0 0 auto; min-width: 52px; }   /* 这一行按钮不拉伸，紧凑排一排 */
/* 弹窗里给箱子加行内按钮样式沿用 NPC 按钮 */
.info-panel-actions .info-panel-action-btn.chest-open { background: #f5f5f5; color: #1a1a1a; border-color: #ffffff; }
.info-panel-actions .info-panel-action-btn.chest-open:hover { background: #ffffff; }

/* ---- v3.103.0 风石（希利苏斯暮光区域召唤物）：青框 + 青白名，不画血条（仿 .chest 一套观感） ---- */
.npc-item.windstone { border-color: #7fd4ff; color: #cfeeff; background: rgba(127,212,255,.07); }
.npc-item.windstone:hover { background: rgba(127,212,255,.16); color: #eaffff; }
.npc-item.windstone .npc-name { color: #cfeeff; font-weight: 600; }
/* 风石没有血条：把顶部血条整条藏掉，名字上移当条目标题 */
.npc-item.windstone .npc-hp-top { display: none; }
.npc-item.windstone.windstone-locked { border-color: #6f8f9f; color: #9fb8c8; }
.npc-item.windstone.windstone-locked .npc-name { color: #9fb8c8; font-weight: 400; }
.npc-item.windstone .npc-chest-tag { display: block; font-size: 10px; color: #9fdcff; margin-top: 1px; }
.npc-item.windstone.windstone-locked .npc-chest-tag { color: #7f95a3; }
/* 弹窗里的「开启风石」按钮 */
.info-panel-actions .info-panel-action-btn.windstone-open { background: #d8f2ff; color: #08343f; border-color: #7fd4ff; }
.info-panel-actions .info-panel-action-btn.windstone-open:hover { background: #ffffff; }

/* ============ v3.88.0 附魔窗口（附魔师 NPC → 选部位 → 看该部位能附的属性）============ */
/* 部位格：仿 NPC 交易格（.npc-trade-cell）的窄格样式，一行 4~5 列排开 */
.enchant-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 6px;
  max-height: 26vh;
  overflow-y: auto;
}
.enchant-slot-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  background: #1a140c;
  border: 1px solid #3a2e1a;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.enchant-slot-cell:hover { border-color: #8a6a2c; background: #241c10; }
/* 选中的部位：高亮描边（当前正在看它的可附属性） */
.enchant-slot-cell.active { border-color: #c9a24a; background: #2a2110; box-shadow: inset 0 0 6px rgba(201,162,74,.25); }
.enchant-slot-name { font-size: 12px; font-weight: bold; color: #e0c060; }
.enchant-slot-item { font-size: 10px; color: #d8d0bc; text-align: center; word-break: break-all; line-height: 1.2; }
.enchant-slot-type { font-size: 10px; color: #8a6a2c; }

/* 可附属性列表：一行一条（名字 + 说明） */
.enchant-option-list { display: flex; flex-direction: column; gap: 4px; max-height: 32vh; overflow-y: auto; }
/* v6.81.0（Boss m00544）：卷轴货架铺满整个弹窗，不再限 32vh 留半窗空白（学习附魔窗不受影响） */
#enchant-modal .attr-modal-body { display: flex; flex-direction: column; }
#enchant-modal .npc-trade-section { flex: 1; display: flex; flex-direction: column; margin-bottom: 0; }
#enchant-modal .enchant-option-list { max-height: none; flex: 1; }
/* v6.89.0（Boss m00819）：学习附魔/学习炼金窗同款问题——列表限 32vh，62/48 条配
   方只在上面一小截里滚，窗口下半全空。铺满整窗（同 v6.81.0 货架窗口径） */
#enchant-learn-modal .attr-modal-body,
#alch-learn-modal .attr-modal-body { display: flex; flex-direction: column; }
#enchant-learn-modal .npc-trade-section:last-child,
#alch-learn-modal .npc-trade-section:last-child { flex: 1; display: flex; flex-direction: column; margin-bottom: 0; }
#enchant-learn-modal .enchant-option-list,
#alch-learn-modal .enchant-option-list { max-height: none; flex: 1; min-height: 0; }
.enchant-option-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 8px;
  background: #1a140c;
  border: 1px solid #3a2e1a;
  border-left: 3px solid #6b5420;
  border-radius: 4px;
  cursor: pointer;
}
.enchant-option-row:hover { border-color: #8a6a2c; border-left-color: #c9a24a; background: #241c10; }
.enchant-option-name { font-size: 12px; font-weight: bold; color: #ffd700; white-space: nowrap; }
.enchant-option-desc { font-size: 11px; color: #a89a80; line-height: 1.3; flex: 1; min-width: 0; }   /* v6.81.0：抢到剩余宽度才不会一字一行竖排 */
/* 空态提示（没装备 / 取不到数据） */
.enchant-empty { padding: 14px 8px; font-size: 12px; color: #8a6a2c; text-align: center; }
/* v6.101.0 货架格子化（Boss m01660：参照炼金货架）：分类头独占整行；买不起的卷轴格灰显 */
#enchant-modal .enchant-cat-head {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: bold;
  color: #ffe23b;
  padding: 4px 2px 2px;
  border-bottom: 1px solid #3a2e1a;
}
#enchant-modal .enchant-shop-cell.dim { opacity: .45; }
#enchant-modal .enchant-shop-cell .npc-trade-cell-l1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* v4.0.0 附魔真实可用：硬币价格 / 买不起置灰 / 当前已附高亮 / 手续费行 */
.enchant-option-coin { font-size: 11px; color: #7fd1ff; white-space: nowrap; margin-left: auto; }
.enchant-option-row.locked { opacity: .45; cursor: not-allowed; }
.enchant-option-row.locked .enchant-option-coin { color: #ff7a7a; }
.enchant-option-row.active { border-left-color: #6ee06e; background: #16240f; }
.enchant-option-row.active .enchant-option-name { color: #6ee06e; }
.enchant-fee-line { font-size: 11px; color: #c9a24a; padding: 2px 2px 6px; }
.enchant-slot-ench { font-size: 10px; color: #6ee06e; }

/* v3.90.0 拍卖行弹窗：关闭按钮样式（修复测试「npc-auction-close-btn 无样式」红） */
#npc-auction-close-btn {
  background: none;
  border: 1px solid #6b4a1c;
  color: #e8c87a;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
}
#npc-auction-close-btn:hover { background: #2a2010; border-color: #c9a24a; }


/* ============ v3.100.0 铁匠修理窗口（铁匠 NPC → 每件装备耐久 + 单件/全身修理）============ */
#repair-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; }
#repair-modal.hidden { display: none; }
#repair-close-btn { width: 28px; height: 28px; font-size: 16px; line-height: 1; color: #c9a24a; background: #2a1f10; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; }
#repair-close-btn:hover { border-color: #c9a24a; color: #ffe9b0; }
/* 一行一件装备：名称 + 耐久条 + 修理价 + 按钮 */
.repair-list { display: flex; flex-direction: column; gap: 4px; max-height: 46vh; overflow-y: auto; }
.repair-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; background: #1a140c; border: 1px solid #3a2e1a; border-left: 3px solid #6b5420; border-radius: 4px; }
/* 耐久已耗尽：整行描红，提示加成失效 */
.repair-row.broken { border-left-color: #a33a2a; background: #1e1210; }
.repair-name { flex: 1; min-width: 0; font-size: 12px; color: #e8dfc8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repair-dur { font-size: 12px; font-weight: bold; color: #7ec860; min-width: 62px; text-align: right; }
.repair-dur.low { color: #e0a030; }
.repair-dur.broken { color: #e05a4a; }
.repair-cost { font-size: 11px; color: #c9a24a; min-width: 76px; text-align: right; }
.repair-empty { font-size: 12px; color: #8a7a5c; padding: 8px 4px; line-height: 1.6; }

/* v3.100.0 装备格耐久角标（装备栏格内右下角小字） */
.equip-slot-item { position: relative; }
.equip-dur { position: absolute; right: 2px; bottom: 1px; font-size: 9px; line-height: 1; color: #7ec860; pointer-events: none; }
.equip-dur.low { color: #e0a030; }
.equip-dur.broken { color: #e05a4a; }

/* ============ v3.969.0 坐骑骑乘（Boss 指令）============
   ① .ride-toggle：战斗日志右下角「上马 / 下马」小方框。
      尺寸照抄快捷技能栏格子 .action-cell（30×24），配色也用同一套，
      玩家一眼就知道它和下面的技能格是一个体系的东西。
      绝对定位到 #text-area 右下角（#text-area 本来就是 position:relative）。 */
.ride-toggle {
  position: absolute; right: 6px; bottom: 6px; z-index: 6;
  width: 30px; height: 24px; padding: 0;
  border: 1px solid #3a2e1a; border-radius: 3px; background: #1a140c;
  color: #e8c87a; font-size: 10px; line-height: 1.1;
  cursor: pointer; user-select: none;
}
.ride-toggle:hover { border-color: #8a6a2c; background: #2a1f10; }
/* 已骑上：文字变绿边变绿，和「上马」状态一眼区分 */
.ride-toggle.on { color: #7ddf6b; border-color: #3f6a2c; background: #16220f; }
.ride-toggle.hidden { display: none; }

/* ② .mount-extra：坐骑栏展开后的附加区（自动骑乘勾选 + 骑乘口径提示） */
.mount-extra { margin-top: 4px; }
.mount-auto-row {
  display: flex; align-items: center; gap: 4px;
  /* 2026-10-23 Boss 指令：这行说明改纯白 + 字号大一号（10px → 11px） */
  font-size: 11px; color: #ffffff; cursor: pointer; user-select: none;
}
.mount-auto-row input[type="checkbox"] {
  width: 12px; height: 12px; margin: 0; accent-color: #8a6a2c; cursor: pointer;
}
/* 骑乘口径提示：2026-10-23 Boss 指令：说明改纯白（原灰米色看不清） */
.mount-ride-tip {
  margin-top: 3px; font-size: 9px; line-height: 1.4; color: #ffffff;
}
/* 2026-10-23 Boss 指令：坐骑页面底部那句说明也改纯白（只作用于坐骑弹窗，不影响地图/背包等其它页面） */
#mount-modal .map-modal-legend { color: #ffffff; }

/* ============ v3.998.0 套装属性区块（物品详情弹窗：点套装部件显示该套全部档位） ============ */
/* 区块容器：细边框 + 深色底，和属性行区分开 */
.set-block {
  margin: 8px 0 4px; padding: 6px 8px;
  border: 1px solid #4a3f2a; border-radius: 4px;
  background: rgba(0,0,0,.35);
}
/* 标题行：套装·名称（count/total 件） */
.set-block-title {
  font-size: 13px; font-weight: bold; color: #ffd28a;
  margin-bottom: 3px;
}
/* 每档一行：激活档绿色（WoW 绿），未激活档暗灰（Boss 指定配色） */
.set-tier { font-size: 12.5px; line-height: 1.5; }
.set-tier-on  { color: #1eff00; }   /* 已激活档：绿色 */
.set-tier-off { color: #6b6b6b; }   /* 未激活档：暗灰 */

/* ===== v4.0.0 种族显示（Boss bug9）：姓名后的绿色中文种族 =====
   #4fd84f 是项目标准绿（与 .heal / 升级日志同色）。
   目标栏窄（60~100px），种族用固定 8px 不跟随 fitNameToBox 缩放，
   保证名字缩字号时种族依然清晰、不被压成 7px 看不见。 */
.npc-race { color: #4fd84f; font-size: 8px; margin-left: 1px; white-space: nowrap; }
/* 信息弹窗（点 NPC 弹出的面板）空间大，种族用 0.8em 跟随姓名 */
.info-race { color: #4fd84f; font-size: 0.8em; white-space: nowrap; }

/* ============ v4.15.0 账号条 + 登录/注册弹窗（多人化第 1 步批次 B3） ============ */
/* 账号条：固定右上角小条，手机可点（不靠悬停）。未登录只显示「登录」小按钮；
   已登录显示「账号名｜退出」。游客不登录完全不影响单机玩（建号/读档照旧）。 */
#auth-bar { position: fixed; top: 4px; right: 6px; z-index: 50; display: flex; align-items: center; gap: 6px; font-size: 12px; color: #b8a888; }
#auth-bar .auth-btn { padding: 4px 10px; font-size: 12px; font-family: inherit; background: #2a2010; color: #e8c87a; border: 1px solid #6b4a1c; border-radius: 4px; }
#auth-user-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 登录/注册弹窗：复用 create-modal 的遮罩范式（fixed 全屏 + 居中 + hidden 类控制显隐） */
#auth-modal { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; z-index: 55; }
#auth-modal.hidden { display: none; }
/* 输入框样式照 #name-input 抄，两窗观感一致 */
#auth-modal input { width: 100%; padding: 10px; font-size: 16px; font-family: inherit; background: #0e0c08; color: #e8c87a; border: 1px solid #4a3a1c; border-radius: 4px; margin-bottom: 10px; box-sizing: border-box; }
#auth-modal input::placeholder { color: #5a4a2a; }
#auth-modal button { width: 100%; padding: 10px; font-size: 15px; font-family: inherit; background: #3a2a12; color: #e8c87a; border: 1px solid #8a6a2c; border-radius: 4px; }
/* 错误提示行：平时收起，有错才显示（不用 alert——手机上弹窗打断操作） */
#auth-err { min-height: 16px; font-size: 12px; color: #e06c5a; margin-bottom: 8px; }
/* 底部切换链接（登录↔注册）与游客跳过入口 */
#auth-switch { margin-top: 12px; font-size: 12px; color: #8a7a5a; }
#auth-skip { margin-top: 6px; font-size: 12px; color: #5a4a2a; }
#auth-switch a, #auth-skip a, #auth-forgot a { color: #e8c87a; text-decoration: underline; cursor: pointer; }
/* v5.1.34 忘记密码入口：登录视图下方小字链接（渐进可见，注册/找回视图隐藏） */
#auth-forgot { margin-top: 6px; font-size: 12px; color: #8a7a5a; }

/* ===== v4.22.0 批次 D4：观察 / 组队 / 交易 ===== */

/* 常驻提示条容器（组队邀请/交易邀请/队伍栏共用）：fixed 挂在顶部聊天框下方，
   手机不靠悬停就能看到（Boss 红线：手机玩家看不到 tooltip） */
#d4-bars {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 132px;
  z-index: 90;
  width: min(92%, 430px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;   /* 容器不吃点击，点击都留给里面的按钮 */
}
#d4-bars.hidden { display: none; }

/* 单条提示条（邀请条） */
.d4-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #241c0c;
  border: 1px solid #7a6335;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  color: #e8c87a;
  box-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.d4-bar.hidden { display: none; }
.d4-bar-text { flex: 1; line-height: 1.4; }
.d4-bar-btn {
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #7a6335;
  background: #3a2f14;
  color: #ffe9b0;
  cursor: pointer;
}
.d4-bar-btn.decline { background: #2a1c14; color: #c8a090; border-color: #5a3a2a; }

/* 队伍成员栏（有队伍时常驻显示：每个队友一行 名字+血条+血量数字） */
#party-bar {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#party-bar.hidden { display: none; }
.d4-party-member {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1c160a;
  border: 1px solid #4a3d20;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  color: #d8c890;
}
.d4-pm-name { white-space: nowrap; }
.d4-pm-lead { color: #ffe23b; font-weight: bold; margin-right: 2px; }   /* 队长标记：亮黄（Boss 定案色） */
.d4-pm-hpbar {
  flex: 1;
  height: 8px;
  background: #2a1414;
  border: 1px solid #4a2020;
  border-radius: 3px;
  overflow: hidden;
}
.d4-pm-hpbar > i { display: block; height: 100%; background: linear-gradient(90deg, #2e8b57, #32cd32); }
.d4-pm-hptext { min-width: 72px; text-align: right; font-size: 11px; color: #9fdcff; }
.d4-pm-leave {
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 4px;
  border: 1px solid #5a3a2a;
  background: #2a1c14;
  color: #c8a090;
  cursor: pointer;
}

/* 观察弹窗：装备按槽位行显示，天赋按系分组 */
#inspect-modal .inspect-body { max-height: 62vh; overflow-y: auto; }
.d4-insp-head { font-size: 13px; color: #ffe9b0; margin-bottom: 8px; }
.d4-insp-sec { font-size: 12px; color: #e8c87a; border-bottom: 1px solid #4a3d20; margin: 10px 0 6px; padding-bottom: 2px; }
.d4-insp-row { display: flex; gap: 8px; font-size: 12px; padding: 2px 0; color: #c8c8c8; }
.d4-insp-slot { width: 58px; color: #8a7a5a; flex: none; }
.d4-insp-talent { display: flex; gap: 8px; font-size: 12px; padding: 2px 0; color: #c8c8c8; }
.d4-insp-tname { flex: 1; }
.d4-insp-rank { color: #9fdcff; flex: none; }
/* v6.299.0（Boss 指令）：天赋名可点看详情，复用 v6.272.0 装备可点的 4 个样式类
   （该批类曾在并行窗口 v6.292/298/297 整文件覆盖中被回退，随本功能依赖恢复） */
.d4-insp-eq-name { cursor: pointer; text-decoration: underline dotted; }
.d4-insp-eq-detail { padding: 2px 0 4px 66px; }
/* v6.314.0（Boss m00002）：观察窗详情整行可点（扩大触控面积，手机 264px 窄屏不再点不准）+ 详情块排版 */
.d4-insp-tap { cursor: pointer; align-items: center; min-height: 22px; }
.d4-insp-tap:active { background: rgba(255,255,255,0.07); }
.d4-insp-more { margin-left: auto; font-size: 10px; color: #6f8fa8; flex: none; }
.d4-insp-eq-sub { font-size: 11px; color: #b9b9b9; margin-bottom: 2px; }
.d4-insp-eq-stat { font-size: 11px; color: #9fd49f; line-height: 1.5; }
/* v6.1055.0：骨火双特效文案用 \n 分隔两句，观察窗保留换行 */
.d4-insp-eq-effect { font-size: 11px; color: #d4c07f; line-height: 1.5; white-space: pre-line; }
/* v6.314.0：固有属性沿用 v6.272 的两列网格；手机窄屏（<=420px，含 Boss 手机 264px 可用宽）
   退单列，避免长属性名被挤断 */
.d4-insp-eq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 10px; }
.d4-insp-eq-cell { font-size: 11px; color: #7fbf7f; padding: 1px 0; white-space: nowrap; }
@media (max-width: 420px) { .d4-insp-eq-grid { grid-template-columns: 1fr; } }

/* 交易弹窗：上=对方交易区 下=自己交易区，各 10 格；中间提示条不遮挡格子 */
.d4-trade-half-title { font-size: 12px; color: #e8c87a; margin: 6px 0 4px; }
.d4-trade-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.d4-trade-cell {
  height: 42px;
  border: 1px solid #4a3d20;
  border-radius: 4px;
  background: #14100a;
  font-size: 11px;
  color: #d8c890;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2px;
  overflow: hidden;
  line-height: 1.3;
}
.d4-trade-cell.occupied { cursor: pointer; border-color: #7a6335; background: #1c160a; }
/* 确认变绿（和魔兽世界同理：谁点确定谁的半区绿） */
.d4-trade-half.green .d4-trade-cell { border-color: #2e8b57; background: #16301c; }
.d4-trade-half.green .d4-trade-half-title { color: #32cd32; }
/* 中间提示条（是否进行交易？）：夹在两区中间，不遮挡格子 */
.d4-trade-mid {
  margin: 8px 0;
  padding: 8px;
  text-align: center;
  background: #241c0c;
  border: 1px dashed #7a6335;
  border-radius: 4px;
  font-size: 12px;
  color: #e8c87a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.d4-trade-mid.ok { color: #32cd32; border-color: #2e8b57; }
/* v6.298.0（Boss m01276/m01279）：交易弹窗金币区——金/银/铜三个窄输入横排（手机可用宽约 264px） */
.d4-trade-gold { margin: 8px 0 4px; padding: 6px; border: 1px solid #3a2f18; border-radius: 4px; background: #14100a; }
.d4-trade-gold-title { font-size: 12px; color: #e8c87a; margin-bottom: 5px; }
.d4-trade-gold-row { display: flex; align-items: center; gap: 3px; flex-wrap: nowrap; }
.d4-trade-gold-inp {
  width: 34px; flex: none; min-width: 0; box-sizing: border-box;
  background: #0d0a05; border: 1px solid #4a3d20; border-radius: 3px;
  color: #ffe9b0; font-size: 12px; text-align: center; padding: 3px 1px;
  -moz-appearance: textfield;
}
.d4-trade-gold-inp::-webkit-outer-spin-button,
.d4-trade-gold-inp::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.d4-trade-gold-unit { font-size: 11px; color: #8a7a5a; flex: none; margin-right: 2px; }
.d4-trade-gold-row .d4-bar-btn { padding: 3px 6px; font-size: 11px; flex: none; }
.d4-trade-gold-info { font-size: 11px; color: #c8a090; margin-top: 5px; line-height: 1.4; }
.d4-trade-gold-info .g-amt { color: #ffd257; }
.d4-trade-gold-info .g-wallet { color: #8a9a6a; }


/* 自己交易区下方的背包物品列表（点一下放进交易区） */
.d4-bagpick-title { font-size: 12px; color: #8a7a5a; margin: 8px 0 4px; }
.d4-bagpick { max-height: 150px; overflow-y: auto; border: 1px solid #3a2f18; border-radius: 4px; }
.d4-bagpick-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  font-size: 12px;
  cursor: pointer;
  border-bottom: 1px solid #241c0c;
}
.d4-bagpick-item:hover { background: #2a2210; }
.d4-bagpick-empty { padding: 8px; font-size: 12px; color: #6a5a3a; text-align: center; }

/* ===== v4.27.0 聊天名字点击交互菜单 ===== */
/* 聊天行里可点击的玩家名：带下划线（Boss 指令：名字下面跟一条横线） */
.d4-chat-name {
  text-decoration: underline;      /* 下划线：提示可点击 */
  cursor: pointer;                 /* 手机上长按/点按都有反馈 */
  font-weight: bold;
}
/* 点击名字弹出的交互菜单：固定居中浮层（手机友好，不依赖悬停） */
#d4-chat-menu {
  position: fixed;
  top: 38%;                        /* 屏幕中上部，不挡聊天输入行 */
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2100;                   /* 盖过普通浮层，低于全屏 modal 也够用 */
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
  padding: 10px 12px;
  background: #1c150a;
  border: 1px solid #7a6335;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .7);
}
#d4-chat-menu .d4-chat-menu-title {
  text-align: center;
  font-size: 13px;
  color: #ffe9b0;
  padding-bottom: 4px;
  border-bottom: 1px solid #3a2f14;
}
#d4-chat-menu .d4-chat-menu-btn {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 4px;
  border: 1px solid #7a6335;
  background: #3a2f14;
  color: #ffe9b0;
  cursor: pointer;
  text-align: center;
}
#d4-chat-menu .d4-chat-menu-btn:active { background: #55421a; }  /* 手机按下反馈 */


/* ============ v4.28.0 批次 F1 PWA：虚拟八方向方向键 ============ */
/* 手机主屏安装后没有键盘，右下角固定一块 3x3 方向键；默认隐藏，JS 检测到触屏才显示 */
#dpad {
  display: none;                       /* 默认桌面隐藏 */
  position: fixed;                     /* 固定在视口右下角，不随内容滚动 */
  right: 14px; bottom: 118px;          /* 抬高避开底部状态栏 */
  width: 168px; height: 168px;
  grid-template-areas: "nw n ne" "w c e" "sw s se";
  grid-template-columns: 1fr 1fr 1fr;  grid-template-rows: 1fr 1fr 1fr;
  gap: 3px;
  z-index: 70;                         /* 高于面板、低于弹窗 */
  touch-action: none;                  /* 禁止浏览器把手势当滚动/缩放 */
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
  opacity: 0.82;                       /* 半透明不挡视野 */
}
#dpad.show { display: grid; }          /* 触屏设备：JS 加 .show 才显示 */
.dp-btn {
  background: rgba(20, 26, 38, 0.9);
  border: 1px solid #3a4a66;
  border-radius: 8px;
  color: #cdd6e4; font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  touch-action: none;
  -webkit-user-select: none; user-select: none;
}
.dp-btn:active { background: #2c3a55; color: #ffe23b; }   /* 按下高亮反馈 */
.dp-center {
  background: rgba(20, 26, 38, 0.55);
  border: 1px dashed #2c3a55; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #55627a; font-size: 10px;
}
/* 屏幕太矮（横屏手机）时整体缩小，避免挡住大半屏 */
@media (max-height: 420px) {
  #dpad { width: 128px; height: 128px; right: 10px; bottom: 84px; }
  .dp-btn { font-size: 16px; }
}

/* v4.27.2：目标栏里的离线队友条目置灰（ Boss：队友进 npc 栏目，离线要能看出来） */
.npc-item.party-offline {
  opacity: 0.45;
}

/* ================= v4.27.3a 邀请框（组队+交易共用）：战斗日志中心 =================
   从顶部 d4-bars 挪进 #text-area（position:relative 作基准），居中浮层；
   Boss 布局：文字横着放上面一行，接受/拒绝按钮放下面左右并排（竖字太丑已废） */
.d4-invite-box {
  position: absolute;              /* 只盖战斗日志区，不碰左侧目标栏 */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);  /* 正中 */
  width: fit-content;              /* 框随内容收缩，不拉满长条 */
  max-width: 86%;                  /* 名字再长也不撑爆日志区 */
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: #241c0c; border: 1px solid #7a6335; border-radius: 8px;
  padding: 10px 16px;
  z-index: 55;                     /* 盖住日志文字，低于观察/交易弹窗 */
  box-shadow: 0 2px 10px rgba(0,0,0,.6);
  text-align: center;
}
.d4-invite-box.hidden { display: none; }
.d4-invite-text { color: #ffe9b0; font-size: 12px; line-height: 1.4; white-space: nowrap; }  /* 横排不折行 */
.d4-invite-btns { display: flex; gap: 14px; }                /* 接受/拒绝并排 */
.d4-invite-btns .d4-bar-btn { padding: 5px 18px; }

/* v6.285.0 Boss 指令：决斗进行条（认输面板）挪到日志区最上方一小块——
   原 top:50% 正中浮层常驻挡日志；决斗条必须不占日志版面 */
#duel-bar {
  top: 6px;
  transform: translateX(-50%);
  padding: 4px 10px;
  gap: 4px;
  opacity: .93;
}
#duel-bar .d4-invite-text { font-size: 11px; }
#duel-bar .d4-bar-btn { padding: 3px 12px; font-size: 11px; }

/* ================= v4.27.3a roll 点面板：只显示在战斗日志区域内 =================
   底部居中（组队/交易邀请框在正中，两者同显时上下错开不叠）；不盖其他区域
   v6.289.0（Boss：竖着显示改横排）：多件同时掷骰横向一排铺开、放不下自动换行；
   每件一张小方框（上=品质色可点名称，中=倒计时/已选，下=需求/贪婪/放弃），窄屏一排两张 */
#roll-panel {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  width: fit-content; max-width: 86%;
  display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 5px;
  z-index: 54;
}
#roll-panel.hidden { display: none; }
/* v6.289.0 roll 点小卡片：104px 宽 ×2 + 间距 ≈ 213px，264px 可用宽一排放两张、多件换行不挤满屏 */
.d4-roll-card {
  width: 104px; box-sizing: border-box;
  background: #241c0c; border: 1px solid #7a6335; border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.6);
  padding: 5px 5px 6px; display: flex; flex-direction: column; gap: 4px;
}
.d4-roll-card-name {
  font-size: 11px; font-weight: bold; line-height: 1.25; text-align: center;
  text-decoration: underline; cursor: pointer; word-break: break-all;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.d4-roll-card-foot { font-size: 10px; color: #9a8a5a; text-align: center; white-space: nowrap; }
.d4-roll-card-foot .d4-roll-timer { color: #c9a24a; }
.d4-roll-chosen { color: #ffe23b; margin-left: 3px; }
.d4-roll-card-btns { display: flex; gap: 3px; }
.d4-roll-card-btns .d4-bar-btn { flex: 1; min-width: 0; padding: 3px 0; font-size: 10px; }

/* ================= v4.22.0 遗留修复：观察弹窗/交易弹窗容器 CSS =================
   v4.22.0 建这两个 modal 时漏了容器 CSS（同 #action-bar-modal 当年的坑）：
   无定位规则 → 弹窗掉到页面底部流式排版里，看起来像「点了没反应」。照范式补齐 */
#inspect-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 62; }
#inspect-modal.hidden { display: none; }
#trade-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 62; }
#trade-modal.hidden { display: none; }

/* v6.277.0（Boss m00002）：交易邀请弹窗——全屏遮罩（照 #npc-bank-modal / #bind-confirm-modal 范式，
   容器必须自带 fixed 遮罩，否则 createElement/静态弹窗都会铺不满视口）；层级压过交易窗(62) */
#trade-invite-modal {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .85);
  display: flex; align-items: center; justify-content: center; z-index: 73;
}
#trade-invite-modal.hidden { display: none; }
/* .map-modal-box 默认 9:16 撑满（那是地图/背包大弹窗的底座），确认框要紧凑小框：高度由内容决定 */
#trade-invite-modal .map-modal-box { width: min(340px, calc(100vw - 24px)); height: auto; }

/* ============ v5.1.12 设置弹窗（账户/用户名 + 退出登录） ============ */
/* 遮罩范式照 #chat-modal 抄（fixed 全屏 + 居中 + hidden 类控制显隐），
   z-index 62 与观察/交易弹窗同级（从页签打开，盖住页面即可） */
#setting-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 62; }
#setting-modal.hidden { display: none; }
/* 信息行：label 灰、值金色，照账号条配色（#auth-bar 同一套色板） */
.setting-modal-body { padding: 14px 16px; }
.setting-row { display: flex; align-items: baseline; gap: 8px; font-size: 14px; padding: 6px 0; }
.setting-label { color: #8a7a5a; white-space: nowrap; flex-shrink: 0; }
.setting-value { color: #e8c87a; word-break: break-all; }
/* v6.659.0（Boss m00090）：设置页标题旁 Q 群号（点按复制，app.js 反馈「已复制」） */
#setting-qq { margin-left: 6px; font-size: 11px; font-weight: normal; color: #9fc4e8; cursor: pointer; white-space: nowrap; }
/* 退出登录按钮：红棕警示色（与普通金色按钮区分，提示这是登出级操作）；
   v6.212.0（Boss 指令「退出登录的按钮小一些」）：满宽大按钮改窄居中小按钮，
   不再占整行（上面还有账户/用户名/音乐开关行，视觉主次分明） */
.setting-logout { display: block; margin: 4px auto 10px; width: auto; padding: 5px 16px; font-size: 12px; font-family: inherit; background: #3a1a14; color: #e08060; border: 1px solid #8a4a2c; border-radius: 4px; cursor: pointer; }
.setting-logout.hidden { display: none; }
.setting-logout:hover { background: #4a221a; }

/* ============ v6.514.0 自杀删角（Boss 需求：设置面板+确认弹窗；v6.736.0 起不再公屏讣告） ============ */
/* 设置面板里的自杀按钮：红系警示（区别于退出登录的暗红描边） */
.setting-suicide { display: block; margin: 4px auto 2px; width: auto; padding: 5px 16px; font-size: 12px; font-family: inherit; background: #40100c; color: #ff7a6a; border: 1px solid #a03028; border-radius: 4px; cursor: pointer; }
.setting-suicide.hidden { display: none; }
.setting-suicide:hover { background: #55140e; }
/* 自杀确认弹窗：遮罩范式照 #setting-modal 抄；层级高于设置弹窗（z-index 64） */
#suicide-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 64; }
#suicide-modal.hidden { display: none; }
.suicide-box { max-width: 300px; width: calc(100% - 24px); padding: 14px 16px; text-align: center; }
.suicide-box h2 { margin: 0 0 8px; font-size: 16px; color: #ff7a6a; }
.suicide-warn { margin: 0 0 8px; font-size: 11px; line-height: 1.5; color: #ffb0a0; }
.suicide-tip { margin: 0 0 6px; font-size: 12px; color: #e8e0c0; }
.suicide-tip b { color: #ffe23b; }
#suicide-confirm-input { width: calc(100% - 20px); padding: 6px 9px; font-size: 13px; font-family: inherit; background: #1a1410; color: #f0e6d2; border: 1px solid #6a5030; border-radius: 4px; text-align: center; letter-spacing: 2px; }
.suicide-actions { margin-top: 10px; display: flex; gap: 10px; justify-content: center; }
.suicide-cancel { padding: 6px 22px; font-size: 12px; font-family: inherit; background: #2a2a2a; color: #c9b890; border: 1px solid #5a4a2c; border-radius: 4px; cursor: pointer; }
.suicide-cancel:hover { background: #3a3a2a; }
.suicide-ok { padding: 6px 22px; font-size: 12px; font-family: inherit; background: #7a1410; color: #ffd0c8; border: 1px solid #c04038; border-radius: 4px; cursor: pointer; }
.suicide-ok:disabled { opacity: .45; cursor: not-allowed; }
.suicide-ok:not(:disabled):hover { background: #951a14; }
.suicide-err { margin: 8px 0 0; font-size: 11px; color: #ff7a6a; }
.suicide-err.hidden { display: none; }

/* ============ v6.212.0 福利/邮件弹窗 + 邮件红点 + 音乐开关 ============ */
/* 弹窗容器：遮罩范式照 #setting-modal 抄（fixed 全屏 + 居中 + hidden 类控制显隐） */
#welfare-modal, #mail-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 62; }
/* v6.212.1 邮件从设置内打开，层级提到设置之上 */
#mail-modal { z-index: 66; }
#welfare-modal.hidden, #mail-modal.hidden { display: none; }
/* 邮件红点：工具栏「邮件」按钮右上角，有未读才显示（render 主循环随 mail_unread 同步） */
.toolbar-btns button { position: relative; }
#mail-dot { position: absolute; top: -6px; right: -8px; min-width: 13px; height: 13px; padding: 0 3px; box-sizing: border-box; background: #e04040; border: 1px solid #ff9090; border-radius: 7px; color: #fff; font-size: 9px; font-weight: bold; line-height: 11px; text-align: center; }
#mail-dot.hidden { display: none; }
/* 设置弹窗·背景音乐开关（小开关钮，行内跟随「背景音乐：」标签） */
.setting-mail { position: relative; padding: 3px 14px; font-size: 12px; font-family: inherit; background: #2a2a2a; color: #c9a24a; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; }
.setting-mail:active { background: #3a2a14; color: #ffe9b0; }
.music-toggle { padding: 3px 14px; font-size: 12px; font-family: inherit; background: #2a2a2a; color: #c9a24a; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; }
.music-toggle:active { background: #3a2a14; color: #ffe9b0; }
/* 福利弹窗：状态行 + 签到钮 + 7 天奖励格（当前档亮黄高亮） */
.welfare-body { min-width: 250px; }
.welfare-status { font-size: 13px; color: #e8c87a; padding: 6px 0; }
.welfare-sign-btn { display: block; width: 100%; padding: 8px; margin: 8px 0 10px; font-size: 14px; font-family: inherit; background: #3a2a14; color: #ffe23b; border: 1px solid #6a5a2c; border-radius: 4px; cursor: pointer; }
.welfare-sign-btn:disabled { color: #8a7a5a; background: #241c10; border-color: #3a3018; cursor: default; }
/* v6.215.1（Boss：竖长条难受）改 7 列×2 排网格 */
.welfare-rewards { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.welfare-cell { text-align: center; padding: 4px 1px; background: #1e1810; border: 1px solid #3a3018; border-radius: 4px; font-size: 9px; color: #8a7a5a; }
.welfare-cell b { display: block; font-size: 10px; color: #e8c87a; margin-top: 1px; }
.welfare-cell-cur { border-color: #ffe23b; background: #33270e; color: #ffe23b; }
.welfare-cell-cur b { color: #ffe23b; }
/* 邮件弹窗：待办列表（未读+有附件未领），点行展开详情，附件需手动领取 */
.mail-body { min-width: 260px; max-width: 320px; max-height: 60vh; overflow-y: auto; }
.mail-list { display: flex; flex-direction: column; gap: 6px; }
.mail-empty { text-align: center; color: #8a7a5a; font-size: 12px; padding: 16px 0; }
.mail-item { background: #1e1810; border: 1px solid #3a3018; border-radius: 4px; padding: 7px 9px; cursor: pointer; }
.welfare-cell-done { background: #241c10; border-color: #7a5c2e; }
.mail-item-head { display: flex; justify-content: space-between; gap: 8px; }
.mail-from { color: #8a7a5a; font-size: 10px; white-space: nowrap; flex-shrink: 0; }
.mail-title { color: #e8c87a; font-size: 12px; text-align: right; word-break: break-all; }
.mail-item-sub { color: #c9a24a; font-size: 10px; margin-top: 3px; }
.mail-item.mail-read { opacity: .75; }
.mail-detail { margin-top: 6px; border-top: 1px solid #3a3018; padding-top: 6px; }
.mail-detail.hidden { display: none; }
.mail-body-text { color: #d0c0a0; font-size: 12px; line-height: 1.5; word-break: break-all; }
.mail-claim-btn { margin-top: 6px; padding: 5px 14px; font-size: 12px; font-family: inherit; background: #3a2a14; color: #ffe23b; border: 1px solid #6a5a2c; border-radius: 4px; cursor: pointer; }


/* ============ v5.1.14 健康游戏忠告（合规：游戏打开时必须显示） ============ */
/* 全屏遮罩 z-index 70：盖过登录墙（55）与一切弹窗，点「进入游戏」才放行 */
/* v5.1.36：忠告页自动停留 2.5 秒淡出（Boss 指令：不放按钮）——opacity 过渡 0.4s */
#health-notice { position: fixed; inset: 0; background: #0a0805; display: flex; align-items: center; justify-content: center; z-index: 70; opacity: 1; transition: opacity 0.4s ease; }
#health-notice.fading { opacity: 0; }
#health-notice.hidden { display: none; }
.health-notice-box { text-align: center; padding: 30px 24px; max-width: 420px; }
.health-notice-title { color: #e8c87a; font-size: 20px; letter-spacing: 4px; margin: 0 0 18px; }
.health-notice-box p { color: #b8a888; font-size: 14px; line-height: 2; margin: 0; }

/* ============ v6.7.20 进入过渡遮罩：登录/建号后 state 首拉期间的「正在进入游戏」层 ============ */
/* 全屏 fixed，z-index 75（盖过忠告页 70 与一切弹窗），样式复用忠告页一套；
   .hidden 由 JS 切换；撤场走 .fading 0.3s 淡出，观感与忠告页一致。 */
#entering-mask { position: fixed; inset: 0; background: #0a0805; display: flex; align-items: center; justify-content: center; z-index: 75; opacity: 1; transition: opacity 0.3s ease; }
#entering-mask.fading { opacity: 0; }
#entering-mask.hidden { display: none; }
#entering-mask .health-notice-title { letter-spacing: 3px; }

/* ================= v6.1.0 离线挂机副本：挂机状态条 + 档位面板 + 结算弹窗 ================= */
/* 状态条：#text-area 内文档流常驻块（room-desc-panel 与 log-list 之间），仅挂机图内显示 */
#afk-bar {
  flex-shrink: 0;
  margin: 0 0 8px; padding: 5px 8px;
  background: #1d1710;
  border: 1px solid #6b4a1c; border-radius: 4px;
  font-size: 11px; color: #d8cfa8; line-height: 1.5;
}
#afk-bar.hidden { display: none; }

/* v6.7.43 战歌峡谷排队/战场条（同 afk-bar 定位）：排队中/战场内/逃兵时才显示 */
#wsg-bar {
  flex-shrink: 0;
  margin: 0 0 8px; padding: 5px 8px;
  background: #1d1710;
  border: 1px solid #6b4a1c; border-radius: 4px;
  font-size: 11px; color: #d8cfa8; line-height: 1.5;
}
#wsg-bar.hidden { display: none; }
#wsg-bar .wsg-exit {
  background: #5a1c1c; border: 1px solid #a04030; color: #ffd8c8;
  border-radius: 4px; padding: 2px 10px; font-size: 11px; cursor: pointer;
}
#wsg-bar .wsg-queue-btn {
  background: #2c2416; border: 1px solid #8a6a2c; color: #e8c87a;
  border-radius: 4px; padding: 2px 10px; font-size: 11px; cursor: pointer;
}
#afk-bar .afk-bar-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
#afk-bar-title { color: #e8c87a; font-weight: bold; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#afk-bar .afk-bar-btns { display: flex; gap: 6px; flex-shrink: 0; }
#afk-bar .afk-bar-btns button {
  background: #2a2013; color: #e8c87a; border: 1px solid #6b4a1c; border-radius: 4px;
  font-size: 11px; padding: 2px 8px; min-height: 22px;   /* 手机可点高度 */
}
#afk-bar-stats { color: #c9bfa0; margin-top: 2px; }
#afk-bar-warn { color: #ff7a6a; margin-top: 2px; }
#afk-bar-warn.hidden { display: none; }

/* 档位选择 / 结算弹窗：全屏遮罩 + 窄屏盒（z-72 盖过其他 modal 的 62，避开健康忠告页的 70） */
#afk-modal, #afk-settle-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, .85);
  display: flex; align-items: center; justify-content: center; z-index: 72;
}
#afk-modal.hidden, #afk-settle-modal.hidden { display: none; }
/* .afk-modal-box 尺寸已并入统一 9:16 固定框 */   /* 手机面板不需要 460 那么宽 */
.afk-modal-box .afk-x { background: none; border: none; color: #b8a67a; font-size: 15px; padding: 2px 6px; }
.afk-money { color: #e8d48a; font-size: 12px; margin-bottom: 4px; }
.afk-money b { color: #ffe9b0; }
.afk-cur { color: #9ed4ff; font-size: 11px; margin-bottom: 6px; }
.afk-sec { color: #d8b45a; font-size: 11px; font-weight: bold; margin: 8px 0 4px; }
.afk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.afk-cell {
  background: #241c10; border: 1px solid #4a3a1c; border-radius: 5px;
  color: #d8cfa8; font-size: 11px; padding: 8px 4px; min-height: 30px; line-height: 1.3;
}
.afk-cell.on { border-color: #e8c87a; color: #ffe9b0; background: #3a2c14; box-shadow: 0 0 6px rgba(232, 200, 122, .35); }
/* v6.93.0：档位格子两行——b=倍率、i=费用小字（Boss m01109「档位要写上金币的消耗」） */
.afk-cell b { display: block; font-weight: inherit; }
.afk-cell i { display: block; font-style: normal; font-size: 10px; opacity: .72; margin-top: 2px; }
.afk-cell.dim { opacity: .45; }   /* 买不起的档位灰显，点了在提示行说明差额 */
.afk-scroll { color: #9ed4ff; font-size: 11px; margin-top: 8px; }
.afk-err { color: #ff7a6a; font-size: 11px; min-height: 15px; margin-top: 4px; }
.afk-btns { display: flex; gap: 8px; margin-top: 8px; }
.afk-go {
  flex: 1; background: linear-gradient(180deg, #6b4a1c, #4a3210);
  border: 1px solid #e8c87a; border-radius: 5px; color: #ffe9b0;
  font-size: 13px; font-weight: bold; padding: 9px 0;
}
.afk-quit {
  flex: 1; background: #241c10; border: 1px solid #7a4a3a; border-radius: 5px;
  color: #e0a090; font-size: 13px; padding: 9px 0;
}
.afk-scroll-btn {   /* 挂机弹窗「使用双倍经验卷轴」：次要操作，蓝调与提示行同色系 */
  flex: 1; background: #101c24; border: 1px solid #4a7a9a; border-radius: 5px;
  color: #9ed4ff; font-size: 13px; padding: 9px 0;
}
.afk-tip { color: #d8cfa8; font-size: 12px; padding: 10px 0; text-align: center; }
/* v6.186.0 副本入口弹窗：进度行 + 重置说明（手机常驻文字，不依赖悬停） */
.dg-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: #d8cfa8; padding: 6px 0; border-bottom: 1px dashed #33280f; }
.dg-row b { color: #ffe9b0; font-weight: bold; text-align: right; }
.dg-id { letter-spacing: .5px; }
.dg-note { color: #b8a67a; font-size: 11px; line-height: 1.6; margin-top: 8px; }
.dg-warn { color: #ffb36b; font-size: 12px; line-height: 1.7; margin: 10px 0 2px; }
.dg-sub { color: #9ed4ff; font-size: 11px; line-height: 1.6; margin-top: 6px; }
.dg-ok { color: #8ee08e; font-size: 11px; margin-top: 6px; }
.afk-quit:disabled { opacity: .45; }
.afk-settle-reason { color: #e8c87a; font-size: 12px; font-weight: bold; margin-bottom: 8px; }
.afk-settle-row { display: flex; justify-content: space-between; font-size: 12px; color: #d8cfa8; padding: 4px 0; border-bottom: 1px dashed #33280f; }
.afk-settle-row b { color: #ffe9b0; }

/* ================= Boss 定案（2026-11-01 v5.1.68 修正）：所有弹窗关闭键固定【右上角】 =================
   （Boss 更正：之前说的右下角是口误，右上角才是定案）
   关闭键保持在标题栏最右侧（.map-modal-head 已 flex-wrap:nowrap + 标题省略号截断，
   手机窄屏也不会换行挪位——地图关闭键跑到左边的老 bug 根因已删）。

/* ============ v5.2.0 拍卖弹窗游戏化：货架格子 + 确认弹窗（同商店 buy-dialog 口径） ============ */
/* 我的拍品：蓝边标识；我处最高价：金边标识（金优先，后写的 top 覆盖 mine） */
.auction-cell-mine { border-color: #4a6a8a; }
.auction-cell-top { border-color: #e8c87a; }
/* 上架弹窗时长三选按钮（6/12/24h），选中金边高亮 */
.auction-dur-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.auction-dur-btn { padding: 8px 0; background: #241c10; border: 1px solid #3a2e1a; border-radius: 6px; color: #c9b47a; font-size: 12px; cursor: pointer; }
.auction-dur-btn.sel { border-color: #e8c87a; color: #ffe9b0; background: #2e2412; }
/* v5.2.1 上架区改 5 列格网（.bag-grid 类无规则曾是「一格占满全宽」的根因）+ 起拍价金/银/铜三段 */
/* v6.4.1 上架页撑满弹窗剩余高度（Boss：界面不要空一半），格子多时区内滚动 */
#auction-page-list { height: 100%; display: flex; flex-direction: column; }
#auction-page-list .npc-trade-section { flex: 1; display: flex; flex-direction: column; margin-bottom: 0; }
#auction-page-list #auction-bag-list { flex: 1; min-height: 0; overflow-y: auto; align-content: start; }
#auction-bag-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.auction-price-row { display: flex; gap: 6px; margin: 6px 0 8px; }
.auction-price-unit { flex: 1; padding: 6px 0; text-align: center; background: #241c10; border: 1px solid #3a2e1a; border-radius: 6px; color: #c9b47a; font-size: 12px; cursor: pointer; }
.auction-price-unit b { color: #ffe9b0; margin-left: 2px; }
.auction-price-unit.sel { border-color: #e8c87a; background: #2e2412; }
/* v5.1.73 地图弹窗的 ＋/－ 缩放按钮已按 Boss 指令删除，缩放走双指/滚轮。（v6.4.1 补回丢失的 /* 开头） */


/* ===== v5.1.74 游戏统一弹窗（gameConfirm/gameAlert）===== */
#game-modal { position: fixed; inset: 0; background: rgba(0,0,0,.78); display: flex; align-items: center; justify-content: center; z-index: 9999; }
#game-modal.hidden { display: none; }
.game-modal-box { width: 80%; max-width: 320px; background: #1a140c; border: 2px solid #6b4a1c; border-radius: 8px; padding: 18px 16px 14px; }
#game-modal-text { color: #d8c9a3; font-size: 14px; line-height: 1.7; white-space: pre-line; text-align: left; max-height: 50vh; overflow-y: auto; }
.game-modal-btns { display: flex; gap: 10px; margin-top: 16px; }
.game-modal-btn { flex: 1; padding: 10px 0; font-size: 15px; border-radius: 6px; border: 1px solid #6b4a1c; background: #2a2013; color: #d8c9a3; }
.game-modal-btn-ok { background: #4a3413; color: #ffd98a; border-color: #a87c32; }
.game-modal-btn:active { filter: brightness(1.25); }

/* ===== v6.155.0 复活系统：死亡等待弹窗 + 死亡状态条 ===== */
#death-modal { position: fixed; inset: 0; background: rgba(20,0,0,.82); display: flex; align-items: center; justify-content: center; z-index: 10000; }
#death-modal.hidden { display: none; }
.death-modal-box { width: 82%; max-width: 330px; background: #150c0c; border: 2px solid #7a2020; border-radius: 8px; padding: 18px 16px 14px; text-align: center; }
#death-modal-title { color: #ff5555; font-size: 17px; font-weight: bold; margin-bottom: 10px; }
#death-modal-text { color: #d8c9a3; font-size: 13px; line-height: 1.7; white-space: pre-line; text-align: left; }
.death-modal-btns { display: flex; gap: 10px; margin-top: 16px; }
.death-modal-btn { flex: 1; padding: 10px 0; font-size: 14px; border-radius: 6px; border: 1px solid #6b4a1c; background: #2a2013; color: #d8c9a3; }
.death-modal-btn-ok { background: #4a3413; color: #ffd98a; border-color: #a87c32; }
.death-modal-btn:active { filter: brightness(1.25); }
/* 死亡状态条（点「等待救援」收起弹窗后的常驻提示，渐进可见）
   v6.411.0（Boss m00894）：从屏幕顶部悬浮（position:fixed 挡聊天）改到战斗日志最上方，
   与 #afk-bar/#wsg-bar 同族占位（普通文档流条，不遮挡任何内容） */
#death-bar {
  flex-shrink: 0;
  margin: 0 0 8px; padding: 5px 8px;
  background: rgba(90,10,10,.92);
  border: 1px solid #a03030; border-radius: 4px;
  font-size: 11px; color: #ffb0b0; line-height: 1.5;
}
#death-bar.hidden { display: none; }
.death-bar-btn { background: #4a3413; color: #ffd98a; border: 1px solid #a87c32; border-radius: 4px; font-size: 12px; padding: 3px 8px; margin-left: 2px; }
.death-bar-btn:active { filter: brightness(1.25); }
#game-modal-cancel.hidden { display: none; }

/* ===== v5.2.3 拍卖行两个子菜单 + 在售拍品文字行列表（Boss 指令） ===== */
/* v5.2.5 三页签拉长（Boss：高度不变、长度加长）；v6.4.1 贴满页面宽度+三键严格均分（Boss：按页面长度平均分，高度不动） */
.auction-tabs { display: flex; gap: 2px; margin: 0 -10px 8px; }
.auction-tab-btn { flex: 1 1 0; min-width: 0; padding: 7px 0; font-size: 11px; letter-spacing: 0; background: #2a2419; color: #c9b896; border: 1px solid #4a3f2a; border-radius: 4px; }   /* v6.287.0 四页签均分窄屏（手机可用宽 ≈264px，四格各约 66px） */
.auction-tab-btn.sel { background: #3d3120; color: #ffe23b; border-color: #8a6d2f; font-weight: bold; }
/* v6.5.0 拍卖搜索+分类筛选条（Boss 指令：魔兽世界拍卖行式分类，可搜索可筛选） */
.auction-filter-bar { margin-bottom: 6px; }
.auction-search-row { display: flex; gap: 4px; margin-bottom: 4px; }
.auction-search-row input { flex: 1 1 0; min-width: 0; padding: 7px 8px; background: #1a1408; border: 1px solid #3a2e1a; border-radius: 4px; color: #e8d9b0; font-size: 16px; -webkit-appearance: none; font-family: inherit; }
.auction-search-row input::placeholder { color: #7a6a4a; }
.auction-search-row button { padding: 7px 14px; background: #2e2412; border: 1px solid #c9a24a; border-radius: 4px; color: #ffe9b0; font-size: 12px; cursor: pointer; }
.auction-filter-btns { display: flex; gap: 4px; }
.auction-filter-btn { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 2px; background: #241c10; border: 1px solid #4a3f2a; border-radius: 4px; color: #c9b896; -webkit-appearance: none; font-family: inherit; }
.auction-filter-btn i { font-style: normal; font-size: 10px; color: #8a7a5a; letter-spacing: 1px; }
.auction-filter-btn b { font-size: 13px; color: #ffe9b0; font-weight: bold; }
.auction-pick-row { display: block; width: 100%; padding: 10px 8px; background: #241c10;   /* v6.5.5 margin-bottom 移交双列网格 gap */ border: 1px solid #4a3f2a; border-radius: 4px; color: #d8c9a3; font-size: 14px; text-align: center; -webkit-appearance: none; font-family: inherit; }
.auction-pick-row.sel { border-color: #e8c87a; background: #2e2412; color: #ffe23b; font-weight: bold; }
/* v6.5.5 选单双列网格（Boss：单列超手机屏长显示不完全） */
.auction-pick-body { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
/* v6.5.5 拆分上架：数量 −/＋/全部 行 */
.auction-count-row { display: flex; align-items: center; gap: 8px; margin: 2px 0 4px; }
.auction-count-btn { padding: 6px 14px; background: #241c10; border: 1px solid #4a3f2a; border-radius: 4px; color: #ffe9b0; font-size: 14px; -webkit-appearance: none; font-family: inherit; }
.auction-count-btn:active { filter: brightness(1.3); }
#list-count-num { min-width: 30px; text-align: center; font-size: 15px; color: #ffe23b; }
/* 在售拍品行列表：一行一件（名字/品质/部位/甲类/等级/价格/剩时），总菜单不显示属性 */
.auction-rows { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; }   /* v6.301.0 行高压到单行后可视条数从约 9 增到 13 */
/* v6.301.0 拍品行改单行（Boss：两行太占空间，单行能多显示几件）：
   行上=名称(品质色)+竞价/起拍+一口价+剩时+常驻「出价」「一口价」按钮；
   品质名/部位/甲类/等级移入点行弹出的详情（手机无悬停，操作仍必须看得见点得到） */
.auction-row { display: flex; align-items: center; gap: 3px; padding: 3px 3px; border-bottom: 1px solid #332a1a; font-size: 11px; line-height: 1.2; min-height: 22px; }
.auction-row-op { flex-direction: row; align-items: center; gap: 4px; padding: 3px 3px; }
.auction-row-op .ar-line { display: flex; align-items: center; gap: 4px; min-width: 0; }
.auction-row-op .ar-line-op { gap: 6px; }
.ar-op-btn { flex-shrink: 0; padding: 2px 7px; font-size: 10px; background: #2e2412; color: #ffe9b0; border: 1px solid #c9a24a; border-radius: 4px; -webkit-appearance: none; font-family: inherit; }
.ar-op-btn:active { filter: brightness(1.3); }
.ar-op-bo { background: #1f3320; color: #b6f0b6; border-color: #4a8a4a; }
.ar-bo { color: #7fd47f; }
.ar-bids { color: #8a7a5a; }
.ar-top { color: #7fd47f; }
.ar-out { color: #ff9d7a; }
.auction-empty { color: #888; font-size: 12px; padding: 4px; }
.auction-row-bid { border-left: 3px solid #c9a24a; padding-left: 2px; }
.auction-row:last-child { border-bottom: none; }
.auction-row:active { background: #2a2419; }
.ar-name { flex: 1; min-width: 48px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ar-col { white-space: nowrap; flex-shrink: 0; color: #aaa; font-size: 10px; }
.ar-price { color: #ffe23b; }
.ar-time { color: #7fa8c9; margin-left: auto; }   /* v6.301.0 单行式：剩余时间贴右，后面紧跟操作按钮 */
/* 我的拍品：蓝色左边框（同 v5.2.0 auction-cell-mine 口径） */
.auction-row-mine { border-left: 3px solid #0070dd; padding-left: 2px; }
/* v5.2.5 我的拍卖行尾「撤回」按钮 */
.ar-cancel-btn { flex-shrink: 0; padding: 3px 10px; font-size: 11px; background: #3d2520; color: #ff9d7a; border: 1px solid #7a4a3a; border-radius: 4px; }
.ar-cancel-btn:active { filter: brightness(1.3); }
/* v6.441.0（Boss m01815）拍卖行界面延伸：列表 max-height:300px 是「上下留空、内容太少」主因——
   四页全部改 flex 拉伸（弹窗多高列表多高，内部滚动），按钮压矮，底部费率说明压缩成小字左对齐，
   空间让给拍品行。全部限定 #npc-auction-modal 作用域（attr-modal-body/map-modal-legend 为共享类）。 */
#npc-auction-modal .attr-modal-body { display: flex; flex-direction: column; padding: 6px 8px; }
#npc-auction-modal [id^="auction-page-"] { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
#npc-auction-modal .npc-trade-section { flex: 1 1 0; display: flex; flex-direction: column; min-height: 0; margin-bottom: 0; }
#npc-auction-modal .auction-rows { flex: 1 1 0; max-height: none; }
#npc-auction-modal .auction-tabs { margin: 0 -8px 5px; }
#npc-auction-modal .auction-tab-btn { padding: 4px 0; }   /* v6.441.0 页签 7px→4px */
#npc-auction-modal .auction-filter-bar { margin-bottom: 4px; }
#npc-auction-modal .auction-search-row { margin-bottom: 3px; }
#npc-auction-modal .auction-search-row input { padding: 4px 8px; }   /* v6.441.0 搜索框 7px→4px */
#npc-auction-modal .auction-search-row button { padding: 4px 10px; }
#npc-auction-modal .auction-filter-btn { padding: 2px; gap: 0; }   /* v6.441.0 筛选钮 4px→2px */
#npc-auction-modal .map-modal-legend { padding: 4px 8px; font-size: 10px; line-height: 1.35; text-align: left; }   /* v6.441.0 说明区 11px 居中→10px 左对齐 */
/* v6.450.0（Boss m01915）上架页格子被材料袋撑爆：grid 1fr 最小尺寸默认 min-content，
   .auction-mat-sec（内含 5×44px 材料格=236px）把所在列撑到 236px、其余背包格被压成 10px 细条。
   ①列宽改 minmax(0,1fr) 强制五列均分不受格内容影响；②材料袋整行显示（占满五列），材料格与背包格同宽。 */
#auction-bag-list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
#auction-bag-list .auction-mat-sec { grid-column: 1 / -1; }



/* ==================== v6.4.0 测试假人副本 ==================== */
/* ① #dummy-panel：战斗日志右上角的 DPS 统计小面板（仅假人副本图内显示）。
      绝对定位不占日志排版空间（同组队邀请框/上马按钮思路）；窄屏 150px 也放得下。 */
.dummy-panel {
  position: absolute; right: 6px; top: 6px; z-index: 6;
  width: 150px; max-width: 56%;
  background: rgba(26, 20, 12, .92); border: 1px solid #3a2e1a; border-radius: 6px;
  padding: 6px 8px; font-size: 10px; line-height: 1.5; color: #d8c9a3;
}
.dummy-panel.hidden { display: none; }
.dummy-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
#dummy-panel-title { color: #e8c87a; font-weight: bold; }
.dummy-panel-btns button {
  background: #1a140c; border: 1px solid #3a2e1a; border-radius: 3px;
  color: #e8c87a; font-size: 10px; padding: 1px 6px; margin-left: 4px; cursor: pointer;
}
.dummy-panel-btns button:hover { border-color: #8a6a2c; }
.dummy-line { display: flex; justify-content: space-between; }
.dummy-line b { color: #ffe23b; font-weight: normal; }
.dummy-skill { color: #b9a77e; }
.dummy-sep { border-top: 1px dashed #3a2e1a; margin: 4px 0; }
/* ① 档位弹窗容器（v6.6.x 修复"点假人副本按钮没反应"：#dummy-modal 由 JS 动态创建，
   此前漏容器 CSS，弹窗掉到页面底部流式排版里，看起来像没发生——照 #afk-modal 范式补齐，
   z-72 同挂机弹窗，盖过其他 modal 的 62） */
#dummy-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, .85);
  display: flex; align-items: center; justify-content: center; z-index: 72;
}
#dummy-modal.hidden { display: none; }
/* ② 档位选择弹窗（复用挂机弹窗的 map-modal-box 底座，只补四宫格样式） */
.dummy-sec { color: #e8c87a; margin: 6px 0 4px; }
.dummy-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dummy-cell {
  background: #1a140c; border: 1px solid #3a2e1a; border-radius: 4px;
  color: #d8c9a3; font-size: 12px; padding: 8px 0; cursor: pointer;
}
.dummy-cell.on { border-color: #c9a34c; color: #ffe23b; background: #2a1f10; }
.dummy-err { color: #ff7b6b; min-height: 14px; margin-top: 6px; font-size: 11px; }
.dummy-btns { display: flex; gap: 8px; margin-top: 4px; }


/* ===== v6.7.5 动态弹窗容器补漏（照 #afk-modal / #dummy-modal 范式）=====
   #daily-modal / #rep-vendor-modal / #bind-confirm-modal 均由 app.js createElement
   动态创建、初始 className="hidden"，但本文件从未给它们定容器规则 → 弹窗掉到
   页面文档流底部（Boss 2026-11-02 实测：日常按钮点了看不到任务列表，与 v6.6.x
   假人弹窗"看起来像没发生"同一病灶）。z-72 同挂机/假人弹窗，盖过其他 modal 的 62。 */
#daily-modal, #rep-vendor-modal, #bind-confirm-modal, #city-skills-modal, #rep-synth-modal, #dungeon-modal,
#enchant-use-confirm-modal, #prof-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, .85);
  display: flex; align-items: center; justify-content: center; z-index: 72;
}
/* v6.84.0（Boss m00002）：#smelt-modal（采矿训练师「熔炼」弹窗）建时即写容器——
   不再重演「新建静态弹窗漏容器 CSS → 弹窗掉文档流底部、点按钮看不到窗口」的坑 */
#smelt-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, .85);
  display: flex; align-items: center; justify-content: center; z-index: 72;
}
#smelt-close-btn { width: 28px; height: 28px; font-size: 16px; line-height: 1; color: #c9a24a; background: #2a1f10; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; }
#smelt-close-btn:active { background: #3a2a14; color: #ffe9b0; }
#daily-modal.hidden, #rep-vendor-modal.hidden, #bind-confirm-modal.hidden, #city-skills-modal.hidden, #dungeon-modal.hidden,
#rep-synth-modal.hidden, #enchant-use-confirm-modal.hidden, #prof-modal.hidden { display: none; }
/* v6.20.0 补漏（Boss m02358「点击了专业按钮后没有任何反应」）：#prof-modal 是
   templates/index.html 的静态容器，v6.11.0 建时只写了内部排版，从没进本组 →
   容器无定位无遮罩，弹窗掉在文档流最底部，手机看着就像按钮没反应。第四次同款坑
   （前三次 v2.87.0 #action-bar-modal / v6.7.5 #daily-modal / v6.7.39 #city-skills-modal）。 */
/* v6.8.0：#rep-synth-modal（残卷合成弹窗）建时即并入上组，不再重演 v6.7.5/v6.7.39 两次
   「动态弹窗漏容器 CSS → 点按钮看不到窗口」的坑。新建 createElement 弹窗一律先来这组加 id。 */
/* v6.7.39 补漏：#city-skills-modal（声望技能弹窗，v6.7.28 建）漏在 v6.7.5 名单外 →
   容器无定位无遮罩，点「声望技能」后弹窗掉到文档流底部（Boss 2026-11-03 实测
   「声望技能兑换点不开」，同 #daily-modal 病灶）。并入上组，z-72 同。 */

/* v6.707.0（Boss）：绑定确认/附魔确认是紧凑小框——.map-modal-box 默认 9:16 全屏底座
   （style.css:1016），确认框只装一行提示文字+确认/取消两个按钮，照 #trade-invite-modal
   范式压成内容自适应小框，不再整屏铺开 */
#bind-confirm-modal .map-modal-box,
#enchant-use-confirm-modal .map-modal-box,
#afk-settle-modal .map-modal-box,
#paladin-picker-modal .map-modal-box { width: min(320px, calc(100vw - 24px)); height: auto; max-height: calc(100vh - 24px); }


/* ============ v6.11.0 专业技能面板（手机窄屏两行排版，不加教学文字） ============ */
.prof-head-line { font-size: 12px; color: #c8c8c8; padding: 2px 2px 6px; }
.prof-head-line b { color: #ffe23b; }
/* v6.29.0（Boss m00948）：本图可采提示（草药/矿石），手机窄屏自动换行 */
.prof-map-hint { font-size: 12px; color: #b9d7ff; background: rgba(60,90,140,.18);
  border-radius: 4px; padding: 4px 6px; margin: 0 0 6px; line-height: 1.5; }
.prof-map-hint .prof-map-name { color: #8a8a8a; margin-right: 6px; }
.prof-map-hint .prof-map-row { margin-right: 8px; white-space: nowrap; }
.prof-map-hint .prof-map-row b { color: #9ad0a0; font-weight: normal; }
.prof-learn-btn { width: 100%; margin: 2px 0 8px; }
/* v6.21.0（Boss m02448）：主专业名额满时学习按钮置灰（状态直接看得出来，不用点了才报错） */
.prof-learn-btn:disabled { opacity: .45; }
/* v6.16.0（Boss m01705）：未学专业也能请训练师代工，代价一句话写在按钮下面（手机窄屏单行折行） */
.prof-svc-hint { font-size: 11px; color: #b8a77a; margin: -4px 2px 8px; line-height: 1.4; }
.prof-recipe-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.prof-recipe-row { border: 1px solid #3a3527; background: #1c1a14; border-radius: 4px; padding: 5px 6px; display: flex; align-items: center; gap: 6px; }
.prof-recipe-row.locked { opacity: .55; }
.prof-recipe-main { flex: 1; min-width: 0; }
.prof-recipe-name { font-size: 13px; color: #f0e6c8; }
.prof-recipe-name.q-blue { color: #4a9eff; }
.prof-recipe-name.q-purple { color: #c46bff; }
.prof-recipe-mats { font-size: 11px; color: #9a9a9a; margin-top: 2px; line-height: 1.35; word-break: break-all; }
.prof-recipe-mats.short { color: #e06a6a; }
/* v6.62.0（Boss m02615）：逐材料染色——够=绿、缺=红，删掉括号缺料文字 */
.prof-recipe-mats .mat-ok { color: #7fbf7f; }
.prof-recipe-mats .mat-lack { color: #e06a6a; }
.prof-recipe-lock-hint { font-size: 11px; color: #e4bd70; margin-top: 2px; line-height: 1.35; word-break: break-word; }
/* v6.1034.0（Boss m00009「烹饪配方好像也没有预览属性」）：配方行常驻成品效果
   （恢复 61 点生命；食用后耐力+2、精神+2，持续 15 分钟）——淡青色区别于材料行的灰/绿/红，
   手机端没有悬停，这行就是玩家唯一的「做出来有什么用」依据。 */
.prof-recipe-use { font-size: 11px; color: #8fb8cf; margin-top: 2px; line-height: 1.35; word-break: break-word; }
.prof-recipe-out { font-size: 11px; color: #8fd18f; margin-left: 4px; }
.prof-make-btn { flex: 0 0 auto; font-size: 12px; padding: 6px 8px; border-radius: 4px; border: 1px solid #6b5a2e; background: #2a2417; color: #ffe9b0; }
.prof-make-btn:disabled { opacity: .45; }
.prof-bag-list { display: flex; flex-wrap: wrap; gap: 4px; }
.prof-bag-item { font-size: 11px; color: #cfc9b4; background: #1c1a14; border: 1px solid #3a3527; border-radius: 3px; padding: 3px 5px; }
.prof-bag-count { color: #8a8a8a; font-weight: normal; }
.prof-empty { font-size: 12px; color: #8a8a8a; padding: 4px 2px; }

/* ============ v6.21.0 生活技能页（技能弹窗第三页签，Boss m02448）============
   手机窄屏 264px：一段一专业，段头一行放「专业名 + 主/副专业 + 遗忘」，
   下面直接排配方行（复用训练师面板的 .prof-recipe-*），末尾材料袋。 */
.prof-self-wrap { display: flex; flex-direction: column; gap: 8px; padding-bottom: 6px; }
.prof-sec { display: flex; flex-direction: column; }
.prof-sec-head { display: flex; align-items: center; gap: 6px; padding: 4px 2px 5px; border-bottom: 1px solid #3a2e1a; margin-bottom: 5px; }
.prof-sec-name { font-size: 13px; color: #ffe23b; font-weight: bold; }
.prof-sec-tag { font-size: 10px; color: #b8a77a; border: 1px solid #4a3d22; border-radius: 3px; padding: 1px 4px; }
.prof-forget-btn { margin-left: auto; flex: 0 0 auto; font-size: 11px; padding: 3px 7px; border-radius: 4px; border: 1px solid #5a2e2e; background: #2a1616; color: #e08a8a; }
.prof-sec .prof-recipe-row { margin-bottom: 4px; }



/* ============ v6.22.0 生活技能子菜单 + 材料袋入口（Boss m02694）============
   手机窄屏 264px：子菜单一行 2 个能放下（每个约 84px），最多 5 个自动换行，
   学几个显示几个；材料袋按钮固定在背包格子下方，点开列表在按钮下面。 */
.prof-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.prof-tab { font-size: 12px; padding: 4px 9px; border-radius: 4px; border: 1px solid #4a3d22;
  background: #221d12; color: #c9b48a; }
.prof-tab.active { border-color: #8a6f2e; background: #3a2f16; color: #ffe23b; font-weight: bold; }
.mat-bag-bar { display: flex; justify-content: space-between; align-items: center; padding: 2px 12px 8px; margin-top: 0; }
#mat-bag-btn, #bag-sell-all-btn { font-size: 12px; padding: 6px 10px; border-radius: 4px; border: 1px solid #5a4a33;
  background: #2a2417; color: #e0c98a; }
#mat-bag-btn.open { border-color: #8a6f2e; background: #3a2f16; color: #ffe23b; }
#mat-bag-panel { padding: 4px 12px 0; max-height: 200px; overflow-y: auto; }   /* v6.76.0 格子化：一排 ~44px，放宽到 4 排 */
.mat-bag-cap { font-size: 11px; color: #8a8a8a; margin-bottom: 4px; }
/* v6.76.0（Boss m00002）材料袋格子化：与背包 .bag-cell 同款，5 列适配 264px 手机窄屏 */
/* v6.113.0（Boss m00225）：分类标题占满一整行，窄屏不挤压材料格。 */
.mat-bag-grid { display: grid; grid-template-columns: repeat(5, minmax(44px, 1fr)); gap: 4px; }
.mat-bag-cat { grid-column: 1 / -1; font-size: 11px; line-height: 18px; color: #e0c98a; font-weight: bold; }
/* 拍卖上架页里的材料袋段（背包格下面追加，有可上架材料才显示） */
.auction-mat-sec { margin-top: 6px; }
.auction-mat-head { font-size: 11px; color: #8a8a8a; padding: 2px 2px 4px; }

/* ---- v6.215.0 福利页：看广告领奖励（Boss 需求） ---- */
.welfare-sec-title { margin-top: 10px; font-size: 12px; font-weight: bold; color: #e0c98a; text-align: left; padding: 0 2px; }
.ad-list { margin-top: 6px; display: flex; flex-direction: column; gap: 5px; }
.ad-cell { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.04); border: 1px solid rgba(224,201,138,0.22); border-radius: 6px; padding: 6px 8px; }
.ad-cell span { flex: 1; font-size: 12px; color: #f0e6d2; text-align: left; }
.ad-cell em { font-size: 10px; color: #8a8a8a; font-style: normal; white-space: nowrap; }
.ad-cell.ad-cell-done { opacity: 0.55; }
.ad-cell.ad-cell-locked { opacity: 0.5; }
.ad-cell.ad-cell-locked em { color: #b06a4a; }
.ad-claim-btn { padding: 4px 10px; font-size: 11px; border-radius: 5px; border: 1px solid #7a5c2e; background: #3a2f1a; color: #ffe23b; }
.ad-claim-btn:disabled { color: #6a6a6a; border-color: #444; background: #222; }
.ad-tip { margin-top: 4px; font-size: 10px; color: #8a8a8a; text-align: left; }
.welfare-cell i { display: block; font-size: 8px; color: #7ec8ff; font-style: normal; line-height: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ v6.219.0 幸运 5+1 彩票面板（手机窄屏优先：Boss 用户可用宽约 264px）============
   定位照 #npc-bank-modal 范式：fixed 全屏遮罩 + 居中 + .hidden 隐藏；z-index 与现有弹窗一致（60） */
.lottery-panel { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 60; }
.lottery-panel.hidden { display: none; }
.lottery-box { width: min(calc(100vw - 12px), 280px); max-height: calc(100vh - 12px); background: #120f0a; border: 2px solid #6b4a1c; border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; }
.lottery-box .map-modal-head { padding: 8px 10px; }
#lottery-close-btn { width: 28px; height: 28px; font-size: 16px; line-height: 1; color: #c9a24a; background: #2a1f10; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; flex: 0 0 auto; }
#lottery-close-btn:active { background: #3a2a14; color: #ffe9b0; }
.lottery-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px; font-size: 12px; color: #d8c8a0; }
.lottery-notice { margin: 0 0 6px; padding: 5px 8px; border-radius: 4px; font-size: 12px; line-height: 1.4; }
.lottery-notice.lot-ok { background: #143014; border: 1px solid #2e6b2e; color: #7ce07c; }
.lottery-notice.lot-err { background: #331414; border: 1px solid #6b2e2e; color: #e07c7c; }
.lottery-sec { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #2a2114; }
.lottery-sec:last-child { border-bottom: none; margin-bottom: 0; }
.lottery-sec-title { color: #c9a24a; font-size: 12px; font-weight: bold; margin-bottom: 4px; }
.lottery-strong { color: #ffe9b0; font-size: 13px; font-weight: bold; }
.lottery-line { font-size: 12px; line-height: 1.5; }
.lottery-dim { color: #8a7a5a; font-size: 12px; line-height: 1.5; }
/* 号池：普通号五列、特别号四列；264px 下五列每列 ≈46px，1fr 均分保证不溢出 */
.lottery-grid { display: grid; gap: 3px; margin-bottom: 5px; }
.lot-grid-normal { grid-template-columns: repeat(5, 1fr); }
.lot-grid-special { grid-template-columns: repeat(4, 1fr); }
.lottery-num { width: 100%; height: 34px; font-size: 13px; color: #e8c87a; background: #1a140c; border: 1px solid #4a3a1c; border-radius: 4px; cursor: pointer; padding: 0; }
.lottery-num.sel { background: #3a2a10; color: #ffe9b0; font-weight: bold; border-color: #c9a24a; }
.lottery-num:active { background: #4a3416; }
.lottery-btns { display: flex; gap: 6px; margin-top: 6px; }
.lottery-btn { flex: 1; padding: 7px 0; font-size: 12px; color: #e8c87a; background: #2a1f10; border: 1px solid #5a4a33; border-radius: 4px; cursor: pointer; }
.lottery-btn:active { background: #3a2a14; }
.lottery-buy-btn { width: 100%; margin-top: 6px; padding: 9px 0; font-size: 13px; font-weight: bold; color: #ffe9b0; background: #6b4a1c; border: 1px solid #8a6a2c; border-radius: 4px; cursor: pointer; }
.lottery-buy-btn:disabled { opacity: .45; cursor: not-allowed; }
.lottery-claim-btn { width: 100%; margin-top: 6px; padding: 8px 0; font-size: 12px; font-weight: bold; color: #ffe9b0; background: #1c4a1c; border: 1px solid #2e6b2e; border-radius: 4px; cursor: pointer; }
.lottery-claim-btn:active { background: #2a5f2a; }
.lottery-prize-row { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; line-height: 1.6; }
.lottery-prize-row b { color: #ffe9b0; flex: 0 0 auto; }
.lottery-prize-row span { color: #8a7a5a; text-align: right; }

/* ===== v6.226.0 隐私合规弹窗（首次进主界面）+ 看广告复活按钮 =====
   手机窄屏优先：max-width 340px、内边距 16px，实际可用宽约 264px 时按钮两列仍放得下。 */
#privacy-modal, #policy-modal {
  position: fixed; inset: 0; z-index: 99990;
  background: rgba(0, 0, 0, 0.72);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; box-sizing: border-box;
}
#privacy-modal.hidden, #policy-modal.hidden { display: none; }
.privacy-modal-box {
  width: 100%; max-width: 340px; box-sizing: border-box;
  background: #1c1810; border: 1px solid #6b5636; border-radius: 10px;
  padding: 16px 14px; color: #e8dcc0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}
.privacy-modal-title {
  font-size: 16px; font-weight: bold; color: #ffd966;
  text-align: center; margin-bottom: 10px;
}
.privacy-modal-text { font-size: 13px; line-height: 1.75; color: #d8cbaa; }
.privacy-modal-links { margin: 10px 0 14px; text-align: center; font-size: 13px; }
.privacy-modal-links a { color: #7fc4ff; text-decoration: underline; }
.privacy-modal-btns { display: flex; gap: 10px; }
.privacy-btn {
  flex: 1; padding: 10px 0; border-radius: 6px; font-size: 14px;
  border: 1px solid #6b5636; background: #2a2318; color: #e8dcc0;
}
.privacy-btn-agree {
  background: #8a6a2f; border-color: #c9a24a; color: #fff8e1; font-weight: bold;
}
.privacy-modal-tip {
  margin-top: 10px; font-size: 11px; color: #a89a7c;
  text-align: center; line-height: 1.5;
}
.policy-modal-box { max-height: 82vh; display: flex; flex-direction: column; }
.policy-modal-text {
  overflow-y: auto; max-height: 58vh;
  font-size: 12.5px; line-height: 1.75; color: #d8cbaa;
  -webkit-overflow-scrolling: touch;
}
.policy-modal-text p { margin: 0 0 8px; }
#policy-modal .privacy-modal-btns { margin-top: 12px; }

/* 死亡弹窗第三按钮：观看广告复活（蓝色，与回城复活的金色区分） */
.death-modal-btn-ad { background: #2f5d8a; border-color: #4d8ec4; color: #eaf4ff; }

/* v6.612.0 任务提交成功回执浮层：顶部居中亮黄金字，2.8s 自动淡出（防聊天栏刷掉经验感知） */
#quest-done-toast {
  position: fixed;
  top: 12%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  max-width: 86vw;
  padding: 10px 16px;
  background: rgba(20, 16, 8, 0.92);
  border: 1px solid #c8a94e;
  border-radius: 8px;
  color: #ffe23b;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
#quest-done-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
