/* ============ 装备详情弹窗（2026-09-05 新增）============ */
#equip-detail-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;   /* v6.7.54：原 70 被子窗口场景打回——本文件在 index.html 里加载于 style.css 之后，会覆盖那边的值；军需官清单 #rep-vendor-modal 是 72，详情层必须更高才看得见 */
}
#equip-detail-modal.hidden {
  display: none;
}
.equip-detail-box {
  /* v6.8.3 Boss 需求（2026-11-03）：弹窗高度按内容自适应
     —— 原来固定 9:16 竖版（高度恒等于满屏），两行字的药水也几乎占满手机屏；
     现在 height:auto = 内容自然高度（名称/属性/按钮几行就多高），
     内容多时才长到 max-height 上限，超过上限仍由 #equip-detail-content 内部滚动，
     按钮区照旧贴盒底。宽度不动（手机=整屏宽，按钮多需要宽度）。 */
  width: min(calc(100vw - 12px), calc((100vh - 12px) * 9 / 16));
  height: auto;
  max-width: none;
  position: relative;
  background: #1a140c;
  border: 2px solid #6b4a1c;
  border-radius: 8px;
  /* v4.9.1：纵向 flex——内容多时 #equip-detail-content 内部滚动，
     按钮区 #equip-detail-actions 固定盒底，手机端永远点得到（原先无限高+overflow:hidden，
     长内容直接顶出屏幕、按钮被裁掉点不到）。
     v6.8.3：max-height 由 none 改为「原来的满屏高度上限」——高度自适应后必须留这个天花板，
     否则超长内容（套装 8 档 + 描述）会把盒撑出屏幕、展开滚动失效。 */
  max-height: min(calc(100vh - 12px), calc((100vw - 12px) * 16 / 9));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* v4.9.1：滚动内容区（属性/词条/套装/描述都在这里面滚） */
#equip-detail-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
/* v4.9.1：固定按钮区——不参与滚动，始终贴盒底 */
#equip-detail-actions {
  flex: 0 0 auto;
  border-top: 1px solid #2a2114;
  padding: 10px 14px;
}
/* Boss 定案（v5.1.68）：详情弹窗的 ✕ 固定在右上角（✕ 恒为按钮区最后一个按钮，
   绝对定位到 .equip-detail-box 右上；头部右侧让位见 .equip-detail-header） */
#equip-detail-actions .ed-btn:last-child {
  position: absolute; right: 10px; top: 10px; z-index: 80;
}
/* 头部：品质色边框 + 名称 + 槽位 */
.equip-detail-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 44px 12px 14px; /* 右内边距 44px：右上角固定关闭键让位 */
  border-bottom: 2px solid;
  background: #241c10;
}
.equip-quality {
  font-size: 12px;
  font-weight: bold;
}
.equip-name {
  flex: 1;
  font-size: 16px;
  font-weight: bold;
  color: #ffe9b0;
}
.equip-slot {
  font-size: 11px;
  color: #8a7a5c;
  background: #2a2a2a;
  padding: 2px 6px;
  border-radius: 3px;
}
/* 主体：属性 + 描述 */
.equip-detail-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* 属性行 */
.equip-prop {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.prop-label {
  color: #8a7a5c;
  width: 60px;
  flex-shrink: 0;
}
.prop-val {
  color: #ffe9b0;
  font-weight: bold;
}
.prop-tag {
  font-size: 10px;
  color: #ff8000;
  background: #2a1f10;
  padding: 2px 6px;
  border-radius: 2px;
  margin-left: auto;
}
/* 属性加成网格 */
.equip-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  background: #241c10;
  border-radius: 4px;
  border: 1px solid #3a2e1a;
}
.equip-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}
.stat-label {
  color: #b89a5c;
}
.stat-val.pos {
  color: #7ddf6b;
  font-weight: bold;
}
.stat-val.neg {
  color: #ff6b6b;
}
/* 描述文字 */
.equip-desc {
  font-size: 12px;
  color: #8a7a5c;
  line-height: 1.5;
  font-style: italic;
  padding: 8px;
  background: #14110c;
  border-radius: 4px;
  border-left: 3px solid #6b4a1c;
}
/* 标签（盾牌等） */
.equip-tag {
  display: inline-block;
  font-size: 11px;
  color: #c9a24a;
  background: #2a2a14;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid #4a3a1c;
}
/* 底部按钮区 */
.equip-detail-footer {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #2a2114;
  background: #1a140c;
}
.equip-btn {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  font-family: inherit;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.equip-equip-btn {
  background: linear-gradient(180deg, #3a5020, #2a3c10);
  color: #7ddf6b;
  border: 1px solid #4a6a2c;
}
.equip-equip-btn:hover {
  background: linear-gradient(180deg, #4a6c28, #3a5018);
  color: #a0ff8a;
}
.equip-sell-btn {
  background: linear-gradient(180deg, #502020, #3c1010);
  color: #ff8866;
  border: 1px solid #6a2c2c;
}
.equip-sell-btn:hover {
  background: linear-gradient(180deg, #6c2828, #501818);
  color: #ffaaaa;
}

/* ============ 背包装备格样式（2026-09-05 新增）============ */
/* 装备格：品质颜色边框 + 发光效果 */
.bag-cell.bag-equip {
  border-width: 2px;
  background: #1a140c;
}
.bag-cell.bag-equip:hover {
  background: #241c10;
  transform: scale(1.05);
  transition: all 0.15s;
}
/* 装备图标：稍大一些 */
.bag-item-icon {
  font-size: 24px;
  line-height: 1;
}
/* 装备名称：小字，品质颜色 */
.bag-item-name {
  position: absolute;
  bottom: 2px;
  left: 4px;
  right: 4px;
  font-size: 9px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ v5.1.11：已实装特效行（proc/使用型，desc 剥离后单独显示）============ */
/* 金绿色、左侧竖条——与属性绿字区分开，醒目但不刺眼（手机端可读） */
.equip-detail-effect {
  margin: 6px 0 2px;
  padding: 5px 8px;
  border-left: 3px solid #ffd100;
  background: rgba(255, 209, 0, .08);
  color: #ffe23b;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 0 4px 4px 0;
  /* v6.1055.0 骨火双特效文案用 \n 分隔两句，保留换行显示 */
  white-space: pre-line;
}
