/* 全服決戰的戰場面板（battle.js；Joy 2026-11-06 大決戰優化，設計稿 JsNAYuqgMn3JJoTENCKza6 方案甲）。
 * 面板本身是夜色的墨底（兩種模式一樣：它是「戰場」那一塊），底下的戰局條、出招鈕、戰報照頁面的宣紙色。 */
.bp-wrap { display: flex; flex-direction: column; gap: 8px; margin: 0 0 10px; }
.bp { --bp-ink: #f3e9d4; --bp-dim: #d9c9a8; --bp-night: #1d1812; --bp-guan: #8fb6e0; --bp-huang: #e8c06a; --bp-red: #e05a3c;
  position: relative; overflow: hidden; border-radius: var(--radius, 14px); background: var(--bp-night); color: var(--bp-ink);
  padding: 12px 14px; box-shadow: var(--shadow); }
.bp::before { content: ""; position: absolute; inset: 0; background: var(--bp-bg) center / cover no-repeat; opacity: 0.32; filter: grayscale(0.3); }
.bp > * { position: relative; }
.bp-top { display: flex; align-items: flex-start; gap: 10px; }
.bp-t { flex: 1; min-width: 0; }
.bp-t h3 { margin: 0; font-family: var(--serif); font-size: 20px; font-weight: 700; letter-spacing: 0.04em; color: var(--bp-ink); }
.bp-t p { margin: 2px 0 0; font-size: 12px; line-height: 1.45; color: var(--bp-dim); }
.bp-clock { flex: none; min-width: 84px; text-align: center; }
.bp-clock .bp-n { display: block; font-family: var(--serif); font-size: 30px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.bp-clock .bp-w { display: block; font-size: 11px; color: var(--bp-dim); margin-top: 2px; }
.bp-ring { display: block; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.18); overflow: hidden; margin-top: 5px; }
.bp-ring > i { display: block; height: 100%; background: #e9b44c; transition: width 1s linear; }
.bp-clock.hot .bp-n { color: #ff8a73; }
.bp-clock.hot .bp-ring > i { background: #ff6a52; }
.bp-gens { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.bp-side { min-width: 0; }
.bp-sname { margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--bp-guan); }
.bp-sname.side-huang { color: var(--bp-huang); }
.bp-side.right .bp-sname { text-align: right; }
.bp-gen { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.bp-side.right .bp-gen { flex-direction: row-reverse; text-align: right; }
.bp-face { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: #ece0c8;
  border: 2px solid var(--bp-guan); display: grid; place-items: center; }
.bp-side.right .bp-face { border-color: var(--bp-huang); }
.bp-gen.main .bp-face { width: 46px; height: 46px; }
.bp-face img { position: absolute; left: 50%; top: 0; width: 160%; transform: translateX(-50%); z-index: 1; }
.bp-face img + em { display: none; }
.bp-face em { font-style: normal; font-family: var(--serif); font-weight: 700; color: #2a241d; }
.bp-gi { flex: 1; min-width: 0; }
.bp-gn { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 14px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-gn small { font-family: var(--sans); font-weight: 400; font-size: 10px; color: var(--bp-dim); margin: 0 4px; }
.bp-hp { display: block; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.15); overflow: hidden; margin-top: 3px; }
.bp-hp > i { display: block; height: 100%; background: linear-gradient(90deg, #c0392b, var(--bp-red)); transition: width 0.6s ease; }
.bp-side.right .bp-hp > i { margin-left: auto; }
.bp-hpn { display: block; font-size: 10px; color: var(--bp-dim); font-variant-numeric: tabular-nums; }
.bp-gen.low .bp-hp > i { animation: bp-throb 1.2s ease-in-out infinite; }
.bp-gen.down { opacity: 0.45; filter: grayscale(1); }
@keyframes bp-throb { 50% { filter: brightness(1.7); } }
.bp-order { margin: 4px 0 0; background: rgba(168, 50, 42, 0.88); color: #fff; border-radius: 8px; padding: 4px 10px; font-size: 13px; }
.bp-order b { font-family: var(--serif); }
.bp-gauge .gauge { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius, 14px); padding: 8px 12px 6px; }
/* 出招鈕：一顆一格，三格一排 */
.bp-moves { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.bp-mv { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit; cursor: pointer; min-width: 0; }
.bp-mv b { font-family: var(--serif); font-size: 19px; }
.bp-mv small { font-size: 11px; color: var(--ink-2); line-height: 1.3; text-align: center; }
.bp-mv.ord { border: 2px solid var(--accent); background: var(--accent-soft); }
.bp-mv em { font-style: normal; font-size: 10px; color: #fff; background: var(--accent); border-radius: 99px; padding: 0 6px; }
.bp-mv[aria-disabled="true"], .bp-mv:disabled { opacity: 0.5; }
.bp-mv:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bp-sent { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.bp-sent b { font-family: var(--serif); display: block; }
.bp-sent small { color: var(--ink-2); }
.bp-sent.out { color: var(--bad); }
/* 一回合一行的戰報 */
.bp-feed { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px 4px; }
.bp-fh { display: flex; justify-content: space-between; align-items: center; margin: 2px 0 4px; font-size: 12px; color: var(--ink-2); letter-spacing: 0.1em; }
.bp-fh .linkish { letter-spacing: 0; color: var(--accent); font-weight: 700; }
.bp-fr { display: flex; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 13px; }
.bp-rn { flex: none; width: 34px; font-family: var(--serif); color: var(--ink-2); }
.bp-ft { flex: 1; min-width: 0; }
.bp-ft p { margin: 2px 0 0; font-size: 12px; color: var(--ink-2); }
.bp-mine { color: var(--ink) !important; }
.bp-chip { display: inline-block; font-size: 10px; font-weight: 700; color: #fff; border-radius: 4px; padding: 0 5px; margin-right: 4px; background: var(--ink-2); }
.bp-chip.side-guan { background: var(--kuai); }
.bp-chip.side-huang { background: var(--gold); color: #2a241d; }
.bp-chip.k { background: var(--hp); }
.bp-dmg { display: inline-block; margin-right: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bp-dmg.left { color: var(--kuai); }
.bp-dmg.right { color: var(--rn-kou, #9a5a1e); }
.bp-hit.fall { color: var(--ink) !important; font-weight: 700; }
.bp-merit { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; }
.bp-merit > summary { cursor: pointer; font-weight: 700; display: flex; justify-content: space-between; font-size: 13px; }
.bp-merit > summary span { font-weight: 400; color: var(--ink-2); }
.bp-merit .g-merit { margin-top: 6px; }
/* 狀態列的陣中氣血 */
.bar.hp.bp-hpbar { outline: 2px solid #e9b44c; outline-offset: 1px; }
.bar.hp.bp-hpbar > i { background: #7a1f17; }
/* 別的分頁：分頁列上方的戰場小條 */
.bp-mini { position: fixed; left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px));
  bottom: calc(68px + var(--bottom, 0px)); z-index: 40; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 14px;
  background: #1d1812; color: #f3e9d4; padding: 8px 12px; font: inherit; text-align: left; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); cursor: pointer; }
.bp-mt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.bp-mt b { font-family: var(--serif); }
.bp-mt small { color: #d9c9a8; font-size: 11px; }
.bp-mini .bp-n { font-family: var(--serif); font-size: 18px; color: #e9b44c; font-variant-numeric: tabular-nums; }
.bp-go { background: var(--accent); color: #fff; border-radius: 99px; padding: 2px 10px; font-weight: 700; font-size: 12px; }
/* 關鍵時刻蓋上來的那一層 */
.bp-ov { position: fixed; inset: 0; z-index: 80; background: rgba(20, 15, 10, 0.86); color: #f6ecd6; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px));
  animation: bp-in 0.25s ease-out; cursor: pointer; }
.bp-ov.gone { opacity: 0; transition: opacity 0.25s; }
@keyframes bp-in { from { opacity: 0; transform: scale(1.04); } }
.bp-ov-in { max-width: 420px; width: 100%; display: flex; flex-direction: column; align-items: center; }
.bp-duo { display: flex; align-items: flex-end; justify-content: center; }
.bp-duo img { width: min(44vw, 190px); height: min(58vw, 250px); object-fit: cover; object-position: top; }
.bp-duo img.r { transform: scaleX(-1); }
.bp-vs { position: relative; z-index: 1; margin: 0 -14px 80px; font-family: var(--serif); font-size: 34px; font-weight: 700; color: #e9b44c; }
.bp-solo { position: relative; }
.bp-solo img { width: min(62vw, 250px); height: min(80vw, 320px); object-fit: cover; object-position: top; }
.bp-solo.gray img { filter: grayscale(1) brightness(0.8); }
.bp-solo.shake img { animation: bp-shake 0.4s 3; }
@keyframes bp-shake { 25% { transform: translateX(-5px) rotate(-1deg); } 75% { transform: translateX(5px) rotate(1deg); } }
.bp-slash { position: absolute; left: -10%; right: -10%; top: 40%; height: 5px; background: #ff5a3c; transform: rotate(-24deg); box-shadow: 0 0 14px #ff5a3c;
  animation: bp-cut 0.35s ease-out both; }
@keyframes bp-cut { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.bp-big { margin: 8px 0 4px; font-family: var(--serif); font-size: 28px; font-weight: 700; letter-spacing: 0.08em; }
.bp-big.small { font-size: 18px; }
.bp-say { margin: 8px 0 0; background: rgba(251, 247, 239, 0.95); color: #2a241d; border-radius: 12px; padding: 10px 14px; text-align: left;
  font-family: var(--serif); font-size: 16px; max-width: 320px; }
.bp-say b { display: block; color: var(--accent); font-size: 13px; }
.bp-sub { margin: 6px 0 0; font-size: 13px; color: #d9c9a8; }
.bp-sub.mine { color: #e9b44c; font-weight: 700; }
.bp-hpbig { display: block; width: 220px; height: 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.15); overflow: hidden; margin: 4px auto; }
.bp-hpbig > i { display: block; height: 100%; background: #ff5a3c; }
.bp-res { margin: 0; font-family: var(--serif); font-size: 46px; font-weight: 700; color: #e9b44c; }
.bp-res.win { color: #8fb6e0; }
.bp-res.lose { color: #b9a98c; }
.bp-card { margin: 10px 0 0; background: rgba(251, 247, 239, 0.95); color: #2a241d; border-radius: 12px; padding: 10px 16px; font-family: var(--serif); font-size: 16px; }
.bp-card small { display: block; font-family: var(--sans); font-size: 12px; color: #6b6155; }
.bp-tap { position: absolute; bottom: calc(18px + var(--bottom, 0px)); margin: 0; font-size: 12px; color: #b7a888; }
@media (prefers-reduced-motion: reduce) {
  .bp-ov, .bp-solo.shake img, .bp-slash, .bp-gen.low .bp-hp > i { animation: none; }
  .bp-ring > i, .bp-hp > i { transition: none; }
}
