/* ============================================================
 * 墨青绿主题覆盖 + 系统组件样式
 * 载入顺序位于 style.css 之后
 * ============================================================ */

/* ---------- 主题覆盖 ---------- */
body { background: #06130f; }
#start-screen .start-bg {
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(80, 150, 120, .18), transparent 70%),
    radial-gradient(ellipse 50% 40% at 15% 90%, rgba(150, 62, 54, .10), transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 80%, rgba(196, 158, 86, .11), transparent 70%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.012) 0 2px, transparent 2px 7px),
    linear-gradient(#0a1c18, #050f0c 70%);
}
#topbar { background: linear-gradient(180deg, #143b34, #0b211d); border-bottom-color: rgba(212,180,108,.32); }
#sidebar { background: linear-gradient(90deg, #0a211c, #0d2823); }
#content {
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(55, 130, 100, .10), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.008) 0 1px, transparent 1px 4px), #071511;
}
#rightbar { background: #081c18; }
#bottombar { background: #081a16; }
.panel, .side-card, .start-block, .stage-card, .hero-card, .item-card,
.forge-box, .codex-item, .quest-row, .chapter-banner, .modal, .gift-cell {
  background: linear-gradient(180deg, rgba(20, 56, 49, .94), rgba(9, 29, 25, .95));
  border-color: rgba(212, 180, 108, .18);
}
.modal { border-color: var(--gold2); }
.panel-head, .side-title, .modal-head { border-bottom-color: rgba(212,180,108,.18); }
.btn { background: linear-gradient(#1d574b, #123a33); border-color: rgba(212,180,108,.3); }
.btn-gold { background: linear-gradient(#8a6a24, #5e461a); border-color: rgba(240,200,122,.6); color: #f6e2b0; }
.btn-gold:hover { background: linear-gradient(#a37e2c, #6f5420); border-color: var(--gold); }
.btn:hover { background: linear-gradient(#26705e, #17483e); border-color: var(--gold); }
.btn-mini, .chapter-tab, .form-tab, .bag-tab, .pick, .pool-card, .nav-btn,
.bcell, .cell { background-color: rgba(13, 43, 37, .72); }
.chapter-tab.on, .form-tab.on, .bag-tab.on { background: linear-gradient(#e6c481, #b8914c); color: #1b1509; }
.nav-btn.on { background: linear-gradient(90deg, rgba(224,189,114,.17), rgba(224,189,114,.03)); }
.board { background: radial-gradient(ellipse at 50% 50%, rgba(55,125,100,.16), transparent 75%), rgba(4,16,12,.75); }
.cell.slot { background: rgba(224,189,114,.06); }
.battle-log, .expbar, .fbar, .pbar, .quest-row .pbar { background-color: #04110e; }
input, select { background: rgba(4,16,12,.8); border-color: rgba(212,180,108,.28); }
.avatar, .detail-avatar, .hc-avatar { background: radial-gradient(circle at 30% 25%, #2c6a58, #0c2b24); }
.brand-seal { background: rgba(224,189,114,.08); }
.start-block, .chapter-banner { box-shadow: inset 0 1px 0 rgba(224,189,114,.07); }

/* ---------- 主界面：场景名 / 队伍栏 / 聊天 ---------- */
.scene-tag { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; border-left: 1px solid var(--line-soft); min-width: 96px; }
.scene-tag .dim { font-size: 9.5px; letter-spacing: 1px; }
.scene-tag b { font-family: var(--kai); font-size: 16px; letter-spacing: 3px; color: var(--gold); font-weight: 400; }
.scene-tag small { font-size: 9.5px; color: var(--dim); }
#team-list { padding: 8px 10px; }
.team-row { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.team-avatar { width: 30px; height: 30px; flex: 0 0 30px; border: 1px solid var(--qc); border-radius: 2px; display: flex; align-items: center; justify-content: center; font-family: var(--kai); font-size: 15px; color: var(--qc); background: rgba(0,0,0,.28); }
.team-meta { flex: 1; min-width: 0; }
.team-meta .tn { font-size: 11px; display: flex; justify-content: space-between; }
.team-meta .tn b { font-weight: 400; color: #e6dcc0; }
.team-meta .tn span { color: var(--dim); font-size: 10px; }
.team-hp { height: 4px; background: #2a1518; border-radius: 2px; margin-top: 3px; overflow: hidden; }
.team-hp i { display: block; height: 100%; background: linear-gradient(90deg, #4a9c70, #86d9a2); }
#chat-log { padding: 8px 10px; max-height: 136px; overflow-y: auto; font-size: 10.5px; line-height: 1.75; }
.chat-line { color: var(--muted); }
.chat-line b { color: #8fd4b4; font-weight: 400; }
.chat-line.sys b { color: var(--gold); }

/* ---------- 将领面板（还原截图四分区） ---------- */
.cmd-panel { display: grid; grid-template-columns: 58px minmax(240px, 1fr) minmax(280px, 1.05fr); gap: 12px; }
.cmd-roster { display: flex; flex-direction: column; gap: 6px; max-height: 430px; overflow-y: auto; }
.cmd-roster .cr { border: 1px solid var(--qc); border-radius: 2px; padding: 3px; text-align: center; cursor: pointer; background: rgba(0,0,0,.25); position: relative; }
.cmd-roster .cr.on { box-shadow: 0 0 0 1px var(--gold), inset 0 0 12px rgba(224,189,114,.2); }
.cmd-roster .cr .cra { font-family: var(--kai); font-size: 20px; color: var(--qc); line-height: 30px; }
.cmd-roster .cr .crl { position: absolute; left: 1px; top: 0; font-size: 9px; color: #f0d398; }
.cmd-tree {
  position: relative; min-height: 400px; border: 1px solid var(--line-soft); border-radius: 3px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, rgba(50,100,80,.18), transparent 70%), rgba(4,16,13,.65);
}
.cmd-tree::before {
  content: ''; position: absolute; left: 50%; top: 12%; bottom: 8%; width: 68px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent 44%, rgba(20,12,6,.85) 45%, rgba(30,20,8,.9) 52%, transparent 55%);
  clip-path: polygon(42% 0, 58% 0, 60% 30%, 85% 45%, 80% 52%, 58% 42%, 58% 100%, 42% 100%, 42% 42%, 20% 52%, 15% 45%, 40% 30%);
  opacity: .8;
}
.tree-head { position: relative; text-align: center; padding: 8px; font-family: var(--kai); font-size: 15px; color: var(--gold); letter-spacing: 2px; } 
.tree-head small { color: #e8a35a; margin-left: 6px; }
.tree-nodes { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); gap: 8px; padding: 10px 26px 44px; min-height: 336px; }
.talent-node {
  width: 52px; height: 52px; margin: 0 auto; border: 2px solid #7a5626; border-radius: 3px; cursor: pointer;
  background: radial-gradient(circle at 35% 25%, #7a4c18, #2a1708 75%); display: flex; flex-direction: column;
  align-items: center; justify-content: center; position: relative; transition: .16s; box-shadow: 0 0 0 1px rgba(0,0,0,.6);
}
.talent-node:hover { border-color: var(--gold); transform: scale(1.07); }
.talent-node .ti { font-family: var(--kai); font-size: 21px; color: #ffd58a; line-height: 1; text-shadow: 0 1px 4px #000; }
.talent-node .tl { position: absolute; bottom: -15px; font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.talent-node .tv { position: absolute; top: -8px; right: -7px; background: #9a3f2f; border: 1px solid #e8b071; border-radius: 8px; font-size: 9px; padding: 0 4px; color: #ffe4b0; }
.talent-node.maxed { border-color: #e0bd72; box-shadow: 0 0 12px rgba(224,189,114,.4); }
.talent-node.equipped::after { content: '已装备'; position: absolute; left: -12px; top: 16px; transform: rotate(-14deg); font-size: 9px; color: #ffe0a0; border: 1px solid #c9763c; background: rgba(120,50,20,.9); padding: 1px 3px; }
.tree-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 7px 10px; display: flex; gap: 6px; align-items: center; background: rgba(3,12,9,.72); }
.tree-exp { flex: 1; height: 6px; background: #1a0f1c; border-radius: 3px; overflow: hidden; }
.tree-exp i { display: block; height: 100%; background: linear-gradient(90deg, #7b3fa0, #c46fd0); }
.cmd-right { min-width: 0; }
.attr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.attr-col h5 { margin: 0 0 5px; font-family: var(--kai); font-size: 14px; color: var(--gold); font-weight: 400; letter-spacing: 2px; border-bottom: 1px solid var(--line-soft); padding-bottom: 4px; }
.attr-line { display: flex; justify-content: space-between; font-size: 11.5px; padding: 2px 0; color: var(--muted); }
.attr-line b { color: #e8a35a; font-weight: 400; }
.attr-line b i { color: #71d39a; font-style: normal; margin-left: 5px; }
.power-line { margin: 8px 0; padding: 6px 9px; border: 1px solid var(--line-soft); background: rgba(224,189,114,.06); font-size: 12px; color: var(--muted); }
.power-line b { color: #f0c87a; font-size: 15px; float: right; }
.cmd-equips { margin-top: 10px; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.cmd-equips .ce-head { font-size: 11px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.eq-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.eq-cell { aspect-ratio: 1/1; border: 1px solid var(--line-soft); border-radius: 2px; background: radial-gradient(circle at 35% 25%, #5c3a14, #1a1008); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; position: relative; }
.eq-cell:hover { border-color: var(--gold); }
.eq-cell .ec { font-family: var(--kai); font-size: 17px; color: var(--qc, #d9b771); }
.eq-cell .en { font-size: 9px; color: var(--dim); }
.eq-cell .er { position: absolute; right: 2px; top: 1px; font-size: 9px; color: #f0c87a; }
.eq-cell.empty { background: rgba(0,0,0,.25); }

/* ---------- 抽卡 ---------- */
.gacha-banner {
  padding: 22px 24px; border: 1px solid var(--line); border-radius: 3px; margin-bottom: 14px; text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(224,189,114,.14), transparent 65%), linear-gradient(120deg, rgba(24,62,52,.9), rgba(8,26,22,.95));
}
.gacha-banner h3 { font-family: var(--kai); font-size: 28px; letter-spacing: 8px; margin: 0 0 6px; color: #f0d398; font-weight: 400; }
.gacha-banner p { color: var(--muted); font-size: 12px; margin: 0 0 14px; line-height: 1.9; }
.gacha-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.gacha-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin-top: 12px; }
.gacha-card { border: 2px solid var(--qc); border-radius: 4px; padding: 12px 8px; text-align: center; background: radial-gradient(circle at 50% 25%, rgba(224,189,114,.18), rgba(6,20,16,.95) 70%); animation: cardIn .45s ease-out both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) rotateY(40deg); } to { opacity: 1; transform: none; } }
.gacha-card .gca { font-family: var(--kai); font-size: 34px; color: var(--qc); line-height: 1.4; }
.gacha-card .gcn { font-family: var(--kai); font-size: 16px; }
.gacha-card .gcq { font-size: 11px; color: var(--qc); }
.gacha-card .gcd { font-size: 10px; color: var(--dim); margin-top: 3px; }
.gacha-card.hero { box-shadow: 0 0 18px rgba(224,189,114,.45); }

/* ---------- 潜力提升弹窗 ---------- */
.pot-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pot-wheel { border: 1px solid var(--line-soft); border-radius: 50%; width: 150px; height: 150px; margin: 8px auto; position: relative; background: radial-gradient(circle, #16241c 45%, #0a1510 46%); box-shadow: inset 0 0 22px rgba(0,0,0,.7), 0 0 0 6px rgba(224,189,114,.08); }
.pot-wheel::before { content: ''; position: absolute; inset: 18px; border: 1px dashed rgba(224,189,114,.35); border-radius: 50%; }
.pot-wheel span { position: absolute; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.pot-wheel span:nth-child(1) { top: 8px; left: 50%; color: #e8a35a; background: currentColor; }
.pot-wheel span:nth-child(2) { top: 28px; right: 22px; color: #7fd8b0; background: currentColor; }
.pot-wheel span:nth-child(3) { bottom: 26px; right: 24px; color: #e8c25a; background: currentColor; }
.pot-wheel span:nth-child(4) { bottom: 26px; left: 24px; color: #b884e3; background: currentColor; }
.pot-wheel span:nth-child(5) { top: 28px; left: 22px; color: #7fb8f0; background: currentColor; }
.pot-intro { font-size: 11.5px; line-height: 2; color: var(--muted); }
.pot-items { display: flex; gap: 14px; justify-content: center; margin: 14px 0; }
.pot-item { text-align: center; }
.pot-box { width: 64px; height: 64px; border: 2px solid var(--qc, #a074c0); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-family: var(--kai); font-size: 26px; color: var(--qc, #c9a0e8); background: radial-gradient(circle at 35% 25%, #4a2c60, #180e22); position: relative; }
.pot-box em { position: absolute; right: 3px; bottom: 2px; font-style: normal; font-size: 10px; color: #f0d398; }
.pot-item .pn { font-size: 11px; margin-top: 4px; color: var(--gold); }
.pot-rate { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: 8px 0 12px; }
.pot-rate b { color: #f0c87a; }

/* ---------- 竞技场宝箱 / 国战 / 英雄会 / 挂机 / 邮件 ---------- */
.box-row { display: grid; grid-template-columns: 24px 1.2fr .8fr .8fr auto; gap: 8px; align-items: center; padding: 7px 10px; border-bottom: 1px solid var(--line-soft); font-size: 11.5px; }
.box-row:last-child { border: 0; }
.box-row .bico { width: 20px; height: 20px; border: 1px solid var(--qc); border-radius: 2px; background: rgba(224,189,114,.1); text-align: center; line-height: 18px; color: var(--qc); }
.war-score { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 3px; background: linear-gradient(90deg, rgba(60,120,160,.18), rgba(20,50,42,.5) 50%, rgba(150,60,60,.18)); margin-bottom: 12px; }
.war-score .ws-side { flex: 1; text-align: center; }
.war-score .ws-side b { display: block; font-family: var(--kai); font-size: 22px; font-weight: 400; letter-spacing: 4px; }
.war-score .ws-side .wsv { font-size: 26px; color: var(--gold); }
.war-score .ws-vs { font-family: var(--kai); font-size: 24px; color: var(--gold); }
.war-cols { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 10px; }
.war-list { max-height: 210px; overflow-y: auto; font-size: 11px; line-height: 1.9; color: var(--muted); }
.war-report { max-height: 210px; overflow-y: auto; font-size: 10.5px; line-height: 1.8; color: #a9c4b8; background: rgba(3,12,9,.55); border: 1px solid var(--line-soft); padding: 8px; }
.war-report p { margin: 0 0 2px; }
.bracket { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: center; }
.br-col { display: flex; flex-direction: column; justify-content: space-around; gap: 8px; min-height: 260px; }
.br-node { border: 1px solid var(--line-soft); border-radius: 3px; padding: 7px 8px; font-size: 11px; text-align: center; background: rgba(10,30,25,.8); }
.br-node.out { opacity: .32; text-decoration: line-through; }
.br-node.me { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 12px rgba(224,189,114,.18); }
.br-node.champ { border-color: #f0c87a; background: rgba(224,189,114,.15); color: #ffe2a8; }
.hang-panel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.hang-cell { border: 1px solid var(--line-soft); border-radius: 3px; padding: 10px; text-align: center; }
.hang-cell .hv { font-family: var(--kai); font-size: 20px; color: var(--gold); }
.hang-cell .hl { font-size: 10.5px; color: var(--dim); margin-top: 3px; }
.mail-row { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-bottom: 1px solid var(--line-soft); }
.mail-row:last-child { border: 0; }
.mail-row .mi { width: 30px; height: 30px; flex: 0 0 30px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-family: var(--kai); color: var(--gold); }
.mail-row .mm { flex: 1; min-width: 0; }
.mail-row .mt { font-size: 12.5px; color: #e6dcc0; }
.mail-row .md { font-size: 10.5px; color: var(--dim); }

/* ---------- 战斗：斜俯视草地 + 双阵型缩略 ---------- */
.battle-viewport { border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.battle-field {
  /* 高度随视口弹性变化：矮屏仍能完整显示，高屏棋盘更舒展，不再固定 340px 撑爆弹窗 */
  position: relative; height: clamp(320px, 46vh, 460px); overflow: hidden;
  background:
    radial-gradient(ellipse 60% 70% at 50% 60%, rgba(120,160,80,.22), transparent 75%),
    radial-gradient(ellipse 40% 50% at 15% 20%, rgba(30,80,55,.55), transparent 70%),
    radial-gradient(ellipse 40% 50% at 85% 80%, rgba(30,75,50,.5), transparent 70%),
    repeating-linear-gradient(58deg, rgba(255,255,255,.018) 0 3px, transparent 3px 11px),
    linear-gradient(160deg, #294a2c, #1a3524 45%, #122a20);
}
.battle-field::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 60px rgba(0,0,0,.55); }
/* 双方角标收成窄条，放在棋盘左右留白里，不再横跨单位格 */
.field-hud { position: absolute; z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 66px; text-align: center; }
.field-hud.tl { left: 8px; top: 8px; }
.field-hud.br { right: 8px; bottom: 8px; flex-direction: column-reverse; }
.field-hud .fh-av { width: 34px; height: 34px; flex: 0 0 34px; border: 2px solid var(--qc, #d9b771); border-radius: 3px; display: flex; align-items: center; justify-content: center; font-family: var(--kai); font-size: 17px; color: var(--qc, #f0d398); background: radial-gradient(circle at 35% 25%, #3a5f4a, #0c2018); }
.field-hud .fh-name { font-family: var(--kai); font-size: 9.5px; max-width: 66px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #f0e2c0; text-shadow: 0 1px 3px #000; }
.field-hud .fh-lv { font-size: 9px; color: #f0c87a; }
/* 阵型缩略图移到战场下方信息带，静态排布 */
.formations-mini { display: flex; align-items: flex-start; gap: 8px; flex: none; }
.mini-wrap { text-align: center; }
.mini-wrap > span { display: block; font-size: 8.5px; color: #d8d0b0; background: rgba(4,16,12,.7); padding: 1px 4px; border: 1px solid var(--line-soft); white-space: nowrap; }
.mini-wrap > b { display: block; font-size: 8.5px; color: var(--dim); font-weight: 400; }
.mini-grid { width: 40px; height: 40px; display: grid; grid-template-columns: repeat(5,1fr); grid-template-rows: repeat(5,1fr); margin: 3px auto 0; box-shadow: 0 2px 8px rgba(0,0,0,.6); border: 1px solid rgba(212,180,108,.4); }
.mini-cell { background: rgba(236,222,184,.9); border: 1px solid rgba(40,50,40,.35); }
.mini-cell:nth-child(odd) { background: rgba(36,62,52,.92); }
.mini-cell.on { box-shadow: inset 0 0 0 3px rgba(210,70,60,.85); }
.mini-cell.dead { opacity: .3; }
/* top 是格子中心（见 battle-ui.js 的 GRID 常量），整块「人形+名字+血条」上移 50%，
   人形才会正好落在格子中央，而不是从格子中心往下垂半格。 */
.field-unit { position: absolute; z-index: 4; width: 54px; margin-left: -27px; text-align: center; transform: translateY(-50%); transition: left .3s, top .3s; }
.fu-figure {
  width: 34px; height: 38px; margin: 0 auto; border: 2px solid var(--qc, #d9b771); border-radius: 40% 40% 22% 22%;
  background: linear-gradient(160deg, rgba(70,120,100,.95), rgba(14,36,28,.98)); display: flex; align-items: center;
  justify-content: center; font-family: var(--kai); font-size: 17px; color: var(--qc, #f0d398);
  box-shadow: 0 4px 9px rgba(0,0,0,.6), inset 0 2px 8px rgba(255,255,255,.12);
}
.field-unit.enemy .fu-figure { background: linear-gradient(160deg, rgba(130,60,55,.95), rgba(40,14,16,.98)); }
.fu-name { font-size: 9.5px; line-height: 1.2; color: #f4ead0; text-shadow: 0 1px 3px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.fu-hp { height: 4px; margin: 2px auto 0; width: 42px; background: #2a1010; border: 1px solid rgba(0,0,0,.6); border-radius: 3px; overflow: hidden; }
.fu-hp i { display: block; height: 100%; background: linear-gradient(90deg, #c0443c, #e88c63); transition: width .3s; }
.field-unit.ally .fu-hp i { background: linear-gradient(90deg, #3f9169, #8ad9a4); }
.field-unit.dead { opacity: .28; filter: grayscale(1); }
.field-unit.hit .fu-figure { box-shadow: 0 0 0 2px #ffe08a, 0 0 18px rgba(255,190,90,.9); }
.field-unit.stunned .fu-figure::after { content: '晕'; position: absolute; font-size: 10px; color: #ffe08a; }
.float-num { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); font-weight: 700; font-size: 16px; color: #ffb27a; text-shadow: 0 2px 4px #000, 0 0 8px #a03010; pointer-events: none; animation: floatUp .85s ease-out forwards; z-index: 9; white-space: nowrap; }
.float-num.heal { color: #9cf0b4; text-shadow: 0 2px 4px #000, 0 0 8px #1b6c3a; }
.float-num.crit { font-size: 20px; color: #ff9a5a; animation: floatUp .85s ease-out forwards, critShake .4s ease; }

/* ---------- 相向放置的双 5×5 棋盘 ---------- */
.board-zone {
  /* top 9% / bottom 9% / 宽 39% / 左右各 6% —— 与 battle-ui.js GRID 常量一一对应。
     浮层已移出棋盘，上下留白只需容纳两侧角标，故格子可以尽量拉高。 */
  position: absolute; top: 9%; bottom: 9%; width: 39%;
  border: 1px solid rgba(212,180,108,.30); border-radius: 3px;
  background-image:
    linear-gradient(rgba(212,180,108,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,180,108,.09) 1px, transparent 1px);
  background-size: 20% 20%;
  box-shadow: inset 0 0 24px rgba(0,0,0,.35);
}
.board-zone.l { left: 6%; }
.board-zone.r { right: 6%; }
.board-zone b {
  position: absolute; left: 50%; top: -20px; transform: translateX(-50%);
  font-size: 9.5px; font-weight: 400; letter-spacing: 2px; white-space: nowrap;
  color: rgba(240,226,192,.75);
}

/* ---------- 战斗动作演出动画 ---------- */
.field-unit .fu-figure { transition: transform .2s ease, filter .2s ease; }
.field-unit.lunging { z-index: 8; }
.field-unit.lunging .fu-figure { filter: drop-shadow(0 0 10px rgba(255,210,122,.85)) brightness(1.18); }
.field-unit.ally.lunging .fu-figure { transform: scaleX(1.08); }
.field-unit.enemy.lunging .fu-figure { transform: scaleX(1.08); }

/* 远程施法：原地脉冲 */
.field-unit.casting { z-index: 6; }
.field-unit.casting .fu-figure { animation: castPulse .52s ease; }
@keyframes castPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.14); filter: brightness(1.35) drop-shadow(0 0 10px rgba(185,226,255,.9)); }
  100% { transform: scale(1); }
}
/* 远程弹道 */
.bolt {
  /* 单位整块上移 50% 后，人形中心相对锚点固定约 -10px（与格子高度无关） */
  position: absolute; margin-top: -10px; width: 16px; height: 3px; border-radius: 2px; z-index: 7;
  background: linear-gradient(90deg, rgba(255,233,168,0), #ffe9a8 40%, #ff9a5a);
  box-shadow: 0 0 8px rgba(255,176,96,.9); pointer-events: none;
  transition: left .34s linear, top .34s linear;
}
.bolt.to-l { transform: scaleX(-1); }

/* 闪避：侧身残影 */
.field-unit.dodging .fu-figure { animation: dodgeMove .52s ease; }
@keyframes dodgeMove {
  0% { transform: translateX(0); opacity: 1; }
  35% { transform: translateX(-18px); opacity: .4; filter: blur(1px); }
  70% { transform: translateX(12px); opacity: .7; }
  100% { transform: translateX(0); opacity: 1; }
}
/* 防御：举盾格挡收缩 */
.field-unit.defending .fu-figure { animation: defendGuard .52s ease; }
@keyframes defendGuard {
  0% { transform: scale(1); }
  35% { transform: scale(.86); box-shadow: 0 0 0 3px #9fc8ff, 0 0 18px rgba(140,190,255,.85); }
  70% { transform: scale(.92); box-shadow: 0 0 0 2px #9fc8ff, 0 0 10px rgba(140,190,255,.6); }
  100% { transform: scale(1); box-shadow: 0 5px 10px rgba(0,0,0,.6); }
}
/* 反击：原地挥击 */
.field-unit.counter-act { z-index: 7; }
.field-unit.counter-act .fu-figure { animation: counterSwing .46s ease; }
@keyframes counterSwing {
  0% { transform: scale(1) rotate(0); }
  35% { transform: scale(1.2) rotate(-6deg); filter: brightness(1.3) drop-shadow(0 0 10px rgba(255,150,120,.9)); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes critShake {
  0%, 100% { margin-left: 0; }
  25% { margin-left: -5px; }
  60% { margin-left: 5px; }
}

/* ---------- 武将技 / 阵型技发起演出（技能色由 JS 注入 --skc） ----------
 * 全部用文字 + CSS 光效实现，不引入任何图片 / SVG；棋盘几何保持不变。 */
/* 技能横幅：战场中上方居中弹出，技能名大字 + 施法者小字 */
.skill-banner {
  position: absolute; left: 50%; top: 26%; transform: translate(-50%, -50%); z-index: 30;
  pointer-events: none; text-align: center; white-space: nowrap;
  animation: sbIn 1.25s cubic-bezier(.2,.8,.3,1) forwards;
}
.skill-banner .sb-name {
  font-family: var(--kai); font-size: clamp(20px, 4.4vw, 38px); font-weight: 700; letter-spacing: 4px;
  color: #fff9ea; text-shadow: 0 0 10px var(--skc, #d5a6f0), 0 0 24px var(--skc, #d5a6f0), 0 3px 6px #000;
}
.skill-banner .sb-who { margin-top: 2px; font-size: 12px; letter-spacing: 2px; color: #f2e6c6; text-shadow: 0 2px 5px #000; }
.skill-banner .sb-kind {
  display: inline-block; margin-bottom: 3px; padding: 1px 8px; font-size: 10px; letter-spacing: 2px;
  color: var(--skc, #d5a6f0); border: 1px solid var(--skc, #d5a6f0); border-radius: 2px;
  background: rgba(4,14,10,.72);
}
@keyframes sbIn {
  0%   { opacity: 0; transform: translate(-50%, -32%) scale(.55); }
  16%  { opacity: 1; transform: translate(-50%, -50%) scale(1.14); }
  26%  { transform: translate(-50%, -50%) scale(1); }
  76%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -92%) scale(1.02); }
}
/* 施法者：光环脉冲 + 扩散环 */
.field-unit.skill-cast { z-index: 12; }
.field-unit.skill-cast .fu-figure { animation: skillCast .62s ease; }
@keyframes skillCast {
  0%   { transform: scale(1); }
  28%  { transform: scale(1.3) rotate(-4deg); filter: brightness(1.7) drop-shadow(0 0 14px var(--skc, #fff)); }
  100% { transform: scale(1); }
}
.field-unit.skill-cast::before {
  content: ''; position: absolute; left: 50%; top: 18px; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 2px solid var(--skc, #fff); border-radius: 50%; pointer-events: none;
  animation: castRing .62s ease-out forwards;
}
@keyframes castRing { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(2.6); } }
/* 目标身上的类型特效容器 */
.skill-fx { position: absolute; left: 50%; top: 16px; width: 0; height: 0; z-index: 11; pointer-events: none; }
.skill-fx .fx-beam {
  position: absolute; left: -9px; bottom: 0; width: 18px; height: 120px; border-radius: 10px;
  background: linear-gradient(0deg, var(--skc, #fff), transparent 92%); filter: blur(1px);
  transform-origin: bottom center; animation: fxBeam .6s ease-out forwards;
}
.skill-fx .fx-beam.down { bottom: auto; top: -130px; background: linear-gradient(180deg, var(--skc, #fff), transparent 92%); }
@keyframes fxBeam { 0% { opacity: 0; transform: scaleY(.1); } 30% { opacity: 1; transform: scaleY(1); } 100% { opacity: 0; transform: scaleY(.9); } }
.skill-fx .fx-shock {
  position: absolute; left: -34px; top: -14px; width: 68px; height: 28px; border: 2px solid var(--skc, #fff);
  border-radius: 50%; animation: fxShock .58s ease-out forwards;
}
@keyframes fxShock { 0% { opacity: .95; transform: scale(.2); } 100% { opacity: 0; transform: scale(2.2); } }
.skill-fx .fx-mist {
  position: absolute; left: -26px; top: -22px; width: 52px; height: 48px; border-radius: 50%;
  background: radial-gradient(circle, var(--skc, #9bcf5a), transparent 70%); opacity: 0;
  animation: fxMist .9s ease-out forwards;
}
@keyframes fxMist { 0% { opacity: 0; transform: scale(.4) translateY(6px); } 35% { opacity: .85; } 100% { opacity: 0; transform: scale(1.5) translateY(-14px); } }
.skill-fx .fx-bolt {
  position: absolute; left: -7px; top: -150px; width: 14px; height: 150px;
  background: linear-gradient(180deg, transparent, #fff 55%, var(--skc, #7fb8f0));
  box-shadow: 0 0 14px var(--skc, #7fb8f0); transform-origin: top center;
  animation: fxBolt .42s ease-in forwards;
}
@keyframes fxBolt { 0% { opacity: 0; transform: scaleY(.1) scaleX(1.6); } 30% { opacity: 1; transform: scaleY(1) scaleX(.7); } 100% { opacity: 0; transform: scaleY(1) scaleX(1.3); } }
/* 单位常驻状态角标：毒 / 晕 / 盲 / 锐 */
.fu-state { position: absolute; left: 50%; top: -10px; transform: translateX(-50%); display: flex; gap: 2px; z-index: 10; pointer-events: none; }
.fu-state i {
  display: inline-block; min-width: 14px; padding: 0 2px; font-style: normal; font-size: 10px; line-height: 14px;
  text-align: center; color: #fff; border-radius: 2px; box-shadow: 0 1px 3px #000;
  animation: statePulse 1.6s ease-in-out infinite;
}
.fu-state i.s-poison { background: #4e8a2e; }
.fu-state i.s-stun   { background: #a5801f; }
.fu-state i.s-blind  { background: #6a5490; }
.fu-state i.s-buff   { background: #b5752a; }
@keyframes statePulse { 0%, 100% { opacity: .78; } 50% { opacity: 1; } }
/* 原眩晕 ::after 改为描边，文字统一由状态角标呈现，避免重复"晕"字 */
.field-unit.stunned .fu-figure::after { content: ''; }
.field-unit.stunned .fu-figure { box-shadow: 0 0 0 2px #ffe08a, 0 0 12px rgba(255,224,138,.7); }
/* 合击连线光：两名合击者到目标各射一道光 */
.fx-link { position: absolute; height: 3px; border-radius: 2px; z-index: 11; pointer-events: none;
  background: linear-gradient(90deg, var(--skc, #ffe0a0), #fff); box-shadow: 0 0 8px var(--skc, #ffe0a0);
  transform-origin: left center; animation: fxLink .5s ease-out forwards; }
@keyframes fxLink { 0% { opacity: 0; transform: scaleX(.1); } 40% { opacity: 1; } 100% { opacity: 0; transform: scaleX(1); } }
/* 溃阵：整片棋盘闪红 + 轻微震动 */
.battle-field.formation-break { animation: breakShake .55s ease; }
@keyframes breakShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); box-shadow: inset 0 0 90px rgba(200,40,40,.55); }
  45% { transform: translateX(5px); }
  70% { transform: translateX(-3px); box-shadow: inset 0 0 80px rgba(200,40,40,.4); }
}
/* 阵型技横幅复用技能横幅，但带阵型色（金） */
.skill-banner.fx-form .sb-name { font-size: clamp(18px, 3.6vw, 30px); }
/* 频道消息与特效开关改为信息带内的静态元素，不再遮挡棋盘 */
.field-chat { flex: none; width: 230px; border: 1px solid rgba(212,180,108,.35); background: rgba(4,16,12,.78); border-radius: 2px; }
.field-chat .fc-tabs { display: flex; gap: 2px; padding: 2px 4px; border-bottom: 1px solid var(--line-soft); }
.field-chat .fc-tabs span { font-size: 9.5px; color: var(--muted); padding: 1px 4px; }
.field-chat .fc-tabs span.on { color: #1c1509; background: var(--gold); }
.field-chat .fc-body { height: 40px; overflow-y: auto; padding: 3px 6px; font-size: 9.5px; line-height: 1.6; color: #c8d8c8; }
.field-chat .fc-body p { margin: 0; }
.fx-toggle { flex: none; display: inline-flex; align-items: center; gap: 4px; }

@media (max-width: 900px) {
  .cmd-panel { grid-template-columns: 1fr; }
  .war-cols { grid-template-columns: 1fr; }
  .hang-panel { grid-template-columns: repeat(2, 1fr); }
  .battle-field { height: clamp(280px, 42vh, 360px); }
  .battle-info-row { gap: 10px; }
  .field-chat { width: 190px; }
  .mini-grid { width: 34px; height: 34px; }
}

/* ---------- 一键解雇工具栏（将领页） ---------- */
.fire-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; padding: 9px 12px; border: 1px solid var(--line-soft); border-radius: 3px; background: rgba(60,30,28,.16); }
.fire-bar .fb-label { font-size: 12px; color: var(--muted); }
.fire-bar .fb-q { min-width: 34px; }
.fire-bar .fb-all { border-color: #c0584a; color: #f0a08f; }
.fire-bar .fb-all:hover { background: rgba(192,88,74,.16); border-color: #e07a6a; }

/* ---------- 商城 ---------- */
.mall-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.mall-tab { padding: 5px 14px; font-size: 13px; border: 1px solid var(--line-soft); border-radius: 3px; cursor: pointer; color: var(--muted); background-color: rgba(13,43,37,.72); }
.mall-tab.on { background: linear-gradient(#e6c481, #b8914c); color: #1b1509; border-color: var(--gold); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(202px, 1fr)); gap: 12px; }
.shop-card { border: 1px solid var(--line-soft); border-left: 3px solid var(--qc, #d9b771); border-radius: 3px; padding: 12px; background: linear-gradient(180deg, rgba(20,56,49,.92), rgba(9,29,25,.95)); display: flex; flex-direction: column; gap: 8px; }
.shop-card .sc-name { font-family: var(--kai); font-size: 15px; color: #f0e2c0; }
.shop-card .sc-desc { font-size: 11px; color: var(--muted); line-height: 1.7; min-height: 38px; }
.shop-card .sc-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.shop-card .sc-own { font-size: 11px; color: var(--dim); margin-right: auto; }
.pay { font-size: 12px; padding: 2px 8px; border-radius: 10px; border: 1px solid; white-space: nowrap; }
.pay.coin { color: #e8c25a; border-color: rgba(232,194,90,.4); background: rgba(232,194,90,.08); }
.pay.yuan { color: #f0c14b; border-color: rgba(240,193,75,.4); background: rgba(240,193,75,.08); }
.btn-buy { border-color: #6fae7c; color: #9fe0b0; }
.btn-buy:hover { background: rgba(111,174,124,.16); }
.btn-buy5 { border-color: #7fb8f0; color: #a9d2f0; }

/* ---------------- 充值页 ---------------- */
.rc-wrap { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.rc-qr-card { border: 1px solid var(--gold, #d9b771); border-radius: 4px; padding: 14px; background: linear-gradient(180deg, rgba(20,56,49,.95), rgba(9,29,25,.97)); text-align: center; position: sticky; top: 8px; }
.rc-qr-title { font-family: var(--kai); font-size: 17px; color: #f0e2c0; margin-bottom: 4px; }
.rc-qr-name { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.rc-qr-name b { color: #9fe0b0; }
.rc-qr { width: 100%; max-width: 246px; border-radius: 3px; background: #fff; padding: 6px; box-sizing: border-box; display: block; margin: 0 auto; }
.rc-qr-tip { font-size: 11px; color: var(--dim); margin-top: 10px; line-height: 1.6; }
.rc-side { min-width: 0; }
.rc-sub { font-family: var(--kai); font-size: 15px; color: #f0e2c0; margin-bottom: 10px; }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.rc-card { position: relative; border: 1px solid var(--line-soft); border-radius: 4px; padding: 14px 12px; background: linear-gradient(180deg, rgba(20,56,49,.92), rgba(9,29,25,.95)); text-align: center; display: flex; flex-direction: column; gap: 6px; }
.rc-card.hot { border-color: rgba(224,167,92,.55); box-shadow: 0 0 12px rgba(224,167,92,.18) inset; }
.rc-flag { position: absolute; top: -1px; right: -1px; background: linear-gradient(#e6c481,#b8914c); color: #1b1509; font-size: 10px; padding: 2px 8px; border-radius: 0 4px 0 4px; }
.rc-rm { font-family: var(--kai); font-size: 22px; color: #f0e2c0; }
.rc-yuan { font-size: 13px; color: #9fe0b0; }
.rc-card .btn-buy { margin-top: 4px; }
.rc-pay-qr { text-align: center; margin-bottom: 12px; }
.rc-pay-qr .rc-qr { max-width: 240px; }
.rc-pay-amount { text-align: center; font-size: 15px; margin-bottom: 10px; }
.rc-pay-amount .gold, .rc-pay-note b { color: #f0c14b; }
.rc-pay-note { font-size: 12.5px; color: var(--muted); line-height: 1.9; background: rgba(3,12,9,.5); border: 1px solid var(--line-soft); border-radius: 3px; padding: 10px 12px; }
@media (max-width: 720px) { .rc-wrap { grid-template-columns: 1fr; } .rc-qr-card { position: static; } }
.btn-buy5:hover { background: rgba(127,184,240,.16); }

/* ---------- 副本：区域与关卡轨道 ---------- */
.region-block { border: 1px solid var(--line-soft); border-radius: 3px; padding: 12px 14px; margin-bottom: 14px; background: linear-gradient(180deg, rgba(16,48,42,.82), rgba(9,28,24,.9)); }
.rb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rb-head h3 { font-family: var(--kai); font-size: 17px; color: #f0e2c0; margin: 0; }
.rb-dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 8px currentColor; flex: 0 0 auto; }
.rb-desc { font-size: 11.5px; color: var(--muted); }
.rb-heroes { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dungeon-card { border: 1px solid var(--line-soft); border-left: 3px solid #b8914c; border-radius: 3px; padding: 11px 13px; margin-bottom: 10px; background: rgba(10,32,28,.75); }
.dungeon-card.done { border-left-color: #6fae7c; }
.dc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.dc-name { font-family: var(--kai); font-size: 16px; color: #f0e2c0; }
.dc-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.dc-prog { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dtrack { display: flex; gap: 4px; flex-wrap: wrap; margin: 10px 0 8px; }
.dnode { width: 24px; height: 24px; line-height: 22px; text-align: center; font-size: 10.5px; border-radius: 2px; border: 1px solid var(--line-soft); color: var(--dim); background: rgba(255,255,255,.02); }
.dnode.done { color: #1b1509; background: linear-gradient(#e6c481,#b8914c); border-color: var(--gold); }
.dnode.boss { border-color: #c0584a; color: #f0a08f; }
.dnode.boss.done { background: linear-gradient(#e0897a,#b04a3c); color: #1b1509; }
.dnode.final { width: 30px; border-color: #d4b46c; color: #f0c87a; font-family: var(--kai); font-size: 12px; }
.dc-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- 通天塔 ---------- */
.tower-banner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border: 1px solid var(--line-gold, rgba(212,180,108,.35)); border-radius: 3px; padding: 16px 18px; margin-bottom: 12px; background: radial-gradient(circle at 12% 30%, rgba(212,180,108,.16), rgba(9,28,24,.92) 62%); }
.tower-banner .tb-num { font-family: var(--kai); font-size: 46px; line-height: 1; color: #f0c87a; text-shadow: 0 0 16px rgba(240,200,122,.35); }
.tower-banner .tb-label { font-size: 11px; color: var(--muted); letter-spacing: 2px; }
.tower-banner .tb-sub { font-size: 12px; color: #d9e2d5; margin-top: 4px; }
.tower-banner .tb-actions { margin-left: auto; }
.ttrack { display: flex; gap: 5px; flex-wrap: wrap; }
.tnode { width: 30px; height: 30px; line-height: 28px; text-align: center; font-size: 11px; border-radius: 2px; border: 1px solid var(--line-soft); color: var(--dim); background: rgba(255,255,255,.02); }
.tnode.done { color: #1b1509; background: linear-gradient(#e6c481,#b8914c); border-color: var(--gold); }
.tnode.boss { border-color: #c0584a; color: #f0a08f; }
.tnode.boss.done { background: linear-gradient(#e0897a,#b04a3c); color: #1b1509; }
.tnode.cur { border-color: #8fe0ae; color: #9fe0b0; box-shadow: 0 0 8px rgba(143,224,174,.5); }

/* ---------- VIP ---------- */
.vip-banner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border: 1px solid rgba(212,180,108,.35); border-radius: 3px; padding: 16px 18px; margin-bottom: 12px; background: radial-gradient(circle at 12% 30%, rgba(212,180,108,.18), rgba(9,28,24,.92) 62%); }
.vb-badge { font-family: var(--kai); font-size: 26px; color: #1b1509; background: linear-gradient(#f0d79a,#b8914c); padding: 8px 18px; border-radius: 3px; letter-spacing: 1px; }
.vb-main { flex: 1; min-width: 220px; }
.vb-line { font-size: 12.5px; color: #d9e2d5; margin-bottom: 8px; }
.vb-sub { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.vip-bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.vip-bar i { display: block; height: 100%; background: linear-gradient(90deg, #b8914c, #f0d79a); }
.vip-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.vip-table th, .vip-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line-soft); }
.vip-table th { color: var(--muted); font-weight: normal; }
.vip-table tr.vip-on td { color: #f0e2c0; }

/* ============================================================
 * 全站交互动画：成功 / 失败反馈、页面与卡片入场、弹窗演出
 * ============================================================ */

/* 页面切换：面板依次浮入 */
#content .panel { animation: panelIn .34s ease-out both; }
#content .panel:nth-child(2) { animation-delay: .05s; }
#content .panel:nth-child(3) { animation-delay: .1s; }
#content .panel:nth-child(4) { animation-delay: .15s; }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* 弹窗入场 */
.modal { animation: modalIn .26s cubic-bezier(.2,.9,.3,1.2); }
@keyframes modalIn { from { opacity: 0; transform: scale(.92) translateY(14px); } to { opacity: 1; transform: none; } }

/* Toast：成功上浮辉光、失败摇晃 */
.toast { animation: toastIn .26s cubic-bezier(.2,.9,.3,1.25); }
.toast.good { animation: toastIn .26s cubic-bezier(.2,.9,.3,1.25), goodGlow 1.6s ease .1s; border-width: 1px; }
.toast.bad { animation: toastIn .26s cubic-bezier(.2,.9,.3,1.25), errShake .42s ease .12s; }
@keyframes goodGlow {
  0%, 100% { box-shadow: 0 4px 18px rgba(90,200,140,.0); }
  35% { box-shadow: 0 0 22px rgba(110,220,160,.55); }
}
@keyframes errShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  45% { transform: translateX(6px); }
  70% { transform: translateX(-4px); }
  90% { transform: translateX(2px); }
}

/* 按钮：按下回弹、成功绿闪、失败红闪 */
.btn:active, .btn-mini:active, .btn-primary:active { transform: scale(.96); transition: transform .08s; }
.btn.ok-flash, .btn-mini.ok-flash { animation: okFlash .7s ease; }
.btn.err-shake, .btn-mini.err-shake { animation: errShake .45s ease; }
@keyframes okFlash {
  0%, 100% { box-shadow: 0 0 0 rgba(110,220,160,0); }
  35% { box-shadow: 0 0 16px rgba(110,220,160,.75); border-color: #6fd69a; }
}

/* 战斗结算：胜利金字闪耀 / 失败下沉暗淡 */
.result-box { animation: panelIn .4s ease-out both; }
.result-box h2.win { animation: winShine 1.8s ease .15s infinite, panelIn .4s ease-out both; }
.result-box h2.lose { animation: loseSink .7s ease both; }
@keyframes winShine {
  0%, 100% { text-shadow: 0 0 26px rgba(240,200,120,.45); }
  50% { text-shadow: 0 0 42px rgba(255,220,150,.9), 0 0 12px rgba(255,180,90,.8); }
}
@keyframes loseSink { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }

/* 奖励条目：逐个弹出 */
.result-box .reward-line { animation: popIn .38s cubic-bezier(.2,.9,.3,1.3) both; }
.result-box .reward-line:nth-child(1) { animation-delay: .08s; }
.result-box .reward-line:nth-child(2) { animation-delay: .16s; }
.result-box .reward-line:nth-child(3) { animation-delay: .24s; }
.result-box .reward-line:nth-child(4) { animation-delay: .32s; }
.result-box .reward-line:nth-child(5) { animation-delay: .4s; }
.result-box .reward-line:nth-child(6) { animation-delay: .48s; }
.result-box .reward-line:nth-child(7) { animation-delay: .56s; }
.result-box .reward-line:nth-child(n+8) { animation-delay: .64s; }
@keyframes popIn { from { opacity: 0; transform: scale(.6) translateY(8px); } to { opacity: 1; transform: none; } }

/* 招贤纳士：名将卡加金光脉冲，普通卡翻入已有 cardIn */
.gacha-card.hero { animation: cardIn .45s ease-out both, heroPulse 2.2s ease .5s infinite; }
@keyframes heroPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(224,189,114,.4); }
  50% { box-shadow: 0 0 30px rgba(240,210,140,.85); }
}

/* 将领 / 商城 / 背包卡片入场 */
.hero-card, .shop-card, .dungeon-card, .region-block { animation: panelIn .32s ease-out both; }
.hero-card:nth-child(2), .shop-card:nth-child(2), .dungeon-card:nth-child(2) { animation-delay: .04s; }
.hero-card:nth-child(3), .shop-card:nth-child(3), .dungeon-card:nth-child(3) { animation-delay: .08s; }
.hero-card:nth-child(4), .shop-card:nth-child(4), .dungeon-card:nth-child(4) { animation-delay: .12s; }
.hero-card:nth-child(n+5), .shop-card:nth-child(n+5), .dungeon-card:nth-child(n+5) { animation-delay: .16s; }

/* 副本 / 通天塔进度节点：完成时点亮弹跳 */
.dnode.done, .tnode.done { animation: nodeLight .5s cubic-bezier(.2,.9,.3,1.4) both; }
.dnode.cur, .tnode.cur { animation: nodeCur 1.6s ease infinite; }
@keyframes nodeLight { from { transform: scale(.5); opacity: .3; } to { transform: scale(1); opacity: 1; } }
@keyframes nodeCur {
  0%, 100% { box-shadow: 0 0 6px rgba(143,224,174,.5); }
  50% { box-shadow: 0 0 16px rgba(143,224,174,.95); }
}

/* VIP 徽章与进度条 */
.vb-badge { animation: badgeIn .5s cubic-bezier(.2,.9,.3,1.35) both; }
@keyframes badgeIn { from { opacity: 0; transform: scale(.6) rotate(-8deg); } to { opacity: 1; transform: none; } }
.vip-bar i { animation: barGrow .8s ease-out both; }
@keyframes barGrow { from { width: 0 !important; } }

/* 金币 / 元宝变动提示（顶栏资源徽标闪烁提醒） */
.chip { transition: color .3s; }
.chip.flash { animation: goodGlow 1.2s ease; }

/* ---------------- 拍卖行 ---------------- */
.auc-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid rgba(212,180,108,.18); border-radius: 6px; background: rgba(255,255,255,.02); margin-bottom: 8px; animation: panelIn .45s ease both; flex-wrap: wrap; }
.auc-row:hover { border-color: rgba(212,180,108,.4); background: rgba(255,255,255,.04); }
.auc-item { min-width: 190px; display: flex; align-items: center; gap: 6px; }
.auc-item b { font-family: var(--kai); font-size: 14px; }
.auc-meta { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 260px; }
.auc-acts { display: flex; gap: 6px; align-items: center; }
.gift-cell.sel { border-color: var(--gold) !important; box-shadow: 0 0 8px rgba(224,189,114,.35); cursor: pointer; }
.gift-cell[data-act="aucselsel"] { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.gift-cell[data-act="aucselsel"]:hover { transform: translateY(-2px); box-shadow: 0 0 10px rgba(224,189,114,.25); }
.auc-form .row { align-items: center; }
.auc-form input[type="number"] { background: rgba(0,0,0,.25); border: 1px solid rgba(212,180,108,.3); color: var(--ink, #e8dcc0); border-radius: 4px; padding: 4px 8px; }
.asc-btn { color: #f0c14b; border-color: #f0c14b; font-weight: 700; animation: badgeIn .5s cubic-bezier(.2,.9,.3,1.35) both; }
.asc-btn:hover { background: rgba(240,193,75,.15); box-shadow: 0 0 10px rgba(240,193,75,.4); }

/* 全服大喇叭横幅 */
#horn-banner { position: fixed; top: -120px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; align-items: center; gap: 12px; max-width: 720px; width: calc(100% - 40px); padding: 12px 18px; background: linear-gradient(135deg, #4a2c08, #7a4a10); border: 2px solid #f0c14b; border-radius: 10px; box-shadow: 0 6px 30px rgba(240,193,75,.45), 0 0 40px rgba(240,120,40,.25); opacity: 0; pointer-events: none; transition: top .5s cubic-bezier(.2,.9,.3,1.3), opacity .5s; }
#horn-banner.show { top: 18px; opacity: 1; pointer-events: auto; }
.horn-icon { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffd97a, #c8860c); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #5a3400; animation: hornShake 1s ease infinite; }
.horn-text { color: #ffe9b0; font-family: var(--kai); font-size: 15px; line-height: 1.5; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
@keyframes hornShake { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }

/* 装备卸除：格子上的「卸」按钮与选择弹窗的穿戴标记 */
.eq-uneq { position: absolute; right: 2px; bottom: 2px; width: 18px; height: 18px; padding: 0; font-size: 10px; line-height: 16px; text-align: center; border-radius: 3px; border: 1px solid rgba(232,122,122,.55); background: rgba(40,16,16,.85); color: #e8a39a; cursor: pointer; z-index: 2; }
.eq-uneq:hover { background: #7a2b2b; color: #fff; border-color: #e8a39a; }
.eq-worn { margin-top: 4px; font-size: 10px; color: #8fe0ae; }

/* ============================================================
 * 装备谱：数值体系 / 套装总表 / 掉落与几率 / 飞升装备
 * ============================================================ */
.eqx-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.eqx-tab { padding: 6px 18px; font-size: 13px; font-family: var(--kai); border: 1px solid var(--line-soft); border-radius: 3px; cursor: pointer; color: var(--muted); background: rgba(13,43,37,.72); transition: transform .18s, box-shadow .18s, background .18s; }
.eqx-tab:hover { transform: translateY(-2px); box-shadow: 0 3px 12px rgba(224,189,114,.18); }
.eqx-tab.on { background: linear-gradient(#e6c481, #b8914c); color: #1b1509; border-color: var(--gold); font-weight: 700; }
.eqx-scroll { overflow-x: auto; }
.eqx-table { width: 100%; border-collapse: collapse; font-size: 11.5px; line-height: 1.65; }
.eqx-table th, .eqx-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.eqx-table th { color: var(--muted); font-weight: normal; white-space: nowrap; }
.eqx-table tbody tr { animation: eqxFade .32s ease both; }
.eqx-table tbody tr:hover td { background: rgba(224,189,114,.06); }
.eqx-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eqx-table tr.eqx-hl td { background: rgba(255,126,168,.08); }
@keyframes eqxFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.eqx-w { display: inline-block; margin: 0 6px 2px 0; padding: 0 5px; border: 1px solid currentColor; border-radius: 2px; font-size: 10px; white-space: nowrap; }
.eqx-formula { padding: 12px 14px; margin-bottom: 12px; background: linear-gradient(180deg, rgba(20,56,49,.94), rgba(9,29,25,.95)); border: 1px solid rgba(212,180,108,.18); border-left: 2px solid var(--gold2); }
.eqx-fh { font-family: var(--kai); font-size: 14px; color: var(--gold); letter-spacing: 4px; margin-bottom: 8px; }
.eqx-fl { margin: 4px 0; overflow-x: auto; }
.eqx-fl code { display: inline-block; padding: 4px 8px; background: rgba(0,0,0,.28); border-radius: 3px; color: #a8e6c8; font-size: 11.5px; white-space: nowrap; }
.eqx-fn { margin-top: 8px; font-size: 11px; color: var(--muted); line-height: 1.9; }
.eqx-set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; margin-bottom: 12px; }
.eqx-set { padding: 10px 12px; background: linear-gradient(180deg, rgba(20,56,49,.94), rgba(9,29,25,.95)); border: 1px solid var(--qc, rgba(212,180,108,.3)); border-radius: 4px; animation: eqxFade .35s ease both; transition: transform .18s, box-shadow .18s; }
.eqx-set:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.eqx-set.asc { background: linear-gradient(180deg, rgba(64,42,20,.92), rgba(24,17,9,.96)); border-color: #f0c14b; box-shadow: inset 0 0 18px rgba(240,193,75,.09); }
.eqx-sh { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--line-soft); padding-bottom: 6px; }
.eqx-sh b { font-family: var(--kai); font-size: 16px; color: var(--qc, var(--gold)); letter-spacing: 1px; }
.eqx-sh span { font-size: 11px; }
.eqx-sm { margin: 7px 0; font-size: 11px; color: var(--muted); line-height: 1.8; }
.eqx-asc-tag { color: #f0c14b; font-weight: 700; }
.eqx-sb { display: grid; gap: 3px; margin-bottom: 8px; }
.eqx-b { display: flex; gap: 8px; align-items: baseline; font-size: 11px; padding: 2px 6px; background: rgba(0,0,0,.2); border-radius: 2px; }
.eqx-b i { flex: 0 0 34px; font-style: normal; color: var(--muted); }
.eqx-b.max { background: rgba(224,189,114,.12); }
.eqx-b.max span { color: var(--gold); font-weight: 700; }
.eqx-sf { font-size: 10.5px; color: #9fd6b4; line-height: 1.7; }
.eqx-sd { margin-top: 4px; font-size: 10.5px; color: var(--muted); line-height: 1.7; }

/* ============================================================
 * v2.0 —— 宝箱行按钮、剧情弹窗、好友 / 宗族 / PK 页面
 * ============================================================ */
/* 优化 18：宝箱行有 6 个子元素，原 5 列网格会把「挑战抢夺」挤到下一行并压成竖排 */
.box-row { grid-template-columns: 24px 1.2fr .9fr .8fr .55fr auto; }
.box-row .btn-mini { white-space: nowrap; min-width: 84px; text-align: center; padding-left: 8px; padding-right: 8px; }
.box-row .chip { white-space: nowrap; }
.box-row > * { min-width: 0; }

/* 战前剧情 / 剧情回看 */
.ex-story-stage { min-height: 150px; max-height: 300px; overflow-y: auto; padding: 4px 2px; }
.ex-story-line { display: flex; gap: 12px; align-items: flex-start; padding: 9px 12px; margin-bottom: 8px;
  border: 1px solid var(--line-soft); border-left: 2px solid var(--gold2); border-radius: 3px;
  background: rgba(6, 22, 18, .6); animation: exFade .3s ease both; }
.ex-story-line[data-narr="1"] { border-left-color: #6f9f8c; background: rgba(4, 14, 12, .5); font-style: italic; }
.ex-story-line.cur { border-color: rgba(212, 180, 108, .6); box-shadow: 0 0 14px rgba(212, 180, 108, .12); }
.ex-story-who { flex: 0 0 62px; font-family: var(--kai); font-size: 13px; color: var(--gold); letter-spacing: 1px; }
.ex-story-line[data-narr="1"] .ex-story-who { color: #8fb7a6; }
.ex-story-text { flex: 1; min-width: 0; font-size: 13px; line-height: 1.9; color: #e6ddc4; }
@keyframes exFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 好友 / 宗族 / PK 页面 */
#ex-chat-log { min-height: 120px; }
#ex-chat-log .chat-line { padding: 3px 2px; border-bottom: 1px dashed rgba(212, 180, 108, .1); }
.quest-row .qr-desc .pbar { height: 5px; background: #04110e; border-radius: 3px; overflow: hidden; }
.quest-row .qr-desc .pbar i { display: block; height: 100%; background: var(--gold2); }
.quest-row .row { flex: 0 0 auto; }
.ex-story-stage::-webkit-scrollbar, #ex-chat-log::-webkit-scrollbar { width: 6px; }
.ex-story-stage::-webkit-scrollbar-thumb, #ex-chat-log::-webkit-scrollbar-thumb { background: rgba(212, 180, 108, .35); border-radius: 3px; }

/* ============================================================
 * v3.0 —— 共斗房间 / 5×5 战场布置 / 共斗任务
 * ============================================================ */
.coop-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 4px 0 10px; }
.coop-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 62px; padding: 4px; border: 1px solid var(--line-soft); border-radius: 3px;
  background: rgba(4, 18, 14, .62); color: #c9d3c8; cursor: pointer; font-family: inherit;
  transition: border-color .18s, background .18s, transform .18s; }
.coop-cell:hover:not(:disabled) { border-color: var(--gold2); background: rgba(18, 42, 33, .8); transform: translateY(-1px); }
.coop-cell.taken { border-color: rgba(212, 180, 108, .55); background: rgba(28, 48, 38, .72); color: #f0e2c0; cursor: default; }
.coop-cell.mine { border-color: #eaf03c; box-shadow: inset 0 0 12px rgba(234, 240, 60, .12); }
.coop-cell.ready { border-color: #5fbf72; }
.coop-cell:disabled { opacity: .92; }
.cc-no { position: absolute; top: 3px; left: 5px; font-size: 10px; color: #7f9b8c; }
.cc-name { font-family: var(--kai); font-size: 14px; letter-spacing: 1px; }
.cc-state { font-size: 10px; margin-top: 3px; color: #8fb7a6; }
.coop-cell.mine .cc-name { color: #eaf03c; }
.quest-row .qr-icon { flex: 0 0 34px; text-align: center; }
