/* =========================================================
   boss.css —— 怪物系统（08）
   左侧 BOSS 信息与技能，右侧立绘（与宝宝屏镜像）
   依赖：styles.css 的 .eyebrow / .section-shell 等基础件
   ========================================================= */

.bosses { background: transparent; }

.boss-stage {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 58px;
  align-items: center;
}

/* —— 左：信息 —— */
.boss-info { min-width: 0; }

.boss-info .eyebrow { margin: 0 0 12px; }

.boss-name {
  margin: 0 0 8px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.boss-name span {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: .06em;
  color: #F1ECE2;
}

.boss-name em {
  font-style: normal;
  font-size: 11.5px;
  letter-spacing: .3em;
  color: #867F74;
}

.boss-zone {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  letter-spacing: .18em;
  color: #BBA174;
}

.boss-zone i {
  width: 3px;
  height: 3px;
  background: #A52833;
  transform: rotate(45deg);
}

.boss-zone b {
  font-weight: 400;
  font-size: 12px;
  letter-spacing: .16em;
  color: #8E877C;
}

/* 地名挪进下面那三格之后，这一行只剩「门 + 类型」，
   第一个（门）用旧金提一下，别让整行都是灰的 */
.boss-zone b:first-child {
  font-size: 12.5px;
  letter-spacing: .18em;
  color: #BBA174;
}

.boss-desc {
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.95;
  color: #B2AEA4;
  max-width: 36em;
}

/* 三格关键数值：轻，只做信息，不抢技能的戏 */
.boss-stats {
  display: flex;
  margin: 0 0 20px;
  border-top: 1px solid rgba(196, 176, 137, .14);
  border-bottom: 1px solid rgba(196, 176, 137, .14);
}

.boss-stats div {
  flex: 1;
  padding: 9px 0 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

/* 「地图」那格的值是四个汉字（封魂山谷），等分的话会顶到下一格的分隔线上 */
.boss-stats div:nth-child(1) { flex: 1.16; }
.boss-stats div:nth-child(2) { flex: .92; }

.boss-stats div + div { padding-left: 18px; border-left: 1px solid rgba(196, 176, 137, .1); }

.boss-stats em {
  font-style: normal;
  font-size: 11.5px;
  letter-spacing: .14em;
  color: #8E877C;
}

.boss-stats b {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .02em;
  color: #D8C7A6;
}

/* —— 技能 —— */
.boss-skill-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 10px;
}

.boss-skill-head span {
  font-size: 11.5px;
  letter-spacing: .22em;
  color: #8E877C;
}

.boss-skill-head em {
  font-style: normal;
  font-family: Georgia, serif;
  font-size: 12.5px;
  color: #A52833;
  letter-spacing: .06em;
}

.boss-skills {
  list-style: none;
  margin: 0;
  padding: 0;
}

.boss-skill {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid rgba(196, 176, 137, .12);
}

.boss-skill:last-child { border-bottom: 1px solid rgba(196, 176, 137, .12); }

.boss-skill-no {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13.5px;
  line-height: 1.5;
  letter-spacing: .04em;
  color: #A52833;
  opacity: .85;
  align-self: start;
}

.boss-skill h4 {
  margin: 0 0 5px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .08em;
  color: #EDE7DB;
}

.boss-skill h4 em {
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: .16em;
  color: #8E877C;
  border: 1px solid rgba(196, 176, 137, .22);
  padding: 1px 6px;
  transform: translateY(-1px);
}

.boss-skill p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #A29E95;
}

/* —— 右：立绘 —— */
.boss-art {
  position: relative;
  height: min(620px, calc(100svh - 232px));
  display: flex;
  align-items: center;
  justify-content: center;
}

.boss-halo {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 42%, rgba(165, 40, 51, .16), rgba(165, 40, 51, .035) 46%, transparent 70%);
  pointer-events: none;
}

.boss-art::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 8%;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, .62), transparent 72%);
  filter: blur(8px);
  pointer-events: none;
}

/* 切换条压在立绘下沿（金刚的脚趾、灭世的爪尖正好在那儿），
   所以底部先垫一层渐隐，图往页面底色里收，标签就不会穿在身上 */
.boss-art::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 92px;
  z-index: 2;
  background: linear-gradient(180deg, transparent, rgba(8, 10, 12, .62) 55%, rgba(8, 10, 12, .92));
  pointer-events: none;
}

