/* Our Match卡牌对战 - 全局样式 */
:root {
  --bg: #f4f2ee;
  --panel: #ffffff;
  --ink: #2c2a26;
  --muted: #8a8578;
  --accent: #c8553d;
  --accent-dark: #a53f2a;
  --blue: #3d7ea6;
  --ok: #3a8f5d;
  --warn: #c9862b;
  --danger: #b33a3a;
  --border: #e2ddd2;
  --radius: 12px;
  /* 「1% 可视高度」: 必须用 JS 写进来的 --app-h, 不能用 vh。
     iOS/iPadOS 的 Safari 在滚动时工具栏会收放, vh 跟着变 → 用 vh 定尺寸的东西
     (卡牌宽高/行高/整屏高度)会整体跳一下, 用户看到的就是「一操作一闪」(2026-10-23)。
     桌面端 --app-h = innerHeight, 与 100vh 等价, 不受影响。 */
  --vu: calc(var(--app-h, 100vh) / 100);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  /* 不要用 100vh: iOS/iPadOS Safari 的 vh 是「大视口」(工具栏收起时的高度),
     比真实可视区域高 → 页面永远多出几十像素可滚 → 一碰就滚 → 工具栏收放
     → 视口高度变化 → 整场重排。用户描述为「iPad 一操作一闪」(2026-10-23)。
     --app-h 由 mobile.js 写入真实可视高度, 桌面端与 100vh 等价。 */
  min-height: var(--app-h, 100vh);
}
button { font-family: inherit; cursor: pointer; }
.spacer { flex: 1; }
.hint { color: var(--muted); font-size: 13px; }

/* ---------- 通用控件 ---------- */
.btn {
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 14px; font-size: 14px;
  transition: all .15s;
}
.btn:hover:not(:disabled) { border-color: var(--muted); transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn.danger { color: var(--danger); border-color: #e5c4c4; }
.btn.big { padding: 12px 26px; font-size: 16px; }
.link-btn {
  background: none; border: none; color: var(--blue);
  text-decoration: underline; font-size: inherit; padding: 0;
}
.link-btn.danger-text { color: var(--danger); }
.mini-btn {
  background: rgba(0,0,0,.55); color: #fff; border: none;
  border-radius: 6px; padding: 3px 8px; font-size: 12px; margin-top: 4px;
}
.mini-btn.corner { position: absolute; top: 4px; right: 4px; margin: 0; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
/* 全屏态下顶栏避开刘海/状态栏: 大厅以前会退全屏, 现在为保住横屏方向锁要保留全屏
   (见 Mobile.releaseFullscreen), 不清出安全区的话刘海会压住「← 返回」。桌面 env()=0 无影响。 */
html.fs-on .topbar { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
.deck-name-input {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 12px; font-size: 15px; width: 200px;
}
.deck-counter { font-size: 14px; color: var(--muted); }
.deck-counter b { font-size: 17px; }
.deck-counter.ok b { color: var(--ok); }
.deck-counter.warn b { color: var(--warn); }

/* ---------- 卡牌 ---------- */
.card-thumb {
  position: relative; width: 132px; border-radius: 9px;
  overflow: visible; cursor: pointer; flex-shrink: 0;
  transition: transform .12s;
  /* 触屏(iPad/平板): 长按卡图会弹出系统的「存储图像/拷贝」菜单, 并把这一下按压吞掉,
     表现正是「按了没反应 / 详情弹不出来」。卡面本来也不需要选文本, 直接关掉。
     (2026-11-12 训练员反馈「平板端对手攻击时无法查看手牌详情」的安全网之一) */
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
.card-thumb:hover { transform: translateY(-3px); z-index: 5; }
/* 卡面层: 只包住卡图本身(闪卡反光/横置旋转都挂在它上面, 所以永远和图片同尺寸) */
/* background-* 是对局内的防闪兜底: 同一张图同时铺在容器背景上(见 ui.js cardThumb),
   <img> 重建后哪怕还在解码, 底层也已经画出卡面, 不会白闪一帧 */
.card-thumb .ct-face {
  position: relative; display: block; width: 100%; border-radius: 9px;
  background-size: 100% 100%; background-position: center; background-repeat: no-repeat;
}
.card-thumb img {
  width: 100%; display: block; border-radius: 9px;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
/* 横置只旋转不缩放, 保持原大小; 横躺的卡叠在相邻卡上方 */
.card-thumb.rested { z-index: 2; }
.card-thumb.rested .ct-face { transform: rotate(-90deg); margin: 18px 0; }
/* 卡图本身按「横置」画的卡(YNSU-02「超市S的休息区」, 原图 1000×727 文字是正的):
   这张卡横置时如果再转 -90°, 文字就躺倒了 —— 卡图已经"躺着", 不再旋转(用户口径 2026-10-23)。 */
.card-thumb.art-landscape.rested .ct-face { transform: none; margin: 0; }

/* 2026-11-18: 场上应援卡的「杀马特」三色大字。
   训练员口径: 这三个字**只出现在场上的应援卡**上 —— 手牌 / 废弃区 / 卡组界面 / 图鉴一律不要,
   所以卡图里不再烧字(当晚重出了 18 张干净版), 改由 battle.js renderSupports 动态叠加;
   判据是「卡面特征 + 效果改写(s.traitAdd) + 头套(token)」, 于是效果现场改特征时会立刻出现。
   尺寸交给 SVG 的 viewBox 等比缩放(卡宽在战场上由 --sup-w / 各断点决定, px 字号对不上);
   这里只负责贴到卡面上部, 并绕容器正中斜 4°(与旧卡图里那枚戳同角度)。 */
.card-thumb .ct-face .sar-mark {
  position: absolute; left: 0; top: 0; width: 100%; height: auto;
  display: block; pointer-events: none; z-index: 4;
  transform: rotate(-4deg); transform-origin: 50% 50%;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.45));
}

.card-badge {
  position: absolute; left: 4px; bottom: 4px;
  background: rgba(0,0,0,.62); color: #fff;
  font-size: 11px; padding: 2px 7px; border-radius: 5px;
  max-width: calc(100% - 8px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 手牌里的技能卡被减费/加费时: 角标改写「费N」并换色(训练员 2026-10-28)
   —— 绿=便宜了、红=贵了, 与卡面「N级」的黑底区分开, 一眼看出这张现在是几费 */
.card-badge.cost-down { background: rgba(22,124,74,.92); color: #eafff2; font-weight: 700; }
.card-badge.cost-up   { background: rgba(150,40,40,.92); color: #fff0f0; font-weight: 700; }
/* 选上场应援卡的弹窗(网格): 卡图下面标出场上位置「对手场上左起第3张」——
   同名卡(两张「沃尔特·C·德尼斯」等)只看卡图分不清是哪一张, 用户反馈 2026-10-23。 */
.pool-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pool-cell .pos-line {
  font-size: 11px; line-height: 1.25; text-align: center;
  color: var(--ink-dim, #8a8a8a); max-width: 132px;
}
/* 力量被效果改变: 新数值盖住原本力量, 上升=绿色 / 下降=红色, 原值小字划线垫在下方 */
.power-badge { display: inline-flex; align-items: baseline; line-height: 1.1; }
.power-badge .power-now { font-size: 13px; font-weight: 800; color: #fff; letter-spacing: .3px; }
/* 力量变化: 高于原本力量=红色 / 低于原本力量=绿色 */
.power-badge.up .power-now { color: #ff5a5a; text-shadow: 0 0 6px rgba(255, 90, 90, .6); }
.power-badge.down .power-now { color: #4ade80; text-shadow: 0 0 5px rgba(74, 222, 128, .55); }
/* 「本次战斗中此卡卡名当作X」(WDF-020 中野一花 [进攻], 训练员 2026-11-03 报障)。
   挂在力量角标(text .card-badge, left:4/bottom:4)上方一格, 同样是"卡面太小只能放几个字"的处理:
   写「名→中野五月」, 完整说明走 title 悬停。紫色与力量红绿、关键词方块区分开。 */
/* 系列注册的场上状态角标(如 XSG-07 的 ⛓ 铁索连环): 左下方, 坐在力量角标上方 */
.field-badge {
  position: absolute; left: 4px; bottom: 24px; z-index: 6;
  background: rgba(60, 60, 72, .92); color: #ffe9a8;
  font-size: 10px; line-height: 1.2; padding: 1px 5px; border-radius: 999px;
  border: 1px solid rgba(255, 220, 130, .5);
  pointer-events: none; white-space: nowrap;
}
.alias-chip {
  position: absolute; left: 4px; bottom: 24px; z-index: 6;
  background: rgba(112, 66, 168, .92); color: #fff;
  font-size: 9px; line-height: 1.25; padding: 1px 4px; border-radius: 4px;
  max-width: calc(100% - 8px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  pointer-events: none;
}
/* 「当作本家卡使用」(LN-018 社团创作随机洗入的卡): 右下角一枚绿色小标签。
   位置让开左下的力量角标与左上的关键词/进攻源标记, 绿色也与力量涨跌(红/绿)区分得开。 */
.card-home-tag {
  position: absolute; right: 4px; bottom: 4px; z-index: 6;
  background: rgba(34, 128, 82, .92); color: #fff;
  font-size: 9px; line-height: 1.25; padding: 1px 4px; border-radius: 4px;
  pointer-events: none;
}
.card-count {
  position: absolute; right: -4px; top: -6px;
  background: var(--accent); color: #fff;
  min-width: 24px; height: 24px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; padding: 0 5px;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.card-tags {
  position: absolute; top: 4px; left: 4px;
  background: rgba(61,126,166,.9); color: #fff;
  font-size: 11px; padding: 2px 6px; border-radius: 5px;
}
/* 战斗关键词卡面标记(训练员 2026-10-28「突进,独战,贯通这些效果要标记出来」)
   左上角一排单字方块: 速=速攻 / 突=突进 / 独=独战 / 贯=贯通。
   为什么用单字: 卡面在手机上只有 60~90px 宽, 写全称会盖住卡图; 完整说明走悬停 title。
   与 .card-tags(进攻源/休息…)同处左上角, 同时存在时 .pushed 让位一行。 */
.kw-mini {
  position: absolute; top: 3px; left: 3px; z-index: 5;
  display: flex; gap: 2px; pointer-events: none;
}
.kw-mini.pushed { top: 21px; }
/* 训练员 2026-11-03:「独」「突」这些标记缩小」——
   原来 17px(卡面 60px 宽时占 28%), 一排放三枚就盖掉小半张卡图。
   收到 12px(单字仍看得清), 圆角/描边同步收一档; 完整说明照旧走 title 悬停。 */
.kw-mini .kwi {
  width: 12px; height: 12px; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 800; line-height: 1; color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.42);
  border: 1px solid rgba(255,255,255,.4);
}
.kwi-swift  { background: linear-gradient(135deg, #3aa0d8, #1f6c9b); }   /* 速攻 */
.kwi-rush   { background: linear-gradient(135deg, #f0a63c, #c4731a); }   /* 突进 */
.kwi-solo   { background: linear-gradient(135deg, #b564d8, #7b2fa6); }   /* 独战 */
.kwi-pierce { background: linear-gradient(135deg, #e05252, #9c2424); }   /* 贯通 */
/* 加护(RE0-036「剑圣的加护」) —— 训练员 2026-11-13:「把加护的显示放到领袖上, 点开领袖详情可见,
   就跟应援卡获得效果时的写法一样, 要双方玩家可见」。
   形态与上面速/突/独/贯完全一致(同一套 .kw-mini>.kwi 方块), 唯一的区别是它**可以点**:
   点开 = 加护清单(名称/层数/说明 + 无手/传心两项的发动按钮), 所以这里收回 pointer-events:none。 */
.kw-mini.grace-mini { pointer-events: auto; cursor: pointer; }
.kwi-grace { background: linear-gradient(135deg, #4fc3a1, #1f7a5c); }   /* 加护 */
.kwi-more  { letter-spacing: -1px; }
/* 有能立刻发动的加护(无手的加护/传心的加护)时轻微呼吸, 提示「这里可以点」 */
.grace-mini.grace-ready .kwi-grace {
  box-shadow: 0 0 6px rgba(79,195,161,.85), 0 1px 3px rgba(0,0,0,.42);
  animation: graceBreath 1.6s ease-in-out infinite;
}
@keyframes graceBreath {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-1px); }
}
/* 不会被破坏(义体增幅等): 金色描边 + 右上角小盾牌图标(旧的大文字标签太挡卡面, 已改小) */
.prot-mini {
  position: absolute; top: 2px; right: 2px; z-index: 4;
  width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; line-height: 1; pointer-events: auto;
  background: linear-gradient(135deg, #d4af37, #8a6d1d);
  box-shadow: 0 0 6px rgba(212,175,55,.5), 0 1px 3px rgba(0,0,0,.4);
  border: 1px solid rgba(255, 235, 170, .7);
}
.card-thumb.protected { outline: 2px solid #d4af37; outline-offset: 1px; border-radius: 10px; }
/* 「不会被效果破坏」(POR-17 / LN-002 / 月读的世界 / 一花光环 等): 只挡效果破坏, 战斗失败照样被破坏。
   与上面「不会被破坏」刻意用不同色温(紫 vs 金) + 角标多一个「效」字 —— 训练员 2026-10-28 要求分开。
   双类抬特异性, 压过后面同档的 `.card-thumb.usable`(同 rest-locked 那次的坑)。 */
.card-thumb.protected-fx { outline: 2px solid #9a6fe0; outline-offset: 1px; border-radius: 10px; }
.card-thumb.protected-fx.protected-fx { outline: 2px solid #9a6fe0; }
.protfx-mini {
  position: absolute; top: 2px; right: 2px; z-index: 4;
  width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; line-height: 1; pointer-events: auto;
  background: linear-gradient(135deg, #b18cf0, #5b3a9e);
  box-shadow: 0 0 6px rgba(154,111,224,.55), 0 1px 3px rgba(0,0,0,.4);
  border: 1px solid rgba(226, 208, 255, .8);
}
/* 角标右下角的「效」字: 17px 的盾牌里塞不下整句, 用一个小字标出"只管效果" */
.protfx-mini .protfx-tag {
  position: absolute; right: -3px; bottom: -4px;
  font-style: normal; font-size: 7px; font-weight: 800; line-height: 1;
  padding: 1px 2px; border-radius: 3px;
  color: #2b1a4d; background: linear-gradient(135deg, #e8dcff, #c3a6f5);
  border: 1px solid rgba(90, 60, 150, .5);
}
/* 不能转为休息状态(OP-10 / MT-07 / TNJ-07 / BLC / HKN 统一口径): 右上角红色禁止角标 + 红虚线描边。
   被压的一方要一眼看出**是哪一张**被压住(用户报障 2026-10-26)。
   角标与小盾牌(prot-mini)同位置 → 同时存在时用 .pushed 往下挪一格, 不叠在一起。 */
.card-thumb.rest-locked { outline: 2px dashed #e2604f; outline-offset: 1px; border-radius: 10px; }
/* ⚠ 特异性坑: `.card-thumb.usable`(下方 ~229 行) 是同一档 (0,2,0) 且写在后面, 会把上面这些描边
   整条盖掉 —— 主阶段里「可打出」的应援卡(带 usable)刚好也常带锁定标记, 于是虚线描边从来画不出来
   (2026-10-27 实测: computed outline 仍是 usable 的 solid 蓝)。双类把特异性抬到 (0,3,0) 才稳。 */
.card-thumb.rest-locked.rest-locked { outline: 2px dashed #e2604f; }
.norest-mini {
  position: absolute; top: 2px; right: 2px; z-index: 4;
  width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; line-height: 1; pointer-events: auto;
  background: linear-gradient(135deg, #f2705f, #a3241a);
  box-shadow: 0 0 6px rgba(226,96,79,.55), 0 1px 3px rgba(0,0,0,.4);
  border: 1px solid rgba(255, 190, 180, .75);
}
.norest-mini.pushed { top: 21px; }
/* 「下个对手回合的激活阶段不能激活」: 右上角锁形角标 + 冷蓝虚线描边。
   引擎(engine.js phases)在激活阶段读 `noActivateTurn >= g.turn` 就跳过这张卡, 以前界面没标记,
   玩家到了对手回合只看到「我的卡没站起来」(训练员 2026-10-27)。与上面「⛔不能转休」(红暖色)
   刻意用不同色温 —— 两件事经常同时出现在同一张卡上, 靠颜色一眼分清。
   位置与 prot-mini/norest-mini 同列, 由 JS 按已占格数写内联 top(2 / 21 / 40)。 */
.card-thumb.no-activate { outline: 2px dashed #6fa8d6; outline-offset: 1px; border-radius: 10px; }
/* 同上: 必须双类压过后面同特异性的 `.card-thumb.usable` */
.card-thumb.no-activate.no-activate { outline: 2px dashed #6fa8d6; }
/* 被「须藤育」(HKN-10)指定的应援卡: 暖金实线 + 柔光, 与「不能转休」红虚线、「不能激活」蓝虚线区分。
   双类抬特异性(0,3,0)压过后面同档的 .card-thumb.usable —— 与 rest-locked 那次同一个坑。 */
.card-thumb.hkn-challenged { outline: 3px solid #f2c14e; outline-offset: 2px; border-radius: 10px;
  box-shadow: 0 0 10px rgba(242,193,78,.55); }
.card-thumb.hkn-challenged.hkn-challenged { outline: 3px solid #f2c14e; }
.hkn-mark {
  position: absolute; left: 2px; bottom: 2px; z-index: 4;
  width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; line-height: 1; pointer-events: auto;
  background: linear-gradient(135deg, #ffe7a3, #c08a20);
  box-shadow: 0 0 6px rgba(242,193,78,.65), 0 1px 3px rgba(0,0,0,.4);
  border: 1px solid rgba(255, 244, 205, .9);
  color: #4a3208;
}
.noact-mini {
  position: absolute; top: 2px; right: 2px; z-index: 4;
  width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; line-height: 1; pointer-events: auto;
  background: linear-gradient(135deg, #6fb3e0, #245e8c);
  box-shadow: 0 0 6px rgba(111,179,224,.55), 0 1px 3px rgba(0,0,0,.4);
  border: 1px solid rgba(190, 228, 255, .75);
}
/* 「不能攻击」角标(反馈 bmwbsr8l08f0c, 训练员 2026-11-11「不能攻击也做一个图标」)。
   「⛔ 不能转休」(暖红) / 「🔒 不能激活」(冷蓝) / 这个「⚔ 不能攻击」(橙金) 三种状态经常同时
   挂在同一张卡上, 所以再分一个色温; 剑上压一道白斜杠 = 剑被划掉、不能出战。
   .soft = 「刚登场、本回合不能攻击」—— 不是别人上的效果, 只是登场限制, 所以压暗压淡、不与真状态抢眼。
   位置由 JS 的 takeSlot() 写内联 top, 与那排角标同列, 不会互相压住。 */
.noatk-mini {
  position: absolute; top: 2px; right: 2px; z-index: 4;
  width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; line-height: 1; pointer-events: auto; overflow: hidden;
  background: linear-gradient(135deg, #ffc46b, #b5651a);
  box-shadow: 0 0 6px rgba(255,178,90,.55), 0 1px 3px rgba(0,0,0,.4);
  border: 1px solid rgba(255, 232, 200, .85);
  color: #2e1a06;
}
.noatk-mini::after {
  content: ''; position: absolute; left: -2px; right: -2px; top: 50%;
  height: 1.6px; background: rgba(255,255,255,.95);
  transform: rotate(-45deg); border-radius: 1px;
  box-shadow: 0 0 2px rgba(0,0,0,.5);
}
.noatk-mini.soft { opacity: .6; filter: saturate(.5); }
/* 「不会被选为攻击目标」角标(训练员 2026-11-12「LN-002 的不会被选为目标也加一个标记」)。
   与「⚔ 不能攻击」同一个语汇: 符号被一道白斜杠划掉 = 这件事对它不成立(setSlot 同列排列)。
   这里用「◎ 靶心 + 斜杠」= 瞄不上它。色温刻意取青绿, 避开已有的四种
   —— 暖红(⛔不能转休) / 冷蓝(🔒不能激活) / 橙金(⚔不能攻击) / 金紫(🛡破坏保护),
   同一张卡上五灯齐挂也能一眼拆开。位置由 JS 的 takeSlot() 写内联 top, 不会互相压住。 */
.notgt-mini {
  position: absolute; top: 2px; right: 2px; z-index: 4;
  width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1; pointer-events: auto; overflow: hidden;
  background: linear-gradient(135deg, #5fe3c8, #10695c);
  box-shadow: 0 0 6px rgba(95,227,200,.55), 0 1px 3px rgba(0,0,0,.4);
  border: 1px solid rgba(198, 255, 242, .85);
  color: #04231d;
}
.notgt-mini::after {
  content: ''; position: absolute; left: -2px; right: -2px; top: 50%;
  height: 1.6px; background: rgba(255,255,255,.95);
  transform: rotate(-45deg); border-radius: 1px;
  box-shadow: 0 0 2px rgba(0,0,0,.5);
}
/* DC-011「芬恩·蒂姆那」宣言的等级: 宣言完必须一眼看到数字(训练员 2026-10-27 报障)。
   位置踩过两次坑: ① 卡面四角全被「休息/进攻源」「🛡」「⛔」「▼N」「⚽」占着;
   ② 外挂到卡面顶沿外(top:-19px)会被**上面那一排的元素盖住/裁掉**(实测只剩半截)。
   最终与 .card-cig 同一位置(力量条上方居中) —— 这一带在应援区里是空的, 也不与任何角标打架。 */
.dc-declare {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 6; padding: 1px 6px; border-radius: 8px;
  font-size: 9.5px; font-weight: 800; line-height: 1.55;
  letter-spacing: .2px; white-space: nowrap; color: #1a1408;
  background: linear-gradient(135deg, #ffeaa8, #e8b84b);
  border: 1px solid rgba(255, 246, 210, .9);
  box-shadow: 0 1px 5px rgba(0,0,0,.45), 0 0 7px rgba(232,184,75,.55);
  pointer-events: none;
}
/* 「底下的卡」指示(搭乘机师/底置/卡底/覆盖token 通用): 右下角可点的 ▼N 小胶囊。
   手机端没有右键, 这个胶囊本身就是查看入口(点它/长按卡面都能看到底下的卡) */
.under-pill {
  position: absolute; right: 3px; bottom: 3px; z-index: 5;
  min-width: 20px; height: 16px; padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; cursor: pointer;
  font-size: 10.5px; font-weight: 800; line-height: 1; color: #eaf6ff;
  background: linear-gradient(135deg, #2f6f9e, #17405d);
  border: 1px solid rgba(150, 215, 255, .75);
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
  -webkit-tap-highlight-color: transparent;
}
.under-pill:active { transform: scale(.92); }
/* 可选目标: 绿色描边 + 呼吸光圈, 选攻击目标时一眼能看出该点哪张 */
.card-thumb.pickable {
  outline: 3px solid var(--ok); outline-offset: 2px; border-radius: 11px;
  box-shadow: 0 0 0 5px rgba(58, 185, 118, .22);
  animation: pickGlow 1.15s ease-in-out infinite; cursor: pointer;
}
@keyframes pickGlow {
  0%, 100% { box-shadow: 0 0 0 5px rgba(58,185,118,.22); }
  50%      { box-shadow: 0 0 0 12px rgba(58,185,118,.04); }
}
/* token 卡角标: 只能由卡牌效果生成, 不能加入卡组, 需要一眼可辨 */
.card-token-tag {
  position: absolute; left: 4px; top: 4px;
  background: linear-gradient(135deg, #ffffff, #cfe4f7);
  color: #23577d; font-size: 9px; font-weight: 800; letter-spacing: .7px;
  padding: 1px 5px; border-radius: 4px; border: 1px solid rgba(35, 87, 125, .35);
  box-shadow: 0 1px 3px rgba(0,0,0,.25); pointer-events: none;
}
.card-thumb.is-token img { box-shadow: 0 0 0 1px rgba(87,150,200,.5), 0 2px 6px rgba(0,0,0,.18); }
/* 违反领袖构筑规则(如 KKK-01「只能投入本家卡」)的卡: 在卡组里打红角标, 提示要移除 */
.card-rule-tag {
  position: absolute; right: 4px; top: 4px; z-index: 2;
  background: linear-gradient(135deg, #ffe4e0, #f6b8ae);
  color: #8c2317; font-size: 9px; font-weight: 800; letter-spacing: .5px;
  padding: 1px 5px; border-radius: 4px; border: 1px solid rgba(140, 35, 23, .35);
  box-shadow: 0 1px 3px rgba(0,0,0,.25); pointer-events: none;
}
.card-thumb.illegal img { box-shadow: 0 0 0 2px rgba(214, 92, 74, .75), 0 2px 6px rgba(0,0,0,.18); }
.card-thumb.usable { outline: 2px solid var(--blue); outline-offset: 1px; border-radius: 10px; }
.pill.glow { outline: 2px solid var(--accent); color: var(--accent); font-weight: 700; }
.cond-hint {
  font-size: 11px; color: var(--warn); margin-top: 2px;
  background: #fff8ec; border-radius: 5px; padding: 2px 4px;
}

/* ---------- 遮罩/模态 ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(20,18,14,.55);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.overlay.show { display: flex; }
.modal-box {
  background: var(--panel); border-radius: var(--radius);
  max-width: 480px; width: 100%; max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.modal-box.wide { max-width: 900px; }
.modal-title { font-size: 16px; font-weight: 700; padding: 14px 18px 8px; }
.modal-body { padding: 8px 18px; overflow-y: auto; flex: 1; }
.modal-foot { padding: 10px 18px 14px; display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- 音量设置(顶栏 ⚙) ---------- */
/* 用户 2026-10-26: 登场语音不再自动压低 BGM, 改成玩家自己调这两条音量。
   触屏上 range 必须给够高度(28px 以上), 否则 iPad 上几乎抓不住滑块。 */
.vol-modal .modal-box { max-width: 400px; }
.vol-body { padding: 4px 0 2px; }
.vol-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px 4px; }
.vol-row .vol-name { flex: 0 0 auto; min-width: 88px; font-size: 14px; font-weight: 600; }
.vol-row input[type="range"] {
  flex: 1 1 auto; min-width: 0; height: 28px;
  accent-color: var(--accent); background: transparent; cursor: pointer;
}
.vol-row .vol-val {
  flex: 0 0 46px; text-align: right; font-size: 13px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.vol-note { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 0 2px 8px; }
.vol-test { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.vol-test .vol-hint { font-size: 12px; color: var(--muted); }
/* 分类试听(登场/战斗/破坏/效果): 四个小键一排, 窄屏允许换行 */
.vol-test-kinds { gap: 6px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); }
.vol-test-kinds .btn { padding: 3px 10px; font-size: 12px; min-height: 26px; }

/* 设置弹窗的分组标题与开关行(2026-10-29 起 ⚙ 里除了音量还有「对局中的闪卡特效」) */
.set-sec {
  font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted);
  margin: 12px 2px 2px; padding-top: 10px; border-top: 1px dashed var(--border);
}
.set-sec:first-child { margin-top: 2px; padding-top: 0; border-top: 0; }
.set-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 2px 2px; cursor: pointer; user-select: none;
}
/* 触屏上 44px 起步的点击区: 小方块太难点, 整行都是 label */
.set-row input[type="checkbox"] {
  flex: 0 0 auto; width: 20px; height: 20px; margin: 0;
  accent-color: var(--accent); cursor: pointer;
}
.set-row .set-label { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; }
.set-row .set-state { flex: 0 0 auto; font-size: 12px; color: var(--muted); }

/* ---------- 底部抽屉面板(检索等: 上面留出战场与手牌) ---------- */
.overlay.sheet-overlay {
  align-items: flex-end; justify-content: center;
  padding: 0;
  background: linear-gradient(to top,
    rgba(26,19,12,.46) 0%,
    rgba(26,19,12,.20) 26%,
    rgba(26,19,12,0) 56%);
  transition: background .22s ease;
}
.sheet-overlay .sheet-box {
  position: relative;
  width: min(1120px, 100%);
  max-width: min(1120px, 100%);
  max-height: min(64vh, 680px);
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, #fffefc 0%, #fbf8f2 100%);
  box-shadow: 0 -22px 54px -20px rgba(48,32,16,.5);
  border-top: 1px solid rgba(226,221,210,.9);
  transition: transform .26s cubic-bezier(.22,.9,.28,1), opacity .2s ease;
  will-change: transform;
}
/* 顶部小把手 */
.sheet-overlay .sheet-box::before {
  content: ''; position: absolute; top: 6px; left: 50%;
  width: 42px; height: 4px; margin-left: -21px;
  border-radius: 999px; background: rgba(0,0,0,.13);
  pointer-events: none;
}
.sheet-overlay .modal-title.has-fold {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px 7px;
}
/* 普通弹窗的折叠头(「隐藏弹窗」按钮): 标题左、按钮右 */
.modal-title.has-fold { display: flex; align-items: center; gap: 10px; }
.sheet-overlay .modal-title .mt-label,
.modal-title.has-fold .mt-label {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sheet-toggle {
  display: inline-flex; align-items: center; gap: 3px;
  flex: 0 0 auto;
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  font-size: 12px; font-weight: 600;
  transition: all .15s;
}
.sheet-toggle:hover { color: var(--ink); border-color: var(--muted); }
.sheet-toggle .st-ico { font-size: 10px; }
.sheet-overlay .modal-body { padding: 6px 16px 10px; }

/* 收起状态: 面板滑出屏幕, 只留右下角小按钮, 战场与手牌完全露出。
   注意要 pointer-events: none —— 否则遮罩仍然吃掉点击, "先看场上/点废弃区"就点不到。 */
.sheet-overlay.collapsed { background: transparent; pointer-events: none; }
.sheet-overlay.collapsed .sheet-box {
  transform: translateY(106%); opacity: 0; pointer-events: none;
}
/* 普通弹窗的「隐藏弹窗」: 同一个 collapsed 状态, 遮罩透明且不吃点击 */
.overlay:not(.sheet-overlay) .modal-box { transition: opacity .18s ease, transform .18s ease; }
.overlay:not(.sheet-overlay).collapsed { background: transparent; pointer-events: none; }
.overlay:not(.sheet-overlay).collapsed .modal-box {
  opacity: 0; transform: translateY(12px) scale(.98); pointer-events: none;
}
.sheet-restore {
  display: none;
  align-items: center; gap: 7px;
  position: fixed; right: 16px; bottom: 16px; z-index: 101;
  padding: 9px 16px 9px 13px; border-radius: 999px;
  border: 1px solid rgba(200,85,61,.35);
  background: #fff; color: var(--ink);
  font-size: 13px; font-weight: 700;
  pointer-events: auto;   /* 父层遮罩是 pointer-events:none, 浮标自己要点得到 */
  box-shadow: 0 10px 26px -8px rgba(48,32,16,.42), 0 0 0 3px rgba(200,85,61,.08);
  animation: srIn .22s ease-out;
}
.sheet-restore:hover { border-color: var(--accent); }
.sheet-restore .sr-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  animation: srPulse 1.6s ease-in-out infinite;
}
.sheet-restore .sr-ico { font-size: 11px; color: var(--accent); }
/* sheet 与普通弹窗共用同一个「恢复」浮标 */
.overlay.collapsed .sheet-restore { display: inline-flex; }
@keyframes srIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes srPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }

/* 检索面板内: 我的手牌一览(小卡) */
.sheet-peek {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px; margin: 0 0 8px;
  border-radius: 10px; background: rgba(200,85,61,.05);
  border: 1px solid rgba(200,85,61,.12);
}
.sheet-peek .sp-label {
  flex: 0 0 auto; font-size: 11.5px; font-weight: 700; color: var(--accent);
  letter-spacing: .5px;
}
.sheet-peek .sp-cards {
  display: flex; gap: 6px; overflow-x: auto; padding: 2px 0;
  scrollbar-width: thin;
}
.sheet-peek .card-thumb { width: 46px; flex: 0 0 46px; }
.sheet-peek .card-thumb img { box-shadow: 0 2px 6px rgba(0,0,0,.16); }
.sheet-peek .sp-empty { font-size: 11.5px; color: var(--muted); }
.sheet-overlay .sheet-desc { font-size: 13px; line-height: 1.5; margin: 0 0 9px; color: var(--ink); }
.sheet-foot-hint { margin-right: auto; align-self: center; font-size: 12px; }
.code-area {
  width: 100%; height: 110px; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px; font-size: 12px;
  word-break: break-all; resize: vertical;
}
.num-input { width: 90px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; }
/* 打字输入（「宣言1个卡名」等）: 占满弹窗宽度, 字号给够, 手机上调起键盘时不被挤扁 */
.text-input {
  width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 16px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--panel);
  color: var(--text); outline: none; margin-top: 6px;
}
.text-input:focus { border-color: var(--accent, #6aa9ff); box-shadow: 0 0 0 2px rgba(106,169,255,.18); }
.text-hint:empty { display: none; }
.text-hint { margin: 6px 0 0; }

/* 大图预览 */
/* z-index 高于普通弹窗(300)与底部抽屉(305): 检索/选择弹窗开着时右键查卡,
   预览要盖在弹窗前面, 否则被后 append 的弹窗压在后面看不到 */
#card-zoom { z-index: 320; }
#card-zoom .zoom-box {
  background: var(--panel); border-radius: var(--radius);
  display: flex; gap: 16px; padding: 18px; max-width: min(780px, 100%);
  align-items: flex-start; box-shadow: 0 10px 40px rgba(0,0,0,.35);
  position: relative; /* 关闭按钮定位锚点 */
}
#card-zoom img { width: 300px; border-radius: 10px; flex-shrink: 0; }
/* 大图里闪卡的反光: 包一层 .zoom-face, 反光只盖卡图(右边效果文本不跟着闪)
   line-height:0 + img display:block: 否则 <img> 的行内基线会在容器底部多留几像素,
   反光层就会比卡图高出一截 */
#card-zoom .zoom-face { position: relative; flex-shrink: 0; border-radius: 10px; isolation: isolate; line-height: 0; }
#card-zoom .zoom-face img { position: relative; display: block; z-index: 0; }
#card-zoom .zoom-face.foil::before,
#card-zoom .zoom-face.foil::after {
  content: ''; position: absolute; inset: 0; border-radius: 10px;
  pointer-events: none; z-index: 2;
}
#card-zoom .zoom-face.foil::before {
  background: linear-gradient(115deg,
    rgba(255, 0, 128, .30), rgba(255, 230, 0, .22) 20%,
    rgba(0, 255, 190, .26) 40%, rgba(0, 150, 255, .30) 60%,
    rgba(190, 0, 255, .26) 80%, rgba(255, 0, 128, .30));
  background-size: 300% 300%;
  mix-blend-mode: color-dodge; opacity: .2;
  animation: foilShift 6.5s ease-in-out infinite;
  animation-delay: var(--foil-shift-delay, 0s);
}
#card-zoom .zoom-face.foil::after {
  background: linear-gradient(100deg,
    transparent 39%, rgba(255, 255, 255, .30) 45%,
    rgba(255, 255, 255, .92) 50%, rgba(205, 242, 255, .45) 55%,
    transparent 61%);
  background-size: 220% 100%;
  mix-blend-mode: screen;
  animation: foilSheen 2.8s linear infinite;
  animation-delay: var(--foil-delay, 0s);
}
/* min-width:0 关键: 否则 flex 子项的最小内容宽度(如19张相关卡横排)会把 zoom-box 撑出屏幕,
   弹窗盖满全屏后点外面关闭的区域消失, 页面又不能横向滚动 → 卡死在预览里 */
.zoom-info { flex: 1; min-width: 0; }
/* 详情弹窗兜底可滚动(反馈 bmwirth20e172):
   .overlay 是 align-items:center 且自己不滚动 —— 内容一旦比屏幕高, 高出来的那截**上下一起被裁掉**,
   既看不到也拖不到。MP100-001 这类「效果长 + 底下挂着 token + 相关卡一排」的卡在手机横屏(894×392)
   正好撞上: 底部「此卡下的 token」永远差十几像素露出不来。
   给容器 overflow:auto + 子元素 margin:auto: 装得下时照旧居中(与 align-items:center 同效果),
   装不下时 auto 外边距归零、从顶部开始排, 于是可以一路滚到底。
   ⚠ 不能只加 overflow 不加 margin:auto —— 那样居中会把**顶部**留在滚动区外, 依然够不着。 */
#card-zoom { overflow: auto; -webkit-overflow-scrolling: touch; }
#card-zoom .zoom-box { margin: auto; }
/* 预览关闭按钮: 弹窗内容再宽/再高也有一个必定可点的退出入口 */
.zoom-close {
  position: absolute; top: 6px; right: 10px; z-index: 2;
  width: 34px; height: 34px; border: none; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff; font-size: 18px; line-height: 1;
  cursor: pointer; flex-shrink: 0;
}
.zoom-close:hover { background: rgba(0,0,0,.7); }
.zi-name { font-size: 18px; font-weight: 700; }
.zi-id { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 8px; }
.zi-meta { color: var(--muted); font-size: 13px; margin: 8px 0; line-height: 1.6; }
/* 详情页「当前费用」(训练员 2026-10-28): 技能卡被减费后, 卡面等级不再等于实际要付的能量 */
.zi-cost {
  margin: 6px 0 8px; padding: 6px 10px; border-radius: 6px;
  background: rgba(58, 160, 110, .16); border-left: 3px solid #2f9e6d;
  font-size: 14px; font-weight: 700; color: #1d6b48;
}
.zi-cost .zic-sub { font-weight: 400; font-size: 12px; color: var(--muted); }
/* 详情页「卡面动态数值」(训练员 2026-11-18): SYS-22 的 × = 双方废弃区中不在初始构筑里的卡 × 1000,
   对局中一直在变 → 直接把「当前是多少」写出来, 玩家不用自己数两边的废弃区。 */
.zi-vars {
  margin: 6px 0 8px; padding: 6px 10px; border-radius: 6px;
  background: rgba(214, 138, 46, .16); border-left: 3px solid #d68a2e;
  font-size: 14px; font-weight: 700; color: #8a5312;
}
.zi-vars .ziv-sub { font-weight: 400; font-size: 12px; color: var(--muted); }
/* 说明另起一行: 「我 2 / 对手 1」以前会被折行拆成「· 我」+「2 / 对手 1」两截(训练员 2026-11-18 截图) */
.zi-vars .ziv-sub { display: block; margin-top: 2px; line-height: 1.5; }
.zi-text { font-size: 14px; line-height: 1.8; white-space: pre-wrap; }
/* 效果文本里的「部位标签」——与卡面同一套小图标(训练员 2026-11-06)。
   卡面上画的依次是: 锁(登场条件) / 红色单剑(进攻) / 盾(防御) / ∞(无限) / 方块字(入·触·破·墓·手)。
   一律用 CSS 画, 不用 emoji: emoji 在安卓/iOS/桌面上是三套完全不同的画法, 还会被系统染成彩色,
   与卡面的浅蓝/红/洋红对不上。尺寸按「跟 14px 正文同高」定, 竖向下沉 2px 才对得齐基线。 */
.fx-ic {
  display: inline-block; position: relative; vertical-align: -2px;
  margin-right: 4px; font-style: normal; font-weight: 700;
}
/* ∞: 卡面是一枚紫蓝色的无穷符号 */
.fx-ic-inf { width: 14px; text-align: center; color: #6a5acd; }
.fx-ic-inf::before { content: '∞'; font-size: 16px; line-height: 1; }
/* 登场条件: 浅浅一把挂锁(锁梁 + 锁体) */
.fx-ic-lock { width: 12px; height: 14px; }
.fx-ic-lock::before {
  content: ''; position: absolute; left: 1px; bottom: 0; width: 10px; height: 8px;
  border-radius: 2px; background: #7cc4de; box-shadow: 0 0 0 1px rgba(40,90,110,.35);
}
.fx-ic-lock::after {
  content: ''; position: absolute; left: 3px; top: 0; width: 6px; height: 7px;
  border: 1.6px solid #7cc4de; border-bottom: none; border-radius: 4px 4px 0 0;
}
/* 进攻/进攻效果: 红色单剑(训练员 2026-11-08 口径)。
   卡面是一把斜置的剑 —— 剑尖朝右下、近柄端有一道十字护手、左上端是圆形柄头;
   旧实现用两条交叉红线画成了「×」, 与卡面对不上。这里仍按项目约定纯 CSS 自绘:
   本体 radial-gradient 画柄头圆点, ::before 画 45° 剑身(右下端收尖), ::after 画 -45° 护手。 */
.fx-ic-atk {
  width: 14px; height: 14px;
  background: radial-gradient(circle at 3.2px 2.6px, #e0453a 0 1.6px, transparent 1.7px);
}
.fx-ic-atk::before {
  content: ''; position: absolute; left: 1.5px; top: 5.6px;
  width: 12px; height: 2.6px;
  background: linear-gradient(180deg, #ff7a67 0%, #e0453a 58%, #b52e25 100%);
  border-radius: 1px;
  transform: rotate(45deg); transform-origin: 50% 50%;
  clip-path: polygon(0 0, 82% 0, 100% 50%, 82% 100%, 0 100%);
}
.fx-ic-atk::after {
  content: ''; position: absolute; left: 5.5px; top: 2.2px;
  width: 1.8px; height: 7px;
  background: #e0453a; border-radius: 1px;
  /* ⚠ 竖直短条要用 +45deg 才与「水平长条 +45deg」互相垂直:
     rotate(-45deg) 时 (0,1)→(0.707,0.707) 与剑身**平行**, 护手会整条藏进剑身里看不见。 */
  transform: rotate(45deg); transform-origin: 50% 50%;
}
/* 防御/防御效果: 盾 */
.fx-ic-def {
  width: 12px; height: 14px;
  background: linear-gradient(180deg, #bfe4f5 0%, #7cc1da 100%);
  clip-path: polygon(50% 0%, 100% 16%, 100% 58%, 50% 100%, 0% 58%, 0% 16%);
}
/* 入·触·破·墓·手·使用条件: 一枚圆角方块, 里面是那个字(卡面就是这么画的) */
.fx-ic-in, .fx-ic-trg, .fx-ic-brk, .fx-ic-grave, .fx-ic-hand, .fx-ic-use, .fx-ic-food {
  width: 15px; height: 15px; border-radius: 3px;
  color: #fff; font-size: 10.5px; line-height: 15px; text-align: center;
}
.fx-ic-in::before { content: '入'; }
.fx-ic-trg::before { content: '触'; }
.fx-ic-brk::before { content: '破'; }
.fx-ic-grave::before { content: '墓'; }
.fx-ic-hand::before { content: '手'; }
.fx-ic-use::before { content: '使'; }
/* PAF「食」: 卡面上是一枚红底白字的方块标记(同 [手] 的方块字), 详情页照画(训练员 2026-11-06) */
.fx-ic-food::before { content: '食'; }
.fx-ic-in { background: #4a8fc4; }
.fx-ic-trg { background: #bb3d7c; }
.fx-ic-brk { background: #d94c3d; }
.fx-ic-grave { background: #5b6b66; }
.fx-ic-hand { background: #d39336; }
.fx-ic-use { background: #738091; }
.fx-ic-food { background: #c8453b; }
/* 关键词条: 卡面上「独战/贯通/突进/速攻」是橙字(重量保持常规, 别把整句读成一串加粗) */
.fx-kw { color: #d9821f; font-weight: 700; }
/* 效果文本里的专名(卡名 / token 名 / 特征名) → 水蓝; 各系列机制词按卡面配色分色。
   只改字色、不加粗到 700, 免得长效果里满屏加粗反而读不出重点(训练员 2026-11-06)。 */
.fx-name { color: #2196cf; font-weight: 600; }
.fx-hl-pink   { color: #e04a9a; font-weight: 600; }  /* WDF/HKN 女朋友·女主角, CG 指令 */
.fx-hl-yellow { color: #b8860b; font-weight: 600; }  /* SBPK 义体增幅, TNJ 融合 */
.fx-hl-green  { color: #2b9a68; font-weight: 600; }  /* POR 传递 */
.fx-hl-orange { color: #d9821f; font-weight: 600; }  /* LRX 消耗 */
.fx-hl-red    { color: #d63b32; font-weight: 600; }  /* TAI 红温状态 */
.zi-token-hint {
  margin-top: 10px; font-size: 12px; color: #23577d;
  background: rgba(122, 178, 222, .16); border-left: 3px solid var(--blue);
  padding: 6px 10px; border-radius: 4px;
}
.zi-related { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
/* 详情页的「翻面后」块(训练员 2026-11-19 反馈 bmwmhvllk9bea: TAV-03 的详情看不到翻面后)。
   换 id 的双面卡(朱慧月 TAV-03 ⇄ TAV-04 / 双面领袖)另一面的完整效果写在这里, 点一下看那张大图。
   用虚线框 + 略微压暗, 与"这张卡现在的效果"区分开 —— 别让人误以为那句效果现在就能用。 */
.zi-flip {
  margin-top: 12px; padding: 8px 10px; border-radius: 6px;
  border: 1px dashed var(--border); background: rgba(127,127,127,.07);
  cursor: pointer;
}
.zi-flip:hover { background: rgba(127,127,127,.13); }
.zif-label { font-size: 11.5px; color: var(--muted); letter-spacing: .3px; }
.zif-name { font-size: 13.5px; font-weight: 700; margin: 2px 0 4px; }
.zif-pw { margin-left: 8px; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.zif-text { font-size: 12.5px; line-height: 1.7; opacity: .92; }
/* 详情页的「当前状态 · 破坏保护」(训练员 2026-10-28):
   「不会被破坏」(金)与「不会被效果破坏」(紫)是两回事, 卡面角标只说明"有", 这里写清是哪一种、
   谁给的、还剩多久。色温与卡面角标保持一致, 一眼能对上。 */
.zi-status {
  margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.zis-label { font-size: 12px; color: var(--muted); }
.zis-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 12.5px; line-height: 1.6;
  padding: 6px 8px; border-radius: 6px;
  border-left: 3px solid transparent;
}
.zis-row.full { background: rgba(212,175,55,.12); border-left-color: #d4af37; }
.zis-row.fx { background: rgba(154,111,224,.13); border-left-color: #9a6fe0; }
.zis-badge {
  position: relative; flex: 0 0 auto;
  width: 17px; height: 17px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; line-height: 1;
  border: 1px solid rgba(255,255,255,.7);
}
.zis-row.full .zis-badge {
  background: linear-gradient(135deg, #d4af37, #8a6d1d);
  box-shadow: 0 0 6px rgba(212,175,55,.5);
}
.zis-row.fx .zis-badge {
  background: linear-gradient(135deg, #b18cf0, #5b3a9e);
  box-shadow: 0 0 6px rgba(154,111,224,.5);
}
.zis-badge .protfx-tag {
  position: absolute; right: -4px; bottom: -4px;
  font-style: normal; font-size: 7px; font-weight: 800; line-height: 1;
  padding: 1px 2px; border-radius: 3px;
  color: #2b1a4d; background: linear-gradient(135deg, #e8dcff, #c3a6f5);
  border: 1px solid rgba(90, 60, 150, .5);
}
.zis-title { font-size: 13px; }
.zis-row.full .zis-title { color: #8a6d1d; }
.zis-row.fx .zis-title { color: #6a45b5; }
.zis-note { flex: 1 1 100%; color: var(--ink); }
.zis-meta { font-size: 11.5px; color: var(--muted); flex: 1 1 100%; }
/* 紧凑版(「当前状态 · 附加效果」用): 一条效果一行放得下就别占三行 ——
   2026-10-31「赋予的效果都要显示」之后条目可能到七八条, 手机横屏(390px 高)翻三屏没人看得下去。
   note/meta 改成行内跟随, 只有放不下时才换行。 */
.zi-status.zi-compact .zis-row { padding: 3px 8px; gap: 4px; line-height: 1.45; }
.zi-status.zi-compact .zis-note,
.zi-status.zi-compact .zis-meta { flex: 0 1 auto; font-size: 11px; }
.zi-status.zi-compact .zis-note::before { content: '·'; margin-right: 4px; color: var(--muted); }
.zi-status.zi-compact .zis-badge { width: 15px; height: 15px; font-size: 9px; }
.zis-legend { font-size: 11px; color: var(--muted); line-height: 1.6; }
/* 详情里的「此卡上的 token」(训练员 2026-11-18 反馈 bmwm15myx0409):
   头套 token 要当**实体 token** 看 —— 一条一行, 整行可点(点开这个 token 自己的卡面)。
   控制权转移的原因是头套这个 token, 不是「特征变为杀马特」, 所以必须看得见 token 本体。 */
.zis-tok { cursor: pointer; border-left-color: #7a5cc0; background: rgba(122,92,192,.14); }
.zis-tok:hover { background: rgba(122,92,192,.26); }
.zis-tok::after { content: '›'; margin-left: auto; color: var(--muted); font-size: 15px; line-height: 1; }
/* 「↩ 返回上一张」: 从详情点进 token / 底卡之后原路回来(只有下一层才显示) */
.zoom-back {
  display: inline-flex; align-items: center; gap: 4px; margin: 0 0 8px; padding: 3px 10px;
  font-size: 12px; border-radius: 14px; cursor: pointer; font-family: inherit;
  color: var(--ink); background: rgba(255,255,255,.10); border: 1px solid var(--border);
}
.zoom-back:hover { background: rgba(255,255,255,.20); }
/* 双面卡(卡面写了 textBack, 目前只有 LRX-001 银白钢铁伊克斯): 详情里把「另一面」的卡图
   与效果一并列出 —— 翻面后效果完全不同, 只看当前那一面查不到翻过去会变成什么。
   训练员 2026-10-27 口径:「查看详情界面加上翻面后的卡图的效果」。 */
.zi-flip { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.zif-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.zif-row { display: flex; gap: 10px; align-items: flex-start; }
/* 横版卡图(LRX-001/LRX-001b)本身就是躺着的, 卡位要按横版比例给宽度, 否则被竖版卡位挤小 */
.zif-art { flex: 0 0 auto; width: 132px; border-radius: 8px; cursor: pointer; line-height: 0; }
.zif-art.landscape { width: 184px; }
/* ⚠ 必须带 #card-zoom 前缀: 上面 `#card-zoom img { width: 300px }` 是 id+元素(1,0,1),
   光写 .zif-art img(0,1,1) 压不住, 缩略图会变成 300px 把整行撑爆(同 .zir-list 的处理) */
#card-zoom .zif-art img {
  width: 100%; display: block; border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.22); transition: transform .12s;
}
.zif-art:hover img { transform: translateY(-3px); }
.zif-text { flex: 1; min-width: 0; font-size: 13px; line-height: 1.75; color: var(--ink); }
.zir-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.zir-list { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.zir-list .card-thumb { width: 76px; }
#card-zoom .zir-list .card-thumb img { width: 100%; }
.zir-list .card-thumb:hover { transform: translateY(-4px); }

/* 回合切换横幅: 中央大字「你的回合 / 对手回合」, 自动淡出, 全程不吃点击 */
.turn-banner {
  position: fixed; inset: 0; z-index: 290;      /* 低于任何弹窗(300): 回合开始就要选的窗不能被装饰盖住 */
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.30) 0%, rgba(0,0,0,.66) 72%);
  animation: tb-bg .28s ease-out;
}
.turn-banner .tb-inner {
  position: relative; padding: 22px 6vw; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  isolation: isolate;              /* 让 ::before 光晕留在内容层之下、横幅底色之上 */
  animation: tb-in .52s cubic-bezier(.18,1.35,.42,1) both;
}
.turn-banner .tb-main {
  font-size: clamp(38px, 8.5vw, 82px); font-weight: 900; line-height: 1.1;
  letter-spacing: .12em; padding-left: .12em;              /* 字间距让居中不偏 */
  color: #fff; white-space: nowrap;
}
.turn-banner .tb-sub {
  font-size: clamp(12px, 2.6vw, 16px); letter-spacing: .18em;
  color: rgba(255,255,255,.72);
}
.turn-banner .tb-line {
  width: min(560px, 74vw); height: 2px; border-radius: 2px;
  transform-origin: center; animation: tb-sweep .5s .08s ease-out both;
}
/* 自己回合: 金色庆典感 */
.turn-banner.mine .tb-main {
  color: #ffdf8a;
  text-shadow: 0 0 26px rgba(255,190,70,.75), 0 4px 18px rgba(0,0,0,.7);
}
.turn-banner.mine .tb-sub { color: rgba(255,226,160,.9); }
.turn-banner.mine .tb-line {
  background: linear-gradient(90deg, transparent, #ffd470 22%, #fff3cf 50%, #ffd470 78%, transparent);
  box-shadow: 0 0 18px rgba(255,196,80,.8);
}
.turn-banner.mine .tb-inner::before {
  content: ''; position: absolute; inset: -18% -6%; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(255,190,80,.30), rgba(255,190,80,0) 68%);
  animation: tb-glow 1.4s ease-out both;
}
/* 对手回合: 冷色警示感 */
.turn-banner.foe .tb-main {
  color: #cfe1ff;
  text-shadow: 0 0 26px rgba(90,140,255,.65), 0 4px 18px rgba(0,0,0,.7);
}
.turn-banner.foe .tb-sub { color: rgba(196,214,246,.85); }
.turn-banner.foe .tb-line {
  background: linear-gradient(90deg, transparent, #6f8fd8 22%, #dbe7ff 50%, #6f8fd8 78%, transparent);
  box-shadow: 0 0 18px rgba(96,140,230,.7);
}
.turn-banner.foe .tb-inner::before {
  content: ''; position: absolute; inset: -18% -6%; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(90,130,230,.26), rgba(90,130,230,0) 68%);
  animation: tb-glow 1.4s ease-out both;
}
.turn-banner.out { animation: tb-out .4s ease-in forwards; }
@keyframes tb-bg { from { opacity: 0; } }
@keyframes tb-in {
  0% { opacity: 0; transform: scale(1.32); filter: blur(7px); }
  62% { opacity: 1; transform: scale(.99); filter: blur(0); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}
@keyframes tb-sweep { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
@keyframes tb-glow { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: scale(1); } }
@keyframes tb-out { to { opacity: 0; transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) {
  .turn-banner .tb-inner, .turn-banner .tb-line, .turn-banner .tb-inner::before { animation: none; }
}

/* 打出技能特效 */
.skill-fx {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(circle, rgba(0,0,0,.55) 30%, rgba(0,0,0,.2));
  pointer-events: none; animation: sf-bg .25s ease-out;
}
/* 卡面容器: 闪卡反光/动效层都挂在这一层(尺寸=卡图), 图片铺满它 */
.skill-fx .sf-face {
  position: relative; width: 250px; border-radius: 12px;
  isolation: isolate;                       /* 反光的混合只作用在卡面内部 */
  box-shadow: 0 0 46px 10px rgba(255,180,60,.8), 0 8px 30px rgba(0,0,0,.6);
  animation: sf-pop .45s cubic-bezier(.2,1.4,.4,1);
}
.skill-fx .sf-face img { display: block; width: 100%; height: auto; border-radius: 12px; position: relative; z-index: 0; }
/* 大图卡面比缩略图大约 1.9 倍: 动效层里按 px 计的细节(剑气厚度/星芒线)跟着放大 */
.skill-fx .sf-face .lv-wrap { --lv-scale: 1.9; }
.skill-fx .sf-label { color: #ffd27a; font-size: 19px; font-weight: 700; text-shadow: 0 2px 8px #000; animation: sf-pop .45s cubic-bezier(.2,1.4,.4,1); }
.skill-fx .sf-name { color: #fff; font-size: 16px; text-shadow: 0 2px 6px #000; }
.skill-fx.out { animation: sf-fade .45s forwards; }
@keyframes sf-pop { from { transform: scale(.35) rotate(-6deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes sf-bg { from { opacity: 0; } }
@keyframes sf-fade { to { opacity: 0; } }

/* SYS-04「1次游戏1次」专属演出(v795): **横向顺时针 360° 平面旋转**, 不再是纵向后空翻。
   keyframe / 类名沿用 v793 的 omBackflip360 / .om-backflip(线上资源与守卫已引用),
   但 transform 从绕 X 轴的 rotateX 改成屏幕平面内的 rotate(正角度 = 顺时针)。
   「播放效果动画的界面」(#skill-fx .sf-face) 与「场上的卡」(my/op-supports 里的卡图)
   共用同一条 keyframe: 转满一圈立刻摘类, 不残留 transform、不挡点击、不改结算时序。
   触发时机由 UI.voiceSpinCue 排在「effect 语音播到第 1 秒」。 */
@keyframes omBackflip360 {
  0%   { transform: rotate(0deg)   scale(1); }
  46%  { transform: rotate(180deg) scale(.88); }
  100% { transform: rotate(360deg) scale(1); }
}
.om-backflip {
  animation: omBackflip360 .46s cubic-bezier(.32,.04,.2,1) both;
  transform-origin: 50% 50%;
  backface-visibility: visible;
}
/* .sf-face 自带的 sf-pop 会与旋转抢同一个 animation 属性 → 更具体的选择器覆盖 */
.skill-fx .sf-face.om-backflip { animation: omBackflip360 .46s cubic-bezier(.32,.04,.2,1) both; }
/* 语音同步版: 转完一圈就淡出, 不拖着大图挡住后面的破坏演出 */
.skill-fx.om-quick.out, .skill-fx.om-voice-spin.out { animation: sf-fade .18s forwards; }
/* ⚠ 减少动态偏好下不能归零成 .01s: 那等于「360° 旋转没有播放」(训练员 2026-11-08 报障)。
   保留一圈看得见的快速旋转(.2s), 只是比常规 .46s 更短、更不晕。 */
@media (prefers-reduced-motion: reduce) {
  .om-backflip, .skill-fx .sf-face.om-backflip { animation-duration: .2s; }
}

/* 公开/检索展示: 一次展示多张卡(翻开卡组顶N张、检索到的卡) —— 双方都能看到 */
.cards-fx {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: radial-gradient(circle, rgba(0,0,0,.62) 32%, rgba(0,0,0,.28));
  pointer-events: none; animation: sf-bg .2s ease-out;
}
.cards-fx .cf-label {
  color: #ffd27a; font-size: 17px; font-weight: 700; text-shadow: 0 2px 8px #000;
  animation: sf-pop .4s cubic-bezier(.2,1.4,.4,1); padding: 0 12px; text-align: center;
}
.cards-fx .cf-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: 94vw; }
.cards-fx .cf-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  animation: sf-pop .45s cubic-bezier(.2,1.4,.4,1);
}
.cards-fx .cf-face {
  position: relative; width: 128px; border-radius: 9px;
  isolation: isolate;
  box-shadow: 0 0 22px rgba(255,200,90,.55), 0 6px 20px rgba(0,0,0,.55);
}
.cards-fx .cf-face img { display: block; width: 100%; height: auto; border-radius: 9px; position: relative; z-index: 0; }
.cards-fx .cf-card .cf-name {
  color: #fff; font-size: 12.5px; line-height: 1.25; max-width: 128px; text-align: center;
  text-shadow: 0 2px 6px #000;
}
.cards-fx.out { animation: sf-fade .42s forwards; }
@media (max-width: 620px) {
  .cards-fx .cf-face { width: 92px; }
  .cards-fx .cf-card .cf-name { font-size: 11px; max-width: 92px; }
  .cards-fx .cf-label { font-size: 14px; }
}

/* ---------- 全屏动画里的闪卡(打出/发动效果/检索展示, 用户口径 2026-10-26) ----------
   与牌桌上的 .ct-face 同一套两层反光: ::before 全息薄膜(color-dodge 漂移) + ::after 斜向扫光。
   必须 z-index: 2 压在 <img>(z-index: 0) 之上, 否则被不透明卡图整片盖住。
   动效闪卡的 .lv-wrap 由 ui.js 挂在同一层里, z-index auto → 在卡图之上、反光之下, 与牌桌一致。 */
.sf-face.foil::before, .cf-face.foil::before,
.sf-face.foil::after, .cf-face.foil::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none; z-index: 2;
}
.sf-face.foil::before, .cf-face.foil::before {
  background: linear-gradient(115deg,
    rgba(255, 0, 128, .30), rgba(255, 230, 0, .22) 20%,
    rgba(0, 255, 190, .26) 40%, rgba(0, 150, 255, .30) 60%,
    rgba(190, 0, 255, .26) 80%, rgba(255, 0, 128, .30));
  background-size: 300% 300%;
  mix-blend-mode: color-dodge;
  opacity: .2;
  animation: foilShift 6.5s ease-in-out infinite;
  animation-delay: var(--foil-shift-delay, 0s);
}
.sf-face.foil::after, .cf-face.foil::after {
  background: linear-gradient(100deg,
    transparent 39%, rgba(255, 255, 255, .30) 45%,
    rgba(255, 255, 255, .92) 50%, rgba(205, 242, 255, .45) 55%,
    transparent 61%);
  background-size: 220% 100%;
  mix-blend-mode: screen;
  animation: foilSheen 2.8s linear infinite;
  animation-delay: var(--foil-delay, 0s);
}
.sf-face.foil-live::after, .cf-face.foil-live::after { animation-duration: 1.9s; }
@media (prefers-reduced-motion: reduce) {
  .sf-face.foil::before, .sf-face.foil::after,
  .cf-face.foil::before, .cf-face.foil::after { animation: none; }
}

/* ---------- 「获得 token」展示(2026-10-25) ----------
   口径: token 进手牌 —— 手牌对对手隐藏, 但「他拿到了什么 token」是公开情报,
   所以双方都要看到这段动画。与「公开卡牌」区分: TOKEN 角标 + 金色描边 + 扫光。 */
.token-fx {
  position: fixed; inset: 0; z-index: 302;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(circle, rgba(20,15,4,.62) 34%, rgba(0,0,0,.26));
  pointer-events: none; animation: sf-bg .2s ease-out;
}
.token-fx .tf-label {
  color: #ffd98a; font-size: 18px; font-weight: 800; letter-spacing: .5px;
  text-shadow: 0 2px 10px #000, 0 0 18px rgba(255,190,70,.55);
  animation: sf-pop .4s cubic-bezier(.2,1.4,.4,1); padding: 0 14px; text-align: center;
}
.token-fx .tf-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; max-width: 94vw; }
.token-fx .tf-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  animation: tf-in .5s cubic-bezier(.2,1.4,.4,1);
}
.token-fx .tf-card img {
  width: 152px; border-radius: 10px;
  border: 2px solid rgba(255,205,100,.9);
  box-shadow: 0 0 26px rgba(255,190,70,.7), 0 8px 22px rgba(0,0,0,.6);
}
.token-fx .tf-star { color: #ffcf5a; font-size: 15px; }
.token-fx .tf-tag {
  position: absolute; top: -8px; left: -6px; z-index: 2;
  padding: 2px 7px; border-radius: 6px;
  font-size: 10px; font-weight: 800; letter-spacing: .8px;
  color: #3a2a05; background: linear-gradient(180deg, #ffe6a3, #f5bf4e);
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.token-fx .tf-n {
  position: absolute; top: -8px; right: -6px; z-index: 2;
  padding: 2px 7px; border-radius: 6px;
  font-size: 11px; font-weight: 800; color: #fff; background: #c8452c;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.token-fx .tf-name {
  color: #fff; font-size: 13.5px; line-height: 1.25; max-width: 156px; text-align: center;
  text-shadow: 0 2px 6px #000;
}
.token-fx.out { animation: sf-fade .42s forwards; }
@keyframes tf-in {
  from { transform: translateY(18px) scale(.82); opacity: 0; }
  60%  { transform: translateY(0) scale(1.04); opacity: 1; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
@media (max-width: 620px) {
  .token-fx .tf-card img { width: 96px; }
  .token-fx .tf-name { font-size: 11px; max-width: 96px; }
  .token-fx .tf-label { font-size: 14.5px; }
}
@media (orientation: landscape) and (max-height: 560px) {
  .token-fx { gap: 8px; }
  .token-fx .tf-card img { width: 84px; }
  .token-fx .tf-name { font-size: 10.5px; max-width: 84px; }
  .token-fx .tf-label { font-size: 13.5px; }
}

/* 开局领袖公开: 掷骰之前先亮双方的领袖(左右卡图 + 中央 VS), 点击可跳过 */
.leader-clash {
  position: fixed; inset: 0; z-index: 305; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(10px, 2.6vh, 26px);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 44%, rgba(126,86,36,.42) 0%, rgba(23,15,9,.94) 62%),
    #0b0907;
  animation: sf-bg .24s ease-out;
}
.leader-clash::after {              /* 中央斜向扫光, 让亮相有点"开幕"感 */
  content: ''; position: absolute; left: -40%; top: -60%; width: 55%; height: 220%;
  background: linear-gradient(100deg, transparent, rgba(255,226,160,.15), transparent);
  transform: rotate(8deg); pointer-events: none;
  animation: lc-sweep 1.5s .15s ease-out both;
}
.lc-label {
  font-size: clamp(11px, 2.2vw, 13px); letter-spacing: .42em; padding-left: .42em;
  color: rgba(255,214,140,.9); animation: sf-fade-in .4s ease-out both;
}
.lc-inner {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(8px, 4vw, 64px); width: 100%; padding: 0 4vw; position: relative; z-index: 1;
}
.lc-side { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.lc-frame {
  border-radius: 12px; overflow: hidden; line-height: 0;
  box-shadow: 0 0 0 2px rgba(255,214,140,.42), 0 0 34px rgba(255,170,60,.32), 0 12px 30px rgba(0,0,0,.6);
}
/* 只给上限不给定宽: 图片按比例缩到框内, 矮屏(手机横屏)时框也跟着收窄, 不留空边 */
.lc-frame img { display: block; max-width: clamp(104px, 22vw, 208px); max-height: 44vh; }
.lc-missing {
  display: flex; align-items: center; justify-content: center; color: #ffd27a;
  width: clamp(104px, 22vw, 208px); height: clamp(146px, 30vw, 292px); font-size: 34px;
}
.lc-name {
  color: #fff; font-size: clamp(12px, 2.6vw, 15px); font-weight: 700;
  text-shadow: 0 2px 8px #000; max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lc-card {
  color: rgba(255,226,160,.85); font-size: clamp(11px, 2.4vw, 13px);
  max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lc-a { animation: lc-in-a .6s cubic-bezier(.16,1,.3,1) both; }
.lc-b { animation: lc-in-b .6s cubic-bezier(.16,1,.3,1) both; }
.lc-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; }
.lc-vs {
  font-size: clamp(26px, 6.4vw, 60px); font-weight: 900; letter-spacing: .06em; color: #ffd27a;
  text-shadow: 0 0 22px rgba(255,170,60,.85), 0 3px 0 #7d4110, 0 7px 22px rgba(0,0,0,.8);
  animation: lc-vs-in .5s .3s cubic-bezier(.2,1.5,.4,1) both;
}
.lc-sub {
  color: rgba(255,255,255,.55); font-size: clamp(10px, 2.2vw, 12px); letter-spacing: .12em;
  animation: sf-fade-in .4s .5s both;
}
.lc-skip {
  position: absolute; bottom: max(14px, env(safe-area-inset-bottom));
  color: rgba(255,255,255,.4); font-size: 12px; animation: sf-fade-in .5s .9s both;
}
.leader-clash.out { animation: sf-fade .38s forwards; }
@keyframes lc-in-a { from { opacity: 0; transform: translateX(-42%) scale(.9) rotate(-5deg); } to { opacity: 1; transform: none; } }
@keyframes lc-in-b { from { opacity: 0; transform: translateX(42%) scale(.9) rotate(5deg); } to { opacity: 1; transform: none; } }
@keyframes lc-vs-in {
  0% { opacity: 0; transform: scale(2.4); filter: blur(9px); }
  62% { opacity: 1; transform: scale(.94); filter: blur(0); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes lc-sweep { from { transform: translateX(0) rotate(8deg); opacity: 0; } 30% { opacity: 1; } to { transform: translateX(240%) rotate(8deg); opacity: 0; } }
@keyframes sf-fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .lc-a, .lc-b, .lc-vs, .lc-sub, .lc-skip, .leader-clash::after { animation: none; }
}

#toast, #admin-toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: rgba(30,28,24,.92); color: #fff;
  padding: 10px 22px; border-radius: 24px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 200;
}
#toast.show, #admin-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err, #admin-toast.err { background: var(--danger); }
#admin-toast { z-index: 300; }

/* ---------- 主页 ---------- */
.home { max-width: 1000px; margin: 0 auto; padding: 30px 20px 60px; }
/* 首页最上面那行声明: 同人游戏, 不盈利 */
.home-notice {
  text-align: center; font-size: 12px; line-height: 1.6; letter-spacing: 1px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 16px; max-width: 560px; margin: 0 auto;
}
.home-hero { text-align: center; padding: 40px 0 10px; }
.home-hero h1 {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center;
  gap: 0 16px; font-size: 52px; letter-spacing: 4px; color: var(--ink);
}
/* O / M 用品牌橙, 与投稿片头的字标一致; 其余深墨色(浅底上白字看不见) */
.home-hero h1 i { font-style: normal; color: var(--accent); }
.home-hero h1 .b-en { white-space: nowrap; }
.home-hero h1 .b-cn { font-size: 34px; letter-spacing: 8px; }
/* 竖屏手机: 13 个字的长标题按桌面字号会顶出屏幕, 收一档 */
@media (max-width: 620px) {
  .home-hero h1 { gap: 0 10px; font-size: 30px; letter-spacing: 2px; }
  .home-hero h1 .b-cn { font-size: 20px; letter-spacing: 4px; }
}
.home-hero .sub { color: var(--muted); margin-top: 6px; letter-spacing: 3px; }
.home-actions { display: flex; gap: 14px; justify-content: center; margin: 30px 0; flex-wrap: wrap; }
.sec-title { font-weight: 700; font-size: 15px; margin: 18px 0 10px; }
.home-rules ul { background: var(--panel); border-radius: var(--radius); padding: 18px 18px 18px 34px; line-height: 2; font-size: 14px; }
.home-rules b { color: var(--accent); }
.home-foot { margin-top: 16px; text-align: center; font-size: 13px; }
.home-foot .link-btn { color: var(--muted); }
.home-foot .link-btn:hover { color: var(--accent); }
/* 底部现在有两个入口(⚙ 设置 / 🐞 反馈): 并排太挤, 隔开一点 */
.home-foot .link-btn + .link-btn { margin-left: 16px; }

/* 卡组页顶部的同步状态条(2026-11-18)
   以前这里只有一句写死的「☁ 已绑定账号」—— token 过期、断网、超限时照样这么写,
   玩家换台设备发现卡组不在, 也无从判断是"没登录"还是"没同步上"。四档配色摊开:
   ok(绿)=已进账号 · warn(黄)=正在传/有改动待传 · bad(红)=过期/离线/失败 · guest(灰)=游客。
   配色一律用主题变量(--ok/--warn/--danger/--muted), 别写死色值。 */
.deck-sync-hint {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; border-radius: 8px; margin-bottom: 4px;
  border: 1px solid var(--border); background: var(--panel); color: var(--muted);
}
.deck-sync-hint .dsx-text { flex: 1; min-width: 180px; line-height: 1.5; }
.deck-sync-hint .dsx-btns { display: flex; gap: 6px; flex: none; }
.deck-sync-hint .dsx-btns .btn { padding: 5px 10px; font-size: 12px; white-space: nowrap; }
.deck-sync-hint.ok    { border-color: var(--ok);     color: var(--ok); }
.deck-sync-hint.warn  { border-color: var(--warn);   color: var(--warn); }
.deck-sync-hint.bad   { border-color: var(--danger); color: var(--danger); }
.deck-sync-hint.guest { color: var(--muted); }

.deck-card {
  background: var(--panel); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); cursor: pointer; width: 165px;
  transition: transform .12s;
}
.deck-card:hover { transform: translateY(-3px); }
.deck-card.row { display: flex; width: 100%; align-items: center; padding: 10px; gap: 12px; cursor: default; }
.deck-card-img { height: 100px; display: flex; justify-content: center; overflow: hidden; }
/* 卡位高度固定, 卡牌整块缩到卡图大小(卡图 291×400): 闪卡反光就只覆盖卡面,
   以前 .card-thumb 固定 132px 宽而图只有 ~73px, 右边那条空白也一起在闪 */
.deck-card-img .card-thumb { width: 73px; aspect-ratio: 291 / 400; }
.deck-card-img .card-thumb img { width: 100%; height: 100%; object-fit: contain; }
.deck-card.row .deck-card-img { height: 72px; }
.deck-card.row .deck-card-img .card-thumb { width: 53px; }
.deck-card.row .deck-card-img .card-thumb img { height: 100%; width: 100%; }
.deck-card-info { padding: 8px 10px 12px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.deck-card.row .deck-card-info { flex: 1; }
.deck-card-info span { color: var(--muted); font-size: 12px; }
.deck-card-actions { display: flex; gap: 6px; }
.home-decks .pool-grid, .deck-list { display: flex; flex-wrap: wrap; gap: 12px; }
.deck-list { padding: 20px; max-width: 1000px; margin: 0 auto; }
.empty-hint { color: var(--muted); font-size: 13px; padding: 16px; text-align: center; }

/* ---------- 卡组广场 ---------- */
.plaza-total { color: var(--muted); font-size: 12px; margin-left: 8px; }
.plaza-search { border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 13px; width: 180px; }
/* IP 筛选下拉: 按领袖所属 IP 过卡组; IP 名可能很长, 限制宽度并允许收缩 */
.plaza-ip { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font-size: 13px; max-width: 200px; min-width: 96px; }
.plaza-mine { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.pz-detail-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pz-detail-head b { font-size: 16px; }
.pz-detail-meta { color: var(--muted); font-size: 12px; }
.pz-detail-actions { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }
.pz-pub-hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
@media (max-width: 720px) {
  .plaza-search { width: 110px; }
  .plaza-ip { max-width: 132px; }
  .topbar { flex-wrap: wrap; }
}

/* ---------- 组卡组 ---------- */
.deckbuilder { display: flex; height: calc(var(--app-h, 100vh) - 57px); }
.db-left { flex: 1.4; display: flex; flex-direction: column; border-right: 1px solid var(--border); min-width: 0; }
.db-filters { display: flex; gap: 8px; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--border); }
.db-filters select, .db-filters input {
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 13px;
}
.db-filters input { flex: 1; }
.db-pool { flex: 1; overflow-y: auto; padding: 12px 14px; }
.pool-hint { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.pool-grid { display: flex; flex-wrap: wrap; gap: 14px 12px; }
/* 检索面板(2026-11-12 训练员统一口径): 翻开的卡**全部列出来**, 不符合条件的压暗、不绑点击。
   以前只列候选, 玩家看不到自己翻到了什么; 现在暗色一压, 一眼分清「能拿的」和「看看而已的」。
   ⚠ 暗色只做视觉, 判定仍在 JS(filterCard) —— CSS 不许参与「可不可选」。 */
.pool-grid .card-thumb.off {
  opacity: .38; filter: grayscale(.85) brightness(.85); cursor: default;
}
.pool-grid .card-thumb.off:hover { transform: none; }
/* 翻空(卡组已空 / 一张都没翻开): 面板照弹, 用这句话代替空网格, 免得玩家以为加载失败 */
.pool-empty {
  margin: 22px 4px 10px; text-align: center;
  font-size: 13px; line-height: 1.7; color: var(--muted, #9fb0c4);
}
/* ---------- 观星面板: 卡组顶 / 卡组底 分配 ---------- */
.scout-tabs { display: flex; gap: 8px; margin: 8px 0 2px; }
.btn.mini { padding: 5px 12px; font-size: 13px; }
.scout-tabs .btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.scout-zone { margin-top: 10px; }
.scout-zone .scout-cap { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.scout-zone .pool-grid { min-height: 8px; gap: 10px 8px; }
.scout-zone .pool-grid:empty::after { content: '（空）'; font-size: 12px; color: var(--muted); opacity: .7; }
/* 三个分区叠在一屏里, 卡图比默认 132px 收小一档, 免得「还没分配」被挤到屏幕外 */
.scout-zone .card-thumb { width: 96px; }
.db-right { flex: 1; overflow-y: auto; padding: 14px 18px; min-width: 0; }
.db-leader, .db-main { background: var(--panel); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.leader-row { display: flex; gap: 12px; align-items: flex-start; min-height: 80px; }
.leader-item { display: flex; flex-direction: column; align-items: center; }
.issue { border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.7; }
.issue.warn { background: #fdf3e0; color: #8a6116; }
.issue.ok { background: #e8f5ec; color: var(--ok); }

/* ---------- 对局设置 ---------- */
.setup-box {
  /* 460 → 520: 卡组那一行多了「🖼 选择」, 不放开下拉框会被压到只剩「卡组名（领袖：」*/
  max-width: 520px; margin: 40px auto; background: var(--panel);
  border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 14px;
}
.setup-row { display: flex; align-items: center; gap: 10px; }
.setup-row label { width: 110px; font-size: 14px; color: var(--muted); }
.setup-row input, .setup-row select {
  flex: 1; border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 14px;
}
.setup-hint { font-size: 13px; color: var(--muted); line-height: 1.6; }
.setup-box .big { margin-top: 6px; }
/* 「🎲 随机」选卡组: 与下拉框同一行, 下拉可压缩(长卡组名不把按钮挤出去) */
.setup-row select { min-width: 0; }
.rand-deck { flex: 0 0 auto; padding: 9px 12px; font-size: 13px; white-space: nowrap; }
/* 「🖼 选择」(按领袖缩略图挑卡组): 与「🎲 随机」同一档宽度, 别被下拉框压扁 */
.pick-deck-btn { flex: 0 0 auto; padding: 9px 12px; font-size: 13px; white-space: nowrap; }

/* ---------- 对战界面 ---------- */
.battle-screen {
  display: flex; flex-direction: column;
  height: var(--app-h, 100vh); max-width: none; margin: 0 auto; padding: 6px 12px;
  gap: 6px; overflow-x: hidden; overflow-y: auto;
  /* 手牌卡宽(训练员 2026-11-02「对手的手牌要跟我的手牌一样大」):
     只在这里按断点改一次, 自己的手牌行与对手手牌行都引用它 —— 两边永远不会再跑偏。
     卡高按 1.4 倍卡宽推算, 对手那一行的 max-height 也由它算。 */
  --hand-w: 96px;
}
.zone { background: var(--panel); border-radius: var(--radius); padding: 8px 14px; border: 1px solid var(--border); flex-shrink: 0; position: relative;
  /* 卡图尺度放在 .zone 上: 领袖行(.leader-row-mini)与应援行(.supports-row)是同一块场地的兄弟节点,
     训练员 2026-10-26 要求「领袖跟应援卡一样大」→ 两行共用这一个变量, 不再各写一份宽度。 */
  --sup-w: 104px;
  /* 横置 = 卡图 rotate(-90deg) 且不缩放, 视觉宽度变成卡高(1.375×卡宽),
     左右各溢出 (1.375-1)/2 = 18.75% 卡宽 */
  --rest-bleed: calc(var(--sup-w) * .1875);
}
/* 统一对战区域: 双方玩家在同一块场地内 */
.arena {
  flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 3px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 14px; overflow-x: hidden; overflow-y: auto; position: relative;
}

/* ---- 战斗指向: 攻击用的应援卡 → 被攻击的目标 ---- */
/* top/left 而不是 inset:0 —— JS 会按战场「内容尺寸」写 width/height(手机竖屏战场要滚动),
   用 inset:0 会被拉回可视区大小, 滚动后箭头被裁掉 */
.atk-arrow-layer {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 6; overflow: visible;
}
/* 白色底衬: 深色战场/浅色战场都看得清, 且不依赖 SVG filter(部分手机 GPU 上 drop-shadow 会整条不画) */
.atk-arrow-layer .atk-halo {
  fill: none; stroke: rgba(255, 255, 255, .92); stroke-width: 7; stroke-linecap: round; opacity: .4;
}
.atk-arrow-layer .atk-line {
  fill: none; stroke: #e8543b; stroke-width: 3.4; stroke-linecap: round;
  stroke-dasharray: 10 7; animation: atkDash .9s linear infinite;
}
.atk-arrow-layer .atk-head {
  fill: #e8543b; stroke: rgba(255, 255, 255, .92); stroke-width: 1.4; paint-order: stroke;
}
@keyframes atkDash { to { stroke-dashoffset: -34; } }
/* 手机屏小, 箭头略粗一档(并提高对比), 否则远看像没有 */
html.is-mobile .atk-arrow-layer .atk-line { stroke-width: 4.6; stroke-dasharray: 13 8; }
html.is-mobile .atk-arrow-layer .atk-halo { stroke-width: 9.5; opacity: .48; }
/* 攻击源: 红色描边脉冲；目标: 金色描边脉冲 */
.atk-source {
  border-radius: 8px; box-shadow: 0 0 0 3px rgba(224, 86, 63, .55), 0 0 14px rgba(224, 86, 63, .35);
  animation: atkSrcPulse 1.2s ease-in-out infinite;
}
.atk-target {
  border-radius: 8px; box-shadow: 0 0 0 3px rgba(255, 199, 66, .85), 0 0 16px rgba(255, 199, 66, .45);
  animation: atkTgtPulse 1.1s ease-in-out infinite;
}
@keyframes atkSrcPulse { 50% { box-shadow: 0 0 0 3px rgba(224, 86, 63, .3), 0 0 6px rgba(224, 86, 63, .2); } }
@keyframes atkTgtPulse { 50% { box-shadow: 0 0 0 3px rgba(255, 199, 66, .45), 0 0 6px rgba(255, 199, 66, .25); } }
.arena .zone { background: transparent; border: none; border-radius: 0; padding: 2px 0; }
.arena .zone.side-opp { border-bottom: 1px dashed var(--border); padding-bottom: 6px; }
.arena .zone.side-mine { border-top: 1px dashed var(--border); padding-top: 6px; }

/* 结束回合: 屏幕右下角圆形按钮。
   自己回合的空闲主阶段 = 红色可点; 对手回合 / 战斗结算 / 操作进行中 = 灰色不可点。
   状态由 battle.js 的 _setEndTurnBtn() 切 .is-locked(不可点态 pointer-events:none)。 */
.end-turn-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0; border: none; cursor: pointer;
  color: #fff; line-height: 1.05;
  background: linear-gradient(160deg, #e5543f 0%, #c02a1c 58%, #9c1f14 100%);
  box-shadow: 0 6px 18px rgba(150,30,20,.45), inset 0 1px 0 rgba(255,255,255,.28);
  transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.end-turn-fab .etf-ico { font-size: 16px; line-height: 1; margin-bottom: 2px; }
/* 四个字在圆里折成两行(结束/回合), 比挤成一行清楚 */
.end-turn-fab .etf-txt { font-size: 9.5px; font-weight: 800; letter-spacing: 0; line-height: 1.2; max-width: 2.1em; text-align: center; }
.end-turn-fab:active { transform: scale(.93); }
.end-turn-fab.is-locked {
  pointer-events: none; cursor: default; opacity: .92;
  color: #a7aeb8;
  background: linear-gradient(160deg, #4c525a 0%, #3a3f46 60%, #2d3138 100%);
  box-shadow: 0 4px 12px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.08);
  filter: saturate(.15);
}
/* 生命区: 安防区式卡背横排 */
.life-row {
  display: flex; gap: 5px; align-items: center; flex-wrap: wrap;
  min-height: 58px; margin: 3px 0; padding: 3px 0;
}
.life-label {
  font-size: 12px; font-weight: 700; color: #6b6555;
  background: #f1ede4; border-radius: 12px; padding: 3px 10px; margin-right: 4px;
}
.life-card {
  width: 42px; height: 58px; border-radius: 6px; flex-shrink: 0;
  background: linear-gradient(145deg, #3a3f6b 0%, #23264a 60%, #191b36 100%);
  border: 1.5px solid #14162c;
  box-shadow: inset 0 0 0 2px #4a5089, 0 1px 3px rgba(0,0,0,.3);
  display: flex; align-items: center; justify-content: center;
}
.life-card-mark {
  color: #8a93d4; font-size: 13px; font-weight: 800; font-style: italic;
  letter-spacing: 1px; opacity: .85;
}
.life-empty { font-size: 12px; color: var(--danger); }
/* 设置里「生命区只显示血量数」(训练员 2026-11-02): 那一排卡不再画, 别再撑出 58px 的空白 */
.life-row.plain { min-height: 0; }
.life-row.plain .life-label { font-size: 13px; padding: 4px 12px; }

/* ---- 领袖行 + 生命区(训练员 2026-11-02 参考对战截图: 生命放玩家左手边, 与领袖同一行) ----
   第二次修正(2026-11-02): 原来是「3 列小卡背平铺」, 5~7 张要折成两行、第二行被行高裁掉,
   玩家只看见 3 张 → 以为只剩 3 血。改成截图里的做法:
     [ 生命\n5 ] [▨▨▨▨▨]  ← 左边一颗大数字写明还剩几血, 右边一条**半摞**的卡背
   卡背用负 margin 互相压住(head 之后每张压掉一半), 一眼看出是「一叠」而不是散开的几张。 */
.field-row { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.life-row.in-leader {
  flex: 0 0 auto; width: auto; max-width: none;
  display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-start;
  gap: 0; min-height: 0; margin: 0; padding: 3px 9px 3px 6px;
  /* 战场是深色的 → 这格也用深色半透明(浅灰底在深色战场上像贴了张纸, 而且「生命」两个字看不清) */
  background: rgba(12, 16, 26, .55);
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 9px;
}
/* 剩余血量: 数字占主位(大、醒目), 「生命」两个小字在其上作说明 */
.life-row.in-leader .life-label {
  flex: 0 0 auto; width: auto; margin: 0 7px 0 0; padding: 0 7px 0 0;
  background: none; border-right: 1px solid rgba(255, 255, 255, .16); border-radius: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 8.5px; line-height: 1.1; color: #aebbd2; text-align: center;
  white-space: nowrap;
}
.life-row.in-leader .life-label > .life-k { display: block; font-size: 8.5px; color: #aebbd2; }
.life-row.in-leader .life-label > .life-n {
  display: block; font-size: 20px; font-weight: 800; line-height: 1;
  color: #ff8a72; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px rgba(255, 90, 60, .35);
}
/* 翻血角标: 基础样式是「大红药丸」, 在深色小格里太抢眼(比血量数字还醒目) →
   改成淡红描边的小标签, 位置仍在数字下面 */
.life-row.in-leader .life-flip-badge {
  margin: 2px 0 0; padding: 0 3px; font-size: 7px; line-height: 1.35; border-radius: 5px;
  background: rgba(198, 40, 40, .16); color: #ff9b8a; box-shadow: none;
  border: 1px solid rgba(255, 120, 100, .45); animation: none;
}
/* 半摞卡背: 每张向左压住前一张的一半(负 margin), 后面的盖在前面的上方 */
.life-row.in-leader > .life-card,
.life-row.in-leader > .card-thumb.life-up {
  flex: 0 0 auto; width: 30px; min-width: 30px; height: 40px; border-radius: 4px;
  margin-left: -15px; position: relative;
  box-shadow: -1px 0 1px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .3);
}
.life-row.in-leader > .life-label + .life-card,
.life-row.in-leader > .life-label + .card-thumb.life-up { margin-left: 0; }
/* 翻开的生命卡(正置)是双方都能看的公开信息 → 压在卡背之上, 别被后来的「叠」盖住 */
.life-row.in-leader > .card-thumb.life-up { z-index: 5; }
/* 叠起来以后每张只露出半张, 中间那个「om」会只剩半个字母 → 干脆不写, 用斜纹底当牌背纹理
   (与卡组/废弃区/除外区那几个小图标同一套画法, 不额外加载图片) */
.life-row.in-leader .life-card-mark { display: none; }
.life-row.in-leader .life-card {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.075) 0 3px, transparent 3px 7px),
    linear-gradient(145deg, #3a3f6b 0%, #23264a 60%, #191b36 100%);
}
.life-row.in-leader .life-empty { font-size: 10px; }
/* 只要数字的精简模式: 胶囊照旧横排, 数字并进同一行 */
.life-row.plain .life-label { flex-direction: row; align-items: baseline; gap: 4px; }
.life-row.plain .life-label > .life-k { display: inline; font-size: 12px; }
.life-row.plain .life-label > .life-n { display: inline; font-size: 15px; line-height: 1.1; }

/* ---- 生命区 + 玩家名片: 名片贴在生命区正下方, 不再占用场上(战场)那一排 ----
   训练员 2026-11-02:「玩家 id 不要放在这里占据场上空间, 双方 id 和称号都放到各自生命区下方」。
   桌面/手机两种网格布局里, 这一列统一由 .life-col 占 grid-area: life。 */
.zone > .life-col {
  display: flex; flex-direction: column; gap: 3px;
  align-items: flex-start; justify-content: center;
  min-width: 0; grid-area: life;
}
/* ---- 状态条: 名字 + 生命/手牌小胶囊 + 卡组/废弃/除外(图形化) ---- */
.zone-bar {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  min-height: 0; padding: 1px 0;
}
.zone-bar .pinfo { flex: 1 1 auto; gap: 6px; font-size: 12px; min-width: 0; }
.pinfo.has-idcard .pname { display: none; }   /* 名片里已经有 ID, 别再显示一遍纯文字名字 */
.zone-bar .pname {
  font-size: 12.5px; max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.zone-bar .pill { padding: 1px 8px; font-size: 10.5px; }
.res-row { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.res {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px 2px 3px; border-radius: 8px; cursor: pointer;
  background: #f6f2ea; border: 1px solid #e2dac9; color: #5f5949;
  font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums;
  line-height: 1; transition: transform .1s ease, box-shadow .12s ease;
}
.res:hover { box-shadow: 0 2px 8px rgba(120,100,60,.18); }
.res:active { transform: scale(.96); }
/* 「整理手牌」(训练员 2026-11-06): 跟在卡组/废弃/除外那一排的右端, 落在装着自己手牌那一区的右上角。
   点一下把这一手牌按 应援卡 → 技能卡 → 等级 → 编号 重排(见 Battle.sortHand)。
   ⚠ 不挂 .res 类: .res 是「资源图标」的语义(卡组/废弃/除外), 用例按 `.res` 数资源个数
   (test_guest_layout_parity 的 ①「每区 3 个资源图标」), 混进来会把资源数数成 4 —— 外观照抄 .res 即可。 */
.hand-sort {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 8px; border-radius: 8px; cursor: pointer;
  background: #f6f2ea; border: 1px solid #e2dac9; color: #5f5949;
  font-size: 11px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
  transition: transform .1s ease, box-shadow .12s ease;
}
.hand-sort:hover { background: #fdf7ee; border-color: #cdbf9f; box-shadow: 0 2px 8px rgba(120,100,60,.18); }
.hand-sort:active { transform: scale(.96); }
.hand-sort .hs-ico { font-style: normal; font-size: 13px; line-height: 1; color: #7a6a3f; }
/* 手机横屏那一档状态与手牌压在同一行, 只留一枚 ⇅ 图标, 别把资源数字挤掉 */
html.is-mobile .hand-sort b { display: none; }
.res-static { cursor: default; }
.res-static:hover { box-shadow: none; }
.res b { font-size: 12px; }
/* 小卡背/图标: 用渐变画, 不加载图片 */
.res-ico {
  width: 15px; height: 21px; border-radius: 3px; flex: 0 0 auto; display: block;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.16) 0 3px, transparent 3px 6px),
    linear-gradient(145deg, #3a3f6b 0%, #23264a 60%, #191b36 100%);
  border: 1px solid #14162c;
  box-shadow: inset 0 0 0 1px #4a5089;
}
.res-ico.res-grave {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.12) 0 3px, transparent 3px 6px),
    linear-gradient(145deg, #6b3a3a 0%, #4a2323 60%, #361919 100%);
  border-color: #2c1414; box-shadow: inset 0 0 0 1px #89504a;
}
.res-ico.res-gone {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.10) 0 3px, transparent 3px 6px),
    linear-gradient(145deg, #4a4a4a 0%, #2b2b2b 60%, #191919 100%);
  border-color: #101010; box-shadow: inset 0 0 0 1px #6d6d6d;
}
.pinfo { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.pill {
  background: #f1ede4; border-radius: 14px; padding: 3px 10px; font-size: 12px; color: #6b6555;
}
.pill.danger { background: #fbe4e4; color: var(--danger); font-weight: 700; }

/* ===== 抽牌提醒 / 洗入卡组动画（双方可见）=====
   抽牌: 状态行上冒「卡背 +N」, 卡组胶囊脉冲一次
   洗入卡组: 卡背(或 token 卡面)飞进卡组 + 卡组胶囊晃动 + 「洗入卡组 ×N」标签 */
.pinfo { position: relative; }
.draw-fx, .deckin-fx {
  position: absolute; right: 6px; top: -30px; z-index: 6;
  display: flex; align-items: center; gap: 5px;
  pointer-events: none; padding: 3px 8px; border-radius: 12px;
  background: rgba(255, 252, 245, .96); border: 1px solid #e6dcc6;
  box-shadow: 0 6px 18px rgba(90, 70, 30, .18);
  font-size: 12px; font-weight: 700; color: #6b6555; white-space: nowrap;
  animation: drawRise .95s cubic-bezier(.2, .8, .3, 1) both;
}
/* 对手侧: 状态行在屏幕最上方, 浮层改往下方长, 不会被裁掉 */
.draw-fx.opp, .deckin-fx.opp { top: auto; bottom: -30px; }
.draw-fx.out, .deckin-fx.out { animation: fxOut .45s ease-in both; }
.draw-fx .df-card {
  width: 13px; height: 18px; border-radius: 3px;
  background: linear-gradient(150deg, #6f7fd6 0%, #4a5aa8 55%, #38437e 100%);
  border: 1px solid #2c3563;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.draw-fx .df-card.d2 { animation-delay: .1s; opacity: .85; }
.draw-fx .df-num { color: #d4762b; letter-spacing: .5px; }
.pill.deck-pulse { animation: deckPulse .62s ease-out 2; }
.pill.deck-shake { animation: deckShake .5s ease-in-out 2; }
.deckin-fx .di-label { color: #8a6a2f; }
.deckin-fx .di-cards { display: inline-flex; gap: 2px; }
.deckin-fx .di-card {
  width: 12px; height: 16px; border-radius: 2px; overflow: hidden;
  background: linear-gradient(150deg, #6f7fd6 0%, #4a5aa8 55%, #38437e 100%);
  border: 1px solid #2c3563;
  animation: diFly 1.05s ease-in both; animation-delay: calc(var(--i, 0) * 70ms);
}
.deckin-fx .di-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes drawRise {
  0% { opacity: 0; transform: translateY(12px) scale(.88); }
  30% { opacity: 1; transform: translateY(-3px) scale(1); }
  75% { opacity: 1; transform: translateY(-8px) scale(1); }
  100% { opacity: 0; transform: translateY(-18px) scale(.98); }
}
@keyframes fxOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-8px); } }
@keyframes deckPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(233, 160, 60, 0); }
  50% { box-shadow: 0 0 0 6px rgba(233, 160, 60, .42); }
}
@keyframes deckShake {
  0%, 100% { transform: rotate(0); }
  22% { transform: rotate(-8deg); }
  48% { transform: rotate(7deg); }
  74% { transform: rotate(-3deg); }
}
@keyframes diFly {
  0% { opacity: 0; transform: translate(0, -6px) rotate(-14deg) scale(.75); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translate(10px, 16px) rotate(8deg) scale(.45); }
}
@media (prefers-reduced-motion: reduce) {
  .draw-fx, .deckin-fx, .deckin-fx .di-card { animation: none; }
  .pill.deck-pulse, .pill.deck-shake { animation: none; }
}

/* ── 「应援卡被破坏 / 领袖受到伤害」的轻微晃动（训练员 2026-11-17）─────────────
   由 js/effects.js 的 shakeSupport / shakeLeader 挂类, 口径见那边的注释。
   ⚠ 只用**独立的 translate 属性**做位移, 绝不写 transform: 横置卡的旋转写在 .ct-face(应援卡)
     与 .card-thumb 本身(领袖卡)上, 动画里一旦出现 transform 就会把旋转抹掉 ——
     卡会在被破坏的那一瞬间"弹正", 比不加动画还难看。
     translate 与 transform 是两个独立属性, 叠加而不是覆盖, 横置的卡照样绕着原角度轻晃。
   ⚠ 时长 .34s 必须与 effects.js 的 SHAKE_MS(340) 一致。 */
@keyframes supBreakShake {
  0%   { translate: 0 0; }
  16%  { translate: -6px 0; }
  32%  { translate: 5px 0; }
  48%  { translate: -4px 0; }
  64%  { translate: 3px 0; }
  80%  { translate: -2px 0; }
  100% { translate: 0 0; }
}
@keyframes leaderHurtShake {
  0%   { translate: 0 0; }
  18%  { translate: -5px 0; }
  36%  { translate: 4px 0; }
  54%  { translate: -3px 0; }
  72%  { translate: 2px 0; }
  100% { translate: 0 0; }
}
.sup-break-shake { animation: supBreakShake .34s ease-in-out both; will-change: translate; }
.leader-hurt-shake { animation: leaderHurtShake .34s ease-in-out both; will-change: translate; }
/* 破坏/受伤那一瞬浮起来的克隆卡: 真卡被重绘抹掉之后, 由它把这一下晃完 */
.shake-ghost { position: fixed; pointer-events: none; z-index: 72; }
@media (prefers-reduced-motion: reduce) {
  .sup-break-shake, .leader-hurt-shake { animation: none; }
}

/* 领袖旁「除外的卡加入手牌」累计次数 —— BDI-01「藤沼悟」独有标记, 双方可见(反馈 bmw3hjcepcabb)。
   2026-11-06: 收紧成「只认领袖卡号 + 计数 0 也常驻 + 可点开说明」; ⓘ 用伪元素画,
   免得每帧写 textContent 时把图标节点冲掉。 */
.leader-row-mini .ret-count {
  align-self: center; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 22px; padding: 0 7px;
  border-radius: 11px; border: 1px solid #b9a887;
  background: #fffaf0; color: #57514a;
  font-size: 12px; font-weight: 700; line-height: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
  cursor: pointer; pointer-events: auto;
  transition: background .12s, border-color .12s, transform .12s;
}
.leader-row-mini .ret-count::after {
  content: 'ⓘ'; margin-left: 3px;
  font-size: 10px; font-weight: 700; color: #8a6d3b;
}
.leader-row-mini .ret-count:hover,
.leader-row-mini .ret-count:focus-visible {
  background: #fff1d2; border-color: #d0a75c;
}
.leader-row-mini .ret-count:focus-visible { outline: 2px solid #4a8fc4; outline-offset: 2px; }
.leader-row-mini .ret-count:active { transform: scale(.94); }

/* 点徽章弹出的说明(本机只读, 不占联机操作清单) */
.ret-info { color: #57514a; font-size: 13px; line-height: 1.65; }
.ret-info p { margin: 6px 0; }
.ret-info .ret-now {
  margin: 8px 0; padding: 8px 10px;
  border: 1px solid #d8c49b; border-radius: 8px; background: #fffaf0;
}
.ret-info .ret-rules {
  margin: 8px 0; padding: 6px 10px;
  border-left: 3px solid #b9a887; background: #faf7f0;
}
.ret-info .ret-hint { color: #57514a; font-size: 12px; }

.leader-row-mini { display: flex; gap: 10px; margin: 6px 0; }
/* 领袖卡图与应援卡同宽(训练员 2026-10-26); flex:0 0 auto 防止被行/网格压扁 */
.leader-row-mini .card-thumb { width: var(--sup-w); flex: 0 0 auto; }
/* 领袖横置: 旋转整个卡牌元素(等比不变形), margin预留横躺后的空间 */
/* 领袖横置: 旋转整个卡牌元素(等比不变形, **不缩小**), margin 预留横躺后的左右溢出 */
.leader-row-mini .card-thumb.rested { transform: rotate(-90deg); margin: 16px var(--rest-bleed); }
.leader-row-mini .card-thumb.rested img { transform: none; margin: 0; }
.leader-row-mini .card-thumb.rested .ct-face { transform: none; margin: 0; }
/* 卡图本身按横置画的领袖(YNSU-02): 不再整体旋转, 保持文字正立。
   它比竖版卡矮, 行内会被 flex 拉伸成一整条(图在上、力量角标在底, 中间一片空白) → 顶部对齐。 */
.leader-row-mini .card-thumb.art-landscape.rested { transform: none; margin: 4px 0; align-self: flex-start; }
/* 横版卡图的领袖(LRX-001「银白钢铁伊克斯」, 原图 963×700)按**同一卡高**显示:
   竖版卡高 = 卡宽 × 1.375, 若横版也按卡宽画, 高度只剩卡宽 × 0.727 —— 比别的领袖矮一半,
   玩家看到的就是「LRX-001 太小了」(反馈 bmw1psq179592)。
   要等高就得放大宽度: 卡高 × (963/700) ≈ 卡宽 × 1.891。 */
.leader-row-mini .card-thumb.art-landscape { width: calc(var(--sup-w) * 1.891); }
.leader-row-mini .card-thumb.art-landscape img { width: 100%; }
/* 战斗力量对比: 大数字 VS */
.pow-duel { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 8px 0 4px; }
.pd-side { text-align: center; }
.pd-name { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.pd-num { font-size: 38px; font-weight: 800; line-height: 1.05; letter-spacing: 1px; }
.pd-atk { color: #ff5a5a; text-shadow: 0 0 14px rgba(255, 90, 90, .45); }
.pd-def { color: #5ab0ff; text-shadow: 0 0 14px rgba(90, 176, 255, .4); }
.pow-duel .pd-vs { font-size: 22px; font-weight: 800; color: var(--muted); }
.pd-win { color: var(--ok); font-weight: 700; }
/* 力量数字后面的「效果±N」小标(训练员 2026-10-29):
   应援卡效果 / 技能卡效果把战斗力量改动过时, 对手必须看得出这个数字不是卡面原值,
   否则防守/自保会拿错的力量做判断。刻意做得很小 —— 手机横屏中间栏只有 165px, 不能挤掉操作按钮。 */
.pw-eff {
  display: inline-block; margin-left: 5px; vertical-align: middle;
  font-size: 11px; font-weight: 700; line-height: 1.35; letter-spacing: 0; white-space: nowrap;
  padding: 1px 5px; border-radius: 6px;
  color: #ffcf7a; background: rgba(255, 176, 60, .16);
  border: 1px solid rgba(255, 176, 60, .55);
}
/* 中间栏: 「查看对手本次战斗使用的技能」按钮(比力量那块的下方)
   点不动的主因不是按钮本身: 中间栏每次重绘都会变高变矮, 玩家看到的位置和按下去的那一刻会错开
   → battle.js 里中间栏整块均可点(`_bindSkillPeekTap`), 这里只把点击区域做得够大 */
.skill-peek { display: flex; justify-content: center; margin-top: 8px; }
.skill-peek .mini-btn { font-size: 12px; padding: 6px 14px; max-width: 92%; min-height: 30px; cursor: pointer; }
/* 「查看对手本次战斗用的技能」现在挂在底部操作栏里(训练员 2026-11-02) */
.action-bar .skill-peek { margin: 0; }
.zone-bar .pinfo { justify-content: flex-start; }
/* 主阶段那颗「主要阶段」原来是大金字 + 光晕, 现在中间只剩它 → 缩成一枚小胶囊, 不占地方 */
.battle-info:has(.phase-hero) {
  background: transparent; border: none; box-shadow: none; padding: 0; max-height: none;
  max-width: none; width: auto;
}
.battle-info .phase-hero { height: auto; min-height: 0; gap: 6px; }
.battle-info .phase-hero .ph-icon { font-size: 13px; }
.battle-info .phase-hero .ph-name {
  font-size: 12px; letter-spacing: 3px; text-indent: 3px;
}
.battle-info .phase-hero .ph-badge { font-size: 9.5px; padding: 1px 7px; }
.battle-info .phase-hero .ph-glow { display: none; }
/* 战斗时正文里的老「力量对比面板」让位给上方的 5000×5000 胶囊, 只留文字提示 */
.battle-center.has-vs .battle-info .pow-duel { display: none; }
/* 支援区/手牌: 单行横向滚动, 登场再多卡也不撑高布局 */
.supports-row {
  /* --sup-w / --rest-bleed 定义在 .zone 上(领袖行共用同一尺度) */
  display: flex; gap: 10px; flex-wrap: nowrap;
  overflow-x: auto; overflow-y: hidden;
  min-height: 10px; padding: 4px 0;
  scrollbar-width: thin;
}
/* 横向滚动容器会裁到 padding box: 横置卡旋转后的左右两角原本落在容器外被切掉。
   有横置卡时补上等量左右内边距, 让整张横躺的卡图都留在可视区(平时不加, 免得整行缩进)。 */
.supports-row:has(.card-thumb.rested) {
  padding-left: var(--rest-bleed);
  padding-right: var(--rest-bleed);
}
/* ⚠ 应援卡必须 flex-shrink:0: 以前没写, 平板网格把中间列压窄后卡会被压扁成窄条
   (「领袖快看不见、应援全挤成一排小卡」的另一半原因, 用户报障 2026-10-26)。
   挤不下就交给本行的横向滑轨去滚 —— 与卡背/thumbs 一致。 */
.supports-row .card-thumb { width: var(--sup-w); flex: 0 0 auto; }
.supports-row .card-thumb.rested .ct-face { margin: 12px 0; }
/* 场上背置卡(HLS-003 贝尔·布鲁夫上尉): 与同排应援卡同宽, 只显示卡背 + 「背置」角标 */
.supports-row .card-thumb.card-back-thumb {
  width: var(--sup-w); flex-shrink: 0; position: relative;
  box-shadow: inset 0 0 0 2px #5a63a8, 0 0 10px rgba(110, 120, 200, .22);
}
.supports-row .card-thumb.card-back-thumb .card-back-mark { font-size: clamp(12px, 1.6vh, 17px); }
/* 应援区的可拖动滚动条(触屏): 触屏系统的 overlay 滚动条既不显示也拖不动,
   应援卡一多(iPad 上一行 8~10 张)就只能靠盲猜滑动 → 自绘一条贴在滑轨底边内侧。
   桌面端不显示(有原生细滚动条), 只在 html.is-touch 下生效。
   高度 8px 且压在滑轨的 4px 下内边距里, 基本不挡卡面/力量角标; 拖它不会触发卡牌点击。 */
.hsbar {
  position: absolute; display: none; height: 8px; border-radius: 4px;
  background: rgba(20, 24, 40, .45);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10);
  z-index: 4; touch-action: none; cursor: pointer;
  opacity: .75; transition: opacity .15s;
}
html.is-touch .hsbar.on { display: block; }
.hsbar.on:active { opacity: 1; }
.hsbar .hsbar-thumb {
  position: absolute; top: 0; left: 0; height: 8px; border-radius: 4px;
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 0 4px rgba(0, 0, 0, .3);
  will-change: transform;
}
.hsbar.on:active .hsbar-thumb { background: rgba(255, 255, 255, .92); }
/* 手牌区: 与场上应援区同一套横向滑轨 —— 卡牌保持原宽, 手牌再多也靠滚动看全,
   不再挤压重叠成一叠(之前超过一屏就把后面的牌压到看不见)。 */
.hand-row {
  display: flex; gap: 8px; flex-wrap: nowrap;
  overflow-x: auto; overflow-y: hidden;
  min-height: 120px; padding: 8px 0 4px;
  align-items: flex-end; scrollbar-width: thin;
  overscroll-behavior-x: contain;      /* 滑到头不要带着整个页面/战场一起动 */
  -webkit-overflow-scrolling: touch;
}
.hand-row::-webkit-scrollbar { height: 8px; }
.hand-row::-webkit-scrollbar-thumb { background: rgba(0,0,0,.22); border-radius: 4px; }
.hand-row::-webkit-scrollbar-track { background: transparent; }
.hand-row .card-thumb { width: var(--hand-w); flex-shrink: 0; position: relative; transition: transform .12s ease; }
/* 手牌重叠(扇形)时: 悬停浮起, 保证压在下面的卡也能看清/点到 */
.hand-row .card-thumb:hover { transform: translateY(-16px); z-index: 20; }
/* 中间栏 → **浮层**(训练员 2026-11-02「去掉中间的那个栏, 阶段按钮放在中间, 只保留很小的xx阶段的字样」)。
   以前它是 arena 里的一条实体行(回合条 + 提示 + 操作栏), 把上下两侧的领袖一起往下压;
   现在 absolute 覆盖整块战场、完全不占布局 → 两块场地紧邻, 领袖与领袖底的牌整体上移。
   浮层本身不吃点击(pointer-events:none), 里面的控件各自开 auto。 */
.battle-center {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center;
  pointer-events: none;
}
.phase-bar {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  width: 100%; padding: 2px 4px; font-size: 11px;
  pointer-events: auto;
}
.arena .phase-bar { background: transparent; border: none; padding: 2px 4px; }
/* 联机/观战的顶部 HUD(#net-hud) 是 fixed 浮层: 阶段条与小按钮往下让一档, 别被压在下面 */
.battle-screen:has(#net-hud) .phase-bar { margin-top: 26px; }
/* 中间竖排(训练员 2026-11-02「把上方那个回合数挪到中间主要阶段旁边」):
   上格「主要阶段 / 战斗提示」, 下格「你 / 对手 第几回合」, 整块在战场正中。
   以前回合数浮在顶栏正中(absolute 在 .phase-bar 里), 顶栏那条横贯屏幕, 把应援区压得很窄 */
.center-stack {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 4; pointer-events: none;
  /* 横排: 左「主要阶段」、右「你 / 对手 第几回合」 —— 只占一行, 塞得进两块场地之间那道缝 */
  display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 10px;
  width: max-content; max-width: 92%;
}
/* 提示条本来是浮层直系子级的 absolute 居中, 进了竖排容器交给容器摆 */
.center-stack .battle-info { position: static; left: auto; top: auto; transform: none; }
/* 「主要阶段 + 回合数」会浮在应援卡上方(两块场地之间没有固定空位), 没有底就被卡面吃掉:
   给一条**很窄**的深色半透明胶囊, 只托住文字, 不做成面板(训练员 2026-11-02 撤掉过大白块) */
/* 战斗时提示条已挪到底部, 中间只剩回合条 —— 它同样压在应援卡上, 给同一层胶囊底 */
.battle-center.has-vs .center-stack {
  background: rgba(12, 16, 26, .58);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 999px; padding: 2px 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  backdrop-filter: blur(3px);
}
.center-stack:has(.phase-hero) {
  background: rgba(12, 16, 26, .58);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 999px; padding: 2px 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  backdrop-filter: blur(3px);
}
.center-stack .turn-strip { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; }
/* 屏幕中间最右边: 日志 / 反馈 / 投降(训练员 2026-11-02)。
   原来在顶栏最右, 与「效果助手」一起把顶栏占满; 挪到中间右侧后顶栏只剩几个小图标,
   应援区与手牌行都不再被整条顶栏横着压住 */
.center-side {
  position: absolute; right: 2px; top: 44%; transform: translateY(-50%);
  z-index: 7; display: flex; flex-direction: column; gap: 5px;
  pointer-events: none;
}
.center-side .side-btn {
  pointer-events: auto; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-width: 44px; padding: 4px 6px; border-radius: 9px;
  font-size: 9.5px; line-height: 1.12; text-decoration: none; letter-spacing: .5px;
  background: rgba(12, 16, 26, .66); color: #dfe8f8;
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
  backdrop-filter: blur(2px);
}
.center-side .side-btn .sb-ico { font-size: 13px; line-height: 1.05; }
/* 未读聊天数: 挂在右缘「聊天」那颗的右上角(训练员 2026-11-03 把聊天从顶栏/卡组旁挪到这里)
   ⚠ 按钮必须 position:relative, 否则绝对定位会挂到 .center-side 上飘错位置 */
.center-side .side-btn { position: relative; }
.center-side .side-btn .sb-unread {
  position: absolute; top: -4px; right: -4px; z-index: 2;
  min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px;
  background: #e0503c; color: #fff; font-style: normal; font-weight: 800;
  font-size: 9px; line-height: 14px; text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
}
.center-side .side-btn.unread { border-color: rgba(255,140,120,.7); }
/* 触屏(手机/平板): 训练员 2026-11-02(第六轮)「手机上那三个按钮上移, 放到站场中间的最右侧」——
   以前这一列在触屏上是藏起来的, 三个入口挤在「我的状态行」尾部(贴着应援区右边、太靠下)。
   现在放出来: 改成**一行图标**(文字标签收起), 垂直居中贴右缘, 正好落在两块场地之间的空档里。
   ⚠ 右缘那一列「卡组 / 废弃 / 除外」是贴着右边的, 所以这里靠 top 找空档: 上下两条资源行之间
     那段是空的, 一行 28px 高的图标放得下(见 _shot_display_toggles.js 的 csRect 量测)。 */
html.is-touch .center-side {
  flex-direction: row; gap: 5px; right: 3px; top: 50%;
}
html.is-touch .center-side .side-btn {
  min-width: 0; width: 30px; height: 28px; padding: 0; border-radius: 8px; gap: 0;
}
html.is-touch .center-side .side-btn .sb-ico { font-size: 15px; line-height: 1; }
html.is-touch .center-side .side-btn .sb-tx { display: none; }
/* 状态行尾部那三颗小圆钮就地收起, 免得同一个入口在屏幕上出现两份(全屏/聊天球保留) */
html.is-touch #fab-log, html.is-touch #fab-bug, html.is-touch #fab-concede { display: none; }
.center-side .side-btn:hover { filter: brightness(1.2); }
.center-side .side-btn:active { transform: translateY(1px); }
.battle-tag { color: var(--accent); font-weight: 700; }
/* 回合计数提示: 顶部常驻「你 / 对手 现在是第几回合」, 当前行动方高亮 */
.turn-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.turn-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 11px; border-radius: 999px; font-size: 13px; line-height: 1.5;
  background: #f1ede4; color: #8a836f; border: 1px solid #e4ddcd;
  white-space: nowrap; transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.turn-pill .tp-who { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .5px; opacity: .9; }
.turn-pill .tp-num { font-style: normal; font-weight: 800; font-size: 13.5px; }
.turn-pill.on {
  background: var(--accent); color: #fff; border-color: var(--accent-dark);
  box-shadow: 0 3px 12px rgba(200, 85, 61, .32);
}
.turn-pill.on .tp-who { opacity: .88; }
.turn-pill .tp-live {
  font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .5px;
  background: rgba(255, 255, 255, .28); padding: 1px 6px; border-radius: 8px;
}
.turn-global { font-size: 11px; color: var(--muted); white-space: nowrap; }
/* 对局里那颗阶段小胶囊: 极小一号(训练员 2026-11-02 去中间栏后只剩这一行小字) */
.arena .turn-pill {
  padding: 1px 7px; font-size: 9.5px; line-height: 1.45; gap: 4px;
  background: rgba(255, 252, 245, .82); border-color: rgba(0,0,0,.10); color: #6f6959;
  backdrop-filter: blur(3px);
}
.arena .turn-pill .tp-who { font-size: 8px; letter-spacing: 0; opacity: .78; }
.arena .turn-pill .tp-num { font-size: 9.5px; }
.arena .turn-pill .tp-live { display: none; }   /* 「行动中」在小尺寸下太挤, 用 .on 的红底表示 */
.arena .turn-pill.on { background: var(--accent); color: #fff; border-color: var(--accent-dark); }
.arena .turn-global { font-size: 8.5px; }
.phase-now {
  font-size: 9.5px; font-weight: 800; letter-spacing: .5px;
  padding: 1px 8px; border-radius: 999px; white-space: nowrap;
  background: rgba(255, 252, 245, .82); color: #5f5949;
  border: 1px solid rgba(0,0,0,.10);
}
@media (max-width: 760px) {
  .phase-bar { flex-wrap: nowrap; gap: 6px; }
  .turn-pill { padding: 2px 9px; font-size: 12px; }
  .turn-pill .tp-num { font-size: 12.5px; }
}
@media (max-width: 480px) {
  .turn-global { display: none; }
}
/* 战斗提示: 浮在战场正中(训练员 2026-11-02)。
   2026-11-02 二次反馈「去除中间这个白色区域，不需要提示了」:
   大白底面板撤掉, 只留一条窄的深色半透明条 —— 中间那片战场要干净。
   防御阶段的整段说明已不在 JS 里生成(battle.js 的 defense 分支), 这里剩下的
   只有「等待对手 / 目标选择 / 结算差一口气」这类短句。 */
.battle-info {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 4; pointer-events: auto;
  background: rgba(12, 16, 26, .62); border-radius: 9px;
  padding: 4px 12px; font-size: 12px; line-height: 1.45; color: #e7eefc;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
  backdrop-filter: blur(2px);
  width: max-content; max-width: min(86%, 620px);
  max-height: 46%; overflow-y: auto; text-align: center;
}
.battle-info:empty { display: none; }
/* 训练员 2026-11-03「战斗时中间这个提示条删除, 不需要了」:
   中间这片只留「主要阶段」那颗小胶囊(.phase-hero), 其余正文一律不画 ——
   选攻击目标的白底警示条 / 防御条件 / 支付费用说明 / 「等待对手操作」/ 结算差一口气 / 终局说明。
   理由: 该点哪张卡场上有绿光高亮, 回合数由 .turn-strip 常显, 要按的按钮都在最底下 #action-bar,
   中间那条横贯屏幕的条子既挡卡面、又常被当成一整块面板。
   战斗态的正文早在 2026-11-02 就不画了(训练员「战斗时中间这个通知栏全去掉, 保留最底下这个栏位」),
   这次把非战斗态(主阶段的选目标 / 支付费用 / 等待对手)的正文一并收掉。
   ⚠ 节点仍留在 DOM 里: 渲染链路十几处会写 info.innerHTML, 摘掉节点会抛错 → 用隐藏而不是删除。 */
.battle-screen .battle-info:not(:has(.phase-hero)) { display: none; }
.battle-screen.in-battle .battle-info { display: none; }
/* 深色底上的字色: 这几条是给「等待对手 / 结算 / 终局说明」用的, 白底时代的灰字在深底上看不清 */
.battle-info b { color: #fff; }
.battle-info .hint { color: #aebbd2; }
.battle-info .ok { color: #8fe3a6; }
/* 有「力量 VS」时: 中间只剩回合条, 让它整颗落到那颗 5000×5000 胶囊下方(别贴着它底边) */
.battle-center.has-vs .center-stack {
  top: calc(50% + 56px); flex-direction: column; gap: 4px;
}
.battle-center.has-vs .battle-info {
  /* 战斗时正文紧贴在「力量 VS」正下方, 只留两三行(详细说明可滚动), 别去压应援卡 */
  top: auto; max-height: 74px; max-width: min(74%, 520px);
  font-size: 11px; line-height: 1.4; padding: 4px 11px; text-align: left;
}
/* 这段正文里原本有一颗 28px 的力量大字(宽面板时代的排版), 在浮层里会顶出一整行空白 */
.battle-center.has-vs .battle-info .pd-num { font-size: 15px !important; display: inline !important; vertical-align: baseline !important; }
/* 力量 VS(训练员 2026-11-02 参考对战截图): 中间一颗极简胶囊 「5000 × 5000」,
   取代原来那一大段力量对比面板 */
.pow-vs {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 6; pointer-events: none;
  display: flex; align-items: center; gap: 8px;
  padding: 4px 14px; border-radius: 999px;
  background: rgba(24, 26, 34, .88); color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 6px 22px rgba(0,0,0,.28);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pow-vs[hidden] { display: none; }
.pow-vs .pvs-n { font-size: 22px; font-weight: 900; letter-spacing: .5px; line-height: 1; }
.pow-vs .pvs-n.win { color: #ffd76a; }
.pow-vs .pvs-n.lose { color: #ff9b8a; }
.pow-vs .pvs-x { font-size: 12px; font-weight: 800; opacity: .7; }
.pow-vs .pvs-cap { font-size: 9px; font-weight: 700; opacity: .72; letter-spacing: .5px; }
/* 「本次攻击不可防御（可自保）」(训练员 2026-11-03): 战斗时挂在「力量 VS」胶囊正下方一行。
   以前这句只写在 #battle-info 的正文里, 而那段正文 2026-11-03 起不画了(见 243 号口径)
   → 玩家看不出这次能不能挡。配色走警示色, 但只用一条窄胶囊, 不再恢复那块提示条。 */
.battle-warn {
  position: absolute; left: 50%; top: calc(50% + 24px); transform: translateX(-50%);
  z-index: 6; pointer-events: none;
  display: flex; align-items: center; gap: 6px;
  padding: 3px 12px; border-radius: 999px;
  background: rgba(122, 46, 24, .92); color: #ffd9c8;
  border: 1px solid rgba(255, 150, 110, .55);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .32);
  font-size: 11.5px; font-weight: 800; letter-spacing: .3px; white-space: nowrap;
}
.battle-warn[hidden] { display: none; }
/* SYS-02「虎哥」的宣言提示(对手声明了什么类型): 与「力量 VS」「不可防御」同一组信息,
   挂在战场中间; 房主 Battle.render() 与客机 Net._renderRemoteFrame() 各调一次。 */
.decl-chip {
  position: absolute; left: 50%; top: calc(50% + 50px); transform: translateX(-50%);
  z-index: 6; pointer-events: none;
  padding: 3px 12px; border-radius: 999px;
  background: rgba(28, 52, 96, .92); color: #cfe2ff;
  border: 1px solid rgba(120, 170, 255, .55);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .32);
  font-size: 11.5px; font-weight: 800; letter-spacing: .3px; white-space: nowrap;
}
@media (max-width: 560px) {
  /* 手机横屏中间地带很窄: 与 battle-warn 一样回到文档流, 别压住卡 */
  .arena .decl-chip { position: static; transform: none; margin: 4px auto 0; }
}
/* MY-015「在后辈面前我可不能太丢脸呢」除外后的「下次伤害判定力量+2000」提示(训练员 2026-11-04)。
   与「力量 VS」「不可防御」「虎哥宣言」同一组: 挂在战场中间, 房主与客机各画一次。
   ⚠ 必须**可点**(pointer-events:auto + cursor): 玩家要看这张卡到底写了什么。
   位置排在 .decl-chip(+50px) 下面一行, 三条同时出现也不叠。
.my015-tip {
  position: absolute; left: 50%; top: calc(50% + 76px); transform: translateX(-50%);
  z-index: 6; pointer-events: auto; cursor: pointer;
  max-width: min(92%, 520px);
  padding: 3px 12px; border-radius: 999px;
  background: rgba(64, 32, 96, .92); color: #e8d7ff;
  border: 1px solid rgba(190, 140, 255, .55);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .32);
  font-size: 11.5px; font-weight: 800; letter-spacing: .3px;
  text-align: center;
}
.my015-tip:hover { background: rgba(80, 40, 118, .96); }
@media (max-width: 560px) {
  /* 手机横屏: 与 battle-warn / decl-chip 一样回到文档流, 别压住卡面 */
  .arena .my015-tip { position: static; transform: none; margin: 4px auto 0; }
}
.battle-info .pow { font-size: 18px; color: var(--accent); }
.battle-info .danger { color: var(--danger); }
/* 选攻击目标: 提示条做成醒目的呼吸条, 与目标卡的绿光呼应 */
.battle-info.info-alert {
  background: #fff6e8; border: 2px solid var(--accent); color: #7a4300;
  font-weight: 700; border-radius: 10px;
  animation: targetGlow 1.5s ease-in-out infinite;
}
@keyframes targetGlow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255,150,50,.16); }
  50%      { box-shadow: 0 0 0 9px rgba(255,150,50,.02); }
}
/* 操作栏里不可点击的指引胶囊 */
.target-call {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 999px; font-weight: 800; font-size: 13px;
  color: #fff; background: linear-gradient(135deg, #ff9a3c, #ff6b35);
  box-shadow: 0 4px 14px rgba(255,120,40,.35);
  animation: targetCall 1.2s ease-in-out infinite; white-space: nowrap;
}
@keyframes targetCall {
  50% { transform: translateY(-2px); box-shadow: 0 9px 22px rgba(255,120,40,.45); }
}
/* 「对手正在操作中…」——训练员 2026-10-28: 自己的回合里对手被效果问(触/防御/代价)时,
   房主这边以前完全没提示, 玩家以为卡死。独立浮层, 不占操作栏、不挡战场点击。 */
.opp-busy {
  position: fixed; left: 50%; top: 8px; transform: translateX(-50%);
  z-index: 94; pointer-events: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 15px; border-radius: 999px;
  background: rgba(28, 32, 46, .92); color: #eef2ff;
  border: 1px solid rgba(160, 180, 240, .45);
  font-size: 13px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.opp-busy .ob-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #7fd4ff;
  animation: oppBusyPulse 1.1s ease-in-out infinite;
}
@keyframes oppBusyPulse { 0%,100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
/* 手机上顶部本来就很挤: 缩小一号, 往下让开 HUD */
@media (max-width: 900px) {
  .opp-busy { top: 42px; font-size: 12px; padding: 5px 12px; }
}
.remote-actions .target-call { font-size: 12px; padding: 6px 12px; }

/* 主阶段华丽指示条 */
.phase-hero {
  position: relative; display: flex; align-items: center; justify-content: center;
  gap: 12px; height: 100%; min-height: 40px; overflow: hidden;
}
.phase-hero .ph-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255, 200, 80, 0.10), transparent 70%);
}
.phase-hero .ph-icon {
  font-size: 22px; filter: drop-shadow(0 0 6px rgba(255, 200, 80, 0.6));
  animation: ph-pulse 2.4s ease-in-out infinite;
}
.phase-hero .ph-name {
  font-size: 20px; font-weight: 800; letter-spacing: 8px; text-indent: 8px;
  background: linear-gradient(180deg, #ffe9b8 0%, #e8b34b 55%, #b9791f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 18px rgba(232, 179, 75, 0.25);
}
.phase-hero .ph-badge {
  font-size: 12px; font-weight: 700; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px;
  padding: 2px 10px; animation: ph-pulse 2.4s ease-in-out infinite;
}
@keyframes ph-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
/* 操作栏 = 战场下方的一条(训练员 2026-11-02: 从「中间栏」挪出来)。空的时候整条不占位 */
.action-bar {
  display: flex; gap: 10px; flex-wrap: wrap; padding: 5px 10px; flex-shrink: 0; align-items: center;
  justify-content: center;
  background: rgba(255, 252, 245, .94); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 4px 14px rgba(90,70,30,.10);
}
.action-bar:empty { display: none; }
.cost-pill {
  display: inline-block; padding: 6px 14px; border-radius: 16px;
  font-size: 14px; font-weight: 700; background: #f1ede4; border: 1px solid var(--border);
}
.cost-pill.ok { background: #e2f3e5; color: #2e7d32; border-color: #bcdcbf; }
.cost-pill.warn { background: #fdeecb; color: #b26a00; border-color: #ecd39a; }

.target-list { display: flex; flex-direction: column; gap: 8px; }
.target-item { text-align: left; }
/* 菜单末位的「取消」：与上面几项拉开一点距离、压低调子 —— 它是退出口，不该跟主操作抢视线。
   训练员 2026-11-06：手机端点开手牌只有「打出 / 查看大图」，底部「关闭」在小屏上不显眼。
   ⚠ 选择器必须写成 `.target-list .target-item.cancel`（(0,3,0)）：手机端有一条
   `html.is-mobile .btn`（(0,2,1)）会覆盖 `.btn` 的背景色，写成 `.target-item.cancel` 会被它压掉
   —— 表现就是"加了取消但看着和别的按钮一模一样"。 */
.target-list .target-item.cancel {
  margin-top: 2px; text-align: center; background: transparent;
  border-style: dashed; opacity: .72;
}
.target-list .target-item.cancel:hover:not(:disabled) { opacity: 1; background: rgba(127, 127, 127, .10); }
.hand-preview { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.turn-order-badge {
  display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 700; vertical-align: middle;
}
.turn-order-badge.first { background: #e05555; color: #fff; }
.turn-order-badge.second { background: #3a6fd8; color: #fff; }
/* 自己除外区的背置卡: 暗色可辨认但不显眼, 点击仍可查看详情 */
.card-thumb.facedown img { filter: brightness(0.28); }
.card-thumb.facedown::after { content: ''; position: absolute; inset: 0; }
.handover-emoji { font-size: 44px; text-align: center; }
.log-box { max-height: 60vh; overflow-y: auto; font-size: 13px; }
.log-line { padding: 5px 0; border-bottom: 1px dashed var(--border); line-height: 1.5; }
.log-t { color: var(--muted); margin-right: 8px; font-size: 12px; }
/* 日志里「卡名」→ 可点开卡片详情(明牌检索到的卡也要能核对效果)。
   水蓝色与详情页效果文本里的卡名分色保持一致。 */
.log-card {
  color: #2196cf; cursor: pointer; border-radius: 3px;
  text-decoration: underline dotted rgba(33, 150, 207, .65); text-underline-offset: 2px;
}
.log-card:hover, .log-card:focus-visible { color: #0d6d9e; background: rgba(33, 150, 207, .10); }
.log-card:focus-visible { outline: 2px solid #4a8fc4; outline-offset: 1px; }
.log-card-pick { display: flex; flex-direction: column; gap: 6px; }
.rest-info { font-size: 13px; color: var(--muted); margin-top: 4px; }
.cost-line b.ok { color: var(--ok); }
.cost-line b.warn { color: var(--warn); }
.assist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.assist-grid .btn { text-align: left; }
.reveal-item { width: 132px; }
.reveal-btns { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }

/* 矮屏适配: 压缩对战场卡牌尺寸, 保证操作栏不被挤出视野 */
@media (max-height: 860px) {
  .zone { --sup-w: 84px; }
  .battle-screen { --hand-w: 78px; }
  .hand-row { min-height: 96px; }
  /* 领袖宽度跟随 --sup-w（在 .zone 上统一定义） */
}
@media (max-height: 720px) {
  .zone { --sup-w: 72px; }
  .battle-screen { --hand-w: 66px; }
  .hand-row { min-height: 82px; }
  /* 领袖宽度跟随 --sup-w（在 .zone 上统一定义） */
  .battle-screen { padding: 6px 10px; gap: 5px; }
}

/* 窄屏适配 */
@media (max-width: 760px) {
  .deckbuilder { flex-direction: column; height: auto; }
  .db-left { border-right: none; border-bottom: 1px solid var(--border); }
  .db-pool { max-height: 45vh; }
  .card-thumb { width: 100px; }
  #card-zoom .zoom-box { flex-direction: column; max-height: 90vh; overflow-y: auto; }
  #card-zoom img { width: 220px; }
}


/* ============ 带卡面的选择行（effectMenu 卡面选项） ============ */
.card-pick-row {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 12px 6px 6px; height: auto;
}
.card-pick-row .card-thumb { width: 64px; flex: 0 0 64px; pointer-events: none; }
.card-pick-row .card-pick-label { font-size: 14px; font-weight: 600; text-align: left; }
/* 同一时点多条效果同时发动: 选结算顺序 */
.pick-order-hint {
  font-size: 12px; color: var(--muted); margin-bottom: 10px;
  background: #f7f4ee; border-left: 3px solid var(--warn);
  padding: 7px 10px; border-radius: 5px;
}
.pick-order-row + .pick-order-row { margin-top: 6px; }
.card-pick-row:hover .card-thumb { transform: none; }
/* 确认框里的「关于哪张卡」: 文字上方一张小卡图(点/右键看大图)
   —— 以前 confirm 只有纯文字, 效果写「「XX」:是否…」时玩家只能凭卡名认卡 */
.confirm-card { display: flex; justify-content: center; margin: 2px 0 10px; }
.confirm-card .card-thumb { width: 108px; flex: 0 0 108px; cursor: zoom-in; }
@media (max-width: 620px), (max-height: 460px) {
  .confirm-card .card-thumb { width: 82px; flex-basis: 82px; }
}

/* ============ 领袖等级徽章(SAO-001 桐人): 炫酷 LV 指示器 ============ */
.lv-badge {
  --lv: #6fd7ff; --glow: rgba(111, 215, 255, .38);
  position: relative; align-self: center; flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 58px; height: 64px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(120% 85% at 50% 0%, rgba(255, 255, 255, .16), transparent 62%),
    linear-gradient(155deg, #232c3f 0%, #0d121a 55%, #1b2333 100%);
  border: 1px solid var(--lv);
  border-radius: 14px 5px 14px 5px;
  box-shadow: 0 0 11px var(--glow), inset 0 0 0 3px rgba(255, 255, 255, .045);
}
/* 流光扫过 */
.lv-badge::before {
  content: ''; position: absolute; top: -35%; bottom: -35%; left: -60%; width: 45%;
  transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: lvSweep 3.6s ease-in-out infinite;
  pointer-events: none;
}
.lv-badge .lv-cap {
  font-size: 8.5px; font-weight: 800; letter-spacing: 2px; line-height: 1;
  color: var(--lv); opacity: .9; margin-bottom: 3px;
}
.lv-badge .lv-num {
  font-family: "Bahnschrift", "DIN Alternate", "Arial Black", system-ui, sans-serif;
  font-size: 27px; font-weight: 900; font-style: italic; line-height: .95;
  color: #fff; text-shadow: 0 0 6px var(--lv), 0 0 16px var(--glow);
}
/* Lv1 青蓝 / Lv2 紫 / Lv3 金 */
.lv-badge.lv1 { --lv: #6fd7ff; --glow: rgba(111, 215, 255, .38); }
.lv-badge.lv2 { --lv: #c49bff; --glow: rgba(196, 155, 255, .5); }
.lv-badge.lv3 {
  --lv: #ffd45e; --glow: rgba(255, 212, 94, .55);
  box-shadow: 0 0 16px var(--glow), inset 0 0 0 3px rgba(255, 236, 180, .1);
}
.lv-badge.lv3 .lv-num { text-shadow: 0 0 8px #fff3c4, 0 0 20px #ffcf5c, 0 0 34px rgba(255, 207, 92, .8); }
/* Lv3 呼吸光环(向内扩散, 与流光同样受 overflow 裁剪) */
.lv-badge.lv3::after {
  content: ''; position: absolute; inset: 2px; border-radius: 12px 4px 12px 4px;
  border: 1px solid var(--lv); opacity: 0; pointer-events: none;
  animation: lvPulse 2s ease-out infinite;
}
/* 升级瞬间: 徽章爆发 */
.lv-badge.lv-up { animation: lvUp .95s cubic-bezier(.2, 1.5, .35, 1); }
/* 领袖卡觉醒光环 */
.card-thumb.leader-awaken { animation: leaderAwaken 1.1s ease-out; }
@keyframes lvSweep { 0%, 55% { left: -60%; } 90%, 100% { left: 130%; } }
@keyframes lvPulse { 0% { transform: scale(.86); opacity: .75; } 100% { transform: scale(1); opacity: 0; } }
@keyframes lvUp {
  0% { transform: scale(.55) rotate(-9deg); filter: brightness(2.6); }
  45% { transform: scale(1.2) rotate(3deg); filter: brightness(1.7); }
  100% { transform: scale(1) rotate(0); filter: brightness(1); }
}
@keyframes leaderAwaken {
  0% { box-shadow: 0 0 0 0 rgba(255, 212, 94, .95); }
  100% { box-shadow: 0 0 0 24px rgba(255, 212, 94, 0); }
}
@media (max-width: 760px) {
  .lv-badge { width: 48px; height: 54px; }
  .lv-badge .lv-num { font-size: 22px; }
  .lv-badge .lv-cap { font-size: 8px; letter-spacing: 1.5px; }
}

/* ============ 领袖旁「剩余能量」徽章 ============
   KC-01 泉此方(本回合获得2/3点能量)、KC-02、凉宫春日 Live Alive 等产出的能量池,
   是本回合内抵扣技能费用的「剩余费用」。以前只在点技能卡的提示里出现一次,
   摆在领袖旁边让玩家随时看得到还剩几点。数值来自 Effects.energyAvail(与付费同口径)。 */
.energy-badge {
  --eb: #4fd8ff;
  align-self: center; flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 44px; padding: 3px 8px 4px;
  border-radius: 12px 4px 12px 4px; isolation: isolate;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, .18), transparent 65%),
    linear-gradient(160deg, #10394c 0%, #08212e 100%);
  border: 1px solid var(--eb);
  box-shadow: 0 0 10px rgba(79, 216, 255, .35), inset 0 0 0 2px rgba(255, 255, 255, .05);
  line-height: 1.05; white-space: nowrap;
}
.energy-badge .eb-ico { font-size: 11px; line-height: 1; filter: drop-shadow(0 0 4px rgba(79, 216, 255, .9)); }
.energy-badge .eb-n {
  font-family: "Bahnschrift", "DIN Alternate", "Arial Black", system-ui, sans-serif;
  font-size: 19px; font-weight: 900; font-style: italic; color: #fff;
  text-shadow: 0 0 6px var(--eb), 0 0 14px rgba(79, 216, 255, .6);
}
.energy-badge .eb-cap { font-size: 8px; font-weight: 700; letter-spacing: 1.5px; color: var(--eb); opacity: .9; margin-top: 1px; }
/* (.eb-free「可用 N」小标已按训练员 2026-10-27 要求删除, 徽章只留一个数字) */

/* ============ 义体增幅计数徽章(赛博朋克, 双方可见) ============ */
.cyber-badge {
  display: inline-flex; align-items: center;
  margin-left: 8px; padding: 2px 10px;
  border-radius: 12px; font-size: 12px; font-weight: 700;
  background: linear-gradient(135deg, #ffe14d, #ffb300);
  color: #3a2200; border: 1px solid #ffd54f;
  box-shadow: 0 0 8px rgba(255, 213, 79, .55);
  white-space: nowrap;
}

/* ============ 领袖token计数徽章(曹操癫狂/尼古喵喵香烟等): token卡图 + ×N ============ */
.ltok-badge {
  position: relative; width: 56px; flex-shrink: 0;
  margin-right: 8px; cursor: pointer; align-self: center;
}
.ltok-badge img {
  width: 100%; display: block; border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,.28);
}
/* ×N 计数: 卡图正上方居中(与女主角/领袖底的标签同一位置, 一眼看出数量) */
.ltok-badge .ltok-n {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%); z-index: 2;
  min-width: 22px; height: 18px; padding: 0 6px;
  border-radius: 9px; background: var(--blue, #4a7fd4); color: #fff;
  font-size: 12px; font-weight: 700; line-height: 18px; text-align: center;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.ltok-badge:hover { transform: translateY(-2px); }

/* ============ 领袖底: 全端统一的「▼N」胶囊 ============ */
/* 训练员 2026-11-12:「所有置于领袖底的卡统一表现方式, 标准用 WDF-001」「不需要卡图徽章,
   所有端都统一成现在 WDF 这张下箭头 N 的形式, 点领袖可以查看底下的卡, 包括尼古喵喵的香烟 token」。
   以前是三套长相: WDF 女主角 = 卡图徽章 + 粉色「女主角」标签; 常规领袖底 = 卡图徽章 + 蓝色「领袖底」
   标签; MT 的魔术技能卡(mtUnder) = 一个徽章都没有, 只能点领袖才看得到。
   现在只剩这一个胶囊: 贴在领袖卡底边中央, 数字 = 领袖底三套字段的总张数(JS 的 lbArrow 算),
   点它(或长按/右键领袖卡)打开领袖详情, 里面列出底下每一张。桌面与手机同一套参数,
   不再有「桌面卡图、手机箭头」的分叉 —— 手机 media 里那几条 .heroine-badge/.lb-badge 规则
   已经不会被生成, 保留只为兼容旧快照/旧样式优先级。 */
#op-leader, #my-leader { position: relative; }
.lb-arrow-only {
  position: absolute; left: 50%; bottom: -3px; transform: translateX(-50%);
  z-index: 7; padding: 0 7px; height: 17px; border-radius: 9px; white-space: nowrap;
  background: #e0a63c; color: #241a05;
  font-size: 11px; font-weight: 800; line-height: 17px; text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.45), 0 0 0 1px rgba(255,231,178,.6);
  cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none;
}
.lb-arrow-only:hover { filter: brightness(1.08); }

/* ============ 女主角(WDF-001 五等分的花嫁): 圆卡图徽章(2026-11-12 起不再生成, 详见上段) ============ */
/* 训练员 2026-11-03:「放在领袖旁边的领袖底下的卡缩小, 跟领袖一样大」——
   原来写死 56px(与领袖 --sup-w 无关): 手机横屏领袖 60 时还差不多, 桌面领袖放大后
   两者比例就越来越不对. 现在直接跟领袖共用一个变量, 永远一样大. */
.heroine-badge, .lb-badge {
  position: relative; width: var(--sup-w, 56px); flex-shrink: 0; align-self: center;
  margin-right: 8px; cursor: pointer;
}
.heroine-badge .card-thumb, .lb-badge .card-thumb { width: 100%; }
.heroine-badge .card-thumb img, .lb-badge .card-thumb img { width: 100%; display: block; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,.28); }
.lb-badge .heroine-tag {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%); z-index: 2;
  padding: 0 6px; border-radius: 9px; white-space: nowrap;
  background: #4a7fd4; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 17px;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.heroine-badge .heroine-tag {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%); z-index: 2;
  padding: 0 6px; border-radius: 9px; white-space: nowrap;
  background: var(--pink, #e05a8a); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 17px;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.heroine-badge:hover, .lb-badge:hover { transform: translateY(-2px); }

/* 领袖底有多张(如尼古喵喵领袖底压着软盒香烟+打火机+…): 只显示最上面一张,
   后面用两层错位的卡片轮廓表示「还有」, 右下角 ×N; 点它打开领袖详情看全部。 */
.heroine-badge.stacked, .lb-badge.stacked { isolation: isolate; }
.heroine-badge.stacked::before, .lb-badge.stacked::before,
.heroine-badge.stacked::after, .lb-badge.stacked::after {
  content: ''; position: absolute; inset: 0; border-radius: 8px; z-index: -1;
  background: linear-gradient(180deg, #3b4c6e, #1d2839);
  box-shadow: 0 0 0 1px rgba(190, 215, 255, .42), 0 2px 5px rgba(0,0,0,.45);
}
.heroine-badge.stacked::before, .lb-badge.stacked::before { transform: translate(4px, 4px); }
.heroine-badge.stacked::after, .lb-badge.stacked::after { transform: translate(8px, 8px); opacity: .85; }
.heroine-badge.stacked > .card-thumb, .lb-badge.stacked > .card-thumb { position: relative; z-index: 1; }
/* ×N 角标: 右下角(顶部中间已经被「领袖底 / 女主角」标签占了) —— 表示「底下还压着 N 张」 */
.heroine-badge .lb-count, .lb-badge .lb-count {
  position: absolute; bottom: -8px; right: -9px; z-index: 3;
  min-width: 20px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: #e0a63c; color: #241a05;
  font-size: 11px; font-weight: 800; line-height: 17px; text-align: center;
  white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.45), 0 0 0 1px rgba(255,231,178,.6);
}

/* ============ 破碎token图标(宝石之国): 宝石碎裂风格的碎片徽标 ============ */
.card-broken {
  position: absolute; top: -7px; left: -7px; z-index: 3;
  padding: 2px 9px 2px 7px; border-radius: 3px 10px 10px 10px;
  color: #fff; font-size: 11.5px; font-weight: 800; line-height: 1.5;
  letter-spacing: .5px;
  /* 宝石质感: 青金渐变 + 内部裂面高光 */
  background:
    linear-gradient(135deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 28%),
    linear-gradient(115deg, #7ff0ff 0%, #3ec5e0 30%, #1f7fa8 55%, #5a3fb8 80%, #8a4fd0 100%);
  /* 碎裂外形: 不规则多边形切角 */
  clip-path: polygon(0 18%, 14% 0, 62% 6%, 100% 0, 92% 46%, 100% 82%, 70% 100%, 22% 94%, 0 100%, 8% 55%);
  box-shadow: 0 0 8px rgba(96, 220, 255, .65), 0 1px 4px rgba(0,0,0,.4);
  text-shadow: 0 0 5px rgba(180, 250, 255, .9), 0 1px 2px rgba(0,0,0,.55);
  pointer-events: none;
  animation: gemShimmer 2.6s ease-in-out infinite;
}
/* 碎面闪光扫过 */
.card-broken::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.75) 48%, rgba(255,255,255,0) 62%);
  animation: gemGlint 2.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes gemShimmer {
  0%, 100% { filter: brightness(1) saturate(1); }
  50% { filter: brightness(1.22) saturate(1.25); }
}
@keyframes gemGlint {
  0%, 55%, 100% { transform: translateX(-120%); opacity: 0; }
  70% { opacity: .9; }
  85% { transform: translateX(120%); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .card-broken, .card-broken::after { animation: none; }
}

/* ============ 香烟token计数(YNK-08 尼古喵喵): 卡底香烟数 🚬×N ============
   位置同足球token标记(力量栏上方居中): 左上角被「休息/进攻源」标签占着,
   这张卡又常常自己横置发动, 放顶上会打架。0 也显示 —— 一眼知道还差几张凑满3。 */
.card-cig {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 3; padding: 1px 7px; border-radius: 9px;
  /* 浅色烟纸底 + 深褐字: 叠在任意卡图上都能看清(深底+深emoji在暗卡面上糊成一团) */
  background: linear-gradient(135deg, #fff6e6, #ecd3ae);
  color: #4a2c12;
  font-size: 10.5px; font-weight: 800; line-height: 1.5; white-space: nowrap;
  border: 1px solid rgba(120, 78, 40, .55);
  box-shadow: 0 1px 4px rgba(0,0,0,.5), 0 0 6px rgba(255, 200, 120, .35);
  pointer-events: none;
}

/* ============ 「置于此卡上」的卡标记(LRX-003 RoRo暗黑模式) ============
   attach 是本系列私有字段, 框架不认识 → 不给角标玩家完全看不见这张卡(LRX 审计 BUG-B09)。
   位置同香烟/足球标记(力量栏上方居中), 点角标看被置上的那张卡面。 */
.card-attach {
  position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%);
  z-index: 3; padding: 1px 7px; border-radius: 9px;
  background: linear-gradient(135deg, #2b1a3d, #55307a);
  color: #f3e6ff;
  font-size: 10px; font-weight: 800; line-height: 1.5;
  max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border: 1px solid rgba(190, 150, 255, .6);
  box-shadow: 0 1px 4px rgba(0,0,0,.5);
  pointer-events: auto; cursor: pointer;
}

/* ============ 足球token覆盖标记(POR): 放在力量上方, 不挡卡面 ============ */
.cover-football {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 3; padding: 1px 7px; border-radius: 9px;
  background: rgba(16, 92, 60, .92); color: #eafff3;
  font-size: 10.5px; font-weight: 700; line-height: 1.5; white-space: nowrap;
  border: 1px solid rgba(120, 230, 170, .55);
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
  pointer-events: none;
}

/* ============ 谭雅战记(YSK): 优势 token 覆盖 + 背面朝上 ============
   优势(YSK-10/11/12)是**压在应援卡上**的 token(「此卡上的应援卡力量为4000/5000/6000」),
   所以要把整张卡面盖住 —— 用 token 自己的卡图当封面。
   两层封面都必须挂在 .ct-face 里面: 横置时只有 .ct-face 会 rotate(-90°) 并留出 margin,
   封面挂在 .card-thumb 上的话转出来的只有卡位大小, 躺下的卡四个角会露出来(训练员 2026-10-31 报障)。
   pointer-events:none 保证点击/长按照常落到卡上。 */
.card-thumb .adv-mini {
  position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%);
  z-index: 4; padding: 1px 7px; border-radius: 9px;
  background: linear-gradient(135deg, #2b3a1f, #4e6b31);
  color: #f2ffe0;
  font-size: 10.5px; font-weight: 800; line-height: 1.5; white-space: nowrap;
  border: 1px solid rgba(180, 225, 130, .6);
  box-shadow: 0 1px 4px rgba(0,0,0,.5);
  pointer-events: none;
}
.card-thumb .ct-face .adv-cover {
  position: absolute; inset: 0; border-radius: 9px;
  background-size: 100% 100%; background-position: center; background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(190, 235, 150, .65), 0 1px 4px rgba(0,0,0,.4);
  pointer-events: none;
}
.card-thumb .ct-face .ysk-cover {
  position: absolute; inset: 0; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #23303c, #101820 60%, #1b2733);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 0 12px rgba(0,0,0,.6);
  pointer-events: none;
}
.card-thumb .ct-face .ysk-cover .card-back-mark {
  color: rgba(255,255,255,.5); font-size: clamp(12px, 1.6vh, 17px);
  font-weight: 900; letter-spacing: 1px;
}
/* 封面永远在卡图之上, 但力量角标必须留在最上层 —— 优势 token 盖住之后, 力量(4000/5000/6000)
   是这张卡唯一还公开的信息, 被盖掉就等于「这张卡现在多少力量」看不见了(训练员 2026-10-31)。 */
.card-thumb.adv-covered .card-badge,
.card-thumb.ysk-hidden .card-badge { z-index: 6; }
.card-thumb.ysk-hidden { cursor: pointer; }

/* ============ 战斗决策按钮脉冲高亮: 当前该按的按钮发光 ============ */
.btn-pulse { animation: btnPulse 1.15s ease-in-out infinite; }
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 176, 32, 0); transform: scale(1); }
  50% { box-shadow: 0 0 16px 4px rgba(255, 176, 32, .6); transform: scale(1.045); }
}
@media (prefers-reduced-motion: reduce) {
  .btn-pulse { animation: none; outline: 2px solid #ffb020; }
}

/* ============ 手牌拖动排序 / 横向滑轨 ============ */
/* 触摸: 横向滑动 = 滚动手牌滑轨(和场上应援区一样); 排序要先按住不动 ~240ms 再拖,
   手势区分在 _bindHandDrag 里做。竖向仍留给页面滚动。 */
.hand-row .card-thumb, .hand-row .card-back, .hand-row .facedown-sup { touch-action: pan-x pan-y; }
/* 场上背置卡对**卡主**可点开详情(训练员 2026-11-03, 反馈 bmvzb0qcs6249):
   右上角一枚极小的 🔍 提示「这张能看」, 对手视角不会有这个类(看的人拿不到 .peek-self)。 */
.card-thumb.facedown-sup.peek-self { cursor: pointer; }
.card-thumb.facedown-sup.peek-self::after {
  content: '🔍'; position: absolute; right: 2px; bottom: 2px; z-index: 3;
  font-size: 10px; line-height: 1; opacity: .8; pointer-events: none;
}
/* 长按成立(可以开始拖了)的反馈: 轻微浮起, 手不抖也能看出「进入排序模式」 */
.hand-armed { transform: translateY(-8px) scale(1.03); z-index: 30; }
.hand-dragging {
  opacity: .92; z-index: 40; cursor: grabbing;
  box-shadow: 0 12px 28px rgba(0,0,0,.45) !important;
  /* ⚠ 拖拽中必须去掉手牌卡自带的 transform 过渡(.12s): 否则手指走一步、卡慢半拍,
     跟手感全失, 看起来就是「拖得不丝滑」(用户反馈 2026-10-26)。 */
  transition: none !important;
  will-change: transform;
}
/* 让位动画: 拖过邻居时, 被挤开的卡平滑滑到新位置(替代每次重排的硬跳) */
.hand-shift { transition: transform .16s cubic-bezier(.2,.8,.3,1); will-change: transform; }
.hand-row.hand-sorting { user-select: none; -webkit-user-select: none; }
.hand-row.hand-sorting .card-thumb { cursor: grabbing; }

/* ================= 账号 / 线上联机 ================= */
.home-actions .btn.online { border-color: var(--blue); color: var(--blue); }
.home-actions .btn.online:hover { background: #eaf2f8; }

.net-status { font-size: 12px; color: var(--muted); }
.net-status.ok { color: var(--ok); }
.net-status.bad { color: var(--danger); }

.lobby { max-width: 960px; margin: 0 auto; padding: 18px 16px 60px; }
.lobby-notice {
  background: #fff4e5; border: 1px solid #f0d8b0; color: #8a5a1e;
  border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px;
}
.lobby-user, .lobby-auth, .lobby-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 16px;
}
.lobby-user { display: flex; align-items: center; gap: 14px; }
.lobby-user .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #fff; display: flex;
  align-items: center; justify-content: center; font-size: 20px; font-weight: 600;
}
.lobby-user-info { display: flex; flex-direction: column; }
.lobby-user-info span { font-size: 12px; color: var(--muted); }

.auth-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.auth-form { display: flex; gap: 8px; flex-wrap: wrap; }
.auth-form input, .join-row input, .lobby-card select {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; font-size: 14px; background: #fff; color: var(--ink);
}
.auth-form input { flex: 1; min-width: 160px; }
.lobby-card select { width: 100%; margin: 8px 0 12px; }
/* 大厅的「🎲 随机」: 下拉与按钮同一行(下拉 flex:1 可压缩, 按钮不被挤掉) */
.lb-deck-row { display: flex; align-items: center; gap: 8px; }
.lb-deck-row select { flex: 1 1 auto; min-width: 0; }
.lb-deck-row .rand-deck { margin: 8px 0 12px; }
#auth-hint { margin-top: 10px; }

.lobby-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .lobby-grid { grid-template-columns: 1fr; } }
/* 快速匹配卡: 横跨整行, 置顶突出 */
.lobby-grid .mm-card { grid-column: 1 / -1; border: 1px solid var(--accent, #c9a227); }
.mm-card .btn.primary.big { background: linear-gradient(135deg, #d4af37, #8a6d1d); }
.waiting-vs .mm-q { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px;
  padding: 0 8px; border-radius: 8px; background: var(--panel, #1a2233); color: var(--accent, #c9a227);
  font-weight: 800; font-size: 20px; animation: mmPulse 1.2s ease-in-out infinite; }
@keyframes mmPulse { 0%, 100% { opacity: .35; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.08); } }
.lobby-card .sec-title { margin-bottom: 6px; }
.lobby-card .btn.big { width: 100%; margin-top: 6px; }
.join-row { display: flex; gap: 8px; margin-top: 8px; }
.join-row input { flex: 1; text-transform: uppercase; letter-spacing: 4px; font-size: 18px; text-align: center; }

.lobby-rooms { margin-top: 6px; }
/* 房间列表: 一行一间(房码 · 房主 VS 客机 · 状态 · 观战人数 · 按钮), 竖向排列更好扫 */
.room-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.room-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; font-size: 14px;
}
.room-item:hover { border-color: var(--accent); }
/* 对战中/已就座的房间用左侧色条区分, 让人一眼看出"这局能看" */
.room-item.playing { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.room-item.ready { box-shadow: inset 3px 0 0 var(--blue); }
.room-item .ri-code {
  font-family: ui-monospace, monospace; letter-spacing: 2px; font-size: 15px;
  color: var(--accent); flex: 0 0 auto; min-width: 54px;
}
.room-item .ri-who {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px;
  color: var(--ink); overflow: hidden;
}
.room-item .ri-who b {
  font-family: inherit; letter-spacing: 0; font-size: 14px; font-weight: 600;
  max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.room-item .ri-vs { color: var(--muted); font-style: normal; font-size: 11px; flex: 0 0 auto; }
.room-item .ri-slot { color: var(--muted); font-style: normal; font-size: 13px; }
.room-item .ri-off { color: var(--danger); font-style: normal; font-size: 11px; flex: 0 0 auto; }
.room-item .ri-meta { color: var(--muted); font-size: 12px; white-space: nowrap; flex: 0 0 auto; }
.room-item .ri-btns { display: flex; gap: 6px; flex: 0 0 auto; }
.room-item .btn.sm { padding: 5px 10px; font-size: 12px; }

.waiting-box {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px 24px; text-align: center; max-width: 460px; margin: 30px auto;
}
.waiting-title { color: var(--muted); font-size: 14px; }
.room-code {
  font-family: ui-monospace, monospace; font-size: 44px; letter-spacing: 10px;
  color: var(--accent); margin: 14px 0 8px; text-indent: 10px;
}
.waiting-dot { display: flex; justify-content: center; gap: 6px; margin: 18px 0; }
.waiting-dot span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .4;
  animation: netDot 1.2s infinite;
}
.waiting-dot span:nth-child(2) { animation-delay: .2s; }
.waiting-dot span:nth-child(3) { animation-delay: .4s; }
@keyframes netDot { 0%,100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }

/* 客机对局视图 —— 与房主**同一套骨架**(训练员 2026-11-03「客房布局要跟主房完全一致」)。
   下面只剩下「客机独有的三个节点」的样式: 状态横幅(平时不画)、代理操作栏(与 .action-bar 同款)、
   区域提示。其余一律复用房主的 .zone-bar / .life-col / .center-stack / .center-side / .action-bar。 */
.remote-banner {
  display: none;                 /* 房主没有这条 → 常态不占位 */
  text-align: center; padding: 4px 8px; font-size: 13px; font-weight: 600;
}
/* 只有房主没有对应表达的状态才浮出来: 掉线 / 开局准备 */
.remote-banner.show { display: block; position: sticky; top: 0; z-index: 30; }
.remote-banner.mine { background: #e8f4ec; color: var(--ok); border-bottom: 1px solid #c8e5d2; }
.remote-banner.op { background: #f7f4ee; color: var(--muted); border-bottom: 1px solid var(--border); }
/* 客机操作栏 = 房主的 .action-bar(同一个类), 只把内容排布收窄一点:
   按钮本身就是 .btn(.remote-act 只是保留给用例的别名), 位置与房主一致 —— 战场下方, 文档流里。 */
.remote-actions { justify-content: center; }
.remote-actions-title { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.remote-actions-title.hot { color: var(--accent); font-weight: 800; font-size: 13.5px; }
.remote-actions-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.remote-act.ghost { border-color: var(--accent); color: var(--accent); }
.remote-hint { text-align: center; color: var(--muted); font-size: 14px; padding: 6px; }
/* 纯提示态(没有按钮)不占位 —— 房主的 #action-bar 也是 :empty 就收起来 */
.remote-actions.is-collapsed { display: none; }
.remote-view { padding-bottom: 6px; }
/* 中间那条与房主一致: 只画阶段胶囊, 正文提示(.bi-note)只留 DOM 不占位 */
.battle-info .bi-note { display: none; }
.battle-info .bi-cost { margin-top: 4px; }

/* 开局掷骰 */
.dice-wrap { text-align: center; }
.dice-tip { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.dice-board { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 6px 0 16px; }
.dice-col { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 96px; }
.dice-name {
  font-size: 13px; color: var(--muted); max-width: 112px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dice-face {
  width: 86px; height: 86px; border-radius: 16px; background: #fff;
  border: 2px solid var(--border); box-shadow: 0 3px 0 rgba(0,0,0,.05);
  display: flex; align-items: center; justify-content: center;
  font-size: 62px; line-height: 1; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.dice-face.win { border-color: var(--ok); box-shadow: 0 0 0 3px rgba(58,143,93,.16), 0 3px 0 rgba(0,0,0,.05); }
.dice-vs { font-weight: 800; color: var(--muted); letter-spacing: 1px; }
.dice-result { font-size: 15px; min-height: 24px; margin-bottom: 14px; }
.dice-actions { display: flex; gap: 12px; justify-content: center; }
.dice-actions .btn.big { min-width: 128px; }
@media (max-width: 420px) {
  .dice-face { width: 72px; height: 72px; font-size: 52px; }
  .dice-board { gap: 10px; }
  .dice-actions .btn.big { min-width: 104px; }
}
/* 客机画面直点: 可操作卡牌高亮 */
.remote-view .card-thumb.remote-clickable {
  outline: 3px solid var(--ok); outline-offset: 2px; border-radius: 11px;
  cursor: pointer; animation: remotePulse 1.2s ease-in-out infinite;
}
@keyframes remotePulse {
  0%, 100% { outline-color: var(--ok); }
  50% { outline-color: var(--accent); }
}

/* 远程问答 */
.remote-ask .ask-option {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; text-align: center; font-size: 15px; cursor: pointer;
  min-width: 140px;
}
.remote-ask .ask-option:hover { border-color: var(--accent); }
.remote-ask .disabled { opacity: .4; cursor: not-allowed; }
.pick-order {
  position: absolute; top: -6px; left: -6px; width: 24px; height: 24px;
  background: var(--accent); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; z-index: 3;
}
.net-chat {
  position: fixed; left: 12px; bottom: 12px; z-index: 60;
  max-width: 320px; max-height: 180px; overflow-y: auto;
  background: rgba(0,0,0,.7); color: #fff; border-radius: 10px;
  padding: 8px 12px; font-size: 13px;
}

/* 房主在对手回合的防误触遮罩 */
.host-wait-mask {
  position: fixed; inset: 0; z-index: 25;
  background: rgba(20, 18, 16, .12);
  display: flex; align-items: flex-start; justify-content: center;
  pointer-events: auto; cursor: not-allowed;
}
.host-wait-text {
  margin-top: 96px; background: rgba(0,0,0,.72); color: #fff;
  padding: 10px 18px; border-radius: 999px; font-size: 14px;
}

/* 房主在对手回合: 只屏蔽指针, 不再模糊 —— 对手手牌改用卡背显示, 看不清才是真看不清 */
.hand-masked > * { filter: none; }
.hand-masked { pointer-events: none; }

/* 卡背(对手手牌等不可见卡): 统一卡背图案, 不用马赛克/模糊 */
.card-thumb.card-back-thumb {
  width: 96px; aspect-ratio: 5 / 7; border-radius: 9px;
  background: linear-gradient(145deg, #3a3f6b 0%, #23264a 60%, #191b36 100%);
  border: 1.5px solid #14162c;
  box-shadow: inset 0 0 0 2px #4a5089, 0 2px 6px rgba(0,0,0,.28);
  display: flex; align-items: center; justify-content: center;
  cursor: default;
}
.card-thumb.card-back-thumb:hover { transform: none; }
/* 手牌里的**背面朝上**卡: 必须跟同一排的手牌一样宽。
   ⚠ 上面那条 `.card-thumb.card-back-thumb{width:96px}` 与 `.hand-row .card-thumb` 特异性相同(0,2,0)
     且在文件里更靠后 → 手牌缩小后卡背仍是 96px, 一排里凭空冒出一张两倍大的牌(2026-11-02 第十轮发现)。 */
.hand-row .card-thumb.card-back-thumb { width: var(--hand-w); flex-shrink: 0; }
.card-thumb.card-back-thumb .card-back-mark {
  color: #8a93d4; font-size: 17px; font-weight: 800; font-style: italic;
  letter-spacing: 1px; opacity: .85;
}
/* 对手手牌行(只显示卡背): 比自己的手牌矮, 不抢战场空间 */
.op-hand-row {
  display: flex; gap: 8px; align-items: flex-end; flex-wrap: nowrap;
  overflow-x: auto; overflow-y: hidden; padding: 2px 0 4px; min-height: 0;
  /* 训练员 2026-11-02: 对手手牌与自己手牌**一样大**(以前这里恒比手牌小一档) */
  max-height: calc(var(--hand-w) * 1.5);
}
.op-hand-row .card-thumb,
.op-hand-row .card-thumb.card-back-thumb { width: var(--hand-w); flex-shrink: 0; }
/* 训练员 2026-11-05「没有手牌时也要保留手牌区的位置」:
   手牌打光 / 对手手牌为 0 时容器里一个子元素都没有, 而 .op-hand-row 在多个断点是
   min-height:0 → grid 的 hand 行直接塌掉, 整块战场跟着上下跳。用 :empty 生成一块
   与卡同高的透明占位(不吃点击), 所有断点共用 --hand-w / --op-hand-w, 不必给每个
   media 再补一份 min-height; 房主与客机是同一套骨架, 一处改动两端一致。 */
.hand-row:empty::before, .op-hand-row:empty::before {
  content: ""; display: block; flex: 0 0 auto;
  width: var(--op-hand-w, var(--hand-w));
  height: calc(var(--op-hand-w, var(--hand-w)) * 1.4);
  opacity: 0; pointer-events: none;
}
/* 训练员 2026-11-11 v815 反馈 bmwbmgp1oabb6「没有手牌时也要保留手牌区原有的空间」:
   上一版只靠 :empty::before 透明占位, 但 battle.js 会把 0 张的 #op-hand 设成
   display:none(inline 优先级高于普通 CSS), 占位根本没机会生成; flip-view 下
   #op-hand 装的是自己的手牌。现在 JS 不再隐藏, 这里给空态补一条与有牌时同高的
   min-height, 并撤掉 .op-hand-row 的 max-height 限制; 各断点沿用已覆盖的
   --hand-w / --op-hand-w, 电脑端与手机横屏一处生效。 */
.op-hand-row:empty {
  min-height: calc(var(--op-hand-w, var(--hand-w)) * 1.4);
  max-height: none;
}

/* 「对手手牌公开」(JO3-04 乔瑟夫·乔斯达): 这一排显示真实卡面, 并高亮可点 */
.op-hand-row.hand-public { background: rgba(61,126,166,.07); border-radius: 8px; padding: 3px 4px; }
.op-hand-row.hand-public .card-thumb { box-shadow: 0 0 0 1.5px rgba(61,126,166,.45); border-radius: 6px; cursor: zoom-in; }
/* 训练员 2026-11-02「卡组旁边不需要显示手牌数和生命数了」:
   生命数看生命区, 手牌本身就在场上一排看得见 → 这颗胶囊平时整个不占位,
   只在「对手手牌被公开」(JO3-04)时浮出来当一个 🔍 查看入口 */
.pill.pill-hand { display: none; }
.pill.pill-hand.hand-open { display: inline-flex; cursor: pointer; padding: 1px 6px; font-size: 11px; }
.pill-hand.hand-open:hover { filter: brightness(.96); }

/* 对手手牌公开弹窗(手机端看这里) */
.opp-hand-view { display: flex; flex-direction: column; gap: 10px; max-width: min(92vw, 760px); }
.ohv-hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.ohv-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ohv-row .card-thumb { width: 104px; cursor: zoom-in; }
.ohv-empty { color: var(--muted); font-size: 13px; padding: 10px 0; }

/* 联机: 对手回合也不换视角 —— 把两块区域的视觉顺序对调, 自己的区域始终在下方 */
.arena.flip-view .zone.side-opp {
  order: 2; border-bottom: none;
  border-top: 1px dashed var(--border); padding-top: 6px; padding-bottom: 2px;
}
.arena.flip-view .zone.side-mine {
  order: 0; border-top: none;
  border-bottom: 1px dashed var(--border); padding-top: 2px; padding-bottom: 6px;
}
.arena.flip-view .battle-center { order: 1; }

.host-mask-concede {
  position: absolute; top: 96px; right: 20px;
  background: #fff; opacity: .9;
}

/* ================= 联机 v110: 大厅增强 ================= */
.net-ping-sm { font-size: 12px; color: var(--muted); margin-right: 10px; font-variant-numeric: tabular-nums; }
.lobby-user .spacer { flex: 1; }
.lobby-deck-preview {
  display: flex; align-items: center; gap: 12px;
  background: #faf8f4; border: 1px dashed var(--border); border-radius: 10px;
  padding: 10px; margin-bottom: 10px;
}
.lobby-deck-preview .card-thumb { width: 54px; }
.deck-preview-info { display: flex; flex-direction: column; gap: 3px; }
.deck-preview-info b { font-size: 14px; }
.deck-preview-info span { font-size: 12px; color: var(--muted); }

.waiting-tip { font-size: 13px; color: var(--muted); margin-top: -2px; }
.waiting-actions { display: flex; gap: 8px; justify-content: center; margin: 12px 0 4px; }
.waiting-vs {
  font-size: 18px; font-weight: 700; margin: 14px 0 6px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.waiting-vs span { font-size: 12px; color: var(--muted); font-weight: 600; }
.room-code { cursor: pointer; }

/* ================= 联机 v110: 对局 HUD ================= */
.net-hud {
  position: fixed; top: 8px; right: 10px; z-index: 70;
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 6px 4px 10px; font-size: 12px; color: var(--muted);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.net-hud.offline { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(200,70,70,.12); }
.hud-room { cursor: pointer; font-family: ui-monospace, monospace; letter-spacing: 1px; }
.hud-ping { font-variant-numeric: tabular-nums; min-width: 42px; text-align: center; }
.hud-ping.good { color: var(--ok); } .hud-ping.ok { color: #b8860b; } .hud-ping.bad { color: var(--danger); }
.hud-btn {
  border: 1px solid var(--border); background: #fff; border-radius: 999px;
  padding: 3px 9px; font-size: 13px; cursor: pointer; line-height: 1.4;
}
.hud-btn:hover { border-color: var(--accent); }
.hud-btn.unread { background: var(--accent); color: #fff; border-color: var(--accent); }
.hud-btn.danger { color: var(--danger); }

/* 聊天面板 */
.net-chat-panel {
  position: fixed; left: 14px; bottom: 14px; z-index: 72;
  width: 300px; max-width: calc(100vw - 28px);
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,.14);
  display: none; flex-direction: column; overflow: hidden;
}
.net-chat-panel.show { display: flex; }
.ncp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 13px;
}
.ncp-close { cursor: pointer; color: var(--muted); padding: 0 4px; }
.ncp-body { max-height: 220px; min-height: 68px; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
.ncp-msg { font-size: 13px; line-height: 1.45; display: flex; gap: 6px; }
.ncp-msg b { flex: none; color: var(--muted); font-weight: 600; }
.ncp-msg.me { justify-content: flex-end; }
.ncp-msg.me b { order: 2; }
.ncp-msg.me span { background: #eef6f0; border-radius: 8px; padding: 4px 8px; }
.ncp-msg.peer span { background: #f6f3ee; border-radius: 8px; padding: 4px 8px; }
.ncp-input { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--border); }
.ncp-input input {
  flex: 1; border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 10px; font-size: 13px; background: #fff; color: var(--ink);
}
.ncp-input .btn { padding: 7px 12px; }

/* 重连遮罩 */
.net-reconnect {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(20,18,16,.5); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
}
.nr-box {
  background: var(--panel); border-radius: 14px; padding: 26px 30px;
  text-align: center; min-width: 280px; box-shadow: 0 16px 48px rgba(0,0,0,.25);
}
.nr-spin {
  width: 30px; height: 30px; margin: 0 auto 14px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: nrSpin .9s linear infinite;
}
@keyframes nrSpin { to { transform: rotate(360deg); } }
.nr-title { font-weight: 700; margin-bottom: 6px; }
.nr-sub { font-size: 12px; color: var(--muted); margin-bottom: 16px; }

/* 房主等待对手: 轻量提示(不再整屏遮挡, 仍可查看战场) */
.battle-screen.net-waiting .arena { pointer-events: none; }
/* 中间栏改成浮层后, 提示区自己开了 pointer-events:auto(要能滚动) →
   对手回合还得单独禁掉, 否则「战场本体被屏蔽」这条就漏了 */
.battle-screen.net-waiting .arena .battle-info { pointer-events: none; }
/* 对手回合也能右键查看卡牌详情(缩略图白名单): 左键操作仍被 JS 侧的回合/模式门槛拦住,
   点了不会有任何效果 —— 右键查看大图是纯本地只读功能, 任何时候都应可用 */
.battle-screen.net-waiting .arena .card-thumb { pointer-events: auto; }
/* 平板触屏: 应援行的自绘滑条(.hsbar)是**纯本地只读浏览** —— 对手操作时要照样能拖
   (训练员 2026-11-04 报「应援卡多时滑不动滑条」)。.arena 整片 pointer-events:none
   会把挂在 .zone 里的滑条一起吃掉, 手指落在 thumb 上连 pointerdown 都收不到。
   ⚠ 只放行滑条本身: **滑轨 .supports-row 仍保持屏蔽**(对手回合误点防线, 见
   test_fs_opponent_turn); 卡面缩略图本来就在白名单里(.card-thumb), 触摸横划沿
   滚动链带动父容器, 不需要把整行放开。 */
.battle-screen.net-waiting .arena .hsbar,
.battle-screen.net-waiting .arena .hsbar * { pointer-events: auto; }
/* 只读查看类小按钮(卡组/废弃/除外的数字)不屏蔽: 对手回合也能查看区域 */
.battle-screen.net-waiting .arena [data-zone] { pointer-events: auto; cursor: pointer; }
.battle-screen.net-waiting .arena .pinfo { pointer-events: auto; }
.battle-screen.net-waiting .arena button { cursor: not-allowed; }
/* 音乐控制是本地功能(关音乐/切歌), 对手回合也必须能点 —— 不能被「对手操作中」的屏蔽挡住 */
.battle-screen.net-waiting .arena .bgm-btn { pointer-events: auto; cursor: pointer; }
.battle-screen.net-waiting .arena .bgm-btn:hover { filter: brightness(1.2); }
/* 顶栏(phase-bar)整条都是「本机功能」: 回合条(只读)、音乐、全屏、对局日志、效果助手、反馈、投降,
   没有一个是需要引擎结算的对局操作 → 对手回合必须整条可点。
   以前是逐个按钮放行, 后来新加的全屏按钮(#fs-btn)就漏在屏蔽外面: .arena 是 pointer-events:none,
   全屏按钮跟着整片战场一起点不动, 表现就是「对面的回合点全屏没反应」(用户报 2026-10-24)。
   改成整条放行, 以后往顶栏加按钮不用再单独补白名单。 */
.battle-screen.net-waiting .arena .phase-bar,
.battle-screen.net-waiting .arena .phase-bar button,
.battle-screen.net-waiting .arena [data-fs-toggle] { pointer-events: auto; }
.battle-screen.net-waiting .arena .phase-bar button,
.battle-screen.net-waiting .arena [data-fs-toggle] { cursor: pointer; }
.battle-screen.net-waiting .arena .phase-bar button:hover { filter: brightness(1.18); }
/* 投降同理: 任何时候都能投降, 而且投降的永远是「我」(见 Battle.confirmConcede 用 mySeat) */
.battle-screen.net-waiting .arena #concede-btn { pointer-events: auto; cursor: pointer; }
/* 对局日志/效果助手/反馈也是本地只读工具: 对手回合必须能点,
   否则「点了没反应」(用户报), 且日志弹窗只能靠代理误开、开着自己还关不掉 */
.battle-screen.net-waiting .arena #show-log,
.battle-screen.net-waiting .arena #show-assist,
.battle-screen.net-waiting .arena #show-bug,
.battle-screen.net-waiting .arena #remote-bug,
.battle-screen.net-waiting .arena #fab-log,
.battle-screen.net-waiting .arena #fab-bug,
.battle-screen.net-waiting .arena #fab-concede { pointer-events: auto; cursor: pointer; }
.battle-screen.net-waiting .arena #show-log:hover { filter: brightness(1.2); }
/* 「整理手牌」是**纯本机**动作: 只把本机座位的手牌数组原地重排(+ 联机房主推一帧快照 /
   客机 relay handOrder), 不改任何对局状态, 与音乐、日志同性质 → **对手回合也必须能点**。
   以前只逐个放行了 data-zone / pinfo / bgm-btn / 日志这些, `.hand-sort` 没进名单,
   按钮跟着 `.arena` 整片被屏蔽 → 训练员 2026-11-06 报「对手回合整理手牌点不动」。
   ⚠ 反过来也要守住: 只放行这一枚按钮, 别把 .res-row / .zone 整行放开(那条是误点防线)。 */
.battle-screen.net-waiting .arena .hand-sort,
.battle-screen.net-waiting .arena .hand-sort * { pointer-events: auto; }
.battle-screen.net-waiting .arena .hand-sort { cursor: pointer; }
/* 屏蔽态下 `.arena button` 统一是 not-allowed 光标, 这里要压回 pointer(选择器优先级 (0,3,1) > (0,2,2)) */
.battle-screen.net-waiting .arena .hand-sort:hover { filter: brightness(1.08); }
/* 「查看对手本次战斗使用的技能」同样是本地只读入口(大图只开在本机屏幕上, 不经过代理),
   对手回合也必须能点 —— 用户报「有时候点不开」的另一半原因就是这里被屏蔽了 */
.battle-screen.net-waiting .arena .skill-peek,
.battle-screen.net-waiting .arena .skill-peek .mini-btn { pointer-events: auto; cursor: pointer; }
.battle-screen.net-waiting .arena .skill-peek .mini-btn:hover { filter: brightness(1.15); }
/* ⚠ 操作栏(#action-bar)2026-11-02 从中间栏挪到了战场下方 —— 它**不在 .arena 里**,
   上面那条「.arena 整体 pointer-events:none」就管不到它了: 联机等对手时
   「结束回合 / 自保 / 不防御 / 费用确认」又都变得能按(按了只会弹「操作已过期」)。
   这里补一条同等强度的禁点, 只放行本地只读入口「查看对手本次战斗的技能」。 */
.battle-screen.net-waiting .action-bar { pointer-events: none; }
.battle-screen.net-waiting .action-bar button { cursor: not-allowed; }
.battle-screen.net-waiting .action-bar .skill-peek,
.battle-screen.net-waiting .action-bar .skill-peek * { pointer-events: auto; cursor: pointer; }
.battle-screen.net-waiting .action-bar .skill-peek .mini-btn:hover { filter: brightness(1.15); }
/* 防御阶段防守方的按钮: 房主作为攻击方时也要留在 DOM 里(客机代理点击按 DOM 定位),
   但它属于对方, 视觉上淡出且点不动 —— 绝不能让人以为自己要做这个决定 */
.arena .proxy-only { opacity: .35; filter: grayscale(.6); pointer-events: none; }
.host-wait-pill {
  position: fixed; top: 56px; left: 50%; transform: translateX(-50%);
  z-index: 60; display: flex; align-items: center; gap: 10px;
  background: rgba(28,26,23,.86); color: #fff; border-radius: 999px;
  padding: 7px 10px 7px 16px; font-size: 13px;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
.hw-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #ffd479;
  animation: netDot 1.2s infinite;
}
.hw-concede { padding: 4px 10px; font-size: 12px; }
/* 效果结算的弹窗在对方浏览器上时, 房主这边提示"对手正在选择"(与上面那条错开) */
.host-ask-pill { top: 100px; padding: 7px 16px; z-index: 59; }

/* 客机点击回执 */
.remote-view .card-thumb.remote-sent { outline-color: var(--accent) !important; transform: scale(.97); }
.remote-act.sent { opacity: .6; }

/* 对局结束按钮组 */
.go-actions { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }

/* ================= 翻血可视化(正置生命卡对双方公开) ================= */
.life-flip-badge {
  display: inline-flex; align-items: center; margin-left: 7px;
  padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 800;
  background: linear-gradient(135deg, #ff7043, #c62828); color: #fff;
  box-shadow: 0 0 8px rgba(198, 40, 40, .35);
  animation: lifeFlipPulse 1.6s ease-in-out infinite;
}
@keyframes lifeFlipPulse {
  0%, 100% { box-shadow: 0 0 4px rgba(198, 40, 40, .3); }
  50% { box-shadow: 0 0 12px rgba(198, 40, 40, .65); }
}
.life-row .card-thumb.life-up {
  width: 42px; min-width: 42px;
  outline: 2px solid #c62828; outline-offset: 1px; border-radius: 8px;
  cursor: zoom-in;
}
.life-row .card-thumb.life-up .card-badge {
  background: #c62828; color: #fff; font-size: 11px;
}
/* 翻血选择弹窗: 背置的生命卡只画卡背(卡面不可见、不可放大), 正置的才显示卡图 */
.life-pick-note { margin: 2px 0 8px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.card-thumb.life-pick-back { cursor: pointer; }
.overlay .pool-grid .card-thumb.life-pick-back { width: 62px; }
.card-pick-row .card-thumb.life-pick-back { width: 56px; flex: 0 0 56px; }
.card-thumb.life-pick-back .card-badge { background: #3a3f6b; color: #ecedf7; }

/* 联机: 非本方回合时「结束回合」按钮不可用(房主视角会切到对手, 但操作权不跟着走)。
   圆钮本身已有 .is-locked 灰态, 这里只兜住「net-waiting 但 is-locked 没跟上」的瞬间。 */
.battle-screen.net-waiting .end-turn-fab {
  pointer-events: none; opacity: .85;
}

/* 桌面宽屏: 每个玩家区排成 [领袖 | 生命(横排) + 应援(伸缩) | 状态胶囊(右)], 自己手牌在底部一行。
   对手手牌不铺卡背(与手机端一致, 只留状态胶囊里的「手牌 N」计数), 生命区保持原来的横排摆放,
   翻开的血依旧显示真实卡面 + 「⬆ 翻血 N」徽章, 可视化不受影响。
   ⚠ 必须排除「矮窗口/横屏手机」(min-height: 561px): 大屏手机(如 iPhone Plus/Pro Max 横屏
   宽 926~956px)也会命中 min-width:900px, 而这里的 3 行网格 + 大卡尺寸会以更高优先级盖掉
   下面「横屏手机」的一行布局 —— 战场被撑高, 中间战斗区的「自保 / 不防御」被挤到 0 高后
   被 overflow:hidden 裁掉。用户报的「iOS 手机端战斗时看不到自保按钮」就是这个。(2026-10-23) */
@media (min-width: 900px) and (min-height: 561px) {
  .arena .zone.side-opp, .arena .zone.side-mine {
    display: grid;
    /* 两侧弹性列均分空白: 领袖贴住战场左缘, 信息胶囊贴右缘, 中间是生命/应援 */
    /* ⚠ 中间列必须是 minmax(0, 1fr), 不能用 auto: 应援卡多时 auto 列按 max-content 撑开,
       两侧 1fr 被压成 0 → 领袖被挤出画面左缘、状态胶囊竖着挤在右缘(用户报障 2026-10-26, iPad)。 */
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    /* 训练员 2026-11-02(第五轮): **应援区跟领袖区并到同一行** —— 只留「场地行 + 手牌行」两行。
       以前领袖独占第一行、应援另起一行, 场地被撑高一截, 领袖与应援还错开一格, 看着像"乱动地方"。
       生命区仍在领袖左手边(生命区 + 它下面的玩家名片整体与领袖卡居中对齐)。 */
    grid-template-areas:
      "life leader sup info"
      "hand hand   hand hand";
    column-gap: 12px; row-gap: 0;
    align-items: center;
    padding: 2px 0;
  }
  /* 对手区(屏幕上半): 手牌卡背行排到**第一行** —— 我这边手牌在屏幕最底、对手手牌在屏幕最顶,
     左右居中, 正好是镜像(训练员 2026-11-02「对手的手牌区要像自己的镜像一样」)。
     ⚠ 选择器必须带 .arena: 上面那条 `.arena .zone.side-opp` 的 specificity 比 `.zone.side-opp` 高,
       少写一层 .arena 就会被它盖回去, 手牌行仍旧留在最底下一行。 */
  .arena .zone.side-opp {
    grid-template-areas:
      "hand hand   hand hand"
      "life leader sup info";
    /* 顶部那排卡背要让开浮层顶栏(回合条/工具条): 顶栏是 absolute 浮在战场上的,
       不留这一档, 卡背的上半截会被压在按钮底下 */
    padding-top: 26px; padding-bottom: 2px;
  }
  .arena .zone.side-mine {
    grid-template-areas:
      "life leader sup info"
      "hand hand   hand hand";
    /* 训练员 2026-11-02「开局手牌要在屏幕最下方」: 战场是 flex 列且撑满剩余高度,
       把这一座顶到底部 → 手牌行贴着屏幕最下沿(以前材料少时下面空出一大块) */
    margin-top: auto;
  }
  /* 联机「视角对调」时对手区落在画面下方, 而这一块里装的其实是自己的手牌 → 手牌行沉到最底 */
  .arena.flip-view .zone.side-opp {
    grid-template-areas:
      "life leader sup info"
      "hand hand   hand hand";
    margin-top: auto;
  }
  /* 对调后自己的区在上方, 里面装的是对手的卡背 → 手牌行浮到最顶(同样让开浮层顶栏) */
  .arena.flip-view .zone.side-mine {
    grid-template-areas:
      "hand hand   hand hand"
      "life leader sup info";
    padding-top: 26px;
  }
  .zone.side-opp > .zone-bar, .zone.side-mine > .zone-bar {
    grid-area: info; justify-self: end; align-self: start;
    max-width: 40vw; flex-direction: column; align-items: flex-end; gap: 3px;
    padding-top: 1px;
  }
  /* 对手那一侧的屏幕右上角浮着工具条(对局日志/效果助手/反馈/投降):
     收起名片后这里会露出纯文字名字, 顶得太靠上就会和工具条黏在一起 */
  .zone.side-opp > .zone-bar { margin-top: 6px; }
  .zone.side-opp > .zone-bar .pinfo,
  .zone.side-mine > .zone-bar .pinfo { justify-content: flex-end; }
  #op-leader, #my-leader { grid-area: leader; align-self: center; justify-self: end; }
  /* 站场右移: 生命/应援/手牌居中铺开 —— 用 margin:auto 技巧而非 justify-content:center,
     这样卡多溢出时仍是正常滑轨(不会裁掉左端), 卡少时居中 */
  /* min-width: max-content: 生命格是 auto 轨道, 空间紧时会被压窄 → 后面几张卡背直接被挤出格子
     (用户截图里 5 血只看见 3 张就是这个: 「数字 + 一叠」需要的宽度是固定值, 不许被压) */
  /* 训练员 2026-11-02: 生命区下面挂玩家名片 → 两者包进 .life-col 一起占 life 格 */
  .arena .zone > .life-col {
    grid-area: life; display: flex; flex-direction: column; gap: 4px;
    align-items: flex-start; justify-content: center; justify-self: start; align-self: center;
    min-width: max-content;
  }
  .life-col > .zone-idcard-slot { display: flex; width: 100%; }
  .life-col > .zone-idcard-slot:empty { display: none; }
  #op-life, #my-life {
    grid-area: auto; justify-content: center; align-content: center; align-self: center;
    min-width: max-content;
  }
  #op-supports, #my-supports { grid-area: sup; min-width: 0; }
  #op-supports > :first-child, #my-supports > :first-child, #my-hand > :first-child { margin-left: auto; }
  #op-supports > :last-child, #my-supports > :last-child, #my-hand > :last-child { margin-right: auto; }
  #op-hand, #my-hand { grid-area: hand; }

  /* 对手手牌: 训练员 2026-11-02 要求「也能看到对手手牌的牌背」→ 不再只留张数胶囊,
     改成一行小卡背(比自己的手牌窄一档, 只占 ~50px 高)。对调时按原逻辑各归各位 */
  /* min-height 不能是 0: 对手区高度有限, grid 的 auto 行在空间紧时会把它压成 0 高,
     表现就是「手牌 7」胶囊在那儿、却一张卡背都看不见(2026-11-02 截图) */
  #op-hand { display: flex; align-items: flex-end; min-height: 44px; padding: 0 0 2px; }
  /* 联机对调(房主在对手回合): 上方那一区装的是**对手**的手牌 → 这一排要显示, 而且是卡背,
     尺寸按对手手牌那一档(小), 别按自己的大手牌画(2026-11-02 起与「对手手牌在屏幕最上方」同一口径) */
  .arena.flip-view #my-hand { display: flex; align-items: flex-end; min-height: 44px; padding: 0 0 2px; }
  /* 对调时 #my-hand 装的是对手卡背 → 与手牌同宽(走 --hand-w, 不用再写死 40px) */
  .arena.flip-view #my-hand .card-thumb { width: var(--hand-w); }

  /* 卡牌随窗口高度放大(上限封顶, 保证一屏能放下) */
  /* 手牌行占比下调, 给中间战斗提示区(力量对比/防御抉择)留更多空间 */
  .zone { --sup-w: clamp(88px, calc(var(--vu) * 12), 160px); }
  .hand-row { min-height: clamp(84px, calc(var(--vu) * 12), 150px); }
  .battle-screen { --hand-w: clamp(76px, calc(var(--vu) * 9.5), 124px); }
  /* 领袖宽度跟随 --sup-w（在 .zone 上统一定义） */
  .leader-row-mini .card-thumb.rested { margin: 12px var(--rest-bleed); }
  /* 横置应援卡: 去掉上下留白(旋转后的图是纯视觉变换, 不留白也不会撑高行), 一张横置卡不再多占 ~35px */
  .supports-row .card-thumb.rested .ct-face { margin: 0; }
  .supports-row .card-thumb.rested { z-index: 2; }
  .life-row { min-height: clamp(50px, calc(var(--vu) * 7), 78px); }
  .life-card { width: clamp(36px, calc(var(--vu) * 4.8), 54px); height: clamp(50px, calc(var(--vu) * 6.7), 74px); }
  .life-row .card-thumb.life-up { width: clamp(36px, calc(var(--vu) * 5), 56px); min-width: clamp(36px, calc(var(--vu) * 5), 56px); }
  .pinfo { font-size: 14.5px; }
  .pill { font-size: 12.5px; padding: 3px 11px; }
  /* 手牌张数(替代铺开的卡背): 小小一张卡背模样 + 数字, 一眼能数 */
  .pill-hand {
    display: inline-flex; align-items: center; gap: 5px;
    background: #e9e6f7; color: #4a4470; font-weight: 700;
  }
  .pill-hand i {
    width: 13px; height: 17px; border-radius: 3px; display: inline-block;
    background: linear-gradient(145deg, #3a3f6b 0%, #23264a 60%, #191b36 100%);
    box-shadow: inset 0 0 0 1.5px #4a5089;
  }
  /* 生命区挪到领袖左边之后: 数字 + 一叠半摞卡背(不再是 3 列网格)。
     卡 26 / 每张压 13 → 7 张也只占 26 + 6×13 = 104px, 加数字块 ~34px, 不会把领袖行顶宽。 */
  .life-row.in-leader { width: auto; gap: 0; }
  .life-row.in-leader .life-card,
  .life-row.in-leader .card-thumb.life-up { width: 30px; min-width: 30px; height: 40px; margin-left: -15px; }
  .life-row.in-leader > .life-label + .life-card,
  .life-row.in-leader > .life-label + .card-thumb.life-up { margin-left: 0; }
} /* ← 桌面媒体块闭合(v120 时漏掉, 曾把后面所有移动端规则吞进桌面块) */

/* ============================================================
   移动端适配 (v117)
   思路:
     · 触屏设备加 html.is-touch / html.is-mobile, 桌面完全不受影响
     · 战场在「横屏 + 矮屏」下重排为 4 列网格: 领袖 | 生命 | 应援(横向滚动) | 状态胶囊
       手牌固定在最底部一行, 整屏不滚动 → 一屏看完, 不用上下拖
     · 尺寸用 vh 计算, 375~430 高度的手机都能一屏放下
   ============================================================ */

/* ---------- 触屏通用: 去掉 hover 位移, 换成按下反馈 ---------- */
html.is-touch { -webkit-text-size-adjust: 100%; }
html.is-touch body { -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
html.is-touch .card-thumb,
html.is-touch .life-card,
html.is-touch .deck-card-img { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
html.is-touch button,
html.is-touch .btn,
html.is-touch .link-btn { touch-action: manipulation; }
@media (hover: none) {
  .card-thumb:hover { transform: none; }
  .hand-row .card-thumb:hover { transform: none; }
  .card-thumb.card-back-thumb:hover { transform: none; }
  .deck-card:hover { transform: none; }
  .btn:hover:not(:disabled) { transform: none; }
  .zir-list .card-thumb:hover { transform: none; }
  html.is-touch .card-thumb:active { transform: translateY(-3px) scale(.985); filter: brightness(1.04); }
  html.is-touch .btn:active:not(:disabled) { transform: scale(.97); }
  /* 触屏没有右键: 底卡胶囊放大成能点中的尺寸 */
  .under-pill { min-width: 26px; height: 20px; padding: 0 7px; font-size: 12px; border-radius: 10px; }
}

/* ---------- 竖屏引导 ---------- */
#rotate-gate {
  position: fixed; inset: 0; z-index: 2000;
  display: none; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 30%, #2f2a24 0%, #14120f 70%);
  padding: 20px; text-align: center; color: #fff;
}
#rotate-gate.show { display: flex; }
body.rotate-blocked { overflow: hidden; }
.rg-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rg-phone {
  width: 62px; height: 108px; border-radius: 12px;
  border: 2px solid rgba(255,255,255,.75); position: relative;
  box-shadow: 0 0 30px rgba(255,255,255,.14);
  animation: rgTilt 2.4s ease-in-out infinite;
}
.rg-phone .rg-screen {
  position: absolute; inset: 6px; border-radius: 6px;
  background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.05));
}
@keyframes rgTilt {
  0%, 22% { transform: rotate(0deg); }
  50%, 72% { transform: rotate(-90deg) scale(.92); }
  100% { transform: rotate(0deg); }
}
.rg-title { font-size: 21px; font-weight: 800; letter-spacing: 3px; margin-top: 10px; }
.rg-sub { font-size: 12.5px; color: rgba(255,255,255,.62); margin-bottom: 8px; }
#rotate-gate .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; padding: 10px 28px; }
#rotate-gate .link-btn { color: rgba(255,255,255,.45); font-size: 12px; margin-top: 4px; }

/* ---------- 对局结算 ---------- */
.gameover {
  min-height: 70vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; padding: 24px 16px;
}
.go-title { font-size: 40px; font-weight: 900; letter-spacing: 6px; }
.gameover.win .go-title { color: var(--accent); text-shadow: 0 6px 30px rgba(200,85,61,.35); }
.gameover.lose .go-title { color: var(--muted); }

/* 移动端: 结束回合圆钮同样固定在右下角, 只是缩小一档(不再并入状态行) */
html.is-mobile .end-turn-fab {
  width: 54px; height: 54px; right: 10px;
  bottom: calc(8px + env(safe-area-inset-bottom));
}
html.is-mobile .end-turn-fab .etf-ico { font-size: 14px; }
html.is-mobile .end-turn-fab .etf-txt { font-size: 9px; }

/* ============================================================
   横屏手机 / 矮窗口: 战场重排
   ============================================================ */
@media (orientation: landscape) and (max-height: 560px) {
  /* 手牌占比下调(29%→22% 可视高度): 给中间战斗提示区(力量对比/防御·自保按钮)让出高度。
     ⚠ 单位一律按「可视高度的 1%」(--m-vu)算, 不能直接写 vh:
     iOS Safari 有地址栏/工具栏时, vh 是「大视口」(含被工具栏盖住的区域), 真实可视高度只有
     --app-h(JS 写进来的 innerHeight)。用 vh 会让手牌/应援/领袖整体偏大 10~20%,
     把中间战斗区挤到 0 高, 于是「自保 / 不防御」被 battle-center 的 overflow:hidden 裁掉
     —— 用户报的「iOS 手机端战斗时看不到自保按钮」就是这个。(2026-10-23) */
  :root {
    --m-vu: calc(var(--app-h, 100vh) / 100);
    --m-hand-h: calc(var(--m-vu) * 16.5);
    /* 屏幕最上方那一行的高度 = 对手手牌卡背的高度(卡宽 9.5%屏高 × 1.4 的卡面比例)。
       房间号 / 音乐工具 / 等待提示 都以它为行高垂直居中, 与手牌齐平(训练员 2026-11-02 第九轮)。 */
    --top-row-h: calc(var(--m-vu) * 13.6);
  }

  .battle-screen {
    height: var(--app-h, 100dvh);
    max-width: none; margin: 0;
    padding: 3px calc(6px + env(safe-area-inset-right)) 3px calc(6px + env(safe-area-inset-left));
    gap: 3px; overflow: hidden;
  }
  .arena {
    flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto;
    scrollbar-width: none;   /* 内容确实放不下时宁可滑动, 也不能把按钮裁没 */
    overscroll-behavior: contain;   /* 滑动止于战场, 别把整页带着橡皮筋 */
    padding: 2px 6px; gap: 0;
    border-radius: 14px;
    background:
      radial-gradient(130% 90% at 50% -12%, rgba(255,255,255,.95), rgba(255,255,255,0) 58%),
      linear-gradient(180deg, #f6f2ea 0%, #fffefc 40%, #f9f5ee 100%);
    box-shadow: inset 0 0 0 1px rgba(226,221,210,.9), inset 0 14px 26px -20px rgba(0,0,0,.32);
  }
  .arena::-webkit-scrollbar { display: none; }   /* 只在应急滚动时出现, 平时不占位不显眼 */
  .arena.flip-view .zone.side-opp,
  .arena.flip-view .zone.side-mine { border-radius: 10px; border: none !important; }
  /* 联机房主在对手回合时两块区域仍是「视觉对调」: 自己的卡保持在下 */
  .arena.flip-view .zone.side-opp { order: 2; }
  .arena.flip-view .zone.side-mine { order: 0; }
  .arena.flip-view .battle-center { order: 1; }

  /* 每个玩家一行: 生命 | 领袖 | 应援(横向滚动) | 状态(训练员 2026-11-02: 生命挪到领袖左手边) */
  .arena .zone.side-opp,
  .arena .zone.side-mine {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
    column-gap: 5px; row-gap: 0;
    padding: 1px 2px; border: none !important;
    border-radius: 10px; flex-shrink: 0;
  }
  /* 对手手牌: 训练员 2026-11-02「像自己的镜像」→ 排到对手区**第一行**(屏幕最上方居中一排卡背)。
     手机横屏也照此显示, 只是卡背再小一档(下面 5240 那一段media 会收窄)。 */
  .arena .zone.side-opp {
    grid-template-areas: "hand hand hand hand" "life leader sup info";
    /* 顶部卡背行要让开浮层顶栏(回合条/工具条), 否则上半截被按钮压住。
       手机横屏(≤560 高)另算: 那一档顶栏与手牌已经压成同一行 → 见本文件末尾 5447 起的第九轮段落。 */
    padding-top: calc(var(--m-vu) * 6);
    background: linear-gradient(180deg, rgba(61,126,166,.055), rgba(61,126,166,0) 78%);
  }
  .zone.side-mine {
    grid-template-areas: "life leader sup info" "hand hand hand hand";
    background: linear-gradient(0deg, rgba(200,85,61,.055), rgba(200,85,61,0) 62%);
    margin-top: auto;
  }
  .zone.side-opp > .zone-bar, .zone.side-mine > .zone-bar { grid-area: info; }
  #op-leader, #my-leader { grid-area: leader; }
  #op-life, #my-life { grid-area: life; }
  #op-supports, #my-supports { grid-area: sup; }
  #my-hand { grid-area: hand; min-width: 0; }
  /* 对手手牌: 训练员 2026-11-02 要求看得见牌背 → 一行小卡背(收窄, 只占一行) */
  #op-hand, .op-hand-row { grid-area: hand; display: flex !important; }
  .op-hand-row { padding: 0; }
  /* 房主在对手回合(视觉对调): 自己真实手牌跑到 #op-hand(排在最底), 对手卡背留在上面那一区 */
  .arena.flip-view .zone.side-opp { grid-template-areas: "life leader sup info" "hand hand hand hand"; }
  .arena.flip-view .zone.side-mine { grid-template-areas: "hand hand hand hand" "life leader sup info"; }
  .arena.flip-view #my-hand {
    display: flex !important; max-height: calc(var(--hand-w) * 1.5); overflow-x: auto; align-items: flex-end;
  }
  .arena.flip-view #my-hand .card-thumb { width: var(--hand-w); }
  .arena.flip-view #op-hand {
    max-height: none;
    height: var(--m-hand-h); margin-top: 2px; padding: 3px 2px 2px 40px; gap: 5px;
    align-items: flex-end; border-top: 1px dashed rgba(0,0,0,.09); overflow-x: auto;
  }
  .arena.flip-view #op-hand .card-thumb { width: var(--hand-w); }
  .arena.flip-view #op-hand .card-badge { font-size: 9px; }

  /* --- 领袖 --- */
  .leader-row-mini { gap: 3px; margin: 0; align-items: center; }
  /* 领袖宽度跟随 --sup-w（在 .zone 上统一定义） */
  .leader-row-mini .card-thumb.rested { margin: 0 var(--rest-bleed); }
  /* 领袖缩到 --sup-w(12) 后, 旁边的等级徽章按原比例收一档(26×36 → 23×32), 别比卡还抢眼 */
  .leader-row-mini .lv-badge { width: 23px; height: 32px; border-radius: 7px 3px 7px 3px; }
  .leader-row-mini .lv-badge .lv-num { font-size: 15px; }
  .leader-row-mini .lv-badge .lv-cap { font-size: 5px; letter-spacing: .5px; margin-bottom: 1px; }
  .leader-row-mini .cyber-badge { font-size: 8px; padding: 0 5px; margin-left: 2px; }
  .energy-badge { min-width: 26px; padding: 1px 4px 2px; border-radius: 8px 3px 8px 3px; }
  .energy-badge .eb-ico { font-size: 8px; }
  .energy-badge .eb-n { font-size: 13px; }
  .energy-badge .eb-cap { font-size: 6px; letter-spacing: .5px; }

  /* --- 生命区: 小卡背横排 --- */
  .life-row {
    gap: 3px; min-height: 0; margin: 0; padding: 0;
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  }
  .life-row::-webkit-scrollbar { display: none; }
  .life-label { font-size: 8.5px; padding: 1px 5px; margin-right: 1px; border-radius: 8px; white-space: nowrap; }
  /* 只显示血量数时胶囊可以稍大一点(那一排卡没了, 这里是唯一的信息) */
  .life-row.plain .life-label { font-size: 11px; padding: 2px 8px; }
  .life-flip-badge { font-size: 8px; padding: 0 4px; margin-left: 2px; }
  /* ⚠ 桌面那套「标题与翻血胶囊竖着叠」在这里必须改回横排: 矮屏的 .life-row 是 nowrap 横滚、
     高度被卡背锁死, 竖排的 label 会被压成 0 高 —— 表现就是「生命 5」和「⬆ 翻血 1」整个消失 */
  .life-row.in-leader .life-label {
    flex: 0 0 auto; flex-direction: row; align-items: center; gap: 3px;
    width: auto; line-height: 1.2; white-space: nowrap;
    /* 血量在状态条的「♥ N」胶囊里已经有了, 这里再写一遍只会把卡挤出格子 → 只留翻血角标 */
    font-size: 0;
  }
  .life-row.in-leader .life-label > .life-flip-badge { font-size: 7px; padding: 0 3px; margin: 0; }
  /* 横滚 + 居中 → 内容比格子宽时**两侧**一起溢出, 左侧那颗「生命 N / ⬆翻血」会被裁掉。
     改左对齐: 溢出只往右走, 靠滑动看后面的卡。 */
  .life-row.in-leader { justify-content: flex-start; }
  .life-card { width: calc(var(--m-vu) * 6.5); height: calc(var(--m-vu) * 9); border-radius: 4px; border-width: 1px; }
  .life-card-mark { font-size: 8px; }
  .life-row .card-thumb.life-up { width: calc(var(--m-vu) * 6.5); min-width: calc(var(--m-vu) * 6.5); }
  .life-empty { font-size: 9px; }

  /* --- 应援区: 横向滑动 --- */
  .supports-row { gap: 5px; padding: 1px 0; min-height: 0; align-items: flex-start; }
  /* 训练员 2026-11-02(第十轮): 「手牌缩小, 场上应援卡和领袖也缩小一点」——
     ① 手牌 m-vu*13.5 → **10.8**(单张 53→42px@390, 手牌行整排矮下去 ~12px);
     ② 场上应援卡/领袖(共用 --sup-w) 13.5 → **12**(53→47px, 只小一档, 卡面仍看得清);
     ③ 手牌行高(--m-hand-h)跟着收: 卡高 ≈ 卡宽×1.39 + 行内上下留白 ≈ 16.5。
     ⚠ 手牌**故意**比场上的卡小一圈(第六轮是两者同大, 第十轮训练员要求再缩手牌) ——
       `--hand-w` 不再等于 `--sup-w`, 别又把它改回去。
     ⚠ `--hand-w` 的消费者: 自己的手牌行(.hand-row)、flip-view 里的 `#op-hand`(也是自己的手牌)。 */
  .zone { --sup-w: calc(var(--m-vu) * 12); --hand-w: calc(var(--m-vu) * 10.8); }
  .supports-row .card-thumb.rested .ct-face { margin: 0; } /* 横置的旋转留白会把整行撑高, 徽章跑到卡外 */
  .card-badge { font-size: 9px; padding: 1px 4px; left: 2px; bottom: 2px; }
  .power-badge .power-now { font-size: 10px; }

  /* --- 状态胶囊 --- */
  .zone .pinfo {
    font-size: 9.5px; gap: 3px; justify-content: flex-end;
    flex-wrap: wrap; row-gap: 1px; max-width: 40vw; line-height: 1.3;
  }
  .zone .pinfo b { font-size: 10px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .zone .pinfo .pill { font-size: 9.5px; padding: 1px 6px; border-radius: 9px; }
  .zone .pinfo .link-btn { font-size: 9.5px; padding: 0 1px; text-decoration: none; border-bottom: 1px dotted currentColor; }

  /* --- 中间: 回合条 + 提示 + 操作 ---
     优先级: 回合条/提示栏可以先被压(提示栏内部滚动), 但「自保 · 不防御 · 结束回合」
     这一排按钮必须留在视野内 —— 以前 battle-center 允许被压到 0 高, overflow:hidden
     把按钮整排裁掉, 表现就是「战斗时看不到自保按钮」。min-height 兜住底线(回合条+
     一行提示+按钮排), 真放不下时由 .arena 滚动, 不再静默裁掉按钮。 */
  .battle-center { flex: 1 1 auto; min-height: 92px; gap: 2px; overflow-y: auto; touch-action: pan-y; }
  .arena .phase-bar { padding: 1px 2px; gap: 6px; font-size: 10px; flex-wrap: nowrap; border: none; background: transparent; }
  .turn-strip { gap: 4px; flex-wrap: nowrap; }
  .turn-pill { font-size: 9.5px; padding: 1px 7px; gap: 3px; }
  .turn-pill .tp-who { font-size: 8.5px; }
  .turn-pill .tp-num { font-size: 9.5px; }
  .turn-pill .tp-live { font-size: 8px; padding: 0 3px; }
  .turn-global { display: none; }
  .phase-bar .battle-tag { font-size: 9.5px; }
  .phase-bar .link-btn { font-size: 9.5px; white-space: nowrap; }
  .battle-info {
    /* 提示栏是可压缩的那一个(内部滚动): 保住一行可读高度即可, 腾出的高度优先给按钮排 */
    flex: 1 1 auto; min-height: 0; max-height: none;
    padding: 3px 7px; font-size: 10.5px; line-height: 1.45; border-radius: 8px;
    margin-block: auto; overflow-y: auto;
  }
  .battle-info .pow { font-size: 13px; }
  /* 中间栏的「查看对手技能」按钮: 小屏再压一档, 别把力量对比挤出去(仍保留手指够得着的高度) */
  /* 它已经挂在提示栏外面独立占一行(见 battle.js _appendSkillPeek): 这里必须禁止被压缩,
     否则提示栏一挤就会把它压出中间栏, 被 .battle-center 的 overflow:hidden 裁掉 ——
     画面上那块位置显示的是下方应援区, 点下去落到卡上(用户报障 2026-10-25「按钮点了没反应」)。 */
  .skill-peek { margin-top: 1px; flex: 0 0 auto; min-height: 22px; }
  .skill-peek .mini-btn { font-size: 10px; padding: 2px 10px; min-height: 20px; }
  .phase-hero { min-height: 0; height: auto; gap: 6px; }
  .phase-hero .ph-name { font-size: 13px; letter-spacing: 3px; text-indent: 3px; }
  .phase-hero .ph-icon { font-size: 13px; }
  .phase-hero .ph-badge { font-size: 9px; padding: 0 6px; }
  .pow-duel { gap: 10px; margin: 1px 0; }
  .pd-num { font-size: 26px; }
  .pd-name { font-size: 9px; }
  /* 「效果±N」小标在小屏再压一档(数字本身只有 26px, 标签跟数字同一行, 不许换行) */
  .pw-eff { font-size: 9px; margin-left: 3px; padding: 0 3px; border-radius: 4px; }
  .action-bar { flex: 0 0 auto; gap: 5px; padding: 1px 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .action-bar::-webkit-scrollbar { display: none; }
  .action-bar .btn { padding: 6px 14px; font-size: 11px; white-space: nowrap; }
  .action-bar .btn.big { padding: 7px 16px; font-size: 11.5px; }
  .action-bar .cost-pill { padding: 3px 9px; font-size: 10.5px; }

  /* --- 手牌: 最底部一行, 横向滑轨(卡保持原宽, 左右滑动看全; 长按再拖=排序) --- */
  .hand-row {
    height: var(--m-hand-h); min-height: 0;
    margin-top: 2px; gap: 6px; /* 左侧留出音乐按钮、右侧留出结束回合圆钮的位置; 卡间留缝 */
    padding: 3px 50px 2px 40px;
    align-items: flex-end; border-top: 1px dashed rgba(0,0,0,.09);
    scrollbar-width: none;   /* 触摸屏靠滑动: 滚动条会压掉卡底, 直接隐藏 */
  }
  .hand-row::-webkit-scrollbar { display: none; }
  .hand-row .card-thumb img { box-shadow: 0 3px 10px rgba(0,0,0,.22); }
  .hand-row .card-badge { font-size: 9px; }

  /* --- 联机 HUD / 客机面板 --- */
  .net-hud.inline {
    position: static; width: 100%; flex: 0 0 auto;
    justify-content: flex-end; gap: 5px;
    padding: 0 2px; font-size: 9.5px;
    background: transparent; border: none; box-shadow: none; backdrop-filter: none;
  }
  .net-hud.inline .hud-room { margin-right: auto; font-size: 9.5px; }
  .net-hud.inline .hud-ping { min-width: 32px; font-size: 9.5px; }
  .net-hud.inline .hud-btn { padding: 1px 7px; font-size: 10.5px; border-radius: 999px; }
  .remote-banner { padding: 1px 8px; font-size: 9.5px; }
  .remote-view { padding-bottom: 0 !important; }
  /* 客机操作栏已经与房主的 .action-bar 同款(见上面那一段), 这里不再单独定位 ——
     以前这条把面板钉在视口底部、还留 42px 给音乐按钮, 与房主完全不是一回事。 */
  .remote-actions-title { font-size: 9px; margin-bottom: 3px; }
  .remote-actions-title.hot { font-size: 10.5px; }
  .remote-actions-list { gap: 4px; flex-wrap: nowrap; overflow-x: auto; align-items: center; }
  .remote-actions .target-call { font-size: 10px; padding: 4px 9px; }
  .remote-hint { font-size: 10.5px; padding: 2px; }
  .net-chat-panel { left: 6px; right: 6px; bottom: 6px; width: auto; }
  .ncp-body { max-height: 34vh; }
  .host-wait-pill { top: 22px; font-size: 10.5px; padding: 4px 8px 4px 12px; }
  .host-ask-pill { top: 50px; padding: 4px 12px; }

  /* --- 非对局页面 --- */
  .topbar { padding: 4px 8px; gap: 8px; }
  .topbar .btn { padding: 5px 10px; font-size: 12px; }
  .topbar b { font-size: 12.5px; }

  .home { padding: 8px 12px 22px; max-width: none; }
  .home-notice { font-size: 10px; padding: 4px 10px; letter-spacing: 0.5px; }
  .home-hero { padding: 2px 0; }
  .home-hero h1 { gap: 0 8px; font-size: 26px; letter-spacing: 2px; }
  .home-hero h1 .b-cn { font-size: 17px; letter-spacing: 4px; }
  .home-hero .sub { font-size: 11px; letter-spacing: 1.5px; }
  .home-actions { gap: 8px; margin: 9px 0; }
  .home-actions .btn.big { padding: 7px 14px; font-size: 12px; border-radius: 10px; }
  .sec-title { font-size: 12px; margin: 8px 0 6px; }
  .home-rules ul { padding: 9px 10px 9px 24px; line-height: 1.65; font-size: 11px; }
  .deck-card { width: 124px; border-radius: 10px; }
  .deck-card-img { height: 62px; }
  .deck-card-img .card-thumb { width: 45px; }
  .deck-card-img .card-thumb img { height: 100%; }
  .deck-card-info { padding: 5px 6px 7px; font-size: 11px; gap: 1px; }
  .deck-card-info span { font-size: 9.5px; }

  .deck-list { padding: 8px; }
  .deck-card.row { padding: 6px; }
  /* 横屏手机: 组卡组保持左右分栏(窄屏断点会把它堆成上下, 这里盖回来) */
  .deckbuilder { flex-direction: row; height: calc(var(--app-h, 100vh) - 36px); }
  .db-left { border-right: 1px solid var(--border); border-bottom: none; }
  .db-pool { max-height: none; }
  .db-right { flex: 0 0 35%; max-width: 35%; overflow-y: auto; }
  .deck-name-input { width: 120px; padding: 5px 8px; font-size: 12px; }
  .deck-counter { font-size: 11px; }
  .db-filters select { max-width: 130px; }
  .db-filters { padding: 4px 8px; gap: 5px; }
  .db-filters select, .db-filters input { padding: 4px 7px; font-size: 11px; }
  .db-pool { padding: 6px 8px; }
  .pool-hint { font-size: 10px; margin-bottom: 6px; }
  .pool-grid { gap: 6px; }
  .db-pool .pool-grid .card-thumb { width: 64px; }
  .db-right { padding: 6px 10px; }
  .db-leader, .db-main { padding: 6px 8px; margin-bottom: 8px; border-radius: 10px; }
  .leader-row { min-height: 0; }
  .issue { padding: 6px 8px; font-size: 11px; border-radius: 8px; }

  .setup-box { margin: 6px auto; padding: 12px; gap: 7px; max-width: 560px; border-radius: 10px; }
  .setup-row label { width: 92px; font-size: 11.5px; }
  .setup-row input, .setup-row select { padding: 5px 8px; font-size: 12px; }
  .setup-row .rand-deck { padding: 5px 8px; font-size: 11px; }
  .setup-row .pick-deck-btn { padding: 5px 8px; font-size: 11px; }
  .setup-hint { font-size: 10.5px; line-height: 1.5; }

  .lobby { padding: 6px 10px 18px; max-width: none; }
  .lobby-user, .lobby-auth, .lobby-card { padding: 8px 10px; margin-bottom: 8px; border-radius: 10px; }
  .lobby-grid { gap: 8px; }
  .lobby-user .avatar { width: 32px; height: 32px; font-size: 15px; }
  .lobby-card .btn.big { padding: 7px 10px; font-size: 12px; }
  .auth-form input, .join-row input, .lobby-card select { padding: 5px 8px; font-size: 12px; }
  .join-row input { font-size: 15px; padding: 4px 8px; letter-spacing: 3px; }
  .room-code { font-size: 26px; letter-spacing: 6px; margin: 3px 0; text-indent: 6px; }
  .waiting-box { padding: 14px; margin: 6px auto; }
  .waiting-title, .waiting-tip { font-size: 11px; }
  /* 手机上房间行: 房码 + 双方名字 + 按钮必须同时放得下, 状态文案让位 */
  .room-item { padding: 7px 10px; font-size: 12px; gap: 8px; }
  .room-item .ri-code { font-size: 13px; min-width: 46px; letter-spacing: 1px; }
  .room-item .ri-who b { font-size: 12px; max-width: 38%; }
  .room-item .ri-meta { display: none; }
  .room-item .btn.sm { padding: 4px 8px; font-size: 11px; }

  .overlay { padding: 5px; }
  .modal-box { max-width: none; max-height: calc(var(--app-h, 100vh) - 10px); border-radius: 12px; }
  /* 检索抽屉在横屏手机上: 只占下方 60%, 上方战场可直接看到 */
  .overlay.sheet-overlay { padding: 0; }
  .sheet-overlay .sheet-box { max-height: 62vh; border-radius: 14px 14px 0 0; }
  .sheet-overlay .modal-title.has-fold { padding: 7px 12px 3px; font-size: 12.5px; }
  .sheet-overlay .modal-body { padding: 3px 12px 4px; }
  .sheet-overlay .modal-foot { padding: 4px 12px calc(6px + env(safe-area-inset-bottom)); }
  .sheet-overlay .sheet-desc { font-size: 11.5px; margin-bottom: 5px; }
  .sheet-foot-hint { display: none; }
  .sheet-peek { padding: 2px 7px; margin-bottom: 5px; gap: 6px; border-radius: 8px; }
  .sheet-peek .sp-label { font-size: 10.5px; }
  .sheet-peek .card-thumb { width: 40px; flex: 0 0 40px; }
  .sheet-toggle { padding: 2px 9px; font-size: 11px; }
  .sheet-restore { right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 5px 10px 5px 9px; font-size: 11.5px; gap: 5px; }
  .modal-title { padding: 8px 12px 4px; font-size: 13px; }
  .modal-title.has-fold { gap: 8px; }
  .modal-title.has-fold .sheet-toggle { padding: 3px 9px; font-size: 11px; }
  .modal-body { padding: 4px 12px; }
  .modal-foot { padding: 6px 12px 8px; }
  .modal-body p { font-size: 12px; }
  .overlay .pool-grid { gap: 6px; }
  .overlay .pool-grid .card-thumb { width: 62px; }
  .overlay .pool-grid .card-thumb.rested .ct-face { margin: 10px 0; }
  .overlay .pool-grid .card-thumb.art-landscape.rested .ct-face { margin: 0; }
  .card-pick-row { padding: 3px 8px 3px 3px; gap: 8px; }
  .card-pick-row .card-thumb { width: 46px; flex: 0 0 46px; }
  .card-pick-row .card-pick-label { font-size: 12px; }
  .assist-grid { gap: 5px; }
  .log-box { max-height: 66vh; font-size: 11.5px; }
  .log-line { padding: 3px 0; }
  #card-zoom .zoom-box {
    flex-direction: row; max-height: calc(var(--app-h, 100vh) - 10px);
    padding: 8px; gap: 10px; max-width: calc(100vw - 10px); /* 不得撑出屏幕, 否则关不掉 */
    position: relative;
  }
  #card-zoom img { width: 132px; }
  /* 右栏必须自己给出 max-height 才滚得起来(反馈 bmwirth20e172):
     .zoom-box 是 align-items:flex-start, 右栏高度=内容高度、不受弹窗 max-height 约束,
     所以只写 overflow-y:auto 永远不生效 —— 内容直接漫出弹窗落到屏幕外, 拖也拖不到。
     max-height 必须与弹窗同源算: 弹窗 max-height = app-h-10(padding 8×2 走 border-box),
     这里留出弹窗外边距 10 + 弹窗上下 padding 16 → app-h-26。 */
  .zoom-info {
    overflow-y: auto; min-width: 0;
    max-height: calc(var(--app-h, 100vh) - 26px);
  }
  .zoom-info { overflow-y: auto; min-width: 0; }
  .zi-name { font-size: 14px; }
  .zi-meta { font-size: 10.5px; margin: 4px 0; }
  .zi-text { font-size: 11.5px; line-height: 1.6; }
  .zi-token-hint { font-size: 10px; margin-top: 6px; }
  .zi-related { margin-top: 6px; padding-top: 6px; }
  .zi-flip { margin-top: 6px; padding-top: 6px; }
  .zif-label { font-size: 10px; margin-bottom: 4px; }
  .zif-row { gap: 7px; }
  .zif-art { width: 84px; }
  .zif-art.landscape { width: 118px; }
  .zif-text { font-size: 11px; line-height: 1.6; }
  .zir-list .card-thumb { width: 54px; }

  .dice-board { gap: 10px; margin: 0 0 8px; }
  .dice-face { width: 54px; height: 54px; font-size: 36px; border-radius: 12px; }
  .dice-tip { font-size: 11px; margin-bottom: 6px; }
  .dice-result { font-size: 12px; min-height: 18px; margin-bottom: 6px; }
  .dice-actions .btn.big { min-width: 96px; padding: 7px 12px; font-size: 12px; }
  .dice-col { min-width: 72px; }
  .dice-name { font-size: 10.5px; }
  .handover-emoji { font-size: 30px; }
  /* 结算页窄屏压缩 */
  .go-trophy { font-size: 42px; }
  .go-title { font-size: 21px; letter-spacing: 4px; text-indent: 4px; }
  .go-sub { font-size: 12px; }
  .go-score { gap: 6px; margin: 10px 0 2px; }
  .go-player { padding: 6px 8px; }
  .go-player .gp-name { font-size: 12.5px; }
  .gameover { min-height: 60vh; padding: 10px; }
  .go-title { font-size: 28px; letter-spacing: 4px; }
  #toast { bottom: 30vh; font-size: 11.5px; padding: 6px 14px; }
}

/* 极矮屏(部分安卓浏览器带工具栏时视口只有 300~330): 再压一档 */
@media (orientation: landscape) and (max-height: 350px) {
  /* 320 高的老机型(iPhone SE1)再压一档: 手牌 27%→25%, 中间区下限 92→80,
     否则「战场 + 手牌 + 按钮排」比可视高度还高, 手牌会被裁掉一截。 */
  :root { --m-hand-h: calc(var(--m-vu) * 15); }
  /* 与上面(≤560)同一套比例: 手牌 10.8:12 的关系在 320 高的小屏上按 9.6:11 等比压一档 */
  .zone { --sup-w: calc(var(--m-vu) * 11); --hand-w: calc(var(--m-vu) * 9.6); }
  /* 领袖宽度跟随 --sup-w（在 .zone 上统一定义） */
  .battle-info { font-size: 10px; }
  .battle-center { min-height: 80px; }
}

/* 竖屏但仍在使用(用户点了「继续竖屏」): 至少保证能玩 */
html.is-portrait.is-mobile .battle-screen { height: var(--app-h, 100dvh); }
@media (orientation: portrait) {
  .card-thumb { width: 96px; }
  .zone { --sup-w: 74px; }
  .battle-screen { --hand-w: 68px; }   /* 竖屏手牌已比应援卡(74)小, 无需再缩 */
  /* 领袖宽度跟随 --sup-w（在 .zone 上统一定义） */
  .zone .pinfo { font-size: 11px; }
  .phase-bar { flex-wrap: wrap; }
  /* 竖屏一屏放不下(战场上要滚动): 决策按钮贴住可视区底部, 否则「自保/不防御」在折叠线下面
     —— iOS 地址栏再吃掉一截高度时更是完全看不到(用户报「iOS 看不到自保按钮」)。 */
  .battle-screen .action-bar {
    position: sticky; bottom: 0; z-index: 7;
    margin: 2px -2px -2px; padding: 5px 6px;
    background: rgba(16, 24, 40, .96); border-radius: 10px;
    box-shadow: 0 -4px 14px rgba(0, 0, 0, .45);
  }
}

/* ============================================================
   对战深色科技主题 (参考网牌风格: 深蓝网格战场 + 发光高亮)
   变量作用域限定在 .battle-screen 内, 组牌/卡组页保持亮色
   ============================================================ */
.battle-screen {
  --panel: #131c2e;
  --panel-2: #1a2740;
  --ink: #d9e2f2;
  --muted: #7d8fac;
  --border: #24344f;
  --accent: #e8a33d;
  --accent-dark: #c9862b;
  --ok: #46c07a;
  --danger: #e05555;
  --blue: #63aede;
  --warn: #e0b055;
  color: var(--ink);
  background:
    linear-gradient(rgba(52,74,110,.20) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52,74,110,.20) 1px, transparent 1px),
    radial-gradient(1200px 620px at 50% -8%, #182640 0%, #0b111c 62%);
  background-size: 44px 44px, 44px 44px, 100% 100%;
  background-attachment: fixed;
}
.battle-screen .arena {
  background: rgba(17,26,44,.78);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 60px rgba(8,14,26,.55);
}
.battle-screen .zone.side-opp { border-bottom-color: var(--border); }
.battle-screen .zone.side-mine { border-top-color: var(--border); }
.battle-screen .pinfo b { color: #f2f6ff; }
.battle-screen .pill {
  background: rgba(64,88,128,.32); color: #b3c1dd;
  border: 1px solid rgba(96,124,170,.35);
}
.battle-screen .pill.danger {
  background: rgba(200,60,60,.20); color: #ff8d8d;
  border-color: rgba(224,85,85,.55); font-weight: 700;
}
.battle-screen .life-label { background: rgba(64,88,128,.32); color: #9fb2d2; }
.battle-screen .turn-pill {
  background: rgba(64,88,128,.26); color: #8fa0c0; border-color: rgba(96,124,170,.32);
}
.battle-screen .turn-pill.on {
  background: var(--accent); color: #1d1305; border-color: var(--accent-dark);
  box-shadow: 0 0 16px rgba(232,163,61,.45);
}
.battle-screen .turn-global { color: var(--muted); }
.battle-screen .battle-tag { color: var(--accent); text-shadow: 0 0 12px rgba(232,163,61,.55); }
.battle-screen .battle-info { color: var(--ink); }
.battle-screen .battle-info .danger { color: #ff8d8d; }
/* 「选攻击目标 / 对手操作中」那条警示条在**白底**上(#fff6e8, 见 .battle-info.info-alert)。
   训练员 2026-11-02「战斗提醒屏幕中间这个白底白字看不清, 改成白底黑字」——
   病根: 上面这两行为战斗态把字色统一成浅色的 --ink(#d9e2f2), 加粗再被 .battle-info b 涂成纯白
   → 白底白字, 整句只剩标点看得见。这里按 0,3,0 的特异性把白底条上的字色整体拉回深色。 */
.battle-screen .battle-info.info-alert { color: #2a2118; }
.battle-screen .battle-info.info-alert b { color: #14100c; }
.battle-screen .battle-info.info-alert .hint { color: #6b6255; }
.battle-screen .battle-info.info-alert .ok { color: #1f7a44; }
.battle-screen .battle-info.info-alert .pow { color: #a8471a; }
.battle-screen .battle-info.info-alert .danger { color: #c0392b; }
.battle-screen .action-bar .btn {
  background: var(--panel-2); border-color: var(--border); color: var(--ink);
}
.battle-screen .action-bar .btn:hover:not(:disabled) { border-color: var(--accent); }
.battle-screen .action-bar .btn.primary { background: var(--accent); color: #1d1305; border-color: var(--accent-dark); }
.battle-screen .action-bar .btn.danger { color: #ff8d8d; border-color: rgba(224,85,85,.5); }
.battle-screen .link-btn { color: var(--blue); }
.battle-screen .link-btn.danger-text { color: #ff8d8d; }
.battle-screen .card-thumb img { box-shadow: 0 2px 12px rgba(0,0,0,.55); }
/* 可操作卡牌: 金色呼吸光圈(参考图高亮卡) */
.battle-screen .card-thumb.pickable {
  outline: 3px solid #ffd76a; outline-offset: 2px; border-radius: 11px;
  animation: pickGlow 1.3s ease-in-out infinite;
}
@keyframes pickGlow {
  0%, 100% { box-shadow: 0 0 6px rgba(255,215,106,.35); }
  50% { box-shadow: 0 0 20px rgba(255,215,106,.85); }
}
/* 费用方案里已选中的应援卡: 实心绿框 + ✓角标(再点一次取消) */
.card-thumb.pick-on { outline: 4px solid #3ab976; box-shadow: 0 0 0 6px rgba(58,185,118,.35); }
.battle-screen .card-thumb.pick-on { outline-color: #3ab976; animation: none; }
.pick-on-tag {
  position: absolute; left: 4px; top: 4px; z-index: 3;
  background: #3ab976; color: #fff; font-size: 11px; font-weight: 800;
  width: 18px; height: 18px; line-height: 18px; text-align: center;
  border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.5); pointer-events: none;
}
.battle-screen .card-thumb.target-pick { outline-color: #ff7a6b; }
/* 可点态: 红色底 + 呼吸光晕(灰态不加, 免得对手回合还在闪) */
.battle-screen .end-turn-fab:not(.is-locked) {
  animation: endTurnBreath 2.1s ease-in-out infinite;
}
@keyframes endTurnBreath {
  0%, 100% { box-shadow: 0 6px 18px rgba(150,30,20,.45), inset 0 1px 0 rgba(255,255,255,.28); }
  50% { box-shadow: 0 6px 22px rgba(210,55,35,.6), 0 0 22px rgba(229,84,63,.45), inset 0 1px 0 rgba(255,255,255,.28); }
}
/* 客机操作栏 = 房主的 .action-bar(同一个类, 同一层级): 以前这里另画一块深色浮卡,
   位置、底色、圆角都和房主不一样(训练员 2026-11-03「客房布局要跟主房完全一致」)。 */
.battle-screen .remote-actions-title { color: var(--muted); }
.battle-screen .remote-act {
  background: var(--panel-2); border-color: var(--border); color: var(--ink);
}
.battle-screen .remote-hint { color: var(--muted); }

/* ---------- 顶部播报条: 已删除(训练员 2026-11-02) ----------
   以前对局画面最上方常驻一条滚动日志(「生命区设置完毕…」「XX 力量+1000」),
   占掉一整排高度还挡着对手手牌那一行。现在只留「对局日志」面板, 画面里不再有这条。 */

/* ---------- 底部圆形快捷按钮组 ---------- */
.fab-group {
  position: fixed; right: 20px; bottom: 96px; z-index: 70;  /* 上面是右下角的「结束回合」圆钮 */
  display: flex; flex-direction: column; gap: 10px;
}
.fab {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border, #24344f); background: var(--panel-2, #1a2740);
  font-size: 19px; line-height: 1; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.fab:hover { transform: scale(1.1); box-shadow: 0 0 12px rgba(232,163,61,.4); }
.fab.danger { color: #ff8d8d; }
/* 桌面端(无触摸): 这一列浮球**不出现**。
   它固定贴在屏幕右缘(bottom:96 + 152 高), 而「卡组 / 手牌 / 废弃 / 除外」胶囊也贴右缘,
   窗口一矮(pinfo 底边落在浮球列里)就直接盖住胶囊 —— 用户报障 2026-10-26 电脑端「日志挡到了
   废弃区和除外」, 实测 1280×620 / 1024×640 / 980×600 三档必现(📜 压手牌+除外, 🐞 压除外),
   被盖住的胶囊还点不动。
   桌面端这几个入口本来都另有去处: 对局日志 / 效果助手 / 🐞反馈 / 🏳投降 在顶栏 phase-bar,
   聊天与投降在联机 HUD(💬 / 🏳), 所以这里直接收起来, 不再和场上内容抢地方。
   触屏仍是原来那套: 由 battle.js 的 _mountMobileEndTurn 把它们搬进状态行尾部(见下一条)。 */
html:not(.is-touch) .fab-group { display: none; }
/* 触屏(手机/平板): 悬浮球组整体并入「我的状态行」尾部 —— JS(_mountMobileEndTurn)负责搬 DOM,
   这里负责变成一行小圆钮。以前只在「横屏且矮屏」生效, iPad(810 高)仍固定在屏幕右缘,
   正好压住「卡组 / 手牌 / 废弃 / 除外」胶囊(用户报障 2026-10-26)。 */
html.is-touch .fab-group {
  position: static; flex-direction: row; gap: 6px; margin-left: 8px;
  flex-wrap: wrap; align-items: center;
}
html.is-touch .fab { width: 32px; height: 32px; font-size: 15px; box-shadow: none; }

/* ---------- 场地区域标签: 已删除(训练员 2026-11-01) ----------
   原先领袖/生命/应援三行左侧有竖排小字(「领袖」「生命」「应援」), 还带 15px 缩进。
   训练员要求删掉, 领袖旁改挂玩家名片(.zone-idcard, 见 battle.js _mountIdCard)。 */
/* 手机横屏适配: 播报条更矮、fab 并入状态行(不再悬浮压住 废弃/除外 胶囊)、隐藏竖排区标签 */
@media (orientation: landscape) and (max-height: 560px) {
  /* 悬浮球组由 JS 并入「我的状态行」尾部: 变成一行小圆钮, 天然不会盖住状态胶囊 */
  .fab-group { position: static; flex-direction: row; gap: 5px; margin-left: 6px; flex-wrap: wrap; align-items: center; }
  .fab { width: 30px; height: 30px; font-size: 14px; box-shadow: none; }
  /* 操作栏常驻在 arena 外面(不参与滚动), 极小屏(568×320)上会把手牌整排挤出视口 →
     矮屏再压一档: 一行小按钮, 只留 ~24px */
  .action-bar { padding: 2px 6px; gap: 5px; border-radius: 8px; min-height: 0; }
  .action-bar .btn, .action-bar .mini-btn, .action-bar .link-btn {
    font-size: 9.5px; padding: 1px 7px; min-height: 20px; line-height: 1.3;
  }
  .action-bar .skill-peek { min-height: 0; }
  .action-bar .skill-peek .mini-btn { font-size: 9.5px; padding: 1px 8px; min-height: 20px; }
  /* 横屏矮屏: 圆钮再收一档, 别压住手牌最右一张 */
  html.is-mobile .end-turn-fab {
    width: 46px; height: 46px; right: 6px; bottom: calc(6px + env(safe-area-inset-bottom));
  }
  html.is-mobile .end-turn-fab .etf-ico { font-size: 12px; margin-bottom: 0; }
  html.is-mobile .end-turn-fab .etf-txt { font-size: 8px; }
  /* 状态行要容纳这排小圆钮: 放宽一点宽度限制, 允许胶囊换行 */
  html.is-mobile .zone.side-opp > .zone-bar, html.is-mobile .zone.side-mine > .zone-bar { max-width: 40vw; }
}

/* ---------- 联机 HUD / 聊天面板深色化(仅对局中出现, 全局改不影响他页) ---------- */
.net-hud {
  background: rgba(13,20,34,.92); border-color: #2c3f60; color: #c9d6ee;
}
.hud-btn { background: #1a2740; border-color: #2c3f60; color: #d9e2f2; }
.hud-btn:hover { border-color: var(--accent, #c8553d); }
.net-chat-panel {
  background: #131c2e; border-color: #24344f;
  box-shadow: 0 10px 32px rgba(0,0,0,.5); color: #d9e2f2;
}
.net-chat-panel .ncp-head { border-bottom-color: #24344f; }
.net-chat-panel .ncp-close { color: #7d8fac; }
.net-chat-panel .ncp-msg b { color: #7d8fac; }
.net-chat-panel .ncp-msg.me span { background: #24406b; color: #cfe2ff; }
.net-chat-panel .ncp-msg.peer span { background: #20293e; color: #d9e2f2; }
.net-chat-panel .ncp-input { border-top-color: #24344f; }
.net-chat-panel .ncp-input input {
  background: #0e1626; border-color: #24344f; color: #d9e2f2;
}
.net-chat-panel .ncp-input .btn.primary { background: #e8a33d; border-color: #c9862b; color: #1d1305; }
/* 快捷短语 chips */
.ncp-quick { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 12px 0; }
.ncp-qchip {
  border: 1px solid #2c3f60; background: #1a2740; color: #c9d6ee;
  border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.ncp-qchip:hover { border-color: #e8a33d; transform: translateY(-1px); }

/* ============================================================
   手机端整体深色主题 (html.is-mobile 由 mobile.js 挂载)
   ============================================================ */
html.is-mobile {
  --bg: #0b111c;
  --panel: #131c2e;
  --panel-2: #1a2740;
  --ink: #d9e2f2;
  --muted: #7d8fac;
  --accent: #e8a33d;
  --accent-dark: #c9862b;
  --blue: #63aede;
  --ok: #46c07a;
  --warn: #e0b055;
  --danger: #e05555;
  --border: #24344f;
  color-scheme: dark;
}
html.is-mobile body {
  color: var(--ink);
  background:
    linear-gradient(rgba(52,74,110,.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52,74,110,.16) 1px, transparent 1px),
    radial-gradient(900px 520px at 50% -8%, #16233c 0%, #0b111c 62%);
  background-size: 40px 40px, 40px 40px, 100% 100%;
  background-attachment: fixed;
}
html.is-mobile .btn { background: var(--panel-2); border-color: var(--border); color: var(--ink); }
html.is-mobile .btn:hover:not(:disabled) { border-color: var(--accent); }
html.is-mobile .btn.primary { background: var(--accent); border-color: var(--accent-dark); color: #1d1305; }
html.is-mobile .btn.danger { color: #ff8d8d; border-color: rgba(224,85,85,.5); }
html.is-mobile .mini-btn { background: rgba(10,16,28,.72); }
html.is-mobile input, html.is-mobile select, html.is-mobile textarea {
  background: #0e1626; border-color: #24344f; color: #d9e2f2;
}
html.is-mobile input::placeholder { color: #5d6d8c; }
html.is-mobile .topbar { background: rgba(15,22,38,.94); border-bottom-color: var(--border); }
html.is-mobile .modal-box {
  background: #131c2e; border: 1px solid #24344f;
  box-shadow: 0 14px 40px rgba(0,0,0,.55); color: var(--ink);
}
html.is-mobile .sheet-overlay .sheet-box { background: #131c2e; border-color: #24344f; }
html.is-mobile .cost-pill { background: #1a2740; color: #c9d6ee; border-color: #24344f; }
html.is-mobile .cost-pill.ok { background: rgba(70,192,122,.14); color: #6fe0a0; border-color: rgba(70,192,122,.4); }
html.is-mobile .cost-pill.warn { background: rgba(224,176,85,.12); color: #f0c674; border-color: rgba(224,176,85,.4); }
html.is-mobile .pill { background: rgba(64,88,128,.32); color: #b3c1dd; border: 1px solid rgba(96,124,170,.35); }
html.is-mobile .pill.danger { background: rgba(200,60,60,.2); color: #ff8d8d; border-color: rgba(224,85,85,.55); }
html.is-mobile .life-label { background: rgba(64,88,128,.32); color: #9fb2d2; }
html.is-mobile .turn-pill { background: rgba(64,88,128,.26); color: #8fa0c0; border-color: rgba(96,124,170,.32); }
html.is-mobile .turn-pill.on { background: var(--accent); color: #1d1305; border-color: var(--accent-dark); }
html.is-mobile .dice-face { background: #1a2740; box-shadow: 0 3px 0 rgba(0,0,0,.3); }
html.is-mobile .host-mask-concede { background: rgba(16,24,40,.92); color: #d9e2f2; }
html.is-mobile .auth-form input, html.is-mobile .join-row input, html.is-mobile .lobby-card select {
  background: #0e1626; border-color: #24344f; color: #d9e2f2;
}
html.is-mobile .issue.warn { background: rgba(224,176,85,.12); color: #f0c674; }
html.is-mobile .issue.ok { background: rgba(70,192,122,.12); color: #6fe0a0; }

/* ---------- BGM: 后台音乐播放器 + 静音按钮 ---------- */
/* <audio> 本身不渲染; 容器只做挂载点, 用 0 尺寸挪出布局流
   (不要用 display:none 挂父节点 —— 个别浏览器会把不可见容器里的媒体挂起) */
#bgm-host {
  position: fixed; left: -9999px; top: 0;
  width: 0; height: 0; overflow: hidden;
  pointer-events: none;
}
#bgm-host audio { width: 0; height: 0; }
.phase-bar .bgm-btn { font-size: 15px; line-height: 1; padding: 1px 5px; border-radius: 6px; }
/* 客机顶栏: 回合信息单独一块(每帧只重建它), 音乐键常驻不重建 */
.remote-turn-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.phase-bar .bgm-btn.off { opacity: .5; }

/* ---------- 对局全屏 ---------- */
/* 按钮与音乐键同款(对局顶栏/客机顶栏各一个, 用 [data-fs-toggle] 统一认) */
.phase-bar .fs-btn { font-size: 15px; line-height: 1; padding: 1px 5px; border-radius: 6px; }
.phase-bar .fs-btn .fs-ico { display: inline-block; line-height: 1; }
/* 已全屏: 反色高亮, 一眼看出再点一下就退出 */
.phase-bar .fs-btn.fs-on { background: rgba(200, 85, 61, .16); color: var(--accent); }
/* 沉浸模式(iPhone Safari 等没有网页全屏 API 的浏览器):
   高度改用动态视口 100dvh —— 地址栏收放不会再带着整场重排。
   --app-h 是 JS 写在 html 的 inline style 上的, 这里必须 !important 才盖得住;
   --vu / --m-vu 都是 calc(--app-h), 跟着自动生效。 */
html.fs-fallback { --app-h: 100dvh !important; }
/* 锁住页面级滚动 —— **只在对局界面**(html.fs-lock 由 fullscreen.js 判定: 全屏态 且 屏幕上有
   .battle-screen)。手机横屏引导的「一键横屏」同样是整页全屏(Android 上方向锁定必须在全屏里用),
   以前这条无条件挂在 html.fs-on / html.fs-fallback 上, 结果横屏之后主页、我的卡组、广场
   全都划不动(2026-10-24 用户报障: 「手机端横屏之后划不动屏幕」)。 */
html.fs-lock body { overflow: hidden; overscroll-behavior: none; }
/* 手机上全屏有两个入口, 按方向只显示一个:
   竖屏: 悬浮球组固定在右下角, 会压住 phase-bar 右侧那一串(音乐/日志/全屏) → 用浮球;
   横屏: 浮球组已并入状态行、顶上空间够 → 用顶栏按钮(更好找)。
   客机(remote-view)没有悬浮球组, 顶栏按钮在任何方向都保留。 */
@media (orientation: portrait) {
  html.is-mobile .battle-screen:not(.remote-view) .phase-bar .fs-btn { display: none; }
}
@media (orientation: landscape) {
  html.is-mobile #fab-fs { display: none; }
}

/* ---------- 闪卡特效（商店兑换后，同名卡全部生效；对局中双方可见） ---------- */
/* 金边 + 双层反光（只有卡面效果, 没有角标 —— 用户口径 2026-10-24）:
   ::before = 全息薄膜(彩虹渐变缓慢漂移, color-dodge 提亮)
   ::after  = 斜向扫光(窄亮条周期性扫过)
   两层都必须压在卡图**之上**: ::before 是 .ct-face 的第一个子节点, 默认画在 <img> 底下
   → 被不透明的卡图整片盖住, 只剩一层若有若无的白雾(小卡上看不出「闪光」)。
   所以给两层 z-index: 2、给 img z-index: 0, 并把 .ct-face 隔离成独立混合组。
   两层都 pointer-events:none, 不影响点击/选目标 */
/* 外边框按 IP 分色（训练员 2026-11-06）: 宝石之国 BS＝翡翠绿 / SAO＝水蓝 / RE:0＝淡紫，
   其余 IP 一律沿用原金黄。颜色只走 CSS 变量，下面 img 的 box-shadow 只读变量 ——
   以后哪个 IP 想单独配色，补一条 [data-foil-ip] 规则即可，别去动 box-shadow 本体。
   data-foil-ip 由 ui.js 的 cardThumb 按卡号前缀写入（BS-002 → BS）。 */
.card-thumb.foil img {
  position: relative; z-index: 0;
  box-shadow:
    0 0 0 2px var(--foil-edge, rgba(255, 214, 120, .95)),
    0 0 10px var(--foil-glow, rgba(255, 200, 80, .45)),
    0 2px 6px rgba(0, 0, 0, .18);
}
.card-thumb.foil[data-foil-ip="BS"]  { --foil-edge: rgba(52, 224, 152, .95); --foil-glow: rgba(24, 200, 126, .50); }  /* 翡翠绿 */
.card-thumb.foil[data-foil-ip="SAO"] { --foil-edge: rgba(118, 214, 255, .95); --foil-glow: rgba(72, 184, 255, .50); } /* 水蓝 */
.card-thumb.foil[data-foil-ip="RE0"] { --foil-edge: rgba(202, 172, 255, .95); --foil-glow: rgba(168, 130, 255, .50); } /* 淡紫 */
.card-thumb.foil .ct-face { isolation: isolate; } /* 混合只作用在卡面内部, 不污染旁边的卡 */
.card-thumb.foil .ct-face::before,
.card-thumb.foil .ct-face::after {
  content: ''; position: absolute; inset: 0; border-radius: 9px;
  pointer-events: none; z-index: 2;
}
.card-thumb.foil .ct-face::before {
  background: linear-gradient(115deg,
    rgba(255, 0, 128, .30), rgba(255, 230, 0, .22) 20%,
    rgba(0, 255, 190, .26) 40%, rgba(0, 150, 255, .30) 60%,
    rgba(190, 0, 255, .26) 80%, rgba(255, 0, 128, .30));
  background-size: 300% 300%;
  mix-blend-mode: color-dodge;
  /* 只做一层薄薄的全息色偏: 再高就会把浅色卡面糊成白雾(扫光才是主角) */
  opacity: .2;
  animation: foilShift 6.5s ease-in-out infinite;
  /* 负延迟 = 动画相位接上「页面已经过了多久」, 整页重建时不会从头开始 */
  animation-delay: var(--foil-shift-delay, 0s);
}
.card-thumb.foil .ct-face::after {
  background: linear-gradient(100deg,
    transparent 39%, rgba(255, 255, 255, .30) 45%,
    rgba(255, 255, 255, .92) 50%, rgba(205, 242, 255, .45) 55%,
    transparent 61%);
  background-size: 220% 100%;
  mix-blend-mode: screen;
  animation: foilSheen 2.8s linear infinite;
  animation-delay: var(--foil-delay, 0s);
}
@keyframes foilShift {
  0%, 100% { background-position: 0% 40%; }
  50%      { background-position: 100% 60%; }
}
/* 扫光: 两端都留在卡外(有间歇), 中间一段扫过卡面 —— 窄亮条才看得出「闪」 */
@keyframes foilSheen {
  0%   { background-position: 175% 0; }
  100% { background-position: -75% 0; }
}
/* 横置的闪卡: 反光挂在 .ct-face 上, 已经跟着卡图一起转了, 不需要额外补转 */
@media (prefers-reduced-motion: reduce) {
  .card-thumb.foil .ct-face::before, .card-thumb.foil .ct-face::after { animation: none; }
}

/* ---------- 动效闪卡（影之诗式「活卡面」: RE0 应援卡 / 领袖卡） ---------- */
/* 普通闪卡 = 反光扫过一张静止的卡; 动效闪卡 = 让画面里**本来就有的东西**自己动起来。
   逐卡专属层由 ui.js 的 LIVE_FX 排布(坐标按卡图量), 动画都在这里:
     .lv-rise   紫色雾气向上流动            (RE0-001 菜月昴 · 洞窟岩壁)
     .lv-gem    绿宝石辉光 + 十字星芒        (RE0-002 爱蜜莉雅&帕克)
     .lv-bloom  烟花爆闪 + 扩散光环          (RE0-004 贝蒂)
     .lv-splash/.lv-drop/.lv-bubble         水花溅起 / 气泡上浮 (RE0-005 雷姆)
     .lv-swirl/.lv-gust                     环绕气流 / 风缕    (RE0-006 拉姆)
     .lv-blade  沿剑刃流动的剑气             (RE0-008 莱因哈鲁特)
     .lv-orb    光球发光 + 内部光丝旋转      (RE0-029 罗兹瓦尔)
   通用层(所有动效闪卡共有, 2026-10-26 第三轮补齐"背景也在动"这一块):
     .lv-bg     背景柔光雾团, 30~38s 绕一圈(整片背景在缓慢流动)
     .lv-sweep  很宽的柔光带, 12~16s 掠过一次(淡光扫过)
     .lv-spark  光尘 ×6(.lv-rim 边缘呼吸光)
   逐卡专属层由 ui.js 的 LIVE_FX 排布(坐标按卡图量):
     .lv-rise   紫色雾气向上流动            (RE0-001 菜月昴 · 洞窟岩壁)
     .lv-gem    绿宝石辉光 + 十字星芒        (RE0-002 爱蜜莉雅&帕克)
     .lv-bloom  烟花爆闪 + 扩散光环          (RE0-004 贝蒂)
     .lv-flare  烟花区域整体高亮(椭圆描边)   (RE0-004 贝蒂)
     .lv-splash/.lv-drop/.lv-bubble         水花溅起 / 气泡上浮 (RE0-005 雷姆)
     .lv-wave   水面波光横向流动            (RE0-005 雷姆)
     .lv-swirl/.lv-gust                     环绕气流 / 风缕    (RE0-006 拉姆)
     .lv-blade  沿剑刃流动的剑气             (RE0-008 莱因哈鲁特)
     .lv-orb    光球发光 + 内部光丝旋转      (RE0-029 罗兹瓦尔)
   五条硬约束:
   ① 只动 transform / opacity(走合成层), 不做 filter / background-position 动画 ——
      对局里可能同时十几张卡;
   ② 不要在包住所有层的 .lv-wrap 上加 mask / isolation: 那会让它自成一"隔离组",
      子层的 mix-blend-mode 就只跟空背景混合, 画面完全不亮;
   ③ 所有层 z-index 都是 auto → 排在卡图之后就能盖在卡图上、普通闪卡那两层反光(z-index:2)之下。
      ⚠ 因此 ui.js 里必须**先 appendChild(卡图) 再挂 .lv-wrap**, 反过来整层会被卡图压住(2026-10-26 踩过);
   ④ 用户口径 2026-10-26(第二轮)已删除: .lv-rays(中心向四周发散的放射光轮)与
      .lv-art(同一张卡图放大+模糊遮罩的"呼吸视差") —— 前者太抢戏, 后者把画面糊开了。
   ⑤ 用户口径 2026-10-26(第三轮): "让背景动起来"**不许**用卡图副本放大位移 ——
      副本与原图尺度不同, 遮罩边缘会重影成两层(岩壁/云层纹理对不上), 看起来是画面糊了。
      背景的运动一律由 .lv-bg 的纯光雾承担; 人物微动只在大图用 ±0.5% 的极轻呼吸。
   所有数值都由 ui.js 以**裸数字**写进自定义属性(百分数 / px / 秒), 单位在这里补。 */
.lv-wrap {
  position: absolute; inset: 0; border-radius: inherit;
  overflow: hidden; pointer-events: none;
  /* 大图预览是缩略图的 ~2.2 倍宽: 所有 px 尺寸统一乘这个系数 */
  --lv-scale: 1;
}
#card-zoom .zoom-face .lv-wrap { --lv-scale: 2.2; }
.lv-wrap i { position: absolute; display: block; pointer-events: none; }

/* ① 紫色雾气向上流动: 一缕竖向的紫色光雾从卡底升到卡顶, 中途淡出再从新来。
      高度都 > 卡高、底部压到卡外 —— 上下两端被裁掉, 所以看上去是"没有头尾的光柱"在走,
      而不是一团浮在卡上的紫色椭圆(那样太像贴纸)。
      紫雾叠在紫色岩壁上很容易看不出来, 中心给一点白光、亮度也压得住, 才看得出在动。
      2026-10-26 第三轮: 去掉原来的横向遮罩(background 的 radial 本来就左右淡出, 那层是冗余),
      换成纵向遮罩 —— 在效果文本区上方(y≈62% 卡高)完全收掉。
      以前 6~8 根雾柱是从卡底一直亮到文字区上的, 实测文字区 15% 的像素都在跟着变,
      等于给文本蒙了一层会动的紫纱。--fclip 由 ui.js 按该层高度算好(元素自身的百分比),
      所以每根雾柱的收口都正好落在卡面 62% 那条线上。 */
.lv-rise {
  left: calc(var(--x) * 1% - var(--w) * 0.5%);
  bottom: -14%; width: calc(var(--w) * 1%); height: calc(var(--h) * 1%);
  background: radial-gradient(closest-side, rgba(255, 255, 255, .42) 0 5%, var(--c) 32%, rgba(120, 70, 220, 0) 76%);
  -webkit-mask-image: linear-gradient(180deg, #000 0 calc(var(--fclip, 52) * 1% - 12%), transparent calc(var(--fclip, 52) * 1%));
  mask-image: linear-gradient(180deg, #000 0 calc(var(--fclip, 52) * 1% - 12%), transparent calc(var(--fclip, 52) * 1%));
  mix-blend-mode: screen; opacity: 0;
  animation: lvRise calc(var(--dur, 11) * 1s) linear infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}

/* ② 宝石辉光: 亮核 + 两圈十字星芒(晶体反光), 一明一暗地"呼吸"
      尺寸一律按**卡宽百分比**(width + aspect-ratio), 不写 px —— 应援卡宽度从手机 72px 到
      桌面 160px 都有, 写死 px 会让小卡上的光点大得离谱, 大卡上又缩成一点。
      margin 的 % 也是按容器宽度算的, 正好用来把元素中心对到 (x,y) */
.lv-gem {
  left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: calc(var(--sz) * 1%); aspect-ratio: 1;
  margin: calc(var(--sz) * -0.5%) 0 0 calc(var(--sz) * -0.5%);
  mix-blend-mode: screen;
  background: radial-gradient(circle, #fff 0 10%, var(--c, rgba(110, 255, 198, .95)) 30%, rgba(96, 255, 186, 0) 70%);
  animation: lvGemPulse calc(var(--dur, 3.8) * 1s) ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}
.lv-gem::before, .lv-gem::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 250%; height: calc(1.6px * var(--lv-scale));
  margin: calc(-0.8px * var(--lv-scale)) 0 0 -125%;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, var(--c, rgba(110, 255, 198, .95)) 30%, #fff 50%,
                              var(--c, rgba(110, 255, 198, .95)) 70%, transparent);
}
.lv-gem::after { transform: rotate(90deg); }

/* ③ 烟花爆闪: 中心亮核 + 向外扩散的光环 + 四芒星, 亮一下歇一会儿(一闪一闪) */
.lv-bloom {
  left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: calc(var(--sz) * 1%); aspect-ratio: 1;
  margin: calc(var(--sz) * -0.5%) 0 0 calc(var(--sz) * -0.5%);
  mix-blend-mode: screen; opacity: .3;
  background: radial-gradient(circle, #fff 0 8%, var(--c, rgba(255, 150, 220, .95)) 26%, transparent 62%);
  animation: lvBloomFlash calc(var(--dur, 3.4) * 1s) ease-out infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}
.lv-bloom::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: calc(1.2px * var(--lv-scale)) solid var(--c, rgba(255, 150, 220, .95));
  opacity: 0;
  animation: lvBloomRing calc(var(--dur, 3.4) * 1s) ease-out infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}
.lv-bloom::after {
  content: ''; position: absolute; inset: -25%;
  background:
    linear-gradient(90deg, transparent, #fff 40%, var(--c, rgba(255, 150, 220, .95)) 50%, #fff 60%, transparent)
      center / 100% calc(2px * var(--lv-scale)) no-repeat,
    linear-gradient(180deg, transparent, #fff 40%, var(--c, rgba(255, 150, 220, .95)) 50%, #fff 60%, transparent)
      center / calc(2px * var(--lv-scale)) 100% no-repeat;
  animation: lvBloomFlash calc(var(--dur, 3.4) * 1s) ease-out infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}

/* ④ 水花: 容器宽=卡宽、高=0 的锚点条 —— 水面上先炸开一圈白沫(::before), 水珠再从同一点斜抛出去。
      ⚠ 2026-10-26 修: 早先容器是 0×0, 里面所有子元素按百分比取尺寸就全是 0 ——
      水珠与水沫其实**从来没有显示过**(RE0-005 只有气泡在动)。改成 width:100%/height:0 后,
      百分比才回到"卡宽"这个参照系上; 每个水珠/白沫自己带 --x/--y(从父级继承)定位。 */
.lv-splash { left: 0; top: 0; width: 100%; height: 0; }
.lv-splash::before {
  content: ''; position: absolute;
  left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: 17%; aspect-ratio: 1;
  margin: -8.5% 0 0 -8.5%;
  border-radius: 50%; opacity: 0;
  border: calc(1.2px * var(--lv-scale)) solid rgba(140, 205, 246, .8);
  box-shadow: inset 0 0 calc(6px * var(--lv-scale)) rgba(180, 235, 255, .7);
  mix-blend-mode: normal;
  animation: lvFoam calc(var(--dur, 2.6) * 1s) ease-out infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}
.lv-drop {
  left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: calc(var(--sz, 4) * 1%); aspect-ratio: 1;
  margin: calc(var(--sz, 4) * -0.5%) 0 0 calc(var(--sz, 4) * -0.5%);
  border-radius: 50%; opacity: 0;
  /* 白心 + 蓝边。这张卡背景是大片白色浪花, 水珠/气泡一律用**正常混合**而不是 screen ——
     screen 叠在白浪上是纯白, 等于看不见; 正常混合的蓝边才在白云上也分得出来"这是水" */
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .95) 0 30%,
              rgba(150, 214, 250, .9) 62%, rgba(58, 132, 214, .34) 100%);
  mix-blend-mode: normal;
  animation: lvDrop calc(var(--dur, 2.6) * 1s) cubic-bezier(.2, .6, .5, 1) infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}
/* 气泡: 空心小圆一路往上飘, 边上左右轻摆 */
.lv-bubble {
  left: calc(var(--x) * 1% - var(--sz, 7) * 0.5%);
  top: calc(var(--y) * 1% - var(--sz, 7) * 0.5%);
  width: calc(var(--sz, 7) * 1%); aspect-ratio: 1;
  border-radius: 50%; opacity: 0;
  border: calc(1px * var(--lv-scale)) solid rgba(126, 196, 244, .85);
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .9), rgba(186, 232, 255, .22) 52%, rgba(120, 190, 245, .1) 74%);
  mix-blend-mode: normal;
  animation: lvBubble calc(var(--dur, 8) * 1s) linear infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}

/* ⑤ 环绕气流: 一段软收口的弧光绕着人物转。
      用 conic-gradient 画一小段亮弧 + 把元素**自身**用环形遮罩收成"圆环带"(不是 border 弧) ——
      border 只能整半边着色, 断口是硬切; conic 的两端可以渐隐, 才像一缕风。
      反向再叠一层, 就有"风在打旋"的感觉 */
.lv-swirl {
  left: calc(var(--x) * 1% - var(--w) * 0.5%);
  top: calc(var(--y) * 1% - var(--h) * 0.5%);
  width: calc(var(--w) * 1%); height: calc(var(--h) * 1%);
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    rgba(255, 255, 255, 0) 0deg, var(--c, rgba(160, 255, 236, .7)) 44deg,
    var(--c, rgba(160, 255, 236, .7)) 104deg, rgba(255, 255, 255, 0) 152deg, rgba(255, 255, 255, 0) 360deg);
  -webkit-mask-image: radial-gradient(closest-side, transparent calc(100% - 2.4px), #000 calc(100% - 1.4px), transparent 100%);
  mask-image: radial-gradient(closest-side, transparent calc(100% - 2.4px), #000 calc(100% - 1.4px), transparent 100%);
  mix-blend-mode: screen; opacity: .55;
  animation: lvOrbit calc(var(--dur, 16) * 1s) linear infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}
.lv-swirl.rev { animation-direction: reverse; }

/* ⑥ 风缕: 一条细长的亮线, 内部一小段流光沿自身方向掠过(整条按 --rot 倾角躺着) */
.lv-gust {
  left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: calc(var(--w, 50) * 1%); height: calc(2px * var(--lv-scale));
  margin-top: calc(-1px * var(--lv-scale));
  border-radius: 999px; overflow: hidden;
  transform: rotate(calc(var(--rot, -10) * 1deg)); transform-origin: 0 50%;
  mix-blend-mode: screen;
}
.lv-gust::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 46%;
  background: linear-gradient(90deg, transparent, var(--c, rgba(180, 255, 242, .75)) 38%, #fff 55%,
                              var(--c, rgba(180, 255, 242, .75)) 72%, transparent);
  opacity: 0;
  animation: lvStreak calc(var(--dur, 6) * 1s) linear infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}
.lv-gust.rev::before { animation-direction: reverse; }

/* ⑦ 剑气: 和风缕同一套构造, 只是贴在剑刃上(起点=护手, 沿 38° 往外跑), 更细更亮 */
.lv-blade {
  left: calc(var(--x) * 1% - var(--h, 3) * 0.5px * var(--lv-scale));
  top: calc(var(--y) * 1% - var(--h, 3) * 0.5px * var(--lv-scale));
  width: calc(var(--w, 80) * 1%); height: calc(var(--h, 3) * 1px * var(--lv-scale));
  border-radius: 999px; overflow: hidden;
  transform: rotate(calc(var(--rot, -38) * 1deg)); transform-origin: 0 50%;
  mix-blend-mode: screen;
}
.lv-blade::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 34%;
  background: linear-gradient(90deg, transparent, rgba(168, 240, 255, .55) 22%, #fff 50%,
                              rgba(168, 240, 255, .55) 78%, transparent);
  filter: drop-shadow(0 0 2px rgba(180, 245, 255, .9));
  opacity: 0;
  animation: lvStreak calc(var(--dur, 3) * 1s) linear infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}
.lv-blade.rev::before { animation-direction: reverse; }

/* ⑧ 光球: 发光核 + 球内绕圈的光丝(conic 亮扇 + 环形遮罩) + 外面一圈细光环,
      "发光"和"旋转"这两件事各由一层负责, 互不干扰 */
.lv-orb {
  left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: calc(var(--sz) * 1%); aspect-ratio: 1;
  margin: calc(var(--sz) * -0.5%) 0 0 calc(var(--sz) * -0.5%);
  border-radius: 50%;
  mix-blend-mode: screen;
  background: radial-gradient(circle, #fff 0 12%, var(--c, rgba(255, 216, 90, .95)) 34%, rgba(255, 255, 255, 0) 72%);
  animation: lvOrbPulse calc(var(--dur, 3.6) * 1s) ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}
.lv-orb::before {
  content: ''; position: absolute; inset: 6%; border-radius: 50%;
  background: conic-gradient(from 0deg,
    rgba(255, 255, 255, 0) 0deg, rgba(255, 255, 255, .78) 42deg, rgba(255, 255, 255, 0) 96deg,
    rgba(255, 255, 255, 0) 180deg, rgba(255, 255, 255, .55) 226deg, rgba(255, 255, 255, 0) 288deg,
    rgba(255, 255, 255, 0) 360deg);
  -webkit-mask-image: radial-gradient(circle, transparent 24%, #000 52%, transparent 88%);
  mask-image: radial-gradient(circle, transparent 24%, #000 52%, transparent 88%);
  opacity: .9;
  animation: lvOrbit calc(var(--dur, 3.6) * 0.9s) linear infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}
.lv-orb::after {
  content: ''; position: absolute; inset: -34%; border-radius: 50%;
  border: calc(1px * var(--lv-scale)) solid transparent;
  border-top-color: rgba(255, 255, 255, .85);
  border-left-color: var(--c, rgba(255, 216, 90, .95));
  opacity: .75;
  animation: lvOrbit calc(var(--dur, 3.6) * 1.4s) linear infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}

/* ⑨ 光尘: 每颗一个 <i>, 各自漂浮+闪烁(位置/大小/速度由 ui.js 内联给)。
      早先用「repeat 的背景瓦片 + 遮罩」来做, 但同一段 CSS 单独开页正常、
      放进卡面里就完全不显影 —— 换成独立节点后行为可预期, 也省掉遮罩与平铺参数。
      只落在插画区(y ≤ 61%), 不压到底部的效果文本; screen 混合让光点在深色卡面上发光。
      色调用 --s1/--s2 两个变量, 由 .gold/.cold/容器的 data-tone 覆盖(不再用 :nth-child) */
.lv-spark {
  left: calc(var(--x) * 1% - var(--sz, 4) * 0.5%);
  top: calc(var(--y) * 1% - var(--sz, 4) * 0.5%);
  width: calc(var(--sz, 4) * 1%); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 20%, var(--s1, rgba(255, 246, 216, .8)) 42%, var(--s2, rgba(255, 240, 200, 0)) 72%);
  mix-blend-mode: screen;
  animation: lvSparkFloat calc(var(--dur, 8) * 1s) ease-in-out infinite,
             lvSparkTwinkle 3.6s ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * 1s), calc(var(--d2, 0) * 1s);
}
.lv-spark.gold { --s1: rgba(255, 220, 140, .85); --s2: rgba(255, 200, 110, 0); }
/* 冷色星点: 少数几颗偏青白, 画面才不会一股脑全是金色 */
.lv-spark.cold { --s1: rgba(198, 234, 255, .8); --s2: rgba(170, 215, 255, 0); }
/* 光尘跟着卡面主色走: 紫洞窟 / 绿水晶 / 烟花 / 海水 / 夜风 / 剑气 / 魔法 */
.lv-wrap[data-tone="violet"] .lv-spark { --s1: rgba(216, 182, 255, .85); --s2: rgba(150, 96, 255, 0); }
.lv-wrap[data-tone="jade"]   .lv-spark { --s1: rgba(168, 255, 214, .85); --s2: rgba(96, 235, 168, 0); }
.lv-wrap[data-tone="rose"]   .lv-spark { --s1: rgba(255, 186, 228, .85); --s2: rgba(255, 130, 200, 0); }
.lv-wrap[data-tone="aqua"]   .lv-spark { --s1: rgba(186, 240, 255, .85); --s2: rgba(120, 205, 255, 0); }
.lv-wrap[data-tone="mint"]   .lv-spark { --s1: rgba(176, 255, 240, .85); --s2: rgba(110, 235, 220, 0); }
.lv-wrap[data-tone="cyan"]   .lv-spark { --s1: rgba(178, 238, 255, .85); --s2: rgba(110, 205, 255, 0); }
.lv-wrap[data-tone="iris"]   .lv-spark { --s1: rgba(214, 190, 255, .85); --s2: rgba(150, 120, 255, 0); }
.lv-wrap[data-tone="frost"]  .lv-spark { --s1: rgba(228, 248, 255, .9);  --s2: rgba(150, 205, 255, 0); }
.lv-wrap[data-tone="prism"]  .lv-spark { --s1: rgba(255, 236, 255, .9);  --s2: rgba(190, 150, 255, 0); }
/* 背景雾团的三团光同样跟主色: 亮团 / 中团 / 暗团(越是垫底的越淡, 免得整卡泛色) */
.lv-wrap[data-tone="violet"] { --g1: rgba(198, 158, 255, .52); --g2: rgba(152, 112, 240, .44); --g3: rgba(126, 92, 214, .34); }
.lv-wrap[data-tone="jade"]   { --g1: rgba(160, 255, 210, .34); --g2: rgba(104, 226, 176, .28); --g3: rgba(72, 196, 160, .22); }
.lv-wrap[data-tone="rose"]   { --g1: rgba(255, 190, 226, .50); --g2: rgba(232, 132, 200, .42); --g3: rgba(178, 108, 224, .32); }
.lv-wrap[data-tone="aqua"]   { --g1: rgba(186, 240, 255, .50); --g2: rgba(120, 202, 250, .42); --g3: rgba(84, 168, 232, .32); }
.lv-wrap[data-tone="mint"]   { --g1: rgba(180, 255, 240, .48); --g2: rgba(110, 232, 218, .40); --g3: rgba(76, 198, 190, .30); }
.lv-wrap[data-tone="cyan"]   { --g1: rgba(178, 238, 255, .50); --g2: rgba(112, 200, 250, .42); --g3: rgba(78, 160, 226, .32); }
.lv-wrap[data-tone="iris"]   { --g1: rgba(204, 192, 255, .50); --g2: rgba(146, 138, 246, .42); --g3: rgba(112, 108, 224, .32); }
.lv-wrap[data-tone="frost"]  { --g1: rgba(206, 236, 255, .50); --g2: rgba(148, 200, 250, .42); --g3: rgba(112, 164, 228, .32); }
.lv-wrap[data-tone="prism"]  { --g1: rgba(255, 210, 246, .46); --g2: rgba(168, 214, 255, .42); --g3: rgba(198, 168, 255, .34); }

/* ⑩ 边缘呼吸光: 一圈 inset 光晕 + 顶部的一抹高光, 缓慢明灭(动效闪卡共有的"底噪")
      2026-10-26 第三轮: 加一层纵向遮罩收在插画区 —— 原先 inset 光晕会顺着边框淌到底部,
      把效果文本的底色一起提亮(实测文字区 4~7% 像素在变)。收掉之后文字区是 0.00%,
      幅度也从 .5~1 压到 .55~.85, 是"呼吸"不是"闪" */
.lv-rim {
  inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 20px rgba(255, 220, 140, .75), inset 0 0 6px rgba(255, 255, 255, .65);
  background: linear-gradient(180deg, rgba(255, 255, 255, .2), transparent 22%);
  -webkit-mask-image: linear-gradient(180deg, #000 0 60%, transparent 72%);
  mask-image: linear-gradient(180deg, #000 0 60%, transparent 72%);
  opacity: .6;
  animation: lvRim 4.4s ease-in-out infinite;
  animation-delay: var(--lv-p4, 0s);
}

/* ⑪ 背景柔光雾团（2026-10-26 第三轮, 用户口径: 让**背景**动起来）
      三团大范围柔光, 元素比卡面大一圈, 极慢地绕一个不闭合的圈(30~38s)。
      为什么不用「卡图副本放大+位移」来做背景流动: 副本的尺度与原图必然不同, 在遮罩边缘
      会看到同一处岩壁/云层重影成两层(实测很明显), 看起来是画面糊了、不是背景在流。
      纯光雾则人物、文字、边框一个像素都不会动 —— 这是「不影响卡牌识别」的根本保证。
      底部线性遮罩把 y>58% 收掉: 效果文本区一点光都不加。
      色相由 .lv-wrap[data-tone] 的 --g1/--g2/--g3 给(跟着卡面主色走)。 */
.lv-bg {
  inset: -14% -10%;
  background:
    radial-gradient(58% 44% at 30% 28%, var(--g1, rgba(196, 158, 255, .5)), transparent 72%),
    radial-gradient(56% 42% at 74% 24%, var(--g2, rgba(150, 118, 240, .42)), transparent 74%),
    radial-gradient(66% 48% at 52% 64%, var(--g3, rgba(126, 96, 216, .34)), transparent 78%);
  filter: blur(calc(3px * var(--lv-scale)));
  opacity: .45;
  /* ⚠ 这里的百分比是**元素自身**的(inset -14% -10% → 高度 128% 卡高), 不是卡高!
     想卡在 62% 以内就必须写到 50% 左右(0.50*1.28-0.14 = 50% 卡高; 0.64*1.28-0.14 = 68%)。
     第一版按卡高写了 58/72, 结果光透到 78% 的效果文本上 —— 文字区两帧对不上就是这么来的。 */
  -webkit-mask-image: linear-gradient(180deg, #000 0 50%, transparent 64%);
  mask-image: linear-gradient(180deg, #000 0 50%, transparent 64%);
  animation: lvBgDrift calc(var(--dur, 34) * 1s) ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * 1s);
  will-change: transform;
}

/* ⑫ 淡光扫过: 一条很宽、很淡的柔光带, 十几秒才掠过一次。
      与普通闪卡 1.9s 的金属反光是两件事 —— 那个是"闪", 这个是"透光";
      所以它峰值只有 .55, 而且宽到看不出"一条线在走", 只觉得画面亮了一下。 */
.lv-sweep {
  inset: -18% -70%;
  background: linear-gradient(104deg, transparent 40%, rgba(255, 255, 255, .5) 49%,
                              rgba(255, 255, 255, .22) 55%, transparent 63%);
  opacity: 0; mix-blend-mode: screen;
  /* 同上: 元素高 136%(inset -18%), mask 48%~62% → 卡高约 47%~66%, 收在插画区里 */
  -webkit-mask-image: linear-gradient(180deg, #000 0 48%, transparent 62%);
  mask-image: linear-gradient(180deg, #000 0 48%, transparent 62%);
  animation: lvSweep calc(var(--dur, 13) * 1s) ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * 1s);
  will-change: transform, opacity;
}

/* ⑬ 插画微呼吸(.lv-artbreath)已按用户口径 2026-10-26(第四轮)整层删除:
      「修改闪卡不要让中间的人物晃动」。用卡图副本做整体缩放, 缩放中心在画面里,
      人物必然跟着一起起伏 —— 静态图无法把人物和背景分开, 所以这条整层不做。
      画面要"活", 只能靠纯光效层(⓪ 雾团 / ⓪' 扫光 / 光尘 / 逐卡专属特效), 它们不复制卡图。 */

/* ⑭ 水面波光带(RE0-005 雷姆·海边): 两条反向横移的斜纹光带。
      人物没法从静态图里分离出来做"随波起伏", 所以让**整片水面**在横向流动 ——
      人物泡在流动的海里, 观感就是"人在水中轻轻荡"。
      repeating 渐变的周期是元素宽的 18%, 位移也正好 18%(=一个周期) → 循环无缝, 不会看到跳帧。
      上下用遮罩收软, 不出现硬边; y 由 LIVE_FX 卡在 57% 以内, 绝不爬到效果文本上。 */
.lv-wave {
  left: calc(var(--x, 50) * 1% - var(--w, 100) * 0.5%);
  top: calc(var(--y, 57) * 1% - var(--h, 10) * 0.5%);
  width: calc(var(--w, 100) * 1%); height: calc(var(--h, 10) * 1%);
  overflow: hidden; mix-blend-mode: screen; opacity: .55;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 38% 58%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 38% 58%, transparent);
}
.lv-wave::before, .lv-wave::after {
  content: ''; position: absolute; inset: -40% -60%;
  background: repeating-linear-gradient(97deg,
    transparent 0 7%, rgba(186, 238, 255, .3) 8.2%, transparent 9.6% 18%);
  animation: lvWaveFlow calc(var(--dur, 11) * 1s) linear infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}
.lv-wave::after {
  background: repeating-linear-gradient(97deg,
    transparent 0 9%, rgba(214, 246, 255, .22) 10.4%, transparent 12% 18%);
  animation-duration: calc(var(--dur, 11) * 1.5s);
  animation-direction: reverse;
  opacity: .55;
}
.lv-wave.rev::before { animation-direction: reverse; }

/* ⑮ 区域高亮(RE0-004 贝蒂·烟花): 按卡图把**烟花占的那片范围**描成椭圆, 整片缓慢明灭。
      和 .lv-bloom(点位爆闪)分工: bloom 是"炸开的一瞬", flare 是"那片天一直在亮"。
      亮度最低 .34(不归零) + 周期 4.2~5.6s → 是呼吸, 不是频闪。
      inset 阴影沿椭圆内缘描一圈, 才有"照着卡图描出来"的轮廓感。 */
.lv-flare {
  left: calc(var(--x) * 1% - var(--w) * 0.5%);
  top: calc(var(--y) * 1% - var(--h) * 0.5%);
  width: calc(var(--w) * 1%); height: calc(var(--h) * 1%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .9) 0 5%,
                              var(--c, rgba(255, 150, 220, .9)) 26%, transparent 74%);
  box-shadow: inset 0 0 calc(12px * var(--lv-scale)) var(--c, rgba(255, 150, 220, .55));
  mix-blend-mode: screen; opacity: .4;
  animation: lvFlare calc(var(--dur, 3.6) * 1s) ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}

/* ⑯ 阳光光柱(RE0-004 贝蒂·左上角洒下的阳光, 用户口径 2026-10-26 第五轮)
      一根光柱 = 一条从锚点斜着射出的长条: 沿长度方向淡出(linear-gradient), 上下用遮罩收软,
      所以看不出"一根棒子", 只看到一道光。四道长度/角度/粗细/周期全错开, 亮暗各走各的相位。
      transform-origin 在锚点 → 只旋转, 不位移卡图; keyframes 里连角度一起写(transform 会被覆盖)。 */
.lv-sun {
  left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: calc(var(--w) * 1%); height: calc(var(--h, 24) * 1px * var(--lv-scale));
  transform-origin: 0 50%;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--c, rgba(255, 246, 214, .6)), rgba(255, 244, 210, 0) 86%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 42% 58%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 42% 58%, transparent);
  mix-blend-mode: screen; opacity: 0;
  animation: lvSunBeam calc(var(--dur, 12) * 1s) ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}

/* ⑰ 玻璃反光(RE0-025 弗雷德莉卡·窗边): 一道硬反光 + 一条冷色暗缝 + 一道柔反光斜着扫过全卡。
      与 .lv-sweep 的区别是"边缘硬、带冷色", 扫过去像隔着一层玻璃; skewX 让它不平行于卡边。 */
.lv-glass {
  inset: -16% -70%;
  background: linear-gradient(102deg,
    transparent 32%, rgba(255, 255, 255, .46) 40%,
    rgba(255, 255, 255, .04) 43.5%, rgba(150, 205, 255, .34) 45.5%,
    transparent 48%, rgba(255, 255, 255, .30) 55%, transparent 63%);
  opacity: 0; mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(180deg, #000 0 50%, transparent 65%);
  mask-image: linear-gradient(180deg, #000 0 50%, transparent 65%);
  animation: lvGlassSweep calc(var(--dur, 10) * 1s) cubic-bezier(.35, 0, .5, 1) infinite;
  animation-delay: calc(var(--d, 0) * 1s);
  will-change: transform, opacity;
}
.lv-glass.rev { animation-direction: reverse; }

/* ⑱ 彩虹光带(RE0-031 由里乌斯·棱镜剑): 七色斜带铺满全卡, 极慢地左右来回 + 轻微摇摆,
      两层反向错开 → 颜色一直在卡面上"流", 不是一条静止的彩虹贴纸。 */
.lv-rainbow {
  inset: -14% -60%;
  background: linear-gradient(100deg,
    rgba(255, 96, 140, 0) 6%, rgba(255, 96, 140, .40) 17%,
    rgba(255, 190, 80, .40) 29%, rgba(250, 255, 130, .38) 39%,
    rgba(120, 255, 190, .40) 51%, rgba(110, 188, 255, .42) 63%,
    rgba(186, 128, 255, .40) 75%, rgba(255, 120, 220, 0) 86%);
  background-size: 200% 100%;
  opacity: .5; mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(180deg, #000 0 48%, transparent 63%);
  mask-image: linear-gradient(180deg, #000 0 48%, transparent 63%);
  animation: lvRainbowFlow calc(var(--dur, 14) * 1s) ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * 1s);
  will-change: transform, opacity;
}
.lv-rainbow.rev { animation-direction: reverse; }

/* ⑲ 全幅呼吸彩光(2026-10-26 第五轮「更浮夸」的底座): 跟着卡面主色的一层柔光, 缓慢明灭。
      只叠光、不复制卡图, 所以人物/文字/边框都不会动。 */
.lv-aura {
  inset: -10% -6%;
  background:
    radial-gradient(64% 52% at 50% 30%, var(--g1, rgba(198, 158, 255, .5)), transparent 72%),
    radial-gradient(46% 38% at 22% 52%, var(--g2, rgba(152, 112, 240, .42)), transparent 76%);
  filter: blur(calc(2px * var(--lv-scale)));
  opacity: .3; mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(180deg, #000 0 52%, transparent 66%);
  mask-image: linear-gradient(180deg, #000 0 52%, transparent 66%);
  animation: lvAura calc(var(--dur, 8) * 1s) ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * 1s);
}

/* 反方向的扫光: 让画面是"交错流光"而不是"定时亮一下" */
.lv-sweep.rev { animation-direction: reverse; }

/* 宽剑气(RE0-008): 同一条构造, 但整条是一片柔光而不是一条细线 —— 用来铺满整把剑的走向 */
.lv-blade.wide::before {
  width: 46%;
  background: linear-gradient(90deg, transparent, rgba(150, 230, 255, .30) 24%,
                              rgba(226, 251, 255, .52) 50%, rgba(150, 230, 255, .30) 76%, transparent);
  filter: none;
}

/* 动效闪卡的扫光比普通闪卡更勤一点(2.8s → 1.9s), 才配得上"一直在动"的画面 */
.card-thumb.foil-live .ct-face::after,
#card-zoom .zoom-face.foil-live::after { animation-duration: 1.9s; }

/* 紫雾上流: 从卡底升到卡顶, 起落都收得很快, 中途保持八成亮度 */
@keyframes lvRise {
  0%   { transform: translate3d(0, 24%, 0) scale(.72, .55); opacity: 0; }
  18%  { opacity: 1; }
  72%  { opacity: .78; }
  100% { transform: translate3d(0, -128%, 0) scale(1.06, 1.15); opacity: 0; }
}
/* 宝石: 缩一点暗下去 → 涨回来最亮 */
@keyframes lvGemPulse {
  0%, 100% { opacity: .42; transform: scale(.86); }
  50%      { opacity: 1;   transform: scale(1.1); }
}
/* 烟花: 7% 处一次爆亮(同时光环向外扩), 之后迅速回落, 大部分时间只是余烬 */
@keyframes lvBloomFlash {
  0%   { opacity: .16; transform: scale(.82); }
  7%   { opacity: 1;   transform: scale(1.12); }
  16%  { opacity: .6;  transform: scale(1.02); }
  34%  { opacity: .3;  transform: scale(.94); }
  100% { opacity: .16; transform: scale(.82); }
}
@keyframes lvBloomRing {
  0%   { opacity: 0;   transform: scale(.3); }
  7%   { opacity: .5; }
  40%  { opacity: 0;   transform: scale(1.9); }
  100% { opacity: 0;   transform: scale(1.9); }
}
/* 水面白沫: 起手快、扩到一半就开始散, 别抢水珠的戏 */
@keyframes lvFoam {
  0%   { opacity: 0;   transform: scale(.28); }
  12%  { opacity: .9; }
  55%  { opacity: 0;   transform: scale(1.25); }
  100% { opacity: 0;   transform: scale(1.25); }
}
/* 水珠: 斜上抛 → 顶点 → 略带拖尾地落回 */
@keyframes lvDrop {
  0%   { transform: translate3d(0, 0, 0) scale(.5); opacity: 0; }
  14%  { transform: translate3d(calc(var(--dx, -3) * 45%), calc(var(--up, -4) * 70%), 0) scale(1.05); opacity: 1; }
  46%  { transform: translate3d(calc(var(--dx, -3) * 100%), calc(var(--up, -4) * 100%), 0) scale(1); opacity: 1; }
  82%  { transform: translate3d(calc(var(--dx, -3) * 130%), calc(var(--up, -4) * -8%), 0) scale(.85); opacity: .55; }
  100% { transform: translate3d(calc(var(--dx, -3) * 135%), 0, 0) scale(.7); opacity: 0; }
}
@keyframes lvBubble {
  0%   { transform: translate3d(0, 0, 0) scale(.6); opacity: 0; }
  12%  { opacity: .9; }
  50%  { transform: translate3d(calc(var(--sway, .5) * 100%), calc(var(--up, 6) * -50%), 0) scale(.95); }
  88%  { opacity: .5; }
  100% { transform: translate3d(0, calc(var(--up, 6) * -100%), 0) scale(1.15); opacity: 0; }
}
@keyframes lvOrbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
/* 流光/剑气: 一小段亮光从起点掠到终点, 两端都留空, 才有"一下一下往外走"的节奏 */
@keyframes lvStreak {
  0%   { transform: translateX(-110%); opacity: 0; }
  18%  { opacity: 1; }
  82%  { opacity: 1; }
  100% { transform: translateX(230%); opacity: 0; }
}
@keyframes lvOrbPulse {
  0%, 100% { opacity: .68; transform: scale(.94); }
  50%      { opacity: 1;   transform: scale(1.06); }
}
@keyframes lvSparkFloat {
  0%   { transform: translate3d(0, 0, 0); }
  50%  { transform: translate3d(22%, calc(var(--rise, -1.2) * 100%), 0); }
  100% { transform: translate3d(0, 0, 0); }
}
@keyframes lvSparkTwinkle {
  0%, 100% { opacity: .45; }
  45%      { opacity: 1; }
}
@keyframes lvRim {
  0%, 100% { opacity: .55; }
  50%      { opacity: .85; }
}
/* 背景雾团: 四个关键点绕一圈(不是来回摆), 位移 ±2% + 微旋转, 所以永远看不出"回到起点" */
@keyframes lvBgDrift {
  0%   { transform: translate3d(-1.8%, 1.2%, 0) scale(1.02) rotate(-1.2deg); }
  26%  { transform: translate3d(1.4%, -0.9%, 0) scale(1.05) rotate(0.8deg); }
  52%  { transform: translate3d(1.9%, 1.4%, 0) scale(1.02) rotate(1.4deg); }
  76%  { transform: translate3d(-1.2%, -1.5%, 0) scale(1.05) rotate(-0.6deg); }
  100% { transform: translate3d(-1.8%, 1.2%, 0) scale(1.02) rotate(-1.2deg); }
}
/* 淡光扫过: 34% 前从左侧进, 72% 已经出画面, 剩下三成周期留白 —— 十几秒才亮一次 */
@keyframes lvSweep {
  0%   { transform: translate3d(-34%, 0, 0); opacity: 0; }
  14%  { opacity: .55; }
  44%  { opacity: .34; }
  72%  { transform: translate3d(34%, 0, 0); opacity: 0; }
  100% { transform: translate3d(34%, 0, 0); opacity: 0; }
}
/* 波纹横移: 一个完整周期(18% 自身宽) → 无缝循环 */
@keyframes lvWaveFlow {
  from { transform: translate3d(-9%, 0, 0); }
  to   { transform: translate3d(9%, 0, 0); }
}
/* 区域高亮: 最暗 .34(不归零, 所以是呼吸不是频闪), 两个亮度峰才像"连续在燃" */
@keyframes lvFlare {
  0%, 100% { opacity: .34; transform: scale(.93); }
  38%      { opacity: .92; transform: scale(1.05); }
  58%      { opacity: .58; transform: scale(1); }
  78%      { opacity: .8;  transform: scale(1.03); }
}
/* 阳光光柱: 一点点变亮/变宽, 再慢慢收回去 —— 全程带旋转角(transform 会覆盖, 必须一起写) */
@keyframes lvSunBeam {
  0%, 100% { opacity: .2;  transform: rotate(calc(var(--rot, 40) * 1deg)) scaleY(.9); }
  45%      { opacity: .72; transform: rotate(calc(var(--rot, 40) * 1deg)) scaleY(1.06); }
  62%      { opacity: .5;  transform: rotate(calc(var(--rot, 40) * 1deg)) scaleY(1.01); }
}
/* 玻璃反光: 从左边进来, 扫过再出画面, 末尾留白(不然就成了"一直在闪") */
@keyframes lvGlassSweep {
  0%   { transform: translate3d(-42%, 0, 0) skewX(-7deg); opacity: 0; }
  16%  { opacity: .85; }
  46%  { opacity: .6; }
  74%  { transform: translate3d(42%, 0, 0) skewX(-7deg); opacity: 0; }
  100% { transform: translate3d(42%, 0, 0) skewX(-7deg); opacity: 0; }
}
/* 彩虹: 缓慢来回摆 + 轻微倾斜, 两头都留着光(彩虹本来就一直在) */
@keyframes lvRainbowFlow {
  0%, 100% { transform: translate3d(-16%, 0, 0) rotate(-7deg) scale(1.04); opacity: .38; }
  50%      { transform: translate3d(16%, 0, 0) rotate(7deg) scale(1.08);  opacity: .74; }
}
/* 全幅呼吸彩光: 只动透明度(位移交给雾团, 免得整张卡"呼吸"成一团) */
@keyframes lvAura {
  0%, 100% { opacity: .2; }
  46%      { opacity: .52; }
  70%      { opacity: .34; }
}
/* ---------- 轻量动效档(移动端) ----------
   触发: ui.js 的 _fxLite() 为真时给 .lv-wrap 打 data-fx="lite"(触屏设备或视口 ≤900,
   但 #card-zoom 大图预览始终给全量)。
   起因(2026-10-26 用户报障「手机端登场闪卡动画会卡顿」): iPhone 横屏 844×390 @3x 下,
   手牌 6 + 我方应援 4 + 对手 2 共 11 张动效卡 → 325 个图层元素 / 477 个动画 /
   22 处全卡面高斯模糊 / 229 个混合层, 稳定帧率只有 43fps(23 次掉帧, p95 37.7ms)。
   卡的实际尺寸却只有 53×72 ~ 92×127 px —— 在这个尺寸上付"大图动效"的合成成本几乎全是浪费。

   ① 去掉 .lv-bg / .lv-aura 的 filter:blur —— 22 处高斯模糊就是这里来的。
      每帧都要把整张卡离屏光栅化再模糊一遍, 而 radial-gradient 本身已经是
      「中心亮 → 边缘全透明」的平滑过渡, 3px/2px 的模糊在 53~92px 的卡上肉眼看不出来。
      这是本轮收益最大、观感损失最小的一刀。
   ② 去掉常驻 will-change —— transform/opacity 动画本来就会被提升成合成层,
      常驻声明只是让十几张卡各自多占一份显存, 手机上容易触发合成层回收抖动。 */
.lv-wrap[data-fx="lite"] .lv-bg,
.lv-wrap[data-fx="lite"] .lv-aura { filter: none; }
.lv-wrap[data-fx="lite"] .lv-bg,
.lv-wrap[data-fx="lite"] .lv-sweep { will-change: auto; }

@media (prefers-reduced-motion: reduce) {
  .lv-spark { opacity: .5; }
  .lv-wrap i, .lv-wrap i::before, .lv-wrap i::after { animation: none !important; }
  /* 不出动画时, 水珠/气泡只会是几个静止的小点, 不如不给 */
  .lv-drop, .lv-bubble, .lv-gust, .lv-blade { display: none; }
  .lv-rise, .lv-gem, .lv-bloom, .lv-orb, .lv-swirl { opacity: .35; }
  .lv-rim { opacity: .45; }
  /* 新加的两层: 不动时"扫光/波光"没有任何意义, 直接收掉;
     雾团留一层很淡的底光(它本身是静态色块, 不动也好看), 区域高亮同理 */
  .lv-sweep, .lv-wave, .lv-glass, .lv-rainbow { display: none; }
  .lv-bg { opacity: .3; }
  .lv-flare { opacity: .3; }
  /* 光柱/彩光: 不动时留一份很淡的静态底光, 画面仍然"暖/亮", 但完全静止 */
  .lv-sun { opacity: .28; }
  .lv-aura { opacity: .26; }
}

/* ---------- 商店 ---------- */
.shop-modal .modal-box { max-width: 1060px; }
.shop { display: flex; flex-direction: column; gap: 12px; min-height: 320px; }
.shop-loading { padding: 60px 0; text-align: center; color: var(--muted); }
.shop-top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(212,175,55,.14), rgba(212,175,55,.04));
  border: 1px solid rgba(212,175,55,.35); border-radius: var(--radius); padding: 12px 14px;
}
.shop-wallet { display: flex; align-items: baseline; gap: 6px; }
.shop-wallet .sw-coin { font-size: 22px; }
.shop-wallet b { font-size: 26px; color: #b8860b; letter-spacing: .5px; }
.shop-wallet .sw-unit { font-size: 12px; color: var(--muted); }
.shop-rules { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.shop-rules b { color: #b8860b; }
.shop-top .btn { margin-left: auto; }
.shop-filter { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.shop-filter select, .shop-filter input {
  padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--ink);
}
.shop-filter select { max-width: 230px; }
.shop-filter input { flex: 1; min-width: 160px; }
.shop-count { font-size: 12px; color: var(--muted); }
.shop-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px; max-height: 56vh; overflow-y: auto; padding: 4px;
}
.shop-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 7px; display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.shop-card.owned { border-color: #d4af37; box-shadow: 0 0 0 1px rgba(212,175,55,.35) inset; }
.shop-card .sc-img { width: 100%; cursor: zoom-in; }
.shop-card .sc-img .card-thumb { width: 100%; }
.shop-card .sc-name {
  font-size: 12px; text-align: center; line-height: 1.25; height: 2.5em; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.shop-card .sc-btn { font-size: 12px; padding: 5px 8px; width: 100%; }
.shop-card .sc-btn.done { background: linear-gradient(135deg, #d4af37, #8a6d1d); color: #fff; border: none; }
.shop-card .sc-btn.poor { opacity: .55; }
.shop-pager { display: flex; align-items: center; justify-content: center; gap: 10px; }
.shop-pager .btn.sm { font-size: 12px; padding: 4px 10px; }
.shop-pageinfo { font-size: 12px; color: var(--muted); }
.shop-hint { font-size: 12px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 8px; }
.shop-hint b { color: var(--accent); }
.shop-login { text-align: center; padding: 20px 0; line-height: 1.9; }
.sb-row { display: flex; gap: 14px; align-items: flex-start; }
.sb-img .card-thumb { width: 150px; }
.sb-info { display: flex; flex-direction: column; gap: 4px; }
.sb-price { margin: 6px 0; font-size: 15px; font-weight: 700; color: #b8860b; }
.zi-id { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 6px; }

/* 商店入口按钮上的余额 */
.shop-entry .shop-coins { font-size: 12px; opacity: .85; margin-left: 4px; }

/* 结束页货币提示 */
/* ---------- 对局结束结算页 ---------- */
/* 沿用全局视觉: 浅色面板 + 强调红 + 金色点缀(与掷骰/大厅同语言); 移动端自动切深色 */
.go-overlay .modal-box {
  max-width: 440px; overflow: hidden; position: relative;
  --gp-panel: #faf7f1;
}
.go-overlay .modal-title {
  text-align: center; color: var(--muted);
  font-size: 12px; letter-spacing: 4px; padding-bottom: 2px;
}
.go-wrap { text-align: center; padding: 2px 0 12px; }
.go-trophy { font-size: 56px; line-height: 1.15; animation: goPop .65s cubic-bezier(.2,1.4,.4,1) both; }
.go-win .go-trophy { filter: drop-shadow(0 5px 16px rgba(212,175,55,.5)); }
.go-lose .go-trophy { filter: grayscale(.75); opacity: .8; }
@keyframes goPop {
  0% { transform: scale(.25) rotate(-12deg); opacity: 0; }
  70% { transform: scale(1.1) rotate(2deg); }
  100% { transform: scale(1); opacity: 1; }
}
.go-title { font-size: 28px; font-weight: 800; letter-spacing: 6px; text-indent: 6px; margin-top: 6px; }
.go-win .go-title { color: var(--accent); }
.go-lose .go-title { color: var(--blue); }
.go-sub { color: var(--muted); font-size: 13px; margin-top: 5px; }
.go-score { display: flex; align-items: stretch; justify-content: center; gap: 10px; margin: 14px 0 4px; }
.go-player {
  position: relative; flex: 1; max-width: 150px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 10px 8px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--gp-panel);
}
.go-player .gp-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.go-player .gp-life { font-size: 11.5px; color: var(--muted); }
.go-player .gp-crown {
  position: absolute; top: -10px; right: -6px; font-size: 17px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
}
/* 胜者卡: 金边 + 金色微光, 与「不会被破坏」/首胜按钮的金色一致 */
.go-player.winner {
  border-color: rgba(212,175,55,.75);
  background: linear-gradient(180deg, rgba(212,175,55,.16), rgba(212,175,55,.05)), var(--gp-panel);
  box-shadow: 0 0 0 2px rgba(212,175,55,.22), 0 3px 10px rgba(180,140,30,.14);
}
.go-vs { align-self: center; font-weight: 800; color: var(--muted); letter-spacing: 1px; }
.go-hint { margin-top: 8px; }
.go-actions { display: flex; gap: 6px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
/* 四个按钮必须挤在一行里(换行会把「反馈」孤零零甩到第二排)。
   换位后「返回主页」带了 min-width:108, 原来那套 14px 内边距就刚好顶破 404px 的弹窗宽度。 */
.go-actions .btn { padding: 8px 12px; }
.go-actions .btn.primary { min-width: 108px; }
/* 结算页的「返回主页 / 离开房间」用**对局里那档橙色**(#e8a33d, 见 .battle-screen 的 --accent)。
   训练员 2026-11-02「返回主页用橙色按钮」: 亮色主题的 --accent 是砖红 #c8553d, 摆在结算页上
   看不出是"橙色", 而战斗界面里的主色一直是这颗橙。⚠ 要连 html.is-mobile 一起写 ——
   移动端那条 `html.is-mobile .btn.primary` 是 0,3,1, 单靠 .go-actions 的 0,3,0 压不住。 */
.go-actions .btn.go-home,
html.is-mobile .go-actions .btn.go-home {
  background: #e8a33d; border-color: #c9862b; color: #241a08; font-weight: 700;
}
.go-actions .btn.go-home:hover:not(:disabled),
html.is-mobile .go-actions .btn.go-home:hover:not(:disabled) { background: #f0ae46; border-color: #c9862b; }
/* 管理员专用的一行(2026-11-02「左右互搏结算页上传对局数据」)。
   只对管理员账号渲染 → 普通玩家看到的结算页与之前完全一致。
   单独一行是为了不破坏上面「四颗按钮压一行」—— 加第五颗必定换行。 */
.go-admin {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border);
}
/* 颜色走主题变量: 结算弹窗在桌面是浅底、手机横屏是深底, 写死 #8a7f6f 在深底上几乎看不见 */
.go-admin .ga-cap { font-size: 11px; color: var(--muted); letter-spacing: .5px; }
.go-admin .btn.mini { font-size: 12px; padding: 5px 10px; }
/* 传完的完成态: 绿框 + 不可点, 一眼看出「这场已经传上去了」 */
.go-admin .btn.mini.done,
.go-admin .btn.mini.done:disabled { border-color: #3a8f5d; color: #2f7d52; background: #eef7f0; opacity: 1; }
/* 终局数据条(剩余卡组 / 回合数 / 用时): 结算页一眼看清这场是怎么结束的 */
.go-stats { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.go-stat {
  min-width: 92px; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--gp-panel);
}
.go-stat .gs-cap { display: block; font-size: 11px; color: var(--muted); }
.go-stat .gs-val { font-size: 14px; font-weight: 800; letter-spacing: .5px; }
.go-tip { margin-top: 8px; font-size: 12px; color: var(--muted); }
/* 终局只读视图的浮动出口: 客机/观战者的战场由 Net 的 remote-view 画, 操作栏不归 Battle 管 */
.over-view-bar {
  /* 客机/观战者的终局出口: 必须压在顶栏 HUD 之下留出空隙, 并且 z-index 要高过战场上的
     任何悬浮件 —— 训练员 2026-10-28: 「点完返回战场后仍能退出」, 被盖住就等于出不去。 */
  position: fixed; left: 50%; top: 44px; transform: translateX(-50%); z-index: 95;
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px;
  background: var(--gp-panel); border: 1px solid var(--border); box-shadow: 0 6px 20px rgba(0,0,0,.28);
}
.over-view-bar .ovb-tip { font-size: 12px; color: var(--muted); white-space: nowrap; }
.over-view-bar .btn { padding: 4px 10px; font-size: 12px; }
/* 胜利彩带: 撒完即止, 不循环打扰 */
.go-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
.go-confetti i {
  position: absolute; top: -14px; width: 8px; height: 13px; border-radius: 2px; opacity: 0;
  animation: goFall 2.8s linear forwards;
}
@keyframes goFall {
  0% { transform: translateY(-16px) rotate(0deg); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(430px) rotate(560deg); opacity: 0; }
}
.go-reward { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 10px 0 2px; min-height: 26px; flex-wrap: wrap; }
.go-reward .gr-coin {
  font-size: 14px; font-weight: 800; color: #6b4e00;
  background: linear-gradient(135deg, #f4dd8d, #d4af37);
  border-radius: 999px; padding: 3px 14px;
  box-shadow: 0 1px 4px rgba(180,140,30,.35);
}
.go-reward .gr-bonus { font-size: 12px; color: #a07b1c; }
.go-reward .gr-none { font-size: 12px; color: var(--muted); }
html.is-mobile .go-overlay .modal-box { --gp-panel: #182338; }
html.is-mobile .go-reward .gr-bonus { color: #d8b74a; }
@media (prefers-reduced-motion: reduce) {
  .go-trophy { animation: none; }
  .go-confetti { display: none; }
}

/* ============================================================
   Bug 反馈(对局内提交) + 后台列表
   ============================================================ */
.bug-modal .modal-box { max-width: 520px; }
.bug-form { display: flex; flex-direction: column; gap: 10px; }
.bug-types { display: flex; flex-wrap: wrap; gap: 6px; }
.bug-chip {
  padding: 5px 12px; font-size: 12.5px; line-height: 1.4;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--panel); color: var(--muted);
  transition: all .15s ease;
}
.bug-chip:hover { border-color: var(--muted); color: var(--ink); }
.bug-chip.on {
  background: var(--accent); border-color: var(--accent);
  color: #fff; font-weight: 700;
  box-shadow: 0 2px 8px rgba(200, 85, 61, .28);
}
.bug-text {
  width: 100%; min-height: 104px; resize: vertical;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg); color: var(--ink);
  font-family: inherit; font-size: 14px; line-height: 1.65;
}
.bug-text:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 85, 61, .12);
}
.bug-text::placeholder { color: var(--muted); opacity: .85; }
.bug-snap-row {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--ink); cursor: pointer; user-select: none;
}
.bug-snap-row input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.bug-snap-row em {
  display: block; font-style: normal; font-size: 11.5px;
  color: var(--muted); margin-top: 2px;
}
.bug-snap-info {
  font-size: 12px; color: var(--muted); line-height: 1.55;
  background: var(--bg); border: 1px dashed var(--border);
  border-radius: 8px; padding: 7px 10px;
}
.bug-foot { display: flex; align-items: center; gap: 10px; }
.bug-hint { font-size: 12px; color: var(--muted); }
.bug-hint.err { color: var(--danger); font-weight: 700; }
.bug-foot .btn.primary { margin-left: auto; min-width: 106px; }

/* 顶栏/悬浮球入口: 与对局日志、效果助手保持同一层级 */
.bug-btn { white-space: nowrap; }
.fab.bug { color: #ffd28a; }

/* ---------- 后台 bug 列表页 ---------- */
.admin-wrap { max-width: 1080px; margin: 0 auto; padding: 22px 18px 60px; }
.admin-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.admin-head h1 { font-size: 21px; letter-spacing: 1px; }
.admin-sub { color: var(--muted); font-size: 13px; }
.admin-gate {
  margin-top: 18px; padding: 22px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--panel);
}
.admin-gate p { color: var(--muted); font-size: 13px; margin-bottom: 10px; line-height: 1.7; }
.admin-gate .row { display: flex; gap: 8px; }
.admin-gate input {
  flex: 1; padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg); color: var(--ink);
  font-family: inherit; font-size: 14px;
}
.admin-stats { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 10px; }
.admin-stat {
  padding: 7px 14px; border-radius: 10px; background: var(--panel);
  border: 1px solid var(--border); font-size: 12.5px; color: var(--muted);
}
.admin-stat b { font-size: 17px; color: var(--ink); margin-right: 4px; }
.admin-stat.hot b { color: var(--accent); }
.admin-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.admin-tools input[type=search] {
  flex: 1; min-width: 160px; padding: 7px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--panel); color: var(--ink); font-family: inherit;
}
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-empty { padding: 48px 0; text-align: center; color: var(--muted); font-size: 14px; }
.bug-item {
  background: var(--panel); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: 10px; padding: 12px 14px;
}
.bug-item.fixed { border-left-color: var(--ok); opacity: .72; }
.bug-item.wontfix { border-left-color: var(--muted); opacity: .6; }
.bug-item .bi-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bug-tag {
  font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  background: rgba(200, 85, 61, .1); color: var(--accent-dark); border: 1px solid rgba(200, 85, 61, .22);
}
.bug-tag.t-net { background: rgba(61,126,166,.1); color: #2f6c8f; border-color: rgba(61,126,166,.25); }
.bug-tag.t-render { background: rgba(201,134,43,.12); color: #96631a; border-color: rgba(201,134,43,.28); }
.bug-tag.t-crash { background: rgba(179,58,58,.12); color: var(--danger); border-color: rgba(179,58,58,.28); }
.bug-tag.t-other { background: rgba(0,0,0,.05); color: var(--muted); border-color: var(--border); }
.bi-id { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: var(--muted); }
.bi-when { margin-left: auto; font-size: 12px; color: var(--muted); }
.bi-text { margin: 8px 0 6px; font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.bi-meta { font-size: 12px; color: var(--muted); line-height: 1.7; }
.bi-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.bi-actions .btn { padding: 5px 11px; font-size: 12.5px; }
.bi-actions .btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.bi-snap { margin-top: 9px; }
.bi-snap summary {
  cursor: pointer; font-size: 12.5px; color: var(--blue);
  list-style: none; user-select: none;
}
.bi-snap summary::-webkit-details-marker { display: none; }
.bi-snap summary::before { content: '▸ '; }
.bi-snap[open] summary::before { content: '▾ '; }
.bi-snap pre {
  margin-top: 6px; padding: 9px 11px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border);
  font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto;
}
.bi-note { margin-top: 8px; font-size: 12.5px; color: var(--ink); background: var(--bg); border-radius: 8px; padding: 6px 10px; }
@media (max-width: 700px) {
  .admin-wrap { padding: 14px 12px 40px; }
  .bi-when { margin-left: 0; width: 100%; }
  .bug-modal .modal-box { max-width: none; }
}

/* ---------- 好友 & 在线人数 ---------- */
.online-chip {
  font-size: 12px; color: var(--ok); background: #eef7f1;
  border: 1px solid #d3e8db; border-radius: 999px; padding: 3px 10px;
}
.online-chip:empty { display: none; }
.home-online {
  display: inline-block; margin-top: 10px; font-size: 13px; color: var(--ok);
  background: #eef7f1; border: 1px solid #d3e8db; border-radius: 999px; padding: 5px 14px;
}
/* 首页账号状态(单人模式也能登录) */
.home-account { margin-top: 8px; display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.home-account .ha-user { font-size: 13px; font-weight: 700; color: var(--ink); }
.home-account .ha-hint { font-size: 12px; color: var(--muted); }
.home-account .link-btn { font-size: 13px; }
/* 结算页: 游客提示 + 一键登录按钮 */
.go-reward .gr-login { font-size: 12px; padding: 4px 12px; height: auto; min-height: 0; }
.friend-card .sec-title { display: flex; align-items: center; gap: 6px; }
.fr-num { color: var(--muted); font-weight: normal; font-size: 13px; }
.fr-add { display: flex; gap: 8px; margin: 8px 0 10px; }
.fr-add input {
  flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 10px; font-size: 14px; font-family: inherit;
}
.fr-body { max-height: 190px; overflow-y: auto; }
.fr-list { display: flex; flex-direction: column; gap: 4px; }
.fr-item {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 6px; border-radius: 8px; font-size: 14px;
}
.fr-item:hover { background: #faf8f4; }
.fr-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #c9c4b8; }
.fr-dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(58,143,93,.15); }
.fr-dot.busy { background: var(--warn); }
.fr-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-state { font-size: 12px; color: var(--muted); flex: none; }
.fr-state.on { color: var(--ok); }
.fr-state.busy { color: var(--warn); }
.fr-reqs { margin-bottom: 8px; display: flex; flex-direction: column; gap: 4px; }
.fr-req {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: #fdf6ee; border: 1px solid #f0e0c8; border-radius: 8px; padding: 6px 8px; font-size: 13px;
}
.fr-req span { color: var(--muted); }
.fr-out { margin-top: 8px; font-size: 12px; color: var(--muted); }
.fr-out span { margin-right: 6px; }
.btn.mini { padding: 2px 8px; font-size: 12px; border-radius: 6px; }
.friend-invite-box p { margin-bottom: 8px; }
.fi-actions { display: flex; gap: 10px; margin-top: 14px; }
@media (max-width: 720px) {
  .fr-body { max-height: 150px; }
  .online-chip { font-size: 11px; padding: 2px 7px; }
}
.admin-stat-sep { width: 1px; align-self: stretch; background: var(--border); margin: 0 4px; }
.admin-stat.online b { color: var(--ok); }
.ask-note {
  grid-column: 1 / -1; font-size: 12px; color: var(--muted);
  background: #faf7f1; border: 1px dashed var(--border); border-radius: 8px;
  padding: 6px 10px; margin-bottom: 8px;
}

/* 领袖token计数徽章: 小屏缩小, 不挤领袖行 */
@media (max-width: 760px) {
  .ltok-badge { width: 44px; margin-left: 5px; }
}
@media (orientation: landscape) and (max-height: 560px) {
  .ltok-badge { width: 44px; margin-left: 5px; }
  .card-broken { font-size: 10px; padding: 0 5px; }
  .card-cig { font-size: 9.5px; padding: 0 5px; bottom: 20px; }
}

/* 首页「最近修复」弹窗 —— 颜色一律跟主题变量走(mobile 深色主题下 --ink 为浅色) */
/* 2026-10-31: 改成「列表自己滚 + 拉到底才放开查看更多」。
   ⚠ 滚动容器必须 overflow-y:auto + touch-action:pan-y(铁律 90: overflow:hidden 会吃掉手机上的滚动链) */
.changelog-wrap { display: flex; flex-direction: column; gap: 10px; min-width: 0; max-width: 560px; }
.changelog-scroll {
  max-height: min(58vh, 430px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  padding-right: 4px;
}
.changelog-list { display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.changelog-row { display: flex; gap: 10px; align-items: baseline; font-size: 14px; line-height: 1.5; }
.changelog-date { flex: 0 0 auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.changelog-text { color: var(--ink); }
.changelog-more { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.btn-changelog-more { width: 100%; }
.btn-changelog-more.is-locked { opacity: .45; cursor: default; }
.changelog-more-hint { min-height: 15px; text-align: center; font-size: 12px; color: var(--muted); }
@media (orientation: landscape) and (max-height: 560px) {
  .changelog-scroll { max-height: 46vh; }
  .changelog-row { font-size: 12.5px; }
}

/* ---------- 融合窗口（炒翻天 TNJ-01） ----------
   先选要做的料理 token → 这个窗口展示该配方的原料:
   废弃区已有的用正常卡面, 缺的压暗; 「小此木隆男拔1血」是窗内一个切换按钮;
   底部「融合」按钮能融合=绿 / 否则灰(disabled)。 */
.fuse-win { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fuse-desc { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.fuse-slots { display: flex; flex-wrap: wrap; gap: 12px 10px; justify-content: center; }
.fuse-slot { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 96px; }
.fuse-slot .card-thumb { width: 92px; }
.fuse-slot .card-thumb:hover { transform: none; }
.fuse-slot-cap { font-size: 11.5px; line-height: 1.35; text-align: center; color: var(--ink); word-break: break-all; }
.fuse-slot.fuse-missing .fuse-slot-cap { color: var(--muted); }
.fuse-slot.fuse-wild .fuse-slot-cap { color: var(--accent); font-weight: 700; }
/* 暗色卡面: 缺料 / 被拔血顶替的那格（压暗+去色，能看出是哪张卡但明显「不可用」） */
.fuse-dim { filter: grayscale(1) brightness(.45) contrast(1.1); opacity: .75; }
.fuse-dim img { box-shadow: none; }
/* 缺料角标: 「暗」还不够明确时, 右上角直接标一个「缺」字 */
.fuse-slot.fuse-missing .card-thumb::after {
  content: '缺'; position: absolute; right: -6px; top: -6px;
  background: #8a8578; color: #fff; font-size: 11px; line-height: 1;
  padding: 3px 5px; border-radius: 6px; font-weight: 700;
}
.fuse-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; align-items: center; }
.fuse-tnj04 { font-size: 12.5px; padding: 7px 12px; }
.fuse-tnj04 b { font-weight: 800; }
.fuse-tnj04.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.fuse-go { font-weight: 700; min-width: 132px; }
.fuse-go.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.fuse-go.ok:hover { filter: brightness(1.07); }
.fuse-go.no { background: #d9d4c8; color: #8a8578; border-color: #d9d4c8; cursor: not-allowed; opacity: 1; }
.fuse-go.no:hover { filter: none; }
@media (max-width: 760px) {
  .fuse-slot { width: 78px; }
  .fuse-slot .card-thumb { width: 74px; }
  .fuse-desc { font-size: 12px; }
}
@media (orientation: landscape) and (max-height: 560px) {
  .fuse-win { gap: 6px; }
  .fuse-slot { width: 66px; }
  .fuse-slot .card-thumb { width: 62px; }
  .fuse-desc { font-size: 11px; line-height: 1.45; }
  .fuse-acts { margin-top: 0; }
}

/* ---------- 联机前选卡组(好友邀请 / 再战共用) ---------- */
.pick-deck-modal .modal-box { max-width: 560px; width: min(94vw, 560px); }
.pick-deck .pd-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: min(52vh, 420px); overflow-y: auto;
  margin: 10px 0 2px; padding-right: 2px;
}
.pd-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  text-align: left; background: var(--panel);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 7px 10px; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.pd-item:hover { border-color: var(--muted); }
.pd-item.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(200, 85, 61, .16); background: #fffdfb; }
.pd-thumb { flex: 0 0 auto; display: flex; }
.pd-thumb .card-thumb { width: 42px; }
.pd-thumb .card-thumb:hover { transform: none; }
.pd-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pd-info b { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-info i { font-style: normal; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-check {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--border); color: transparent; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s, color .15s;
}
.pd-item.on .pd-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.pick-deck .modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
/* 「🎲 随机」靠左: 它是"换一套"，与右侧的确定/取消不是一类动作(训练员 2026-10-27) */
.pick-deck .modal-foot .rand-deck { margin-right: auto; }

/* ---------- 「按领袖缩略图挑卡组」选择器(大厅 / 左右互搏 / 再战 / 好友邀请共用) ----------
   训练员 2026-11-04: 以前这些地方只有下拉框，光看「卡组名（领袖:某某）」认不出是哪套牌。
   现在点「🖼 选择」把每套卡组的领袖卡铺成缩略图墙，看卡面点一下。 */
.dp-pick-modal .modal-box { max-width: 780px; width: min(96vw, 780px); }
.dp-pick .dp-hint { margin: 0 0 10px; line-height: 1.6; }
.dp-grid {
  display: flex; flex-wrap: wrap; gap: 14px 12px;
  max-height: min(56vh, 470px); overflow-y: auto;
  padding: 4px 4px 4px 2px;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.dp-item {
  position: relative; width: 120px; flex: 0 0 auto;
  display: flex; flex-direction: column; gap: 5px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 8px 9px; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.dp-item:hover { border-color: var(--muted); transform: translateY(-2px); }
.dp-item.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(200, 85, 61, .18); background: #fffdfb; }
.dp-art { display: flex; justify-content: center; }
/* 缩略图固定宽: 领袖卡图比例各不相同(有横置向的), 不锁宽会把一行撑得参差不齐 */
.dp-art .card-thumb { width: 100px; }
.dp-art .card-thumb:hover { transform: none; }
.dp-name {
  font-size: 12.5px; font-weight: 700; line-height: 1.35; text-align: center;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.dp-meta { font-size: 11.5px; color: var(--muted); text-align: center; }
.dp-meta.warn { color: #8a6116; font-weight: 600; }
.dp-noart {
  width: 100px; height: 70px; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--border); border-radius: 8px; color: var(--muted); font-size: 12px;
}
.dp-check {
  position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 12px;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}
.dp-item.on .dp-check { display: flex; }
.dp-pick .modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.dp-pick .modal-foot .rand-deck { margin-right: auto; }
@media (max-width: 640px) {
  .dp-item { width: 104px; padding: 7px 7px 8px; }
  .dp-art .card-thumb, .dp-noart { width: 86px; }
  .dp-noart { height: 60px; }
  .dp-grid { gap: 10px 8px; max-height: min(60vh, 520px); }
  .dp-name { font-size: 12px; }
}

/* ---------- 管理员: 玩家总览(仅管理员账号可见) ---------- */
.players-modal .modal-box { max-width: 620px; width: min(94vw, 620px); }
.players-box .pl-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 8px;
}
.pl-stat { font-size: 12.5px; color: var(--muted); }
.pl-stat b { color: var(--ink); font-size: 15px; margin-right: 2px; }
.pl-stat.on b { color: var(--ok); }
.pl-at { font-size: 12px; color: var(--muted); }
.players-box .pl-list { max-height: min(56vh, 460px); overflow-y: auto; padding-right: 2px; }
.pl-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 4px; border-bottom: 1px dashed var(--border);
  font-size: 13.5px;
}
.pl-row:last-child { border-bottom: none; }
.pl-dot { width: 8px; height: 8px; border-radius: 50%; background: #bfbab0; flex: 0 0 auto; }
.pl-dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(58, 143, 93, .16); }
.pl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pl-row.off .pl-name { color: var(--muted); font-weight: 500; }
.pl-tag { flex: 0 0 auto; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: #efece4; color: var(--muted); }
.pl-tag.on { background: rgba(58, 143, 93, .12); color: var(--ok); }
.pl-tag.busy { background: rgba(61, 126, 166, .12); color: var(--blue); }
.pl-when { flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.pl-row.off .pl-when { color: #aaa59b; }
.pl-sec { font-size: 12px; color: var(--muted); margin: 10px 0 2px; }
/* 「左右互搏上传的对局」区段: 独立滚动, 不跟玩家名单抢高度 */
.players-box .pl-uploads { margin-top: 10px; padding-top: 6px; border-top: 1px solid var(--border); max-height: min(30vh, 230px); overflow-y: auto; }
.players-box .pl-uploads .pl-row:first-of-type { border-top: 1px dashed var(--border); }
.players-box .pl-dl { flex: 0 0 auto; }

/* ---------- 开局「手牌调度」弹窗: 平板上一进就卡住滚不动 ---------- */
/* 症状(用户报障 2026-10-26, iPad): 调度弹窗刚出来那几秒怎么拉都拉不动。
   两个原因叠加:
     ① .hand-preview 用 flex-wrap, 起手 6~7 张时换行把 .modal-body 撑高,
        超出 88vh 后需要纵向滚动 —— iOS 上「display:none → flex」的容器首次滚动
        要等一次真实重排才生效, 表现就是"前几秒拉不动";
     ② iPad 的触摸滚动块在纵向溢出容器里会先被弹窗接管。
   治本: 手牌区改成「一行 + 横向滑动」, 不再撑高弹窗, 也就不需要下拉了。 */
.modal-body .hand-preview {
  display: flex; flex-wrap: nowrap;
  gap: 8px; justify-content: flex-start;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  padding: 2px 2px 8px;
  scroll-snap-type: x proximity;
}
.modal-body .hand-preview .card-thumb {
  flex: 0 0 auto;
  width: 96px;
  scroll-snap-align: start;
}
/* 开局「手牌调度」弹窗: 「点卡面看详情」的说明 + 卡面可点的视觉提示。
   训练员 2026-11-18:「初始的手牌调度阶段要可以查看卡牌详情」—— 三种手势(点/长按/右键)
   现在都开同一份详情(见 UI.mulliganHand), 这里负责让人**看得出**那张卡是能点的。 */
.hand-preview-tip { font-size: 12px; color: var(--muted); margin: 2px 0 4px; line-height: 1.5; }
.hand-preview .mulligan-card { cursor: zoom-in; }
.hand-preview .mulligan-card:hover { box-shadow: 0 0 0 2px var(--accent); border-radius: 8px; }
.modal-box .modal-body {
  /* iOS/iPadOS: 让首个触摸就能滚(不加这三行时, 有的版本要等一帧重排) */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
@media (max-width: 1024px) {
  .modal-body .hand-preview .card-thumb { width: 84px; }
}

/* ---------- 新手教程 ---------- */
.tut-entry { border-color: var(--warn); color: var(--warn); }
.tut-progress { font-size: 12px; font-weight: 400; color: var(--muted); }

.tut-home { max-width: 880px; margin: 0 auto; padding: 10px 14px 44px; }
.tut-hero {
  background: linear-gradient(135deg, #fff8e9, #fdf0e2);
  border: 1px solid #ecdcbb; border-radius: var(--radius);
  padding: 16px 18px; margin: 12px 0 14px;
}
.tut-hero-t { font-size: 19px; font-weight: 700; letter-spacing: .5px; }
.tut-hero-s { margin-top: 4px; color: #7d6c53; font-size: 13px; line-height: 1.6; }
.tut-levels { display: flex; flex-direction: column; gap: 10px; }
.tut-lv {
  display: flex; align-items: center; gap: 12px; width: 100%;
  text-align: left; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; color: var(--ink);
  transition: border-color .15s, transform .15s;
}
.tut-lv:hover { border-color: var(--accent); transform: translateY(-1px); }
.tut-lv-no {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.tut-lv.is-done .tut-lv-no { background: var(--ok); }
.tut-lv-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.tut-lv-body b { font-size: 14px; }
.tut-lv-body span { color: var(--muted); font-size: 12px; }
.tut-lv-go { flex: 0 0 auto; color: var(--blue); font-size: 13px; }
.tut-foot { margin-top: 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 战斗中的教程提示条: 屏幕顶部的**浮层**, 默认只留一行(关卡 + 步骤 + 「明白了」+ 「说明」),
   点「说明」才展开全文。桌面与手机同一档 —— 桌面照搬手机横屏那版(训练员 2026-10-29 口径)。
   为什么不能放在中间栏里: 实测这条整块展开要 141px, 而 .battle-center 只有 ~195px,
   会把「回合条 + 提示 + 操作按钮」整排挤没(action-bar 一个可见按钮都没有),
   玩家连「结束回合」都点不到。脱离布局 = 谁都不挤。 */
.tut-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 96;
  max-width: 720px; margin: 0 auto;
  padding: 2px 10px 3px; border-radius: 0 0 10px 10px;
  background: #fff8e6; border: 1px solid #e8d6a6; border-top: none;
  color: var(--ink); font-size: 12.5px; line-height: 1.4;
  box-shadow: 0 3px 10px rgba(0,0,0,.12);
  max-height: 29px; overflow: hidden;
}
.tut-bar.is-done { background: #eaf6ee; border-color: #b9dcc5; }
.tut-head { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.tut-head .tut-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34vw; }
.tut-tag {
  background: var(--warn); color: #fff; border-radius: 999px;
  padding: 0 8px; font-size: 10.5px; letter-spacing: .5px; white-space: nowrap;
}
.tut-step {
  display: inline-block; background: #fff; border: 1px solid #e8d6a6; color: #8a6d2f;
  border-radius: 999px; padding: 0 7px; font-size: 10.5px; font-weight: 700; white-space: nowrap;
}
.tut-fold { display: inline-block; white-space: nowrap; }
/* 「任务：…」那一行已按训练员 2026-11-06 要求去掉，展开区第一行直接是步骤说明 → 补一点与标题的间距 */
.tut-note { margin-top: 5px; color: #6f6552; }
.tut-note.ok { color: var(--ok); font-weight: 600; }
.tut-full { display: none; }
.tut-bar.open {
  max-height: 62vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding-bottom: 6px;
}
.tut-bar.open .tut-full { display: block; }
/* 说明步的「明白了 ▶」: 必须小而醒目 —— 手机横屏这条是顶部单行浮层(24px),
   按钮要是跟着长文字一起收进展开区, 玩家就卡在这一步出不去了。 */
.tut-ack { font-size: 11.5px; padding: 1px 9px; line-height: 1.45; border-radius: 999px; white-space: nowrap; }
/* 开局强制调度弹窗 */
.tut-rd-lead { margin: 0 0 6px; font-size: 14px; line-height: 1.65; }
.tut-rd-note {
  margin: 0 0 10px; padding: 7px 10px; border-radius: 8px;
  background: #fff8e6; border: 1px solid #e8d6a6; color: #7a6330;
  font-size: 12px; line-height: 1.6;
}
.tut-rd-acts { margin-top: 12px; display: flex; justify-content: center; gap: 8px; }
.tut-bar-acts { margin-top: 6px; display: flex; gap: 12px; }
.tut-acts { margin-top: 6px; display: flex; gap: 8px; }

/* 教程结果页 */
.tut-result {
  margin: 40px auto; max-width: 460px; text-align: center;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 22px 22px;
}
.tut-result.ok { border-color: #b9dcc5; }
.tut-result-ico { font-size: 44px; line-height: 1; }
.tut-result-t { margin-top: 10px; font-size: 20px; font-weight: 700; }
.tut-result-s { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.tut-result-acts { margin-top: 18px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

@media (max-height: 620px), (max-width: 760px) and (hover: none) {
  /* ---------- 教程提示条: 手机改成**屏幕顶部浮层** ---------- */
  /* 症状(训练员 2026-10-29): 教程第 2 关「中间这个条拖不动, 进行不了攻击」。
     实测(960x516): 这条占 87px, 中间栏总共只有 165px, 于是
       教程条 87 + 回合条 20 + 提示栏 44 + 操作按钮排 **2** —— 按钮全被压没了;
     而 .battle-center 那时是 overflow:hidden, 手指按在这条上往下拖会被它吃掉,
     战场滚不动 → 玩家既看不见也点不到下面要横置的应援卡。
     治本: 这条脱离战场布局, 固定在屏幕最上方, 默认只留一行, 点「说明」才展开。
     断点取 620px: 横屏手机多为 390~440 高, 平板横屏 516~600, 都要吃这套;
     桌面(≥700 高)那条本来就放得下, 不折叠。 */
  .tut-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 96;
    max-width: none; margin: 0; padding: 1px 10px; border-radius: 0 0 10px 10px;
    border: none; border-bottom: 1px solid #e8d6a6;
    font-size: 11.5px; line-height: 1.35;
    max-height: 24px; overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,.12);
  }
  .tut-bar.open {
    max-height: 62vh; overflow-y: auto;
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    padding-bottom: 6px;
  }
  .tut-bar .tut-head { flex-wrap: nowrap; gap: 6px; }
  .tut-bar .tut-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34vw; }
  .tut-step {
    display: inline-block; background: #fff; border: 1px solid #e8d6a6; color: #8a6d2f;
    border-radius: 999px; padding: 0 7px; font-size: 10px; font-weight: 700; white-space: nowrap;
  }
  .tut-fold { display: inline-block; }
  .tut-full { display: none; }
  .tut-bar.open .tut-full { display: block; }
  /* 单行态只留「明白了」—— 它是必须点的, 其余(重来/退出)收进展开区, 别把 24px 挤爆 */
  .tut-ack { font-size: 10px; padding: 0 7px; }
  .tut-bar.open .tut-fold::after { content: ''; }
  .tut-tag { font-size: 10px; }
  /* overflow:hidden 会吃掉手指的纵向滚动(滚动链传不上去), 表现就是「拖不动」 */
  .battle-center { overflow-y: auto; touch-action: pan-y; }
}

/* ---------- 对局数据(领袖 / 卡组对位胜率) ---------- */
/* 入口: 主页「📊 对局数据」→ App.show('stats') → Stats.open()
   口径: 只统计 ≥5 分钟的对局; 卡组以领袖代表; 点开领袖看对位与先后手细分 */
.ms-topnote { font-size: 12px; color: var(--muted); }
.ms-allwrap { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.ms-page { padding: 16px; max-width: 1080px; margin: 0 auto; }

.ms-summary {
  display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px;
}
.ms-sum-item { display: flex; flex-direction: column; min-width: 64px; }
.ms-sum-item b { font-size: 20px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ms-sum-item span { font-size: 12px; color: var(--muted); }
.ms-sum-note { flex: 1 0 100%; font-size: 12px; color: var(--muted); line-height: 1.5; }
/* 「本机上一局为什么没进榜」: 淡色小字放页尾, 不是开发工具面板, 谁都能看懂 */
.ms-diag { margin: 18px 2px 8px; font-size: 12px; color: var(--muted); line-height: 1.6; opacity: .85; }

.ms-item {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 10px; overflow: hidden;
}
.ms-item.open { border-color: #d8cfbe; }
.ms-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; }
.ms-row:hover { background: #faf8f4; }
.ms-rank { width: 22px; flex-shrink: 0; text-align: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ms-rank.ms-rank-hi { color: var(--accent); font-weight: 700; }
.ms-thumb { width: 46px; flex-shrink: 0; }
.ms-thumb .card-thumb { width: 100%; }
.ms-thumb-ph {
  width: 46px; height: 64px; border-radius: 6px; background: #ece7dd;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--muted); text-align: center; overflow: hidden;
}
.ms-main { flex: 1; min-width: 0; }
.ms-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-meta { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-bar { height: 6px; border-radius: 3px; background: #eee9df; margin-top: 6px; overflow: hidden; }
.ms-bar i { display: block; height: 100%; border-radius: 3px; background: var(--muted); transition: width .2s; }
.ms-bar i.ms-good { background: var(--ok); }
.ms-bar i.ms-mid { background: var(--warn); }
.ms-bar i.ms-bad { background: var(--danger); }
.ms-wr { flex-shrink: 0; text-align: right; }
.ms-wr b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.ms-wr span { font-size: 11px; color: var(--muted); }
.ms-caret { flex-shrink: 0; padding: 0 2px; font-size: 12px; color: var(--muted); transition: transform .15s; }
.ms-item.open .ms-caret { transform: rotate(180deg); }

.ms-good { color: var(--ok); }
.ms-mid { color: var(--ink); }
.ms-bad { color: var(--danger); }
.ms-na { color: var(--muted); }
/* 样本不足 5 场: 淡化, 别让人把偶然当定论 */
.ms-thin { opacity: .62; }

.ms-detail {
  border-top: 1px dashed var(--border); background: #fff;
  padding: 10px 12px 14px;
  /* 详情区是**纯白底**, 而全站默认色(--muted #8a8578)是给米色底板配的, 11~13px 小字
     在上面就是「淡色字看不清」(训练员 2026-10-31 连续两次反馈)。这里把详情区整体
     抬到高对比: 正文 --ink, 次要文字 #57514a。 */
  color: var(--ink);
}
.ms-detail .ms-detail-in,
.ms-detail .ms-detail-empty { color: var(--ink); }
.ms-detail .ms-detail-head { color: #3f3a34; }
/* 表头 / 对手领袖 / 交手 这三处被训练员点名「还是非常浅」(2026-10-31) → 一律压到近黑 #1a1815
   并加粗; 只有场次小字、底部说明这类真正的次要信息才留在 #57514a。 */
.ms-detail .ms-table th { color: #1a1815; font-weight: 700; }
/* 注意特异性: `.ms-detail .ms-table td`(0,2,1) 会压过 `.ms-good`(0,1,0),
   所以带色的格子必须在详情区里**再写一遍**, 否则胜率的绿/红全被刷成正文色。 */
.ms-detail .ms-table td { color: #1a1815; }
.ms-detail .ms-table td.ms-good { color: var(--ok); }
.ms-detail .ms-table td.ms-bad { color: var(--danger); }
.ms-detail .ms-table td.ms-mid { color: #1a1815; }
.ms-detail .ms-table td.ms-na { color: #57514a; }
.ms-detail .ms-table td.ms-opp { font-weight: 700; }
.ms-detail .ms-table td:nth-child(2) { font-weight: 600; }
.ms-detail .ms-table td i,
.ms-detail .ms-detail-head i { color: #57514a; }
.ms-detail .ms-detail-note { color: #57514a; }
/* 样本不足 5 场: 全站的 .62 透明度在浅底+小字上等于洗成灰白 → 详情区不淡化颜色,
   改为在数值后不加色/按实际胜率着色, 是否可信由玩家自己判断。 */
.ms-detail .ms-thin { opacity: 1; }
.ms-detail-head {
  display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline;
  font-size: 12px; color: var(--muted); margin-bottom: 8px;
}
.ms-detail-head b { font-size: 14px; }
.ms-detail-head i { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 4px; }
.ms-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ms-table th {
  text-align: right; font-weight: 500; font-size: 12px; color: var(--muted);
  padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.ms-table th:first-child, .ms-table td:first-child { text-align: left; }
.ms-table td {
  text-align: right; padding: 7px 8px; border-bottom: 1px solid #f0ece3;
  font-variant-numeric: tabular-nums;
}
.ms-table td i { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.ms-table tbody tr:last-child td { border-bottom: none; }
.ms-opp { max-width: 38vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-detail-note { margin-top: 8px; font-size: 11px; color: var(--muted); line-height: 1.6; }
.ms-detail-empty { font-size: 13px; color: var(--muted); padding: 4px 0; }

.ms-empty { padding: 48px 16px; text-align: center; }
.ms-empty-t { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.ms-empty-s { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 16px; }

@media (max-width: 560px) {
  .ms-page { padding: 10px; }
  .ms-topnote { display: none; }
  .ms-row { gap: 8px; padding: 8px; }
  .ms-thumb { width: 38px; }
  .ms-thumb-ph { width: 38px; height: 53px; font-size: 11px; }
  .ms-name { font-size: 14px; }
  .ms-wr b { font-size: 16px; }
  .ms-summary { gap: 6px 16px; padding: 10px 12px; }
  .ms-sum-item b { font-size: 17px; }
  /* 详情表在手机上原本缩到 12px, 配上灰字就是「看不清」; 保持 13px 并给
     对手领袖名加粗, 数据列用 tabular-nums 对齐。 */
  .ms-table { font-size: 13px; }
  /* 手机上列宽必须固定: 否则「50.0%」「100.0%」宽窄不同, 每行数字左右跳, 看着像没对齐。
     桌面宽度富余, 保持自动布局(右对齐更紧凑)。 */
  .ms-table { table-layout: fixed; }
  .ms-table th:nth-child(1), .ms-table td:nth-child(1) { width: 33%; }
  .ms-table th:nth-child(2), .ms-table td:nth-child(2) { width: 17%; }
  .ms-table th:nth-child(3), .ms-table td:nth-child(3) { width: 17%; }
  .ms-table th:nth-child(4), .ms-table td:nth-child(4) { width: 16.5%; }
  .ms-table th:nth-child(5), .ms-table td:nth-child(5) { width: 16.5%; }
  .ms-table th, .ms-table td { padding: 7px 4px; }
  .ms-table td:first-child { font-weight: 600; }
  .ms-table th { font-size: 12px; }
  .ms-detail { padding: 10px 8px 12px; }
  .ms-detail-head { gap: 4px 12px; }
  .ms-detail-head b { font-size: 14px; }
  .ms-detail-note { font-size: 11.5px; }
}

/* ---------- 单人人机对战(设置页 + AI 台词气泡) ---------- */
/* 与「左右互搏」的设置页共用 .setup-box, 这里只补 VS 区/性格选择/卡片预览 */
.ai-setup { gap: 12px; }
.ai-vs {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 4px 0 6px;
}
.ai-vs-side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ai-vs-tag {
  font-size: 12px; padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted); background: var(--panel);
}
.ai-vs-tag.me { color: var(--blue); border-color: #cfe0ea; }
.ai-vs-tag.bot { color: var(--accent); border-color: #edd3cb; }
.ai-vs-thumb { display: flex; min-height: 64px; align-items: center; justify-content: center; }
.ai-vs-thumb .card-thumb { width: 54px; }
.ai-vs-thumb .card-thumb:hover { transform: none; }
.ai-vs-mid { font-weight: 800; color: var(--muted); letter-spacing: 1px; }
.setup-row.slim { justify-content: flex-end; }
.setup-row.slim .btn { font-size: 13px; padding: 7px 12px; }
.ai-style-title { font-size: 13px; color: var(--muted); }
.ai-style-row { display: flex; gap: 8px; }
.ai-style {
  flex: 1; text-align: left; background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px;
}
.ai-style b { font-size: 13.5px; color: var(--ink); }
.ai-style i { font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.ai-style.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(200, 85, 61, .12); }
.ai-lobby .waiting-vs { font-size: 15px; }

/* AI 台词: 固定在战场上方偏中, 不参与任何布局(手机横屏中间栏只有 165px, 常驻文本会把操作区挤没) */
.ai-taunt {
  position: fixed; left: 50%; top: 12%; transform: translate(-50%, -6px);
  display: flex; align-items: center; gap: 8px;
  max-width: min(78vw, 460px);
  padding: 7px 14px; border-radius: 999px;
  background: rgba(44, 42, 38, .9); color: #fff;
  font-size: 13px; line-height: 1.3;
  opacity: 0; pointer-events: none; z-index: 9000;
  transition: opacity .22s ease, transform .22s ease;
}
.ai-taunt b { color: #ffd9a8; font-weight: 700; flex: 0 0 auto; }
.ai-taunt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-taunt.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-height: 540px) {
  .ai-taunt { top: 6%; font-size: 12px; padding: 5px 10px; }
  .ai-vs { padding: 0; gap: 10px; }
  .ai-vs-thumb .card-thumb { width: 42px; }
  .ai-style b { font-size: 12.5px; }
  .ai-style i { display: none; }
}

/* ================= 个人界面(训练员 2026-11-01) =================
   页面: 头像 / 战绩 / 最近对局 / 头像收集。
   配色沿用全局变量; 头像一律 .pf-av / .pf-cell-img 圆形容器裁切。 */
.pf-page { padding: 16px; max-width: 1080px; margin: 0 auto; }
.pf-empty {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 20px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.pf-empty-t { font-size: 16px; font-weight: 700; }
.pf-empty-s { font-size: 13px; color: var(--muted); line-height: 1.6; max-width: 460px; }

/* ---- 顶部资料卡 ---- */
.pf-hero {
  display: flex; gap: 18px; align-items: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 14px;
}
.pf-hero-left { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 0 0 auto; }
/* 圆形头像: 容器裁圆, 图铺满; 占位用名字首字 */
.pf-av {
  border-radius: 50%; overflow: hidden; background: #ece7dd;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--border);
}
.pf-av-lg { width: 84px; height: 84px; }
.pf-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-av-ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700; color: #fff;
  background: linear-gradient(145deg, #c8553d, #8f3a2a);
}
.pf-av-btn { font-size: 12px !important; padding: 4px 10px !important; }
.pf-hero-info { flex: 1 1 auto; min-width: 0; }
.pf-name { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* 称号: 位置先占住(功能待做), 明确写「敬请期待」而不是假按钮 */
.pf-title-slot {
  font-size: 12px; font-weight: 400; color: var(--muted);
  border: 1px dashed var(--border); border-radius: 999px; padding: 2px 10px;
}
.pf-hero-sub { margin-top: 6px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; }
.pf-hero-sub i { font-style: normal; color: #cabfae; }

/* ---- 战绩 ---- */
.pf-stats {
  display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 18px; margin-bottom: 14px;
}
.pf-stat { display: flex; flex-direction: column; min-width: 62px; }
.pf-stat b { font-size: 20px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.pf-stat span { font-size: 12px; color: var(--muted); }
.pf-stat.pf-win b { color: var(--ok); }
.pf-stat.pf-lose b { color: var(--danger); }
.pf-stat.pf-stat-mini b { font-size: 16px; color: var(--muted); }
.pf-stats-note { flex: 1 0 100%; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ---- 区块 ---- */
.pf-sec {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 14px;
}
.pf-sec .sec-title { display: flex; align-items: baseline; gap: 8px; }
.pf-sec-count { font-size: 12px; font-weight: 400; color: var(--muted); }
.pf-sec-note { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 6px 0 10px; }
.pf-sec-note b { color: var(--ink); }
.pf-sec-empty {
  font-size: 13px; color: var(--muted); line-height: 1.7; padding: 14px 4px;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
}

/* ---- 最近对局 ---- */
.pf-matches { display: flex; flex-direction: column; gap: 8px; }
.pf-m {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px;
  background: #fdfcfa; cursor: pointer;
}
.pf-m:hover { background: #faf7f1; }
.pf-m-res {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
}
.pf-m.win .pf-m-res { background: var(--ok); }
.pf-m.lose .pf-m-res { background: #a9a294; }
.pf-m-mid { flex: 1 1 auto; min-width: 0; }
.pf-m-line1 { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.pf-m-line1 b { max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-m-vs { font-size: 11px; color: var(--muted); }
.pf-m-opp { font-size: 13px; color: #57514a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-m-line2 { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-m-avs { flex: 0 0 auto; display: flex; align-items: center; gap: 3px; }
.pf-m-av {
  width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: #ece7dd;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.pf-m-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-m-av-ph { font-size: 13px; font-weight: 700; color: #fff; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #b9b1a2; }
.pf-m-av.me { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #cfd9c9; }
.pf-m-av.opp { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #e6d4cd; }
.pf-m-av-vs { font-size: 12px; color: var(--muted); }

/* ---- 头像墙 ---- */
.pf-filter { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pf-filter select {
  font-family: inherit; font-size: 13px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--ink);
}
.pf-filter-hint { font-size: 12px; color: var(--muted); }
.pf-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 12px; }
.pf-cell {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: none; padding: 0; font-family: inherit; color: var(--ink);
}
.pf-cell-img {
  width: 74px; height: 74px; border-radius: 50%; overflow: hidden; display: block;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--border);
  transition: transform .12s ease, box-shadow .12s ease;
}
.pf-cell-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-cell:hover .pf-cell-img { transform: translateY(-2px); box-shadow: 0 0 0 2px #fff, 0 0 0 3px #cbbfa8; }
.pf-cell.on .pf-cell-img { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.pf-cell-name {
  font-size: 12px; line-height: 1.25; text-align: center; max-width: 88px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #57514a;
}
.pf-cell-tag { position: absolute; top: -2px; right: 2px; font-size: 10px; color: var(--muted); background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 0 5px; }
.pf-cell.on .pf-cell-tag { display: none; }
/* 「使用中」贴右上角(圆外的空白角落) —— 放底部会压住下巴和名字 */
.pf-cell-on {
  position: absolute; top: -2px; right: 2px;
  font-size: 10px; color: #fff; background: var(--accent); border-radius: 999px; padding: 0 6px;
  white-space: nowrap; line-height: 15px;
}
.pf-picker .pf-wall { margin-top: 10px; }

/* ---- 首页账号行的小圆头像 ---- */
.home-account .ha-av {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover; vertical-align: -6px;
  margin-right: 4px; box-shadow: 0 0 0 1px var(--border);
}
.home-account .ha-user { display: inline-flex; align-items: center; gap: 2px; }
.home-account .ha-user:hover { color: var(--accent); }

@media (max-width: 640px) {
  .pf-page { padding: 10px; }
  .pf-hero { gap: 12px; padding: 12px; }
  .pf-av-lg { width: 64px; height: 64px; }
  .pf-av-ph { font-size: 24px; }
  .pf-name { font-size: 18px; }
  .pf-stats { gap: 6px 16px; padding: 10px 12px; }
  .pf-stat b { font-size: 17px; }
  .pf-m { gap: 8px; padding: 7px 8px; }
  .pf-m-av { width: 28px; height: 28px; }
  .pf-wall { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 10px; }
  .pf-cell-img { width: 62px; height: 62px; }
  .pf-cell-name { max-width: 74px; font-size: 11px; }
}

/* 商店: 「兑换这张闪卡还能解锁头像」的小角标 */
.shop-card .sc-img { position: relative; }
.sc-avatar-tag {
  position: absolute; left: 4px; bottom: 4px; z-index: 3;
  font-size: 10px; line-height: 15px; padding: 0 6px; border-radius: 999px;
  color: #fff; background: rgba(200, 85, 61, .88); pointer-events: none;
}

/* ================= 称号系统(训练员 2026-11-01) =================
   口径: 一个系列一个「XXX 设计师」称号。卡片一律 **黑底 + 该 IP 色调描边**,
   左侧是那颗圆形头像(默认取该系列领袖, 少数没有人脸的系列取应援卡)。
   色值由 titles.json 的 color / color2 提供, 通过行内 style 写成 --tc / --tc2 —— 
   所以这一块不能写死颜色, 换系列只改数据。 */

/* ---- 个人界面: 称号墙 ---- */
/* 52 个系列一次铺开太长 → 两个筛选片(全部 / 已解锁) */
.pf-tfilter { display: flex; gap: 8px; margin: 0 0 12px; }
.pf-tf {
  font-family: inherit; font-size: 12.5px; line-height: 1; padding: 7px 14px;
  border-radius: 999px; cursor: pointer; color: var(--muted);
  background: var(--panel); border: 1px solid var(--border);
  transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.pf-tf:hover { color: var(--ink); border-color: #cbbfa8; }
.pf-tf.on { color: #fff; background: var(--accent); border-color: var(--accent); }
.pf-titles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 10px;
}
.pf-title-card {
  --tc: #c9a227; --tc2: #ffe9a8;
  position: relative; display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left; font-family: inherit; cursor: pointer;
  padding: 10px 13px 10px 10px; border-radius: 12px;
  background: linear-gradient(135deg, #191920 0%, #08080a 58%, #101016 100%);
  border: 1px solid var(--tc);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.55), 0 2px 10px -4px rgba(0,0,0,.55), 0 0 14px -8px var(--tc);
  color: #f4f1ec;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
/* 第二层描边: 主色往外再晕一圈, 像徽章的金边, 又不至于糊成一片 */
.pf-title-card::before {
  content: ''; position: absolute; inset: -1px; border-radius: 13px; pointer-events: none;
  border: 1px solid var(--tc); opacity: .22;
}
.pf-title-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(0,0,0,.55), 0 6px 16px -6px rgba(0,0,0,.6), 0 0 20px -6px var(--tc); }
.pf-title-card.on { border-color: var(--tc2); box-shadow: inset 0 0 0 1px rgba(0,0,0,.55), 0 0 0 1px var(--tc2), 0 0 22px -6px var(--tc); }
/* 未解锁: 仍是黑底(训练员要的底色不能被冲淡), 只把描边压暗、头像去色、文字降一档。
   预览时能一眼看出「这张是成品」还是「还没拿到」, 又不会两张卡长得完全不一样。 */
.pf-title-card.lock { cursor: default; border-color: var(--tc-weak, rgba(255,255,255,.16)); }
.pf-title-card.lock:hover { transform: none; }
.pf-title-card.lock::before { opacity: .18; }
.pf-title-card.lock .pf-title-nm { color: #cdc7d6; }
.pf-title-card.lock .pf-title-sub { color: #8b8599; }
/* 圆形头像: 外圈用 IP 色, 与卡面描边同色 */
.pf-title-av {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; overflow: hidden;
  background: #1d1d24; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px rgba(0,0,0,.8), 0 0 0 2.5px var(--tc);
}
.pf-title-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-title-av .ph { font-size: 18px; font-weight: 700; color: var(--tc2); }
/* 未解锁: 灰度只压到 6 成、亮度几乎不动 —— 52 张一起铺开时,
   压到认不出是谁就失去「收集清单」的意义了 */
.pf-title-card.lock .pf-title-av img { filter: grayscale(.6) brightness(.95); }
.pf-title-tx { flex: 1 1 auto; min-width: 0; }
.pf-title-nm {
  display: block; font-size: 15px; font-weight: 700; letter-spacing: .4px;
  color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pf-title-card.on .pf-title-nm { color: var(--tc2); }
.pf-title-sub {
  display: block; margin-top: 3px; font-size: 11px; line-height: 1.45; color: #9a94a6;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* ⚠ display:block —— 这是个 <span>, inline 元素上写 height 不生效(进度条会整个消失) */
.pf-title-bar {
  display: block; margin-top: 5px; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,.13); overflow: hidden;
}
.pf-title-bar i { display: block; height: 100%; background: var(--tc); border-radius: 2px; }
/* 「佩戴中」角标: 卡面右上, 不压头像 */
.pf-title-on {
  position: absolute; top: -7px; right: 9px; font-size: 10px; font-weight: 700; line-height: 16px;
  padding: 0 7px; border-radius: 999px; color: #0b0b0d; background: var(--tc2);
}
.pf-title-lockico {
  position: absolute; top: -7px; right: 9px; font-size: 10px; line-height: 16px;
  padding: 0 7px; border-radius: 999px; color: var(--tc2); background: #17171d; border: 1px solid var(--tc);
}
.pf-titles-note { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 0 0 10px; }
.pf-titles-note b { color: var(--ink); }

/* ---- 投稿致谢: 「你收到了新称号」弹窗(训练员 2026-11-01) ----
   只有「收下」一个出口(UI.modal noClose), 所以按钮要给足分量、说明写在按钮左边。
   「梦梦」那种一次拿 52 枚的, 称号墙必须限高自己滚, 不能把弹窗顶出屏幕(手机横屏只有 ~300px 高)。 */
.pf-gift { min-width: 0; }
.pf-gift-thanks {
  font-size: 18px; font-weight: 700; line-height: 1.55; color: var(--ink);
  margin: 2px 0 6px; word-break: break-word;
}
.pf-gift-thanks b { color: var(--accent-dark); font-weight: 700; }
.pf-gift-sub { font-size: 13px; line-height: 1.7; color: var(--muted); margin: 0 0 12px; }
.pf-gift-scroll {
  max-height: min(46vh, calc(var(--vu) * 44)); overflow-y: auto; overscroll-behavior: contain;
  padding: 4px 2px; border-radius: 10px;
  /* 卡片带 1px 外发光的描边, 贴边会看不见 → 左右各留 2px, 上下留 4px */
}
.pf-gift-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
/* 弹窗里的称号卡不是可选项而是「战利品」: 不画 hover 位移, 免得整片抖 */
.pf-gift-grid .pf-title-card { cursor: pointer; }
.pf-gift-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
}
.pf-gift-hint { flex: 1 1 200px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.pf-gift-foot .btn { flex: 0 0 auto; min-width: 104px; }

/* ---- 个人界面: 名字旁的称号徽章 ---- */
.pf-title-chip {
  --tc: #c9a227; --tc2: #ffe9a8;
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 2px 11px 2px 3px; border-radius: 999px;
  background: linear-gradient(135deg, #191920, #09090c);
  border: 1px solid var(--tc); color: var(--tc2);
  font-size: 12px; font-weight: 700; letter-spacing: .3px;
  box-shadow: 0 0 12px -5px var(--tc); cursor: pointer;
}
.pf-title-chip .pf-title-chip-av {
  width: 20px; height: 20px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(0,0,0,.8), 0 0 0 2px var(--tc);
}
.pf-title-chip .pf-title-chip-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-title-chip .pf-title-chip-nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-title-chip.none { border-style: dashed; border-color: var(--border); color: var(--muted); box-shadow: none; background: none; font-weight: 400; }

/* ---- 对战界面: 玩家名片(训练员 2026-11-02 参考对战截图: 改成**横条** ——
   圆形头像 + 玩家 ID + 称号胶囊挤在同一行, 贴在领袖行最右侧的角落, 不再是一块 132px 的竖牌) ---- */
.zone-idcard {
  --tc: #b9b1a2; --tc2: #e8e1d5;
  /* flex 不许收缩: 状态条那一格本来就窄, 一旦参与收缩, 头像圆是 flex:0 0 auto 不缩,
     被压掉的正好是名字和称号文字 —— 画面上只剩「两个圆」(2026-11-02 截图) */
  flex: 0 0 auto; align-self: center; margin-left: 0;
  display: flex; flex-direction: row; align-items: center; gap: 6px;
  /* ⚠ 绝对宽度 + width:max-content: 父级 .zone-bar 是 shrink-to-fit 的,
     百分比 max-width 会退化成 0; 不给 max-content 则会被兄弟胶囊挤到只剩两颗圆点 */
  width: max-content; max-width: 240px; min-width: 0;
  padding: 3px 9px 3px 4px;
  border-radius: 999px;
  background: linear-gradient(165deg, #1a1a20 0%, #08080a 100%);
  border: 1px solid var(--tc);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), 0 0 14px -7px var(--tc);
}
.zone-idcard.has-title { border-color: var(--tc); box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), 0 0 16px -6px var(--tc); }
.zone-idcard .zid-av {
  width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  background: #22222a; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px rgba(0,0,0,.85), 0 0 0 2px var(--tc);
}
.zone-idcard .zid-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zone-idcard .zid-av-ph { font-size: 11px; font-weight: 700; color: var(--tc2); }
.zone-idcard .zid-tx {
  display: flex; flex-direction: row; align-items: center; gap: 5px;
  min-width: 0; text-align: left;
}
.zone-idcard .zid-name {
  font-size: 11px; font-weight: 700; color: #f2efe9; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto;
}
/* 称号胶囊: 圆形称号头像 + 称号名(与个人界面 pf-title-chip 同款式)。
   横条里只占一行, 太长就省略 —— 不再折两行把领袖行撑高 */
.zone-idcard .zid-title {
  display: flex; align-items: center; gap: 3px; flex: 0 1 auto; min-width: 0;
  margin: 0; font-size: 9px; line-height: 1.3; font-weight: 700;
  color: var(--tc2); background: rgba(255,255,255,.05);
  border: 1px solid var(--tc); border-radius: 999px; padding: 1px 5px 1px 2px;
}
.zone-idcard .zid-tc-av {
  width: 14px; height: 14px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  background: #22222a;
  box-shadow: 0 0 0 1px rgba(0,0,0,.85), 0 0 0 1.5px var(--tc);
}
.zone-idcard .zid-tc-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zone-idcard .zid-tc-nm { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- 对战界面: 名片的新位置(训练员 2026-11-02「双方 id 和称号都放到各自生命区下方」) ----
   生命区那一列本来就窄(7 血 ≈ 140px), 所以名片在这里收一档: 头像 + 名字一行,
   称号胶囊放不下就落到第二行(整条仍是 max-content, 不会被压成两个圆)。 */
.life-col .zone-idcard {
  width: max-content; max-width: 184px;
  flex-wrap: wrap; row-gap: 2px;
  padding: 3px 8px 3px 3px; gap: 5px;
}
.life-col .zone-idcard .zid-tx { flex-wrap: wrap; min-width: 0; }
.life-col .zone-idcard .zid-name { font-size: 10.5px; }
.life-col .zone-idcard .zid-title { font-size: 8.5px; max-width: 100%; }
.life-col .zone-idcard .zid-av { width: 21px; height: 21px; }

/* 手机横屏(矮屏): 名片收窄一档, 别把领袖行的空间吃掉 */
@media (max-width: 640px) {
  .pf-titles { grid-template-columns: 1fr; }
  .pf-title-av { width: 40px; height: 40px; }
  .pf-title-nm { font-size: 14px; }
  /* 窄屏战绩项收紧一档, 否则「本地 / 人机场次」会被挤到第二行 */
  .pf-stat { min-width: 50px; }
  .pf-stat.pf-stat-mini b { font-size: 15px; }
}
@media (orientation: landscape) and (max-height: 560px) {
  .zone-idcard { max-width: 158px; width: max-content; flex: 0 0 auto; padding: 2px 7px 2px 3px; gap: 4px; }
  .zone-idcard .zid-av { width: 20px; height: 20px; }
  .zone-idcard .zid-name { font-size: 9px; }
  .zone-idcard .zid-title { font-size: 8px; padding: 0 4px 0 1px; gap: 2px; }
  .zone-idcard .zid-tc-av { width: 12px; height: 12px; box-shadow: 0 0 0 1px rgba(0,0,0,.85), 0 0 0 1.5px var(--tc); }
  .life-row.in-leader { width: auto; gap: 0; padding: 2px 6px 2px 4px; }
  .life-row.in-leader .life-card,
  .life-row.in-leader .card-thumb.life-up { width: 26px; min-width: 26px; height: 34px; margin-left: -13px; }
  .life-row.in-leader > .life-label + .life-card,
  .life-row.in-leader > .life-label + .card-thumb.life-up { margin-left: 0; }
}

/* =====================================================================
   训练员 2026-11-02 版式收尾(必须留在文件最后 → 覆盖前面各段的尺寸)
   生命区挪到领袖左边后, 矮屏(手机横屏)上这三块最容易互相挤:
   ① 生命格子要更窄(24px 小卡背, 2~3 列) ② 应援/手牌要居中铺开
   ③ 对手手牌那排卡背再小一档, 别把整块场地顶高
   ===================================================================== */
@media (orientation: landscape) and (max-height: 560px) {
  /* 手机横屏: 「数字 + 半摞卡背」横着排一行 —— 卡片互相压住, 7 张也只占 ~90px,
     不再折行(折行的第二排会被行高裁掉, 玩家只看见 3 张 = 以为只剩 3 血) */
  .life-row.in-leader {
    width: auto !important; min-width: 0; padding: 2px 7px 2px 4px; gap: 0;
    flex-wrap: nowrap !important; overflow: visible;
    align-items: center; align-content: center;
  }
  /* 数字是这格的主信息(还剩几血一眼读出), 矮屏只把它缩一档, 绝不隐藏 */
  .life-row.in-leader .life-label {
    flex-direction: column; align-items: center; gap: 0;
    width: auto; margin: 0 5px 0 0; padding: 0 5px 0 0; font-size: 7.5px; white-space: nowrap;
  }
  .life-row.in-leader .life-label > .life-k { font-size: 7.5px; }
  .life-row.in-leader .life-label > .life-n { font-size: 15px; }
  .life-row.in-leader .life-label > .life-flip-badge { font-size: 7px; padding: 0 3px; margin: 1px 0 0; border-radius: 5px; }
  .life-row.in-leader .life-card { width: 26px !important; height: 34px !important; margin-left: -13px !important; }
  .life-row.in-leader .card-thumb.life-up { width: 26px !important; min-width: 26px !important; margin-left: -13px !important; }
  .life-row.in-leader > .life-label + .life-card,
  .life-row.in-leader > .life-label + .card-thumb.life-up { margin-left: 0 !important; }
  .life-row.in-leader::-webkit-scrollbar { display: none; }
  /* 训练员 2026-11-02: 对手手牌在手机横屏也要看得见(镜像我这边手牌的样子) ——
     不再整行收起, 只把卡背再收小一档, 高度压在 ~26px 内, 两行场地才塞得下。 */
  .arena .zone #op-hand, .arena .zone .op-hand-row {
    display: flex !important;
    max-height: calc(var(--hand-w) * 1.5); min-height: 0; padding: 0; gap: 4px; overflow-x: auto;
  }
  .arena .zone .op-hand-row .card-back-thumb .card-back-mark { font-size: 8px; }
  /* 变量挂在 .arena 上: 非 flip 时给 #op-hand(对手卡背), flip 时给 #my-hand(也是对手卡背) */
  .arena { --op-hand-w: calc(var(--m-vu) * 9.5); }
  /* 训练员 2026-11-02(第八轮): 对手回合上方空地太多 ——
     ① 对手手牌行贴到屏幕顶(原来顶部让开浮层留了 6% 屏高 ≈23px, 全成了空白);
     ② 卡背再缩一档(应援卡 13.5%屏高 ≈53px → 9.5% ≈37px), 行高跟着降 ~17px;
     ③ 应援区由 grid 自动跟着上移 —— 两条加起来, 对手区整体上挪 ~35px, 中间战斗区变宽。
     ⚠ 只缩「对手那张卡背」: 自己的手牌大小不变(训练员要的"两边一样大"是仅就对手那排的观感)。
     ⚠ 必须按 flip 分开写: 房主在对手回合(flip-view)时数据是对调的 —— **#op-hand 里装的是
       自己的真手牌**, 对手的卡背跑到了 #my-hand。不分开写就会把自己的手牌缩小、把对面的放大。 */
  .arena:not(.flip-view) .zone.side-opp {
    padding-top: 4px;
    /* 手牌行与应援行之间留一口气, 别让「休息」标签顶在卡背底边;
       具体值由文末第十一轮的 --sup-gap 给(应援区往中间挪那一档), 这里只给兜底 4px */
    row-gap: var(--sup-gap, 4px);
  }
  .arena:not(.flip-view) .zone.side-opp #op-hand .card-thumb { width: var(--op-hand-w); }
  /* flip-view: 上面那区是 .side-mine(装着对手的卡背), 手牌行同样是第一行 */
  .arena.flip-view .zone.side-mine { padding-top: 4px; row-gap: var(--sup-gap, 4px); }
  .arena.flip-view .zone.side-mine #my-hand .card-thumb { width: var(--op-hand-w); }
  /* flip-view 时 #op-hand 装的是自己的手牌: 那一行原来写死 20% 屏高, 改成按内容撑高, 别留一截空 */
  .arena.flip-view #op-hand { height: auto; padding-top: 3px; }
  .arena.flip-view #op-hand .card-badge { font-size: 8px; }
  /* 中央那条「主要阶段 + 回合数」: 手机横屏两块场地几乎贴在一起, 压在 42% 会正好骑在
     对手应援卡中间 → 挪到两区的**分界线**上(实测 ~53%), 看着才是"屏幕中间" */
  .center-stack:has(.phase-hero) { top: 53%; }

  /* ============================================================
     训练员 2026-11-02(第九轮): 屏幕最上方只留**一行** ——
     [房间号 · 延迟 · 聊天 · 离开]  [对手手牌(居中)]  [🎵⏭⚙⛶效果助手]
     以前是三行 + 一块空地:
       ① 联机 HUD(#net-hud.inline) 是 flex 里的实体一条, 实打实占 19px;
       ② 对手手牌行还要再让开顶部 4px(更早是 6% 屏高);
       ③ 音乐/全屏/效果助手跟在下面(.battle-screen:has(#net-hud) .phase-bar{margin-top:26px});
       ④ 房主在对手回合(flip-view)时 #my-hand 仍是 20% 屏高 + .side-mine 挂着 margin-top:auto
          → 卡背**上方**凭空多出 85px 空白(1080×498 实测), 整块战场因此被挤扁。
     现在 HUD 与工具条都改成绝对定位的浮层(不吃布局), 行高统一 --top-row-h, 手牌顶上第一行,
     flip 时把 margin-top:auto 交给视觉上「在下面」的那一区。
     ⚠ 关卡 ④ 的两条是配套的: 只去 margin-top:auto 而不放开 #my-hand 的固定行高, 卡背照样沉底。
     ⚠ 手牌仍居中(margin:auto 技巧), 只有卡多到溢出时才会滑到浮层下面 —— 属可接受。 */
  .net-hud.inline {
    position: absolute; top: 3px; left: 0; right: 0; z-index: 30;
    display: flex; height: var(--top-row-h); align-items: center;
    justify-content: flex-start; gap: 5px; padding: 0 3px;
    pointer-events: none;                 /* 只让胶囊本身吃点击, 中间的空白放行给手牌 */
  }
  .net-hud.inline > * { pointer-events: auto; }
  .net-hud.inline .hud-room { margin-right: 2px; }   /* 原来是 margin-right:auto(要把整条撑满) */
  /* 工具条: 贴在同一个行高的右侧, 与手牌、房间号齐平 */
  .battle-screen:has(#net-hud) .phase-bar { margin-top: 0; }
  .battle-screen .phase-bar {
    position: absolute; top: 3px; right: 3px; left: auto; width: auto;
    height: var(--top-row-h); align-items: center;
  }
  /* 手牌顶到第一行(两种视角都要) */
  .arena:not(.flip-view) .zone.side-opp,
  .arena.flip-view .zone.side-mine { padding-top: 0; }
  /* flip-view: 视觉上在上面的是 .side-mine(装对手卡背), 在下面的是 .side-opp(装我的真手牌)
     → 「贴底」那条 auto 边距要跟着视觉顺序走, 否则顶区被推下去、上方空出一大片 */
  .arena.flip-view .zone.side-mine { margin-top: 0; }
  .arena.flip-view .zone.side-opp { margin-top: auto; }
  /* flip 时上面那排是**对手卡背**(9.5%屏高那么小), 不再套 20% 屏高的行高, 交给内容撑高 */
  .arena.flip-view .zone.side-mine #my-hand {
    height: auto; min-height: 0; max-height: none; margin-top: 0;
    padding: 0 6px; align-items: flex-end;
  }
  /* 客机/观战的状态横幅(#remote-banner)保持原样占一条实高(手机横屏已压到 14px):
     它和联机 HUD 是两块独立的东西, 都往左上角一叠就会互相糊字; 而横着让它排在 HUD 后面,
     观战那条「视角：XX（行动中）」能顶到 170px, 844 宽下会撞到手牌。
     14px 换一行清醒的状态提示是划算的 —— 房主那边没有这块, 也不受影响。 */
  /* 「对手操作中…」: 这一档以前整颗不画(当年为了把手牌顶到第一行), 结果对手回合屏幕上
     找不到一句明确的「对手操作中」—— 回合条里只有「对手 第N回合」几个小字, 还被回合大字压着
     (训练员 2026-11-06 要求显示)。
     现在改成**贴左上角的窄胶囊**: 首屏那一行左边是空的(房间号在中间、音乐工具在右边),
     收窄后只有一百来像素, 既不碰手牌也不碰 HUD; 投降按钮在这一档收起来(中间偏右已有可点的 🏳)。 */
  .host-wait-pill {
    top: 3px; left: 4px; transform: none;
    font-size: 10.5px; padding: 3px 9px 3px 10px; gap: 6px;
  }
  .host-wait-pill .hw-concede { display: none; }
}
/* 应援/手牌/对手手牌居中铺开(用 margin:auto 技巧, 卡多溢出时仍是正常滑轨) */
#op-supports > :first-child, #my-supports > :first-child,
#op-hand > :first-child, #my-hand > :first-child { margin-left: auto; }
#op-supports > :last-child, #my-supports > :last-child,
#op-hand > :last-child, #my-hand > :last-child { margin-right: auto; }

/* ---------- 极小屏(568×320 这类横屏小手机) ----------
   两个区的刚性高度(状态条 + 领袖 + 应援 + 手牌)加起来天然超过一屏, 手牌会被挤到视口下方 ——
   打牌时看不见自己的手牌是致命的, 所以把手牌行钉在视口底部(节点仍在 #my-hand 里, 事件/滑轨不受影响)。 */
@media (orientation: landscape) and (max-height: 350px) {
  .zone.side-mine #my-hand {
    position: sticky; bottom: 0; z-index: 3;
    background: var(--panel); border-radius: 8px 8px 0 0;
    box-shadow: 0 -3px 10px rgba(0, 0, 0, .18);
  }
}

/* =====================================================================
   训练员 2026-11-02(第十一轮): 「把两边的应援区往中间挪, 使其与手牌有一定距离;
   中间的『主要阶段』这行居中, 让两边应援卡离其一样远」
   ---------------------------------------------------------------------
   两条要的其实是同一件事 —— 上下两块场地与中间那条要**对称**:

   ① 应援区往中间挪: 手牌行与本区应援行之间补一段留白。上面那区(对手)的手牌在最上、
      应援行在它下面, 补留白 → 应援行**往下**走; 下面那区(我的)反过来 → 应援行**往上**走。
      两边都在朝屏幕中线靠, 同时也都和自己的手牌拉开了(以前只有 3~4px, 卡边几乎贴着)。

   ② 阶段条真正居中: 以前 .battle-center 是 inset:0 的浮层、.center-stack 用 top:53% 硬写。
      那个 53 是"看着差不多"凑出来的常数 —— 手牌张数/应援张数一变, 两区高度就变,
      于是阶段条往往偏一边(实测对手应援卡距它 95px、我这区只有 65px)。
      现在改成: .battle-center 当 arena 的**弹性行**, 把两块场地之间的余量整个吃下来,
      .center-stack 在里面垂直居中 → 上下余量永远各一半, 两边应援卡离它必然一样远。

   ③ (2026-11-02 曾用 `grid-column: 1/-1` 让应援横跨整行居中 —— **2026-11-03 已撤回**, 见下面那条注释:
      跨整行在窄屏/卡多时左端会越过领袖右缘, 领袖压在应援卡上。现在应援留在 sup 列内居中,
      代价是中心比场地中线偏右几十像素(左翼=生命+领袖 比 右翼=状态条 宽) —— 这个偏差可以接受,
      遮挡不行。)

   ⚠ .center-stack 是 absolute + translate(-50%,-50%): 只改 top 会带着那 -50% 的位移跑,
     必须同时清掉 transform(还有 5455 那条 top:53%)。
   ⚠ .phase-bar / .center-side / .pow-vs 也都是 absolute。.battle-center 不再是它们的包含块后,
     它们会挂到 .arena 上(arena 早就是 position:relative) —— 三者本来就是按"整块战场"定位的
     (见上面 top:3px / right:3px / top:50%), 所以位置不动。
   ⚠ .zone 的 row-gap 走 --sup-gap: 上面 5444/5448 那两条是 0,4,0 特异性,
     直接在这里写 `.arena .zone` 压不过它们, 所以统一交给变量。
   ===================================================================== */
@media (orientation: landscape) and (max-height: 560px) {
  .arena { --sup-gap: calc(var(--m-vu) * 2.6); }   /* ≈ 13px@498 高, 卡与卡之间看得出空隙 */
  /* 非 flip: 上面是对手(:not(.flip-view) .side-opp 已在 5444 走 var), 下面是 .side-mine */
  .arena .zone.side-mine { row-gap: var(--sup-gap, 4px); }
  /* flip: 视觉上下顺序反过来 —— 上面是 .side-mine(已在 5448 走 var), 下面是 .side-opp */
  .arena.flip-view .zone.side-opp { row-gap: var(--sup-gap, 4px); }

  /* ③ 应援**留在 sup 列内**居中(靠 5539 那组 `> :first-child{margin-left:auto}` 实现)。
     ⚠ 2026-11-03 撤回「grid-column: 1/-1 横跨整行」: 跨整行 = 内容按**整块场地**居中,
       卡一多就向两侧长 —— 窄屏上左端直接越过领袖右缘, 领袖(DOM 在后)压在应援卡上面。
       实测 920×425、6 张应援: 领袖卡 259~310, 第一张应援卡 295 起 → 压住 15px
       (训练员报「我的领袖怎么跑到这里去了, 把底下的应援卡都盖住了」)。
       回到 sup 列后应援组只在「领袖右侧 ~ 资源胶囊左侧」这段里居中, 卡再多也是本行横向滑轨。
     ⚠ 顺带撤掉 pointer-events:none: 那层空盒子本来就只为了不吃点击, 但它会让本行
       (`overflow-x:auto`) 收不到 touchmove —— 应援卡多时需要横向滑动, 不能挡。 */
  /* ⚠ 不要为了"对准中线"把应援排改成左接领袖(:first-child{margin-left:6px}):
     左对齐在**卡少时**整排贴着领袖、右半边空一大片(flip 视角 4 张实测中心 348, 中线 540);
     卡多时才碰巧接近中线(6 张 530)。居中在列内是**唯一与卡数无关**的稳定解,
     代价只有「左翼比右翼宽」那半个差值(实测 1080×498: 中心 564 / 中线 540, 偏右 24px)。 */

  .arena .battle-center {
    position: static;            /* 不再是浮层 → 变成 arena 里的第三条弹性行 */
    flex: 1 1 auto; width: 100%; min-height: 0;
    justify-content: center;     /* 余量上下各一半: 里面的 .center-stack 因此正好压在中线上 */
  }
  .arena .center-stack {
    position: static; left: auto; top: auto; transform: none;
    margin: 0 auto;              /* 横向仍居中(battle-center 已有 align-items:center, 双保险) */
  }
  /* 战斗态那颗「5000 × 5000」: 原来是 absolute 压在战场正中、回合条再用 top:calc(50% + 56px)
     硬推到它下方(1591)。现在两者都回到流内 —— 胶囊在上、回合条在下, 整组在带宽里居中,
     不用再算偏移(那条 top 对 static 元素本来也无效)。 */
  .arena .pow-vs { position: static; transform: none; margin: 0 auto; }
  /* 不可防御提醒: 跟着胶囊一起回到流内, 紧贴其下 */
  .arena .battle-warn { position: static; transform: none; margin: 4px auto 0; }
  .arena .my015-tip { position: static; transform: none; margin: 4px auto 0; }
}

/* =====================================================================
   电脑端(宽屏)版式 —— **与手机端完全同一套尺寸**
   ---------------------------------------------------------------------
   2026-11-02(第十二轮)曾给宽屏单独放大一档(应援 14.2 / 手牌 12.8)并限宽居中;
   2026-11-03 训练员改口两件事:
     ①「电脑端的手牌和场上的卡和领袖底的卡也缩小, 改成跟手机布局一样」
        → 尺寸回到手机口径: 应援/领袖 12% 屏高、手牌 10.8%、手牌行高 16.5%(≤350 再压一档)。
     ②「电脑端左右两侧空位太大了, 血区左移, 卡组废弃区和除外右移(并且放大一点)」
        → 撤掉原来那条 width:min(100%, 1000/1240px) 的限宽居中, 场地照旧铺满;
          生命区因此回到战场左缘、资源胶囊回到右缘; 资源胶囊本身放大一档(原来 11.5px 太小)。

   ⚠ 必须带 (hover: hover) and (pointer: fine): 大屏手机横屏(iPhone 14 Plus 926×428、
     Pro Max 932×430~956×440)宽度也 ≥900, 光看宽度会把手机一起算成电脑。
     (尺寸现在与手机一致, 但下面「资源胶囊放大」和桌面网格的 padding 仍不该套到手机上)
   ===================================================================== */
@media (orientation: landscape) and (max-height: 560px) and (min-width: 900px) and (hover: hover) and (pointer: fine) {
  /* 卡尺寸不写 = 直接吃手机横屏那一档(2913 的 12 / 10.8 + 2784 的 16.5), 一格都不放大 */
  .res {
    padding: 3px 10px 3px 5px; gap: 6px; border-radius: 9px;
    font-size: 14px;
  }
  .res b { font-size: 15px; }
  .res-ico { width: 19px; height: 26px; border-radius: 4px; }
  /* 训练员 2026-11-03: 「独/速/突/贯」这些卡面标记在电脑端要回原来的尺寸。
     17→12 那次是为了手机(卡面只有 60~90px 宽, 三枚就盖掉小半张卡图); 电脑端的卡是同一档
     但屏幕大得多、看得清, 收小反而看不出是「独」还是「速」。这里只在电脑端还原 17×17/11px。 */
  .kw-mini .kwi { width: 17px; height: 17px; border-radius: 4px; font-size: 11px; }
  .kw-mini.pushed { top: 26px; }
}

/* 桌面(高度够, ≥561): 走的是 2566 起的桌面网格。尺寸同样回到手机口径(12 / 10.8 / 16.5),
   撤掉限宽 → 生命贴左缘、状态贴右缘; 卡缩小后中间带会空出一截, 正好给阶段条, 不再压卡。 */
@media (orientation: landscape) and (min-width: 900px) and (min-height: 561px) and (hover: hover) and (pointer: fine) {
  .zone { --sup-w: calc(var(--vu) * 12); }
  .zone, .battle-screen { --hand-w: calc(var(--vu) * 10.8); }
  .hand-row { min-height: calc(var(--vu) * 16.5); }
  .res {
    padding: 3px 10px 3px 5px; gap: 6px; border-radius: 9px;
    font-size: 14px;
  }
  .res b { font-size: 15px; }
  .res-ico { width: 19px; height: 26px; border-radius: 4px; }
  /* 桌面顶栏只有一行(21px 高, 从 top:3 起), 26px 的让位过宽 → 收到 18px;
     矮窗口(900×600)手牌因此不再被挤出战场底边 */
  .arena .zone.side-opp { padding-top: 18px; }
  /* 两区各自的「场地行 + 手牌行」把中间带挤到只剩几像素 —— 阶段条是 absolute 浮层,
     会直接压在对手的应援卡上(900×600 实测骑在卡底)。改成手机端第十一轮那套: 中间带回**流内**
     当弹性行(至少 70px), 阶段条在里面居中, 永远压在场地分界线上、不碰卡。 */
  .arena .battle-center {
    position: static; flex: 1 1 auto; width: 100%; min-height: 70px;
    justify-content: center;
  }
  /* ⚠ 顶栏(音乐/切曲/设置/全屏/效果助手)原本是 battle-center 里的 relative 一行;
     battle-center 转 static 后它会跟着跑到屏幕中间 —— 必须像手机档那样挂回战场右上角 */
  .arena .phase-bar {
    position: absolute; top: 3px; right: 3px; left: auto; width: auto; height: 18px;
  }
  .battle-screen:has(#net-hud) .phase-bar { margin-top: 0; }
  .arena .center-stack { position: static; left: auto; top: auto; transform: none; margin: 0 auto; }
  .arena .pow-vs { position: static; transform: none; margin: 0 auto; }
  /* 不可防御提醒: 跟着胶囊一起回到流内, 紧贴其下 */
  .arena .battle-warn { position: static; transform: none; margin: 4px auto 0; }
  .arena .my015-tip { position: static; transform: none; margin: 4px auto 0; }
  /* 联机 HUD(#net-hud) 是 body 上的 fixed 浮层(top:8 / right:10, 高 26px);
     v698 又把工具条钉在战场右上角(top:3 / right:3) → 两者完全重叠, 房间号与 PIN(延迟)
     正好盖住「⏭ 切歌」(训练员 2026-11-03 报障, 1280×720 实测 HUD 1129~1270 / ⏭ 1111~1133)。
     HUD 在时把工具条整体降到它下面一行, 仍贴右缘; 与对手状态条(实测 y≥150)还留一截空白。
     ⚠ 选择器必须挂在 body 上: 电脑端 HUD 是 document.body 的子元素(手机端才 .inline 塞进战场),
       写成 `.battle-screen:has(#net-hud)` 在这里永远不命中 —— 它不是战场里的后代。 */
  body:has(#net-hud) .battle-screen .arena .phase-bar { top: 38px; }
  /* 同上: 电脑端「独/速/突/贯」标记还原到 17×17/11px(手机那边的 12px 太小) */
  .kw-mini .kwi { width: 17px; height: 17px; border-radius: 4px; font-size: 11px; }
  .kw-mini.pushed { top: 26px; }
}

/* =====================================================================
   训练员 2026-11-04 平板报障: 右上角「房间 XXXX · 延迟」HUD 压住「⏭ 切歌」
   ---------------------------------------------------------------------
   iPad(触屏 + 桌面 UA)不进 Mobile.isMobile → #net-hud 是 document.body 上的
   fixed 浮层(top:8 / right:10, 高 ~26px); 而 .phase-bar 在 .battle-center 里是
   relative 的一行、右对齐 → 两者正好叠在同一条右上角, 房间胶囊把切歌按钮盖掉一半。
   v698 的让位规则(5810 那条 top:38px)写在「电脑端 hover:hover+pointer:fine」媒体块里,
   平板不命中; 手机横屏那边 HUD 是 .inline(左上角)、工具条在右上角, 本来就不重叠。
   这里只给「触屏 + HUD 非 inline」补一档: 工具条整体下移 34px(HUD 底部约 34px),
   用 transform 不吃布局, 不会把中间的力量对比/回合条一起推下去。
   ===================================================================== */
@media (hover: none) {
  body:has(#net-hud:not(.inline)) .battle-screen .arena .phase-bar {
    transform: translateY(34px);
  }
}

/* ============================================================
   对局回放(训练员 2026-11-04)
   结算页保存入口 / 保存面板 / 回放大厅 / 战场内控制条
   浅色主题: 浅底深字, 次要文字一律 #57514a(别用 --muted / opacity)
   ============================================================ */
.go-replay-row {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 10px; flex-wrap: wrap;
}
.go-replay-row .btn.mini { font-size: 12px; padding: 5px 12px; }
.go-replay-row .gr-note { font-size: 11px; color: #57514a; }
.go-replay-row .btn.mini:disabled { opacity: .62; }

/* 保存面板 */
.rp-save { display: flex; flex-direction: column; gap: 10px; min-width: 280px; }
.rp-save-lead { font-size: 13px; color: #3a342c; line-height: 1.6; }
.rp-save-lead b { color: #c8553d; }
.rp-label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: #57514a; }
.rp-input {
  width: 100%; box-sizing: border-box; padding: 8px 10px; font-size: 14px;
  border: 1px solid #ddd5c7; border-radius: 8px; background: #fffdf8; color: #3a342c;
}
.rp-input:focus { outline: 2px solid rgba(232,163,61,.45); border-color: #e8a33d; }
.rp-save-note {
  font-size: 12px; line-height: 1.6; color: #57514a;
  background: #f5f0e6; border: 1px solid #e8dfcd; border-radius: 8px; padding: 8px 10px;
}
.rp-save-note b { color: #8a5a20; }
.rp-save-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rp-save-state { font-size: 12px; color: #a34a32; min-height: 16px; text-align: right; }

/* 回放大厅 */
.rp-page { max-width: 900px; margin: 0 auto; padding: 14px 16px 30px; }
.rp-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.rp-tab {
  flex: 1 1 240px; text-align: left; padding: 9px 14px; cursor: pointer;
  border: 1px solid #ddd5c7; border-radius: 10px; background: #fffdf8; color: #3a342c;
  font-size: 14px; font-weight: 700;
}
.rp-tab .rp-tab-note { display: block; font-size: 11px; font-weight: 400; color: #57514a; margin-top: 2px; }
.rp-tab.on { border-color: #e8a33d; background: #fdf3e2; box-shadow: 0 0 0 2px rgba(232,163,61,.18); }
.rp-intro { font-size: 12px; color: #57514a; line-height: 1.6; margin-bottom: 12px; }
.rp-list { display: flex; flex-direction: column; gap: 8px; }
.rp-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid #ddd5c7; border-radius: 10px;
  background: #fffdf8; box-shadow: 0 2px 6px rgba(90,70,30,.06);
}
.rp-row-main { flex: 1 1 300px; min-width: 0; }
.rp-row-title { font-size: 14px; color: #3a342c; margin-bottom: 3px; }
.rp-row-title b { font-weight: 800; }
.rp-row-sub { font-size: 12px; color: #3a342c; line-height: 1.5; }
.rp-row-sub i { font-style: normal; color: #a08a5a; font-weight: 800; padding: 0 3px; }
.rp-row-meta { font-size: 11px; color: #57514a; margin-top: 3px; }
.rp-row-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.rp-row-btns .btn.mini { font-size: 12px; padding: 5px 10px; }
.rp-row-btns .rp-danger { color: #a34a32; }
.rp-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font-size: 10px; font-weight: 700; vertical-align: 1px;
}
.rp-badge.ok { background: #e7f4e9; color: #2f7d52; border: 1px solid #bcdcc3; }

/* 战场内的回放控制条: 挂在 #action-bar 里, 不遮挡手牌 */
.rp-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; width: 100%;
  /* 右侧留出「结束回合」圆钮的位置(它是战场骨架的一部分, 回放里恒为灰锁态) ——
     不避让的话「🔄 换边」正好被那颗 64px 的圆钮压在下面 */
  padding-right: 76px;
  color: #3a342c; font-size: 12px;
}
.rp-bar-head { display: flex; align-items: center; gap: 8px; flex: 1 1 220px; min-width: 0; }
.rp-bar-title { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 96px; }
/* 标题/说明先收缩, 按钮绝不跟着挤 —— 否则「🙈 隐藏」「✕ 退出回放」会被压成竖排两行(标题变长时尤其明显) */
.rp-bar-head .btn { flex: 0 0 auto; white-space: nowrap; }
.rp-bar-title b { font-weight: 800; }
.rp-bar-meta { font-size: 11px; color: #57514a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rp-bar-ctl { display: flex; align-items: center; gap: 5px; flex: 2 1 430px; flex-wrap: wrap; }
.rp-bar-ctl .btn.mini { font-size: 12px; padding: 4px 9px; }
.rp-seek { flex: 1 1 130px; min-width: 100px; accent-color: #c8553d; cursor: pointer; }
.rp-pos { font-size: 11px; color: #57514a; white-space: nowrap; min-width: 52px; text-align: center; }
.rp-speed {
  font-size: 11px; padding: 3px 5px; border: 1px solid #ddd5c7; border-radius: 6px;
  background: #fffdf8; color: #3a342c; cursor: pointer;
}
.rp-bar-log {
  flex: 1 1 100%; display: flex; gap: 10px; flex-wrap: nowrap; overflow: hidden;
  font-size: 11px; color: #57514a; border-top: 1px dashed #e3dac9; padding-top: 4px;
}
.rp-log-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.rp-log-line:last-child { color: #3a342c; }
.rp-log-empty { color: #57514a; }
.rp-log-err { color: #a34a32; font-weight: 700; }
/* 回放时操作栏交给控制条, 别让主题里的战斗按钮样式插进来 */
.action-bar:has(.rp-bar) { padding: 7px 10px; }
@media (max-width: 720px) {
  .rp-bar-meta { display: none; }
  .rp-bar-ctl { flex-basis: 100%; }
  .rp-seek { flex-basis: 90px; }
  .rp-page { padding: 10px 8px 24px; }
}
/* 回放控制条「收起」后右下角的召回小圆钮(训练员 2026-11-18 第①条)。
   挂在 <body> 上、不占战场版式 —— 收起时 #action-bar 真的空掉(.action-bar:empty),
   画面与"正常对局里此刻没有按钮"完全一致; 只留这一个入口把控制条叫回来。
   位置在「结束回合」圆钮上方(它是对局骨架的一部分, 回放里恒为 is-locked 灰态)。 */
.rp-show {
  position: fixed; right: 18px; bottom: 92px; z-index: 61;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; line-height: 1; cursor: pointer;
  color: #fff; background: rgba(28, 22, 16, .68);
  border: 1px solid rgba(255, 255, 255, .30);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  opacity: .8; transition: opacity .15s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.rp-show:hover { opacity: 1; transform: scale(1.06); }
.rp-show:active { transform: scale(.94); }
@media (max-width: 720px) {
  .rp-show { right: 12px; bottom: 84px; width: 40px; height: 40px; font-size: 17px; opacity: .66; }
}

/* ===== CG-01 Geass 指令标记 / 特殊胜利演出 (2026-11-07) ===== */
/* ⚠ .card-thumb img 会命中这张标记图(width:100%/圆角/阴影), 所以这里必须整组盖回去 */
.card-thumb .geass-mark {
  position: absolute !important; left: 50%; top: 38%;
  width: 74% !important; height: auto !important; max-width: 104px;
  border-radius: 0 !important; box-shadow: none !important;
  /* ⚠ !important 是必须的: 领袖横置那条规则 `.leader-row-mini .card-thumb.rested img`
     (特异性 0,3,1) 会把这里的 transform 覆盖成 none —— translate(-50%,-50%) 一没,
     纹章的左上角就落在 (50%,38%) 而不是卡面中心, 表现就是
     「CG-01 对自己下达命令后自己横过来, 标记偏移」(2026-11-08 反馈 bmw6koxkt3f40)。 */
  transform: translate(-50%, -50%) rotate(-6deg) !important;
  pointer-events: none; z-index: 6;
  filter: drop-shadow(0 0 7px rgba(255,70,125,.95)) drop-shadow(0 0 18px rgba(255,60,110,.7))
          drop-shadow(0 0 30px rgba(255,45,110,.4));
  animation: geassMarkPulse 1.8s ease-in-out infinite;
}
@keyframes geassMarkPulse {
  0%, 100% { opacity: .82; }
  50% { opacity: 1; filter: drop-shadow(0 0 13px rgba(255,80,140,1)) drop-shadow(0 0 26px rgba(255,45,115,.8)); }
}
/* 全屏演出层: 不吃点击, 浅色/深色主题都靠粉色发光与白闪读得清 */
.geass-win-layer { position: fixed; inset: 0; z-index: 99999; pointer-events: none; overflow: hidden; }
.geass-win-flash {
  position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.92), rgba(255,70,120,.24) 45%, transparent 72%);
}
.geass-win-layer.impact .geass-win-flash { animation: geassFlashOut .5s ease-out forwards; }
@keyframes geassFlashOut { 0% { opacity: .95; } 100% { opacity: 0; } }
.geass-win-layer.impact { animation: geassShake .42s cubic-bezier(.36,.07,.19,.97); }
@keyframes geassShake {
  0%, 100% { transform: translate(0,0); }
  15% { transform: translate(-7px,5px); } 30% { transform: translate(6px,-4px); }
  45% { transform: translate(-5px,-3px); } 60% { transform: translate(4px,4px); }
  80% { transform: translate(-2px,1px); }
}
.geass-win-img {
  position: absolute; width: var(--geass-size, 132px); height: auto;
  transform: translate(-50%, -50%); transform-origin: center;
  filter: drop-shadow(0 0 18px rgba(255,45,105,.9)) drop-shadow(0 0 42px rgba(255,45,105,.6));
  animation: geassSlam .62s cubic-bezier(.2,.85,.25,1) forwards;
}
@keyframes geassSlam {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(7) rotate(-22deg); filter: blur(9px) drop-shadow(0 0 40px rgba(255,45,105,.9)); }
  16%  { opacity: 1; }
  62%  { opacity: 1; transform: translate(-50%,-50%) scale(1.18) rotate(5deg); filter: blur(0) drop-shadow(0 0 18px rgba(255,45,105,.9)); }
  72%  { transform: translate(-50%,-50%) scale(.82) rotate(0deg); }
  84%  { transform: translate(-50%,-50%) scale(1.08) rotate(0deg); }
  100% { opacity: 1; transform: translate(-50%,-50%) scale(1) rotate(0deg); }
}
.geass-win-ring {
  position: absolute; width: var(--geass-size, 132px); height: var(--geass-size, 132px);
  border: 4px solid rgba(255,80,130,.9); border-radius: 50%; opacity: 0;
  transform: translate(-50%,-50%) scale(.2);
}
.geass-win-layer.impact .geass-win-ring { animation: geassRing .6s ease-out forwards; }
@keyframes geassRing {
  0% { opacity: .95; transform: translate(-50%,-50%) scale(.2); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(3.4); }
}
.geass-win-layer.fade { opacity: 0; transition: opacity .5s; }
.geass-win-layer.fade .geass-win-img { transform: translate(-50%,-50%) scale(1.06); transition: transform .5s; }

/* ===== CG-01 指令标记·粉色辉光 (2026-11-07 / v775) ===== */
/* 三层: 呼吸光晕(.geass-glow) + 扩散光环(.geass-ring) + 纹章本体(.geass-mark)。
   ⚠ 都是 .card-thumb 的绝对定位子元素, z-index 压在纹章(6)下面, 且一律 pointer-events:none,
   不挡卡面点击/长按/右键。img 是 replaced element 不能有伪元素, 所以光晕另起 div。 */
.card-thumb .geass-glow,
.card-thumb .geass-ring {
  position: absolute !important; left: 50%; top: 38%;
  pointer-events: none; z-index: 5;
  transform: translate(-50%, -50%);
}
.card-thumb .geass-glow {
  width: 96%; height: 76%; border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(255, 122, 182, .72) 0%, rgba(255, 70, 140, .46) 34%,
    rgba(255, 45, 115, .20) 58%, rgba(255, 40, 110, 0) 78%);
  filter: blur(6px);
  animation: geassGlowBreath 1.8s ease-in-out infinite;
}
@keyframes geassGlowBreath {
  0%, 100% { opacity: .55; transform: translate(-50%, -50%) scale(.84); }
  50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.14); }
}
/* 十字星芒: 浅色/深色主题下都能一眼看见「在发光」 */
.card-thumb .geass-glow::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 128%; height: 2px; border-radius: 2px;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg, transparent, rgba(255, 150, 195, .95) 35%,
    rgba(255, 255, 255, .95) 50%, rgba(255, 150, 195, .95) 65%, transparent);
  box-shadow: 0 0 9px rgba(255, 80, 145, .95);
}
.card-thumb .geass-ring {
  width: 60%; height: 60%; border-radius: 50%;
  border: 2px solid rgba(255, 110, 170, .9);
  box-shadow: 0 0 12px rgba(255, 60, 130, .85), inset 0 0 14px rgba(255, 60, 130, .5);
  animation: geassRingPulse 1.8s ease-out infinite;
}
@keyframes geassRingPulse {
  0%   { opacity: .9; transform: translate(-50%, -50%) scale(.5); }
  70%  { opacity: 0;  transform: translate(-50%, -50%) scale(1.75); }
  100% { opacity: 0;  transform: translate(-50%, -50%) scale(1.75); }
}


/* ============ v789 leader-bottom-arrow-mobile ============
   2026-11-08 反馈 bmw7airtv797b「LRX-001 领袖底的牌手机端显示太大了, 要直接完全压在底下,
   直接用箭头表示底下有几张牌」: 桌面保留原来的卡图 + ×N; 手机端把徽章收成 ▼N 小胶囊,
   绝对定位贴到领袖卡底边(不再占 flex 的一格, 也不再画一整张与领袖同宽的卡图)。
   张数来自同一个 data-n / .lb-arrow, 点它照样打开领袖底详情。
   ⚠ 2026-11-08 回归 test_desktop_layout: 1080×498 / 1440×800 这类**桌面矮窗口**同样会命中
   (orientation: landscape) and (max-height: 560px) → 曾把电脑端的领袖底误收成 ▼N 小胶囊。
   按本项目桌面/手机判据补 (hover: none) 闸(与上面 6035 行同口径): 桌面 hover:hover +
   pointer:fine 不进这块, 只有真正触屏的手机/平板才收成箭头。 */
.heroine-badge > .lb-arrow, .lb-badge > .lb-arrow { display: none; }

@media (hover: none) and (orientation: portrait),
       (hover: none) and (orientation: landscape) and (max-height: 560px) {
  #op-leader, #my-leader { position: relative; }
  .heroine-badge, .lb-badge {
    position: absolute; bottom: -3px; left: 50%; transform: translateX(-50%);
    width: auto; min-width: 0; margin: 0; z-index: 6; align-self: auto;
    flex-shrink: 1; cursor: pointer;
  }
  .heroine-badge:hover, .lb-badge:hover { transform: translateX(-50%); }
  .heroine-badge > .card-thumb, .lb-badge > .card-thumb,
  .heroine-badge > .heroine-tag, .lb-badge > .heroine-tag,
  .heroine-badge > .lb-count, .lb-badge > .lb-count { display: none !important; }
  .heroine-badge.stacked::before, .lb-badge.stacked::before,
  .heroine-badge.stacked::after, .lb-badge.stacked::after { display: none !important; }
  .heroine-badge > .lb-arrow, .lb-badge > .lb-arrow {
    display: block;
    padding: 0 7px; height: 17px; border-radius: 9px; white-space: nowrap;
    background: #e0a63c; color: #241a05;
    font-size: 11px; font-weight: 800; line-height: 17px; text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.45), 0 0 0 1px rgba(255,231,178,.6);
  }
}

/* ================= 赛事（训练员 2026-11-21） ================= */
/* 首页入口: 与其它大按钮同排, 用金色描边区分「官方赛事」 */
.home-actions .btn.tour-entry { border-color: #d9c07a; background: linear-gradient(180deg,#fffdf6,#fbf3dd); }
.home-actions .btn.tour-entry:hover { border-color: #c9a227; }

.tour-page { max-width: 1180px; margin: 0 auto; padding: 18px 18px 60px; }
.tour-lead { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.tour-lead-t { font-size: 20px; font-weight: 700; letter-spacing: .04em; }
.tour-lead-s { color: var(--muted); font-size: 13px; margin-top: 6px; line-height: 1.6; }

/* ---------- 列表 ---------- */
.tour-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.tour-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; cursor: pointer; transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; gap: 8px; }
.tour-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.07); }
.tc-top { display: flex; align-items: center; gap: 8px; }
.tc-name { font-size: 16px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-mine { font-size: 11px; color: var(--ok); border: 1px solid #bcd9c6; background: #f2faf5; border-radius: 999px; padding: 1px 8px; }
.tc-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 12px; }
.tc-counts { font-size: 13px; color: var(--ink); }
.tc-counts b { color: var(--accent-dark); }
.tc-tip { font-size: 12px; color: var(--muted); }
.tc-tip.champ { color: #9a7b16; font-weight: 600; }
.tc-foot { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.tc-ok { color: var(--ok); font-size: 12px; }
.tour-chip { font-size: 11px; border-radius: 999px; padding: 2px 9px; border: 1px solid var(--border); background: #faf8f3; color: var(--muted); white-space: nowrap; }
.tour-chip.reg { color: #8a5a12; border-color: #e6cf9b; background: #fdf7e8; }
.tour-chip.checkin { color: #1f6d8c; border-color: #b6d7e4; background: #eef8fc; }
.tour-chip.live { color: #a53f2a; border-color: #e8bdb2; background: #fdf1ee; }
.tour-chip.done { color: var(--ok); border-color: #bcd9c6; background: #f2faf5; }
.tour-chip.off { color: var(--muted); }

/* ---------- 发布赛事 ---------- */
.tour-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 13px; }
.tour-field > span { color: var(--muted); }
.tour-field input, .tour-field select { padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: #fff; color: var(--ink); }
.tour-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- 详情页 ---------- */
.tour-hero { background: linear-gradient(180deg,#fffdf8,#fff); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.th-top { display: flex; align-items: center; gap: 10px; }
.th-top h2 { font-size: 22px; letter-spacing: .02em; }
.th-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.th-meta b { color: var(--ink); }
.th-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.btn.ok-btn { color: var(--ok); border-color: #bcd9c6; background: #f4fbf7; }
.tour-champ { margin-top: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: linear-gradient(90deg,#fdf6dd,#fffdf5); border: 1px solid #e8d79b; color: #8a6a10; font-weight: 600; }
.tour-champ b { font-size: 16px; color: #6d5408; }

.tour-admin { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border: 1px dashed #d9c07a; border-radius: 10px; background: #fffdf5; }
.tour-admin:empty { display: none; }
.tour-admin-cap { font-size: 12px; color: #9a7b16; font-weight: 700; letter-spacing: .08em; }
.tour-admin-tip { margin-left: 6px; }

.tour-tabs { display: flex; gap: 4px; margin: 16px 0 0; border-bottom: 1px solid var(--border); }
.tour-tab { background: none; border: none; padding: 10px 16px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; }
.tour-tab.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tour-body { padding-top: 14px; }

/* ---------- 我的对阵 ---------- */
.tour-mymatch { background: #fff8f4; border: 1px solid #efd3c8; border-radius: 12px; padding: 12px 14px; width: 100%; margin-top: 6px; }
.tmm-cap { font-size: 12px; color: var(--accent-dark); font-weight: 700; letter-spacing: .06em; }
.tmm-vs { display: flex; align-items: center; gap: 14px; margin: 10px 0; flex-wrap: wrap; }
.tmm-vs-t { color: var(--muted); font-weight: 700; font-size: 12px; }
.tmm-state { font-size: 14px; }
.tmm-state b.win { color: var(--ok); }
.tmm-state b.lose { color: var(--danger); }
.tmm-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.tmm-room { font-size: 12px; color: var(--muted); letter-spacing: .1em; }

/* ---------- 对阵 ---------- */
.tour-rounds { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tour-rbtn { background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 5px 13px; font-size: 13px; color: var(--muted); }
.tour-rbtn.on { color: #fff; background: var(--accent); border-color: var(--accent); }
.tour-rounds-tip { font-size: 12px; color: var(--muted); margin-left: 6px; }
.tour-matches { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
.tour-match { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.tour-match.bye { opacity: .86; }
.tm-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.tm-table { font-weight: 700; color: var(--ink); }
.tm-state { margin-left: auto; }
.tm-state.live { color: var(--accent-dark); font-weight: 600; }
.tm-state.done { color: var(--ok); }
.tm-body { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.tm-vs { font-size: 11px; color: var(--muted); font-weight: 700; }
.tm-ready { display: flex; gap: 10px; font-size: 11px; color: var(--ok); margin-top: 6px; min-height: 14px; }
.tm-mismatch { margin-top: 8px; font-size: 12px; color: #8a5a12; background: #fdf7e8; border: 1px solid #e6cf9b; border-radius: 8px; padding: 6px 8px; }
.tm-note { margin-top: 6px; font-size: 11px; color: var(--muted); }
.tm-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.tm-bye { font-size: 12px; color: var(--muted); margin-left: 8px; }

/* ---------- 选手块 ---------- */
.tour-p { display: flex; align-items: center; gap: 7px; min-width: 0; }
.tour-p.mini { gap: 6px; }
.tour-av { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #eee; flex-shrink: 0; }
.tour-av-ph { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#e8e2d4,#f7f4ec); color: #8a8578; font-weight: 700; font-size: 13px; }
.tour-p.mini .tour-av { width: 26px; height: 26px; }
.tour-pcol { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tour-pname { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tour-pname em { font-style: normal; font-size: 10px; color: var(--danger); border: 1px solid #e5c4c4; border-radius: 4px; padding: 0 3px; margin-left: 4px; }
.tour-p.win .tour-pname { color: var(--ok); }
.tour-p.dropped { opacity: .55; }
.tour-title { font-size: 10px; color: var(--tc, #c9a227); border: 1px solid var(--tc, #c9a227); border-radius: 4px; padding: 0 4px; line-height: 1.5; white-space: nowrap; align-self: flex-start; }
.tour-leader { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); min-width: 0; }
.tour-leader i { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px; }
.tour-leader.sm .tour-limg { width: 26px; }
.tour-leader.empty { font-size: 11px; color: #b6b0a2; }
.tour-limg { width: 38px; border-radius: 4px; display: block; flex-shrink: 0; }
.tour-p .tour-leader { margin-left: auto; }

/* ---------- 积分榜 ---------- */
.tour-table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.tour-table th, .tour-table td { padding: 8px 10px; font-size: 13px; text-align: left; border-bottom: 1px solid #f0ece4; vertical-align: middle; }
.tour-table th { background: #faf8f3; color: var(--muted); font-weight: 600; font-size: 12px; }
.tour-table tr:last-child td { border-bottom: none; }
.tour-table tr.dropped { opacity: .55; }
.ts-rank { font-weight: 700; color: var(--muted); width: 40px; }
.tour-stand-note, .tour-pair-note { margin-top: 10px; }

/* ---------- 选手列表 ---------- */
.tour-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.tour-pcard { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; flex-wrap: wrap; }
.tour-pcard.dropped { opacity: .55; }
.tour-pcard .tour-leader { margin-left: auto; }
.tour-pstate { font-size: 11px; color: var(--muted); }

/* ---------- 淘汰树 ---------- */
.tour-bracket-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.tour-bracket { display: flex; gap: 30px; overflow-x: auto; padding: 6px 2px 10px; align-items: stretch; }
.tb-col { min-width: 220px; display: flex; flex-direction: column; flex: 0 0 auto; }
.tb-cap { font-size: 12px; color: var(--muted); text-align: center; padding: 2px 0 8px; letter-spacing: .08em; }
.tb-list { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; flex: 1; }
.tb-match { position: relative; border: 1px solid var(--border); border-radius: 9px; padding: 6px; background: #fff; }
.tb-col + .tb-col .tb-match::before { content: ''; position: absolute; left: -17px; top: 50%; width: 17px; height: 1px; background: var(--border); }
.tb-slot { display: flex; align-items: center; gap: 6px; padding: 4px 5px; border-radius: 6px; min-height: 38px; }
.tb-slot + .tb-slot { border-top: 1px dashed #eee8dc; }
.tb-slot.win { background: rgba(58,143,93,.09); }
.tb-slot-av .tour-av { width: 24px; height: 24px; }
.tb-slot-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tb-slot-main b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-slot .tour-leader { margin-left: auto; }
.tb-slot .tour-limg { width: 24px; }
.tb-tbd { font-size: 12px; color: #b6b0a2; }
.tb-num { position: absolute; top: -7px; right: 6px; font-size: 9px; color: var(--muted); background: #fff; padding: 0 4px; }
.tb-watch { position: absolute; right: -10px; bottom: -8px; border: 1px solid var(--border); background: #fff; border-radius: 999px; width: 26px; height: 26px; font-size: 12px; padding: 0; }
.tb-champ-col { min-width: 200px; justify-content: center; }
.tb-champ { border: 1px solid #e8d79b; border-radius: 10px; background: linear-gradient(180deg,#fffdf3,#fdf6dd); padding: 10px; display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; }
.tb-champ .tour-p { flex-direction: column; }
.tb-champ .tour-leader { margin: 0; }
.tb-crown { font-size: 22px; }

/* ---------- 签到 / 填成绩 ---------- */
.tc-decks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; max-height: 46vh; overflow: auto; padding: 2px; }
.tc-deck { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border: 1px solid var(--border); background: #fff; border-radius: 10px; }
.tc-deck.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(200,85,61,.15); }
.tc-deck-l { width: 92px; border-radius: 6px; }
.tc-deck-n { font-size: 12px; font-weight: 600; }
.tc-deck-ln, .tc-deck-c { font-size: 11px; color: var(--muted); }
.tour-res-btns { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }

@media (max-width: 640px) {
  .tour-page { padding: 10px 10px 50px; }
  .tour-list { grid-template-columns: 1fr; }
  .tour-matches { grid-template-columns: 1fr; }
  .tour-pgrid { grid-template-columns: 1fr; }
  .tb-col { min-width: 190px; }
}

/* ---- 改 ID(训练员 2026-11-21): 名字旁的入口 + 弹窗 ---- */
.pf-name-edit { flex: 0 0 auto; padding: 2px 10px; font-size: 12px; border-radius: 999px; }
.pf-rename { min-width: 320px; max-width: 460px; display: flex; flex-direction: column; gap: 10px; }
.pf-rn-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #6b6153; }
.pf-rn-row b { color: #2b2620; font-size: 15px; }
.pf-rn-lab { font-size: 13px; font-weight: 600; color: #3b352c; }
.pf-rn-input {
  width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 15px;
  border: 1px solid #cfc6b4; border-radius: 8px; background: #fffdf8; color: #2b2620;
  outline: none;
}
.pf-rn-input:focus { border-color: #c9a227; box-shadow: 0 0 0 2px rgba(201, 162, 39, .18); }
.pf-rn-msg { font-size: 12px; line-height: 1.6; color: #6b6153; }
.pf-rn-msg.bad { color: #b3261e; }
.pf-rn-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: #6b6153; padding: 8px 10px;
  background: #f7f2e7; border-radius: 8px;
}
.pf-rn-cost { font-weight: 700; color: #b3261e; }
.pf-rn-actions { display: flex; justify-content: flex-end; gap: 10px; }
@media (max-width: 640px) {
  .pf-rename { min-width: 0; }
  .pf-name-edit { font-size: 11px; }
}
