/* ============================================================
 * Card Start GG V4.3 —— CS2 战术终端 HUD
 * 深色拟真电竞风：战场=卫星俯瞰图，棋子=部队徽章，HUD=作战系统
 * 阵营双色（T 橙 / CT 蓝）+ 功能三色（C4 红 / 金钱绿 / 选中黄）
 * 形状签名：右上斜切 12px 切角面板 · 信息即界面 · 宁可疏朗不看不清
 * ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg0: #0d1117;            /* 深空蓝黑底 */
  --bg1: #161b22;
  --bg2: #1c2430;
  --bg3: #222c3b;
  --line: #2c3644;
  --line-hi: #3f4c5f;
  --t: #dea24c;              /* T 方 恐怖分子橙 */
  --ct: #6a9ee0;             /* CT 方 反恐精英蓝 */
  --c4: #e5484d;             /* C4/伤害/警告 脉冲红 */
  --money: #9bc53d;          /* 经济系统绿 */
  --sel: #f2c14e;            /* 选中/拆解 黄 */
  --ok: #3fb950;             /* 可交互/可走 绿 */
  --tx: #e8eef5;
  --tx-dim: #97a4b5;
  --tx-faint: #5d6b7d;
  --pc: var(--t);            /* 玩家阵营色（JS 按出身切换） */
  --cut: 12px;
  --hud: 'Chakra Petch', 'Rajdhani', 'Bahnschrift', 'DIN Alternate', 'Arial Narrow', 'Noto Sans SC', sans-serif;
  --cn: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
  font-family: var(--cn);
  color: var(--tx);
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, #1a2332, transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}
/* 卫星地图细网格 */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(106, 158, 224, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106, 158, 224, .05) 1px, transparent 1px);
  background-size: 44px 44px;
}

h1, h2, h3, .kai { font-family: var(--hud); letter-spacing: 2px; }

/* ---------- 通用：切角面板 / 按钮 / LED 数字 ---------- */
.cut { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(28, 36, 48, .96), rgba(22, 27, 34, .96));
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .02), 0 4px 18px rgba(0, 0, 0, .45);
}
.panel::before {   /* 顶部高光线：层次靠描边不靠阴影 */
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent);
  z-index: 1;
}
.btn {
  font-family: var(--hud);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
  border: none; cursor: pointer;
  background: var(--bg3); color: var(--tx);
  letter-spacing: 2px; padding: 11px 22px; font-size: 15px;
  box-shadow: inset 0 0 0 1px var(--line-hi);
  transition: background .12s, box-shadow .12s, transform .12s;
}
.btn:hover:not(:disabled) { background: #2b3850; box-shadow: inset 0 0 0 1px var(--sel); transform: translateY(-1px); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(180deg, #f6cd67, var(--sel)); color: #191405; font-weight: 700;
  box-shadow: inset 0 0 0 1px #ffe4a1, 0 0 16px rgba(242, 193, 78, .25);
}
.btn.seal {
  background: linear-gradient(180deg, #ef5e63, var(--c4)); color: #fff; font-weight: 700;
  box-shadow: inset 0 0 0 1px #ff9296, 0 0 16px rgba(229, 72, 77, .3);
}
.btn.xl { font-size: 17px; padding: 13px 40px; }
.led { font-family: var(--hud); font-variant-numeric: tabular-nums; }

.screen { display: none; min-height: 100vh; padding: 18px; position: relative; z-index: 1; }
.screen.active { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.hidden { display: none !important; }
.seal-font { color: var(--sel); }
.gold { color: var(--money); }
.mut { color: var(--tx-faint); }

/* ================= 屏幕1：模式选择（游客 / 账号） ================= */
#screen-name { background: transparent; }
.logo { font-size: 46px; letter-spacing: 6px; color: var(--tx); text-shadow: 0 0 24px rgba(106, 158, 224, .45); }
.logo-sub { color: var(--tx-dim); letter-spacing: 3px; font-size: 15px; font-family: var(--hud); }
.panel-box {
  display: flex; flex-direction: column; gap: 12px; padding: 26px 30px; min-width: 330px; max-width: 92vw;
}
#screen-name .panel { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mode-btn { min-width: 280px; }
#mode-select, #login-form {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin-top: 14px;
}
#login-user, #login-pass {
  width: 280px;
  background: #0b0f14; border: 1px solid var(--line-hi); color: var(--tx);
  padding: 12px 14px; font-size: 16px; font-family: var(--cn); outline: none;
}
#login-user:focus, #login-pass:focus { border-color: var(--sel); box-shadow: 0 0 0 2px rgba(242, 193, 78, .22); }
.auth-btn { width: 280px; padding-left: 0; padding-right: 0; }
#login-hint { max-width: 320px; text-align: center; }
.mode-badge {
  margin-left: 8px; padding: 2px 10px; font-size: 12px; letter-spacing: 1px;
  color: var(--tx-dim); border: 1px solid var(--line-hi); vertical-align: 2px;
}
#btn-logout { margin-top: 4px; }
#player-corner {
  position: fixed; right: 24px; bottom: 18px; z-index: 5;
  font-size: 14px; color: var(--tx-dim); letter-spacing: 1px;
}
#player-corner b { color: var(--sel); font-size: 15px; }

/* ================= 联机：模式选择 / 地图页加入框 / 房间 ================= */
#screen-mode .panel, #screen-room .panel {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
#join-box {
  position: absolute; right: 24px; bottom: 20px; z-index: 5;
  display: flex; align-items: center; gap: 8px;
}
#join-box .join-title { font-size: 13px; color: var(--tx-dim); }
#join-code {
  width: 130px;
  background: #0b0f14; border: 1px solid var(--line-hi); color: var(--tx);
  padding: 10px 12px; font-size: 16px; font-family: var(--hud);
  letter-spacing: 4px; text-transform: uppercase; outline: none; text-align: center;
}
#join-code:focus { border-color: var(--sel); box-shadow: 0 0 0 2px rgba(242, 193, 78, .22); }
.room-panel { min-width: 420px; }
.room-code-box {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 18px 40px; margin: 6px 0;
  background: #0b0f14; border: 1px solid var(--line-hi);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
.room-code-label { font-size: 12px; letter-spacing: 4px; color: var(--tx-dim); font-family: var(--hud); }
.room-code {
  font-family: var(--hud); font-size: 46px; font-weight: 700; letter-spacing: 12px;
  color: var(--sel); text-shadow: 0 0 18px rgba(242, 193, 78, .45);
  font-variant-numeric: tabular-nums;
}
.room-map { font-size: 13px; color: var(--tx-dim); }
.room-players {
  display: flex; flex-direction: column; gap: 6px; margin: 8px 0; align-self: stretch;
}
.room-player { font-size: 15px; color: var(--tx-dim); }
.room-player b { color: var(--tx); }
#room-hint { text-align: center; max-width: 360px; }
.room-btns { display: flex; gap: 12px; margin-top: 6px; }

.hint { font-size: 13px; color: var(--tx-dim); }
.welcome { font-size: 15px; color: var(--tx-dim); }
.welcome b { color: var(--sel); }

/* ================= 屏幕2：菜单 ================= */
.rules-box { padding: 18px 24px; max-width: 560px; }
.rules-box h3 { color: var(--sel); letter-spacing: 3px; font-size: 17px; margin-bottom: 10px; }
.rules-box li {
  list-style: none; font-size: 13.5px; line-height: 1.55; color: var(--tx-dim);
  padding: 5px 0 5px 16px; position: relative; border-bottom: 1px dashed rgba(255, 255, 255, .06);
}
.rules-box li::before { content: '▸'; position: absolute; left: 0; color: var(--ct); }
.rules-box li b { color: var(--tx); }
.rules-box li b.seal-font, .rules-box li b.gold { color: inherit; }
.rules-box li b.seal-font { color: var(--sel); }
.rules-box li b.gold { color: var(--money); }
.menu-row { display: flex; gap: 10px; }

/* ================= 屏幕3：选将 ================= */
#screen-select { justify-content: flex-start; padding-top: 30px; }
.select-cap { font-size: 15px; color: var(--tx-dim); letter-spacing: 2px; }
.select-cap b { color: var(--sel); font-family: var(--hud); font-size: 18px; }
#hero-grid {
  display: block; width: min(900px, 96vw); padding: 16px;
}
.pick {
  width: 128px; padding: 12px 8px 10px; text-align: center; cursor: pointer;
  background: linear-gradient(180deg, #1d2736, #141b26);
  border: 1px solid var(--line-hi);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.pick:hover { transform: translateY(-3px); border-color: var(--ct); }
.pick.sel { /* 选中态：仅职业框变黄 */ }
.p-emoji { font-size: 34px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }
.p-name { font-weight: 700; font-size: 15px; margin: 4px 0 2px; letter-spacing: 2px; }
.p-atk { font-size: 12.5px; color: var(--c4); font-family: var(--hud); letter-spacing: 1px; }
.p-skill { font-size: 12px; color: var(--ct); margin-top: 3px; }
.select-foot { display: flex; align-items: center; gap: 16px; }
#sel-count { font-size: 14px; color: var(--tx-dim); }
#sel-count b { color: var(--sel); font-family: var(--hud); font-size: 18px; }

/* 难度三选一（§3.13：魔王 S / 大便 S / 魔王 C+，默认大便 S） */
.diff-row { display: flex; gap: 10px; width: min(900px, 96vw); margin-top: 12px; }
.diff-btn {
  flex: 1; padding: 9px 8px 8px; cursor: pointer; text-align: center; font-family: var(--cn); color: var(--tx-dim);
  background: linear-gradient(180deg, var(--bg2), var(--bg1));
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: border-color .12s, background .12s, color .12s;
}
.diff-btn b { display: block; font-size: 15px; letter-spacing: 2px; color: var(--tx); }
.diff-btn span { font-size: 11.5px; }
.diff-btn:hover { border-color: var(--line-hi); }
.diff-btn.active { border-color: var(--sel); background: linear-gradient(180deg, var(--bg3), var(--bg2)); }
.diff-btn.active b { color: var(--sel); }
.diff-btn.active span { color: var(--tx); }

/* ============================================================
 * 屏幕4：战斗 · 全屏地图 + 悬浮 HUD（无框极简）
 * ============================================================ */
#screen-battle.active {
  display: block; position: relative;
  height: 100vh; overflow: hidden;   /* 地图铺满全屏，HUD 悬浮其上 */
  background: #131210;               /* 全屏地图棕底，与棋盘底色一致（无蓝黑边框感） */
}
#screen-battle { --pc: var(--t); }

/* --- 底层：全屏地图（缩进避让四周 HUD，保证所有点位不被遮挡） --- */
#board-wrap {
  position: absolute; top: 140px; left: 216px; right: 92px; bottom: 172px; z-index: 1;
  display: flex; align-items: center; justify-content: center;
}
#board { width: 100%; height: 100%; background: #131210; }

