/*
 * EnemyCodex.css —— 敌人图鉴的差异样式。
 * 窗口 / 格子 / 详情这些骨架类复用 GeneralCodex.css 的 general-codex-*，
 * 这里只补 overlay 根节点（ID 不同拿不到那份）与敌人特有的排版。
 */
#enemy-codex-overlay {
  --general-codex-scale: 1;
  position: fixed;
  z-index: 100016;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  background: rgba(24, 17, 12, 0.72);
  color: #3a2519;
  font-family: "STKaiti", "KaiTi", "Kaiti SC", serif;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

#enemy-codex-overlay.is-visible { display: flex; }
#enemy-codex-overlay * { box-sizing: border-box; letter-spacing: 0; }

/* 印章换成墨绿，跟武将图鉴的朱红区分开 */
.enemy-codex-seal {
  border-color: #23331f;
  background: #54683f;
  color: #f2f7e8;
}

.enemy-codex-grid {
  grid-template-columns: repeat(4, 1fr);
}

.enemy-codex-cell {
  padding: 8px 4px 8px;
}

.enemy-codex-cell-tag {
  max-width: 100%;
  margin-top: 2px;
  overflow: hidden;
  color: #8a5a3a;
  font-size: 13px;
  font-style: normal;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 小怪的 png 是 80×80 方图，别按武将的 72×90 竖图摆，否则底部留白 */
.enemy-codex-art-pic {
  align-items: center;
}

.general-codex-thumb.enemy-codex-art-pic {
  width: 72px;
  height: 72px;
}

.enemy-codex-art-pic img {
  image-rendering: -webkit-optimize-contrast;
}

/* 小怪的原始贴图只有 80×80，共享样式只给了 max-width（不放大），详情里会缩成一小块 */
.enemy-codex-detail .enemy-codex-art-pic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 小怪的图是 80×80 方图，详情别再按武将立绘的 160×220 竖框摆，两侧留白太丑 */
.enemy-codex-detail .general-codex-detail-art.enemy-codex-art-pic {
  width: 168px;
  height: 168px;
  margin-bottom: 14px;
}

.enemy-codex-detail {
  text-align: center;
}

/* 字贴图自带纸面质感，别再套一层灰底（武将图鉴是给立绘垫底的） */
.enemy-codex-detail .general-codex-detail-art {
  background: transparent;
}

.enemy-codex-sub {
  margin: -4px 0 12px;
  color: #8a5a3a;
  font-size: 18px;
  text-align: center !important;
}

.enemy-codex-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px;
  border: 2px solid rgba(75, 43, 29, 0.22);
  border-radius: 8px;
  background: rgba(255, 244, 214, 0.6);
}

.enemy-codex-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.enemy-codex-stats dt {
  color: #8a5a3a;
  font-size: 16px;
  line-height: 1.2;
}

.enemy-codex-stats dd {
  margin: 0;
  color: #3f271b;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.enemy-codex-hint {
  display: block;
  margin-top: 2px;
  color: #a08a7c;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
}

.enemy-codex-skill {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 4px solid #a94435;
  border-radius: 6px;
  background: rgba(169, 68, 53, 0.1);
  text-align: left;
}

.enemy-codex-skill b {
  display: block;
  margin-bottom: 4px;
  color: #a94435;
  font-size: 21px;
}

.enemy-codex-skill p {
  margin: 0;
  font-size: 19px;
  line-height: 1.4;
}

.enemy-codex-note {
  margin: 0 0 8px;
  color: #4b2b1d;
  font-size: 18px;
  line-height: 1.45;
  text-align: left;
}

.enemy-codex-note-quiet {
  color: #9a8574;
  font-size: 15px;
}

.enemy-codex-foot {
  margin: 10px 6px 0;
  color: #8a5a3a;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
}

.enemy-codex-empty {
  grid-column: 1 / -1;
  margin: 24px 0;
  color: #8a5a3a;
  font-size: 18px;
  text-align: center;
}
