/* ===================================================================
   style-battle.css — 战斗界面官方风格改版（2026-11-20 test 分支）
   -------------------------------------------------------------------
   深空星云背景 + 3D 悬浮立绘卡牌（敌上我下）+ 磨砂面板。
   作用域 .battle-view；加载顺序在 style-ui.css 之后，同特异性规则
   以本文件为准（覆盖旧卡片/行动条/日志/横幅样式）。
   =================================================================== */

/* ==== 外壳 ==== */
.stage.view-battle { overflow: hidden; padding-bottom: 0; }
.stage.view-battle > .battle-view { flex: 1 1 auto; min-height: 0; }
.battle-view {
  position: relative;
  display: flex; flex-direction: column; flex-wrap: nowrap; gap: 8px;
  padding: 10px 14px 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #0d0e1e 0%, #181a34 46%, #1f2140 100%);
  color: #e9e9f8;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --bv-line: rgba(190, 205, 255, .14);
  --bv-panel: rgba(22, 26, 52, .7);
  --bv-cyan: #62d8f0;
  --bv-gold: #e7c46a;
}

/* ==== 深空背景 ==== */
.bv-space { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.bv-neb { position: absolute; border-radius: 50%; filter: blur(76px); opacity: .68; }
.bv-neb.n1 { width: 66vw; height: 52vh; left: 6vw; top: -18vh;
  background: radial-gradient(circle, rgba(96, 76, 208, .5), transparent 70%); }
.bv-neb.n2 { width: 54vw; height: 46vh; right: -8vw; top: 16vh;
  background: radial-gradient(circle, rgba(64, 108, 214, .4), transparent 70%); }
.bv-neb.n3 { width: 62vw; height: 42vh; left: -6vw; bottom: -14vh;
  background: radial-gradient(circle, rgba(140, 90, 220, .3), transparent 72%); }
.bv-stars { position: absolute; inset: 0; }
.bv-stars i {
  position: absolute; border-radius: 50%; background: #fff;
  animation: bv-twinkle 5s ease-in-out infinite;
}
@keyframes bv-twinkle {
  0%, 100% { opacity: .12; transform: scale(.8); }
  50% { opacity: .8; transform: scale(1); }
}
.bv-horizon {
  position: absolute; left: 0; right: 0; bottom: 12%; height: 30%;
  background: radial-gradient(ellipse at 50% 100%, rgba(120, 130, 240, .22), transparent 68%);
  filter: blur(14px);
}

/* ==== 顶部关卡信息栏 ==== */
.bv-top {
  position: relative; z-index: 6; flex: 0 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 7px 16px;
  background: var(--bv-panel);
  border: 1px solid var(--bv-line); border-radius: 14px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.bv-sp { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.bv-sp-label { font-size: 11px; color: #a9b0d8; letter-spacing: 2px; }
.battle-view .sp-dots { gap: 5px; }
.battle-view .sp-dot {
  width: 11px; height: 11px;
  border-color: rgba(190, 205, 255, .4);
  background: rgba(255, 255, 255, .05);
}
.battle-view .sp-dot.on {
  background: var(--bv-gold); border-color: var(--bv-gold);
  box-shadow: 0 0 8px rgba(231, 196, 106, .7);
}
.bv-sp-num { font-size: 15px; color: #fff; font-variant-numeric: tabular-nums; }
.bv-stage {
  flex: 1 1 auto; text-align: center; min-width: 0;
  font-size: 16px; font-weight: 600; letter-spacing: 2px; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 0 18px rgba(120, 130, 240, .5);
}
.battle-view .battle-mode { margin: 0; padding: 0; border: 0; background: none; }
.battle-view .battle-mode.universe { color: #b9e0ff; text-shadow: 0 0 18px rgba(120, 180, 235, .6); }
.bv-rule {
  flex: 0 0 auto; font-size: 12px; color: #8f97c2; letter-spacing: 1px;
  white-space: nowrap;
}

/* ==== 主区：左行动条 + 战场 ==== */
.bv-main {
  position: relative; z-index: 4; flex: 1 1 auto; min-height: 0;
  display: flex; gap: 12px;
}

/* ---- 左侧行动条（垂直） ---- */
.bv-turn {
  flex: 0 0 76px; width: 76px; min-height: 0;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 10px 6px;
  overflow-y: auto; overflow-x: hidden;
  background: var(--bv-panel);
  border: 1px solid var(--bv-line); border-radius: 14px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
  scrollbar-width: none;
}
.bv-turn::-webkit-scrollbar { display: none; }
.bv-turn::before {
  content: "行动顺序"; font-size: 10px; letter-spacing: 2px; color: #8f97c2;
  padding-bottom: 4px; border-bottom: 1px solid rgba(190, 205, 255, .12);
  width: 100%; text-align: center;
}
.battle-view .av-node {
  flex: 0 0 auto; gap: 4px;
}
.battle-view .av-face-wrap {
  width: 44px; height: 44px; padding: 0;
  border-radius: 50%; overflow: hidden; position: relative;
  border: 1.5px solid rgba(190, 205, 255, .3);
  background: rgba(255, 255, 255, .05);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.battle-view .av-face { width: 100%; height: 100%; object-fit: cover; }
.battle-view .av-face-enemy { object-fit: contain; padding: 6px; }
.battle-view .av-node.ally .av-face-wrap { border-color: rgba(110, 150, 230, .55); }
.battle-view .av-node.enemy .av-face-wrap { border-color: rgba(220, 110, 110, .55); }
.battle-view .av-node.acting .av-face-wrap {
  border-color: var(--bv-cyan);
  box-shadow: 0 0 0 2px rgba(98, 216, 240, .4), 0 0 16px rgba(98, 216, 240, .55);
  transform: scale(1.1);
}
.battle-view .av-node.lead .av-face-wrap {
  border-color: var(--bv-gold);
  box-shadow: 0 0 0 2px rgba(231, 196, 106, .35), 0 0 14px rgba(231, 196, 106, .45);
}
.battle-view .av-cap {
  max-width: 64px; font-size: 9.5px; color: #a9b0d8; letter-spacing: .5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.battle-view .av-node.acting .av-cap { color: var(--bv-cyan); }
.battle-view .av-node.lead .av-cap { color: var(--bv-gold); }
.battle-view .av-ult, .battle-view .av-broken, .battle-view .av-next {
  position: absolute; z-index: 2; border-radius: 3px; padding: 0 3px;
  font-size: 8.5px; line-height: 13px; font-style: normal;
}
.battle-view .av-ult { top: -4px; right: -4px; color: #1a1408; background: var(--bv-gold); }
.battle-view .av-broken { bottom: -4px; left: -4px; color: #fff; background: rgba(90, 90, 110, .9); }
.battle-view .av-next {
  top: -10px; left: 50%; transform: translateX(-50%);
  color: #1a1408; background: var(--bv-gold); font-weight: 700;
}

/* ---- 战场 ---- */
.bv-field {
  flex: 1 1 auto; min-width: 0; min-height: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 8px;
}
.bv-row { display: flex; flex-direction: column; min-height: 0; }
.bv-row-title {
  flex: 0 0 auto; font-size: 10.5px; color: #8f97c2; letter-spacing: 3px;
  padding: 0 4px 4px;
}
.bv-row-cards {
  flex: 1 1 auto; min-height: 0;
  display: flex; align-items: flex-end; justify-content: center;
  gap: clamp(10px, 3vw, 56px);
}
.enemy-row .bv-row-cards { align-items: flex-start; }

/* ===================================================================
   3D 悬浮立绘卡牌（敌我通用）
   =================================================================== */
.battle-view .unit {
  position: relative;
  flex: 0 1 auto; max-width: 300px; min-width: 0;
  display: flex; flex-direction: column; align-items: center;
  background: none; border: 0; padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .25s ease, filter .25s ease;
}
.battle-view .unit.ally { width: clamp(200px, 24vw, 292px); }
.battle-view .unit.enemy { width: clamp(168px, 20vw, 246px); }

/* ---- 立绘舞台 ---- */
.uc-stage {
  position: relative; width: 100%;
  display: flex; align-items: flex-end; justify-content: center;
  pointer-events: none;
}
.battle-view .unit.ally .uc-stage { height: clamp(120px, 16.5vw, 208px); }
.battle-view .unit.enemy .uc-stage { height: clamp(96px, 12.5vw, 156px); }
.uc-halo {
  position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%);
  width: 72%; height: 26px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(138, 135, 158, .4), transparent 70%);
  background: radial-gradient(ellipse, color-mix(in srgb, var(--el, #8a879e) 42%, transparent), transparent 70%);
  filter: blur(7px);
  transition: opacity .2s ease, box-shadow .2s ease;
}
.uc-shadow {
  position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%);
  width: 46%; height: 10px; border-radius: 50%;
  background: rgba(0, 0, 0, .45); filter: blur(4px);
}
.uc-art {
  position: relative; z-index: 2;
  max-width: 88%; max-height: 100%;
  width: auto; height: auto; object-fit: contain; object-position: bottom;
  /* 官方立绘带场景底：径向蒙版把边缘羽化，与星空自然融合，呈现「从卡座站立」感 */
  -webkit-mask-image: radial-gradient(ellipse 70% 84% at 50% 56%, #000 44%, transparent 84%);
  mask-image: radial-gradient(ellipse 70% 84% at 50% 56%, #000 44%, transparent 84%);
  transition: transform .25s ease, filter .25s ease;
}
.uc-art-el {
  max-width: 64%; max-height: 82%;
  padding: 10px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(30, 34, 66, .9), rgba(16, 18, 38, .92));
  background: radial-gradient(circle at 50% 40%,
    color-mix(in srgb, var(--el, #8a879e) 30%, rgba(30, 34, 66, .9)),
    rgba(16, 18, 38, .92));
  border: 1px solid rgba(138, 135, 158, .55);
  border-color: color-mix(in srgb, var(--el, #8a879e) 55%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--el, #8a879e) 35%, transparent),
    inset 0 0 18px rgba(255, 255, 255, .04);
}

/* ---- 卡牌底座 ---- */
/* 卡牌底座：透视倾斜（平放在地面上的立体卡），敌俯视/我仰视 */
.uc-base {
  position: relative; z-index: 3;
  width: 100%;
  display: flex; flex-direction: column; gap: 4px;
  padding: 8px 11px 8px;
  border-radius: 12px;
  transform: perspective(760px) rotateX(10deg);
  transform-origin: 50% 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015)),
    var(--bv-panel);
  border: 1px solid var(--bv-line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  /* 0 8px 0 = 卡牌厚度；其余为落地投影 */
  box-shadow: 0 8px 0 rgba(12, 16, 36, .55), 0 24px 44px rgba(0, 0, 0, .5),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.battle-view .unit.enemy .uc-base {
  border-radius: 11px; padding: 7px 10px 7px;
  transform: perspective(760px) rotateX(14deg) scale(.97);
  transform-origin: 50% 0%;
  box-shadow: 0 7px 0 rgba(12, 16, 36, .5), 0 18px 34px rgba(0, 0, 0, .45),
    inset 0 1px 0 rgba(255, 255, 255, .06);
}
.battle-view .unit.acting .uc-base {
  transform: perspective(760px) rotateX(8deg);
  border-color: rgba(98, 216, 240, .75);
  box-shadow: 0 0 0 1.5px rgba(98, 216, 240, .5), 0 0 26px rgba(98, 216, 240, .3),
    0 8px 0 rgba(12, 16, 36, .55), 0 24px 44px rgba(0, 0, 0, .5);
}

.uc-head {
  display: flex; align-items: center; gap: 6px; min-width: 0;
}
.uc-ava {
  flex: 0 0 24px; width: 24px; height: 24px;
  border-radius: 50%; overflow: hidden;
  border: 1px solid rgba(190, 205, 255, .3);
  background: rgba(255, 255, 255, .06);
}
.uc-ava-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.uc-ava-glyph { display: grid; place-items: center; font-size: 12px; color: #c9a7ff; }
.battle-view .unit .nm {
  flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: #fff; letter-spacing: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.battle-view .unit.enemy .nm { font-size: 11.5px; }
.battle-view .unit .lv {
  flex: 0 0 auto; font-size: 10px; color: #a9b0d8; font-variant-numeric: tabular-nums;
}
.battle-view .unit .badges { display: flex; gap: 3px; flex: 0 0 auto; }
.battle-view .unit .badge-ico { width: 14px; height: 14px; object-fit: contain; }
.battle-view .unit .weak { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto;
  font-size: 9.5px; color: #a9b0d8; }
.battle-view .unit .weak-ico { width: 13px; height: 13px; object-fit: contain; }

/* ---- 进度条 ---- */
.battle-view .unit .bar {
  height: 5px; border-radius: 3px; overflow: hidden;
  background: rgba(255, 255, 255, .08);
}
.battle-view .unit .bar i {
  display: block; height: 100%; border-radius: 3px;
  transition: width .45s ease;
}
.battle-view .unit .bar.hp i {
  background: linear-gradient(90deg, #5fd88f, #46b877);
  box-shadow: 0 0 8px rgba(95, 216, 143, .5);
}
.battle-view .unit .bar.hp.mid i { background: linear-gradient(90deg, #e8c866, #d8a53f); }
.battle-view .unit .bar.hp.low i { background: linear-gradient(90deg, #ff8d7a, #e05c48); }
.battle-view .unit .bar.energy i {
  background: linear-gradient(90deg, #6fd8e8, #48a8d8);
  box-shadow: 0 0 8px rgba(111, 216, 232, .5);
}
.battle-view .unit .bar.energy.full i {
  background: linear-gradient(90deg, #f6e3ab, var(--bv-gold));
  box-shadow: 0 0 10px rgba(231, 196, 106, .7);
}
.battle-view .unit .bar.tough i { background: #e9e9f4; }
.battle-view .unit .bar.tough.wounded i { background: #e8d890; }
.battle-view .unit .bar.tough.broken i { background: rgba(160, 160, 180, .4); }
.battle-view .unit .mini {
  display: flex; justify-content: space-between;
  font-size: 10px; color: #b9bfd8; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden;
}
.battle-view .unit .mini .sh-txt { color: #8fd8e8; font-weight: 500; }
.tough-label {
  display: flex; justify-content: space-between;
  font-size: 9.5px; color: #a9b0d8; font-variant-numeric: tabular-nums;
}
.tough-label .tg-state.on { color: #ffd76e; }

/* ---- 状态图标 ---- */
.battle-view .unit .status-row {
  display: flex; flex-wrap: wrap; gap: 3px; min-height: 14px;
}
.battle-view .unit .st-dot {
  width: 14px; height: 14px; border-radius: 4px;
  display: grid; place-items: center;
  font-size: 8.5px; cursor: help;
  background: rgba(127, 212, 160, .18);
  border: 1px solid rgba(127, 212, 160, .45); color: #a8e8c4;
}
.battle-view .unit .st-dot.debuff {
  background: rgba(224, 112, 92, .16);
  border-color: rgba(224, 112, 92, .5); color: #f0a89a;
}

/* ---- 状态反馈 ---- */
.battle-view .unit.acting { transform: translateY(-6px) scale(1.03); }
.battle-view .unit.acting .uc-halo {
  box-shadow: 0 0 22px rgba(98, 216, 240, .55);
  background: radial-gradient(ellipse, rgba(98, 216, 240, .5), transparent 70%);
}
.battle-view .unit.dead { filter: grayscale(1) brightness(.55); opacity: .5; }
.battle-view .unit.dead .uc-art { opacity: .55; }
.battle-view .unit.is-summon .uc-art { max-height: 86%; }

/* 突刺 / 受击（沿用原关键帧） */
.battle-view .unit.lunge { z-index: 30; }
.battle-view .unit.hit { z-index: 20; }

/* ---- 伤害飘字 ---- */
.battle-view .dmg-float {
  position: absolute; left: 50%; bottom: 58%; z-index: 40;
  transform: translateX(-50%);
  font-size: 17px; font-weight: 700; color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .8), 0 0 14px rgba(255, 255, 255, .3);
  animation: bvFloatUp .95s ease-out forwards;
  pointer-events: none;
}
.battle-view .dmg-float.crit {
  font-size: 22px; color: var(--bv-gold);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .8), 0 0 16px rgba(231, 196, 106, .6);
}
.battle-view .dmg-float.dot { font-size: 14px; font-weight: 600; }
@keyframes bvFloatUp {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(.85); }
  18% { opacity: 1; transform: translate(-50%, 0) scale(1.06); }
  100% { opacity: 0; transform: translate(-50%, -46px) scale(1); }
}

/* ---- 技能横幅 ---- */
.battle-view .skill-banner {
  position: absolute; left: 50%; top: 16%; z-index: 60;
  transform: translateX(-50%);
  padding: 9px 30px; border-radius: 22px;
  font-size: 16px; letter-spacing: 4px; color: #fff;
  background: linear-gradient(90deg, rgba(30, 36, 76, 0), rgba(64, 76, 150, .85) 22%, rgba(64, 76, 150, .85) 78%, rgba(30, 36, 76, 0));
  border: 1px solid rgba(190, 205, 255, .35);
  text-shadow: 0 0 16px rgba(120, 140, 255, .7);
  opacity: 0; pointer-events: none;
}
.battle-view .skill-banner.show { animation: bvBanner 1.5s ease forwards; }
@keyframes bvBanner {
  0% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  12% { opacity: 1; transform: translateX(-50%) translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* ===================================================================
   底部控制栏
   =================================================================== */
.bv-controls-wrap { position: relative; z-index: 6; flex: 0 0 auto; }
.bv-controls {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 8px 14px;
  background: var(--bv-panel);
  border: 1px solid var(--bv-line); border-radius: 14px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.battle-view .bv-controls .btn {
  min-height: 32px; padding: 5px 13px;
  border-radius: 9px; font-size: 12px; letter-spacing: 1px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(190, 205, 255, .18);
  color: #c5cae4; transition: .16s ease;
  font-family: inherit;
}
.battle-view .bv-controls .btn:hover {
  color: #fff; border-color: rgba(190, 205, 255, .45);
  background: rgba(255, 255, 255, .1);
}
.battle-view .bv-controls .btn.active {
  color: var(--bv-gold); border-color: rgba(231, 196, 106, .55);
  background: rgba(231, 196, 106, .12);
  text-shadow: 0 0 10px rgba(231, 196, 106, .5);
}
.battle-view .bv-controls .btn.primary {
  color: #1a1408; font-weight: 700;
  background: linear-gradient(180deg, #f6e3ab, var(--bv-gold));
  border-color: rgba(231, 196, 106, .8);
}
.battle-view .bv-controls .btn.primary:hover { box-shadow: 0 0 18px rgba(231, 196, 106, .45); color: #1a1408; }
.battle-view .bv-controls .btn.primary.active {
  background: linear-gradient(180deg, #a8d8e8, #62b8d8);
  border-color: rgba(98, 216, 240, .8); color: #0c2233;
}
.battle-view .ctrl-note { font-size: 10.5px; color: #8f97c2; letter-spacing: .5px; }
.battle-view .ctrl-note b { color: #d8dcf0; font-variant-numeric: tabular-nums; }
.battle-view .ctrl-sep {
  width: 1px; height: 20px; background: rgba(190, 205, 255, .16);
}

/* ===================================================================
   日志抽屉（磨砂）
   =================================================================== */
.battle-view .log-mask {
  position: absolute; inset: 0; z-index: 70;
  background: rgba(5, 6, 16, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.battle-view .log-mask.open { opacity: 1; pointer-events: auto; }
.battle-view .log-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 71;
  width: min(400px, 86vw);
  display: flex; flex-direction: column;
  background: rgba(18, 22, 44, .93);
  border-left: 1px solid var(--bv-line);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  box-shadow: -26px 0 60px rgba(0, 0, 0, .5);
  transform: translateX(103%); visibility: hidden;
  transition: transform .26s cubic-bezier(.33, .8, .34, 1), visibility .26s;
}
.battle-view .log-drawer.open { transform: translateX(0); visibility: visible; }
.battle-view .log-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px 9px;
  font-size: 14px; letter-spacing: 2px; color: #fff;
}
.battle-view .log-drawer-close {
  width: 30px; min-height: 30px; padding: 0;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(190, 205, 255, .2);
  color: #d8dcf0; border-radius: 8px;
}
.battle-view .log-drawer-sub {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px 9px; font-size: 11px; color: #8f97c2;
  border-bottom: 1px solid rgba(190, 205, 255, .1);
}
.battle-view .battle-log {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: 9px 14px 14px; font-size: 11.5px; line-height: 1.7;
  scrollbar-width: thin; scrollbar-color: rgba(120, 140, 240, .35) transparent;
}
.battle-view .log-count { color: #8f97c2; }

/* ===================================================================
   单位详情弹窗（bi-* 磨砂化）
   =================================================================== */
.battle-view ~ * .bi-wrap, .bi-wrap { font-size: 12.5px; }
.bi-wrap { color: #dcdcf0; }
.bi-wrap .bi-head { gap: 12px; margin-bottom: 12px; }
.bi-wrap .bi-sec {
  margin: 13px 0 7px; font-size: 12px; letter-spacing: 2px; color: var(--bv-gold, #e7c46a);
  padding-bottom: 6px; border-bottom: 1px solid rgba(231, 196, 106, .22);
}
.bi-wrap .bi-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 8px 3px; border-bottom: 1px solid rgba(190, 205, 255, .08);
  font-variant-numeric: tabular-nums;
}
.bi-wrap .bi-row:last-child { border-bottom: 0; }
.bi-wrap .bi-row span { color: #a9b0d8; }
.bi-wrap .bi-row b { color: #fff; font-weight: 500; }
.bi-wrap .bi-delta.up { color: #7fe0a8; font-style: normal; }
.bi-wrap .bi-delta.down { color: #ff8d7a; font-style: normal; }
.bi-wrap .bi-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bi-wrap .bi-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 14px; font-size: 11px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(190, 205, 255, .16);
  font-variant-numeric: tabular-nums;
}
.bi-wrap .bi-chip-ico { width: 15px; height: 15px; object-fit: contain; }
.bi-wrap .bi-chip b { color: #fff; }
.bi-wrap .bi-chip.on { border-color: rgba(98, 216, 240, .45); }
.bi-wrap .bi-chip.on b { color: var(--bv-cyan, #62d8f0); }
.bi-wrap .bi-chip.up b { color: #7fe0a8; }
.bi-wrap .bi-chip.down b { color: #ff8d7a; }
.bi-wrap .bi-chip.zero b { color: #8f97c2; }
.bi-wrap .bi-empty { padding: 8px 2px; font-size: 11.5px; color: #8f97c2; }
.bi-wrap .bi-st {
  padding: 7px 10px; border: 1px solid rgba(190, 205, 255, .12); border-radius: 9px;
  font-size: 12px; margin-bottom: 6px;
  background: rgba(255, 255, 255, .03);
}
.bi-wrap .bi-st.buff { border-left: 3px solid #7fd4a0; }
.bi-wrap .bi-st.debuff { border-left: 3px solid #e0705c; }
.bi-wrap .bi-st-h { display: flex; align-items: center; gap: 8px; }
.bi-wrap .bi-st-h b { font-size: 12.5px; color: #fff; }
.bi-wrap .bi-tag { font-style: normal; font-size: 9.5px; padding: 0 5px; border-radius: 3px; }
.bi-wrap .bi-tag.buf { color: #1a1408; background: #7fd4a0; }
.bi-wrap .bi-tag.deb { color: #fff; background: #e0705c; }
.bi-wrap .bi-dur { margin-left: auto; font-size: 10.5px; color: #8f97c2; }
.bi-wrap .bi-st-fx { margin-top: 4px; font-size: 11px; line-height: 1.65; color: #b9bfd8; }
.bi-wrap .bi-st-ico {
  width: 20px; height: 20px; border-radius: 5px;
  display: inline-grid; place-items: center; font-size: 10px;
  background: rgba(127, 212, 160, .18); border: 1px solid rgba(127, 212, 160, .45); color: #a8e8c4;
}
.bi-wrap .bi-st-ico.deb {
  background: rgba(224, 112, 92, .16); border-color: rgba(224, 112, 92, .5); color: #f0a89a;
}
.bi-wrap .bi-foot { margin-top: 12px; font-size: 10.5px; color: #8f97c2; text-align: center; }

/* ===================================================================
   响应式
   =================================================================== */
/* 平板横屏：压缩行动条与立绘 */
@media (max-width: 1200px) {
  .battle-view { padding: 8px 12px 10px; }
  .bv-turn { flex-basis: 62px; width: 62px; }
  .battle-view .unit.ally { width: clamp(180px, 27vw, 250px); }
  .battle-view .unit.enemy { width: clamp(150px, 22vw, 210px); }
  .bv-rule { display: none; }
}
/* 窄屏 / 手机竖屏 */
@media (max-width: 768px) {
  .battle-view { padding: 6px 8px 8px; gap: 6px; }
  .bv-top { padding: 5px 10px; gap: 8px; border-radius: 11px; }
  .bv-stage { font-size: 12px; letter-spacing: 1px; }
  .bv-sp-label { display: none; }
  .bv-main { gap: 7px; }
  .bv-turn { flex-basis: 52px; width: 52px; padding: 7px 4px; }
  .battle-view .av-face-wrap { width: 36px; height: 36px; }
  .battle-view .av-cap { max-width: 44px; font-size: 8.5px; }
  .bv-turn::before { font-size: 9px; }
  .battle-view .unit.ally { width: clamp(150px, 44vw, 220px); }
  .battle-view .unit.enemy { width: clamp(130px, 38vw, 190px); }
  .battle-view .unit.ally .uc-stage { height: clamp(92px, 24vw, 130px); }
  .battle-view .unit.enemy .uc-stage { height: clamp(72px, 19vw, 104px); }
  .bv-row-title { font-size: 9.5px; letter-spacing: 2px; }
  .bv-controls { padding: 6px 8px; gap: 5px; }
  .battle-view .bv-controls .btn { min-height: 30px; padding: 4px 9px; font-size: 11px; }
  .battle-view .ctrl-sep { display: none; }
  .bv-row-cards { gap: 8px; }
}
/* 低端设备/小屏：关闭模糊与部分动画，保流畅 */
@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .bv-top, .bv-turn, .uc-base, .bv-controls, .battle-view .log-drawer {
    backdrop-filter: none; -webkit-backdrop-filter: none;
    background: rgba(18, 22, 44, .92);
  }
  .bv-neb { filter: blur(40px); }
}
@media (prefers-reduced-motion: reduce) {
  .bv-stars i { animation: none; }
  .battle-view .unit .bar i { transition: none; }
}

/* 安全区（异形屏） */
@supports (padding: env(safe-area-inset-top)) {
  .battle-view {
    padding-top: calc(8px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    padding-left: calc(8px + env(safe-area-inset-left, 0px));
    padding-right: calc(8px + env(safe-area-inset-right, 0px));
  }
}

/* 超短窗口（横屏手机）：整体压缩，保证上下两排单位完整可见 */
@media (max-height: 520px) {
  .battle-view { gap: 4px; padding-top: 4px; padding-bottom: 4px; }
  .bv-top { padding: 2px 12px; }
  .bv-stage { font-size: 12px; }
  .bv-rule { display: none; }
  .bv-controls { padding: 4px 10px; }
  .battle-view .ctrl-note { display: none; }
  .battle-view .bv-controls .btn { min-height: 26px; padding: 3px 9px; font-size: 10.5px; }
  .bv-turn::before { display: none; }
  .battle-view .av-face-wrap { width: 30px; height: 30px; }
  .battle-view .av-cap { font-size: 8px; max-width: 44px; }
  .bv-turn { padding: 4px 4px; }
  .bv-row-title { display: none; }
  .bv-row-cards { gap: clamp(6px, 2vw, 24px); }
  .battle-view .unit.ally { width: clamp(150px, 22vw, 210px); }
  .battle-view .unit.enemy { width: clamp(128px, 18vw, 180px); }
  .battle-view .unit.ally .uc-stage { height: clamp(44px, 12vh, 88px); }
  .battle-view .unit.enemy .uc-stage { height: clamp(36px, 9vh, 70px); }
  .uc-base { padding: 4px 8px; gap: 3px; border-radius: 9px; }
  .battle-view .unit .nm { font-size: 10.5px; }
  .battle-view .unit .lv { font-size: 9px; }
  .uc-ava { flex-basis: 16px; width: 16px; height: 16px; }
  .battle-view .unit .bar { height: 3px; }
  .battle-view .unit .mini { font-size: 8.5px; }
  .tough-label { font-size: 8px; }
  .battle-view .unit .status-row { min-height: 11px; }
  .battle-view .unit .st-dot { width: 11px; height: 11px; font-size: 7.5px; }
}