/* --- 顶部：雷达 / 比分牌+计时器 --- */
#hud-top {
  position: absolute; top: 10px; left: 12px; right: 12px; z-index: 10;
  display: flex; justify-content: space-between; align-items: flex-start;
  pointer-events: none;
}
#hud-top > * { pointer-events: auto; }
#radar {
  position: relative; height: 122px; overflow: hidden;
  background: rgba(9, 13, 19, .72); border: 1px solid var(--line);
}
#radar-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(106, 158, 224, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106, 158, 224, .10) 1px, transparent 1px);
  background-size: 25% 25%;
}
#radar-scan {
  position: absolute; inset: -30%;
  background: conic-gradient(from 0deg at 50% 50%, rgba(63, 185, 80, .3), transparent 75deg);
  animation: radarSpin 3.4s linear infinite;
}
@keyframes radarSpin { to { transform: rotate(360deg); } }
#radar-dots i { position: absolute; width: 8px; height: 8px; margin: -4px; border-radius: 50%; }
#radar-dots .r-t { background: var(--t); color: var(--t); box-shadow: 0 0 7px var(--t); }
#radar-dots .r-ct { background: var(--ct); color: var(--ct); box-shadow: 0 0 7px var(--ct); }
#radar-dots .r-mine { box-shadow: 0 0 7px currentColor, 0 0 0 2px rgba(255, 255, 255, .9); }
#radar-dots .r-c4 {
  background: var(--c4); width: 11px; height: 11px; margin: -5.5px;
  box-shadow: 0 0 10px var(--c4); animation: blinkC4 .8s steps(2) infinite;
}
#radar-dots .r-fire { background: #f0883e; width: 6px; height: 6px; margin: -3px; box-shadow: 0 0 5px #f0883e; }
@keyframes blinkC4 { 50% { opacity: .12; } }
#radar-cap {
  position: absolute; right: 6px; bottom: 4px;
  font-family: var(--hud); font-size: 11px; letter-spacing: 2px; color: var(--tx-faint);
}

/* --- 比分栏：屏幕正上方居中 · 无背景板 --- */
#sb-col {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
#scoreboard {
  display: flex; align-items: stretch; height: 76px;
  background: none; border: none;
}
.sb-side {
  width: 96px; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--hud);
}
.sb-side b { font-size: 34px; text-shadow: 0 0 12px currentColor; }
.sb-side .sb-name { font-size: 14px; letter-spacing: 2px; opacity: .85; }
.sb-ct { color: var(--ct); }
.sb-t { color: var(--t); }
#sb-timer {
  flex: 1; min-width: 150px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: background .3s;
}
#timer-round { font-size: 13px; letter-spacing: 3px; color: var(--tx-dim); font-family: var(--hud); }
#timer-main { font-size: 30px; color: var(--tx); text-shadow: 0 0 10px rgba(232, 238, 245, .35); line-height: 1.05; }
#sb-timer.c4 { background: linear-gradient(180deg, rgba(229, 72, 77, .2), rgba(229, 72, 77, .05)); }
#sb-timer.c4 #timer-main {
  color: var(--c4); font-size: 34px; text-shadow: 0 0 16px rgba(229, 72, 77, .85);
}
#sb-timer.c4 #timer-round { color: var(--c4); }
#timer-main.blink { animation: ledBlink .55s steps(2) infinite; }
@keyframes ledBlink { 50% { opacity: .25; } }
#sb-sub {
  display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--tx-dim);
  font-family: var(--hud); letter-spacing: 1px;
}
#sb-sub b { color: var(--money); }
#foe-money { color: var(--money) !important; }

/* --- 右上：攻击提示流（仅攻击与被攻击，无框极简；己方受击红框） --- */
#atk-ticker {
  position: absolute; top: 42px; right: 12px; z-index: 30;
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  pointer-events: none; max-width: 46vw;
}
.atk-tick {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 9px; font-size: 13.5px; line-height: 1.2;
  color: var(--tx);
  animation: feedIn .2s ease-out;
}
@keyframes feedIn { from { opacity: 0; transform: translateX(26px); } }
.atk-tick.on-me {
  background: rgba(229, 72, 77, .30);
  border: 1px solid rgba(229, 72, 77, .85);
  box-shadow: 0 0 10px rgba(229, 72, 77, .35);
}
.atk-tick .at-what { font-family: var(--hud); font-size: 12px; letter-spacing: 1px; color: var(--tx-dim); }
.atk-tick .at-word { font-family: var(--hud); font-size: 12px; letter-spacing: 2px; color: var(--tx-dim); }
.atk-tick .at-dmg { font-family: var(--hud); font-weight: 700; font-size: 14.5px; color: #ff6b70; }
.atk-tick.out { opacity: 0; transition: opacity .5s; }

/* --- 左侧：作战单位（无框，贴屏幕最左端，纵向自适应） --- */
#team-panel {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%); z-index: 20;
  width: 200px; padding: 6px 8px 6px 10px;
  display: flex; flex-direction: column; gap: 4px; min-height: 0; max-height: 62vh; overflow-y: auto;
}
#team-panel #lib-count { font-size: 11px; color: var(--tx-dim); font-family: var(--hud); letter-spacing: 1px; margin-bottom: 2px; }
.panel-cap {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px;
  font-size: 13px; letter-spacing: 2px; color: var(--tx-dim); font-family: var(--hud);
  border-bottom: 1px solid var(--line); padding-bottom: 6px;
}
.panel-cap b { color: var(--tx); font-size: 14px; }

.team-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin-bottom: 5px;
  background: rgba(27, 35, 48, .85); border: 1px solid var(--line);
  transition: border-color .12s, opacity .2s;
}
.team-item .ti-badge {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: radial-gradient(circle at 35% 30%, #232d3c, #0b0f14 75%);
  border: 2.5px solid var(--pc);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), 0 0 8px rgba(0, 0, 0, .5);
}
.team-item .ti-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.team-item .ti-name { font-weight: 700; font-size: 13.5px; letter-spacing: 1px; }
.team-item .ti-sub { font-size: 12px; color: var(--tx-dim); font-family: var(--hud); letter-spacing: .5px; }
.team-item.on-field { border-color: rgba(242, 193, 78, .5); box-shadow: inset 0 0 0 1px rgba(242, 193, 78, .18); }
.team-item.on-field .ti-mark { font-size: 11px; color: var(--ok); font-family: var(--hud); letter-spacing: 1px; }
.team-item.in-lib { border-style: dashed; opacity: .66; }
.team-item.in-lib .ti-mark { font-size: 11px; color: var(--tx-faint); font-family: var(--hud); }
.team-item.dead { filter: grayscale(1); opacity: .42; }
.team-item.dead .ti-name, .team-item.dead .ti-badge { text-decoration: line-through; }
.team-item.dead .ti-mark { font-size: 11px; color: var(--tx-faint); }
.team-item.hl-buy { border-color: var(--sel); box-shadow: 0 0 0 2px var(--sel); cursor: pointer; }
.li-deploy {
  flex-shrink: 0; cursor: pointer; font-size: 12.5px; padding: 4px 10px;
  font-family: var(--hud); letter-spacing: 1px;
  color: var(--sel); background: rgba(242, 193, 78, .08);
  border: 1px solid rgba(242, 193, 78, .55);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
}
.li-deploy:hover:not(:disabled) { background: var(--sel); color: #191405; }
.li-deploy:disabled { opacity: .35; cursor: not-allowed; }

/* --- 中央战场：全屏铺满（HUD 悬浮于地图层级之上） --- */
#board-wrap { display: flex; align-items: center; justify-content: center; min-height: 0; min-width: 0; }
#board { width: 100%; height: 100%; max-width: none; max-height: none; background: #131210; border: none; }
#board text { user-select: none; }

/* 邻接路径（图档配色：暗棕线 + 中路金色流光） */
#board .p-base { stroke: #3a352a; stroke-width: 3; fill: none; opacity: .95; }
#board .p-flow { stroke: #8a7a4a; stroke-width: 2; fill: none; stroke-dasharray: 6 12; animation: flowDash 2.2s linear infinite; opacity: .55; }
@keyframes flowDash { to { stroke-dashoffset: -72; } }

/* 节点：填充/描边由 battle.js 按图档内联绘制（半径、配色逐类型对齐《货运枢纽地图设计_v6》） */
#board .n-cap { font-family: var(--hud); font-size: 14px; letter-spacing: 3px; fill: var(--tx-faint); }

/* 货运枢纽 v6（图档风格）：节点文字 / 可破坏墙 / 半墙 / 翼区标题 / 图例 */
#board .nn-name { font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 1px; pointer-events: none; }
#board .nn-big { font-size: 17px; }
#board .nn-cap { font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif; font-size: 11px; letter-spacing: .5px; pointer-events: none; }
#board .wing-title { font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif; font-weight: 700; font-size: 19px; letter-spacing: 1px; opacity: .8; pointer-events: none; }
#board .wing-sub { font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif; font-size: 10.5px; opacity: .55; pointer-events: none; }
#board .p-wall-edge { stroke: #6b4a26; stroke-width: 3; stroke-dasharray: 8 6; fill: none; opacity: .85; }
#board .p-wall-open { stroke: #3c372c; stroke-width: 2; fill: none; opacity: 0; pointer-events: none; }
#board .wall-group { cursor: default; }
#board .wall-group.hl-wall { cursor: crosshair; }
#board .wall-group.hl-wall .wall-bar { fill: var(--c4); }
#board .wall-group.hl-wall .wall-label { fill: var(--c4); opacity: 1; }
#board .wall-group.open .p-wall-edge,
#board .wall-group.open .wall-bar,
#board .wall-group.open .wall-label { opacity: 0; pointer-events: none; }
#board .wall-group.open .p-wall-open { opacity: .9; }
#board .wall-bar { fill: #8a5a2e; pointer-events: none; transition: fill .2s; }
#board .wall-label { font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif; font-size: 11px; fill: #e6c87a; opacity: .85; pointer-events: none; }
#board .halfwall-bar { fill: #b08d4a; pointer-events: none; opacity: .95; }
#board .map-legend .lg-wall { fill: #8a5a2e; }
#board .map-legend .lg-half { fill: #b08d4a; }
#board .map-legend .lg-dot.site { fill: #181420; stroke: #9a7ab8; stroke-dasharray: 3 2; }
#board .map-legend .lg-dot.outpost { fill: #22201a; stroke: #e6c87a; stroke-width: 2; }
#board .map-legend .lg-dot.anchor { fill: #1c2026; stroke: #7295c0; stroke-width: 2; }
#board .map-legend .lg-dot.blind { fill: #0b0a08; stroke: #6b6353; stroke-dasharray: 2 2; }
#board .map-legend .lg-txt { font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif; font-size: 11px; letter-spacing: 1px; fill: #93897a; }

/* 节点高亮：可走绿 / 可投黄 / 可埋包红脉冲（填充+粗圈） */
#board .n-hl { fill: transparent; stroke: transparent; stroke-width: 4; pointer-events: none; }
#board .node.hl-move .n-hl { stroke: var(--ok); animation: hlBreath 1.7s ease-in-out infinite; }
/* 移动光圈：绿=本回合免费，红=需 2AP */
#board .node.hl-move-free .n-hl { stroke: var(--ok); animation: hlBreath 1.7s ease-in-out infinite; }
#board .node.hl-move-paid .n-hl { stroke: var(--c4); animation: hlBreath 1.7s ease-in-out infinite; }
#board .node.hl-throw .n-hl { stroke: var(--sel); animation: hlBreath 1.7s ease-in-out infinite; }
#board .node.hl-path .n-hl { stroke: var(--ok); stroke-dasharray: 6 4; opacity: .8; }
#board .node.hl-site .n-hl { stroke: var(--c4); animation: hlBreath 1.25s ease-in-out infinite; }
/* 战争迷雾：盲区伏击成功后一次性失效——节点底色黑转灰（与普通点位一致） */
#board .node.blind-failed .platform { fill: #1d1a15; stroke: #3c372c; stroke-width: 2; stroke-dasharray: none; }
#board .node.blind-failed .nn-cap { fill: #5c554a; }
@keyframes hlBreath { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
#board .n-mark { fill: var(--ok); opacity: 0; pointer-events: none; }
#board .node.hl-move .n-mark, #board .node.hl-throw .n-mark { opacity: 1; }
#board .node.hl-throw .n-mark { fill: var(--sel); }

/* C4：扩散脉冲 + 装置小屏 + 拆解条 */
#board .c4pulse { fill: none; stroke: var(--c4); stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: c4Pulse 1.5s ease-out infinite; pointer-events: none; }
@keyframes c4Pulse { 0% { transform: scale(.45); opacity: .95; } 100% { transform: scale(2); opacity: 0; } }
#board .c4-dev-text { font-family: var(--hud); font-weight: 700; fill: #ff4444; animation: ledBlink 1s steps(2) infinite; }
#board .defuse-lab { font-family: var(--hud); font-size: 15px; fill: var(--sel); font-weight: 700; letter-spacing: 2px; }
#board .defuse-fill { fill: var(--sel); animation: ledBlink 1s steps(2) infinite; }

/* 棋子 = 战术徽章 + 武器挂载芯片 + 底部血条 */
#board .token { cursor: pointer; }
#board .tk-ring { fill: #1a2027; stroke-width: 4; }
#board .tk-ring2 { fill: none; opacity: .45; pointer-events: none; }
#board .token.side0 .tk-ring, #board .token.side0 .tk-ring2 { stroke: var(--t); }
#board .token.side1 .tk-ring, #board .token.side1 .tk-ring2 { stroke: var(--ct); }
#board .token.mine .tk-ring { stroke: #ffd84d; stroke-width: 4.5; }
#board .token.mine .tk-ring2 { stroke: #ffd84d; }
#board .tk-emoji { font-size: 30px; text-anchor: middle; pointer-events: none; }
#board .tk-chip path { fill: #14181d; stroke-width: 2; }
#board .token.side0 .tk-chip path { stroke: var(--t); }
#board .token.side1 .tk-chip path { stroke: var(--ct); }
#board .token.mine .tk-chip path { stroke: #ffd84d; }
#board .tk-hpb { fill: #0d1117; stroke: #1a2027; }
#board .tk-hp { fill: var(--ok); }
#board .tk-st { font-family: var(--hud); font-size: 12.5px; fill: var(--tx); text-anchor: middle; }
#board .token.hl-ally .tk-ring, #board .token.hl-ally .tk-ring2 { stroke: var(--ok); }
#board .token.hl-target .tk-ring, #board .token.hl-target .tk-ring2 { stroke: var(--c4); }
#board .token.hl-target .tk-ring2 { animation: hlBreath .9s ease-in-out infinite; }

/* 状态覆盖：烟雾椭圆 / 燃烧火圈 / 致盲 */
#board .tk-smoke ellipse { pointer-events: none; }
#board .tk-burn { fill: none; stroke: #f0883e; stroke-width: 2.5; stroke-dasharray: 5 6; transform-box: fill-box; transform-origin: center; animation: burnSpin 2.4s linear infinite; filter: drop-shadow(0 0 5px rgba(240,136,62,.75)); pointer-events: none; }
@keyframes burnSpin { to { transform: rotate(360deg); } }
#board .tk-blind { font-size: 17px; text-anchor: middle; pointer-events: none; }

/* 浮动伤害数字（SVG text） */
#board .float { font-family: var(--hud); font-weight: 700; font-size: 22px; text-anchor: middle; pointer-events: none; animation: floatUpS 1s ease-out both; }
#board .float.dmg { fill: #ff6b70; }
#board .float.heal { fill: var(--ok); }
#board .float.sh { fill: var(--ct); }
@keyframes floatUpS { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-30px); opacity: 0; } }
#board .fire-badge { font-size: 15px; pointer-events: none; }
#board .fire-badge .f-ticks { font-family: var(--hud); font-size: 12px; fill: #f0883e; }