.boss-portrait {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* 三张新立绘都是 1254² 透明 PNG 导的 webp，明度已在导出时逐张对齐
     （毛皮 50 / 骸骨 69 / 熔火 47），这里不再叠 CSS 滤镜，
     否则 theme.css 里与立绘共用的 contrast/brightness 会把它二次推偏 */
  opacity: 0;
  visibility: hidden;
  transition: opacity .42s ease, visibility .42s;
  pointer-events: none;
}

.boss-portrait.active { opacity: 1; visibility: visible; }

/* —— 切换 —— */
.boss-switch {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  gap: 2px;
}

.boss-tab {
  appearance: none;
  background: none;
  border: 0;
  border-top: 1px solid rgba(196, 176, 137, .18);
  color: #7B8280;
  font: inherit;
  padding: 9px 16px 3px;
  display: flex;
  align-items: baseline;
  gap: 9px;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}

.boss-tab b {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .04em;
  color: #8E877C;
  transition: color .2s;
}

.boss-tab span { font-size: 14px; letter-spacing: .1em; }
.boss-tab:hover { color: #E9E4D9; }
.boss-tab.active { color: #F1ECE2; border-top-color: #A52833; }
.boss-tab.active b { color: #D1434E; }
.boss-tab:focus-visible { outline: 1px solid rgba(211, 67, 78, .6); outline-offset: 2px; }

/* —— 1024–1199 —— */
@media (min-width: 1024px) and (max-width: 1199px) {
  .boss-stage { gap: 40px; }
  .boss-name span { font-size: 30px; }
}

/* —— 矮屏：左栏要在一屏里收完 —— */
@media (min-width: 1024px) and (max-height: 840px) {
  .boss-name span { font-size: 30px; }
  .boss-name { margin-bottom: 6px; }
  .boss-zone { margin-bottom: 9px; }
  .boss-desc { margin-bottom: 12px; font-size: 14px; line-height: 1.8; }
  .boss-stats { margin-bottom: 14px; }
  .boss-stats div { padding: 7px 0 6px; }
  .boss-skill { padding: 8px 0; }
  .boss-skill h4 { font-size: 15px; margin-bottom: 4px; }
  .boss-skill p { font-size: 12.5px; line-height: 1.6; }
}

@media (min-width: 1024px) and (max-height: 760px) {
  .boss-info .eyebrow { margin-bottom: 6px; }
  .boss-name span { font-size: 26px; }
  .boss-desc { font-size: 13.5px; line-height: 1.75; margin-bottom: 9px; }
  .boss-stats { margin-bottom: 10px; }
  .boss-skill { padding: 6px 0; }
  .boss-skill-head { margin-bottom: 6px; }
}

/* —— <1024：立绘在上、信息在下 —— */
@media (max-width: 1023px) {
  .boss-stage { grid-template-columns: 1fr; gap: 24px; }
  .boss-art { height: 360px; order: -1; }
  .boss-portrait { inset: 0; height: calc(100% - 40px); }
  .boss-switch { right: 50%; transform: translateX(50%); }
  .boss-name span { font-size: 28px; }
}

@media (max-width: 560px) {
  .boss-art { height: 300px; }
  .boss-skill { grid-template-columns: 26px minmax(0, 1fr); gap: 11px; }
  .boss-stats div + div { padding-left: 12px; }
  /* 三个标签在 390 里按原来的内边距会被挤成两行（01 墨 / 尘），收一档并锁死不断行 */
  .boss-switch { right: 0; left: 0; transform: none; justify-content: center; }
  .boss-tab { padding: 8px 10px 2px; gap: 6px; }
  .boss-tab span { font-size: 13.5px; white-space: nowrap; }
  .boss-tab b { font-size: 11px; }
}

/* =========================================================
   V2 —— 换将后（金刚 / 裂骨 / 灭世）左栏在高屏刚好，
   1024×700 这类窄矮屏会顶到视口底（实测信息栏底 697.1，只剩 3px）。
   窄 + 矮同时成立才收，单窄（1199×900）和单矮（1366×768）都不动。
   ========================================================= */
@media (min-width: 1024px) and (max-width: 1199px) and (max-height: 760px) {
  .boss-desc { line-height: 1.62; margin-bottom: 7px; }
  .boss-stats { margin-bottom: 8px; }
  .boss-stats div { padding: 5px 0; }
  .boss-skill { padding: 5px 0; }
  .boss-skill h4 { margin-bottom: 3px; }
  .boss-skill p { line-height: 1.52; }
}