/* --- 左下：干员状态（无框，贴屏幕最左下角） --- */
#op-panel {
  position: absolute; left: 0; bottom: 0; z-index: 22;
  padding: 8px 10px; display: flex; gap: 12px; align-items: center;
}
#op-badge {
  width: 58px; height: 58px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  background: radial-gradient(circle at 35% 30%, #232d3c, #0b0f14 78%);
  border: 3.5px solid var(--pc);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .55), 0 0 14px rgba(0, 0, 0, .55), inset 0 0 8px rgba(255, 255, 255, .05);
}
#op-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
#op-name { display: flex; align-items: center; gap: 8px; font-size: 14px; }
#op-name b { letter-spacing: 2px; }
/* 改1：职业徽标显示在角色名字右侧 */
.op-job {
  font-size: 11px; line-height: 1; padding: 3px 6px; letter-spacing: 1px;
  font-family: var(--hud); color: var(--tx-dim);
  border: 1px solid var(--line-hi); background: rgba(27, 35, 48, .8);
  white-space: nowrap;
}
.wtag {
  font-family: var(--hud); font-size: 11.5px; letter-spacing: 1px;
  color: var(--tx-dim); border: 1px solid var(--line-hi); padding: 1px 6px;
}
#op-armor { font-size: 12.5px; color: var(--ct); }
#op-hp { position: relative; height: 13px; background: rgba(0, 0, 0, .58); border: 1px solid var(--line-hi); }
#op-hp-fill {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--ok), var(--money));
  box-shadow: 0 0 8px rgba(63, 185, 80, .4);
  transition: width .25s;
}
#op-hp-fill.low { background: linear-gradient(90deg, #c23a40, var(--c4)); box-shadow: 0 0 8px rgba(229, 72, 77, .5); }
#op-hp-num {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: #fff; text-shadow: 0 0 5px rgba(0, 0, 0, .9);
}
#op-row2 { display: flex; align-items: center; gap: 8px; }
#op-row2 .lab { font-size: 12px; color: var(--tx-faint); font-family: var(--hud); letter-spacing: 2px; }
#ap-pips { display: flex; gap: 3px; }
#ap-pips i {
  width: 13px; height: 17px; background: #1e2836;
  clip-path: polygon(25% 0, 100% 0, 100% 100%, 0 100%, 0 25%);
  box-shadow: inset 0 0 0 1px #2e3b4d;
}
#ap-pips i.on { background: var(--money); box-shadow: 0 0 7px rgba(155, 197, 61, .6), inset 0 0 0 1px rgba(155, 197, 61, .85); }
#ap-text { font-size: 14px; color: var(--money); text-shadow: 0 0 8px rgba(155, 197, 61, .5); }
#op-status { font-size: 12.5px; color: var(--c4); letter-spacing: 1px; }

/* --- 下中：手牌（扑克牌比例 · 无框 · 只有卡牌） --- */
#hand-wrap {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 24;
  display: flex; flex-direction: column;
}
#hand { display: flex; gap: 10px; }
.card {
  position: relative; cursor: pointer; text-align: center;
  width: 88px; aspect-ratio: 2.5 / 3.5;   /* 扑克牌比例 */
  padding: 20px 4px 8px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  background: linear-gradient(180deg, #202a3a, #151c27);
  border: 1px solid var(--line-hi);
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .45);
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.card:hover:not(.dim) { transform: translateY(-3px); border-color: var(--ct); }
.card .cost {
  position: absolute; top: -6px; left: -6px; width: 23px; height: 23px;
  display: flex; align-items: center; justify-content: center;
  background: #0b0f14; color: var(--sel); border: 1px solid var(--sel);
  font-family: var(--hud); font-size: 12.5px; font-weight: 700;
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
  box-shadow: 0 0 8px rgba(242, 193, 78, .3);
}
.card .slot-no {
  position: absolute; top: 4px; right: 8px;
  font-family: var(--hud); font-size: 12px; color: var(--tx-faint);
  border: 1px solid var(--line); padding: 0 5px; letter-spacing: 1px;
}
.card .c-icon { font-size: 24px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.card .c-name { font-size: 12px; font-weight: 700; letter-spacing: 1px; margin: 3px 0 2px; }
.card .c-desc { font-size: 10px; line-height: 1.25; color: var(--tx-dim); }
.card .c-ap { font-size: 10px; color: var(--money); margin-top: 3px; font-family: var(--hud); }
.card.c-gre { border-color: rgba(229, 72, 77, .55); } .card.c-gre .c-name { color: #ff8589; }
.card.c-fla { border-color: rgba(242, 193, 78, .55); } .card.c-fla .c-name { color: var(--sel); }
.card.c-smo { border-color: rgba(139, 147, 160, .55); } .card.c-smo .c-name { color: #aeb6c2; }
.card.c-mol { border-color: rgba(240, 136, 62, .6); } .card.c-mol .c-name { color: #f6a05e; }
.card.c-mov { border-color: rgba(63, 185, 80, .55); } .card.c-mov .c-name { color: var(--ok); }
.card.armed {
  border-color: var(--sel); transform: translateY(-4px);
  box-shadow: inset 0 0 0 2px var(--sel), 0 0 18px rgba(242, 193, 78, .38);
}
.card.dim { opacity: .38; pointer-events: none; }

/* --- 右侧：资金 / 圆形商店钮 / 右下结束回合 --- */
#me-money {
  position: absolute; right: 14px; bottom: 96px; z-index: 25;
  font-size: 24px; color: var(--money); text-shadow: 0 0 14px rgba(155, 197, 61, .55);
  font-family: var(--hud); font-weight: 700;
}
#btn-store {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%); z-index: 25;
  width: 58px; height: 58px; border-radius: 50%;
  font-size: 24px; line-height: 1; cursor: pointer;
  color: var(--sel); background: rgba(11, 15, 21, .85);
  border: 1.5px solid rgba(242, 193, 78, .65);
  box-shadow: 0 0 12px rgba(242, 193, 78, .25);
  transition: transform .12s, box-shadow .12s, background .12s;
}
#btn-store:hover { transform: translateY(-50%) scale(1.08); background: rgba(38, 30, 8, .92); }
#btn-end-turn {
  position: absolute; right: 14px; bottom: 12px; z-index: 25;
  font-size: 15.5px; padding: 12px 22px;
}

/* --- 埋放 C4 / 商店 / 特效 / 横幅 / 提示 --- */
#plant-btn {
  position: fixed; left: 50%; bottom: 172px; transform: translateX(-50%);
  font-size: 16px; padding: 13px 32px; z-index: 46;
  animation: plantPulse 1.35s ease-in-out infinite;
}
@keyframes plantPulse {
  0%, 100% { box-shadow: inset 0 0 0 1px #ff9296, 0 0 10px rgba(229, 72, 77, .35); }
  50% { box-shadow: inset 0 0 0 1px #ff9296, 0 0 26px rgba(229, 72, 77, .75); }
}

#store-panel {
  position: fixed; right: 16px; top: 148px; width: 256px; z-index: 40;
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(180deg, rgba(24, 31, 42, .97), rgba(16, 21, 28, .97));
  border: 1px solid var(--line-hi);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .6);
}
#store-panel h3 { font-size: 16px; color: var(--sel); letter-spacing: 3px; }
#store-close {
  position: absolute; top: 8px; right: 10px; cursor: pointer;
  background: none; border: 1px solid var(--line-hi); color: var(--tx-dim);
  width: 26px; height: 26px; font-size: 13px;
}
#store-close:hover { color: var(--tx); border-color: var(--sel); }
#store-money { font-family: var(--hud); font-size: 14px; color: var(--money); }
.store-item {
  display: flex; align-items: center; gap: 9px; padding: 7px 9px; cursor: pointer;
  background: rgba(27, 35, 48, .8); border: 1px solid var(--line);
  transition: border-color .12s;
}
.store-item:hover { border-color: var(--ct); }
.store-item.picked { border-color: var(--sel); box-shadow: 0 0 0 2px var(--sel); }
.store-item .si-ico { font-size: 20px; }
.store-item .si-main { flex: 1; min-width: 0; }
.store-item .si-name { font-size: 13.5px; font-weight: 700; letter-spacing: 1px; }
.store-item .si-desc { font-size: 12px; color: var(--tx-dim); }
.store-item .si-price { font-family: var(--hud); font-size: 14px; color: var(--sel); text-shadow: 0 0 8px rgba(242, 193, 78, .4); }
.store-tip { font-size: 12px; color: var(--tx-faint); border-top: 1px dashed var(--line); padding-top: 6px; }

#flash-fx { position: fixed; inset: 0; z-index: 66; background: #fff; opacity: 0; pointer-events: none; }
#flash-fx.on { animation: flashAn .55s ease-out; }
@keyframes flashAn { 0% { opacity: .8; } 100% { opacity: 0; } }
#board-wrap.shake { animation: shakeK .5s ease; }
@keyframes shakeK {
  0%, 100% { transform: none; }
  15% { transform: translate(-5px, 3px); } 30% { transform: translate(5px, -3px); }
  45% { transform: translate(-4px, -2px); } 60% { transform: translate(4px, 2px); }
  75% { transform: translate(-2px, 1px); }
}

#turn-banner {
  position: fixed; top: 36%; left: 50%; transform: translateX(-50%); z-index: 68;
  background: rgba(8, 11, 16, .92); border: 1px solid var(--sel);
  color: var(--sel); font-family: var(--hud); font-size: 20px; letter-spacing: 6px;
  padding: 15px 40px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  box-shadow: 0 0 24px rgba(242, 193, 78, .25);
}
#game-banner {
  position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center;
  background: rgba(5, 8, 12, .74); backdrop-filter: blur(2px);
}
#game-banner .panel { padding: 34px 46px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
#gb-title { font-size: 27px; letter-spacing: 4px; font-family: var(--hud); }
#gb-sub { font-size: 14px; color: var(--tx-dim); }
#gb-score { font-size: 15px; color: var(--tx-dim); }
#gb-score b { color: var(--sel); font-size: 19px; font-family: var(--hud); }

#hero-tip {
  position: fixed; z-index: 60; width: 236px; pointer-events: none;
  padding: 10px 12px;
  background: rgba(10, 14, 20, .96); border: 1px solid var(--line-hi);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .6);
}
.tt-name { color: var(--sel); font-weight: 700; font-size: 14px; letter-spacing: 1px; margin-bottom: 3px; }
.tt-line { font-size: 12.5px; color: var(--tx-dim); line-height: 1.4; }
.tt-line b { color: var(--tx); }
.tt-skill { color: var(--ct); }
.tt-skill b { color: var(--ct); }
.tt-act { color: var(--t); }
.tt-act b { color: var(--t); }

#toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(20px);
  z-index: 80; padding: 11px 22px; font-size: 14px; letter-spacing: 1px;
  background: rgba(10, 14, 20, .95); border: 1px solid var(--sel); color: var(--sel);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: rgba(70, 15, 18, .96); border-color: var(--c4); color: #ffb9bb; }
#toast.gold { background: rgba(28, 38, 12, .96); border-color: var(--money); color: #cde38a; }

/* ================= 屏幕5：结算 ================= */
#result { z-index: 90; }
#result .panel-box { min-width: 340px; text-align: center; align-items: center; }
#result-emoji { font-size: 58px; filter: drop-shadow(0 0 18px rgba(242, 193, 78, .45)); }
#result-title { font-size: 27px; letter-spacing: 5px; }
#result-sub { font-size: 13.5px; color: var(--tx-dim); }
#result-score { font-size: 15px; color: var(--tx-dim); }
#result-score b { color: var(--sel); font-size: 21px; font-family: var(--hud); text-shadow: 0 0 10px rgba(242, 193, 78, .4); }

/* ================= 窄屏适配 ================= */
@media (max-width: 1080px) {
  #radar { width: 110px; height: 96px; }
  #scoreboard { width: 100%; }
  #sb-col { flex: 1; padding-left: 8px; }
  #team-panel { width: 170px; max-height: 50vh; }
  #team-list { display: grid; grid-template-columns: 1fr; gap: 5px; }
  .team-item { flex-direction: column; text-align: center; gap: 4px; margin-bottom: 0; padding: 8px 4px; }
  #hand-wrap { bottom: 8px; }
  .card { width: 70px; }
  #atk-ticker { max-width: 60vw; }
  #plant-btn { bottom: auto; top: 150px; }
  #store-panel { right: 8px; left: 8px; width: auto; top: auto; bottom: 90px; }
}
/* ============ V4.4 SVG 效果模板补丁 ============ */
/* 全屏扫描光带 */
#scanline { position: fixed; left: 0; right: 0; height: 130px; top: 0; background: var(--ct); opacity: .035; pointer-events: none; z-index: 3; animation: scanY 8s linear infinite; }
@keyframes scanY { from { transform: translateY(-140px); } to { transform: translateY(100vh); } }
/* 武器剪影通用 */
.wsvg { display: block; }
.f-wsvg { width: 34px; height: 15px; flex: none; display: block; }
/* 雷达 SVG 网格 */
#radar-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#radar-grid path.gr { stroke: #46525f; stroke-width: 2; fill: none; }
#radar-grid path.rd { stroke: #5d6b7c; stroke-width: 1.2; stroke-dasharray: 3 4; fill: none; }
#radar-grid text { font-family: var(--hud); font-size: 13px; fill: #8b949e; letter-spacing: 3px; }
#radar-dots circle { pointer-events: none; }
.r-dot { filter: drop-shadow(0 0 4px currentColor); }
.r-dot.r-mine { stroke: #fff; stroke-width: 1.5; }
.r-t { fill: var(--t); color: var(--t); }
.r-ct { fill: var(--ct); color: var(--ct); }
.r-c4 { fill: var(--c4); color: var(--c4); animation: ledBlink .8s steps(2) infinite; }
.r-fire { fill: #f0883e; color: #f0883e; }
/* 干员面板：AP 环形仪表 + 武器挂载槽 */
#op-panel { gap: 12px; }
#ap-ring { width: 58px; height: 58px; flex: none; }
#ap-ring .ar-bg { fill: none; stroke: #1a2027; stroke-width: 9; stroke-linecap: round; }
#ap-ring .ar-fill { fill: none; stroke: var(--sel); stroke-width: 9; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(242,193,78,.55)); transition: stroke-dasharray .3s; }
#ap-ring #ap-text { font-family: var(--hud); font-size: 28px; font-weight: 700; fill: var(--tx); }
#ap-ring .ar-lab { font-family: var(--hud); font-size: 11px; fill: var(--tx-dim); letter-spacing: 2px; }
#op-wslot { width: 78px; height: 36px; flex: none; margin-left: auto; align-self: center; }
#op-wslot .ws-chip { fill: #14181d; stroke: var(--line-hi); stroke-width: 1.5; }
/* 手牌：AP 费用文本化 + 选中亮底 */
.card .c-ap { font-size: 13px; color: var(--tx-dim); }
.card.armed { background: rgba(255,216,77,.1); }

/* ============ V4.5 音效/拖拽/放大补丁 ============ */
/* 棋子放大 */
#board .tk-emoji { font-size: 38px; }
#board .tk-st { font-size: 14px; }
#board .float { font-size: 25px; }
#board .tk-blind { font-size: 20px; }
/* 卡牌拖拽 */
.card[draggable="true"] { cursor: grab; }
.card[draggable="true"]:active { cursor: grabbing; }
.card.dragging { opacity: .55; }
.token.drag-over .tk-ring { stroke: #fff !important; stroke-width: 5; }
.token.drag-over .tk-ring2 { stroke: #fff !important; opacity: .9; }
#drag-tip {
  position: fixed; z-index: 260; pointer-events: none;
  background: rgba(10, 14, 19, .96); border: 1px solid var(--sel);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  padding: 8px 14px; font-size: 14px; color: var(--tx);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .6); letter-spacing: .5px;
}
#drag-tip b { color: var(--sel); }
#drag-tip.hidden { display: none; }

/* ============ V4.6 堆叠/滚动/格洛克补丁 ============ */
/* 同格堆叠：右上角缩小角色角标（点击互换主位） */
#board .tk-mini { cursor: pointer; }
#board .tk-mini .tkm-ring { fill: #14181d; stroke-width: 2.5; }
#board .tk-mini.side0 .tkm-ring { stroke: var(--t); }
#board .tk-mini.side1 .tkm-ring { stroke: var(--ct); }
#board .tk-mini .tkm-emoji { font-size: 15px; text-anchor: middle; pointer-events: none; }
#board .tk-mini:hover .tkm-ring { stroke: #fff; filter: drop-shadow(0 0 4px rgba(255,255,255,.7)); }
#board .tk-mini.hl-target .tkm-ring { stroke: var(--c4) !important; animation: hlBreath .9s ease-in-out infinite; }
#board .tk-mini.hl-ally .tkm-ring { stroke: var(--ok) !important; }
#board .tk-mini.drag-over .tkm-ring { stroke: #fff !important; stroke-width: 3.5; }
/* 头像 emoji 化：地图主位角色 emoji */
#board .tk-avatar { font-size: 40px; text-anchor: middle; pointer-events: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
/* ============ V4.7 武器库动效 ============ */
#store-panel.open { animation: storeSlide .38s cubic-bezier(.2, .9, .3, 1.05) both; }
@keyframes storeSlide {
  from { transform: translateY(-22px) scaleY(.94); opacity: 0; }
  60%  { opacity: 1; }
  to   { transform: translateY(0) scaleY(1); opacity: 1; }
}
#store-panel { transform-origin: 50% 0; }

/* ============ V4.8 选人职业系统 ============ */
.p-jobs { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; margin-top: 5px; min-height: 20px; }
.pj {
  font-size: 10px; letter-spacing: .5px; padding: 1.5px 6px; border-radius: 3px;
  background: rgba(122, 138, 148, .14); color: var(--tx-faint);
  border: 1px solid rgba(122, 138, 148, .3); white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 0 100%);
}
.pj.on {
  background: rgba(255, 193, 7, .18); color: var(--sel);
  border-color: var(--sel); font-weight: 700;
  box-shadow: 0 0 8px rgba(255, 193, 7, .25);
}
.pick.locked { opacity: .38; filter: grayscale(.8); cursor: not-allowed; }
.pick.locked:hover { transform: none; border-color: rgba(122, 138, 148, .3); }
.select-sub b { color: var(--sel); }

/* ============ V4.9 职业分区选人 ============ */
.job-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.job-tab {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; letter-spacing: 1px; font-weight: 700; color: var(--tx-soft);
  background: rgba(16, 22, 30, .75); border: 1px solid rgba(122, 138, 148, .35);
  padding: 7px 13px; cursor: pointer; user-select: none;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: all .15s;
}
.job-tab:hover { border-color: var(--sel); color: #fff; }
.job-tab.active {
  background: rgba(255, 193, 7, .14); border-color: var(--sel); color: var(--sel);
  box-shadow: 0 0 12px rgba(255, 193, 7, .18), inset 0 0 14px rgba(255, 193, 7, .06);
}
.jt-ico { font-size: 15px; }
.jt-count {
  font-size: 10.5px; font-weight: 700; padding: 0 6px; line-height: 16px; border-radius: 8px;
  background: rgba(122, 138, 148, .18); color: var(--tx-faint);
}
.jt-count.full { background: rgba(255, 193, 7, .22); color: var(--sel); }
.job-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; min-height: 150px; }

/* ============ V4.4 区域特效 / 护甲 / 保留卡 / 主动技就绪补丁 ============ */
/* 烟火区域特效：仅展示，不拦截点位点击 */
#b-fx, #b-fx * { pointer-events: none; }
#board .zone-fire .zf-ring { fill: none; stroke: #f0883e; stroke-width: 2.5; stroke-dasharray: 5 6; transform-box: fill-box; transform-origin: center; animation: burnSpin 2.4s linear infinite; filter: drop-shadow(0 0 5px rgba(240,136,62,.75)); }
#board .zf-emoji { font-size: 26px; text-anchor: middle; filter: drop-shadow(0 0 6px rgba(240,136,62,.85)); }
#board .zone-smoke { animation: hlBreath 2.6s ease-in-out infinite; }
#board .zs-emoji { font-size: 22px; text-anchor: middle; opacity: .9; }
#board .zone-fire .f-ticks { fill: #f0883e; }
#board .zone-smoke .f-ticks { fill: #aeb8c0; }
/* 商店：资金不足置灰不可选 */
.store-item.poor { opacity: .35; filter: grayscale(.9); cursor: not-allowed; }
.store-item.poor .si-price { color: var(--c4); text-shadow: none; }
/* 保留卡牌标记 */
.card.keep-mark { border-color: rgba(155,197,61,.65); box-shadow: inset 0 0 0 1px rgba(155,197,61,.55); }
.card .c-keep {
  position: absolute; top: 4px; left: 8px; font-size: 11px; line-height: 1;
  color: var(--money); border: 1px solid var(--money); padding: 1px 4px; letter-spacing: 1px;
  background: rgba(28, 38, 12, .5);
}
/* 主动技能就绪：改2（2026-10-05 拍板）——蓝色火焰环绕角色头像，火焰层级在头像之下（不遮挡头像），点击头像释放 */
.team-item .ti-badge { position: relative; }
.team-item .ti-badge .hface-emoji { position: relative; z-index: 1; }   /* 头像压在火焰之上 */
.team-item .ti-badge.skill-ready { border-color: var(--ct); cursor: pointer; }
.team-item .ti-badge.skill-ready::after {
  content: ''; position: absolute; inset: -12px -10px -8px; z-index: 0;
  border-radius: 45% 55% 50% 50% / 62% 62% 38% 38%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 34% 30% at 18% 94%, rgba(178, 214, 255, .98), transparent 66%),
    radial-gradient(ellipse 38% 34% at 82% 94%, rgba(134, 180, 240, .95), transparent 66%),
    radial-gradient(ellipse 58% 50% at 50% 104%, rgba(74, 134, 224, .9), transparent 68%),
    radial-gradient(ellipse 26% 20% at 50% 90%, rgba(228, 242, 255, 1), transparent 72%),
    radial-gradient(ellipse 80% 70% at 50% 52%, rgba(74, 134, 224, .5), transparent 72%);
  filter: blur(1.6px) saturate(1.5);
  animation: skillFlame .8s ease-in-out infinite alternate;
}
/* 底部两簇亮蓝火舌（在头像之下，随火焰摇曳） */
.team-item .ti-badge.skill-ready::before {
  content: ''; position: absolute; left: 50%; bottom: -9px; z-index: 0;
  width: 26px; height: 20px; transform: translateX(-50%);
  pointer-events: none; filter: blur(1px);
  background:
    radial-gradient(ellipse 42% 78% at 30% 92%, rgba(178, 214, 255, .95), transparent 70%),
    radial-gradient(ellipse 42% 68% at 72% 96%, rgba(108, 164, 240, .9), transparent 70%);
  animation: skillFlame .62s ease-in-out infinite alternate-reverse;
}
@keyframes skillFlame {
  0%   { transform: scaleY(.78) scaleX(.94) translateY(3px); opacity: .8; border-radius: 45% 55% 50% 50% / 62% 62% 38% 38%; }
  50%  { transform: scaleY(1.1) scaleX(1.05) translateY(-2px); opacity: 1; border-radius: 52% 48% 46% 54% / 68% 58% 42% 32%; }
  100% { transform: scaleY(.9) scaleX(.98) translateY(0); opacity: .88; border-radius: 48% 52% 54% 46% / 58% 66% 34% 42%; }
}
/* 悬浮面板：初始伤害（白）与技能加成（技能色）分层 */
.tt-atk { font-size: 12.5px; color: var(--tx); margin-top: 2px; line-height: 1.5; }
.tt-atk .d-base { color: #fff; font-family: var(--hud); }
.tt-atk .d-plus { font-family: var(--hud); font-weight: 700; }
.tt-dmgs { border-left: 2px solid var(--line-hi); padding-left: 6px; margin-top: 2px; }
.tt-dmg { font-size: 12px; line-height: 1.5; }

/* ============ V4.5 补丁：护盾重做 / 虾金标 / 保留卡组栏 / 状态标注 / 突击卡 ============ */
/* 角色右上角护盾：蓝色盾标 + 耐久条（蓝=剩余，灰=已损耗）+ 蓝色数值（放大版） */
#board .tk-armor .ta-ico { font-size: 21px; filter: drop-shadow(0 0 5px rgba(106,158,224,.9)); }
#board .tk-armor .ta-bar { fill: #4a5563; stroke: #1a2027; stroke-width: 1; }
#board .tk-armor .ta-cur { fill: var(--ct); filter: drop-shadow(0 0 4px rgba(106,158,224,.65)); }
#board .tk-armor .ta-num { font-family: var(--hud); font-size: 12px; fill: var(--ct); font-weight: 700; }
/* 虾「不同意」金色标语 */
#board .xia-tag { animation: xiaTag 1.8s ease-out both; }
@keyframes xiaTag {
  0% { opacity: 0; transform: translateY(16px) scale(.55); }
  14% { opacity: 1; transform: translateY(0) scale(1.1); }
  24% { transform: translateY(0) scale(1); }
  76% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-18px); }
}
#board .xt-box { fill: rgba(24,18,4,.94); stroke: var(--sel); stroke-width: 2.5; filter: drop-shadow(0 0 9px rgba(242,193,78,.75)); }
#board .xt-txt { font-family: var(--hud); font-size: 21px; font-weight: 700; fill: var(--sel); letter-spacing: 3px; }
/* 作战单位：状态标注 + 护甲蓝色数值 */
.ti-sts { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.ti-st { font-size: 10.5px; padding: 0 4px; border: 1px solid; letter-spacing: .5px; white-space: nowrap; }
.st-burn { color: #f0883e; border-color: rgba(240,136,62,.6); background: rgba(240,136,62,.12); }
.st-blind { color: var(--sel); border-color: rgba(242,193,78,.55); background: rgba(242,193,78,.1); }
.st-smoke { color: #aeb6c2; border-color: rgba(139,147,160,.5); background: rgba(139,147,160,.12); }
.ti-armor { color: var(--ct); border: 1px solid rgba(106,158,224,.55); background: rgba(106,158,224,.1); font-size: 10.5px; padding: 0 4px; font-family: var(--hud); white-space: nowrap; }
/* 1 行动值突击移动卡（C4 防守增益） */
.card.c-rush { border-color: rgba(155,197,61,.65); box-shadow: inset 0 0 0 1px rgba(155,197,61,.4); }
.card.c-rush .c-ap { color: var(--money); font-weight: 700; }
.card .c-rush-tag {
  position: absolute; top: 4px; right: 34px; font-size: 10px; line-height: 1;
  color: var(--money); border: 1px solid var(--money); padding: 1px 3px;
  background: rgba(28,38,12,.55); font-family: var(--hud); font-weight: 700;
}
/* 窄屏适配由流式布局自然处理 */

/* ============ V4.6 补丁：敌方头像栏（比分栏右侧） / 退出确认 ============ */
/* 敌方情报：圆形头像，阵亡置灰（不展示数值/武器） */
#ei-avatars {
  display: flex; align-items: center; gap: 7px;
  margin-left: 16px; padding-left: 14px;
  border-left: 1px solid var(--line);
}
#ei-avatars .eia {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; line-height: 1;
  background: rgba(11, 15, 21, .8);
  border: 1.5px solid var(--line-hi);
  box-shadow: 0 0 7px rgba(0, 0, 0, .4);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5));
  transition: filter .4s, opacity .4s;
}
#ei-avatars .eia.dead {
  filter: grayscale(1) brightness(.5);
  opacity: .55;
}
#quit-confirm {
  position: fixed; inset: 0; z-index: 85;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 8, 12, .74); backdrop-filter: blur(2px);
}
#quit-confirm.hidden { display: none; }
#quit-confirm .panel { padding: 28px 36px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
#qc-title { font-size: 19px; letter-spacing: 4px; font-family: var(--hud); color: var(--tx); }
#qc-sub { font-size: 12.5px; color: var(--tx-dim); }
#quit-confirm .qc-btns { display: flex; gap: 10px; margin-top: 4px; }
#board .act-tag { animation: actTag 1.5s ease-out both; }
@keyframes actTag {
  0% { opacity: 0; transform: translateY(12px) scale(.7); }
  15% { opacity: 1; transform: translateY(0) scale(1); }
  75% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-14px); }
}
#board .at-box { fill: rgba(12, 16, 22, .92); stroke-width: 2; }
#board .at-txt { font-family: var(--hud); font-size: 15px; font-weight: 700; letter-spacing: 2px; }

/* ===== 角色卡纸卡（code.html 哑光卡纸版嵌入） ===== */
#hero-grid .pick { perspective: 900px; }
.pick { background: none; border: none; padding: 0; width: 158px; }
.pick:hover { transform: none; border-color: transparent; }
/* 选中态：仅职业框变黄（.pj.on），不加卡框 */
.pick.locked { opacity: .38; filter: grayscale(.8); }
.pick.locked:hover { transform: none; }
.ccard.live { transition: transform .08s linear; }
.ccard { position: relative; width: 156px; height: 228px; margin: 0 auto; border-radius: 2px; background: #1a1712;
  transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s cubic-bezier(.2, .9, .3, 1.25); }
.ccard.live { transition: transform .08s linear; }
.cdepth { position: absolute; inset: 0; border-radius: 2px; transform: translateZ(-8px); background: #0d0b08;
  box-shadow: 0 16px 32px rgba(0, 0, 0, .55); }
.cside { position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 1.5px; transform: translateZ(22px); }
.cphoto { position: absolute; top: 12px; left: 13px; right: 13px; height: 118px; overflow: hidden;
  transform: translateZ(26px); transform-style: preserve-3d; }
.ctian { position: absolute; inset: 9px; border: 1px dashed; transform: translateZ(2px); }
.ctian::before, .ctian::after { content: ''; position: absolute; background: currentColor; opacity: .4; }
.ctian::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.ctian::after { top: 50%; left: 0; right: 0; height: 1px; }
.cb1, .cb2 { position: absolute; inset: 0; transform: translateZ(8px); }
.cb2 { transform: translateZ(15px); }
.cb1 svg, .cb2 svg { width: 100%; height: 100%; }
.cglass { position: absolute; inset: 0; transform: translateZ(17px); pointer-events: none;
  background: linear-gradient(115deg, transparent 44%, rgba(255, 244, 224, .035) 48%, rgba(255, 244, 224, .085) 50%, rgba(255, 244, 224, .035) 52%, transparent 56%);
  background-size: 200% 200%; background-position: var(--gx, 55%) var(--gy, 45%);
  opacity: var(--go, 0); transition: opacity .35s ease; }
.cedge { position: absolute; inset: 0; border-radius: 2px; transform: translateZ(38px); pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 244, 224, var(--el, 0)), transparent 14%),
              linear-gradient(270deg, rgba(255, 244, 224, var(--er, 0)), transparent 14%),
              linear-gradient(180deg, rgba(255, 244, 224, var(--et, 0)), transparent 10%);
  opacity: var(--eo, 0); transition: opacity .35s ease; }
.cbignum { position: absolute; top: 128px; right: 9px; font-family: 'Barlow Condensed', 'Arial Narrow', var(--hud), sans-serif;
  font-weight: 700; font-size: 47px; line-height: 1; transform: translateZ(9px) skewX(-8deg); }
.cname { position: absolute; top: 137px; left: 13px; right: 46px; transform: translateZ(16px); }
.cname b { display: block; color: #e8e2d6; font-size: 16px; letter-spacing: 1px; line-height: 1.15; }
.crole { display: block; margin-top: 4px; font-size: 8.5px; letter-spacing: 2.5px; white-space: nowrap; }
.crule { margin-top: 7px; height: 1px; background: #262219; }
.cskill { position: absolute; top: 183px; left: 13px; right: 13px; transform: translateZ(12px);
  font-size: 9.5px; color: #93897a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cdata { position: absolute; bottom: 9px; left: 13px; right: 13px; transform: translateZ(13px);
  display: flex; justify-content: space-between; align-items: baseline; }
.cno { font-family: 'Barlow Condensed', 'Arial Narrow', var(--hud), sans-serif; font-weight: 600; font-size: 10px;
  color: #6a6252; transform: skewX(-8deg); }
.chp { font-family: 'Barlow Condensed', 'Arial Narrow', var(--hud), sans-serif; font-weight: 700; font-size: 15px;
  color: #e8e2d6; transform: skewX(-8deg); }
.chp small { font-weight: 500; font-size: 8px; color: #93897a; margin-left: 2px; font-family: 'Noto Sans SC', sans-serif; }
.tT { color: #de9f4c; }
.tCT { color: #7295c0; }
.hface { display: inline-block; vertical-align: -6px; }
#hero-grid .pick .p-jobs { min-height: 0; margin-top: 6px; }

/* ============ V5.0 职业系统补丁：选中态 / 栏内灰置 / 悬浮面板职业徽标 ============ */
/* 选中态：金色描边发光 + 上浮 + “已选”角标（明显区别于未选中） */
.pick.sel { transform: translateY(-4px); }
.pick.sel .ccard {
  outline: 2px solid var(--sel); outline-offset: 3px;
  box-shadow: 0 0 20px rgba(242, 193, 78, .55), 0 14px 30px rgba(0, 0, 0, .55);
}
.pick.sel .ccard::after {
  content: '✔ 已选'; position: absolute; top: -10px; left: 10px; z-index: 40;
  transform: translateZ(42px);
  background: linear-gradient(180deg, #f6cd67, var(--sel)); color: #191405;
  font-family: var(--hud); font-size: 11px; font-weight: 700; letter-spacing: 1px;
  padding: 2px 8px; clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
  box-shadow: 0 0 10px rgba(242, 193, 78, .5);
}
/* 栏内灰置：同职业栏中未被选中的角色（含已在队伍中的） */
.pick.locked { opacity: .32; filter: grayscale(.9) brightness(.6); }
.pick.locked:hover { transform: none; }
.pick.locked .ccard { box-shadow: 0 8px 18px rgba(0, 0, 0, .4); }
/* 悬浮面板：职业徽标 */
.tt-name .tt-job {
  font-family: var(--hud); font-size: 10.5px; letter-spacing: 1px;
  color: var(--money); border: 1px solid rgba(155, 197, 61, .55);
  background: rgba(155, 197, 61, .1); padding: 0 5px; margin-left: 6px;
  white-space: nowrap;
}
/* 新英雄表情占位（暂无立绘） */
.c-emoji-face { font-size: 62px; line-height: 116px; text-align: center; transform: translateZ(26px); filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .5)); }
.hface-emoji { display: inline-block; vertical-align: -4px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }

/* ============================================================
 * §3.14 元系统：主界面 HUD · 商店 · 仓库 · 开箱 · 备战库 · 升级奖励
 * ============================================================ */

/* ---------- 主菜单顶部布局：备战库 | 仓库 | 开始游戏 | 商店 ---------- */
.menu-top-row {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin: 14px 0 10px;
}
.menu-start { min-width: 220px; font-size: 20px; letter-spacing: 4px; }
.menu-side { min-width: 108px; }
#btn-online { display: block; margin: 6px auto 12px; opacity: .55; }
#menu-hud {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  max-width: 460px; margin: 8px auto 0; padding: 7px 14px;
  background: rgba(13, 17, 23, .7); border: 1px solid var(--line);
  font-family: var(--hud); font-size: 13px; color: var(--tx-dim);
}
#mh-level { color: var(--sel); font-weight: 700; letter-spacing: 1px; }
#mh-xpbar { width: 120px; height: 7px; background: #0a0e13; border: 1px solid var(--line); overflow: hidden; }
#mh-xpbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--money), #cfe08a); transition: width .4s; }
.mh-sep { color: var(--tx-faint); }
#mh-stars { color: #f5c542; }
#mh-keys { color: #9aa7b8; }

/* ---------- 地图选择 ---------- */
#map-grid { display: flex; gap: 18px; justify-content: center; margin: 22px 0; }
.map-card {
  width: 300px; padding: 20px; cursor: pointer; text-align: center;
  background: linear-gradient(180deg, rgba(28, 36, 48, .96), rgba(22, 27, 34, .96));
  border: 1px solid var(--line); transition: transform .15s, border-color .15s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
.map-card:hover { transform: translateY(-4px); border-color: var(--sel); }
.map-art { font-size: 54px; margin-bottom: 8px; }
.map-name { font-family: var(--hud); font-size: 19px; letter-spacing: 2px; color: var(--tx); }
.map-info { margin-top: 6px; font-size: 12px; color: var(--tx-dim); }

/* ---------- 元系统覆盖层：铺满全屏灰色半透明（透出主界面） ---------- */
.meta-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(70, 76, 86, .58);           /* 灰色半透明遮罩 */
  backdrop-filter: blur(2px);
  overflow-y: auto; padding: 46px 30px 90px;
}
.meta-title {
  text-align: center; font-size: 24px; letter-spacing: 4px;
  color: var(--tx); text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
}
.meta-close {
  position: fixed; top: 14px; right: 18px; z-index: 10;
  width: 40px; height: 40px; font-size: 18px; cursor: pointer;
  background: rgba(13, 17, 23, .85); color: var(--tx); border: 1px solid var(--line);
}
.meta-close:hover { border-color: var(--c4); color: var(--c4); }
.wh-hint { text-align: center; font-size: 12.5px; color: var(--tx-dim); margin: 8px 0 4px; }
.wh-sec { text-align: left; max-width: 900px; margin: 16px auto 8px; font-size: 15px; color: var(--sel); letter-spacing: 2px; }

/* ---------- 商店：首行箱子选择矩形 ---------- */
.shop-box-row { display: flex; justify-content: center; margin-top: 18px; }
.shop-box-rect {
  display: flex; gap: 14px; padding: 16px;
  background: rgba(13, 17, 23, .72); border: 1px solid var(--line-hi);
}
.shop-box-card {
  width: 172px; padding: 14px 12px; text-align: center;
  background: linear-gradient(180deg, var(--bg2), var(--bg1)); border: 1px solid var(--line);
}
.shop-box-card.locked { opacity: .42; filter: grayscale(.7); }
.sb-emoji { font-size: 40px; }
.sb-name { margin-top: 6px; font-weight: 700; }
.sb-desc { margin-top: 4px; font-size: 11px; color: var(--tx-dim); min-height: 30px; }
.sb-owned { margin: 6px 0; font-size: 12px; color: var(--money); }
.sb-lock { font-size: 12px; color: var(--tx-faint); padding: 6px 0; }
.shop-exchange {
  display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 22px;
  font-size: 14px; color: var(--tx-dim);
}
.shop-exchange b { color: #f5c542; }

/* ---------- 仓库 ---------- */
.wh-grid {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  max-width: 900px; margin: 0 auto;
}
.wh-item {
  position: relative; width: 168px; padding: 12px 10px; cursor: pointer;
  background: linear-gradient(180deg, var(--bg2), var(--bg1)); border: 1px solid var(--line);
  transition: transform .12s, border-color .12s;
}
.wh-item:hover { transform: translateY(-3px); border-color: var(--sel); }
.wh-item.equipped { border-color: var(--money); box-shadow: 0 0 10px rgba(155, 197, 61, .25); }
.wi-tier {
  position: absolute; top: 0; right: 0; font-size: 10px; padding: 1px 7px;
  font-family: var(--hud); letter-spacing: 1px; color: #0d1117;
}
.wi-emoji { font-size: 34px; }
.wi-name { margin-top: 4px; font-weight: 700; font-size: 14px; }
.wi-sub { font-size: 11.5px; color: var(--tx-dim); margin-top: 2px; }
.wi-passive { font-size: 10.5px; color: #b8a1e8; margin-top: 5px; line-height: 1.5; }
.wi-count { position: absolute; bottom: 8px; right: 10px; font-family: var(--hud); color: var(--money); }
.wh-empty { font-size: 12.5px; color: var(--tx-faint); padding: 14px; }

/* 刀皮右键菜单 */
#ctx-menu {
  position: fixed; z-index: 950; min-width: 200px;
  background: rgba(13, 17, 23, .96); border: 1px solid var(--line-hi);
  display: flex; flex-direction: column;
}
#ctx-menu button {
  padding: 10px 14px; text-align: left; cursor: pointer;
  background: none; border: none; color: var(--tx); font-size: 13px;
}
#ctx-menu button:hover { background: rgba(242, 193, 78, .15); }
#ctx-menu .ctx-tip { padding: 10px 14px; font-size: 12px; color: var(--tx-faint); }

/* ---------- 开箱页：伪 3D 箱子 + CS2 式滚动 ---------- */
#unbox-stage { position: relative; height: 62vh; min-height: 420px; }
#unbox-box3d {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  text-align: center; perspective: 900px;
}
#unbox-box3d.opening .cube { animation: boxShake .5s ease-in-out, boxOpen .8s ease .3s forwards; }
@keyframes boxShake {
  0%, 100% { transform: rotateX(-18deg) rotateY(0); }
  25% { transform: rotateX(-14deg) rotateY(-10deg) translateY(-6px); }
  60% { transform: rotateX(-22deg) rotateY(9deg) translateY(-12px); }
}
@keyframes boxOpen { to { transform: rotateX(-30deg) rotateY(160deg) scale(.6); opacity: 0; } }
.cube {
  position: relative; width: 170px; height: 170px; margin: 0 auto;
  transform-style: preserve-3d; transform: rotateX(-18deg);
  animation: boxIdle 3.4s ease-in-out infinite;
}
@keyframes boxIdle {
  0%, 100% { transform: rotateX(-18deg) rotateY(-14deg); }
  50% { transform: rotateX(-14deg) rotateY(14deg); }
}
.cube-face {
  position: absolute; inset: 0; border: 2px solid #6b5a33;
  background:
    repeating-linear-gradient(0deg, rgba(245, 197, 66, .14) 0 2px, transparent 2px 22px),
    linear-gradient(160deg, #8a6d3b, #4d3d20);
}
.cube-front { transform: translateZ(85px); }
.cube-back  { transform: rotateY(180deg) translateZ(85px); }
.cube-left  { transform: rotateY(-90deg) translateZ(85px); }
.cube-right { transform: rotateY(90deg) translateZ(85px); }
.cube-top   { transform: rotateX(90deg) translateZ(85px); border-color: #f5c542; background: linear-gradient(160deg, #a8842f, #5c4a26); }
.cube-lid {
  position: absolute; left: -8px; top: -16px; width: 186px; height: 26px;
  background: linear-gradient(160deg, #a8842f, #5c4a26); border: 2px solid #f5c542;
  transform: rotateX(90deg) translateZ(98px);
}
#unbox-boxname {
  margin-top: 26px; font-family: var(--hud); font-size: 17px; letter-spacing: 3px; color: var(--sel);
}
/* 指针滚动区（CS2 观感：条目右→左，指针停中间） */
#unbox-roller {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%);
  width: min(880px, 92vw); height: 150px; overflow: hidden;
  background: rgba(13, 17, 23, .88); border-top: 1px solid var(--line-hi); border-bottom: 1px solid var(--line-hi);
}
#roller-strip { display: flex; gap: 12px; padding: 10px 0; will-change: transform; }
.roller-item {
  flex: 0 0 138px; width: 138px; height: 128px; padding-top: 22px;
  text-align: center; position: relative;
  background: linear-gradient(180deg, var(--bg2), var(--bg1)); border: 2px solid var(--line);
}
.ri-tier {
  position: absolute; top: 0; left: 0; right: 0; font-size: 10px; padding: 1px 0;
  font-family: var(--hud); letter-spacing: 2px; color: #0d1117;
}
.ri-emoji { font-size: 36px; }
.ri-name { font-size: 12px; font-weight: 700; margin-top: 4px; }
.ri-sub { font-size: 10.5px; color: var(--tx-dim); margin-top: 2px; }
#roller-pointer {
  position: absolute; left: 50%; top: -12px; bottom: -12px; width: 3px; z-index: 5;
  background: var(--sel); transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(242, 193, 78, .9);
}
#roller-pointer::before {
  content: '▼'; position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  color: var(--sel); font-size: 12px;
}
.roller-fade { position: absolute; top: 0; bottom: 0; width: 90px; z-index: 4; pointer-events: none; }
#roller-fade-l { left: 0; background: linear-gradient(90deg, rgba(13, 17, 23, .95), transparent); }
#roller-fade-r { right: 0; background: linear-gradient(-90deg, rgba(13, 17, 23, .95), transparent); }
/* 开箱结果卡（滚条下方，避免遮挡指针区） */
#unbox-result { position: absolute; left: 50%; top: 66%; transform: translate(-50%, -50%); text-align: center; }
.ur-card {
  display: inline-block; padding: 26px 44px; background: rgba(13, 17, 23, .92);
  border: 2px solid var(--line-hi); animation: urPop .45s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes urPop { from { transform: scale(.4); opacity: 0; } }
.ur-tier { font-family: var(--hud); font-size: 13px; letter-spacing: 3px; color: #0d1117; display: inline-block; padding: 1px 12px; }
.ur-name { font-size: 22px; font-weight: 700; margin-top: 10px; }
.ur-sub { font-size: 12.5px; color: var(--tx-dim); margin-top: 6px; }
/* 开箱按钮：屏幕正下方与右下方的中点（约 75% 宽处） */
#btn-open-box {
  position: fixed; left: 75%; bottom: 26px; transform: translateX(-50%);
  min-width: 240px; z-index: 5;
}

/* ---------- 备战库 ---------- */
#armory-list { max-width: 860px; margin: 18px auto 0; }
.arm-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin-bottom: 10px;
  background: rgba(13, 17, 23, .72); border: 1px solid var(--line);
}
.arm-weapon { width: 130px; font-weight: 700; font-size: 14.5px; }
.arm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.arm-chip {
  padding: 6px 14px; cursor: pointer; font-size: 12.5px;
  background: var(--bg1); border: 1px solid var(--line); color: var(--tx-dim);
}
.arm-chip:hover { border-color: var(--sel); color: var(--tx); }
.arm-chip.on { border-color: var(--money); color: var(--money); background: rgba(155, 197, 61, .1); }

/* ---------- 升级奖励 4 槽 ---------- */
#levelup-slots { display: flex; gap: 18px; justify-content: center; margin-top: 26px; }
.lu-slot {
  width: 172px; padding: 26px 12px 20px; cursor: pointer; text-align: center;
  background: linear-gradient(180deg, var(--bg2), var(--bg1)); border: 1px solid var(--line-hi);
  transition: transform .14s, border-color .14s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
.lu-slot:hover { transform: translateY(-6px); border-color: var(--sel); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.lu-emoji { font-size: 46px; }
.lu-name { margin-top: 10px; font-weight: 700; font-size: 15px; }
.lu-sub { margin-top: 4px; font-size: 12px; color: var(--tx-dim); }

/* ---------- 对局内：皮肤 / 刀皮 / hide 标注 ---------- */
.ti-meta { display: flex; flex-direction: column; gap: 1px; margin-top: 1px; }
.ti-skin { font-size: 10.5px; font-weight: 700; }
.ti-knife { font-size: 10.5px; color: #b8a1e8; }
.ti-st.st-hide { border-color: #b8a1e8; color: #b8a1e8; background: rgba(184, 161, 232, .12); }
.wtag.w-skinned { text-shadow: 0 0 8px currentColor; }

/* ---------- 结算页：经验/星星收益 ---------- */
#result-meta {
  margin: 12px auto 0; max-width: 380px; padding: 10px 14px;
  background: rgba(13, 17, 23, .7); border: 1px solid var(--line);
  font-size: 14px; color: var(--tx-dim); text-align: center; line-height: 1.9;
}
#result-meta b { color: var(--sel); }
#result-meta .rm-star { color: #f5c542; }
#result-meta .rm-none { color: var(--tx-faint); font-size: 12.5px; }

/* ---------- 联机-α（§3.15）：行动时限 / 选将倒计时 ---------- */
#turn-clock { font-size: 13px; color: var(--tx-dim); letter-spacing: .5px; }
#turn-clock.urgent { color: var(--c4); font-weight: 700; text-shadow: 0 0 8px rgba(235, 75, 75, .5); }
#pick-clock { font-size: 12.5px; color: var(--tx-dim); }

/* ============================================================
 * 手机适配（≤900px）：主页 / 菜单 / 选人 / 结算 / 覆盖层
 * ============================================================ */
body { touch-action: manipulation; }
#rotate-hint { display: none; }   /* 仅手机竖屏战斗页显示（见下方手机适配段） */

@media (max-width: 900px) {
  /* ---------- 通用 ---------- */
  .screen { padding: 12px; }
  .btn { padding: 10px 16px; font-size: 14px; letter-spacing: 1px; }
  .btn.xl { font-size: 15px; padding: 12px 24px; }
  h1, h2, h3, .kai { letter-spacing: 1px; }

  /* ---------- 屏幕1：模式选择 / 登录 ---------- */
  .logo { font-size: 30px; letter-spacing: 3px; }
  .logo-sub { font-size: 12px; letter-spacing: 2px; }
  #screen-name .panel, #screen-mode .panel, #screen-room .panel,
  #screen-map .panel, #screen-menu .panel {
    width: 100%; max-width: 94vw; padding: 18px 14px;
  }
  .mode-btn, .auth-btn { min-width: 0; width: min(280px, 84vw); }
  #login-user, #login-pass { width: min(280px, 84vw); }
  #login-hint { max-width: 84vw; }

  /* ---------- 主菜单 ---------- */
  #menu-hud { flex-wrap: wrap; max-width: 94vw; gap: 6px; padding: 6px 10px; font-size: 12px; }
  #mh-xpbar { width: 70px; }
  .menu-top-row { flex-wrap: wrap; gap: 8px; }
  .menu-start { order: -1; width: 100%; min-width: 0; font-size: 18px; letter-spacing: 3px; }
  .menu-side { min-width: 0; flex: 1 1 40%; padding: 10px 8px; font-size: 13px; }
  .rules-box { max-width: 94vw; padding: 12px 14px; }
  .rules-box h3 { font-size: 15px; }
  .rules-box li { font-size: 12.5px; }
  #player-corner { right: 10px; bottom: 8px; font-size: 12px; }
  #player-corner b { font-size: 13px; }

  /* ---------- 联机 / 房间 ---------- */
  #join-box { position: static; justify-content: center; flex-wrap: wrap; margin: 10px 12px; }
  .room-panel { min-width: 0; width: 94vw; }
  .room-code-box { padding: 12px 18px; }
  .room-code { font-size: 32px; letter-spacing: 8px; }
  .room-btns { flex-wrap: wrap; justify-content: center; }
  #room-hint { max-width: 84vw; }

  /* ---------- 选地图 ---------- */
  #map-grid { flex-wrap: wrap; gap: 12px; margin: 14px 0; }
  .map-card { width: min(300px, 94vw); padding: 14px; }

  /* ---------- 选将 ---------- */
  #screen-select { padding-top: 14px; }
  #hero-grid { width: 94vw; padding: 8px; }
  .select-sub { font-size: 12px; }
  .job-tabs { gap: 6px; margin-bottom: 10px; }
  .job-tab { font-size: 12px; padding: 6px 10px; }
  .job-cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
  .pick { width: 158px; margin: 0 auto; }
  .diff-row { flex-wrap: wrap; width: 94vw; }
  .diff-btn { min-width: 30%; }
  .select-foot { flex-wrap: wrap; justify-content: center; gap: 10px; }

  /* ---------- 元系统覆盖层 ---------- */
  .meta-overlay { padding: 40px 12px 80px; }
  .meta-title { font-size: 19px; letter-spacing: 2px; }
  .wh-hint { padding: 0 8px; }
  .wh-sec { max-width: 94vw; }
  .wh-grid { max-width: 94vw; }
  .wh-item, .shop-box-card { width: 136px; }
  .shop-box-rect { flex-wrap: wrap; gap: 10px; padding: 10px; }
  .shop-exchange { flex-direction: column; gap: 8px; text-align: center; }
  #levelup-slots { flex-wrap: wrap; gap: 12px; }
  .lu-slot { width: 140px; padding: 18px 10px 14px; }
  .arm-row { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 12px; }
  .arm-weapon { width: auto; }
  #btn-open-box { left: 50%; bottom: 20px; width: min(320px, 90vw); }
  #unbox-stage { height: auto; min-height: 380px; }

  /* ---------- 结算 ---------- */
  #result .panel-box { min-width: 0; width: 92vw; max-width: 360px; }
  #result-meta { max-width: 92vw; }

  /* ============================================================
   * 战斗页：HUD 全面收紧，地图最大化
   * ============================================================ */
  #screen-battle.active { height: 100dvh; }
  #board-wrap { top: 100px; left: 8px; right: 8px; bottom: 132px; }

  /* 顶部：雷达 + 比分 */
  #hud-top { top: 6px; left: 6px; right: 6px; }
  #radar { width: 84px; height: 74px; }
  #sb-col { left: auto; right: 0; transform: none; align-items: flex-end; }
  #scoreboard { height: 52px; }
  .sb-side { width: 54px; gap: 3px; }
  .sb-side b { font-size: 22px; }
  .sb-side .sb-name { font-size: 11px; letter-spacing: 1px; }
  #sb-timer { min-width: 90px; }
  #timer-round { font-size: 10px; letter-spacing: 1px; }
  #timer-main { font-size: 20px; }
  #sb-timer.c4 #timer-main { font-size: 24px; }
  #ei-avatars { margin-left: 8px; padding-left: 8px; gap: 4px; }
  #ei-avatars .eia { width: 24px; height: 24px; font-size: 14px; }
  #sb-sub { font-size: 11px; gap: 5px; }

  /* 攻击提示流 */
  #atk-ticker { top: 100px; right: 8px; max-width: 72vw; }
  .atk-tick { font-size: 11.5px; padding: 2px 6px; gap: 4px; }
  .atk-tick .at-what, .atk-tick .at-word { font-size: 10px; }
  .atk-tick .at-dmg { font-size: 12.5px; }

  /* 左侧作战单位：窄列贴左（隐藏滚动条，避免白条压图） */
  #team-panel { width: 118px; max-height: 38vh; padding: 4px 5px; gap: 2px; top: 106px; transform: none; scrollbar-width: none; }
  #team-panel::-webkit-scrollbar { width: 0; height: 0; }
  #team-panel #lib-count { font-size: 10px; }
  .team-item { padding: 3px 4px; margin-bottom: 3px; gap: 5px; }
  .team-item .ti-badge { width: 26px; height: 26px; font-size: 15px; border-width: 2px; }
  .team-item .ti-name { font-size: 11px; }
  .team-item .ti-sub { font-size: 10px; }
  .ti-st, .ti-armor { font-size: 9px; }
  .li-deploy { font-size: 11px; padding: 3px 7px; }

  /* 左下干员状态：抬到手牌上方，避免竖屏时与手牌重叠 */
  #op-panel { padding: 4px 6px; gap: 6px; bottom: 118px; }
  #op-badge { width: 42px; height: 42px; font-size: 22px; border-width: 2.5px; }
  #op-info { gap: 3px; }
  #op-name { font-size: 11.5px; gap: 5px; }
  .wtag { font-size: 9.5px; padding: 0 4px; }
  #op-armor { font-size: 10.5px; }
  #op-hp { height: 10px; }
  #op-hp-num { font-size: 10px; }
  #op-row2 { gap: 5px; }
  #op-row2 .lab { display: none; }
  #ap-ring { width: 42px; height: 42px; }
  #ap-ring #ap-text { font-size: 20px; }
  #ap-ring .ar-lab { font-size: 8px; }
  #op-status { font-size: 10px; }
  #op-wslot { width: 54px; height: 25px; }

  /* 手牌 */
  #hand-wrap { bottom: 6px; }
  #hand { gap: 6px; }
  .card { width: 58px; padding: 16px 2px 5px; border-radius: 6px; }
  .card .c-icon { font-size: 17px; }
  .card .c-name { font-size: 9.5px; margin: 2px 0 1px; }
  .card .c-desc { font-size: 7.5px; }
  .card .c-ap { font-size: 9px; }
  .card .cost { width: 18px; height: 18px; font-size: 10px; top: -5px; left: -5px; }
  .card .slot-no { display: none; }
  .card .c-keep { font-size: 8px; }

  /* 右侧：资金 / 商店 / 结束回合 */
  #me-money { right: 10px; bottom: 118px; font-size: 16px; }
  #btn-store { right: 8px; width: 42px; height: 42px; font-size: 18px; }
  #btn-end-turn { right: 8px; bottom: 8px; font-size: 12.5px; padding: 10px 12px; }

  /* 埋包 / 商店面板 / 横幅 */
  #plant-btn { bottom: 138px; font-size: 13px; padding: 10px 18px; }
  #store-panel { left: 8px; right: 8px; width: auto; top: auto; bottom: 96px; }
  #turn-banner { font-size: 15px; letter-spacing: 3px; padding: 10px 20px; }
  #game-banner .panel { width: 92vw; padding: 22px 18px; }
  #gb-title { font-size: 20px; }
  #quit-confirm .panel { padding: 20px 18px; }
  #hero-tip { display: none; }   /* 触屏无 hover，悬浮提示无效 */

  /* 横屏提示（手机竖屏进入战斗时显示） */
  #rotate-hint { display: none; }
  #screen-battle.active #rotate-hint {
    display: block; position: fixed; left: 50%; top: 104px; bottom: auto; transform: translateX(-50%);
    z-index: 65; padding: 6px 12px; font-size: 11.5px; white-space: nowrap;
    background: rgba(13, 17, 23, .92); border: 1px solid var(--line-hi); color: var(--tx-dim);
  }
  @media (orientation: landscape) { #screen-battle.active #rotate-hint { display: none; } }

  /* 横屏：干员面板回到左下角，地图用满高度 */
  @media (orientation: landscape) {
    #op-panel { bottom: 0; }
    #board-wrap { top: 92px; bottom: 118px; left: 6px; right: 6px; }
    #team-panel { top: 96px; max-height: 48vh; }
    #atk-ticker { top: 92px; }
    #hand-wrap { bottom: 4px; }
    #me-money { bottom: 100px; }
    #plant-btn { bottom: 124px; }
  }
}

/* ============ 改5 §3.16 新手教程系统（云便利贴 / 灰遮罩高亮 / 卡牌动画 / 字幕） ============ */
/* 对战教程：半透明灰遮罩（遮罩由高亮框的巨型投影形成，框内无遮罩），点击任意位置/按键推进 */
#tut-mask {
  position: fixed; inset: 0; z-index: 500;
  cursor: pointer;
}
#tut-spot, #tut-spot2 {
  position: fixed; z-index: 1; pointer-events: none;
  border: 2px solid var(--sel); border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(4, 6, 10, .58), 0 0 18px rgba(242, 193, 78, .35), inset 0 0 12px rgba(242, 193, 78, .18);
  transition: all .18s ease;
}
#tut-spot2 { border-color: #9a7ab8; }
.tut-note {
  position: fixed; z-index: 510; pointer-events: none;
  padding: 12px 16px; font-size: 13.5px; line-height: 1.6; color: #3a2c10;
  background: linear-gradient(180deg, #ffe9a8, #f7d878);
  border: 1px solid #d8b45a; border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}
.tut-note::after {
  content: ''; position: absolute; left: 50%; bottom: -9px; margin-left: -8px;
  border-left: 8px solid transparent; border-right: 8px solid transparent;
  border-top: 9px solid #f7d878;
}
/* 步3 道具卡牌动画序列（屏幕中央舞台） */
#tut-stage {
  position: fixed; z-index: 520; left: 50%; top: 44%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  pointer-events: none;
}
#tut-cards { display: flex; align-items: center; gap: 56px; min-height: 190px; }
.tut-card {
  width: 132px; height: 186px; padding: 12px 10px; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(170deg, #1d2531, #10151d);
  border: 1.5px solid var(--line-hi); border-radius: 10px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .55);
  animation: tutPop .3s ease-out both;
}
.tut-card .c-icon { font-size: 46px; }
.tut-card .c-name { font-size: 15px; font-weight: 700; letter-spacing: 2px; }
.tut-card.c-gre { border-color: rgba(229, 72, 77, .6); } .tut-card.c-gre .c-name { color: #ff8589; }
.tut-card.c-smo { border-color: rgba(139, 147, 160, .6); } .tut-card.c-smo .c-name { color: #aeb6c2; }
.tut-card.c-mol { border-color: rgba(240, 136, 62, .65); } .tut-card.c-mol .c-name { color: #f6a05e; }
.tut-card.c-fla { border-color: rgba(242, 193, 78, .6); } .tut-card.c-fla .c-name { color: var(--sel); }
.tut-card.tut-shift { margin-left: 64px; }              /* 3f：燃烧卡向右移少许 */
.tut-card.tut-slide-in { animation: tutSlideIn .38s ease-out both; }   /* 3f：烟雾卡自左侧出现 */
.tut-card.tut-fade-out { animation: tutFadeOut 1.05s ease-in both; }   /* 3h：闪光卡逐渐消散 */
@keyframes tutPop { 0% { opacity: 0; transform: scale(.6) translateY(18px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes tutSlideIn { 0% { opacity: 0; transform: translateX(-90px); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes tutFadeOut { 0% { opacity: 1; filter: blur(0); } 100% { opacity: 0; filter: blur(6px); transform: scale(.86) translateY(-10px); } }
/* 红色箭头（3d 手雷→烟雾 / 3f 烟雾→燃烧）：按两张卡的相对位置自动取边与方向 */
.tut-arrow {
  position: absolute; top: 50%; margin-top: -11px; width: 30px; height: 22px; pointer-events: none;
}
.tut-arrow::before {
  content: ''; position: absolute; top: 8px; left: 0; width: 20px; height: 6px; background: #e5484d;
}
.tut-arrow::after {
  content: ''; position: absolute; top: 0; width: 0; height: 0;
  border-top: 11px solid transparent; border-bottom: 11px solid transparent;
}
.tut-arrow.al { left: -38px; }
.tut-arrow.al::after { right: -14px; border-left: 16px solid #e5484d; }
.tut-arrow.ar { right: -38px; }
.tut-arrow.ar::after { left: 0; border-right: 16px solid #e5484d; }
#tut-card-text {
  max-width: 560px; min-height: 44px; text-align: center;
  font-size: 16px; line-height: 1.7; color: var(--tx);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .8);
}
#tut-card-text .tt-blindword { color: #ffd700; font-weight: 700; }   /* 3g：「致盲」二字金黄色 */
/* 步4 A/B 包点高亮 + 胜负字幕（T 暗黄 / CT 蓝） */
#tut-caption {
  position: fixed; z-index: 530; left: 50%; bottom: 13%; transform: translateX(-50%);
  width: min(760px, 88vw); padding: 16px 22px; text-align: center;
  font-size: 16.5px; line-height: 1.8; color: var(--tx);
  background: rgba(10, 13, 18, .92); border: 1px solid var(--line-hi); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
  pointer-events: none;
}
#tut-caption .tc-T { color: #c8952f; }    /* T 暗黄 */
#tut-caption .tc-CT { color: #6a9ede; }   /* CT 蓝 */
/* ① 主界面云状便利贴（不拦截点击；点任意处消失，点商店进店结案） */
#tut-cloud {
  position: fixed; z-index: 460; width: 150px; padding: 16px 10px; text-align: center;
  font-size: 15px; font-weight: 700; letter-spacing: 2px; color: #3a2c10;
  background: linear-gradient(180deg, #fff3c4, #ffdf8e);
  border-radius: 48% 52% 46% 54% / 62% 58% 42% 38%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
  animation: tutCloudFloat 2.2s ease-in-out infinite alternate;
  pointer-events: none;
}
#tut-cloud::before, #tut-cloud::after {
  content: ''; position: absolute; background: inherit; border-radius: 50%;
}
#tut-cloud::before { width: 54px; height: 40px; left: -16px; top: 10px; }
#tut-cloud::after { width: 46px; height: 36px; right: -14px; top: 4px; }
#tut-cloud .tut-cloud-tail {
  position: absolute; width: 0; height: 0; bottom: -12px; right: 18px;
  border-left: 10px solid transparent; border-right: 10px solid transparent;
  border-top: 13px solid #ffdf8e;
}
#tut-cloud.tail-left .tut-cloud-tail { right: auto; left: 18px; }
@keyframes tutCloudFloat { 0% { transform: translateY(0); } 100% { transform: translateY(-8px); } }
/* ② 商店底部提示框（引导期内进入商店） */
#tut-shop-hint {
  position: fixed; z-index: 470; left: 50%; bottom: 30px; transform: translateX(-50%);
  padding: 12px 20px; font-size: 14px; letter-spacing: .5px; color: #ffe9a8;
  background: rgba(20, 16, 6, .92); border: 1px solid #d8b45a; border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .5);
  pointer-events: none;
}
/* ③ 点将页悬停引导（常驻 tooltip 的首次发现引导） */
#tut-pick-hint {
  position: fixed; z-index: 460; left: 50%; bottom: 130px; transform: translateX(-50%);
  padding: 10px 18px; font-size: 14px; color: #3a2c10;
  background: linear-gradient(180deg, #ffe9a8, #f7d878);
  border: 1px solid #d8b45a; border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
  pointer-events: none;
  animation: tutCloudFloat 2.2s ease-in-out infinite alternate;
}

