/* 三国再决：米黄纸面为底（用户要求，10-10）。
   配色约定：朱红 = 对方 / 攻击 / 危险；青绿 = 我方 / 可以 / 确认；金 = 城池 / 气 / 你的回合；黛蓝 = 信息。
   尺寸变量 --h（武将格边长）、--iw（状态栏宽）、--hh（手牌高）、--lgap（列间距）、--cpad（列内边距）由 app.js 的 layout() 按窗口大小计算 */
:root {
  --side: 340px;
  --bg: #f2e8d3; --panel: #fffaf0; --panel2: #f1e6cd; --line: #d8c6a0; --line2: #c7af82;
  --text: #33281a; --text2: #54442f; --muted: #6e5d44; --sunk: #f4ead5; --hl: #7a5410;
  --gold: #b8862e; --gold-l: #e8c470; --gold-ink: #74500f;
  --red: #b5432a; --red-ink: #93301b; --red-bg: rgba(181, 67, 42, .1);
  --green: #2a7d6b; --green-ink: #1d5f50; --green-bg: rgba(42, 125, 107, .12);
  --blue: #3d5675; --blue-ink: #2c4360; --blue-bg: rgba(61, 86, 117, .12);
  --ink: #36465a;
  --op-line: rgba(176, 82, 48, .34); --me-line: rgba(42, 112, 100, .34);
  --font-title: "STKaiti", "KaiTi", "Kaiti SC", "楷体", "Songti SC", serif;
  --h: 84px; --iw: 88px; --hh: 84px; --lgap: 18px; --cpad: 4px; --cgap: 6px; --capw: 16px;
  --rail: 0px; --wing: 0px;   /* 电脑：武将卡图左边状态栏的宽度、宽屏两翼每翼的宽度（app.js layout 设） */
  --colw: calc(var(--rail) + var(--h) + var(--iw) + 2 * var(--cpad) + 2px + var(--capw));
  --gridw: calc(3 * var(--colw) + 2 * var(--lgap));

  /* 配色：表面颜色（设置里可以换预设，见文件末尾 :root[data-theme=…]） */
  --bg-hi: #fbf5e6; --bg1: #f4ebd7; --bg2: #ede1c7; --input-bg: #fffdf7;
  --btn1: #f8eed8; --btn2: #efe1c2; --btn-line: #cdb68a; --btn-hl: #a98b55; --btnh1: #fbf3e1; --btnh2: #f2e5c8;
  --pri1: #ddb04f; --pri2: #c28d2d; --pri-line: #a5741f; --pri-text: #2b1d05; --prih1: #e6bb5c; --prih2: #cb9734;
  --top1: #4d6280; --top2: #3f536e; --top-line: #c39a45; --top-text: #f1e9d8; --top-acc: #f2d283; --top-dim: #dcd3c1;
  --op-t1: rgba(196, 98, 58, .04); --op-t2: rgba(196, 98, 58, .13); --op-edge: rgba(176, 82, 48, .16); --op-cap: #8a4a30; --op-capbg: rgba(176, 82, 48, .08);
  --me-t1: rgba(52, 128, 116, .13); --me-t2: rgba(52, 128, 116, .04); --me-edge: rgba(42, 112, 100, .16); --me-cap: #2f6a5d; --me-capbg: rgba(42, 112, 100, .08);
  --lane-bg: rgba(255, 251, 242, .6); --lane-mark: rgba(140, 105, 50, .12); --grain: rgba(120, 90, 40, .045); --camp-bg: rgba(248, 240, 222, .8);
  --unit-bg: rgba(255, 252, 246, .94); --unit-bg-op: rgba(255, 248, 242, .95); --unit-edge: rgba(150, 120, 70, .22);
  --city1: #e6be66; --city2: #f5df9f; --city3: #e2b65a; --city-line: #ae8433; --cityc1: #fff7de; --cityc2: #f6e1a8; --cityc-line: #a57a29;
  --mid-bg: rgba(255, 252, 240, .55); --mid-ink: #4b3714; --mid-mine: #fffbef; --strip-bg: rgba(255, 251, 242, .82);
  --tray1: #e6d5b0; --tray2: #dac699; --tray-line: #bf9f62; --side-bg: #f5eddc; --panel-mine: #fffbf2; --pv1: #fbf6ea; --pv2: #f4ebd7; --log-bg: #f0e6d1; --ok-bg: #d6ece4;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--text); font: 14px/1.45 system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: radial-gradient(1100px 520px at 50% -8%, var(--bg-hi) 0%, transparent 70%), linear-gradient(180deg, var(--bg1), var(--bg2)) fixed; min-height: 100vh; }
body { overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
img { -webkit-user-drag: none; user-select: none; }
button { font: inherit; color: var(--text); background: linear-gradient(var(--btn1), var(--btn2)); border: 1px solid var(--btn-line); border-radius: 8px; padding: 7px 14px; cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--btn-hl); background: linear-gradient(var(--btnh1), var(--btnh2)); }
button.primary { background: linear-gradient(var(--pri1), var(--pri2)); border-color: var(--pri-line); color: var(--pri-text); font-weight: 600; box-shadow: 0 1px 0 rgba(255, 255, 255, .45) inset; }
button.primary:hover:not(:disabled) { background: linear-gradient(var(--prih1), var(--prih2)); }
button.small { padding: 3px 10px; font-size: 13px; }
button.ghost { background: transparent; }
button:disabled { opacity: .45; cursor: default; }
input, select, textarea { font: inherit; color: var(--text); background: var(--input-bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; max-width: 100%; }
input[type=checkbox], input[type=radio] { accent-color: var(--green); }
textarea { width: 100%; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
code, kbd { background: var(--panel2); padding: 0 4px; border-radius: 4px; font-size: 12px; }
kbd { border: 1px solid var(--line2); border-bottom-width: 2px; font-family: inherit; padding: 0 6px; margin-right: 4px; color: var(--text); }
h3, h4 { margin: 0; }
.hidden { display: none !important; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0; }
.err { color: var(--red-ink); font-size: 13px; margin: 6px 0; }
.loading { padding: 3em; text-align: center; }
em { font-style: normal; font-size: 12px; margin-left: 6px; }
em.on { color: var(--green); }
em.off { color: var(--muted); }
body.busy, body.busy * { cursor: progress !important; }
body.busy button.primary { opacity: .75; }
body.offline::before { content: '连接已断开，正在重连…'; position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: var(--red); color: #fff; text-align: center; font-size: 13px; padding: 2px; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.22); } }

/* ---------- 大厅 ---------- */
.lobby { max-width: 780px; margin: 0 auto; padding: 24px 16px 40px; }
.lobby h1 { font-family: var(--font-title); font-size: 30px; margin: 8px 0 4px; letter-spacing: 4px; color: var(--gold-ink); }
.lobby h1::after { content: ''; display: block; width: 72px; height: 3px; margin-top: 6px; border-radius: 2px; background: linear-gradient(90deg, var(--red), var(--gold-l)); }
.lobby .sub { color: var(--muted); margin: 0 0 16px; }
.lb-beian { margin: 28px 0 0; text-align: center; font-size: 12px; }
.lb-beian a { color: var(--muted); text-decoration: none; margin: 0 10px; white-space: nowrap; }
.lb-beian a:hover { text-decoration: underline; }
.lobby h3, .setup-card h3 { font-size: 16px; color: var(--text); padding-left: 9px; border-left: 3px solid var(--gold); line-height: 1.25; }
.lb-form { display: grid; grid-template-columns: 1fr 110px auto; gap: 10px; align-items: end; background: var(--panel); padding: 14px; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(90, 60, 20, .06); }
.lb-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.lb-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 8px; }
.rooms { display: flex; flex-direction: column; gap: 8px; }
.room-item { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
.ri-main { display: flex; gap: 8px; align-items: center; min-width: 0; }
.ri-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ri-seats { grid-column: 1; display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--muted); font-size: 13px; }
.ri-seats i { font-style: normal; opacity: .8; }
.ri-btns { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.tag { font-size: 12px; padding: 1px 8px; border-radius: 10px; background: var(--panel2); color: var(--muted); white-space: nowrap; }
.tag.st-running { color: var(--green-ink); background: var(--green-bg); }
.tag.st-broken, .tag.st-crashed { color: var(--red-ink); background: var(--red-bg); }
/* 大厅：电脑上左右两栏（左：匹配 + 在线玩家等标签页；右：建房间 + 我的套牌），窄屏一栏 */
.lb-cols { display: flex; flex-direction: column; }
.lb-col { min-width: 0; }
@media (min-width: 1000px) {
  .lobby { max-width: 1160px; }
  .lb-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 28px; align-items: start; }
}
.lb-me { display: flex; align-items: flex-end; gap: 8px 14px; flex-wrap: wrap; }
.lb-me label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.lb-me input { width: 220px; max-width: 100%; }
.lb-online { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; padding-bottom: 7px; }
.lb-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.lb-dot.on { background: var(--green); }
.lb-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: 0 2px 8px rgba(90, 60, 20, .06); }
.deck-pick { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.deck-pick select { width: 100%; }
#mq-box { margin-top: 10px; }
.mq-off, .mq-on { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.mq-off .hint { margin: 0; flex: 1; min-width: 12em; }
.mq-on { background: var(--blue-bg); border-radius: 10px; padding: 8px 10px; }
.mq-on .lb-dot { background: var(--blue); animation: pulse 1.2s infinite; }
.mq-txt, .inv-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mq-txt b { color: var(--blue-ink); }
.mq-txt small, .inv-txt small { color: var(--muted); font-size: 12.5px; }
.cd, .cd-up { font-variant-numeric: tabular-nums; }
.inv-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.inv-item { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--panel); }
.inv-item.in { border-color: var(--gold); background: var(--panel-mine); box-shadow: 0 0 0 1px var(--gold) inset; }
.inv-item.st-declined small, .inv-item.st-expired small { color: var(--red-ink); }
.inv-item.st-accepted small { color: var(--green-ink); }
.inv-btns { display: flex; gap: 6px; flex-shrink: 0; margin-left: auto; }
.lb-social { margin-top: 22px; padding: 0; overflow: hidden; }
.lb-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--panel2); border-bottom: 1px solid var(--line); }
.lb-tabs button { border: none; border-radius: 0; background: transparent; color: var(--muted); padding: 9px 2px 7px; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 3px solid transparent; }
.lb-tabs button:hover:not(:disabled) { border: none; border-bottom: 3px solid var(--line2); background: transparent; color: var(--text); }
.lb-tabs button.on, .lb-tabs button.on:hover:not(:disabled) { color: var(--text); font-weight: 600; background: var(--panel); border-bottom: 3px solid var(--gold); }
.lb-tabs i { font-style: normal; font-size: 11px; margin-left: 4px; padding: 0 5px; border-radius: 8px; background: var(--sunk); color: var(--muted); font-weight: 400; }
.lb-pane { padding: 10px 12px 12px; min-height: 140px; }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.pane-head .hint { margin: 0; }
.pl-list { display: flex; flex-direction: column; gap: 6px; }
.pl-item { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.pl-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
.pl-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pl-main small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.pl-btns { display: flex; gap: 6px; flex-shrink: 0; margin-left: auto; align-items: center; flex-wrap: wrap; }
.tag.ps-queue { color: var(--blue-ink); background: var(--blue-bg); }
.tag.ps-play, .tag.rs-win { color: var(--green-ink); background: var(--green-bg); }
.tag.ps-setup { color: var(--gold-ink); box-shadow: inset 0 0 0 1px var(--line2); }
.tag.ps-watch { color: var(--text2); }
.tag.rs-lose { color: var(--red-ink); background: var(--red-bg); }
.inv-who { margin: 4px 0 0; }
.inv-who small { color: var(--muted); }
.inv-gens { display: flex; gap: 10px; justify-content: center; margin: 10px 0 12px; }
.inv-gens div { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12.5px; width: 78px; min-width: 0; }
.inv-gens img { width: 74px; max-width: 100%; border-radius: 6px; cursor: zoom-in; border: 1px solid var(--line); }
@media (max-width: 640px) {
  .lb-form { grid-template-columns: 1fr 1fr; }
  .lb-form button { grid-column: 1 / -1; }
  .room-item { grid-template-columns: 1fr; }
  .ri-btns { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .lb-me input { width: 100%; }
  .lb-me label { flex: 1 1 100%; }
  .lb-online { padding-bottom: 0; }
  .lb-tabs button { font-size: 13px; }
  .lb-tabs i { margin-left: 2px; padding: 0 4px; }
  .lb-pane { padding: 8px; }
  .inv-btns, .pl-btns { margin-left: 0; }
}

/* ---------- 顶栏：黛蓝 ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; color: var(--top-text);
  background: linear-gradient(180deg, var(--top1), var(--top2)); border-bottom: 2px solid var(--top-line); box-shadow: 0 2px 8px rgba(40, 30, 15, .18); }
.tb-left { display: flex; gap: 12px; align-items: baseline; white-space: nowrap; overflow: hidden; min-width: 0; }
.tb-left .room { color: var(--top-acc); font-family: var(--font-title); font-size: 18px; letter-spacing: 1px; overflow: hidden; text-overflow: ellipsis; max-width: 12em; }
.tb-turn { color: var(--top-dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.phase { color: var(--top-acc); }
.tb-mid { flex: 1; display: flex; justify-content: center; min-width: 0; }
.tb-right { display: flex; gap: 6px; flex-shrink: 0; }
.topbar button { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); color: var(--top-text); }
.topbar button:hover:not(:disabled) { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .55); }
.wait { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 14px; border-radius: 14px; background: rgba(255, 255, 255, .12); color: var(--top-text); font-size: 13px; max-width: 100%; }
.wait.mine { background: linear-gradient(#f5d585, #e5b85a); color: #33240a; font-weight: 600; box-shadow: 0 0 12px rgba(240, 200, 110, .45); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--top-acc); margin-right: 6px; animation: pulse 1.2s infinite; vertical-align: 1px; }

/* ---------- 棋盘 ---------- */
.board-screen { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.main { flex: 1; display: flex; min-height: 0; }
.board-col { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.board-wrap { flex: 1; overflow: auto; padding: 8px 14px; min-width: 0; min-height: 0; }
.board { display: flex; flex-direction: column; gap: 6px; align-items: center; min-width: 0; }

/* 半场：三列 左路 | 大营 | 右路；对方半场偏朱红 / 赭色，我方偏青绿 */
.half { width: min(100%, calc(var(--gridw) + 20px)); display: grid; grid-template-columns: repeat(3, var(--colw)); gap: 0 var(--lgap); justify-content: center; padding: 6px 0; border-radius: 14px; }
.half.top { background: linear-gradient(180deg, var(--op-t1), var(--op-t2)); box-shadow: inset 0 0 0 1px var(--op-edge); }
.half.bottom { background: linear-gradient(180deg, var(--me-t1), var(--me-t2)); box-shadow: inset 0 0 0 1px var(--me-edge); }
.col { position: relative; display: flex; flex-direction: column; gap: var(--cgap); padding: var(--cpad); padding-left: calc(var(--cpad) + var(--capw)); border: 1px solid; border-radius: 10px; min-width: 0; }
.half.top .col { flex-direction: column-reverse; border-color: var(--op-line); }   /* 对方：前位在下面（靠近城池） */
.half.bottom .col { border-color: var(--me-line); }
/* 列标题：电脑上竖排在左边，手机上横排在外侧 */
.col-cap { position: absolute; left: 0; top: 0; bottom: 0; width: var(--capw); display: flex; align-items: center; justify-content: flex-start; padding: 10px 0; writing-mode: vertical-rl; font-size: 12px; font-weight: 600; letter-spacing: 5px; pointer-events: none; border-radius: 9px 0 0 9px; }
.half.top .col-cap { color: var(--op-cap); background: var(--op-capbg); }
.half.bottom .col-cap { color: var(--me-cap); background: var(--me-capbg); justify-content: flex-end; }   /* 标题靠外侧：对方在上端，我方在下端 */
/* 路：像一条路（中线 + 细纹）；大营：斜纹营帐 */
.col.lane { background:
  linear-gradient(90deg, transparent calc(50% - 1px), var(--lane-mark) calc(50% - 1px), var(--lane-mark) calc(50% + 1px), transparent calc(50% + 1px)),
  repeating-linear-gradient(0deg, var(--grain) 0 1px, transparent 1px 7px), var(--lane-bg); }
.col.camp { background: repeating-linear-gradient(45deg, var(--grain) 0 6px, transparent 6px 13px), var(--camp-bg); }
.col.lane.gone { opacity: .55; }

/* 武将格：左边是边长 --h 的正方形（正放 / 横置的卡都放得下，互不遮挡），右边是状态栏 */
.slot { position: relative; display: flex; width: calc(var(--h) + var(--iw)); height: var(--h); border-radius: 8px; flex-shrink: 0; }
.slot.unit { cursor: pointer; background: var(--unit-bg); box-shadow: inset 0 0 0 1px var(--unit-edge), 0 1px 3px rgba(60, 40, 10, .1); }
.half.top .slot.unit { background: var(--unit-bg-op); }
.slot .sq { position: relative; width: var(--h); height: var(--h); flex-shrink: 0; }
.slot .card { position: absolute; height: var(--h); width: calc(var(--h) * .717); left: calc(var(--h) * .1415); top: 0; border-radius: 6px; object-fit: cover; transition: transform .25s, box-shadow .2s; box-shadow: 0 2px 6px rgba(60, 40, 10, .35); background: #e6dcc6; }
.slot.tapped .card { transform: rotate(90deg); }
.slot.down .card { filter: grayscale(1) brightness(.72); }   /* 战败：灰色牌面（以前翻到背面） */
.big-lbl.down-lbl { top: 44%; background: rgba(120, 30, 20, .82); letter-spacing: 4px; font-size: 13px; }
.slot.inactive .sq { opacity: .5; }
.big-lbl { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-weight: 700; font-size: 12px; background: rgba(40, 32, 22, .7); color: #fff; padding: 1px 0; }
.slot.dying { box-shadow: 0 0 0 2px var(--red); animation: pulse 1s infinite; }
.ah { position: absolute; right: 1px; bottom: 1px; background: rgba(28, 22, 14, .84); color: #fff; border-radius: 6px; padding: 0 5px; font-weight: 800; font-size: max(12px, calc(var(--h) * .17)); line-height: 1.25; white-space: nowrap; }
.ah b.up { color: #8be3b9; }
.ah b.down { color: #ffa293; }
.ah i { color: #c9c2b4; font-style: normal; margin: 0 1px; font-weight: 400; }
/* 已损失的体力（快捷开关 🩸）、血条（设置里，受伤才出现）—— 用户 10-14 */
.ah .dmg-tag { position: absolute; right: calc(100% + 2px); bottom: 0; padding: 0 4px; border-radius: 6px; background: #d23c3c; color: #fff; font-style: normal; font-weight: 800; font-size: .86em; line-height: 1.25; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.slot .sq .hpbar { position: absolute; left: 3px; right: 3px; top: 2px; height: 4px; border-radius: 3px; background: rgba(50, 18, 14, .62); overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }
.slot .sq .hpbar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #d94a3e, #f2a04a); }
.gname { position: absolute; left: 2px; top: 2px; font-size: 11px; background: rgba(28, 22, 14, .7); color: #fff; padding: 0 4px; border-radius: 4px; max-width: calc(100% - 4px); overflow: hidden; white-space: nowrap; }
.uinfo { flex: 1; min-width: 0; padding: 3px 4px 3px 5px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.un { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pips { display: flex; gap: 3px; }
.pips b { width: 9px; height: 9px; border-radius: 50%; border: 1px solid #9a8250; background: rgba(255, 255, 255, .6); }
.pips b.on { background: radial-gradient(circle at 35% 35%, #ffe7a0, var(--gold) 70%); border-color: #a5741f; box-shadow: 0 0 4px rgba(214, 160, 60, .8); }
.chips { display: flex; flex-wrap: wrap; gap: 2px; overflow: hidden; }
.chips i { font-style: normal; font-size: 10.5px; padding: 0 4px; border-radius: 4px; line-height: 16px; white-space: nowrap; }
.c-red { background: var(--red-bg); color: var(--red-ink); }
.c-blue { background: var(--blue-bg); color: var(--blue-ink); }
.c-gold { background: rgba(184, 134, 46, .16); color: var(--gold-ink); }
.c-green { background: var(--green-bg); color: var(--green-ink); }
.c-grey { background: rgba(80, 60, 30, .08); color: var(--muted); }
.c-red-t { color: var(--red-ink); }
.c-blue-t { color: var(--blue-ink); }
.equips { display: flex; gap: 2px; margin-top: auto; flex-wrap: wrap; }
.equips img { width: max(16px, calc(var(--h) * .24)); aspect-ratio: 360 / 502; border-radius: 3px; box-shadow: 0 1px 3px rgba(60, 40, 10, .45); }   /* 先占好高度：图片没载入时量“多状态”也准 */

/* 高亮：青绿 = 我方可行动 / 选中；朱红 = 攻击目标；金 = 待选 */
.slot.can .card { box-shadow: 0 0 0 2px rgba(42, 125, 107, .55); }
.slot.can::after { content: ''; position: absolute; z-index: 2; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.slot.sel { background: rgba(42, 125, 107, .16); box-shadow: inset 0 0 0 2px var(--green); }
.slot.sel .card { box-shadow: 0 0 0 3px var(--green), 0 0 14px rgba(42, 125, 107, .8); }
.slot.tgt { background: rgba(181, 67, 42, .12); box-shadow: inset 0 0 0 2px rgba(181, 67, 42, .55); }
.slot.tgt .card { box-shadow: 0 0 0 3px var(--red), 0 0 14px var(--red); animation: glow 1.2s infinite; }
.slot.pick .card { box-shadow: 0 0 0 3px var(--gold), 0 0 12px var(--gold); animation: glow 1.2s infinite; }
.slot.picked { background: rgba(42, 125, 107, .16); }
.slot.picked .card { box-shadow: 0 0 0 4px var(--green), 0 0 14px var(--green); }
.slot.mpick .card { box-shadow: 0 0 0 2px rgba(214, 160, 60, .75); }
.slot.msel .card { box-shadow: 0 0 0 3px var(--green), 0 0 12px var(--green); }
.slot.mtgt .card { box-shadow: 0 0 0 3px var(--red), 0 0 12px var(--red); }
.slot.bat-a, .slot.bat-t { background: rgba(181, 67, 42, .14); }
.slot.bat-a::before, .slot.bat-t::before { position: absolute; z-index: 3; right: 2px; top: 2px; font-size: 10px; padding: 0 4px; border-radius: 4px; background: var(--red); color: #fff; }
.slot.bat-a::before { content: '攻击'; }
.slot.bat-t::before { content: '被攻击'; }
.slot.empty { background: transparent; box-shadow: none; }
.slot.empty .sq { border: 1px dashed rgba(150, 120, 70, .4); border-radius: 6px; width: calc(var(--h) * .717); margin-left: calc(var(--h) * .1415); }
.slot.drop { cursor: pointer; }
.slot.drop .sq { border: 2px dashed var(--green); background: var(--green-bg); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--green-ink); text-align: center; padding: 2px; }
.slot.drop:hover .sq { background: rgba(42, 125, 107, .24); }
.ins { position: absolute; left: 2px; width: calc(var(--h) - 4px); min-width: 56px; z-index: 4; height: 22px; padding: 0; font-size: 12px; background: var(--green); color: #fff; border: none; border-radius: 11px; font-weight: 600; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.ins:hover:not(:disabled) { background: #33917d; }
.half.bottom .ins { top: -14px; }
.half.top .ins { bottom: -14px; }

/* 城池带：金色，三格 左路城池 | 回合 / 战斗 | 右路城池 */
.cityrow { width: min(100%, calc(var(--gridw) + 20px)); display: grid; grid-template-columns: repeat(3, var(--colw)); gap: var(--lgap); justify-content: center; padding: 5px 0; margin: 1px 0;
  background: linear-gradient(180deg, var(--city1) 0%, var(--city2) 48%, var(--city3) 100%); border: 1px solid var(--city-line); border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 2px 6px rgba(120, 80, 20, .2); }
.city { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; min-height: 32px; border-radius: 7px; font-size: 12px; padding: 0 6px; overflow: hidden; line-height: 1.2; }
.city b { white-space: nowrap; }
.city.has { background: linear-gradient(var(--cityc1), var(--cityc2)); border: 1px solid var(--cityc-line); color: var(--gold-ink); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.city.has b { font-family: var(--font-title); font-size: 15px; letter-spacing: 2px; }
.city.none { background: rgba(255, 255, 255, .3); border: 1px dashed var(--cityc-line); color: var(--mid-ink); }
.city .warn { color: var(--red-ink); font-size: 11px; }
/* 这一路不能攻城（空城计、云海浮槎……，用户 10-17）：红框 + 红标签 */
.city.locked { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55), 0 0 0 2px var(--red-ink); }
.city .lock { display: inline-flex; align-items: baseline; gap: 4px; padding: 1px 7px; border-radius: 9px; font-size: 11px; font-weight: 700; line-height: 16px; color: var(--red-ink); background: var(--red-bg); box-shadow: inset 0 0 0 1px var(--red-ink); white-space: nowrap; font-family: inherit; letter-spacing: 0; }
.city .lock small { font-weight: 400; font-size: 10px; }
/* 本局小结（用户 10-14）：对局结束弹窗里 */
.sum { margin: 10px 0 4px; text-align: left; }
.sum > summary { cursor: pointer; font-weight: 700; color: var(--gold-ink); }
.sum > summary small { margin-left: 8px; font-weight: 400; color: var(--muted); }
.sum-city { margin: 6px 0 0; font-size: 12px; color: var(--text2); }
.sum-side { margin-top: 10px; }
.sum-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.sum-head small { color: var(--muted); }
.sum-why { margin: 4px 0 0; font-size: 12px; color: var(--gold-ink); }
.sum-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; margin-top: 6px; }
.sum-u { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--sunk); }
.sum-u.mvp { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold-l); background: linear-gradient(rgba(255, 238, 180, .45), var(--sunk)); }
.sum-n { display: flex; align-items: center; gap: 6px; }
.sum-mvp { font-size: 10px; font-weight: 800; padding: 0 5px; border-radius: 6px; background: var(--gold); color: #fff; letter-spacing: 1px; }
/* 败方的 SVP（用户 10-23）：和金色 MVP 配套的银色（称号的 .t-silver 那组颜色） */
.sum-u.svp { border-color: #a7b1bb; box-shadow: inset 0 0 0 1px #dfe4e9; background: linear-gradient(rgba(226, 231, 237, .5), var(--sunk)); }
.sum-mvp.svp { background: #8592a0; }
.sum-why.svp { color: var(--silver-ink, #4f5a66); }
:root[data-theme="night"] { --silver-ink: #c3cad2; }
.sum-big { display: flex; gap: 10px; margin: 4px 0 2px; font-size: 11px; color: var(--muted); }
.sum-big span { display: flex; flex-direction: column; align-items: center; min-width: 30px; }
.sum-big b { font-size: 16px; color: var(--text); }
.sum-big i { font-style: normal; font-size: 10px; line-height: 1.1; color: var(--muted); }   /* 击败下面的「我方 n」（贾诩） */
.sum-more { font-size: 11px; color: var(--text2); line-height: 1.5; }
/* 能攻城时点城池攻城（用户 10-14） */
.city.can-siege { cursor: pointer; box-shadow: 0 0 0 2px var(--gold-l), 0 0 12px rgba(214, 160, 40, .55); animation: city-pulse 1.4s ease-in-out infinite; }
.city.can-siege .go { font-size: 12px; font-weight: 700; color: var(--gold-ink); padding: 0 6px; border-radius: 8px; background: rgba(255, 238, 180, .8); }
.city.can-siege:hover { filter: brightness(1.05); }
@keyframes city-pulse { 50% { box-shadow: 0 0 0 2px var(--gold-l), 0 0 20px rgba(214, 160, 40, .85); } }
/* 快捷开关组（用户 10-14）：左边一个小图标，点开向右展开一排；长按看说明。印章风格的单字：开着 = 朱砂底白字（盖了印），关着 = 淡底灰字 */
.qs { position: fixed; left: 0; top: calc(46% - 58px); z-index: 61; display: flex; align-items: center; }
.qs-tab { width: 30px; height: 40px; padding: 0; border-radius: 0 10px 10px 0; border: 1px solid var(--line2); border-left: none; background: var(--panel); color: #a8342a; box-shadow: 2px 2px 10px rgba(60, 40, 10, .15); font-family: var(--font-title); font-size: 18px; font-weight: 700; }
.qs.open .qs-tab { background: #a8342a; color: #fff6e6; border-color: #7f2119; }
.qs-list { display: flex; gap: 4px; margin-left: 6px; padding: 4px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 2px 2px 10px rgba(60, 40, 10, .18); }
.qs-item { width: 34px; height: 34px; padding: 0; border-radius: 6px; border: 1.5px solid var(--line2); background: var(--sunk); color: var(--muted); font-family: var(--font-title); font-size: 19px; line-height: 1; -webkit-touch-callout: none; user-select: none; }
.qs-item.on { background: #a8342a; border-color: #7f2119; color: #fff6e6; box-shadow: inset 0 0 0 2px rgba(255, 240, 220, .28), 0 1px 3px rgba(90, 20, 10, .35); }
.mid { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; font-size: 12px; border-radius: 7px; padding: 2px 6px; min-width: 0; text-align: center;
  background: var(--mid-bg); border: 1px solid var(--cityc-line); color: var(--mid-ink); }
.mid b { font-size: 13px; }
.mid span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mid.mine { background: var(--mid-mine); border-color: var(--pri-line); box-shadow: 0 0 0 2px rgba(255, 238, 180, .8), 0 0 10px rgba(214, 160, 60, .55); color: var(--gold-ink); }
.mid.theirs span { color: var(--red-ink); }
.mid.battle { background: var(--red); border-color: var(--red-ink); color: #fff; }

/* 玩家信息条 */
.pstrip { width: min(100%, calc(var(--gridw) + 20px)); display: flex; align-items: center; flex-wrap: wrap; gap: 3px 14px; padding: 4px 12px; border-radius: 10px; background: var(--strip-bg); border: 1px solid var(--line); font-size: 13px; min-width: 0; }
.pstrip.ps-op { border-left: 4px solid var(--red); }
.pstrip.ps-me { border-left: 4px solid var(--green); }
.pstrip.active { box-shadow: 0 0 0 2px rgba(214, 160, 60, .55), 0 0 10px rgba(214, 160, 60, .3); }
.ps-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ps-name b { font-size: 14px; }
.ps-name small { color: var(--muted); margin-left: 2px; }
.ps-name .first { color: var(--gold-ink); margin-left: 6px; }
.auto-tag { margin-left: 6px; font-size: 11px; padding: 0 6px; border-radius: 8px; background: var(--blue-bg); color: var(--blue-ink); border: 1px solid var(--blue); font-weight: 600; vertical-align: 1px; }
.auto-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; padding: 6px 10px; border-radius: 8px; background: var(--blue-bg); border: 1px solid var(--blue); color: var(--blue-ink); font-size: 13px; line-height: 1.5; }
.auto-bar button { margin-left: auto; }
.turn-tag { margin-left: 6px; font-size: 11px; padding: 0 6px; border-radius: 8px; background: var(--gold-l); color: #3a2806; font-weight: 600; vertical-align: 1px; }
.ps-score { color: var(--muted); display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.ps-score b { color: var(--text); font-weight: 600; }
.cities { display: inline-flex; gap: 3px; }
.cities b { width: 12px; height: 12px; border-radius: 3px; border: 1px solid #b0904f; background: rgba(255, 255, 255, .6); }
.cities b.on { background: linear-gradient(#f0cd73, var(--gold)); border-color: #a5741f; }
.ps-counts { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; color: var(--text2); }
.ps-counts button { padding: 1px 8px; font-size: 12px; }
.ps-placed { display: flex; gap: 3px; align-items: center; flex-wrap: wrap; }
.ps-placed small { color: var(--muted); }
.ps-placed img { width: 24px; border-radius: 3px; cursor: pointer; }

/* 手牌托盘：和棋盘分开的一块木纸色托盘，左边是我的信息 */
.tray { flex: none; display: grid; grid-template-columns: minmax(200px, 250px) 1fr; gap: 12px; padding: 8px 14px; min-width: 0;
  background: linear-gradient(180deg, var(--tray1), var(--tray2)); border-top: 2px solid var(--tray-line); box-shadow: inset 0 7px 10px -7px rgba(90, 60, 20, .4); }
.tray.spec { grid-template-columns: 1fr; }
.tray .pstrip { width: 100%; flex-direction: column; align-items: flex-start; gap: 3px; background: var(--strip-bg); }
.tray-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.acts { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; padding: 0 2px; }
.acts small { color: var(--text2); }
.acts .np { margin-left: auto; }
.acts .none { color: var(--muted); }
.chip-btn { padding: 0 8px; font-size: 12px; border-radius: 10px; background: rgba(42, 125, 107, .12); border-color: rgba(42, 125, 107, .45); color: var(--green-ink); line-height: 20px; }
.chip-btn.on { background: var(--green); color: #fff; border-color: var(--green); }
.tray-hand { min-width: 0; display: flex; flex-direction: column; }
.hbar { font-size: 12.5px; color: var(--text2); line-height: 20px; height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.hbar.dim { color: var(--muted); }
.hbar.sel b { color: var(--green-ink); }
.hbar.sel span { margin: 0 8px 0 2px; color: var(--gold-ink); }
.hbar.sel em { margin: 0; font-size: 12px; color: var(--muted); }
.hand { display: flex; gap: 8px; overflow-x: auto; padding: 6px 8px 6px; min-width: 0; max-width: 100%; }
.hcard { position: relative; flex-shrink: 0; height: var(--hh); width: calc(var(--hh) * .717); border-radius: 6px; cursor: pointer; transition: transform .15s, box-shadow .15s; box-shadow: 0 2px 5px rgba(60, 40, 10, .3); }
.hcard img { width: 100%; height: 100%; border-radius: 6px; display: block; }
.hcard.can { box-shadow: 0 0 0 2px var(--gold), 0 0 12px rgba(230, 180, 80, .8); }
.hcard.can:hover { transform: translateY(-3px); }
.hcard.hsel, .hcard.hsel:hover { transform: translateY(-4px); box-shadow: 0 0 0 3px #fffaf0, 0 0 0 6px var(--green), 0 6px 16px rgba(42, 125, 107, .55); }
.hcard.hsel::before { content: '再点打出'; position: absolute; z-index: 2; left: 50%; bottom: 5px; transform: translateX(-50%); font-size: 11px; line-height: 18px; padding: 0 7px; border-radius: 9px; background: var(--green); color: #fff; white-space: nowrap; font-weight: 600; }
.hcard.pick { box-shadow: 0 0 0 2px var(--gold), 0 0 10px rgba(230, 180, 80, .7); }
.hcard.picked { box-shadow: 0 0 0 3px var(--green), 0 0 10px var(--green); }
/* 不能打出的牌：浅灰半透明遮罩 + 稍微去色，牌面仍看得清 */
.hcard.veil img { filter: saturate(.45); }
.hcard.veil::after { content: ''; position: absolute; inset: 0; border-radius: 6px; background: rgba(236, 231, 222, .5); pointer-events: none; }
.veil-tag { position: absolute; z-index: 2; left: 50%; bottom: 5px; transform: translateX(-50%); font-size: 10.5px; line-height: 17px; padding: 0 6px; border-radius: 8px; background: rgba(84, 72, 56, .8); color: #fff; white-space: nowrap; pointer-events: none; }
.hcard .cost { position: absolute; z-index: 2; top: 3px; left: 3px; background: radial-gradient(circle at 35% 35%, #ffe8a6, var(--gold) 75%); color: #2b1d05; border: 1px solid #8e6418; font-style: normal; font-weight: 800; width: 21px; height: 21px; border-radius: 50%; text-align: center; line-height: 19px; font-size: 12px; }

/* ---------- 右侧栏：提示面板 / 卡图预览框 / 日志 ---------- */
.side { position: relative; width: var(--side); flex-shrink: 0; display: flex; flex-direction: column; border-left: 1px solid var(--line2); background: var(--side-bg); min-height: 0; }
.side-panel { flex: none; max-height: var(--pn-max, 54%); overflow: auto; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.board-screen.my-turn .side-panel { box-shadow: inset 4px 0 0 var(--gold); background: var(--panel-mine); }
.pvbox { flex: 0 1 auto; min-height: 150px; max-height: 50%; overflow: auto; padding: 10px 12px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--pv1), var(--pv2)); }
.pv-empty { display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; text-align: center; min-height: 120px; border: 1px dashed var(--line2); border-radius: 10px; color: var(--muted); font-size: 13px; padding: 10px; }
.pv-empty b { font-family: var(--font-title); font-size: 17px; color: var(--text2); letter-spacing: 2px; }
.pvbox .pv-top { display: flex; gap: 10px; align-items: flex-start; }
.pvbox .pv-img { width: 46%; flex-shrink: 0; }
.logbox { flex: 1; display: flex; flex-direction: column; min-height: 130px; background: var(--log-bg); }   /* 预览框和面板再大也给日志留几行 */
.log-head { padding: 6px 12px; font-weight: 700; color: var(--text2); cursor: default; letter-spacing: 2px; border-bottom: 1px solid rgba(150, 120, 70, .2); }
.log { flex: 1; overflow: auto; padding: 4px 12px 12px; font-size: 13px; }
.lg { padding: 1px 0; color: var(--text2); }
.lg.head { margin-top: 8px; padding: 4px 0 2px; color: var(--gold-ink); border-top: 1px solid var(--line); font-weight: 700; }
.lg[data-no] { cursor: help; }
.lg[data-no]:hover { background: rgba(184, 134, 46, .1); }

.pn-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pn-head b { font-size: 16px; color: var(--gold-ink); font-family: var(--font-title); letter-spacing: 1px; }
.pn-head small { color: var(--muted); flex: 1; min-width: 0; }
.pn-sec { margin: 8px 0; }
.pn-sec > small { color: var(--muted); display: block; margin-bottom: 4px; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opts.col { flex-direction: column; }
.opt { padding: 5px 10px; font-size: 13px; text-align: left; }
.opt small { margin-left: 6px; color: var(--gold-ink); }
.opt[data-on] { background: var(--ok-bg); border-color: var(--green); }
.opt.atk { border-color: rgba(181, 67, 42, .45); }
/* 攻城按钮：金色、单独一行，和鼓舞分开（用户 10-14：攻城和鼓舞老点错） */
.pn-siege .opt[data-siege] { padding: 7px 18px; font-size: 14px; font-weight: 700; background: linear-gradient(#f5dc8e, #d8a546); border: 1px solid var(--gold); color: #3a2806; box-shadow: 0 1px 4px rgba(120, 80, 10, .35); }
.pn-siege .opt[data-siege]:hover:not(:disabled) { filter: brightness(1.06); }
.opt.atk:hover:not(:disabled) { border-color: var(--red); background: #fbeee6; }
.opt .est { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
/* 选目标时两边的单位都能选：名字前标我方 / 对方（反馈：镜像局两个同名武将分不出来） */
.opt .opt-side { font-style: normal; font-size: 11px; margin-right: 5px; padding: 0 4px; border-radius: 4px; }
.opt .opt-side.mine { color: var(--blue-ink); background: var(--blue-bg); }
.opt .opt-side.foe { color: var(--red-ink); background: var(--red-bg); }
.pn-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.side-panel .pn-foot { position: sticky; bottom: -10px; z-index: 3; margin-bottom: -10px; padding: 6px 0 10px; background: linear-gradient(transparent, var(--panel) 7px); }
.cnt { color: var(--muted); font-size: 13px; margin-right: auto; }
.pn-sel { display: flex; gap: 8px; align-items: center; }
.pn-sel img { width: 44px; border-radius: 4px; }
.pn-sel div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pn-sel small { color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.card-grid.small { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.gcard { position: relative; cursor: pointer; text-align: center; font-size: 12px; border-radius: 6px; padding: 3px; min-width: 0; }
.gcard:hover { background: rgba(184, 134, 46, .12); }
.gcard img { width: 100%; border-radius: 5px; display: block; }
.gcard span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcard small { display: block; color: var(--muted); }
.gcard.on { background: rgba(42, 125, 107, .2); outline: 2px solid var(--green); }
.cnt-badge { position: absolute; top: 5px; right: 5px; background: var(--ink); color: #fff; font-style: normal; font-weight: 700; font-size: 11px; padding: 0 5px; border-radius: 8px; line-height: 17px; }
.mn-card { display: flex; gap: 8px; }
.mn-card img { width: 70px; border-radius: 5px; align-self: flex-start; }
.mn-card p { margin: 2px 0; font-size: 13px; }
.mn-ev { font-size: 13px; color: var(--hl); margin: 4px 0; }
.mn-ops { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.mn-ops button { padding: 2px 8px; font-size: 12px; }
.mn-ops button.on { background: #f3dfae; border-color: var(--gold); color: var(--gold-ink); }
.mn-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding: 8px; background: var(--sunk); border-radius: 8px; }
.mn-form label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 2px; }
.mn-form input[type=number] { width: 84px; }
.mn-form label.chk { flex-direction: row; align-items: center; gap: 4px; color: var(--text); }
.mn-form .card-grid { flex-basis: 100%; }
.mf-pick { flex-basis: 100%; font-size: 13px; padding: 4px 8px; border-radius: 6px; background: var(--panel2); cursor: pointer; }
.mf-pick.active { outline: 1px solid var(--gold); }
.mf-pick i { color: var(--muted); font-style: normal; }
label.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 8px; cursor: pointer; }

/* ---------- 弹窗 ---------- */
#modal { position: fixed; inset: 0; z-index: 40; background: rgba(60, 45, 25, .35); display: flex; align-items: center; justify-content: center; padding: 16px; }
#modal.mini { inset: auto 16px 16px auto; background: none; padding: 0; }
#modal.mini button { box-shadow: 0 4px 16px rgba(60, 40, 10, .3); max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.with-side #modal:not(.mini), body.with-side #pop { right: var(--side); }        /* 电脑棋盘：弹窗只盖住棋盘，右侧预览框和日志仍然可用 */
body.with-side #modal.mini { right: calc(var(--side) + 16px); }
.modal-box { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 14px; width: min(760px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; padding: 14px 16px; box-shadow: 0 10px 40px rgba(60, 40, 10, .3); }
.modal-head { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.modal-head b { font-size: 17px; color: var(--gold-ink); font-family: var(--font-title); letter-spacing: 1px; }
.modal-box h4 { margin: 12px 0 6px; color: var(--text2); font-size: 13px; }
.ev { color: var(--hl); margin: 4px 0 10px; }
.dhint { margin-top: -4px; }
.fake { background: var(--sunk); padding: 10px 12px; border-radius: 8px; color: var(--text2); }
.mcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.mcard { cursor: pointer; border-radius: 8px; padding: 4px; background: var(--sunk); border: 2px solid transparent; min-width: 0; }
.mcard:hover { border-color: rgba(184, 134, 46, .5); }
.mcard img { width: 100%; border-radius: 6px; display: block; }
.mcard.on { border-color: var(--green); background: var(--ok-bg); box-shadow: 0 0 0 3px rgba(42, 125, 107, .2); }
.mc-text { padding: 4px 2px; font-size: 13px; display: flex; flex-direction: column; }
.mc-text small { color: var(--muted); }
.mc-text .tg { color: var(--gold-ink); }
.mcard.on .mc-text .tg { color: var(--green-ink); font-weight: 600; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.queue { margin: 4px 0; padding-left: 22px; font-size: 13px; }
.queue small { color: var(--muted); }
.arr-list { display: flex; flex-direction: column; gap: 6px; }
.arr-row { display: flex; align-items: center; gap: 8px; background: var(--sunk); border-radius: 8px; padding: 4px 8px; }
.arr-row img { width: 40px; border-radius: 4px; }
.arr-row b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.seg button { border: none; border-radius: 0; padding: 4px 10px; font-size: 13px; background: transparent; }
.seg button.on { background: linear-gradient(var(--pri1), var(--pri2)); color: var(--pri-text); font-weight: 600; }
.winner { font-family: var(--font-title); font-size: 30px; font-weight: 800; text-align: center; color: var(--gold-ink); margin: 10px 0 0; letter-spacing: 3px; }
/* 对方想再来一局（用户 10-23「大点亮出」）：结果下面一条金边大字 + 按钮；结束弹窗收起时，右下角的小按钮也换字、发光 */
.rematch-ask { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 4px; padding: 10px 14px; border: 1px solid var(--gold); border-radius: 10px;
  background: linear-gradient(rgba(255, 238, 180, .55), var(--sunk)); animation: rematch-glow 1.6s ease-in-out infinite; }
.rematch-ask b { font-family: var(--font-title); font-size: 22px; letter-spacing: 2px; color: var(--gold-ink); }
.rematch-ask button { font-size: 15px; padding: 6px 20px; }
#modal.mini button.ask { animation: rematch-glow-mini 1.6s ease-in-out infinite; }
@keyframes rematch-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(232, 196, 112, 0); } 50% { box-shadow: 0 0 0 5px rgba(232, 196, 112, .55); } }
@keyframes rematch-glow-mini { 0%, 100% { box-shadow: 0 4px 16px rgba(60, 40, 10, .3), 0 0 0 0 rgba(232, 196, 112, 0); } 50% { box-shadow: 0 4px 16px rgba(60, 40, 10, .3), 0 0 0 6px rgba(232, 196, 112, .6); } }
@media (prefers-reduced-motion: reduce) { .rematch-ask, #modal.mini button.ask { animation: none; } }
.modal-box .ev { text-align: center; }

#pop { position: fixed; inset: 0; z-index: 50; background: rgba(60, 45, 25, .3); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pop-box { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 12px; padding: 12px 14px; width: min(440px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; box-shadow: 0 10px 40px rgba(60, 40, 10, .3); }
.pop-box.wide { width: min(780px, 100%); }
.pop-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.pop-head b { color: var(--blue-ink); font-size: 16px; font-family: var(--font-title); letter-spacing: 1px; }
.pop-box h4 { margin: 12px 0 6px; color: var(--text2); }
#imp-list button { display: inline-flex; flex-direction: column; margin: 4px; text-align: left; }
#imp-list small { color: var(--muted); }
/* 设置 */
.set-sec { padding: 8px 0; border-top: 1px solid rgba(150, 120, 70, .2); }
.set-sec:first-of-type { border-top: none; }
.set-sec h4 { margin: 0 0 2px; font-size: 14px; color: var(--text); }
.set-sec label.chk { margin-top: 6px; }
.set-sec .hint { margin: 4px 0 0 24px; font-size: 12.5px; }
.set-sec > button { margin-top: 6px; }
.keys ul { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text2); }
.keys li { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.keys li span { margin-left: 6px; }
/* 记牌器 */
.big-num { font-size: 34px; font-weight: 800; text-align: center; margin: 6px 0 0; color: var(--blue-ink); }
.big-num small { font-size: 15px; font-weight: 400; color: var(--muted); }
.dt-sum { margin: 2px 0; font-size: 14px; }
.dt-sum b { font-size: 18px; color: var(--blue-ink); }
.warn-line { margin: 4px 0; padding: 4px 8px; border-radius: 6px; background: var(--red-bg); color: var(--red-ink); font-size: 13px; }
.dt-g h4 { display: flex; align-items: center; gap: 6px; margin: 12px 0 6px; font-size: 14px; color: var(--text); }
.dt-g h4 img { width: 22px; border-radius: 3px; cursor: pointer; }
.dt-g h4 small { color: var(--muted); font-weight: 400; }

/* 卡牌预览：右侧预览框 / 手机长按弹出 / 大厅组卡时的浮动提示 */
#preview { position: fixed; z-index: 60; width: 300px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; pointer-events: none; box-shadow: 0 10px 30px rgba(60, 40, 10, .3); }
.pv-img { width: 100%; border-radius: 8px; display: block; box-shadow: 0 3px 10px rgba(60, 40, 10, .28); }
.pv-text { margin-top: 6px; font-size: 13px; min-width: 0; }
.pvbox .pv-text { margin-top: 0; }
.pv-name { display: block; font-size: 17px; font-family: var(--font-title); letter-spacing: 1px; color: var(--text); }
.pv-meta { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; }
.pv-orig { margin: 6px 0 0; line-height: 1.55; color: var(--text); }
.pv-orig b { color: var(--gold-ink); }
.pv-gen { color: var(--text2); font-size: 12.5px; margin: 6px 0 0; padding-top: 4px; border-top: 1px dashed var(--line); }
.pv-state { margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--line); color: var(--text2); font-size: 12.5px; }
.pv-ah { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.pv-ah > span b { font-size: 16px; color: var(--text); }
.pv-ah b.up { color: var(--green-ink); }
.pv-ah b.down { color: var(--red-ink); }
.pv-ah small { color: var(--muted); margin-left: 4px; font-size: 11px; }
.pv-ah .pips { display: inline-flex; margin-left: auto; }
.pv-play { margin-top: 8px; padding: 4px 8px; border-radius: 6px; background: rgba(184, 134, 46, .14); color: var(--gold-ink); font-size: 13px; }
.pv-play b { font-size: 15px; }
.pv-play.sel { background: var(--green-bg); color: var(--green-ink); box-shadow: inset 0 0 0 1px rgba(42, 125, 107, .4); }
.pv-play.no { background: rgba(110, 93, 68, .1); color: var(--muted); }
.est-box { margin-top: 8px; padding: 5px 8px; border-radius: 6px; background: var(--red-bg); border: 1px solid rgba(181, 67, 42, .3); font-size: 13px; color: var(--text); }
.est-box small { display: block; color: var(--red-ink); font-size: 11.5px; }
.est-box .die { color: var(--red-ink); font-weight: 700; }
#preview.touch { pointer-events: auto; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(340px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; }
#preview.touch .pv-img { max-height: 48vh; width: auto; max-width: 100%; margin: 0 auto; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); z-index: 70; background: var(--panel); border: 1px solid var(--gold); color: var(--text); box-shadow: 0 4px 16px rgba(60, 40, 10, .25); padding: 8px 16px; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
body.with-side #toast { left: calc(50% - var(--side) / 2); }

/* ---------- 组卡 ---------- */
.setup { max-width: 1100px; margin: 0 auto; padding: 12px 16px 40px; display: flex; flex-direction: column; gap: 12px; }
.seats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.seat-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; min-width: 0; }
.seat-card.me { border-color: var(--green); box-shadow: inset 4px 0 0 var(--green); }
.seat-card .ready { color: var(--green-ink); }
.seat-card.empty { color: var(--muted); }
.setup-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; box-shadow: 0 2px 8px rgba(90, 60, 20, .05); }
.setup-card h3 { margin: 0 0 8px; }
.picked { color: var(--gold-ink); font-size: 14px; font-weight: 400; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; align-items: center; }
.btn-row input[type=file] { flex: 1; min-width: 0; }
.ready-row { display: flex; gap: 12px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
button.big { padding: 10px 30px; font-size: 16px; }
.dl-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.dl-head span { color: var(--muted); }
.deck-list { display: flex; flex-direction: column; gap: 10px; }
.dl-g { display: flex; gap: 10px; min-width: 0; }
.dl-gen { width: 64px; flex-shrink: 0; text-align: center; font-size: 12px; }
.dl-gen img { width: 64px; border-radius: 5px; display: block; }
.dl-gen small { color: var(--muted); display: block; }
.dl-cards { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.dl-card { width: 54px; position: relative; font-size: 11px; text-align: center; }
.dl-card img { width: 54px; border-radius: 4px; display: block; }
.dl-card span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text2); }
.dl-card i { position: absolute; top: 2px; right: 2px; background: var(--ink); color: #fff; font-style: normal; font-weight: 700; font-size: 11px; padding: 0 4px; border-radius: 6px; }
.recent summary { cursor: pointer; color: var(--muted); }
.recent button { display: inline-flex; flex-direction: column; margin: 4px; text-align: left; }
.recent button small { color: var(--muted); }
.gens h4 { margin: 12px 0 6px; color: var(--text2); font-family: var(--font-title); font-size: 16px; letter-spacing: 2px; }
.gen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.gen { position: relative; cursor: pointer; text-align: center; font-size: 12px; border-radius: 6px; padding: 2px; min-width: 0; }
.gen img { width: 100%; border-radius: 5px; display: block; aspect-ratio: 360 / 502; object-fit: cover; background: #e6dcc6; }
.gen span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gen.on { outline: 3px solid var(--green); background: var(--green-bg); }
.gen i { position: absolute; top: 4px; left: 4px; background: var(--green); color: #fff; font-weight: 800; font-style: normal; width: 20px; height: 20px; border-radius: 50%; line-height: 20px; }
.resp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.resp-item { display: flex; align-items: center; gap: 8px; background: var(--sunk); border-radius: 8px; padding: 4px 8px; min-width: 0; }
.resp-item img { width: 42px; border-radius: 4px; }
.ri-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ri-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ri-text small { color: var(--muted); }
.banner { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.banner.bad { background: var(--red-bg); border-color: rgba(181, 67, 42, .3); color: var(--red-ink); }

/* 手动组卡 */
.b-count { font-size: 14px; margin-left: 6px; padding: 1px 8px; border-radius: 8px; background: var(--panel2); color: var(--text2); }
.b-count.ok { background: var(--green-bg); color: var(--green-ink); }
.b-count.bad { background: var(--red-bg); color: var(--red-ink); }
#b-name { flex: 1; min-width: 120px; }
.b-gen { margin: 14px 0 6px; font-size: 14px; }
.b-gen small { color: var(--muted); font-weight: normal; margin-left: 6px; }
.b-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.b-card { background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: 5px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.b-card.on { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.b-card.ban { opacity: .45; }
.b-card img { width: 100%; border-radius: 4px; display: block; cursor: zoom-in; }
.b-meta b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-meta small { color: var(--muted); font-size: 11px; }
.b-ctl { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.b-ctl i { font-style: normal; font-weight: 700; min-width: 18px; text-align: center; }
.b-ctl button { min-width: 30px; padding: 2px 0; }

/* 大厅：我的套牌 */
.my-decks { display: flex; flex-direction: column; gap: 8px; }
.md-item { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; min-width: 0; }
.md-gens { display: flex; gap: 3px; flex-shrink: 0; }
.md-gens img { width: 34px; border-radius: 4px; cursor: zoom-in; }
.md-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.md-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-text small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-btns { display: flex; gap: 4px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .md-item { flex-wrap: wrap; } .md-btns { width: 100%; } }

/* ---------- 手机 / 窄屏 ---------- */
@media (max-width: 900px), (pointer: coarse) {
  :root { --cgap: 4px; }
  .topbar { flex-wrap: wrap; padding: 4px 16px; row-gap: 4px; }
  .tb-left { font-size: 13px; gap: 8px; flex: 1; }
  .tb-left .room { font-size: 16px; }
  .tb-turn { display: none; }
  .tb-mid { order: 3; flex-basis: 100%; justify-content: flex-start; }
  .board-screen { height: auto; min-height: 100vh; }
  .main { flex-direction: column; }
  .board-col { display: block; }
  .board-wrap { overflow: visible; padding: 6px 16px; }
  .board { gap: 5px; }
  .half { padding: 5px 0; border-radius: 10px; }
  .col { border-radius: 8px; }
  .half.top .col { padding-top: 16px; }
  .half.bottom .col { padding-bottom: 16px; }
  .col-cap { writing-mode: horizontal-tb; width: auto; right: 0; bottom: auto; height: 15px; padding: 0; justify-content: center; background: none !important; border-radius: 0; font-size: 10px; font-weight: 400; line-height: 15px; letter-spacing: 2px; }
  .half.top .col-cap { top: 0; justify-content: center; }
  .half.bottom .col-cap { top: auto; bottom: 0; justify-content: center; }
  .pstrip { padding: 4px 8px; gap: 2px 10px; font-size: 12.5px; }
  .tray { display: block; margin: 2px 16px 0; padding: 6px 8px 4px; border: 1px solid var(--tray-line); border-radius: 12px; }
  .tray .pstrip { flex-direction: row; align-items: center; gap: 2px 10px; }
  .tray-info { gap: 4px; margin-bottom: 2px; }
  .hand { padding: 6px 7px 6px; gap: 6px; }
  .side-panel .pn-hint-play { display: none; }
  .side-panel .pn-foot .cnt { flex-basis: 100%; }
  .keys { display: none; }
  .side { width: auto; border-left: none; background: none; }
  .side-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-height: 46vh; border-top: 2px solid var(--gold); box-shadow: 0 -6px 20px rgba(60, 40, 10, .25); border-radius: 12px 12px 0 0; padding: 8px 16px 12px; }
  .board-screen.my-turn .side-panel { box-shadow: 0 -6px 20px rgba(60, 40, 10, .25); }
  /* 收起：只留标题栏（标题 + 展开）。以前是压成 44px 高：贴底的“已选 / 确认”会盖住展开按钮，内容滚动过的话标题栏也看不到，
     就只剩一个点不了的“确认”、也滑不动（张春华拔羽毛时的反馈） */
  .side-panel.min { max-height: none; overflow: hidden; padding-bottom: 8px; }
  .side-panel.min > :not(.pn-head) { display: none !important; }
  .side-panel.min .pn-head { margin-bottom: 0; flex-wrap: nowrap; }
  .side-panel.min .pn-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-panel.min [data-act=panel-min] { background: linear-gradient(var(--pri1), var(--pri2)); border-color: var(--pri-line); color: var(--pri-text); }
  .side-panel .pn-head small { display: none; }
  .side-panel .pn-sec { margin: 6px 0; }
  .side-panel .pn-foot { margin-top: 6px; bottom: -12px; margin-bottom: -12px; padding-bottom: 12px; }
  .ins { font-size: 11px; height: 20px; }
  body:has(#modal.mini) .board-screen .main { padding-bottom: 60px; }   /* 收起的弹窗按钮不挡住手牌 */
  .logbox { margin: 10px 16px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; min-height: 0; }
  .log-head { cursor: pointer; border-bottom: none; }
  .logbox .log { display: none; max-height: 50vh; }
  .logbox.open .log { display: block; }
  .slot .uinfo { padding: 2px 2px 2px 3px; gap: 1px; }
  .chips i { font-size: 9px; padding: 0 2px; line-height: 13px; }
  .un { font-size: 10.5px; }
  .pips { gap: 2px; }
  .pips b { width: 8px; height: 8px; }
  .gname { font-size: 9.5px; }
  .slot.can::after { top: 2px; right: 2px; width: 7px; height: 7px; }
  .cityrow { padding: 4px 0; }
  .city { min-height: 30px; font-size: 10.5px; gap: 2px; padding: 0 3px; }
  .city.has b { font-size: 13px; letter-spacing: 0; }
  .mid { font-size: 10px; padding: 1px 3px; }
  .mid b { font-size: 11px; }
  .modal-box { padding: 12px; }
  .mcards { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  #preview:not(.touch) { display: none; }
  .resp-list { grid-template-columns: 1fr; }
  .gen-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
}

.md-star { background: none; border: none; padding: 0 2px; font-size: 20px; line-height: 1; color: #b9a67e; cursor: pointer; flex-shrink: 0; }
.md-star.on { color: var(--gold); }
.md-star:hover:not(:disabled) { border: none; color: var(--gold); }
.md-item.md-cur { outline: 1px solid var(--gold); }
.md-tag { font-style: normal; font-size: 11px; font-weight: 600; margin-left: 8px; padding: 0 6px; border-radius: 6px; background: var(--gold); color: #fff; vertical-align: 2px; }
.md-more { margin-top: 8px; }
.md-more summary { cursor: pointer; color: var(--muted); padding: 4px 0; }
.md-more .my-decks { margin-top: 6px; }

/* 对局记录 / 回放 / 反馈（records.js） */
a.btn { display: inline-block; text-decoration: none; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 3px 10px; font-size: 13px; }
a.btn:hover { border-color: #b39a6c; }
.lb-links { display: flex; gap: 8px; margin: -6px 0 14px; flex-wrap: wrap; }
.rc-item { display: flex; gap: 10px; align-items: center; background: var(--sunk); border-radius: 10px; padding: 8px 10px; margin: 6px 0; flex-wrap: wrap; }
.rc-main { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 3px; }
.rc-vs { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.rc-vs span { display: flex; flex-direction: column; }
.rc-vs small, .rc-meta small { color: var(--muted); font-size: 12px; }
.rc-vs i { font-style: normal; color: var(--muted); }
.rc-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.rc-win { color: var(--green); }
.rc-un { color: var(--muted); }
.rc-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.rp-row { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.pop-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }

/* ---------- 配色预设（设置 → 配色；默认是上面 :root 的米黄纸卷） ---------- */
/* 青瓷：淡青绿底、松石青顶栏 */
:root[data-theme="celadon"] { --bg: #e8efe9; --bg-hi: #f3f8f3; --bg1: #e9f1ea; --bg2: #dce8de; --panel: #f8fbf7; --panel2: #e3eee5; --sunk: #eef5ef; --line: #bcd2c3; --line2: #9fbcaa; --text: #1f2f29; --text2: #3c5148; --muted: #5d7368; --hl: #2d6d5c; --gold: #b08a3a; --gold-ink: #6f5410; --input-bg: #fbfefb; --btn1: #f1f8f2; --btn2: #e0ede3; --btn-line: #a9c6b3; --btn-hl: #6f9a82; --btnh1: #f6fbf7; --btnh2: #e6f1e9; --pri1: #5aa58f; --pri2: #3f8a74; --pri-line: #2f6f5d; --pri-text: #f6fffb; --prih1: #66b39c; --prih2: #48957f; --top1: #3d6f68; --top2: #2f5b55; --top-line: #c9a85a; --top-text: #eef6f2; --top-acc: #f0d78f; --top-dim: #cfe0d8; --op-t1: rgba(176, 96, 70, .04); --op-t2: rgba(176, 96, 70, .12); --op-cap: #8a4a38; --me-cap: #2b6a5c; --lane-bg: rgba(250, 254, 251, .65); --lane-mark: rgba(70, 120, 100, .14); --grain: rgba(60, 110, 90, .05); --camp-bg: rgba(240, 248, 242, .85); --unit-bg: rgba(252, 255, 253, .95); --unit-bg-op: rgba(255, 250, 247, .95); --unit-edge: rgba(80, 130, 110, .25); --city1: #d9c37e; --city2: #efe3b3; --city3: #d4b86d; --city-line: #a88d43; --cityc1: #fffbe9; --cityc2: #f1e5bb; --cityc-line: #a88d43; --mid-bg: rgba(255, 255, 248, .6); --mid-ink: #3f3714; --mid-mine: #fffdf2; --strip-bg: rgba(250, 254, 251, .85); --tray1: #cfe2d5; --tray2: #bfd7c7; --tray-line: #8fb39d; --side-bg: #eef5f0; --panel-mine: #fbfffc; --pv1: #f6fbf7; --pv2: #e9f2eb; --log-bg: #e6efe8; --ok-bg: #d5ebe2; }
/* 水墨：素白宣纸、墨灰顶栏 */
:root[data-theme="ink"] { --bg: #efeeeb; --bg-hi: #fafaf8; --bg1: #f1f0ed; --bg2: #e4e2dd; --panel: #fbfbfa; --panel2: #e9e8e4; --sunk: #f3f2ef; --line: #cfccc5; --line2: #b6b2a9; --text: #23221f; --text2: #45433e; --muted: #6c6962; --hl: #5b4a2a; --gold: #9b8350; --gold-ink: #5e4b22; --input-bg: #ffffff; --btn1: #fbfbfa; --btn2: #ecebe7; --btn-line: #c2beb5; --btn-hl: #8e897e; --btnh1: #ffffff; --btnh2: #f0efeb; --pri1: #4a4a48; --pri2: #333331; --pri-line: #222220; --pri-text: #f7f5ef; --prih1: #585856; --prih2: #3e3e3c; --top1: #4a4b4e; --top2: #38393c; --top-line: #a8946a; --top-text: #f2f1ec; --top-acc: #e5d3a5; --top-dim: #cfcdc6; --op-t1: rgba(150, 70, 50, .03); --op-t2: rgba(150, 70, 50, .09); --op-edge: rgba(140, 70, 50, .16); --op-cap: #7d4434; --op-capbg: rgba(140, 70, 50, .07); --me-t1: rgba(60, 90, 110, .1); --me-t2: rgba(60, 90, 110, .03); --me-edge: rgba(60, 90, 110, .16); --me-cap: #3c5a6e; --me-capbg: rgba(60, 90, 110, .07); --lane-bg: rgba(255, 255, 255, .6); --lane-mark: rgba(60, 60, 55, .12); --grain: rgba(60, 60, 55, .04); --camp-bg: rgba(245, 244, 240, .85); --unit-bg: rgba(255, 255, 255, .95); --unit-bg-op: rgba(255, 252, 250, .95); --unit-edge: rgba(90, 85, 75, .22); --city1: #c9c4b6; --city2: #ebe8df; --city3: #c4bfb0; --city-line: #99937f; --cityc1: #ffffff; --cityc2: #ece8dc; --cityc-line: #99937f; --mid-bg: rgba(255, 255, 255, .55); --mid-ink: #3a362c; --mid-mine: #ffffff; --strip-bg: rgba(255, 255, 255, .85); --tray1: #dedbd4; --tray2: #d1cdc4; --tray-line: #a8a397; --side-bg: #f3f2ef; --panel-mine: #ffffff; --pv1: #fbfbfa; --pv2: #efeee9; --log-bg: #ebe9e4; --ok-bg: #dcebe6; }
/* 樱粉：浅粉底、梅紫顶栏 */
:root[data-theme="sakura"] { --bg: #f6ecee; --bg-hi: #fdf6f7; --bg1: #f8eef0; --bg2: #efdfe3; --panel: #fffafb; --panel2: #f4e3e7; --sunk: #faf0f2; --line: #e1c4cb; --line2: #cfa6b0; --text: #3a2228; --text2: #5a3c44; --muted: #80616a; --hl: #8e3a52; --gold: #b8865a; --gold-ink: #7a4a2a; --input-bg: #fffcfd; --btn1: #fdf3f5; --btn2: #f3e0e5; --btn-line: #d8b0ba; --btn-hl: #b07c8a; --btnh1: #fff8f9; --btnh2: #f7e8ec; --pri1: #d77f97; --pri2: #bf5f7b; --pri-line: #9d4560; --pri-text: #fffafb; --prih1: #e08ca3; --prih2: #c96b86; --top1: #8a4c62; --top2: #733d51; --top-line: #e0b07a; --top-text: #fbf0f3; --top-acc: #ffd9a8; --top-dim: #ecd3da; --op-t1: rgba(190, 80, 90, .04); --op-t2: rgba(190, 80, 90, .12); --op-cap: #8e3a4a; --me-t1: rgba(110, 120, 170, .12); --me-t2: rgba(110, 120, 170, .03); --me-edge: rgba(100, 110, 160, .18); --me-cap: #4f5a8e; --me-capbg: rgba(100, 110, 160, .08); --lane-bg: rgba(255, 252, 253, .65); --lane-mark: rgba(170, 100, 120, .13); --grain: rgba(160, 90, 110, .045); --camp-bg: rgba(252, 243, 245, .85); --unit-bg: rgba(255, 253, 254, .95); --unit-bg-op: rgba(255, 248, 249, .95); --unit-edge: rgba(170, 110, 125, .25); --city1: #e7b98f; --city2: #f8e2cb; --city3: #e1ad80; --city-line: #b07d52; --cityc1: #fff8f0; --cityc2: #f8e2cb; --cityc-line: #b07d52; --mid-bg: rgba(255, 252, 250, .6); --mid-ink: #4d2f22; --mid-mine: #fffaf5; --strip-bg: rgba(255, 252, 253, .85); --tray1: #ecd2d9; --tray2: #e2c0ca; --tray-line: #c495a2; --side-bg: #faf1f3; --panel-mine: #fffbfc; --pv1: #fff8f9; --pv2: #f6e7eb; --log-bg: #f3e4e8; --ok-bg: #dcefe6; }
/* 海天：浅灰蓝底、深海蓝顶栏 */
:root[data-theme="sea"] { --bg: #e7edf3; --bg-hi: #f4f7fa; --bg1: #e9eff5; --bg2: #dbe4ed; --panel: #f8fafc; --panel2: #e1e9f1; --sunk: #eef3f7; --line: #c2cfdc; --line2: #a3b5c8; --text: #1e2a36; --text2: #3b4b5c; --muted: #5d6e80; --hl: #2d5b88; --gold: #b3913f; --gold-ink: #6e5414; --input-bg: #fcfdfe; --btn1: #f5f8fb; --btn2: #e2eaf2; --btn-line: #b0c1d3; --btn-hl: #7891ab; --btnh1: #fafcfd; --btnh2: #e8eef5; --pri1: #5f8fc0; --pri2: #4574a8; --pri-line: #355d8a; --pri-text: #f7fbff; --prih1: #6c9bcb; --prih2: #5080b4; --top1: #3f5873; --top2: #31475f; --top-line: #d0ad5c; --top-text: #eef3f8; --top-acc: #f4d88a; --top-dim: #ccd7e3; --op-t1: rgba(190, 100, 70, .04); --op-t2: rgba(190, 100, 70, .11); --op-cap: #8a4630; --me-t1: rgba(60, 120, 170, .12); --me-t2: rgba(60, 120, 170, .03); --me-edge: rgba(60, 110, 160, .18); --me-cap: #2f5f8a; --me-capbg: rgba(60, 110, 160, .08); --lane-bg: rgba(250, 252, 254, .65); --lane-mark: rgba(70, 100, 140, .13); --grain: rgba(60, 90, 130, .045); --camp-bg: rgba(241, 245, 250, .85); --unit-bg: rgba(253, 254, 255, .95); --unit-bg-op: rgba(255, 250, 247, .95); --unit-edge: rgba(80, 110, 150, .25); --city1: #dcc483; --city2: #f2e6bd; --city3: #d6bb72; --city-line: #a98d45; --cityc1: #fffbea; --cityc2: #f2e6bd; --cityc-line: #a98d45; --mid-bg: rgba(255, 255, 250, .6); --mid-ink: #3c3418; --mid-mine: #fffdf3; --strip-bg: rgba(250, 252, 254, .85); --tray1: #d3dfea; --tray2: #c3d3e2; --tray-line: #93aac1; --side-bg: #eef3f7; --panel-mine: #fbfdfe; --pv1: #f6f9fb; --pv2: #e8eef4; --log-bg: #e5ecf2; --ok-bg: #d8ece6; }
/* 竹林：米绿底、墨绿顶栏 */
:root[data-theme="bamboo"] { --bg: #edf0e2; --bg-hi: #f7f9ef; --bg1: #eff2e4; --bg2: #e2e7d2; --panel: #fbfcf6; --panel2: #e8edd9; --sunk: #f2f5e8; --line: #c9d2ae; --line2: #adb98b; --text: #252b1a; --text2: #434c32; --muted: #667052; --hl: #4c6b2a; --gold: #a8873a; --gold-ink: #665010; --input-bg: #fdfefa; --btn1: #f7f9ee; --btn2: #e8eed8; --btn-line: #b8c495; --btn-hl: #87975f; --btnh1: #fbfcf4; --btnh2: #edf2df; --pri1: #7ea04a; --pri2: #638634; --pri-line: #4c6b24; --pri-text: #fbfff3; --prih1: #8aad55; --prih2: #6e923d; --top1: #4f6a3a; --top2: #3f572e; --top-line: #c9a85a; --top-text: #f1f5e8; --top-acc: #f0d98f; --top-dim: #d3dcc3; --op-t1: rgba(180, 100, 60, .04); --op-t2: rgba(180, 100, 60, .12); --op-cap: #8a4c2c; --me-t1: rgba(80, 130, 70, .13); --me-t2: rgba(80, 130, 70, .03); --me-edge: rgba(70, 120, 60, .18); --me-cap: #3e6a2e; --me-capbg: rgba(70, 120, 60, .08); --lane-bg: rgba(252, 253, 248, .65); --lane-mark: rgba(100, 120, 60, .14); --grain: rgba(90, 110, 50, .05); --camp-bg: rgba(244, 247, 236, .85); --unit-bg: rgba(254, 255, 251, .95); --unit-bg-op: rgba(255, 250, 245, .95); --unit-edge: rgba(110, 125, 75, .25); --city1: #d8c27e; --city2: #efe4b6; --city3: #d2b76c; --city-line: #a58b44; --cityc1: #fffbe8; --cityc2: #efe4b6; --cityc-line: #a58b44; --mid-bg: rgba(255, 255, 248, .6); --mid-ink: #3b3616; --mid-mine: #fffdf1; --strip-bg: rgba(252, 253, 248, .85); --tray1: #d9e1c4; --tray2: #cbd5b1; --tray-line: #9fae7a; --side-bg: #f2f5e9; --panel-mine: #fdfef8; --pv1: #f9fbf2; --pv2: #edf1e2; --log-bg: #e9eedd; --ok-bg: #dbeee0; }
/* 夜读：暖褐深色（不是纯黑，夜里用） */
:root[data-theme="night"] { --bg: #2a2620; --bg-hi: #3a342b; --bg1: #2c2822; --bg2: #221f1a; --panel: #33302a; --panel2: #3d3931; --sunk: #2e2a24; --line: #544b3e; --line2: #665a49; --text: #ece4d3; --text2: #d6cbb5; --muted: #ab9e86; --hl: #f0cf7c; --gold: #d4a84f; --gold-ink: #f0cf7c; --input-bg: #29251f; --red: #e07a62; --red-ink: #f09a85; --red-bg: rgba(224, 122, 98, .16); --green: #5fbfa6; --green-ink: #8fd8c4; --green-bg: rgba(95, 191, 166, .16); --blue: #8fb0d6; --blue-ink: #b4cbe6; --blue-bg: rgba(143, 176, 214, .16); --btn1: #3e3931; --btn2: #353029; --btn-line: #5f5545; --btn-hl: #8a7a60; --btnh1: #47413a; --btnh2: #3c372f; --pri1: #d4a84f; --pri2: #b98b33; --pri-line: #9a7124; --pri-text: #231a08; --prih1: #dfb45c; --prih2: #c4963d; --top1: #3a3a46; --top2: #2f2f3a; --top-line: #b8913f; --top-text: #efe8da; --top-acc: #f0d07e; --top-dim: #c9c1b2; --op-t1: rgba(210, 110, 80, .05); --op-t2: rgba(210, 110, 80, .12); --op-edge: rgba(210, 110, 80, .22); --op-cap: #f0a58c; --op-capbg: rgba(210, 110, 80, .12); --me-t1: rgba(80, 170, 150, .12); --me-t2: rgba(80, 170, 150, .04); --me-edge: rgba(80, 170, 150, .22); --me-cap: #8fd8c4; --me-capbg: rgba(80, 170, 150, .12); --lane-bg: rgba(52, 47, 40, .7); --lane-mark: rgba(220, 190, 130, .1); --grain: rgba(220, 190, 130, .035); --camp-bg: rgba(45, 41, 35, .85); --unit-bg: rgba(60, 55, 47, .95); --unit-bg-op: rgba(64, 54, 48, .95); --unit-edge: rgba(220, 190, 130, .2); --city1: #8a6d34; --city2: #a88a48; --city3: #836632; --city-line: #c9a352; --cityc1: #5a4a2c; --cityc2: #4a3c22; --cityc-line: #c9a352; --mid-bg: rgba(40, 34, 25, .5); --mid-ink: #f3e2b8; --mid-mine: #4d3f22; --strip-bg: rgba(52, 47, 40, .85); --tray1: #3a342b; --tray2: #312c24; --tray-line: #6b5d45; --side-bg: #2d2924; --panel-mine: #36322b; --pv1: #34302a; --pv2: #2d2a24; --log-bg: #2a2721; --ok-bg: #2f4a40; color-scheme: dark; }
/* 朱砂：暖米底、朱红顶栏（喜庆） */
:root[data-theme="vermilion"] { --bg-hi: #fbf3e6; --bg1: #f5ead7; --bg2: #ecdcc2; --top1: #9a3b2a; --top2: #7f2f21; --top-line: #e0b45a; --top-text: #fbefe4; --top-acc: #ffd98c; --top-dim: #efcfc2; --pri1: #d0573b; --pri2: #b3432b; --pri-line: #8e3220; --pri-text: #fff6ef; --prih1: #da6448; --prih2: #bd4d33; --tray1: #ecd3b8; --tray2: #e2c3a3; --tray-line: #c49a72; }
/* 高对比：白底黑字、粗边框（看不清时用） */
:root[data-theme="contrast"] { --bg: #ffffff; --bg-hi: #ffffff; --bg1: #ffffff; --bg2: #f3f3f3; --panel: #ffffff; --panel2: #efefef; --sunk: #f7f7f7; --line: #8c8c8c; --line2: #5c5c5c; --text: #000000; --text2: #1a1a1a; --muted: #3d3d3d; --hl: #6b4300; --gold: #a36b00; --gold-ink: #5c3b00; --input-bg: #ffffff; --red: #b3000c; --red-ink: #8a0009; --green: #00704f; --green-ink: #00553b; --blue: #003f8a; --blue-ink: #002f69; --btn1: #ffffff; --btn2: #ececec; --btn-line: #5c5c5c; --btn-hl: #000000; --btnh1: #ffffff; --btnh2: #f5f5f5; --pri1: #1f4f9a; --pri2: #163d78; --pri-line: #0d2a55; --pri-text: #ffffff; --prih1: #2a5eb0; --prih2: #1c478a; --top1: #1f2a3a; --top2: #151d29; --top-line: #e0a800; --top-text: #ffffff; --top-acc: #ffd34d; --top-dim: #e6e6e6; --op-t1: rgba(180, 0, 12, .05); --op-t2: rgba(180, 0, 12, .1); --op-edge: rgba(180, 0, 12, .45); --op-cap: #8a0009; --op-capbg: rgba(180, 0, 12, .08); --me-t1: rgba(0, 90, 160, .1); --me-t2: rgba(0, 90, 160, .04); --me-edge: rgba(0, 70, 140, .45); --me-cap: #003f8a; --me-capbg: rgba(0, 70, 140, .08); --lane-bg: #ffffff; --lane-mark: rgba(0, 0, 0, .18); --grain: rgba(0, 0, 0, 0); --camp-bg: #fafafa; --unit-bg: #ffffff; --unit-bg-op: #ffffff; --unit-edge: rgba(0, 0, 0, .55); --city1: #ffd34d; --city2: #fff0b3; --city3: #ffcc33; --city-line: #7a5800; --cityc1: #ffffff; --cityc2: #fff3c4; --cityc-line: #7a5800; --mid-bg: #ffffff; --mid-ink: #000000; --mid-mine: #ffffff; --strip-bg: #ffffff; --tray1: #eeeeee; --tray2: #e2e2e2; --tray-line: #5c5c5c; --side-bg: #f7f7f7; --panel-mine: #ffffff; --pv1: #ffffff; --pv2: #f4f4f4; --log-bg: #f3f3f3; --ok-bg: #cdeedd; }

/* 设置：配色预设 */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.theme { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: var(--sunk); font-size: 12.5px; }
.theme input { display: none; }
.theme i { display: flex; height: 22px; border-radius: 5px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.theme i b { flex: 1; }
.theme i b:first-child { flex: 2; }
.theme.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.board-screen.my-turn .side-panel .pn-foot { background: linear-gradient(transparent, var(--panel-mine) 7px); }

/* 设置：卡图缓存进度 */
.cache-bar { position: relative; height: 18px; border-radius: 9px; background: var(--sunk); border: 1px solid var(--line); overflow: hidden; margin: 4px 0; }
.cache-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--green), var(--gold)); transition: width .2s; }
.cache-bar span { position: relative; display: block; text-align: center; font-size: 12px; line-height: 16px; color: var(--text); }

/* 战绩 · 数据（stats.js） */
.st-box { width: min(980px, 100%); }
.st-box .pop-head { flex-wrap: wrap; gap: 8px; }
.st-tabs { margin-right: auto; }
.st-tiles { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.st-tile { background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; min-width: 88px; display: flex; flex-direction: column; }
.st-tile small { color: var(--muted); font-size: 12px; }
.st-tile b { font-size: 20px; color: var(--text); }
.st-tile i { font-style: normal; font-size: 12px; color: var(--muted); }
.st-filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 6px 0; font-size: 13px; }
.st-filters label { display: inline-flex; align-items: center; gap: 4px; }
.st-filters select, .st-filters input:not([type]) { max-width: 160px; }
.st-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; margin: 4px 0 8px; }
.st-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.st-table th, .st-table td { padding: 4px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.st-table th:first-child, .st-table td:first-child { text-align: left; }
.st-table thead th { background: var(--panel2); color: var(--text2); position: sticky; top: 0; }
.st-table tbody tr:nth-child(even) { background: var(--sunk); }
.st-table small { display: block; color: var(--muted); font-size: 11px; }
.st-click { cursor: pointer; }
.st-click:hover { background: var(--blue-bg) !important; }
.st-sort { border: none; background: transparent; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.st-sort.on { color: var(--blue-ink); font-weight: 700; }
.st-rate { font-weight: 600; }
.st-rate.few { color: var(--muted); font-weight: 400; }
.st-none { color: var(--muted); }
.st-cell { display: inline-flex; align-items: center; gap: 6px; }
.st-card img, .st-gen img { width: 26px; height: 36px; object-fit: cover; border-radius: 3px; }
.st-card b, .st-gen b, .st-deck b { font-weight: 600; }
.st-card small, .st-deck small { display: inline; margin-left: 4px; }
.st-gens { display: inline-flex; gap: 2px; }
.st-gens img { width: 22px; height: 30px; object-fit: cover; border-radius: 3px; }
.st-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .st-two { grid-template-columns: 1fr; } }
.st-rec { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 5px 8px; border-radius: 8px; background: var(--sunk); margin: 4px 0; font-size: 13px; border-left: 4px solid var(--line2); }
.st-rec.win { border-left-color: var(--green); }
.st-rec.lose { border-left-color: var(--red); }
.st-rec > b { width: 1.5em; }
.st-rec.win > b { color: var(--green-ink); }
.st-rec.lose > b { color: var(--red-ink); }
.st-rec i { color: var(--muted); font-style: normal; }
.st-rec-t small { display: block; color: var(--muted); font-size: 11px; }
.st-cardhead { display: flex; gap: 12px; align-items: flex-start; margin: 6px 0; }
.st-cardhead > img { width: 90px; border-radius: 6px; }
.st-cardhead > div { flex: 1; }
.st-cardhead > div > small { display: block; color: var(--muted); }
.st-bar { display: grid; grid-template-columns: 7em 1fr 4em; align-items: center; gap: 8px; margin: 4px 0; font-size: 13px; }
.st-bar i { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--green), var(--gold)); min-width: 2px; }
.st-bar b { text-align: right; font-weight: 600; }
.md-rate:empty { display: none; }
.md-rate { display: block; width: fit-content; margin-top: 2px; padding: 0 6px; border-radius: 8px; font-size: 11px; line-height: 17px; background: var(--sunk); color: var(--muted); border: 1px solid var(--line); }
.md-rate.good { color: var(--green-ink); border-color: var(--green); background: var(--green-bg); }

/* 回合计时 */
.tmr { display: inline-flex; align-items: center; gap: 2px; margin-left: 8px; padding: 0 7px; border-radius: 10px; font-size: 12px; line-height: 20px; background: var(--sunk); border: 1px solid var(--line); color: var(--text2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tmr b { min-width: 1.4em; text-align: right; }
.tmr.mine { border-color: var(--blue); color: var(--blue-ink); background: var(--blue-bg); }
.tmr.warn { border-color: var(--red); color: #fff; background: var(--red); animation: tmr-pulse 1s infinite; }
.tmr.paused { color: var(--muted); }
.tmr .afk { margin-left: 4px; font-size: 11px; font-weight: 600; color: var(--red); }
.tmr.warn .afk { color: #fff; }
@keyframes tmr-pulse { 50% { opacity: .65; } }
.dc-warn { margin-left: 10px; padding: 0 8px; border-radius: 10px; font-size: 12px; line-height: 20px; background: var(--red-bg); color: var(--red-ink); border: 1px solid var(--red); }
.room-opt { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.room-opt small { flex-basis: 100%; color: var(--muted); font-size: 12px; margin-left: 22px; }
@media (max-width: 900px), (pointer: coarse) { .topbar .tb-mid .tmr { display: none; } }

.st-iwd { font-weight: 700; font-variant-numeric: tabular-nums; }
.st-iwd.up { color: var(--green-ink); }
.st-iwd.down { color: var(--red-ink); }
.st-iwd.few { opacity: .55; font-weight: 400; }
.st-sortby { display: flex; justify-content: flex-end; margin: 4px 0; }

.rc-lose { color: var(--red-ink); margin-right: 6px; }
.rc-meta .rc-win + .rc-win { font-weight: 400; color: var(--text2); }

/* 聊天（chat.js） */
.chat-tab { position: fixed; left: 0; top: 46%; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 5px; border-radius: 0 10px 10px 0; border: 1px solid var(--line2); border-left: none; background: var(--panel); color: var(--text2); box-shadow: 2px 2px 10px rgba(60, 40, 10, .15); font-size: 13px; }
.chat-tab span { writing-mode: vertical-rl; letter-spacing: 2px; }
.chat-tab.on { background: var(--blue-bg); color: var(--blue-ink); }
.chat-tab i { font-style: normal; min-width: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.chat-box { position: fixed; z-index: 70; width: 330px; height: 420px; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line2); border-top: 3px solid var(--blue); border-radius: 12px; box-shadow: 0 8px 30px rgba(60, 40, 10, .28); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--panel2); cursor: move; user-select: none; touch-action: none; }
.chat-head b { margin-right: auto; }
.chat-head .seg i { font-style: normal; margin-left: 3px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; }
.chat-opts { padding: 3px 10px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.chat-list { flex: 1; overflow-y: auto; padding: 6px 8px; display: flex; flex-direction: column; gap: 6px; }
.cm { max-width: 92%; align-self: flex-start; background: var(--sunk); border-radius: 10px; padding: 4px 8px; font-size: 13px; word-break: break-word; }
.cm.mine { align-self: flex-end; background: var(--blue-bg); }
.cm-name { font-size: 12px; color: var(--text2); cursor: default; }
.cm-name[data-act] { cursor: pointer; }
.cm-name small { margin-left: 4px; color: var(--muted); font-weight: 400; }
.cm-t { margin-left: 6px; color: var(--muted); font-size: 11px; }
.cm-emo { font-size: 16px; }
.cm.sys { align-self: center; background: transparent; color: var(--muted); font-size: 12px; text-align: center; }
.cm.sys small { margin-left: 6px; }
/* 房间频道里不同房间之间的横线（用户 10-23：换房间后接着显示上一个房间的消息） */
.cm-div { align-self: stretch; display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.cm-div::before, .cm-div::after { content: ''; flex: 1; border-top: 1px solid var(--line2); }
.cm-div span { overflow: hidden; text-overflow: ellipsis; }
.chat-emos { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px; border-top: 1px solid var(--line); }
.chat-input { display: flex; gap: 6px; padding: 6px 8px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; min-width: 0; }
.emo-bubble { position: fixed; z-index: 80; padding: 4px 12px; border-radius: 14px; background: var(--panel); border: 2px solid var(--gold); box-shadow: 0 4px 14px rgba(60, 40, 10, .25); font-size: 15px; pointer-events: none; animation: emo-pop 3s ease forwards; }
@keyframes emo-pop { 0% { transform: translateY(8px) scale(.8); opacity: 0; } 10% { transform: none; opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
.float-box.dragging { opacity: .85; }
@media (max-width: 900px), (pointer: coarse) {
  .chat-box { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; height: 62vh; border-radius: 12px 12px 0 0; }
  .chat-head { cursor: default; }
  .chat-tab { top: 38%; padding: 6px 4px; }
  .qs { top: calc(38% - 52px); }
}

.pn-extra { border-left: 3px solid var(--blue); padding-left: 8px; }
.opt.extra { border-color: var(--blue); }

/* 管理员后台（admin.html） */
body.admin { padding: 0 12px 40px; }
.adm-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 5; }
.adm-head > b { font-size: 18px; color: var(--gold-ink); margin-right: 8px; }
.adm-main { padding-top: 10px; }
.adm-table td small { display: block; color: var(--muted); }
.adm-table td .on { color: var(--green-ink); } .adm-table td .off { color: var(--muted); }
.adm-btns { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
button.danger { color: var(--red-ink); border-color: var(--red); }
.adm-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.adm-card.done { opacity: .7; }
/* 反馈的标记（用户 10-17）：标签颜色；待核实 / 要修 / 要做 / 待确认的卡片左边一道色条 */
.tag.rst-new { color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); background: transparent; }
.tag.rst-chk { color: var(--red-ink); box-shadow: inset 0 0 0 1px var(--red-ink); background: transparent; }
.tag.rst-bug { color: var(--red-ink); background: var(--red-bg); }
.tag.rst-opt { color: var(--gold-ink); background: rgba(184, 134, 46, .18); }
.tag.rst-ask { color: var(--blue-ink); background: var(--blue-bg); }
.tag.rst-ans { color: var(--green-ink); box-shadow: inset 0 0 0 1px var(--green-ink); background: transparent; }
.tag.rst-done { color: var(--green-ink); background: var(--green-bg); }
.adm-card.rep-chk { border-left: 3px dashed var(--red-ink); }
.adm-card.rep-bug { border-left: 3px solid var(--red-ink); }
.adm-card.rep-opt { border-left: 3px solid var(--gold); }
.adm-card.rep-ask { border-left: 3px solid var(--blue-ink); }
.seg.rep-f { flex-wrap: wrap; max-width: 100%; }
.adm-st { font-size: 13px; padding: 4px 6px; }
.adm-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0; }
.adm-row small { color: var(--muted); }
.adm-text { white-space: pre-wrap; word-break: break-word; margin: 4px 0; }
.adm-note { flex: 1; min-width: 12em; }
.adm-helper-link { flex: 1; min-width: 16em; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.adm-board { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 13px; }
.adm-side ul { margin: 4px 0; padding-left: 18px; }
.adm-log { max-height: 280px; overflow: auto; font-size: 12px; background: var(--sunk); border-radius: 8px; padding: 6px 8px; margin-top: 6px; }
.adm-log .head { font-weight: 700; color: var(--gold-ink); }
.adm-pre { max-height: 300px; overflow: auto; font-size: 12px; background: var(--sunk); padding: 8px; border-radius: 8px; white-space: pre-wrap; }
.adm-chat .adm-row { border-bottom: 1px solid var(--line); padding: 4px 0; }
.adm-sub td { background: var(--sunk); font-size: 13px; }
.hidden { display: none !important; }
#toast.show { opacity: 1; }

/* 公告条 */
.announce { position: fixed; top: 52px; left: 50%; transform: translateX(-50%); z-index: 90; max-width: min(720px, calc(100vw - 24px)); display: flex; gap: 8px; align-items: center; padding: 5px 8px 5px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--blue); box-shadow: 0 4px 16px rgba(60, 40, 10, .2); font-size: 13px; }
.announce.warn { border-color: var(--red); background: var(--red-bg); color: var(--red-ink); }
.announce span { flex: 1; }

/* 最近卡牌条 + 结算动画（fx.js） */
.recent-bar { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-bottom: 1px solid var(--line); background: var(--panel2); min-height: 26px; }
.recent-bar.closed { padding: 2px 10px; }
.rb-toggle { flex-shrink: 0; font-size: 12px; }
.rb-list { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; flex: 1; padding: 2px 0; scrollbar-width: thin; }
.rb-list .hint { margin: 0; font-size: 12px; }
.rb-item { flex-shrink: 0; display: flex; gap: 5px; align-items: center; padding: 2px 6px 2px 2px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line2); max-width: 170px; cursor: default; }
.rb-item.me, .rb-item.sa { border-left-color: var(--blue); }
.rb-item.op, .rb-item.sb { border-left-color: var(--red); }
.rb-item img { width: 34px; height: 47px; object-fit: cover; border-radius: 4px; }
.rb-item span { display: flex; flex-direction: column; min-width: 0; font-size: 11px; line-height: 1.25; }
.rb-item span b { font-size: 11px; color: var(--text2); }
.rb-item span i { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-item.k-trig, .rb-item.k-ability { background: var(--sunk); }
.rb-item.k-cancel { opacity: .6; text-decoration: line-through; }
#fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 85; }
.fx-num { position: fixed; transform: translate(-50%, -50%); font-weight: 800; font-size: 22px; text-shadow: 0 1px 0 #fff, 0 0 6px rgba(255, 255, 255, .9); animation: fx-rise 1.4s ease-out forwards; white-space: nowrap; }
.fx-num.dmg { color: #c0281a; font-size: 26px; }
.fx-num.heal { color: #1d7d4f; }
.fx-num.prev { color: #2c4f8f; font-size: 18px; }
.fx-num.down { color: #4a4a4a; font-size: 18px; }
.fx-num.rev { color: #a8741a; font-size: 18px; }
@keyframes fx-rise { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 30% { transform: translate(-50%, -55%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -140%); } }
.fx-arrow { position: fixed; left: 0; top: 0; }
.fx-arrow line { stroke: #c0281a; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 14 9; animation: fx-dash .6s linear infinite, fx-fade 1.3s ease forwards; filter: drop-shadow(0 0 3px rgba(255, 255, 255, .9)); }
.fx-arrow .fx-ah { fill: #c0281a; }
@keyframes fx-dash { to { stroke-dashoffset: -46; } }
@keyframes fx-fade { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }
.unit.fx-atk { box-shadow: 0 0 0 3px #c0281a, 0 0 16px rgba(192, 40, 26, .6); }
.unit.fx-tgt { box-shadow: 0 0 0 3px #e2a12b, 0 0 16px rgba(226, 161, 43, .7); }
.unit.fx-hit { animation: fx-shake .35s ease; }
@keyframes fx-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.fx-card { position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border-radius: 14px; background: rgba(255, 250, 240, .96); border: 2px solid var(--red); box-shadow: 0 10px 40px rgba(40, 20, 0, .35); animation: fx-pop 1.5s ease forwards; }
.fx-card img { width: 180px; border-radius: 8px; }
.fx-card b { font-size: 15px; color: var(--red-ink); }
@keyframes fx-pop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.8); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -54%) scale(.96); } }
.fx-bubble { position: fixed; transform: translate(-50%, -100%); padding: 3px 10px; border-radius: 12px; font-size: 13px; font-weight: 600; background: var(--panel); border: 2px solid var(--gold); box-shadow: 0 4px 14px rgba(60, 40, 10, .25); white-space: nowrap; animation: fx-bub 1.5s ease forwards; }
.fx-bubble.op { border-color: var(--red); }
.fx-bubble.me { border-color: var(--blue); }
@keyframes fx-bub { 0% { opacity: 0; transform: translate(-50%, -80%); } 12% { opacity: 1; transform: translate(-50%, -100%); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -125%); } }
@media (max-width: 900px), (pointer: coarse) {
  .rb-item img { width: 28px; height: 39px; }
  .rb-item { max-width: 130px; }
  .fx-card img { width: 140px; }
}
@media (prefers-reduced-motion: reduce) { .fx-arrow line { animation: none; } .unit.fx-hit { animation: none; } }

/* 等待对手（屏幕中间，不挡操作） */
#waitnote { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 75; pointer-events: none; display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 22px; background: rgba(40, 52, 72, .82); color: #fff; font-size: 15px; font-weight: 600; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); animation: wn-in .25s .35s both; }
#waitnote .dot { width: 9px; height: 9px; border-radius: 50%; background: #ffd27a; animation: wn-blink 1s infinite; }
#waitnote .tmr { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .3); color: #fff; }
@keyframes wn-in { from { opacity: 0; transform: translate(-50%, -40%); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes wn-blink { 50% { opacity: .3; } }

/* 手机：一屏显示（眉毛 + 最近卡牌 + 棋盘 + 手牌 + 操作面板），不上下滚 */
@media (max-width: 900px), (pointer: coarse) {
  .board-screen { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  .board-screen .main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: 0 !important; }
  .board-screen .board-col { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .board-screen .board-wrap { flex: 1; min-height: 0; overflow: hidden; padding: 3px 8px; display: flex; flex-direction: column; }
  .board-screen .board { margin: auto 0; }   /* 有空余就上下居中；放不下时（极小屏）从顶上开始 */
  .board-screen .side { flex-shrink: 0; }
  .board-screen .side-panel { position: static; max-height: 30vh; overflow-y: auto; padding: 5px 10px 6px; border-radius: 12px 12px 0 0; box-shadow: 0 -3px 12px rgba(60, 40, 10, .18); }
  .board-screen .side-panel.min { max-height: 34px; }
  .board-screen .side-panel .pn-sec > small, .board-screen .side-panel .pn-head small, .board-screen .side-panel .hint { display: none; }
  .board-screen .side-panel .pn-sel img { width: 34px; }
  .board-screen .side-panel .pn-sec { margin: 4px 0; }
  .board-screen .side-panel .pn-foot { margin-top: 4px; }
  .board-screen .side-panel .pn-foot .cnt { display: none; }
  .board-screen .tray { margin: 1px 8px 0; padding: 3px 6px 2px; }
  .board-screen .tray-info { margin-bottom: 0; }
  .board-screen .hbar:not(.sel) { display: none; }
  .board-screen .hand { padding: 3px 4px; gap: 5px; }
  .board-screen .pstrip { padding: 2px 6px; font-size: 11.5px; gap: 2px 8px; }
  .board-screen .pstrip .ps-counts .small, .board-screen .pstrip .ps-counts button { padding: 0 6px; font-size: 11px; }
  .board-screen .acts { display: none; }
  .board-screen .recent-bar { padding: 2px 6px; min-height: 22px; }
  .board-screen .rb-item { padding: 1px 4px 1px 1px; }
  .board-screen .rb-item img { width: 22px; height: 31px; }
  .board-screen .rb-item span { font-size: 10px; }
  .board-screen .rb-item span b { font-size: 10px; }
  /* 眉毛 */
  .topbar.eyebrow { flex-wrap: nowrap; align-items: center; padding: 3px 8px; gap: 6px; min-height: 34px; }
  .topbar.eyebrow.mine { box-shadow: inset 0 -3px 0 var(--gold); }
  .eb-menu { flex-shrink: 0; width: 32px; height: 28px; padding: 0; font-size: 17px; line-height: 1; border-radius: 8px; }
  .eb-menu.on { background: var(--gold); color: #fff; }
  .eb-leave { flex-shrink: 0; height: 28px; padding: 0 12px; font-size: 13px; line-height: 1; border-radius: 8px; }
  /* 对局结束：顶栏浮在结束弹窗的遮罩上面（「离开」、☰ 弹窗开着也能点），弹窗从顶栏下面开始、不被顶栏挡住 */
  .topbar.eyebrow.over { z-index: 45; }
  body:has(.topbar.eyebrow.over) #modal:not(.mini) { padding-top: 52px; }
  body:has(.topbar.eyebrow.over) #modal:not(.mini) .modal-box { max-height: calc(100dvh - 68px); }
  .eb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; overflow: hidden; }
  .eb-info b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .eb-info span { font-size: 11px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .eb-state { flex-shrink: 0; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: rgba(255, 255, 255, .15); }
  .eb-state.mine { background: var(--gold); color: #2a1d08; font-weight: 700; }
  .topbar.eyebrow .tmr { display: inline-flex; margin-left: 0; }
  .topbar.eyebrow .dc-warn { display: none; }
  .drawer { position: fixed; top: 40px; left: 6px; right: 6px; z-index: 88; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 10px 30px rgba(40, 20, 0, .3); }
  .dr-btn { padding: 8px 4px; font-size: 13px; }
  .pop-log { max-height: 70vh; overflow-y: auto; font-size: 13px; }
  #waitnote { top: 38%; font-size: 14px; padding: 8px 14px; }
}

/* 电脑右键气泡（ctx.js）：半透明，跟着鼠标 */
#ctx { position: fixed; z-index: 96; min-width: 210px; max-width: 320px; max-height: calc(100vh - 12px); overflow-y: auto; padding: 6px; border-radius: 14px; border: 1px solid rgba(160, 130, 80, .45); border: 1px solid color-mix(in srgb, var(--line2) 70%, transparent);
  background: rgba(255, 250, 240, .78); background: color-mix(in srgb, var(--panel) 74%, transparent); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 10px 30px rgba(40, 20, 0, .22); font-size: 13px; color: var(--text); animation: cx-in .12s ease-out; }
#ctx.hidden { display: none; }
@keyframes cx-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.cx-head { display: flex; gap: 8px; align-items: center; padding: 2px 4px 6px; margin-bottom: 3px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.cx-head img { width: 30px; border-radius: 4px; flex-shrink: 0; }
.cx-head b { display: block; font-size: 13.5px; }
.cx-head small { display: block; color: var(--muted); font-size: 11.5px; }
.cx-list { display: flex; flex-direction: column; gap: 1px; }
.cx-list + .cx-list { margin-top: 3px; padding-top: 3px; border-top: 1px dashed color-mix(in srgb, var(--line) 70%, transparent); }
.cx-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; min-height: 0; padding: 5px 9px; text-align: left; border: none; border-radius: 8px; background: transparent; box-shadow: none; color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; }
.cx-item small { font-size: 11px; color: var(--muted); font-weight: 400; }
.cx-item:hover:not(:disabled), .cx-item:focus-visible { background: rgba(200, 160, 60, .2); background: color-mix(in srgb, var(--gold) 22%, transparent); }   /* :not(:disabled) 才压得过开头通用的 button:hover，不然悬停只剩一层看不出的米色 */
.cx-item.cx-main { font-weight: 700; }
.cx-item.cx-atk { color: var(--red-ink); }
.cx-item.cx-view { color: var(--text2); }
.cx-ab-l { display: flex; align-items: baseline; gap: 8px; width: 100%; min-width: 0; }   /* 能力：名字 + 一行缩略说明，放不下省略号，鼠标停住看全文 */
.cx-ab-l b { flex-shrink: 0; font-weight: 600; }
.cx-ab-l span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 400; color: var(--muted); }
/* 右键里的普通行动（鼓舞 / 攻城 / 攻击）：右边面板那种按钮，和下面一行行的特殊效果分开；攻城金色、靠右隔开（防点错） */
.cx-base { display: flex; flex-direction: column; gap: 5px; padding: 3px 3px 7px; margin-bottom: 3px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.cx-acts { display: flex; gap: 8px; }
.cx-acts .opt { min-width: 68px; text-align: center; }
.cx-acts .opt + .cx-siege { margin-left: auto; }
.cx-acts .cx-siege, .cx-acts .cx-siege:hover:not(:disabled) { font-weight: 700; background: linear-gradient(#f5dc8e, #d8a546); border-color: var(--gold); color: #3a2806; box-shadow: 0 1px 4px rgba(120, 80, 10, .35); }
.cx-acts .cx-siege:hover:not(:disabled) { filter: brightness(1.06); }
.cx-base > .opt.atk { width: 100%; }
.cx-base .opt.atk:hover:not(:disabled) { background: var(--red-bg); }
.cx-note { margin: 3px 9px; font-size: 12px; color: var(--muted); }
.cx-rel { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px 4px 2px; }
.cx-chip { min-height: 0; padding: 2px 8px; font-size: 11.5px; border-radius: 10px; box-shadow: none; background: color-mix(in srgb, var(--panel2) 70%, transparent); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); color: var(--text); }
.cx-chip i { font-style: normal; color: var(--muted); margin-right: 3px; }
/* 电脑：浮动操作区 */
#float-panel { position: fixed; z-index: 35; width: 340px; max-height: min(72vh, 680px); overflow: auto; padding: 8px 12px 10px; border-radius: 14px; border: 1px solid var(--line2);
  background: rgba(255, 250, 240, .86); background: color-mix(in srgb, var(--panel-mine) 84%, transparent); -webkit-backdrop-filter: blur(8px) saturate(1.15); backdrop-filter: blur(8px) saturate(1.15);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 70%, transparent), 0 12px 34px rgba(40, 20, 0, .28); }
#float-panel.hidden { display: none; }
#float-panel .pn-head { cursor: move; user-select: none; }
#float-panel.dragging { opacity: .85; }
#float-panel .pn-foot { background: none; position: static; margin-bottom: 0; padding-bottom: 0; }
.pn-head .pn-float { margin-left: auto; font-size: 11.5px; padding: 1px 8px; }

/* 手机一屏：更紧凑（列标题去掉，城池带上有左路 / 右路；信息条一行；主要阶段面板一行） */
@media (max-width: 900px), (pointer: coarse) {
  .board-screen .half.top .col { padding-top: 3px; }
  .board-screen .half.bottom .col { padding-bottom: 3px; }
  .board-screen .col-cap { display: none; }
  .board-screen .half { padding: 3px 0; }
  .board-screen .cityrow { padding: 2px 0; margin: 0; }
  .board-screen .city { min-height: 24px; }
  .board-screen .city.has b { font-size: 12px; letter-spacing: 1px; }
  .board-screen .city .lock { white-space: normal; max-width: 100%; justify-content: center; text-align: center; font-size: 10px; line-height: 13px; padding: 1px 5px; }   /* 窄：标签可以折行，到什么时候不显示（用户 10-17） */
  .board-screen .city .lock small { display: none; }
  .board-screen .mid { padding: 1px 4px; font-size: 10.5px; }
  .board-screen .mid span { display: none; }
  .board-screen .pstrip { flex-wrap: wrap; align-items: center; white-space: nowrap; font-size: 11px; line-height: 1.3; }
  .board-screen .pstrip .ps-name small:not(.first) { display: none; }
  .board-screen .ps-score { font-size: 0; }
  .board-screen .ps-score > * { font-size: 11px; }
  .board-screen .board-wrap.overflow { overflow-y: auto; }
  .board-screen.sel-mode .tray .hand { display: none; }
  .pm-row { display: flex; align-items: center; gap: 8px; }
  .pm-units { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
  .pm-units small { color: var(--muted); font-size: 11.5px; }
  .pm-units .chip-btn { padding: 3px 9px; font-size: 13px; }
  .pm-end { flex-shrink: 0; margin-left: auto; padding: 7px 12px; font-size: 13.5px; }
  .pm-sel { display: flex; align-items: center; gap: 8px; }
  .pm-sel img { width: 30px; border-radius: 4px; }
  .pm-sel > div { flex: 1; min-width: 0; line-height: 1.2; }
  .pm-sel b { display: block; font-size: 14px; }
  .pm-sel small { color: var(--muted); font-size: 11.5px; }
  .pm-opts { margin: 5px 0 4px; gap: 5px; }
  .pm-opts .opt { padding: 4px 9px; font-size: 13px; }
  .pm-opts .opt.atk { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
  .pm-opts .opt.atk .est { font-size: 10.5px; }
  .pm-tip { flex: 1; min-width: 0; color: var(--muted); font-size: 11.5px; line-height: 1.25; }
}

/* 扣置的牌：武将牌上的「扣置N」可以点 */
.chips i.tk { cursor: pointer; text-decoration: underline dotted; }
.pv-tip { display: block; color: var(--muted); font-size: 11px; }
.ps-sf { padding: 0 6px; border-radius: 8px; font-size: 11.5px; background: rgba(168, 116, 26, .14); color: var(--gold-ink); border: 1px solid rgba(168, 116, 26, .35); white-space: nowrap; }
#pop[data-kind="tucked"] .gcard small { white-space: normal; line-height: 1.25; }

/* 观众看手牌（hv.js） */
button.hv-btn { font-size: 11.5px; padding: 1px 8px; color: var(--text); }
button.hv-btn.hv-wait { border-color: var(--gold); background: rgba(226, 161, 43, .16); animation: hv-pulse 1.6s ease-in-out infinite; }
button.hv-btn.hv-on { border-color: var(--blue); color: var(--blue-ink); }
@keyframes hv-pulse { 50% { box-shadow: 0 0 0 3px rgba(226, 161, 43, .25); } }
.hv-tag { font-size: 11.5px; padding: 0 7px; border-radius: 8px; white-space: nowrap; }
.hv-tag.on { background: rgba(44, 79, 143, .12); color: var(--blue-ink); border: 1px solid rgba(44, 79, 143, .3); }
.hv-tag.off { color: var(--muted); }
.spec-hand { margin-top: 4px; }
.spec-hand .hbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; }
.spec-hand .hbar span { color: var(--muted); }
.spec-hand .hbar button { padding: 0 8px; font-size: 11.5px; }
.spec-hand .hand { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px; }
.spec-hand .hcard { cursor: default; }
.spec-hand.top { width: min(100%, calc(var(--gridw, 100%) + 20px)); padding: 2px 8px 4px; border-radius: 10px; background: var(--strip-bg); border: 1px dashed var(--line2); }
.spec-hand.top .hcard { height: calc(var(--hh) * .62); width: calc(var(--hh) * .62 * .717); }
#hvreq { position: fixed; z-index: 92; top: 58px; right: calc(var(--side, 340px) + 16px); width: 300px; display: flex; flex-direction: column; gap: 8px; }
#hvreq.hidden { display: none; }
.hv-item { padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 2px solid var(--gold); box-shadow: 0 8px 24px rgba(40, 20, 0, .25); display: flex; flex-direction: column; gap: 5px; font-size: 13px; animation: cx-in .15s ease-out; }
.hv-item small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.hv-item .btn-row { display: flex; gap: 8px; justify-content: flex-end; }
.hv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hv-row b { font-size: 14px; }
.hv-row em { font-style: normal; font-size: 11.5px; }
.hv-row em.on { color: var(--green-ink); }
.hv-row em.off { color: var(--muted); }
.hv-row span { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text2); }
.hv-row.granted span { color: var(--blue-ink); font-weight: 600; }
.hv-row.pending span { color: var(--gold-ink); font-weight: 600; }
.hv-row .btn-row { display: flex; gap: 6px; margin-left: auto; }
.hv-pol { margin-top: 10px; }
@media (max-width: 900px), (pointer: coarse) {
  #hvreq { top: 40px; left: 8px; right: 8px; width: auto; }
  .spec-hand.top .hcard { height: calc(var(--hh) * .5); width: calc(var(--hh) * .5 * .717); }
}

/* 表情包（chat.js） */
.chat-emos { flex-direction: column; flex-wrap: nowrap; max-height: 230px; min-height: 0; }
.emo-tabs { display: flex; align-items: center; gap: 4px; overflow-x: auto; flex-shrink: 0; padding-bottom: 2px; scrollbar-width: thin; }
.emo-tab { flex-shrink: 0; height: 32px; min-width: 38px; padding: 0 6px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.emo-tab img { height: 26px; width: auto; border-radius: 4px; display: block; }
.emo-tab.on { border-color: var(--gold); background: rgba(226, 161, 43, .2); }
.emo-quick { display: flex; flex-wrap: wrap; gap: 4px; overflow-y: auto; min-height: 0; }
.stk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 4px; overflow-y: auto; min-height: 0; padding: 2px; }
.stk { padding: 2px; border-radius: 8px; background: transparent; border: 1px solid transparent; box-shadow: none; line-height: 0; }
.stk:hover:not(:disabled) { border-color: var(--gold); background: rgba(226, 161, 43, .14); }
.stk img { width: 100%; height: auto; display: block; }
.cm-stk { display: block; width: 120px; height: auto; margin-top: 2px; }
.emo-bubble.stk { padding: 4px; border-radius: 14px; line-height: 0; animation-duration: 4s; box-shadow: 0 6px 22px rgba(60, 40, 10, .35); }   /* 对局里发的表情包：在发言人的信息条旁边冒出来 */
.emo-bubble.stk img { width: 150px; height: auto; display: block; border-radius: 10px; }
.adm-stk { height: 44px; vertical-align: middle; }
@media (max-width: 900px), (pointer: coarse) {
  .chat-emos { max-height: 40%; }
  .stk-grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
  .cm-stk { width: 110px; }
  .emo-bubble.stk img { width: 112px; }
}

/* 公告栏（notice.js） */
.nt-dot { display: inline-block; width: 8px; height: 8px; margin-left: 4px; border-radius: 50%; background: var(--red); vertical-align: top; }
.nt-dot.hidden { display: none; }
.nt-latest { display: flex; align-items: center; gap: 8px; max-width: 100%; margin: 4px 0 8px; padding: 6px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line2); box-shadow: none; font-size: 13px; text-align: left; cursor: pointer; }
.nt-latest b { flex-shrink: 0; color: var(--gold-ink); }
.nt-latest span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-latest small { flex-shrink: 0; color: var(--muted); font-size: 11.5px; }
.nt-new { flex-shrink: 0; font-style: normal; font-size: 11px; padding: 0 6px; border-radius: 8px; background: var(--red); color: #fff; }
.nt-box { max-width: 640px; }
.nt-item { padding: 10px 2px 12px; border-bottom: 1px solid var(--line); }
.nt-item:last-child { border-bottom: none; }
.nt-item header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.nt-item header b { font-size: 15px; }
.nt-item header small { color: var(--muted); font-size: 12px; margin-left: auto; }
.nt-item.pinned header b { color: var(--gold-ink); }
.nt-body { margin-top: 6px; font-size: 13.5px; line-height: 1.65; color: var(--text2); word-break: break-word; }
.nt-body a { color: var(--blue-ink); }
.nt-admbody { margin: 6px 0; font-size: 13px; line-height: 1.6; color: var(--text2); white-space: normal; }

/* 放置区牌上的计数（黑龙衔珠累计的伤害等） */
.ps-pl { position: relative; display: inline-flex; }
.ps-pl b { position: absolute; right: -5px; bottom: -4px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10.5px; line-height: 15px; text-align: center; font-weight: 700; box-shadow: 0 0 0 1.5px var(--panel); pointer-events: none; }

/* 管理后台：原版口令 */
.adm-card.focus { box-shadow: 0 0 0 2px var(--gold); }
/* 后台「表情」页：点一下开 / 关，鼠标停在上面放大看（关掉的变灰，放大时恢复原色） */
.stk-adm.off { opacity: .8; }
.stk-adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin: 8px 0 4px; }
.stk-adm-it { position: relative; padding: 4px; border-radius: 10px; border: 2px solid var(--line); background: var(--panel); box-shadow: none; line-height: 0; }
.stk-adm-it img { width: 100%; height: auto; display: block; border-radius: 6px; transition: transform .15s; }
.stk-adm-it:hover { z-index: 5; border-color: var(--gold); }
.stk-adm-it:hover img { transform: scale(1.9); box-shadow: 0 6px 24px rgba(40, 25, 5, .4); }
.stk-adm-it i { position: absolute; left: 7px; top: 7px; z-index: 1; font-style: normal; font-size: 11px; line-height: 1; padding: 2px 5px; border-radius: 6px; background: rgba(0, 0, 0, .55); color: #fff; }
.stk-adm-it.off { border-color: var(--red); background: var(--red-bg); }
.stk-adm-it.off img { filter: grayscale(1); opacity: .4; }
.stk-adm-it.off:hover img { filter: none; opacity: 1; }
.stk-adm-it b { position: absolute; left: 50%; top: 50%; z-index: 1; transform: translate(-50%, -50%); font-size: 13px; line-height: 1; padding: 4px 8px; border-radius: 8px; background: var(--red); color: #fff; pointer-events: none; }
.stk-adm-it.off:hover b { display: none; }
.ok-tag { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 1px 6px 1px 0; }
.ok-tag small { color: var(--muted); }

/* 亮出中的手牌：信息条上双方都看得到，自己手牌里标「已亮出」 */
.ps-shown small { color: var(--blue-ink); }
.shown-tag { position: absolute; z-index: 2; right: 3px; top: 3px; font-size: 10.5px; line-height: 16px; padding: 0 6px; border-radius: 8px; background: rgba(44, 79, 143, .88); color: #fff; white-space: nowrap; pointer-events: none; }
.rb-item.k-reveal { background: rgba(44, 79, 143, .08); }

/* 统计：获胜方式的细分 */
.st-bar span small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
.st-bar.st-win { grid-template-columns: minmax(10em, 17em) 1fr 7.5em; }
@media (max-width: 600px) { .st-bar.st-win { grid-template-columns: 1fr auto; } .st-bar.st-win span { grid-column: 1 / -1; } .st-bar.st-win b { white-space: nowrap; } }

/* 回放：可以点开的牌堆 / 弃牌 / 移除 / 扣置 */

/* 申请对手判负：被申请的一方是全屏大窗口；申请的一方 / 观众是右上角小卡片 */
#claim-box.claim-ov { position: fixed; inset: 0; z-index: 9000; background: rgba(20, 12, 4, .62); display: flex; align-items: center; justify-content: center; padding: 16px; }
.claim-card { background: var(--panel); border: 2px solid var(--hl); border-radius: 14px; padding: 22px 22px 18px; max-width: 420px; width: 100%; text-align: center; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
.claim-t { display: block; font-size: 24px; color: #b5452f; margin-bottom: 8px; }
.claim-card p { margin: 6px 0; font-size: 14.5px; color: var(--text2); }
.claim-card .claim-cd { font-size: 16px; color: var(--text); }
.claim-card .claim-cd b { font-size: 30px; color: #b5452f; margin-right: 2px; }
button.claim-go { margin-top: 12px; width: 100%; font-size: 18px; padding: 12px 16px; }
#claim-box.claim-mine { position: fixed; z-index: 800; top: 54px; right: 12px; max-width: 300px; background: var(--panel); border: 1px solid var(--hl); border-radius: 10px; padding: 8px 10px; box-shadow: 0 4px 16px rgba(0, 0, 0, .18); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
#claim-box.claim-mine small { color: var(--text2); }
#claim-box.claim-mine small b { color: #b5452f; }
#claim-box.claim-mine button { align-self: flex-end; }
button.dim { opacity: .55; }
@media (max-width: 700px) { #claim-box.claim-mine { top: 44px; right: 8px; left: 8px; max-width: none; } }

/* 统计：阵容数据、转折点 */
.st-lineups .st-deck b { font-size: 12.5px; }
@media (max-width: 600px) { .st-lineups .st-deck { flex-direction: column; align-items: flex-start; gap: 2px; } .st-lineups .st-deck b { font-size: 11.5px; } .st-lineups td, .st-lineups th { padding-left: 5px; padding-right: 5px; } .st-lineups .st-long { display: none; } }
.st-turn { display: flex; flex-direction: column; gap: 2px; margin: 6px 0; font-size: 13px; }
.st-turn span { color: var(--text2); }
.st-turn em { font-style: normal; font-weight: 700; color: var(--hl); }
.st-box h5 { margin: 10px 0 4px; font-size: 13px; }

/* 我的战绩：套牌的节奏 */
.st-h-btn { margin-left: 10px; vertical-align: 1px; font-weight: 400; }
.st-gens-l img { width: 34px; height: 46px; }
.st-turn span + span { display: block; }

/* 单人练习 */
.solo-form select { min-width: 0; }
.solo-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 12px; font-size: 13px; background: rgba(47, 111, 106, .14); color: var(--text); margin-right: 8px; }
.solo-tag.seat-B { background: rgba(181, 69, 47, .14); }
.solo-tag b { color: var(--hl); }
.solo-tag.flash { animation: soloFlash 1.2s ease-out; }
@keyframes soloFlash { 0% { box-shadow: 0 0 0 0 rgba(122, 84, 16, .7); transform: scale(1.08); } 100% { box-shadow: 0 0 0 10px rgba(122, 84, 16, 0); transform: scale(1); } }
.solo-hand .hbar span { color: var(--muted); }
.topbar .solo-tag { background: rgba(255, 255, 255, .16); color: var(--top-text, #eef6f2); border: 1px solid rgba(255, 255, 255, .28); }
.topbar .solo-tag.seat-B { background: rgba(255, 190, 170, .2); }
.topbar .solo-tag b { color: var(--top-acc, #f0d78f); }

/* 管理员消息 */
.ml-about { margin: 4px 0; font-size: 12.5px; color: var(--muted); }
.adm-reply { margin-top: 6px; }
.adm-reply .adm-row { align-items: flex-end; }
.adm-reply-t { flex: 1; min-width: 200px; font: inherit; font-size: 13px; }
.adm-replied { margin: 2px 0; font-size: 12.5px; color: #2b6a5c; }

/* 天意模式 */
.ty-show .gcard.dim { opacity: .6; cursor: zoom-in; }
.ty-show .gcard.dim img { filter: saturate(.6); }
.ty-tag { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 10px; font-size: 12px; line-height: 18px; background: linear-gradient(90deg, #6b3fa0, #b0476a); color: #fff; vertical-align: 1px; }

.ty-mode { display: inline-flex; align-items: center; gap: 4px; }
.ty-q { padding: 0 8px; border-radius: 50%; font-weight: 700; }
.mq-mode-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.mq-mode-row > small { color: var(--muted); }
.lb-form .mq-mode-row { grid-column: 1 / -1; margin: 0; flex-wrap: wrap; }   /* 表单里的「难度 / 模式」一行占满宽度（人机卡片加了模式以后挤进了 110px 那一格） */
.ty-tag[data-act] { cursor: pointer; }
.ty-help ol { padding-left: 1.4em; line-height: 1.7; font-size: 14px; }
.ty-help ul { padding-left: 1.2em; }
.st-mode { margin-left: 6px; }

/* 快速匹配：配到对手后的确认弹窗 */
.mq-offer { max-width: 440px; }
.mq-offer .pop-head small { color: var(--muted); }
.mo-vs { display: flex; align-items: stretch; gap: 10px; margin: 6px 0 12px; }
.mo-side { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 8px; border-radius: 12px; background: var(--sunk); border: 1px solid var(--line); text-align: center; }
.mo-side.me { background: var(--blue-bg); }
.mo-side small { color: var(--muted); }
.mo-side b { font-size: 17px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-side i { font-style: normal; font-size: 12px; color: var(--muted); }
.mo-side .tag.mo-ok { background: var(--green-bg); color: var(--green-ink); border-color: transparent; }
.mo-x { align-self: center; font-family: var(--font-title); font-size: 22px; font-weight: 700; color: var(--red); }
.mo-deck { padding: 8px 10px; border-radius: 10px; background: var(--panel2); }
.mo-deck small { color: var(--muted); }
.mo-deck-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.mo-deck-row img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; }
.mo-deck-row .md-gens { display: flex; gap: 3px; }
.mo-warn { color: var(--red-ink); margin: 8px 0 0; }
@media (max-width: 420px) { .mo-side b { font-size: 15px; } .mo-x { font-size: 18px; } }

/* 管理员发言（全局频道 / 房间）：流光彩色的名字 + 徽章 */
.cm.adm { background: linear-gradient(120deg, rgba(255, 190, 60, .2), rgba(230, 73, 128, .14) 55%, rgba(112, 72, 232, .14)); box-shadow: 0 0 0 1px rgba(214, 51, 108, .3), 0 0 10px rgba(240, 140, 0, .25); }
.cm-name.adm-name { background: linear-gradient(90deg, #e8590c, #d6336c, #7048e8, #1c7ed6, #0ca678, #e8590c); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; font-size: 13px; font-weight: 800; animation: adm-flow 3s linear infinite; filter: drop-shadow(0 0 2px rgba(240, 140, 0, .4)); }
.adm-badge { display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 6px; font-size: 10px; font-style: normal; font-weight: 700; line-height: 16px; color: #fff; background: linear-gradient(90deg, #f08c00, #e64980); vertical-align: 1px; }
@keyframes adm-flow { from { background-position: 0% 50%; } to { background-position: 200% 50%; } }
@media (prefers-reduced-motion: reduce) { .cm-name.adm-name { animation: none; } }
.adm-say-row { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-say-row #cs-name { width: 8em; }
.adm-say-row #cs-text { flex: 1; min-width: 12em; }

/* 组卡：贴在顶栏下面的“已选 N/30” */
.b-brow { position: sticky; top: var(--tb-h, 0px); z-index: 15; display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; margin: 8px 0 4px; padding: 6px 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 3px 10px rgba(90, 60, 20, .12); }
.b-brow .b-count { margin-left: 0; font-size: 14px; }
.b-brow .b-count b { font-size: 16px; }
.b-brow small { flex: 1; min-width: 8em; color: var(--muted); }
/* 分享套牌 */
.share-row { display: flex; gap: 8px; margin: 6px 0 10px; }
.share-row input { flex: 1; min-width: 0; font-size: 12px; }
.lb-head-btns { display: flex; gap: 6px; }
/* 卡图先占好位置（比例 360:502）：苹果手机上重画时图片还没解码、高度是 0 → 整页变短、滚动跳回顶上（组卡每点一张牌都回到顶部） */
.b-card img, .dl-card img { aspect-ratio: 360 / 502; object-fit: cover; background: #e6dcc6; }
.shared-foot { justify-content: flex-start; margin: 4px 0 10px; }
/* 查看牌堆顶时现在不能打出的牌：灰色遮罩 */
.gcard.no-play { position: relative; cursor: zoom-in; }
.gcard.no-play img { filter: grayscale(.85) brightness(.8); }
.gcard.no-play::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: rgba(90, 90, 90, .28); pointer-events: none; }
.gcard.no-play .np-tag { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); z-index: 1; font-style: normal; font-size: 12px; font-weight: 700; color: #fff; background: rgba(40, 40, 40, .72); padding: 1px 8px; border-radius: 8px; white-space: nowrap; }
.dhint.dup { color: var(--red-ink); font-weight: 600; }
#modal.mini { display: flex; gap: 8px; align-items: center; }

/* 卡牌图鉴 */
.codex .pop-head #cx-nav { flex: 1; }
.cx-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.cx-bar input { flex: 1; min-width: 10em; }
.cx-seg { flex-wrap: wrap; }
#cx-body h4 { margin: 12px 0 6px; }
#cx-body h4 small { margin-left: 6px; color: var(--muted); font-weight: 400; }
.cx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.cx-grid.gens { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); }
.cx-gen, .cx-card { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 4px; border-radius: 8px; background: var(--sunk); border: 1px solid var(--line); cursor: pointer; min-width: 0; }
.cx-gen:hover, .cx-card:hover { border-color: var(--gold); }
.cx-gen img, .cx-card img { width: 100%; aspect-ratio: 360 / 502; object-fit: cover; border-radius: 5px; background: #e6dcc6; }
.cx-gen b, .cx-card b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-gen small, .cx-card small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-card.ban { opacity: .75; }
.cx-ban { color: var(--red-ink); }
.cx-qn { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: 10px; font-weight: 700; color: #fff; background: rgba(61, 86, 117, .85); border-radius: 6px; padding: 0 4px; }
.cx-detail { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.cx-big { width: 220px; max-width: 100%; aspect-ratio: 360 / 502; object-fit: cover; border-radius: 10px; box-shadow: 0 3px 12px rgba(60, 40, 10, .2); background: #e6dcc6; }
.cx-info { flex: 1; min-width: 14em; }
.cx-info h3 { margin: 0 0 4px; font-family: var(--font-title); }
.cx-sub { color: var(--muted); margin: 2px 0; }
.cx-text { white-space: pre-wrap; line-height: 1.6; margin: 8px 0; }
.cx-link { padding: 0 2px; border: none; background: none; color: var(--hl); text-decoration: underline; cursor: pointer; font: inherit; }
.cx-qas { display: flex; flex-direction: column; gap: 6px; }
.cx-qa { background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.cx-qa p { margin: 2px 0; line-height: 1.55; }
.cx-q { font-weight: 600; }
.cx-qa.red { border-style: dashed; }
.cx-red { margin-left: 6px; font-style: normal; font-size: 11px; color: var(--red-ink); }
.cx-kws { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.cx-kw { background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.cx-kw p { margin: 3px 0; line-height: 1.5; }
.cx-kw .cx-extra { color: var(--text2); font-size: 13px; }
.cx-kw small { color: var(--muted); }
@media (max-width: 600px) { .cx-big { width: 160px; } }

/* 手机：系统安全区（底部横条 / 刘海，viewport-fit=cover 时页面会画到它们下面）+ 自己调的底部留白；操作区高度；棋盘放大后可以滑动 */
@media (max-width: 900px), (pointer: coarse) {
  .board-screen { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--ui-bot, 0px)); }
  .board-screen .side-panel { max-height: var(--ui-panel, 30vh); }
  .board-screen .board-wrap { overflow: auto; overscroll-behavior: contain; }
  .board-screen .board { margin: auto; }
  #modal.mini { bottom: calc(16px + env(safe-area-inset-bottom, 0px) + var(--ui-bot, 0px)); }
  .lobby, .setup { padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
}
#mui { position: fixed; left: 8px; right: 8px; top: calc(46px + env(safe-area-inset-top, 0px)); z-index: 70; max-width: 460px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line2); border-top: 3px solid var(--gold); border-radius: 12px; padding: 8px 12px 10px; box-shadow: 0 8px 28px rgba(60, 40, 10, .3); }
#mui.hidden { display: none; }
.mui-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.mui-head small { color: var(--muted); }
.mui-row { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; }
.mui-row span { flex: none; width: 5.5em; font-size: 13px; }
.mui-row input { flex: 1; min-width: 0; }
.mui-row b { flex: none; width: 3.6em; text-align: right; font-size: 13px; }
.mui-hint { display: block; margin: 0 0 0 5.9em; font-size: 11px; color: var(--muted); }
.mui-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* 背景壁纸（wall.js）：图片只在本机；盖在主题底色上面、所有内容下面 */
body.has-wall { background: transparent; }
body.has-wall::before { content: ''; position: fixed; inset: calc(-2 * var(--wall-blur, 0px)); z-index: -1; pointer-events: none;
  background: var(--wall-img) center / cover no-repeat; opacity: var(--wall-op, .3); filter: blur(var(--wall-blur, 0px)); }

/* 组卡参考：全服带入率 / 胜率 */
.b-ref { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; margin: 6px 0 2px; }
.b-ref small { color: var(--muted); flex: 1; min-width: 12em; }
.b-card { position: relative; }
.b-st { display: flex; flex-wrap: wrap; column-gap: 6px; font-size: 11px; color: var(--text2); line-height: 1.35; }
.b-st span { white-space: nowrap; }
.b-st.few { color: var(--muted); }
.b-tags { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 2px; pointer-events: none; }
.b-tags i { font-style: normal; font-size: 10px; font-weight: 700; color: #fff; border-radius: 6px; padding: 0 5px; line-height: 16px; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.b-hot { background: #e8590c; }
.b-win { background: #2b8a3e; }

/* 反馈：附带哪一局 */
.rp-games { margin: 8px 0 4px; }
.rp-gh { margin: 0 0 4px; font-size: 13px; color: var(--text2); }
.rp-g { display: flex; align-items: flex-start; gap: 8px; padding: 5px 8px; border-radius: 8px; cursor: pointer; }
.rp-g:hover { background: var(--sunk); }
.rp-g input { margin-top: 3px; }
.rp-g span { flex: 1; min-width: 0; font-size: 13px; }
.rp-g span i { font-style: normal; color: var(--muted); margin: 0 4px; }
.rp-g small { display: block; color: var(--muted); font-size: 11.5px; }

/* 投稿 */
.sb-hint { margin: -2px 0 8px; font-size: 12px; }
.sub-item.st-star { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.sub-item.st-done { opacity: .7; }
.sub-vs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 4px 0; }
.sub-vs small { color: var(--muted); }
.sub-vs i { font-style: normal; color: var(--muted); }
.sub-step { margin: 2px 0; }

/* 电脑：调整界面（浮动，按住标题行移动）、拖右侧栏左边缘改宽度 */
#pcui { position: fixed; z-index: 70; width: 420px; max-width: calc(100vw - 16px); background: var(--panel); border: 1px solid var(--line2); border-top: 3px solid var(--gold); border-radius: 12px; padding: 8px 12px 10px; box-shadow: 0 8px 28px rgba(60, 40, 10, .3); }
#pcui.hidden { display: none; }
#pcui .mui-head { cursor: move; user-select: none; }
#pcui.dragging { opacity: .9; }
#pcui .hint { margin: 8px 0 0; font-size: 12px; }
.side-grip { position: absolute; left: -5px; top: 0; bottom: 0; width: 9px; cursor: col-resize; z-index: 6; }
.side-grip::after { content: ''; position: absolute; left: 3px; top: 0; bottom: 0; width: 3px; border-radius: 2px; background: transparent; transition: background .15s; }
.side-grip:hover::after, body.side-drag .side-grip::after { background: var(--gold); }
body.side-drag, body.side-drag * { cursor: col-resize !important; user-select: none; }

/* 多状态：格子里放不下的状态收进高亮的「多状态 +N」，点开气泡看全部 */
.chips i.c-more { cursor: pointer; font-weight: 700; color: #3a2604; background: linear-gradient(180deg, #ffe39a, var(--gold)); box-shadow: inset 0 0 0 1px #a5741f, 0 0 6px rgba(214, 160, 60, .75); }
.chips i.c-more b { margin-left: 2px; }
.chips i.c-more:hover { filter: brightness(1.06); }
.unit.chips-over .chips i.c-more { position: absolute; z-index: 3; top: 2px; left: 2px; }
/* 只有一个状态、又放不下：贴在卡图角上的就是它本身（不透明底，颜色照旧） */
.chips i.c-more.one { font-weight: 600; background: var(--panel); box-shadow: inset 0 0 0 1px currentColor, 0 1px 3px rgba(0, 0, 0, .3); }
.chips i.c-more.one.c-red { color: var(--red-ink); } .chips i.c-more.one.c-blue { color: var(--blue-ink); } .chips i.c-more.one.c-green { color: var(--green-ink); } .chips i.c-more.one.c-gold { color: var(--gold-ink); } .chips i.c-more.one.c-grey { color: var(--muted); }
.unit.chips-over { position: relative; }
#stbub { position: fixed; z-index: 96; min-width: 200px; max-width: min(320px, calc(100vw - 12px)); max-height: calc(100vh - 12px); overflow-y: auto; padding: 8px 10px 10px; border-radius: 14px;
  border: 1px solid var(--line2); background: rgba(255, 250, 240, .9); background: color-mix(in srgb, var(--panel) 88%, transparent); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 55%, transparent), 0 10px 30px rgba(40, 20, 0, .25); font-size: 13px; color: var(--text); animation: cx-in .12s ease-out; }
#stbub.hidden { display: none; }
#stbub i { font-style: normal; font-size: 12px; padding: 1px 6px; border-radius: 5px; line-height: 18px; white-space: nowrap; }
#stbub i.tk { cursor: pointer; text-decoration: underline dotted; }
.sb-head { display: flex; align-items: center; gap: 8px; padding-bottom: 5px; margin-bottom: 4px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.sb-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-ah { font-weight: 700; color: var(--text2); }
.sb-head button { padding: 0 7px; min-height: 0; line-height: 20px; }
.sb-sec { margin-top: 6px; }
.sb-sec h5 { margin: 0 0 3px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.sb-row { display: flex; align-items: baseline; gap: 6px; margin: 2px 0; }
.sb-row small { color: var(--text2); font-size: 12px; }
.sb-chips { display: flex; flex-wrap: wrap; gap: 3px; }
.sb-eq { font-size: 12px; padding: 1px 6px; border-radius: 5px; background: var(--sunk); border: 1px solid var(--line); cursor: default; }

/* 调整界面：大小 / 不透明度两页 */
.mui-head { flex-wrap: wrap; }
.mui-tabs button { padding: 1px 10px; font-size: 12px; }
/* 棋盘各区域的不透明度（app.js applyAlpha：--a-lane 等是百分比；有一项低于 100% 时 body 加 alpha-on）。
   做法：在 body 上记下主题原来的颜色（--x-o，从 html 继承来的），再在各区域里把这些颜色变量换成“原色和透明色按比例混合”——
   用到这些变量的规则都跟着变；选中 / 目标等高亮色、文字、卡图不受影响。不支持 color-mix 的浏览器整段跳过（界面上也不显示滑块） */
@supports (color: color-mix(in srgb, red 50%, transparent)) {
  body.alpha-on { --op-t1-o: var(--op-t1); --op-t2-o: var(--op-t2); --me-t1-o: var(--me-t1); --me-t2-o: var(--me-t2); --lane-bg-o: var(--lane-bg); --camp-bg-o: var(--camp-bg);
    --lane-mark-o: var(--lane-mark); --grain-o: var(--grain); --op-capbg-o: var(--op-capbg); --me-capbg-o: var(--me-capbg); --unit-bg-o: var(--unit-bg); --unit-bg-op-o: var(--unit-bg-op);
    --city1-o: var(--city1); --city2-o: var(--city2); --city3-o: var(--city3); --cityc1-o: var(--cityc1); --cityc2-o: var(--cityc2); --mid-bg-o: var(--mid-bg); --mid-mine-o: var(--mid-mine);
    --strip-bg-o: var(--strip-bg); --panel2-o: var(--panel2); --tray1-o: var(--tray1); --tray2-o: var(--tray2); --side-bg-o: var(--side-bg); --panel-o: var(--panel); --panel-mine-o: var(--panel-mine);
    --pv1-o: var(--pv1); --pv2-o: var(--pv2); --log-bg-o: var(--log-bg); }
  body.alpha-on .board {
    --op-t1: color-mix(in srgb, var(--op-t1-o) var(--a-lane), transparent); --op-t2: color-mix(in srgb, var(--op-t2-o) var(--a-lane), transparent);
    --me-t1: color-mix(in srgb, var(--me-t1-o) var(--a-lane), transparent); --me-t2: color-mix(in srgb, var(--me-t2-o) var(--a-lane), transparent);
    --lane-bg: color-mix(in srgb, var(--lane-bg-o) var(--a-lane), transparent); --camp-bg: color-mix(in srgb, var(--camp-bg-o) var(--a-lane), transparent);
    --lane-mark: color-mix(in srgb, var(--lane-mark-o) var(--a-lane), transparent); --grain: color-mix(in srgb, var(--grain-o) var(--a-lane), transparent);
    --op-capbg: color-mix(in srgb, var(--op-capbg-o) var(--a-lane), transparent); --me-capbg: color-mix(in srgb, var(--me-capbg-o) var(--a-lane), transparent);
    --unit-bg: color-mix(in srgb, var(--unit-bg-o) var(--a-unit), transparent); --unit-bg-op: color-mix(in srgb, var(--unit-bg-op-o) var(--a-unit), transparent); }
  body.alpha-on .cityrow {
    --city1: color-mix(in srgb, var(--city1-o) var(--a-city), transparent); --city2: color-mix(in srgb, var(--city2-o) var(--a-city), transparent); --city3: color-mix(in srgb, var(--city3-o) var(--a-city), transparent);
    --cityc1: color-mix(in srgb, var(--cityc1-o) var(--a-city), transparent); --cityc2: color-mix(in srgb, var(--cityc2-o) var(--a-city), transparent);
    --mid-bg: color-mix(in srgb, var(--mid-bg-o) var(--a-city), transparent); --mid-mine: color-mix(in srgb, var(--mid-mine-o) var(--a-city), transparent); }
  body.alpha-on .board-screen { --strip-bg: color-mix(in srgb, var(--strip-bg-o) var(--a-strip), transparent); }
  body.alpha-on .recent-bar { --panel2: color-mix(in srgb, var(--panel2-o) var(--a-strip), transparent); }
  body.alpha-on .tray { --tray1: color-mix(in srgb, var(--tray1-o) var(--a-tray), transparent); --tray2: color-mix(in srgb, var(--tray2-o) var(--a-tray), transparent); }
  body.alpha-on .side { --side-bg: color-mix(in srgb, var(--side-bg-o) var(--a-side), transparent); }
  body.alpha-on .side-panel { --panel: color-mix(in srgb, var(--panel-o) var(--a-side), transparent); --panel-mine: color-mix(in srgb, var(--panel-mine-o) var(--a-side), transparent); }
  body.alpha-on .pvbox { --pv1: color-mix(in srgb, var(--pv1-o) var(--a-side), transparent); --pv2: color-mix(in srgb, var(--pv2-o) var(--a-side), transparent); }
  body.alpha-on .logbox { --log-bg: color-mix(in srgb, var(--log-bg-o) var(--a-side), transparent); --panel: color-mix(in srgb, var(--panel-o) var(--a-side), transparent); }
}

/* 亮出的牌（fx.js revealPop / 最近卡牌条）：蓝框大卡图 + 效果名标签 + 一句话说明 */
.fx-card.fx-reveal { width: max-content; max-width: 94vw; box-sizing: border-box; border-color: var(--blue); border-width: 3px; padding: 18px 14px 12px; gap: 8px; animation: fx-pop 2.6s ease forwards; box-shadow: 0 0 0 4px rgba(44, 79, 143, .18), 0 14px 46px rgba(20, 30, 60, .42); }
.fx-rv-tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); font-style: normal; font-weight: 700; font-size: 14px; letter-spacing: 2px; white-space: nowrap; color: #fff; background: var(--blue); padding: 2px 14px; border-radius: 12px; box-shadow: 0 2px 6px rgba(20, 30, 60, .35); }
.fx-rv-imgs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: min(92vw, 780px); }
.fx-card.fx-reveal img { width: 230px; }
.fx-card.fx-reveal.multi img { width: 150px; }
.fx-card.fx-reveal b { color: var(--blue-ink); max-width: min(90vw, 600px); text-align: center; line-height: 1.4; }
.rb-item.k-reveal { border-color: rgba(44, 79, 143, .45); }
.rb-item { position: relative; }
.rb-n { position: absolute; left: 1px; top: 1px; font-style: normal; font-size: 10px; font-weight: 700; color: #fff; background: var(--blue); border-radius: 7px; padding: 0 4px; line-height: 14px; }
@media (max-width: 900px), (pointer: coarse) {
  .fx-card.fx-reveal img { width: 160px; }
  .fx-card.fx-reveal.multi img { width: 96px; }
  .fx-card.fx-reveal b { font-size: 13px; }
}

/* 管理后台：给玩家发消息 */
#adm-pop { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-start; justify-content: center; padding: 60px 12px 12px; background: rgba(30, 20, 5, .35); overflow-y: auto; }
#adm-pop.hidden { display: none; }
.adm-pop-box { width: min(560px, 100%); background: var(--panel); border: 1px solid var(--line2); border-top: 3px solid var(--gold); border-radius: 12px; padding: 12px 14px; box-shadow: 0 12px 40px rgba(40, 20, 0, .3); }
.adm-pop-box textarea { width: 100%; box-sizing: border-box; margin: 8px 0 4px; }
.adm-pop-box h4 { margin: 12px 0 6px; font-size: 13px; color: var(--muted); }
.adm-msg { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin: 6px 0; background: var(--sunk); }
.adm-msg.unread { border-color: var(--gold); }
.adm-msg small { color: var(--muted); }
.adm-msg p { margin: 3px 0 0; white-space: pre-wrap; }

/* 人机对战 */
.ai-tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 10px; background: rgba(44, 79, 143, .14); color: var(--blue-ink); border: 1px solid rgba(44, 79, 143, .35); white-space: nowrap; margin-right: 6px; }
.ai-tag.thinking { animation: ai-pulse 1s ease-in-out infinite; }
@keyframes ai-pulse { 50% { background: rgba(44, 79, 143, .3); } }
.ai-closed { padding: 10px 12px; border: 1px dashed var(--line2); border-radius: 10px; }
.eyebrow .ai-tag { font-size: 11px; padding: 0 6px; }
.topbar .ai-tag { background: rgba(255, 255, 255, .16); color: var(--top-text); border-color: rgba(255, 255, 255, .4); }
.topbar .ai-tag.thinking { background: rgba(255, 220, 130, .3); }

.tag.ai-room { background: rgba(44, 79, 143, .14); color: var(--blue-ink); margin-left: 6px; }

/* ---------- BP 模式（用户设计 10-14，bp.js）：大厅的两个匹配按钮、禁将 / 选将 / 组牌界面 ---------- */
.bp-tag { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 10px; font-size: 12px; line-height: 18px; background: linear-gradient(90deg, #8a5a14, #c0892a); color: #fff; vertical-align: 1px; white-space: nowrap; }
.bp-tag[data-act] { cursor: pointer; }
.tag.bp-room { background: rgba(184, 134, 46, .18); color: var(--gold-ink); margin-left: 6px; }
.bp-mq { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.bp-mq-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bp-mq-h small { color: var(--muted); }
.bp-mq-btns { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.bp-mq-btns button { flex: 1; min-width: 9em; font-weight: 600; border-color: var(--gold); }
.bp-mq-btns button i { display: block; font-style: normal; font-weight: 400; font-size: 11px; color: var(--muted); }

.bp-screen .bp { max-width: 1120px; margin: 0 auto; padding: 10px 12px 90px; display: flex; flex-direction: column; gap: 10px; }
.bp-head { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.bp-head.mine { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(232, 196, 112, .45); background: linear-gradient(rgba(255, 238, 180, .45), var(--panel)); }
.bp-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bp-title b { font-family: var(--font-title); font-size: 20px; color: var(--gold-ink); }
.bp-title span { color: var(--text2); }
.bp-title button { margin-left: auto; }
.bp-now { margin-top: 6px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bp-cd { font-weight: 400; color: var(--muted); }
.bp-cd b { font-size: 18px; color: var(--text); }
.bp-cd.mine b { color: var(--red-ink); }
.bp-steps { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; }
.bp-steps span { padding: 1px 8px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); background: var(--sunk); }
.bp-steps span.done { opacity: .55; text-decoration: line-through; }
.bp-steps span.cur { border-color: var(--gold); color: var(--gold-ink); background: rgba(232, 196, 112, .3); font-weight: 700; }
.bp-steps span.mine:not(.done) { border-style: dashed; }
.bp-steps i { color: var(--muted); font-style: normal; }
.bp-warn { margin: 6px 0 0; color: var(--red-ink); font-size: 13px; font-weight: 600; }

.bp-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bp-side { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.bp-side.me { border-color: var(--me-line); background: linear-gradient(var(--me-t1), var(--panel) 60%); }
.bp-side.op { border-color: var(--op-line); background: linear-gradient(var(--op-t2), var(--panel) 60%); }
.bp-side-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.bp-side-h small { color: var(--muted); }
.bp-side-h .off { font-style: normal; font-size: 12px; color: var(--red-ink); }
.bp-sc { margin-left: auto; font-weight: 700; color: var(--gold-ink); }
.bp-hand { display: flex; gap: 6px; flex-wrap: wrap; min-height: 40px; align-items: flex-start; }
.bp-hand .hint { margin: 0; }

.bp-gen { position: relative; width: 92px; border: 2px solid transparent; border-radius: 10px; padding: 3px 3px 4px; background: var(--sunk); text-align: center; transition: transform .12s, box-shadow .12s; }
.bp-gen[data-act] { cursor: pointer; }
.bp-gen[data-act]:hover { transform: translateY(-2px); box-shadow: 0 3px 10px rgba(90, 60, 20, .15); }
.bp-gen img { display: block; width: 100%; aspect-ratio: 360 / 502; object-fit: cover; border-radius: 6px; }
.bp-gn { display: block; font-size: 13px; font-weight: 600; line-height: 1.25; margin-top: 2px; }
.bp-gen.k0 { border-color: rgba(181, 67, 42, .35); }
.bp-gen.k1 { border-color: rgba(61, 86, 117, .4); }
.bp-gen.k2 { border-color: rgba(42, 125, 107, .4); }
.bp-gen.k3 { border-color: rgba(120, 110, 95, .4); }
.bp-gen.sel { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 196, 112, .7); background: rgba(255, 238, 180, .7); }
.bp-gen.no { filter: grayscale(1); opacity: .45; }
.bp-gen.no[data-act]:hover { transform: none; box-shadow: none; }
.bp-gen.warn { border-color: #d9a520; background: rgba(255, 220, 120, .35); }
.bp-gen.pickable { outline: 2px dashed rgba(184, 134, 46, .6); outline-offset: 1px; cursor: pointer; }
.bp-why { display: block; font-style: normal; font-size: 10.5px; line-height: 1.25; color: var(--red-ink); margin-top: 2px; }
.bp-gen.warn .bp-why { color: #8a6200; }
.bp-badge { position: absolute; left: 4px; top: 4px; font-style: normal; font-size: 10px; padding: 0 4px; border-radius: 6px; background: rgba(51, 40, 26, .78); color: #fff; white-space: nowrap; }
.bp-i { position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; padding: 0; border-radius: 50%; font-size: 12px; font-weight: 700; line-height: 18px; background: rgba(255, 252, 246, .9); }

.bp-actbar { position: sticky; bottom: 8px; z-index: 6; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--gold); background: var(--panel); box-shadow: 0 4px 16px rgba(90, 60, 20, .18); }
.bp-actbar.done { border-color: var(--line); box-shadow: none; position: static; color: var(--muted); }
.bp-chip { padding: 2px 10px; border-radius: 12px; background: rgba(232, 196, 112, .35); border: 1px solid var(--gold); font-weight: 600; font-size: 13px; }
.bp-chip.empty { background: transparent; border-style: dashed; border-color: var(--line2); color: var(--muted); font-weight: 400; }
.bp-act-btns { margin-left: auto; display: flex; gap: 6px; }

.bp-pool { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px 10px; }
.bp-pool h3 { margin: 2px 0 6px; font-size: 15px; }
.bp-pool h3 small, .bp-banned h4 small { font-weight: 400; color: var(--muted); font-size: 12px; }
.bp-ks { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 0 14px; }
.bp-k h4 { margin: 8px 0 4px; font-size: 13px; color: var(--text2); }
.bp-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.bp-banned { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.bp-banned h4 { margin: 0 0 6px; font-size: 14px; }
.bp-ban-list { display: flex; flex-wrap: wrap; gap: 6px; }
.bp-ban { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; border-radius: 8px; background: var(--sunk); border: 1px solid var(--line); font-size: 12px; }
.bp-ban img { width: 26px; aspect-ratio: 360 / 502; object-fit: cover; border-radius: 4px; filter: grayscale(.8); }
.bp-ban small { color: var(--muted); }
.bp-log { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; font-size: 13px; }
.bp-log summary { cursor: pointer; font-weight: 600; }
.bp-log p { margin: 3px 0; color: var(--text2); }
.bp-src { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text2); padding: 6px 10px; border-radius: 10px; background: rgba(232, 196, 112, .2); border: 1px solid rgba(184, 134, 46, .35); }
.bp-line .bp-hand { margin-top: 4px; }
.bp-mydeck h3 small { color: var(--muted); font-weight: 400; }
.bp-donecard { text-align: center; }
.bp-over { margin: 6px 0; }
.bp-res { font-size: 17px; font-weight: 700; color: var(--gold-ink); margin: 6px 0; }
.bp-res span { margin-left: 8px; font-size: 14px; color: var(--text2); font-weight: 400; }
.bp-games { margin: 4px 0; padding-left: 1.4em; text-align: left; font-size: 13px; }
.bp-games li { margin: 2px 0; }
.bp-games small { display: block; color: var(--muted); }
.bp-help h4 { margin: 12px 0 4px; }
.bp-help ol { margin: 0; padding-left: 1.4em; }
.bp-help li { margin: 3px 0; }
@media (max-width: 700px) {
  .bp-sides { grid-template-columns: 1fr; }
  .bp-gen { width: 74px; }
  .bp-gn { font-size: 12px; }
  .bp-screen .bp { padding: 8px 8px 90px; }
  .bp-screen .tb-left > span:not(.bp-tag) { display: none; }
}

/* ---------- 国别大乱斗（用户 10-14，bp.js）：国别小标、本局国别表、组卡时的武将分组 ---------- */
.bp-tag.chaos { background: linear-gradient(90deg, #7a2f6b, #c0492c); }
.bp-mq-btns button.chaos { border-color: #a0436a; }
.kbadge { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: #777; box-shadow: 0 0 0 1px rgba(255, 255, 255, .8); vertical-align: 1px; margin-right: 4px; }
.kbadge.k0 { background: #b5432a; }
.kbadge.k1 { background: #3d5675; }
.kbadge.k2 { background: #2a7d6b; }
.kbadge.k3 { background: #6e6457; }
.kbadge.moved { box-shadow: 0 0 0 2px #f2d283; }
.sq .kbadge { position: absolute; left: 2px; top: 8px; z-index: 2; margin: 0; width: 17px; height: 17px; font-size: 10.5px; }
.bp-badge.moved { background: rgba(160, 67, 106, .9); }
.bp-sub { display: block; font-size: 10.5px; line-height: 1.2; color: var(--gold-ink); }
.bp-free .bp-k h4 { display: flex; align-items: center; gap: 2px; }
.pv-k { display: block; margin-top: 4px; padding: 3px 6px; border-radius: 6px; background: rgba(160, 67, 106, .1); color: #7a2f6b; font-size: 12px; }
.solo-chaos small { display: block; color: var(--muted); }
.kq-box .hint { margin-top: 0; }
.kq-g h4 { display: flex; align-items: center; gap: 6px; margin: 10px 0 4px; }
.kq-g h4 small { color: var(--muted); font-weight: 400; }
.kq-list { display: flex; flex-wrap: wrap; gap: 4px; }
.kq-gen { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; border-radius: 8px; background: var(--sunk); border: 1px solid var(--line); font-size: 12px; }
.kq-gen img { width: 24px; aspect-ratio: 360 / 502; object-fit: cover; border-radius: 4px; }
.kq-gen.moved { border-color: rgba(160, 67, 106, .5); }
.kq-gen small { color: #7a2f6b; }
.kq-gen em { font-style: normal; font-size: 11px; padding: 0 4px; border-radius: 6px; background: rgba(184, 134, 46, .2); color: var(--gold-ink); }

/* ---------- 公告栏分页（用户 10-14） ---------- */
.nt-tabs { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 0 0 10px; border-bottom: 1px solid var(--line); }
.nt-tabs button { position: relative; border: none; border-radius: 8px 8px 0 0; background: transparent; padding: 6px 12px 7px; font-weight: 600; color: var(--muted); }
.nt-tabs button:hover:not(:disabled) { background: var(--sunk); border: none; }
.nt-tabs button.on { color: var(--text); background: var(--panel2); box-shadow: inset 0 -3px 0 var(--gold); }
.nt-tabs button.imp { color: var(--red-ink); }
.nt-tabs button.imp.on { box-shadow: inset 0 -3px 0 var(--red); }
.nt-tabs button i { font-style: normal; font-size: 11px; font-weight: 400; margin-left: 5px; padding: 0 6px; border-radius: 8px; background: var(--sunk); color: var(--muted); }
.nt-tabdot { position: absolute; top: 4px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }

/* ---------- 意向模式（用户 10-14）：在线玩家里的「想打 XX，求约！」气泡 ---------- */
.intent-bubble { position: relative; display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap;
  color: #fff; background: linear-gradient(90deg, #c0492c, #d98a2b); box-shadow: 0 1px 3px rgba(120, 50, 20, .25); }
.intent-bubble::before { content: ''; position: absolute; left: -4px; top: 50%; margin-top: -4px; border: 4px solid transparent; border-left: 0; border-right-color: #c0492c; }
.intent-bubble.me { margin-left: 6px; }
.intent-row { padding: 8px 10px; margin-bottom: 8px; border-radius: 10px; background: var(--sunk); border: 1px dashed var(--line2); }
.intent-h { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; }
.intent-h small { color: var(--muted); }
.intent-btns { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.intent-btns button { padding: 3px 10px; font-size: 13px; border-radius: 14px; }
.intent-btns button.on { background: linear-gradient(var(--pri1), var(--pri2)); border-color: var(--pri-line); color: var(--pri-text); font-weight: 600; }
@media (max-width: 700px) { .pl-main .intent-bubble { margin-left: 0; margin-top: 2px; } }

/* 单人练习里的「国别大乱斗」勾选：占满一行 */
.lb-form.solo-form label.solo-chaos { grid-column: 1 / -1; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 2px 8px; color: var(--text); margin-top: 0; }
.lb-form.solo-form label.solo-chaos small { flex-basis: 100%; color: var(--muted); }

/* 意向「人机玩家，咕咕嘎嘎」（用户 10-14）：换个颜色 */
.intent-bubble.bot { background: linear-gradient(90deg, #4f6a8a, #7a5aa6); }
.intent-bubble.bot::before { border-right-color: #4f6a8a; }

/* 自建房间的模式五选一（用户 10-14） */
.room-modes { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 8px; font-size: 13px; }
.room-modes small { flex-basis: 100%; color: var(--muted); }

/* 再决的礼物（gift.js / fx.js）：档位颜色 银 / 金 / 彩 / 濒死 */
.gift-tag { background: linear-gradient(90deg, #b8862e, #c4507a); }
.t-silver { --gt1: #eef1f4; --gt2: #a7b1bb; --gt-line: #7f8b97; --gt-ink: #3d4752; }
.t-gold { --gt1: #fff1c4; --gt2: #e0b04a; --gt-line: #a5741f; --gt-ink: #6b4708; }
.t-prism { --gt1: #fde7f3; --gt2: #b9a5f0; --gt-line: #8a63c9; --gt-ink: #4b2a7a; }
.t-doom { --gt1: #f7d9d3; --gt2: #b5432a; --gt-line: #7d2414; --gt-ink: #6a1a0c; }
.gt-silver { color: #66717d; } .gt-gold { color: #a5741f; } .gt-prism { color: #8a4fc4; } .gt-doom { color: var(--red-ink); }
.gift-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 5px; font-size: 12px; }
.gift-bar > small { color: var(--muted); cursor: pointer; text-decoration: underline dotted; }
.gift-chip { padding: 0 8px; min-height: 20px; line-height: 18px; font-size: 12px; font-weight: 600; border-radius: 6px; color: var(--gt-ink); border: 1px solid var(--gt-line); background: linear-gradient(135deg, var(--gt1), var(--gt2)); box-shadow: none; }
.gift-chip.t-prism { background: linear-gradient(120deg, #ffd6e8, #fff1b8 30%, #c9f5e4 55%, #c9dcff 78%, #e2cfff); }
.gift-chip.t-doom { color: #fff; background: linear-gradient(135deg, #c4553a, #6a1a0c); }
.gift-chip.can { box-shadow: 0 0 0 2px var(--gold-l), 0 0 8px rgba(214, 160, 60, .7); }
.gift-chip.used { opacity: .45; text-decoration: line-through; box-shadow: none; }
.gift-none { color: var(--muted); font-style: normal; }
.gift-fx { padding: 0 6px; border-radius: 8px; font-size: 11.5px; white-space: nowrap; color: #6b3fa0; background: rgba(139, 92, 196, .1); border: 1px dashed rgba(139, 92, 196, .45); cursor: default; }
.gift-doomed { padding: 0 6px; border-radius: 8px; font-size: 11.5px; color: #fff; background: var(--red); cursor: default; }
.opt.gift-opt { border-color: var(--gt-line); background: linear-gradient(135deg, var(--gt1), var(--gt2)); color: var(--gt-ink); font-weight: 600; }
.opt.gift-opt.t-prism { background: linear-gradient(120deg, #ffd6e8, #fff1b8 30%, #c9f5e4 55%, #c9dcff 78%, #e2cfff); }
.opt.gift-opt.t-doom { color: #fff; background: linear-gradient(135deg, #c4553a, #6a1a0c); }
.pn-gift-done { margin: 6px 0; font-size: 12px; }
.gift-card { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 18px 12px 10px; border-radius: 12px; text-align: left; color: #2b2118; border: 2px solid var(--gt-line); background: linear-gradient(160deg, #fffdf8 35%, var(--gt1)); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .6), 0 2px 8px rgba(60, 40, 10, .15); }
.gift-card.t-prism { border-image: linear-gradient(120deg, #ff7fb0, #ffcf5a, #5fd6b0, #6aa8ff, #b97bff) 1; border-radius: 0; }
.gift-card.t-doom { background: linear-gradient(160deg, #fff6f3 35%, #f3c9bf); }
.gift-card .gc-tier { position: absolute; top: -1px; left: 10px; padding: 0 8px; font-style: normal; font-size: 11px; font-weight: 700; line-height: 17px; border-radius: 0 0 6px 6px; color: #fff; background: var(--gt-line); }
.gift-card.t-prism .gc-tier { background: linear-gradient(90deg, #ff7fb0, #ffb347, #5fd6b0, #6aa8ff, #b97bff); }
.gift-card b { font-size: 16px; font-family: var(--font-title); color: var(--gt-ink); letter-spacing: 1px; }
.gift-card small { color: #7a6a55; font-size: 11.5px; }
.gift-card p { margin: 2px 0 0; font-size: 13px; line-height: 1.5; }
.gift-card.used { opacity: .6; }
.gift-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.gift-pick .gift-card { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.gift-pick .gift-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .6), 0 6px 16px rgba(60, 40, 10, .22); }
.gift-pick .gift-card.on { outline: 3px solid var(--green); outline-offset: 2px; }
.gift-pop .gift-card { margin: 8px 0; }
.gift-help ol { padding-left: 20px; line-height: 1.6; font-size: 13.5px; }
.gift-help ul { padding-left: 18px; margin: 2px 0; }
.gh-tabs { margin: 4px 0 10px; }
.gh-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.gh-item { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); border-left: 4px solid var(--gt-line); background: var(--panel); font-size: 13px; }
.gh-item.t-prism { border-left-color: #8a63c9; }
.gh-item b { color: var(--text); }
.gh-item small { display: block; color: var(--muted); font-size: 11.5px; margin: 1px 0 3px; }
.gh-item p { margin: 0; line-height: 1.5; color: var(--text2); }
.gift-hand { border-color: #8a63c9; }
.board-screen .spec-hand.gift-hand .hbar:not(.sel) { display: flex; }   /* 手机上手牌条默认藏起来；看对方手牌要写明是知己知彼 */
.rb-gift { width: 34px; height: 47px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-style: normal; font-weight: 700; font-size: 15px; border-radius: 4px; color: var(--gt-ink); border: 1px solid var(--gt-line); background: linear-gradient(135deg, var(--gt1), var(--gt2)); }
.rb-gift.t-doom { color: #fff; background: linear-gradient(135deg, #c4553a, #6a1a0c); }
.fx-card.fx-gift { width: min(300px, 90vw); border-color: #b8862e; border-width: 3px; padding: 18px 14px 12px; gap: 8px; animation: fx-pop 2.6s ease forwards; }
.fx-card.fx-gift.t-doom { border-color: var(--red); }
.fx-card.fx-gift .gift-card { align-self: stretch; }
.fx-card.fx-gift .fx-rv-tag { background: #b8862e; }
.fx-card.fx-gift.t-doom .fx-rv-tag { background: var(--red); }
.fx-doom { position: fixed; left: 50%; top: 32%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 28px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, rgba(150, 30, 18, .95), rgba(70, 10, 6, .95)); box-shadow: 0 10px 40px rgba(60, 0, 0, .45); animation: fx-pop 2.3s ease forwards; white-space: nowrap; }
.fx-doom b { font-size: 22px; letter-spacing: 4px; font-family: var(--font-title); }
.fx-doom small { font-size: 13px; opacity: .9; }
.fx-bubble.fx-giftgot { border-color: var(--gt-line); background: linear-gradient(135deg, #fffdf8 40%, var(--gt1)); color: var(--gt-ink); }

/* 弹窗公告（bulletin.js：玩家看到的弹窗；admin.js：编辑、结果） */
.bl-box { border-top-color: var(--gold); }
.bl-box .pop-head b { font-size: 16px; }
.bl-body { font-size: 14px; line-height: 1.75; margin: 6px 0 12px; color: var(--text); overflow-wrap: anywhere; }
.bl-items { display: flex; flex-direction: column; gap: 10px; }
.bl-q { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); }
.bl-q.bad { border-color: var(--red); box-shadow: 0 0 0 2px var(--red-bg); }
.bl-qt { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 6px; margin-bottom: 6px; }
.bl-qt b { font-size: 14px; }
.bl-qt small { color: var(--muted); font-size: 12px; }
.bl-req { color: var(--red); font-style: normal; font-weight: 700; }
.bl-opts { display: flex; flex-direction: column; gap: 5px; }
.bl-opt { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; font-size: 13.5px; line-height: 1.4; }
.bl-opt:hover { border-color: var(--gold); }
.bl-opt:has(input:checked) { border-color: var(--green); background: var(--ok-bg); }
.bl-opt input { margin: 0; flex-shrink: 0; width: 16px; height: 16px; }
.bl-text { width: 100%; box-sizing: border-box; resize: vertical; min-height: 66px; font-size: 13.5px; }
.bl-err { min-height: 1em; margin: 8px 0 0; }
.bl-box .modal-foot { position: sticky; bottom: -12px; z-index: 1; margin: 8px -14px -12px; padding: 10px 14px 12px; background: var(--panel); border-top: 1px solid var(--line); }   /* 内容长（手机）时按钮一直看得到 */
.bl-cd { font-style: normal; }
.bl-edit #bl-title, .bl-edit #bl-body { width: 100%; box-sizing: border-box; margin: 4px 0; }
.bl-qe { border: 1px dashed var(--line2); border-radius: 8px; padding: 6px 8px; margin: 6px 0; background: var(--panel2); }
.bl-qe .bl-qtitle { flex: 1; min-width: 200px; }
.bl-qe .bl-qmax { width: 56px; margin: 0 4px; }
.bl-qe textarea { width: 100%; box-sizing: border-box; }
.adm-tag.bl-st-live, .adm-tag.bl-st-draft, .adm-tag.bl-st-ended { display: inline-block; padding: 0 8px; border-radius: 9px; font-size: 12px; line-height: 18px; }
.adm-tag.bl-st-live { background: var(--ok-bg); color: var(--green-ink); }
.adm-tag.bl-st-draft { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
.adm-tag.bl-st-ended { background: var(--red-bg); color: var(--red-ink); }
.bl-res { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.blr-q { margin: 10px 0; }
.blr-bar { display: grid; grid-template-columns: minmax(110px, 2fr) 3fr 36px 42px; align-items: center; gap: 8px; font-size: 13px; margin: 3px 0; }
.blr-bar em { height: 12px; border-radius: 6px; background: var(--panel2); overflow: hidden; border: 1px solid var(--line); }
.blr-bar em i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-l), var(--gold)); }
.blr-bar b { text-align: right; }
.blr-bar small { color: var(--muted); }
.blr-texts { max-height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.blr-text { padding: 6px 8px; border-radius: 8px; background: var(--panel2); }
.blr-text p { margin: 2px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.bl-preview { width: min(780px, 100%); }
.bl-preview .pop-box { max-height: none; }
/* 刺激去匹配（queue.js）：边打边匹配的小标签、人机局结束的劝说、大厅「有人在等匹配」 */
.sq-chip { white-space: nowrap; }
.sq-chip.hot { border-color: var(--red); color: var(--red-ink); background: var(--red-bg); font-weight: 600; animation: sq-pulse 2.4s ease-in-out infinite; }
span.sq-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 1px 3px 1px 9px; border-radius: 10px; background: var(--blue-bg); color: var(--blue-ink); border: 1px solid var(--blue); margin-right: 6px; }
span.sq-chip button { padding: 0 6px; min-height: 0; line-height: 18px; border: 0; background: none; color: inherit; }
@keyframes sq-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(181, 67, 42, 0); } 50% { box-shadow: 0 0 0 3px rgba(181, 67, 42, .22); } }
.eyebrow span.sq-chip, .eyebrow .sq-chip { margin: 0 4px 0 0; padding-top: 0; padding-bottom: 0; font-size: 11px; }
.sq-box { max-width: 460px; }
.sq-box .sq-modes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sq-box .sq-modes button { flex: 1; min-width: 6.5em; font-weight: 600; }
.sq-box .sq-modes button.hot { border-color: var(--red); }
.sq-box .sq-modes button i, .ai-nudge .an-btns button i { display: block; font-style: normal; font-weight: 400; font-size: 11px; color: var(--red-ink); }
.ai-nudge { margin: 10px 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--gold); background: var(--sunk); text-align: left; }
.ai-nudge.win { background: linear-gradient(135deg, var(--sunk), var(--red-bg)); }
.ai-nudge .an-line { margin: 0 0 6px; font-size: 16px; font-weight: 700; font-family: var(--font-title); color: var(--hl); }
.ai-nudge .an-heat { margin: 0 0 6px; font-size: 13px; color: var(--red-ink); font-weight: 600; }
.ai-nudge .an-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-nudge .hint { margin: 0; }
.ai-nudge small { display: block; margin-top: 6px; color: var(--muted); }
.mq-heat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 8px; padding: 7px 10px; border-radius: 10px; background: var(--red-bg); border: 1px solid var(--red); }
.mq-heat > b { color: var(--red-ink); }
.mq-heat .mh-it { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.mq-txt .mq-side { display: block; color: var(--muted); }
/* 顶栏是深色：在等匹配用醒目的红底白字，匹配中用顶栏的金色 */
.topbar .sq-chip.hot { background: #c0492c; border-color: #e88a6c; color: #fff; }
.topbar .sq-chip.hot:hover:not(:disabled) { background: #d0583a; border-color: #f4a588; }
.topbar span.sq-chip.on { background: rgba(255, 255, 255, .14); border-color: var(--top-acc); color: var(--top-acc); }
.topbar span.sq-chip.on .cd-up { color: var(--top-text); font-variant-numeric: tabular-nums; }
.topbar span.sq-chip button { background: none; border: 0; color: var(--top-text); }

/* 成就与称号（titles.js，用户 10-14 定稿：「金银」进阶 + 马善政楷书，字体在 fonts/titles.css）。称号牌 = 两头尖的牌匾（按钮都是圆角矩形，不会混）：
   普通 素木 → 稀有 银 → 史诗 金（两头金钉）→ 传说 玄金（黑漆金箔字、内框线、流光；光晕在外层 .tt-glow，同一层的会被 clip-path 裁掉）→ 限定 朱金（朱漆金箔字、印章形） */
.tt { --p: 7px; --sh: polygon(var(--p) 0, calc(100% - var(--p)) 0, 100% 50%, calc(100% - var(--p)) 100%, var(--p) 100%, 0 50%);
  position: relative; isolation: isolate; display: inline-block; height: 20px; margin-right: 5px; padding: 0 11px;
  font: 400 15px/20px 'KD Title', "STKaiti", "KaiTi", "Kaiti SC", serif; letter-spacing: 1.5px; white-space: nowrap;
  clip-path: var(--sh); background: var(--tt-edge); color: var(--tt-ink); }
.tt::before { content: ''; position: absolute; inset: 1px; z-index: -1; clip-path: var(--sh); background: var(--tt-fill); }
/* 用户 10-16「聊天框一直在抖动」：传说称号的 .tt-run（260% 宽、一直在转的方块）和流光虽然被 clip-path 裁掉看不见，但还算在外层的滚动范围里，
   转起来范围时大时小，聊天列表的滚动条一会儿有一会儿没有，内容来回挤。contain: paint 让里面的东西不再算进外层（看起来不变，基线也不变；overflow: hidden 会改基线） */
.tt { contain: paint; }
.tt > i { position: relative; font-style: normal; }
.tt.big { --p: 11px; height: 34px; padding: 0 20px; font-size: 23px; line-height: 34px; letter-spacing: 4px; vertical-align: middle; }
.tt.big::before { inset: 1.5px; }
.tt-c { --tt-edge: #b39a6c; --tt-fill: linear-gradient(#fdf8ea, #efe2c2); --tt-ink: #5a4429; }
.tt-r { --tt-edge: #75818d; --tt-fill: linear-gradient(#ffffff, #f1f4f7 38%, #d3dae2); --tt-ink: #27323f; }
.tt-e { --tt-edge: #8a5d17; --tt-fill: linear-gradient(#fff5cc, #f7da8c 36%, #e3b24f); --tt-ink: #4a2806; }
.tt-c > i, .tt-r > i, .tt-e > i { text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
/* 素木 / 银 / 金：上亮下略深的平滑渐变 + 顶边一道高光（用户 10-14：以前中间那道暗带横在字上很怪） */
.tt-c::before, .tt-r::before, .tt-e::before { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75); }
.tt-e::after { content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at calc(var(--p) + 1px) 50%, #8a5d17 1.4px, transparent 2px), radial-gradient(circle at calc(100% - var(--p) - 1px) 50%, #8a5d17 1.4px, transparent 2px); }
.tt-e.big::after { background: radial-gradient(circle at calc(var(--p) + 1px) 50%, #8a5d17 2px, transparent 2.8px), radial-gradient(circle at calc(100% - var(--p) - 1px) 50%, #8a5d17 2px, transparent 2.8px); }
.tt-l { --tt-edge: linear-gradient(90deg, #8a5d17, #f6dd92 25%, #b98325 50%, #f6dd92 75%, #8a5d17); --tt-fill: linear-gradient(#2e2219, #0e0a07); }
.tt-l::before { inset: 1.5px; }
.tt-l.big::before { inset: 2px; }
.tt-x { --sh: polygon(3px 0, calc(100% - 3px) 0, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 0 calc(100% - 3px), 0 3px); padding: 0 9px;
  --tt-edge: #e3b65e; --tt-fill: radial-gradient(120% 160% at 30% 15%, #cf4129, #8e1d12); }
.tt-x.big { --sh: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px); padding: 0 15px; }
.tt-l > i:not(.tt-chs), .tt-x > i:not(.tt-chs), .tt .tt-ch, .tt .tt-orn { background: linear-gradient(180deg, #fff6d2 0%, #f4d27a 42%, #b98325 56%, #f7df97 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .6)); }
.tt-l::after, .tt-x::after { content: ''; position: absolute; inset: 3px; z-index: -1; box-shadow: inset 0 0 0 1px rgba(246, 221, 146, .5); }
.tt-l::after { clip-path: var(--sh); }
.tt-x::after { inset: 2.5px; }
.tt-l.big::after, .tt-x.big::after { inset: 4px; }
/* 常驻特效（用户 10-14 看过演示定的）：只动 transform / opacity（显卡合成，不逐帧重画）。史诗隔 7 秒左右一道金光；传说一个光点沿边框游走 + 字面流光 + 呼吸光晕；
   限定偶尔泛金光；普通、稀有不动。特效层用自定义标签 <tt-fx>（不会被别处的 b / span 样式碰到）。--gd 是负的延迟（titles.js 按页面时钟 + 名字算）：重画以后节奏接得上，各个称号互相错开 */
.tt .tt-orn { display: inline-block; margin: 0 6px; font: 400 12px/1 serif; vertical-align: 4px; }
.tt .tt-ch { display: inline-block; }
.tt .tt-gl { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.tt .tt-gl::before { content: ''; position: absolute; top: -30%; bottom: -30%; left: 0; width: 40%;
  background: linear-gradient(90deg, transparent, var(--gl-c, rgba(255, 255, 255, .75)) 50%, transparent); transform: translateX(-160%) skewX(-20deg);
  animation: tt-glint var(--gp, 7.5s) ease-in-out var(--gd, 0s) infinite; }
.tt-l .tt-gl { --gp: 4.4s; --gl-c: rgba(255, 238, 195, .4); }
.tt-x .tt-gl { --gp: 9s; --gl-c: rgba(255, 222, 160, .5); }
.tt-l .tt-run { position: absolute; left: 50%; top: 50%; width: 260%; aspect-ratio: 1; z-index: -2; pointer-events: none; translate: -50% -50%;
  background: conic-gradient(transparent 0 76%, rgba(255, 244, 205, 0) 78%, #fff3c8 86%, rgba(255, 244, 205, 0) 94%, transparent 100%);
  animation: tt-run 3.4s linear var(--gd, 0s) infinite; }
.tt-glow { position: relative; display: inline-block; isolation: isolate; margin-right: 5px; }
.tt-glow > .tt { margin-right: 0; }
.tt-glow::before { content: ''; position: absolute; inset: -7px -12px; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(240, 196, 100, .6), rgba(240, 196, 100, 0)); opacity: .5; animation: tt-breathe 3.2s ease-in-out var(--gd, 0s) infinite alternate; }
.tt-glow.big::before { inset: -10px -16px; }
@keyframes tt-glint { 0% { transform: translateX(-160%) skewX(-20deg); } 14%, 100% { transform: translateX(360%) skewX(-20deg); } }
@keyframes tt-run { to { rotate: 1turn; } }
@keyframes tt-breathe { from { opacity: .25; transform: scale(.94); } to { opacity: .9; transform: scale(1.05); } }
/* 在线列表里戴传说称号的那一行：淡淡的金底 */
.pl-item.tt-leg { background: linear-gradient(90deg, rgba(232, 190, 90, .22), var(--sunk) 70%); }
/* 武将卡角上的熟练度：熟（铜）/ 精（银）/ 师（金） */
.mlv { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .7); }
.sq .mlv { position: absolute; right: 2px; top: 2px; z-index: 2; }
.mlv1 { background: linear-gradient(135deg, #d08a4f, #8a4f1d); }
.mlv2 { background: linear-gradient(135deg, #e3e8ee, #7f8b97); color: #2b3540; }
.mlv3 { background: linear-gradient(135deg, #ffe08a, #c8901f); color: #5e3d06; }
/* 成就页 */
.ach-box .pop-head small { color: var(--muted); }
.ach-cur { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 4px 0 8px; font-size: 13px; }
.ach-cur small { color: var(--muted); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-bottom: 8px; }
.ach { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.ach.lock { opacity: .6; filter: grayscale(.55); }
.ach.lock .tt-gl, .ach.lock .tt-run, .ach.lock .tt-glow::before { display: none; }   /* 没解锁的不发光 */
/* 左边一条稀有度色带，解锁了底色带一点材质色 */
.ach { border-left: 4px solid var(--ach-rc, var(--line)); }
.ach-c { --ach-rc: #b39a6c; } .ach-r { --ach-rc: #8a97a5; } .ach-e { --ach-rc: #c8922c; } .ach-l { --ach-rc: #3a2a1a; } .ach-x { --ach-rc: #b8321f; }
.ach.got.ach-r { background: linear-gradient(90deg, rgba(138, 151, 165, .16), var(--panel) 60%); }
.ach.got.ach-e { background: linear-gradient(90deg, rgba(200, 146, 44, .16), var(--panel) 60%); }
.ach.got.ach-l { background: linear-gradient(90deg, rgba(58, 42, 26, .14), var(--panel) 60%); box-shadow: 0 0 0 1px rgba(200, 146, 44, .45), 0 0 10px rgba(240, 196, 100, .25); }
.ach.got.ach-x { background: linear-gradient(90deg, rgba(184, 50, 31, .12), var(--panel) 60%); }
.ach.eq { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-bg); }
.ach-top { display: flex; align-items: center; gap: 6px; }
.ach-top small { color: var(--muted); font-size: 11px; }
.ach-eqtag { margin-left: auto; font-style: normal; font-size: 11px; color: var(--green-ink); }
.ach p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text2); }
.ach-bar { position: relative; height: 14px; border-radius: 7px; background: var(--panel2); border: 1px solid var(--line); overflow: hidden; }
.ach-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-l), var(--gold)); }
.ach-bar small { position: absolute; inset: 0; text-align: center; font-size: 10.5px; line-height: 13px; color: var(--text); }
.ach-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.ach-foot small { color: var(--muted); font-size: 11px; }
.ach-redeem { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; border: 1px dashed var(--line2); background: var(--panel2); }
.ach-redeem input { width: 180px; letter-spacing: 2px; text-transform: uppercase; }
.ach-redeem small { color: var(--muted); }
.mst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.mst { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); text-align: center; }
.mst img { width: 68px; height: 68px; object-fit: cover; object-position: center 15%; border-radius: 50%; border: 3px solid var(--line2); cursor: zoom-in; }
.mst.lv1 img { border-color: #b87333; }
.mst.lv2 img { border-color: #9aa6b2; }
.mst.lv3 img { border-color: #d4a017; box-shadow: 0 0 8px rgba(212, 160, 23, .6); }
.mst.none { opacity: .5; }
.mst .mlv { position: absolute; right: 12px; top: 6px; }
.mst b { font-size: 13px; }
.mst-lv { font-size: 11px; color: var(--muted); }
.mst .ach-bar { width: 100%; }
.mst-rk { position: absolute; left: 10px; top: 6px; padding: 0 5px; border-radius: 8px; font-style: normal; font-size: 11px; font-weight: 700; line-height: 17px; }
.mst-rk.rk1 { background: linear-gradient(#3a2a1a, #120d08); color: #f6dd92; box-shadow: 0 0 0 1px #b98325; }
.mst-rk.rk5 { background: linear-gradient(#fff5cc, #e3b24f); color: #4a2806; box-shadow: 0 0 0 1px #8a5d17; }
/* 武将排行（用户 10-14）：每名武将前五名；自己上榜的卡片金边、排最前，能直接佩戴 */
.bd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-bottom: 8px; }
.bd { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.bd.mine { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-l); background: linear-gradient(180deg, rgba(232, 196, 112, .16), var(--panel) 60%); }
.bd-h { display: flex; align-items: center; gap: 8px; }
.bd-h img { width: 34px; height: 34px; object-fit: cover; object-position: center 15%; border-radius: 50%; border: 2px solid var(--line2); cursor: zoom-in; }
.bd-h b { font-size: 14px; }
.bd ol { margin: 0; padding: 0; list-style: none; counter-reset: bd; }
.bd li { display: flex; align-items: center; gap: 6px; padding: 2px 4px; border-radius: 6px; font-size: 12.5px; counter-increment: bd; }
.bd li::before { content: counter(bd); width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%; text-align: center; font-size: 10.5px; line-height: 16px; font-weight: 700; color: var(--muted); background: var(--panel2); }
.bd li:first-child::before { color: #f6dd92; background: linear-gradient(#3a2a1a, #120d08); }
.bd li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd li em { font-style: normal; font-variant-numeric: tabular-nums; color: var(--text2); }
.bd li.me { background: rgba(232, 196, 112, .25); font-weight: 700; }
.bd li.empty span { color: var(--muted); }
.bd-me { font-size: 12px; color: var(--muted); }
.bd-tt { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
/* 结算：这局新解锁的 —— 最稀有的那个放大（史诗以上带光芒），其余的小号排在下面；可以直接佩戴。
   解锁动画（用户 10-14 看过演示定的）：传说 / 大师 光芒展开 + 逐字题写（金字从上往下显出）+ 两边的星 + 金粉；限定 盖章（砸下、一震、朱砂晕开）；史诗 弹出 + 金光一闪；普通 / 稀有 弹出。
   结算弹窗每次推送都整个重画：titles.js 记下第一次显示的时间，--el = 已经过去的秒数（负数）加进所有延迟，重画后动画从断开的地方接着放；6 秒后去掉 .play，重画就是静止的样子 */
.tt-new { position: relative; overflow: hidden; margin: 8px 0; padding: 12px 10px 10px; border-radius: 12px; text-align: center; border: 1px solid var(--gold-l);
  background: radial-gradient(80% 120% at 50% 0%, rgba(255, 236, 170, .6), transparent 70%), var(--panel); }
.tt-new .rays { position: absolute; left: 50%; top: 56px; width: 520px; height: 520px; margin: -260px 0 0 -260px; pointer-events: none; opacity: .5;
  background: repeating-conic-gradient(rgba(255, 214, 120, .5) 0 6deg, transparent 6deg 18deg); -webkit-mask: radial-gradient(closest-side, #000 20%, transparent 75%); mask: radial-gradient(closest-side, #000 20%, transparent 75%);
  animation: tt-spin 24s linear var(--el, 0s) infinite; }
.tt-new.u-x .rays { background: repeating-conic-gradient(rgba(220, 120, 90, .35) 0 6deg, transparent 6deg 18deg); }
.tt-new > :not(.rays) { position: relative; }
.tt-new-lbl { display: block; margin-bottom: 8px; font-size: 13px; letter-spacing: 3px; color: var(--gold-ink); }
.tt-new-lbl em { font-style: normal; font-weight: 700; }
.tt-new-lbl .r-c { color: var(--muted); } .tt-new-lbl .r-r { color: #6b7886; } .tt-new-lbl .r-e { color: #b07d1c; } .tt-new-lbl .r-l { color: var(--gold-ink); } .tt-new-lbl .r-x { color: #c0392b; }
.tt-stage { position: relative; display: inline-block; }
.tt-new.u-x .tt-stage { rotate: -4deg; }
.tt-burst, .tt-inkspot { position: absolute; left: 50%; top: 50%; border-radius: 50%; pointer-events: none; opacity: 0; z-index: -1; }
.tt-burst { width: 220px; height: 220px; margin: -110px 0 0 -110px; background: radial-gradient(closest-side, rgba(255, 246, 210, .95), rgba(255, 214, 120, .5) 45%, rgba(255, 214, 120, 0)); }
.tt-inkspot { width: 240px; height: 240px; margin: -120px 0 0 -120px; background: radial-gradient(closest-side, rgba(196, 44, 26, .45), rgba(196, 44, 26, .15) 55%, rgba(196, 44, 26, 0)); }
.tt-dust { position: absolute; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; pointer-events: none; z-index: 2; opacity: 0;
  background: radial-gradient(circle, #fffbe6 0 30%, #f3c95e 55%, rgba(243, 201, 94, 0) 72%); box-shadow: 0 0 6px rgba(255, 214, 120, .9); }
.tt-new-rest { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 0; margin-top: 10px; }
.tt-new-rest small { width: 100%; color: var(--muted); font-size: 12px; }
.tt-new-act { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.tt-pop { display: inline-block; }
.tt-new.play .rays { animation: tt-spin 24s linear var(--el, 0s) infinite, tt-rays-in 1s ease-out var(--el, 0s) both; }
.tt-new.play .tt-stage { animation: tt-pop-in .55s cubic-bezier(.2, 1.4, .4, 1) calc(.15s + var(--el, 0s)) both; }
.tt-new.play.u-l .tt-stage { animation: tt-stage-in .5s cubic-bezier(.2, 1.3, .4, 1) calc(.15s + var(--el, 0s)) both; }
.tt-new.play.u-l .tt-burst, .tt-new.play.u-e .tt-burst { animation: tt-burst .9s ease-out calc(.35s + var(--el, 0s)) both; }
.tt-new.play .tt-ch { -webkit-mask: linear-gradient(180deg, #000 45%, transparent 55%) 0 0 / 100% 220% no-repeat; mask: linear-gradient(180deg, #000 45%, transparent 55%) 0 0 / 100% 220% no-repeat;
  animation: tt-ink-in .62s cubic-bezier(.3, .7, .3, 1) calc(.6s + var(--k) * .3s + var(--el, 0s)) both; }
.tt-new.play .tt-orn { animation: tt-orn-in .5s ease-out calc(var(--od, 1.8s) + var(--el, 0s)) both; }
.tt-new.play .tt-dust { animation: tt-dust var(--t) ease-out calc(var(--d) + var(--el, 0s)) both; }
.tt-new.play .tt-new-rest .tt-pop { animation: tt-pop-in .45s cubic-bezier(.2, 1.4, .4, 1) calc(var(--pd, .6s) + var(--i, 0) * .12s + var(--el, 0s)) both; }
.tt-new.play .tt-new-act { animation: tt-pop-in .45s cubic-bezier(.2, 1.4, .4, 1) calc(var(--pd, .8s) + var(--el, 0s)) both; }
.tt-new.play.u-x .tt-stage { animation: tt-stamp .42s cubic-bezier(.55, 0, .85, .35) calc(.35s + var(--el, 0s)) both; }
.tt-new.play.u-x { animation: tt-shake .34s ease-out calc(.77s + var(--el, 0s)) both; }
.tt-new.play.u-x .tt-inkspot { animation: tt-ink-spread 1s ease-out calc(.77s + var(--el, 0s)) both; }
.tt-new.play.u-e .tt-stage .tt-gl::before { animation: tt-glint1 .8s ease-in-out calc(.75s + var(--el, 0s)) both, tt-glint var(--gp, 7.5s) ease-in-out calc(3.5s + var(--el, 0s)) infinite; }
@keyframes tt-spin { to { rotate: 1turn; } }
@keyframes tt-rays-in { from { opacity: 0; scale: .4; } to { opacity: .5; scale: 1; } }
@keyframes tt-stage-in { from { opacity: 0; scale: .7; } to { opacity: 1; scale: 1; } }
@keyframes tt-pop-in { from { opacity: 0; transform: translateY(6px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes tt-burst { from { opacity: 1; scale: .2; } to { opacity: 0; scale: 1.7; } }
@keyframes tt-ink-in { 0% { -webkit-mask-position: 0 100%; mask-position: 0 100%; opacity: .3; transform: scale(1.22); } 65% { opacity: 1; } 100% { -webkit-mask-position: 0 0; mask-position: 0 0; opacity: 1; transform: scale(1); } }
@keyframes tt-orn-in { from { opacity: 0; transform: scale(.2) rotate(-90deg); } to { opacity: 1; transform: none; } }
@keyframes tt-dust { 0% { opacity: 0; transform: translate(0, 0) scale(.3); } 18% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1); } }
@keyframes tt-stamp { 0% { opacity: 0; scale: 2.6; rotate: -16deg; } 60% { opacity: 1; } 100% { opacity: 1; scale: 1; rotate: -4deg; } }
@keyframes tt-shake { 0% { translate: 0 0; } 20% { translate: -3px 2px; } 40% { translate: 3px -2px; } 60% { translate: -2px 1px; } 80% { translate: 1px 0; } 100% { translate: 0 0; } }
@keyframes tt-ink-spread { from { opacity: .95; scale: .25; } to { opacity: 0; scale: 1.5; } }
@keyframes tt-glint1 { from { transform: translateX(-160%) skewX(-20deg); } to { transform: translateX(360%) skewX(-20deg); } }
/* 系统开了「减少动态效果」：称号的常驻特效和解锁动画都不放 */
@media (prefers-reduced-motion: reduce) {
  .tt .tt-gl::before, .tt-glow::before, .tt-new, .tt-new *, .tt-new .rays { animation: none !important; }
  .tt-l .tt-run { display: none; }
}
/* 后台「称号」页 */
.tt-item { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; }
.tt-item small { color: var(--muted); }
.tc-new { width: 100%; box-sizing: border-box; font-family: monospace; letter-spacing: 2px; }
.tt-table tr.tt-cat td { background: var(--panel2); }
.tt-table td small { margin-left: 6px; color: var(--muted); }
.ach-foot button { white-space: nowrap; flex-shrink: 0; }
/* 账号（account.js，用户 10-15）：大厅昵称旁边的账号条、登录 / 注册 / 找回 / 管理弹窗 */
.lb-acct { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-left: auto; }
.lb-acct .ac-me { font-size: 13px; color: var(--muted); }
.lb-acct .ac-me b { color: var(--text); }
.lb-acct .ac-tip { flex-basis: 100%; text-align: right; color: var(--muted); font-size: 12px; }
.ac-box { max-width: 420px; }
.ac-tabs { margin-bottom: 10px; }
.ac-body, .ac-box > h4 { display: flex; flex-direction: column; gap: 10px; }
.ac-box > h4 { margin: 14px 0 6px; }
.ac-f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.ac-f input { width: 100%; box-sizing: border-box; font-size: 15px; }
.ac-warn { margin: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--red); background: var(--red-bg); color: var(--red-ink); font-size: 13px; line-height: 1.5; }
.ac-code { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.ac-code input { flex: 1; min-width: 0; font: 700 22px/1.3 ui-monospace, Consolas, monospace; letter-spacing: 3px; text-align: center; padding: 8px; }
@media (max-width: 600px) { .lb-acct { width: 100%; justify-content: flex-end; } }   /* 手机：靠右，别被左边浮着的「聊天」挡住 */
/* 卡组广场（plaza.js，用户 10-15） */
.pz-box { max-width: 1060px; }
.pz-tabs { margin-bottom: 8px; }
.pz-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.pz-filter .seg { display: inline-flex; border: 1px solid var(--btn-line); border-radius: 8px; overflow: hidden; }
.pz-filter .seg button { border: 0; border-radius: 0; padding: 4px 10px; font-size: 13px; background: var(--btn1); }
.pz-filter .seg button.on { background: linear-gradient(var(--pri1), var(--pri2)); color: var(--pri-text); font-weight: 600; }
.pz-filter select { max-width: 160px; }
.pz-hint { margin: 4px 0 10px; }
.pz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; align-items: start; }
.pz-deck { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.pz-deck.open { grid-column: 1 / -1; }
.pz-gens { position: relative; display: flex; gap: 8px; align-items: flex-start; }
.pz-g { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 62px; }
.pz-g img { width: 52px; height: 52px; object-fit: cover; object-position: center 15%; border-radius: 50%; border: 2px solid var(--line2); }
.pz-g small { font-size: 12px; color: var(--text2); white-space: nowrap; }
.pz-rank { position: absolute; right: 0; top: 0; font-style: normal; font-weight: 800; font-size: 18px; color: var(--gold-ink); }
.pz-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.pz-title b { font-size: 15px; }
.pz-title small { color: var(--muted); font-size: 12px; }
.pz-stat { font-size: 13px; color: var(--text2); }
.pz-stat b { color: var(--text); }
.pz-desc { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pz-desc.open { display: block; }
.pz-note { font-size: 12px; color: var(--gold-ink); }
.pz-meta { font-size: 12px; color: var(--muted); align-self: center; }
.pz-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.pz-btns button.on { color: #c0392b; border-color: #c0392b; }
.pz-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--line); }
.pz-cg > b { display: block; font-size: 13px; margin-bottom: 4px; }
.pz-cl { display: flex; flex-wrap: wrap; gap: 6px; }
.pz-c { position: relative; width: 64px; }
.pz-c img { width: 64px; border-radius: 4px; display: block; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.pz-c i { position: absolute; right: 2px; bottom: 2px; padding: 0 4px; border-radius: 6px; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: rgba(30, 20, 10, .78); }
.pz-box textarea { width: 100%; box-sizing: border-box; font: inherit; }
.pz-lu { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); font-size: 13px; }
/* 我的套牌页（decks.js，用户 10-22）：上面筛选（搜索 / 收藏 / 排序 / 武将头像），下面套牌格子（和卡组广场同一个样式） */
.md-all-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; }
.md-all-row small { color: var(--muted); font-size: 12px; }
.dk-filter { display: flex; flex-direction: column; gap: 10px; }
.dk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.dk-screen .tb-right { margin-left: auto; }
.dk-row input[type=search] { flex: 1 1 150px; min-width: 0; }
.dk-row .seg { display: inline-flex; border: 1px solid var(--btn-line); border-radius: 8px; overflow: hidden; }
.dk-row .seg button { border: 0; border-radius: 0; padding: 4px 10px; font-size: 13px; background: var(--btn1); }
.dk-row .seg button + button { border-left: 1px solid var(--btn-line); }
.dk-row .seg button.on { background: linear-gradient(var(--pri1), var(--pri2)); color: var(--pri-text); font-weight: 600; }
.dk-sort { display: inline-flex; align-items: center; gap: 6px; }
.dk-sort small { color: var(--muted); font-size: 12px; }
#dk-gens { display: flex; flex-direction: column; gap: 6px; }
#dk-gens:empty { display: none; }
.dk-gstrip { display: flex; flex-direction: column; gap: 4px; }
.dk-kg { display: flex; gap: 6px; align-items: flex-start; }
.dk-kg > b { flex: 0 0 auto; width: 1.4em; padding-top: 14px; font-family: var(--font-title); font-size: 15px; color: var(--gold-ink); }
.dk-gl { display: flex; flex-wrap: wrap; gap: 2px; min-width: 0; }
.dk-g { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; width: 54px; padding: 4px 0 2px; border: 1px solid transparent; border-radius: 8px; background: none; }
.dk-g:hover:not(:disabled) { background: var(--panel2); border-color: var(--line); }
.dk-g img { width: 40px; height: 40px; object-fit: cover; object-position: center 15%; border-radius: 50%; border: 2px solid var(--line2); }
.dk-g small { max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--text2); }
.dk-g i { position: absolute; top: 1px; right: 3px; min-width: 17px; padding: 0 4px; border-radius: 9px; font-style: normal; font-size: 11px; line-height: 15px; text-align: center; color: var(--muted); background: var(--panel); border: 1px solid var(--line2); }
.dk-g.on, .dk-g.on:hover:not(:disabled) { background: var(--green-bg); border-color: var(--green); }
.dk-g.on img { border-color: var(--green); }
.dk-g.on i { color: #fff; background: var(--green); border-color: var(--green); }
.dk-g.zero { opacity: .38; }
.dk-g.zero i { display: none; }
.dk-g.zero:hover:not(:disabled) { opacity: .7; }
.dk-sel { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--text2); }
.dk-tip { margin: 0; }
.dk-count { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 2px 8px; font-size: 13px; color: var(--muted); }
.dk-count b { color: var(--text); }
.dk-full { color: var(--gold-ink); }
.dk-grid { align-items: stretch; }
.dk-deck .pz-btns { margin-top: auto; }
.dk-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.dk-head .md-star { font-size: 22px; padding-top: 2px; }
.dk-deck.cur { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.pz-g.hit img { border-color: var(--green); }
.dk-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0; }
.dk-title b { font-size: 15px; overflow-wrap: anywhere; }
.dk-stat { font-size: 13px; color: var(--muted); }
.dk-stat button { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; padding: 0; border: 0; border-radius: 0; background: none; font-size: 13px; color: var(--text2); text-align: left; }
.dk-stat button:hover:not(:disabled) { border: 0; background: none; color: var(--hl); }
.dk-stat button:hover .dk-more { text-decoration: underline; }
.dk-stat b.good { color: var(--green-ink); }
.dk-more { margin-left: 4px; color: var(--hl); font-size: 12px; }
.dk-hit { font-size: 12px; color: var(--gold-ink); }
.dk-bad { font-size: 12px; color: var(--red-ink); }
.dk-cards { margin-top: 2px; padding-top: 10px; border-top: 1px dashed var(--line); }
.dk-cards .dl-gen img, .dk-cards .dl-card img { aspect-ratio: 360 / 502; }
.dk-undo { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px; padding: 7px 8px 7px 16px; border-radius: 10px; background: var(--panel); border: 1px solid var(--gold); box-shadow: 0 4px 16px rgba(60, 40, 10, .25); font-size: 13px; white-space: nowrap; max-width: calc(100vw - 32px); }
.dk-undo span { overflow: hidden; text-overflow: ellipsis; }
/* 标签、备注（10-22）：筛选区一排标签，格子里名字下面的小签、备注两行（展开看全文），「标签 · 备注」弹窗 */
.dk-tagrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dk-tagrow:empty { display: none; }
.dk-tagrow > small { margin-right: 2px; color: var(--muted); font-size: 12px; }
.dk-tagf { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 12px; font-size: 13px; line-height: 20px; background: var(--panel2); border: 1px solid var(--line2); }
.dk-tagf i { font-style: normal; font-size: 11px; color: var(--muted); }
.dk-tagf.on, .dk-tagf.on:hover:not(:disabled) { background: var(--green-bg); border-color: var(--green); color: var(--green-ink); font-weight: 600; }
.dk-tagf.on i { color: var(--green-ink); }
.dk-tagf.zero { opacity: .45; }
.dk-tagf.zero i { display: none; }
.dk-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.dk-tag { display: inline-flex; align-items: center; padding: 0 8px; border-radius: 10px; font-size: 12px; line-height: 18px; color: var(--gold-ink); background: rgba(184, 134, 46, .1); border: 1px solid rgba(184, 134, 46, .38); }
.dk-tag.hit { color: var(--green-ink); background: var(--green-bg); border-color: var(--green); }
.dk-note { margin: 0; padding-left: 8px; border-left: 2px solid var(--line2); font-size: 13px; line-height: 1.55; color: var(--text2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dk-note.open { display: block; }
.dk-mbox { display: flex; flex-direction: column; gap: 10px; }
.dk-mbox .pop-head, .dk-mbox .modal-foot { margin: 0; }
.dk-mbox textarea { font: inherit; font-size: 14px; }
.dkm-hint { font-size: 12px; opacity: .85; }
.dkm-cur { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--input-bg); }
.dkm-cur .dk-tag { font-size: 13px; line-height: 22px; padding: 0 2px 0 10px; }
.dkm-x { padding: 0 5px; border: 0; background: none; font-size: 11px; line-height: 1; color: var(--muted); }
.dkm-x:hover:not(:disabled) { border: 0; background: none; color: var(--red-ink); }
.ac-f .dkm-cur input { flex: 1 1 120px; width: auto; min-width: 0; padding: 2px 4px; border: 0; background: transparent; font-size: 14px; outline: none; }
.dkm-sugg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.dkm-sugg small { font-size: 12px; }
@media (max-width: 640px) {                                            /* 手机：武将头像排成一整条横着滑，国别字夹在中间 */
  .dk-gstrip { flex-direction: row; gap: 0; overflow-x: auto; margin: 0 -14px; padding: 0 14px 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .dk-gstrip::-webkit-scrollbar { display: none; }
  .dk-kg, .dk-gl { display: contents; }
  .dk-kg > b { flex: 0 0 auto; align-self: center; width: auto; padding: 0 3px 16px 10px; }
  .dk-kg:first-child > b { padding-left: 0; }
  .dk-g { flex: 0 0 auto; width: 50px; }
  .dk-g img { width: 36px; height: 36px; }
}
/* 阵容详情（stats.js，用户 10-15） */
.st-luhead { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 6px 0; }
.st-luhead b { font-size: 16px; }
.st-gens.big img { width: 40px; height: 54px; border-radius: 5px; }
.st-rate.lo { color: var(--red-ink, #93301b); }
.st-rate.hi { color: var(--green-ink, #1d5f50); }
.st-more { margin-left: 6px; color: var(--muted); font-size: 12px; }
.st-table th.wrap { white-space: normal; }
.st-luact { margin: 14px 0 4px; }
/* 过五关斩六将（trek.js，用户 10-15） */
.tk-box { max-width: 980px; }
.tk-box h3 { margin: 10px 0 6px; font-size: 17px; }
.tk-box h4 { margin: 10px 0 4px; font-size: 14px; }
.tk-path { display: flex; gap: 4px; list-style: none; padding: 0; margin: 4px 0 8px; overflow-x: auto; }
.tk-path li { position: relative; flex: 1 0 88px; min-width: 88px; padding: 6px 6px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); font-size: 12px; color: var(--muted); }
.tk-path li b { display: inline-block; width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 50%; background: var(--sunk); margin-right: 4px; color: var(--text); }
.tk-path li span { white-space: nowrap; }
.tk-path li em { position: absolute; right: 4px; bottom: 2px; font-style: normal; font-size: 10px; padding: 0 4px; border-radius: 6px; background: #f4e1b8; color: #7a4f10; }
.tk-path li .tk-ev { position: absolute; left: 6px; bottom: 2px; font-style: normal; font-size: 10px; color: #8a5a1a; }
.tk-path li.done { opacity: .6; }
.tk-path li.done b { background: #c9b48a; color: #fff; }
.tk-path li.cur { border-color: #b98a3e; box-shadow: 0 0 0 2px rgba(185, 138, 62, .35); color: var(--text); background: linear-gradient(#fffaf0, var(--panel2)); }
.tk-path li.cur b { background: #b98a3e; color: #fff; }
.tk-life { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 2px 0 8px; }
.tk-life span { display: inline-block; width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 6px; font-family: var(--font-title); font-size: 14px; color: #fff; background: linear-gradient(#5f8b6c, #3f6a4e); }
.tk-life span.lost { background: linear-gradient(#c0563f, #8f2e1d); opacity: .8; }
.tk-life small { margin-left: 6px; color: var(--muted); }
.tk-gens { display: inline-flex; gap: 4px; vertical-align: middle; }
.tk-g { display: inline-flex; flex-direction: column; align-items: center; font-size: 11px; }
.tk-g img { width: 30px; height: 40px; object-fit: cover; border-radius: 4px; }
.tk-gens.big .tk-g img { width: 46px; height: 62px; }
.tk-cards { display: flex; flex-direction: column; gap: 6px; margin: 4px 0; }
.tk-cg > b { font-size: 12px; }
.tk-cg > b small { color: var(--muted); font-weight: 400; }
.tk-cl { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.tk-c { position: relative; display: inline-block; }
.tk-c img { width: 40px; height: 56px; object-fit: cover; border-radius: 4px; display: block; }
.tk-c i { position: absolute; right: 1px; bottom: 1px; font-style: normal; font-size: 11px; font-weight: 700; padding: 0 3px; border-radius: 4px; background: rgba(0, 0, 0, .65); color: #fff; }
.tk-c.can { cursor: pointer; }
.tk-c.can:hover img { outline: 2px solid #b98a3e; }
.tk-c.off { opacity: .35; }
.tk-offers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tk-offer { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--panel2); display: flex; flex-direction: column; gap: 6px; }
.tk-offer > button { align-self: flex-start; }
.tk-offers.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tk-reroll { justify-content: center; }
/* 闯关：人机会拿到的礼物、小换一手（用户 10-15） */
.tk-aig { display: flex; flex-direction: column; gap: 4px; margin: 2px 0; }
.tk-aig > b { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tk-aigift { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); }
.tk-aigift .tk-gift { margin: 0; }
.tk-aigift b { font-size: 13.5px; }
.tk-aigift em { margin-left: 6px; font-style: normal; font-size: 11.5px; color: var(--muted); }
.tk-aigift small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; line-height: 1.45; }
.tk-swap { margin: 0 6px 0 0; padding: 0 7px; font-size: 11.5px; line-height: 18px; min-height: 0; }
.tk-boss .tk-swap { margin-left: 6px; }
.tk-swapped { margin: 6px 0; font-size: 13px; color: #6a4614; }
.tk-stat { font-size: 13px; }
.tk-edit-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; border-radius: 8px; background: var(--sunk); font-size: 13px; }
.tk-stage { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--panel2); }
.tk-foe { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-foe small { color: var(--muted); }
.tk-win { font-size: 13px; margin: 6px 0; }
.tk-word, .tk-tag { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 8px; border-radius: 10px; font-size: 12px; border: 1px solid #c9a55a; background: #fbf1da; color: #6a4614; }
.tk-tag { border-color: var(--line); background: var(--panel); color: var(--text); }
.tk-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.tk-opt { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); }
.tk-opt.elite { border-color: #b98a3e; background: linear-gradient(#fffaf0, var(--panel)); }
.tk-opt small { color: var(--muted); }
.tk-opt button { align-self: flex-start; }
.tk-boss { margin: 6px 0; padding: 6px 8px; border-radius: 8px; background: linear-gradient(90deg, rgba(185, 60, 40, .12), transparent); }
.tk-boss small { display: block; color: var(--muted); }
.tk-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 6px 0; }
.tk-picks.ev { grid-template-columns: 1fr; }
.tk-pk { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px; text-align: left; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.tk-pk b { font-size: 15px; }
.tk-pk small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.tk-pk.on { border-color: #b98a3e; box-shadow: 0 0 0 2px rgba(185, 138, 62, .4); background: #fffaf0; }
.tk-pk.art { background: linear-gradient(160deg, var(--panel) 40%, rgba(150, 90, 200, .12)); }
.tk-pk.ev { flex-direction: row; font-size: 14px; }
.tk-gc { text-align: left; cursor: pointer; }
.tk-gc small { color: #5a4a3a; font-size: 12px; }
.tk-why { margin-left: 6px; font-size: 12px; color: #8a5a1a; font-weight: 400; }
.tk-genpick { display: flex; gap: 6px; flex-wrap: wrap; }
.tk-genpick button { padding: 4px 8px; border-radius: 8px; }
.tk-genpick button.on { border-color: #b98a3e; box-shadow: 0 0 0 2px rgba(185, 138, 62, .4); }
.tk-build { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; font-size: 13px; }
.tk-build b { margin-right: 6px; }
.tk-gift { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 8px; border-radius: 10px; font-size: 12px; border: 1px solid #9aa6b2; background: #eef1f4; color: #3d4752; }
.tk-gift.gold { border-color: #c9a55a; background: #fbf1da; color: #6a4614; }
.tk-gift.prism { border-color: #b97bff; background: #f4ecff; color: #5b2f8a; }
.tk-result .winner.lose { color: var(--red-ink, #93301b); }
.tk-deck, .tk-log { margin: 6px 0; font-size: 13px; }
.tk-deck summary, .tk-log summary { cursor: pointer; color: var(--muted); }
.tk-log div { padding: 1px 0; color: var(--muted); }
.tk-quit { text-align: right; margin-top: 6px; }
.tk-quit.ask { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px 8px; padding: 8px 10px; border-radius: 8px; border: 1px dashed var(--red); background: var(--red-bg); }
.tk-quit.ask span { flex: 1 1 220px; text-align: left; font-size: 13px; color: var(--text2); }
.tk-rules p { margin: 4px 0; font-size: 13.5px; line-height: 1.6; }
.tk-stats { margin: 8px 0; font-size: 13px; }
.tk-achs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 6px 0; }
.tk-achs > b { margin-right: 4px; font-size: 13px; }
.tk-ach { padding: 1px 8px; border-radius: 10px; font-size: 12px; border: 1px dashed var(--line); color: var(--muted); }
.tk-ach.got { border-style: solid; color: #6a4614; background: #fbf1da; border-color: #c9a55a; }
.tk-ach.got.r-l { background: linear-gradient(90deg, #fff1c9, #ffe2a8); }
.tk-recent { font-size: 12.5px; color: var(--muted); margin: 6px 0; }
.tk-recent b.win, .tk-end.win b { color: #2d6b45; }
.tk-end { padding: 8px 10px; border-radius: 8px; background: var(--sunk); margin-bottom: 8px; }
.tk-end small { display: block; color: var(--muted); }
.ai-tag.trek { cursor: pointer; background: linear-gradient(#fff4dc, #f1d9a6); color: #6a4614; border-color: #b98a3e; }
@media (max-width: 640px) {
  .tk-offers, .tk-offers.n3, .tk-choice { grid-template-columns: 1fr; }
  .tk-path li { flex-basis: 70px; min-width: 70px; }
  .tk-picks { grid-template-columns: 1fr; }
  .tk-c img { width: 34px; height: 48px; }
}
/* 过五关斩六将：大厅栏目，和人机对战同一种方框（用户 10-15） */
.lb-form.tk-form { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.tk-lb-state { font-size: 13px; color: var(--text); min-width: 0; }
.tk-lb-state small { margin-right: 8px; color: var(--muted); }
/* 过五关擂台（用户 10-17）：大厅栏目里一行、闯关页一块、擂台页 */
.tk-lb-arena { display: block; width: 100%; margin: 6px 0 0; padding: 5px 10px; text-align: left; font-size: 12.5px; color: #6a4614; border: 1px solid #d9c08a; border-radius: 8px; background: #fbf1da; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-lb-arena small { margin-right: 8px; color: #8a5a1a; font-weight: 600; flex: none; }
.tk-lb-arena { display: flex; align-items: baseline; }
.tk-lb-st { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tk-lb-rw { flex: none; margin-left: 8px; font-style: normal; font-weight: 600; color: #8a5a1a; }
.tk-arena { margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid #d9c08a; background: #fbf1da; font-size: 13px; color: #6a4614; }
.tk-arena.can { border-color: #b98a3e; box-shadow: 0 0 0 2px rgba(185, 138, 62, .25); }
.tk-arena-top { margin-bottom: 4px; }
.tk-arena-top small { display: block; color: #8a6a3a; }
.tk-arena-top b.win { color: #2d6b45; }
.tk-arena-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
/* 擂台奖励（过五关里的宣传，用户 10-17）：皮肤小图 + 称号 + 五铢；mini = 闯关页擂台栏下面那一行 */
.ar-rw { margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid #d9c08a; background: #fffaf0; }
.ar-rw-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; margin-bottom: 6px; }
.ar-rw-h b { color: #8a5a1a; }
.ar-rw-h small { color: var(--muted); }
.ar-rw-items { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ar-rw-it { display: flex; align-items: center; gap: 9px; flex: 1 1 210px; min-width: 0; }
.ar-rw-it > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ar-rw-it b { font-size: 13px; color: #6a4614; }
.ar-rw-it small { font-size: 12px; line-height: 1.45; color: #6a4614; }
.ar-rw-img { flex: none; width: 56px; aspect-ratio: 894 / 1248; border-radius: 4px; box-shadow: 0 1px 5px rgba(58, 22, 90, .35); cursor: zoom-in; }
.ar-rw .tt { vertical-align: -2px; }
.ar-rw.mini { margin: 6px 0 0; padding: 6px 0 0; border: none; border-top: 1px dashed #d9c08a; border-radius: 0; background: none; }
.ar-rw.mini .ar-rw-img { width: 34px; }
.ar-rw.mini .ar-rw-it { flex-basis: 230px; gap: 7px; }
.ar-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; margin-bottom: 8px; }
.ar-head b { font-size: 16px; }
.ar-head small { color: var(--muted); }
.ar-king { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 10px; border: 1px solid #b98a3e; background: linear-gradient(#fffaf0, var(--panel)); }
.ar-king.empty { border-style: dashed; background: var(--panel2); }
.ar-king.empty small { color: var(--muted); }
.ar-kh { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.ar-kh small { color: var(--muted); font-size: 12px; }
.ar-crown { padding: 1px 8px; border-radius: 10px; font-size: 12px; color: #fff; background: linear-gradient(#c9973e, #8a5a1a); }
.ar-kstat { display: flex; gap: 14px; font-size: 13px; }
.ar-kstat b { color: #8a5a1a; }
.ar-me { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: var(--sunk); font-size: 13px; }
.ar-me > span { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; flex: 1 1 260px; }
.ar-me small { color: var(--muted); }
.ar-me.ask { border: 1px dashed #b98a3e; background: #fffaf0; }
.ar-why { margin: 8px 0; }
.ar-rules { margin: 6px 0; font-size: 13px; }
.ar-rules summary { cursor: pointer; color: var(--muted); }
.ar-rules p { margin: 4px 0; line-height: 1.6; }
.ar-list { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 0; font-size: 13px; }
.ar-list > b { font-size: 13px; }
.ar-row { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); }
.ar-row.mine { border-color: #c9a55a; background: #fffaf0; }
.ar-row small { margin-left: 6px; color: var(--muted); }
.ar-when, .ar-no { margin-right: 6px; color: var(--muted); font-size: 12px; }
.ar-res { color: var(--text2); }
.ar-res b.win { color: #2d6b45; }
.ar-recs { display: flex; flex-wrap: wrap; gap: 4px; }
.ar-tired { color: #8a5a1a; font-size: 12px; }
.ar-list > b small { margin-left: 6px; font-weight: 400; color: var(--muted); font-size: 12px; }
.tk-ban { margin: 0; padding: 3px 8px; border-radius: 8px; font-size: 12px; color: var(--red-ink, #93301b); background: var(--red-bg, #fbe9e4); }
/* 我的皮肤（skins.js，用户 10-15）：按系列 / 按武将看，卡片点进详情（原画和每套皮肤的大图并排）；没解锁的灰掉；发放的标「新」 */
.pop-box.sk-box { width: min(1040px, 100%); }
.sk-warn { color: var(--red-ink, #a33a2a); }
/* 上新橱窗：一排大图 */
.sk-show { margin: 4px 0 10px; padding: 8px 10px 10px; border-radius: 12px; border: 1px solid var(--gold-l); background: linear-gradient(180deg, rgba(232, 196, 112, .26), rgba(232, 196, 112, .05)); }
.sk-show-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-bottom: 6px; }
.sk-show-h b { white-space: nowrap; }
.sk-show-h b { font-size: 17px; letter-spacing: 3px; color: var(--gold-ink); }
.sk-show-h small { font-size: 12px; color: var(--muted); }
.sk-show-row { display: flex; gap: 14px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x mandatory; }
.sk-show-card { position: relative; flex: 0 0 auto; width: 176px; text-align: center; scroll-snap-align: start; }
.sk-show-card img { display: block; width: 100%; aspect-ratio: 450 / 628; object-fit: cover; border-radius: 10px; cursor: zoom-in; background: var(--panel2); box-shadow: 0 6px 16px rgba(60, 40, 10, .22); transition: transform .2s; }
.sk-show-card img:hover { transform: translateY(-3px); }
.sk-show-card.on img { box-shadow: 0 0 0 2px var(--gold), 0 6px 16px rgba(60, 40, 10, .25); }
.sk-show-card b { display: block; margin-top: 6px; font-size: 13px; color: var(--text); }
.sk-show-card small { display: block; margin-bottom: 4px; font-size: 11px; color: var(--muted); }
.sk-show-on { display: inline-block; font-size: 12px; font-weight: 600; color: var(--gold-ink); }
.sk-show-card .sk-new { position: absolute; top: 6px; left: 6px; }
/* 获得新皮肤（进大厅弹一次） */
.pop-box.sk-gift-box { width: min(980px, 100%); border-top-color: var(--gold); }
.sk-gift-set + .sk-gift-set { margin-top: 12px; }
.sk-gift-h { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 8px; padding-left: 9px; border-left: 3px solid var(--gold); }
.sk-gift-h b { font-size: 16px; letter-spacing: 2px; color: var(--gold-ink); }
.sk-gift-h small { font-size: 12px; color: var(--muted); }
.sk-gift-h button { margin-left: auto; }
.sk-gift-cards { display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 8px; }
.sk-gift-card { flex: 0 0 auto; width: 210px; text-align: center; animation: sk-rise .55s cubic-bezier(.2, .7, .3, 1) both; animation-delay: calc(var(--i, 0) * .09s); }
.sk-gift-card img { display: block; width: 100%; aspect-ratio: 450 / 628; object-fit: cover; border-radius: 12px; background: var(--panel2); box-shadow: 0 8px 22px rgba(60, 40, 10, .28); }
.sk-gift-card b { display: block; margin: 6px 0 4px; font-size: 14px; color: var(--text); }
@keyframes sk-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sk-gift-card { animation: none; } }
.sk-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.sk-bar input[type=search] { flex: 1 1 140px; min-width: 120px; max-width: 220px; padding: 4px 8px; }
.sk-count { margin-left: auto; font-size: 12px; color: var(--muted); }
.sk-list { padding: 2px; }   /* 整个弹窗一起滚（上新橱窗滚上去，下面挑选的地方更大） */
.sk-ser, .sk-gen { margin: 0 0 14px; }
.sk-ser-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 6px 0 6px 9px; border-left: 3px solid var(--gold); margin-bottom: 6px; }
.sk-ser-h b { font-size: 15px; color: var(--text); }
.sk-ser-h small { color: var(--muted); font-size: 12px; }
.sk-how { font-size: 12px; padding: 0 6px; border-radius: 6px; background: var(--panel2); color: var(--gold-ink); }
.sk-prog { font-size: 12px; color: var(--muted); }
.sk-ser-btns { margin-left: auto; display: flex; gap: 6px; }
/* 按武将：抽屉（电脑两列、手机一列；点开是这名武将每张有皮肤的牌，一排「原画 + 各款皮肤」） */
.sk-drawers { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 8px; align-items: start; }
.sk-dr { border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); overflow: hidden; }
.sk-dr.open { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-l) inset; }
.sk-dr-h { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; border: none; border-radius: 0; background: none; cursor: pointer; text-align: left; }
.sk-dr-h:hover { background: var(--panel2); }
.sk-dr-h img { width: 40px; aspect-ratio: 180 / 251; object-fit: cover; border-radius: 4px; flex: none; background: var(--panel2); }
.sk-dr-t { display: flex; flex-direction: column; min-width: 0; }
.sk-dr-t b { font-size: 14px; color: var(--text); }
.sk-dr-t small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-dr-arrow { margin-left: auto; font-style: normal; font-size: 12px; color: var(--gold-ink); white-space: nowrap; }
.sk-dr-body { padding: 4px 10px 8px; border-top: 1px dashed var(--line); background: var(--panel); }
.sk-row { padding: 6px 0; }
.sk-row + .sk-row { border-top: 1px dashed var(--line); }
.sk-row-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.sk-row-h small { font-size: 12px; color: var(--muted); }
.sk-row-h button { margin-left: auto; padding: 0 8px; font-size: 12px; }
.sk-row-opts { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.sk-o { position: relative; flex: 0 0 auto; width: 108px; padding: 0; border: 2px solid transparent; border-radius: 9px; background: none; cursor: pointer; text-align: center; }
.sk-o img { display: block; width: 100%; aspect-ratio: 180 / 251; object-fit: cover; border-radius: 7px; background: var(--panel2); }
.sk-o b { display: block; font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-o span { display: block; min-height: 14px; font-size: 10px; line-height: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-o.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-l) inset, 0 0 8px rgba(214, 160, 60, .45); }
.sk-o.on span { color: var(--gold-ink); font-weight: 600; }
.sk-o.lock img { filter: grayscale(1) brightness(.85); opacity: .6; }
.sk-o .sk-new { position: absolute; top: 4px; left: 4px; }
.sk-gen h4 { margin: 4px 0 6px; padding-left: 9px; border-left: 3px solid var(--gold); color: var(--text); }
.sk-gen h4 small { margin-left: 8px; font-weight: 400; font-size: 12px; color: var(--muted); }
.sk-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.sk-tile { position: relative; display: block; padding: 0; border: 2px solid transparent; border-radius: 9px; background: none; cursor: pointer; min-width: 0; text-align: center; }
.sk-tile img { display: block; width: 100%; aspect-ratio: 180 / 251; object-fit: cover; border-radius: 7px; background: var(--panel2); }
.sk-tile span { display: block; font-size: 12px; color: var(--text); padding-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-tile span small { margin-left: 3px; color: var(--muted); font-size: 10px; }
.sk-tile.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-l) inset, 0 0 8px rgba(214, 160, 60, .45); }
.sk-tile > i { position: absolute; top: 4px; right: 4px; font-style: normal; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 6px; background: var(--gold); color: #fff; max-width: calc(100% - 8px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sk-tile .sk-cnt { position: absolute; right: 4px; top: 4px; font-size: 10px; font-weight: 600; padding: 0 5px; border-radius: 6px; background: rgba(0, 0, 0, .55); color: #fff; }
.sk-tile > i.sk-use { top: auto; right: 4px; left: 4px; bottom: 22px; text-align: center; }
.sk-tile.lock img { filter: grayscale(1) brightness(.85); opacity: .6; }
.sk-tile .sk-lk { display: block; font-size: 10px; color: var(--muted); line-height: 1.3; }
.sk-new { font-style: normal; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 6px; background: var(--red); color: #fff; }
.sk-tile .sk-new, .sk-opt .sk-new { position: absolute; top: 4px; left: 4px; }
.sk-ser-h .sk-new, .sk-gift .sk-new { margin-left: 2px; vertical-align: 1px; }
.sk-detail-h { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 10px; }
.sk-detail-h b { font-size: 17px; }
.sk-detail-h small { color: var(--muted); }
.sk-opts { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x mandatory; }
.sk-opt { position: relative; flex: 0 0 auto; width: min(280px, 72vw); padding: 0; border: 2px solid transparent; border-radius: 12px; background: none; cursor: pointer; text-align: center; scroll-snap-align: start; }
.sk-opt img { display: block; width: 100%; aspect-ratio: 450 / 628; object-fit: cover; border-radius: 10px; background: var(--panel2); box-shadow: 0 4px 14px rgba(60, 40, 10, .18); }
.sk-opt b { display: block; margin-top: 6px; font-size: 14px; color: var(--text); }
.sk-opt span { display: block; font-size: 12px; color: var(--muted); }
.sk-opt.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-l) inset, 0 0 10px rgba(214, 160, 60, .5); }
.sk-opt.on span { color: var(--gold-ink); font-weight: 600; }
.sk-opt.lock img { filter: grayscale(1) brightness(.85); opacity: .6; }
/* 图鉴、组卡页：有皮肤的牌右上角的「皮」字小印 */
.sk-mark { position: absolute; top: 3px; right: 3px; z-index: 3; width: 20px; height: 20px; padding: 0; border: none; border-radius: 4px; background: #c23b30; color: #fbeee0; font-size: 12px; line-height: 20px; font-weight: 700; cursor: pointer; opacity: .9; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.sk-mark:hover { opacity: 1; }
.cx-gen .sk-mark, .cx-card .sk-mark { right: auto; left: 7px; top: 7px; }   /* 图鉴右上角是 QA 标签 */
.b-card .sk-mark { top: 8px; right: 8px; }
@media (max-width: 560px) { .sk-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .sk-drawers { grid-template-columns: minmax(0, 1fr); } .sk-o { width: 92px; } .sk-show-card { width: 132px; } .sk-gift-card { width: 160px; } .sk-ser-btns { margin-left: 0; } .sk-count { margin-left: 0; } }
/* ---------- 宽屏两翼（用户 10-15）：左翼 = 对方信息 + 最近卡牌 + 我方信息，右翼 = 大图预览；app.js layout 按屏幕算 --wing（S.wing，0 = 普通布局） ---------- */
.board-col.winged { display: grid; grid-template-columns: var(--wing) minmax(0, 1fr) var(--wing-r, var(--wing)); grid-template-rows: minmax(0, 1fr) auto; }
.winged > .wing-l { grid-column: 1; grid-row: 1 / span 2; }
.winged > .board-wrap { grid-column: 2; grid-row: 1; }
.winged > .tray { grid-column: 2; grid-row: 2; grid-template-columns: minmax(0, 1fr); background: none; border-top: none; box-shadow: none; padding: 0 14px 8px; }
.winged > .tray .tray-hand { align-items: center; }
.winged > .tray .hand { padding: 6px 12px; border-radius: 12px; background: linear-gradient(180deg, var(--tray1), var(--tray2)); border: 1px solid var(--tray-line); box-shadow: inset 0 5px 8px -6px rgba(90, 60, 20, .4); }
.winged > .wing-r { grid-column: 3; grid-row: 1 / span 2; }
.wing { display: flex; flex-direction: column; gap: 10px; padding: 10px; min-width: 0; min-height: 0; overflow: hidden; }
.wing-l { padding-left: 36px; }                 /* 左边缘留给「令」「聊天」两个小标签 */
.wing-me { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.wing-me .acts { padding: 0 2px; }
body.with-side.wings #modal:not(.mini), body.with-side.wings #pop { right: calc(var(--side) + var(--wing)); }   /* 弹窗不盖住右翼的大图预览 */
/* 信息卡：名字大一号，战功区的城池、手牌 / 牌堆 / 弃牌三格数字放大，对方的手牌画成一排卡背 */
.pstrip.ps-wing { width: auto; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 8px; padding: 10px 10px 11px; border-radius: 12px; }
.ps-wing .ps-name { white-space: normal; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.ps-wing .ps-name b { font-family: var(--font-title); font-size: clamp(16px, calc(var(--wing) * .075), 20px); letter-spacing: 1px; }   /* 两翼窄（220 起）时跟着缩 */
.ps-wing .ps-name .tmr { margin-left: auto; align-self: center; }
.ps-wing .ps-score { gap: 6px; }
.ps-wing .ps-score .cities { gap: 5px; }
.ps-wing .ps-score .cities b { width: clamp(14px, calc(var(--wing) * .075), 20px); height: clamp(14px, calc(var(--wing) * .075), 20px); border-radius: 4px; }
.ps-wing .ps-score > b { font-size: 16px; }
.ps-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pstrip .ps-tiles > * { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; padding: 3px 0 2px; border-radius: 8px; background: var(--sunk); border: 1px solid var(--line); color: var(--text); line-height: 1.2; font-size: 13px; }
.ps-tiles b { font-size: 19px; }
.ps-tiles small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.ps-backs { display: flex; padding-left: 12px; height: 46px; overflow: hidden; }
.ps-backs img { width: 32px; height: 45px; margin-left: -12px; border-radius: 3px; object-fit: cover; box-shadow: 0 1px 3px rgba(60, 40, 10, .35); }
/* 最近卡牌竖排 */
.recent-bar.rb-v { flex: 1 1 auto; min-height: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--strip-bg); overflow: hidden; }
.recent-bar.rb-v.closed { flex: none; padding: 0; }
.rb-v .rb-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 5px 12px; border-bottom: 1px solid var(--line); }
.rb-v.closed .rb-head { border-bottom: none; }
.rb-v .rb-head b { flex-shrink: 0; font-family: var(--font-title); font-size: 16px; letter-spacing: 2px; color: var(--text2); white-space: nowrap; }
.rb-v .rb-head small { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.rb-v .rb-head .rb-toggle { flex-shrink: 0; margin-left: auto; }
.rb-v .rb-list { flex: 1; min-height: 0; flex-direction: column; overflow-x: hidden; overflow-y: auto; padding: 6px 8px 8px; gap: 6px; }
.rb-v .rb-list .hint { margin: 4px; }
.rb-v .rb-item { max-width: none; padding: 3px 8px 3px 3px; gap: 8px; }
.rb-v .rb-item img, .rb-v .rb-gift { width: 40px; height: 56px; }
.rb-v .rb-item span { font-size: 12.5px; line-height: 1.35; }
.rb-v .rb-item span b { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.rb-v .rb-item span i:first-of-type { font-size: 14px; font-weight: 700; color: var(--text); }
/* 右翼的大图预览：卡图占满宽度（太高时按屏幕高度缩），文字在下面 */
.wing-r .pvbox { flex: 0 1 auto; min-height: 0; max-height: none; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.wing-r .pvbox .pv-top { flex-direction: column; align-items: stretch; }
.wing-r .pvbox .pv-img { width: auto; max-width: 100%; max-height: 58vh; align-self: center; }
.wing-r .pvbox .pv-text { margin-top: 8px; }

/* ---------- 武将状态（用户 10-15：玩家说将的状态看不清）：负面实心红、护盾实心蓝、关键词蓝框、加成绿框、已鼓舞金框、其他灰框 ---------- */
.slot { width: calc(var(--rail) + var(--h) + var(--iw)); }
.slot.empty .sq { margin-left: calc(var(--rail) + var(--h) * .1415); }
.chips > [hidden] { display: none !important; }
.chips i.stb { display: inline-flex; align-items: baseline; gap: 3px; font-size: 11.5px; font-weight: 600; line-height: 18px; padding: 0 5px; border-radius: 5px; letter-spacing: .3px; }
.chips i.stb small { font-size: 10px; font-weight: 400; opacity: .9; letter-spacing: 0; }
.stb.neg { background: #b8402e; color: #fff; }
.stb.shield { background: #2f6db0; color: #fff; }
.stb.kw { background: var(--panel); color: var(--blue-ink); box-shadow: inset 0 0 0 1px var(--blue); }
.stb.buff { background: var(--panel); color: var(--green-ink); box-shadow: inset 0 0 0 1px var(--green); }
.stb.gold { background: linear-gradient(#fff3cf, #f3dc9c); color: #6a4a08; box-shadow: inset 0 0 0 1px #c9a24a; }
.stb.grey { background: var(--sunk); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line2); }
/* 电脑：卡图左边的状态栏，一个状态一块，限时的下面写到什么时候；放不下 fitChips 收成「多状态 +N」 */
.rail { width: var(--rail); height: var(--h); flex-shrink: 0; display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 3px; padding: 4px 0 4px 4px; overflow: hidden; }
.rail.chips i.stb { flex-shrink: 0; flex-direction: column; align-items: center; gap: 0; padding: 2px 1px; text-align: center; white-space: normal; line-height: 1.15; font-size: max(12px, calc(var(--h) * .088)); font-weight: 700; }
.rail.chips i.stb small { font-size: max(9px, calc(var(--h) * .064)); line-height: 1.1; margin-top: 1px; white-space: nowrap; }
.rail.chips i.c-more { flex-shrink: 0; font-size: max(11px, calc(var(--h) * .08)); line-height: 1.4; padding: 0 1px; text-align: center; }
.rail.chips i.c-more b { margin-left: 0; }
.uinfo > .un { flex-shrink: 0; }
body:not(.mobile) .uinfo .un { font-size: max(12px, calc(var(--h) * .095)); }
body:not(.mobile) .uinfo .pips b { width: max(9px, calc(var(--h) * .085)); height: max(9px, calc(var(--h) * .085)); }
body:not(.mobile) .uinfo .chips { gap: 3px; }
body:not(.mobile) .uinfo .chips i.stb { font-size: max(11.5px, calc(var(--h) * .08)); line-height: 1.5; }
body.mobile .chips i.stb { font-size: 9px; padding: 0 2px; line-height: 13px; font-weight: 600; letter-spacing: 0; }
body.mobile .chips i.stb small { display: none; }
/* 宝物：两件以内带名字（放不下 fitEquips 去掉名字） */
.equips .eq { display: inline-flex; align-items: center; gap: 4px; min-width: 0; cursor: pointer; }
.equips.named { flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 3px; }
.equips.named .eq { max-width: 100%; }
.equips.named img { width: max(16px, calc(var(--h) * .19)); }
.equips.named .eq b { font-size: 12px; font-weight: 600; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 卡面提示：护盾 = 卡图外一圈蓝光；昏迷 / 冻结 = 卡图上一条横带，冻结再蒙一层冷色（横置时跟着卡转） */
.slot .sq .ah { z-index: 2; }
.sq .shield-ring { position: absolute; z-index: 1; top: -3px; left: calc(var(--h) * .1415 - 3px); width: calc(var(--h) * .717 + 6px); height: calc(var(--h) + 6px); border-radius: 9px; pointer-events: none; transition: transform .25s;
  box-shadow: 0 0 0 2px #5aa2e6, 0 0 10px 2px rgba(90, 162, 230, .75), inset 0 0 8px rgba(160, 210, 255, .9); }
.sq .frost { position: absolute; z-index: 1; top: 0; left: calc(var(--h) * .1415); width: calc(var(--h) * .717); height: var(--h); border-radius: 6px; pointer-events: none; transition: transform .25s;
  background: linear-gradient(160deg, rgba(200, 235, 255, .55), rgba(120, 180, 230, .25) 45%, rgba(210, 240, 255, .5)); box-shadow: inset 0 0 10px rgba(255, 255, 255, .9); }
.slot.tapped .shield-ring, .slot.tapped .frost { transform: rotate(90deg); }
.ctl-band { position: absolute; z-index: 2; left: 0; right: 0; top: 26%; overflow: hidden; white-space: nowrap; text-align: center; font-weight: 800; font-size: max(12px, calc(var(--h) * .12)); letter-spacing: 3px; color: #fff; padding: 1px 0; pointer-events: none; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
body.mobile .ctl-band { letter-spacing: 1px; }
.ctl-band.stun { background: linear-gradient(90deg, rgba(196, 120, 20, 0), rgba(196, 120, 20, .92) 20%, rgba(196, 120, 20, .92) 80%, rgba(196, 120, 20, 0)); }
.ctl-band.freeze { background: linear-gradient(90deg, rgba(50, 120, 190, 0), rgba(50, 120, 190, .92) 20%, rgba(50, 120, 190, .92) 80%, rgba(50, 120, 190, 0)); }
.ctl-band.both { background: linear-gradient(90deg, rgba(196, 120, 20, 0), rgba(196, 120, 20, .92) 20%, rgba(50, 120, 190, .92) 80%, rgba(50, 120, 190, 0)); }
.mui-row.mui-check { cursor: pointer; }
.mui-row.mui-check input { flex: none; }
.mui-row.mui-check span { width: auto; }
.mui-check + .mui-hint { margin-left: 24px; }
/* 手机上信息区一个也放不下、只有一个标签时贴在卡图角上的那一个：保持它原来的颜色 */
.chips i.c-more.one.neg { color: #fff; background: #b8402e; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.chips i.c-more.one.shield { color: #fff; background: #2f6db0; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.chips i.c-more.one.kw { color: var(--blue-ink); } .chips i.c-more.one.buff { color: var(--green-ink); } .chips i.c-more.one.gold { color: var(--gold-ink); } .chips i.c-more.one.grey { color: var(--muted); }
/* ---------- 布局选项（用户 10-15，调整界面「布局」页）：大图悬停弹出时只有左翼；手牌自动隐藏 / 浮动；日志浮动窗口；右侧栏空了就收起 ---------- */
.lay-row .seg { flex: none; }
.lay-row .seg button { padding: 3px 10px; }
/* 手牌自动隐藏：托盘收到棋盘底下，只露出一条把手；鼠标移上去（或钉住、选中了牌、要选手牌时）升起来，盖在棋盘上 */
.board-col.hand-auto { position: relative; }
.board-col.hand-auto > .board-wrap { padding-bottom: 36px; }
.tray.auto { position: absolute; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; padding: 0 14px 8px; background: none; border: none; box-shadow: none;
  pointer-events: none; transform: translateY(calc(100% - 28px)); transition: transform .2s ease .25s; }
.winged > .tray.auto { grid-column: 2; grid-row: 1 / span 2; align-self: end; padding: 0 14px 8px; }
.tray.auto > * { pointer-events: auto; }
.tray.auto.show { transform: none; transition-delay: 0s; }
.hand-handle { flex: none; display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 18px; border-radius: 12px 12px 0 0; border: 1px solid var(--tray-line); border-bottom: none;
  background: linear-gradient(180deg, var(--tray1), var(--tray2)); color: var(--text2); font-size: 12.5px; white-space: nowrap; cursor: pointer; box-shadow: 0 -3px 8px rgba(60, 40, 10, .14); }
.hand-handle .arr { font-style: normal; display: inline-block; transition: transform .2s; }
.tray.auto.show .hand-handle .arr { transform: rotate(180deg); }
.side.only-panel .side-panel { flex: 1 1 auto; max-height: none; }   /* 右侧栏只剩操作区：占满整列 */
.hand-handle.hot { color: #3a2604; background: linear-gradient(180deg, #ffe7a6, #e7c25e); border-color: #b48a2c; }
.tray.auto .tray-hand { max-width: 100%; min-width: min(420px, 100%); padding: 2px 12px 6px; border-radius: 12px; border: 1px solid var(--tray-line); background: linear-gradient(180deg, var(--tray1), var(--tray2));
  box-shadow: 0 10px 28px rgba(40, 20, 0, .32); }
.tray.auto .hbar { text-align: center; }
/* 手牌浮动窗口 */
#float-hand { position: fixed; z-index: 34; max-width: calc(100vw - 16px); padding: 0 10px 8px; border-radius: 14px; border: 1px solid var(--tray-line); background: linear-gradient(180deg, var(--tray1), var(--tray2));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 55%, transparent), 0 12px 34px rgba(40, 20, 0, .3); }
#float-hand.hidden { display: none; }
#float-hand.dragging { opacity: .9; }
#float-hand.min .tray-hand { display: none; }
#float-hand .fh-head { display: flex; align-items: center; gap: 8px; height: 30px; cursor: move; user-select: none; font-size: 12.5px; color: var(--text2); white-space: nowrap; }
#float-hand .fh-head.hot b { color: var(--gold-ink); }
#float-hand .fh-head small { color: var(--muted); }
#float-hand .fh-head button { margin-left: auto; }
#float-hand .hand { max-width: calc(100vw - 40px); }
/* 日志浮动窗口：拖标题行移动，拖右下角改大小 */
#float-log { position: fixed; z-index: 33; display: flex; flex-direction: column; width: 320px; height: 260px; min-width: 220px; min-height: 110px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px);
  resize: both; overflow: hidden; border-radius: 12px; border: 1px solid var(--line2); background: color-mix(in srgb, var(--log-bg) 90%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 10px 30px rgba(40, 20, 0, .25); }
#float-log.hidden { display: none; }
#float-log.dragging { opacity: .9; }
#float-log .fl-head { flex: none; display: flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; border-bottom: 1px solid rgba(150, 120, 70, .2); cursor: move; user-select: none; }
#float-log .fl-head b { letter-spacing: 2px; color: var(--text2); }
#float-log .fl-head small { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
#float-log .fl-head button { flex: none; font-size: 11.5px; padding: 1px 7px; }
#float-log .log { flex: 1; min-height: 0; }
/* 浮动操作区也能拖右下角改大小 */
#float-panel { resize: both; min-width: 260px; min-height: 120px; }
@supports (color: color-mix(in srgb, red 50%, transparent)) {
  body.alpha-on #float-hand { --tray1: color-mix(in srgb, var(--tray1-o) var(--a-tray), transparent); --tray2: color-mix(in srgb, var(--tray2-o) var(--a-tray), transparent); }
  body.alpha-on .tray.auto { --tray1: color-mix(in srgb, var(--tray1-o) var(--a-tray), transparent); --tray2: color-mix(in srgb, var(--tray2-o) var(--a-tray), transparent); }
}

/* ---------- 比赛区（cup.js，用户 10-15）：大厅栏目和人机 / 闯关同样式；比赛页是宽弹窗 ---------- */
.lb-form.cup-form-lb { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
.lb-myno { font-size: 12px; color: var(--muted); white-space: nowrap; }
.lb-myno b { color: var(--text2); font-weight: 600; margin: 0 2px; letter-spacing: .5px; }
.cup-box { max-width: 980px; }
.cup-box .pop-head { gap: 8px; flex-wrap: wrap; }
.cup-box h4 { margin: 12px 0 4px; font-size: 14px; color: var(--text2); }
.cup-st { display: inline-block; font-size: 12px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--line2); color: var(--muted); background: var(--sunk); white-space: nowrap; }
.cup-st.st-reg { border-color: rgba(42, 125, 107, .45); color: var(--green-ink); background: var(--green-bg); }
.cup-st.st-live { border-color: rgba(181, 67, 42, .4); color: var(--red-ink); background: var(--red-bg); }
.cup-st.st-done { border-color: var(--line2); color: var(--muted); }
.cup-me { font-size: 12px; color: var(--hl); margin-left: 6px; }
.cup-mines { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; }
.cup-mine { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 10px; border: 1px solid var(--gold); border-radius: 10px; background: linear-gradient(var(--panel), var(--panel2)); font-size: 13px; }
.cup-mine.staff { border-color: var(--line2); }
.cup-mine b { font-size: 14px; }
.cup-mine span { color: var(--muted); }
.cup-mine .cup-go { color: var(--hl); font-weight: 600; }
.cup-mine button { margin-left: auto; }
.cup-mine button + button { margin-left: 0; }
.cup-ltabs, .cup-tabs { margin: 6px 0 8px; flex-wrap: wrap; }
.cup-ltabs small { margin-left: 4px; opacity: .75; }
.cup-list { display: flex; flex-direction: column; gap: 6px; }
.cup-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.cup-item-main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cup-item-main b { font-size: 15px; }
.cup-item small { grid-column: 1; color: var(--muted); }
.cup-item button { grid-row: 1 / 3; grid-column: 2; }
.cup-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); margin: 2px 0 4px; align-items: center; }
.cup-meta b { color: var(--text); letter-spacing: 1px; }
.cup-dot { display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 11px; line-height: 16px; text-align: center; }
.cup-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; background: var(--panel); display: flex; flex-direction: column; gap: 6px; }
.cup-card > b { font-size: 15px; }
.cup-card ul { margin: 0; padding-left: 20px; font-size: 13px; color: var(--text2); }
.cup-card li { margin: 2px 0; }
.cup-card.me { border-color: var(--gold); background: linear-gradient(var(--panel), var(--panel2)); }
.cup-card.me.go { border-width: 2px; }
.cup-card.me > button { align-self: flex-start; }
.cup-card .ok { color: var(--green-ink); font-weight: 600; }
.cup-desc { white-space: pre-wrap; font-size: 14px; line-height: 1.6; color: var(--text); }
.cup-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 12px; }
.cup-form label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.cup-form label small { font-size: 11px; color: var(--muted); }
.cup-form label.wide, .cup-form h4 { grid-column: 1 / -1; }
.cup-form label.chk { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px 6px; color: var(--text); }
.cup-form label.chk small { flex-basis: 100%; padding-left: 22px; }
.cup-form textarea { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; }
.cup-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; }
.cup-row input[type=number] { width: 72px; }
.cup-row label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.cup-row .hint { margin: 0; }
.cup-no { display: inline-block; min-width: 18px; padding: 0 4px; margin-right: 4px; border-radius: 5px; background: var(--sunk); border: 1px solid var(--line2); font-style: normal; font-size: 12px; text-align: center; color: var(--text2); }
.cup-round { margin: 6px 0 12px; }
.cup-rhead { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding-bottom: 4px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.cup-rhead b { font-family: var(--font-title); font-size: 17px; }
.cup-rhead small { color: var(--muted); flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cup-table { display: grid; grid-template-columns: 54px minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; margin: 4px 0; background: var(--panel); font-size: 13px; }
.cup-table.mine { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(184, 134, 46, .3); }
.cup-table.st-play { background: linear-gradient(90deg, var(--red-bg), var(--panel) 40%); }
.cup-table.st-done { background: var(--panel2); }
.cup-table.st-void { opacity: .55; }
.cup-tno { font-family: var(--font-title); font-size: 15px; }
.cup-vs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; }
.cup-vs > em { font-style: normal; color: var(--muted); }
.cup-first { font-style: normal; font-size: 10px; padding: 0 3px; border-radius: 4px; background: #f4e1b8; color: #7a4f10; margin-left: -2px; }
.cup-tst { color: var(--text2); min-width: 0; }
.cup-tst .ok { color: var(--green-ink); }
.cup-tbtn { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.cup-tbtn button.on { background: linear-gradient(var(--pri1), var(--pri2)); color: var(--pri-text); }
.cup-ops { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; padding: 8px; margin-top: 2px; border-top: 1px dashed var(--line2); }
.cup-op { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.cup-op > span:first-child { min-width: 72px; color: var(--muted); }
.cup-op input { min-width: 120px; flex: 1; max-width: 240px; }
.cup-bye { font-size: 13px; color: var(--muted); margin: 4px 0; }
/* 轮空的 ✕ / 给没桌的人记轮空（用户 10-17）、编号组桌预览里「算轮空」的勾选 */
.cup-byex { padding: 0 6px; margin-left: 2px; line-height: 1.4; }
.cup-byeadd select { margin: 0 4px; max-width: 180px; }
.cup-pvmiss { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.cup-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.cup-tbl th, .cup-tbl td { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.cup-tbl th { color: var(--muted); font-weight: 600; background: var(--panel2); }
.cup-tbl tr.me td { background: var(--green-bg); }
.cup-champ { font-size: 11px; padding: 0 6px; border-radius: 8px; background: linear-gradient(#fff5cc, #e3b24f); color: #4a2806; border: 1px solid #8a5d17; }
.cup-pv { border: 1px dashed var(--gold); border-radius: 8px; padding: 8px 10px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; background: var(--sunk); }
.cup-pv em { font-style: normal; color: var(--muted); margin: 0 4px; }
.cup-app { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; margin: 4px 0; background: var(--panel); font-size: 13px; }
.cup-app > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cup-app.dup { border-color: var(--red); }
.cup-app small { color: var(--muted); overflow-wrap: anywhere; }
.cup-app .cup-info { color: var(--text2); }
/* 比赛套牌：看牌表 / 换了哪些牌（展开），比赛桌准备页的「不能换」说明 */
.cup-dkd { font-size: 12px; }
.cup-dkd summary { cursor: pointer; color: var(--blue); }
.cup-dkd small { display: block; color: var(--muted); overflow-wrap: anywhere; margin-top: 2px; }
.cup-dklock { margin: 6px 0; }
/* 主办方消息（用户 10-17）：一条一块，上面小字「时间 · 谁发的 → 发给谁」 */
.cup-msg1 { padding: 6px 0 4px; border-top: 1px dashed var(--line); }
.cup-msg1:first-of-type { border-top: 0; }
.cup-msg1 small { color: var(--muted); }
.cup-msgs { margin-top: 8px; font-size: 13px; }
.cup-msgs summary { cursor: pointer; color: var(--blue); }
.cup-app-btn { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-start; justify-content: flex-end; flex-shrink: 0; max-width: 50%; }
.cup-staff { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; margin: 4px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.cup-perms { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13px; flex-basis: 100%; }
.cup-perms label { display: inline-flex; align-items: center; gap: 4px; }
.cup-log { font-size: 13px; display: flex; flex-direction: column; gap: 3px; max-height: 60vh; overflow: auto; }
.cup-log small { color: var(--muted); }
.ai-tag.cup { background: rgba(184, 134, 46, .16); color: var(--gold-ink); border-color: rgba(184, 134, 46, .5); cursor: pointer; }
.topbar .ai-tag.cup { background: rgba(232, 196, 112, .2); color: var(--top-acc); border-color: rgba(232, 196, 112, .6); }
.cup-form .cup-row { grid-column: 1 / -1; }
.cup-tno { white-space: nowrap; }
.cup-rlabel { color: var(--text2); margin-right: 2px; }
.cup-round.ko .cup-rhead > b { color: var(--gold-ink); }
.cup-clk { font-variant-numeric: tabular-nums; margin: 0 2px; }
.cup-clk.run { color: var(--red-ink); }
.topbar .cup-clk.run { color: #fff; }
.cup-row label small { font-size: 11px; }
/* 比赛区的亮出区（用户 10-15）：横图做横幅 / 方图做旗帜卡，下面一排战队旗帜 + 交流群二维码；比赛列表里那一项用比赛旗帜做淡淡的底图；点开看大图 */
.cup-show { margin: 2px 0 8px; display: flex; flex-direction: column; gap: 8px; }
.cup-banner { display: block; width: 100%; height: 150px; object-fit: cover; border-radius: 10px; border: 1px solid var(--gold); cursor: zoom-in; }
.cup-hero { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 1px solid var(--gold); border-radius: 10px; background: linear-gradient(90deg, var(--panel2), var(--panel)); }
.cup-hero > img { width: 104px; height: 104px; object-fit: cover; border-radius: 8px; border: 1px solid var(--gold); cursor: zoom-in; box-shadow: 0 2px 8px rgba(60, 40, 10, .18); flex-shrink: 0; }
.cup-hero-t b { display: block; font-family: var(--font-title); font-size: 22px; letter-spacing: 2px; }
.cup-hero-t small { color: var(--muted); }
.cup-hero-t { flex: 1; min-width: 0; }
.cup-hero .cup-qr { margin-left: auto; }
@media (max-width: 640px) { .cup-hero { flex-wrap: wrap; } .cup-hero .cup-qr { margin-left: 0; flex-basis: 100%; } }
.cup-show-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cup-teams { display: flex; gap: 10px; flex-wrap: wrap; }
.cup-teams figure { margin: 0; text-align: center; cursor: zoom-in; }
.cup-teams img { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line2); box-shadow: 0 1px 3px rgba(60, 40, 10, .15); }
.cup-teams figcaption { font-size: 12px; color: var(--muted); margin-top: 2px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cup-qr { display: flex; gap: 10px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: zoom-in; }
.cup-qr img { width: 84px; height: 84px; display: block; background: #fff; }
.cup-qr b { display: block; font-size: 14px; }
.cup-qr small { color: var(--muted); font-size: 12px; }
.cup-item { position: relative; overflow: hidden; }
.cup-item-bg { position: absolute; top: 0; right: 0; bottom: 0; width: 48%; background-size: cover; background-position: center; opacity: .5; -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); mask-image: linear-gradient(90deg, transparent, #000 70%); pointer-events: none; }
.cup-item > :not(.cup-item-bg) { position: relative; }
.cup-lbl { min-width: 84px; color: var(--muted); }
.cup-th { position: relative; display: inline-block; }
.cup-th img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line2); display: block; cursor: zoom-in; background: #fff; }
.cup-th button { position: absolute; top: -6px; right: -6px; padding: 0 5px; font-size: 11px; line-height: 16px; border-radius: 8px; }
.cup-tm { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.cup-tm small { font-size: 11px; color: var(--muted); max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cup-showedit input { width: 140px; }
.cup-lb { position: fixed; inset: 0; z-index: 300; background: rgba(20, 14, 6, .78); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; cursor: zoom-out; }
.cup-lb img { max-width: min(92vw, 900px); max-height: 82vh; object-fit: contain; border-radius: 8px; background: #fff; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.cup-lb small { color: #f2e8d3; text-align: center; }
@media (max-width: 640px) {
  .cup-banner { height: 96px; }
  .cup-hero > img { width: 76px; height: 76px; }
  .cup-hero-t b { font-size: 18px; }
  .cup-qr img { width: 64px; height: 64px; }
  .cup-table { grid-template-columns: auto minmax(0, 1fr); }
}
.cup-gobar { position: fixed; top: 6px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 10px; background: var(--panel); border: 2px solid var(--gold); box-shadow: 0 6px 20px rgba(60, 40, 10, .3); font-size: 14px; max-width: calc(100vw - 24px); flex-wrap: wrap; }
@media (max-width: 640px) {
  .lb-form.cup-form-lb { grid-template-columns: minmax(0, 1fr) auto; }
  .lb-form.cup-form-lb .tk-lb-state { grid-column: 1 / -1; }
  .cup-table { grid-template-columns: auto minmax(0, 1fr); }
  .cup-tst { grid-column: 1 / -1; }
  .cup-tbtn { grid-column: 1 / -1; justify-content: flex-start; }
  .cup-app { flex-direction: column; }
  .cup-app-btn { max-width: none; justify-content: flex-start; }
  .cup-item { grid-template-columns: minmax(0, 1fr); }
  .cup-item button { grid-row: auto; grid-column: 1; justify-self: start; }
}

/* 个人资料（用户 10-16，public/profile.js）：用户选的版式 B —— 电脑上左右两栏（左：名片 + 拿手武将，右：战绩 / 成就 / 皮肤 / 闯关），手机上一列。颜色都用主题变量（夜间配色跟着变） */
.pf-box.pf-b { width: min(1060px, 96vw); }
.pf-link { cursor: pointer; }
.pf-link:hover { color: var(--hl); text-decoration: underline; text-underline-offset: 3px; }
.pf-foot { display: flex; justify-content: flex-end; margin-top: 4px; }
.pf-sec { margin: 10px 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.pf-sec h4 { margin: 0 0 8px; font-size: 14px; color: var(--text); }
.pf-sec h4 small { margin-left: 6px; font-weight: 400; color: var(--muted); font-size: 12px; }
.pf-off h4 { margin-bottom: 2px; }
.pf-off small { color: var(--muted); font-size: 12.5px; }
.pf-id { border-color: var(--gold); background: linear-gradient(115deg, var(--panel) 45%, rgba(212, 168, 79, .16)); }
.pf-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-name > b { font-size: 24px; font-family: var(--font-title); letter-spacing: 2px; color: var(--text); }
.pf-sub { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.pf-sub b { color: var(--gold-ink); font-weight: 500; }
.pf-dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: var(--line2); vertical-align: 1px; }
.pf-dot.on { background: #4aa577; box-shadow: 0 0 0 3px rgba(74, 165, 119, .18); }
.pf-tools { display: flex; justify-content: flex-end; margin: -2px 0 2px; }
.pf-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; text-align: center; }
.pf-nums > div { padding: 6px 0; border-radius: 8px; background: var(--sunk); }
.pf-nums b { display: block; font-size: 20px; line-height: 1.2; color: var(--gold-ink); font-variant-numeric: tabular-nums; }
.pf-nums small { color: var(--muted); font-size: 12px; }
.pf-recent { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pf-recent small { color: var(--muted); font-size: 12px; }
.pf-recent span { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.pf-wl { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; font-style: normal; font-size: 12px; color: #fff; }
.pf-wl.w { background: #3f8c62; }
.pf-wl.l { background: #b25640; }
.pf-glist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pf-g { text-align: center; min-width: 0; }
.pf-gart { position: relative; }
.pf-gart img { display: block; width: 100%; aspect-ratio: 5 / 7; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 3px 10px rgba(60, 40, 10, .22); }
.pf-rk { position: absolute; left: 50%; top: -9px; transform: translateX(-50%); padding: 1px 9px; border-radius: 10px; white-space: nowrap; font-style: normal; font-size: 11.5px; color: #4a3008; background: linear-gradient(#fff0c2, #e8c26a); border: 1px solid #b98a3e; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.pf-g b { display: block; margin-top: 5px; font-size: 14px; }
.pf-g small { color: var(--muted); font-size: 12px; }
.pf-rcs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.pf-rc { padding: 1px 9px; border-radius: 10px; font-size: 12px; border: 1px solid var(--line); color: var(--muted); background: var(--sunk); }
.pf-rc.r-x, .pf-rc.r-l { border-color: #c9a55a; color: var(--gold-ink); }
.pf-tts { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 6px; }
.pf-sks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.pf-sks.all { margin-top: 8px; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
.pf-sk { position: relative; min-width: 0; padding: 0; border: 0; background: none; text-align: center; }
.pf-sk img { display: block; width: 100%; aspect-ratio: 5 / 7; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); box-shadow: 0 1px 5px rgba(60, 40, 10, .18); }
.pf-sk small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-sk.empty i { display: block; aspect-ratio: 5 / 7; border: 1px dashed var(--line2); border-radius: 6px; background: var(--sunk); }
.pf-sks.pick .pf-sk { cursor: pointer; }
.pf-sks.pick .pf-sk.on img { outline: 3px solid var(--gold); outline-offset: 1px; }
.pf-pin { position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-size: 12px; color: #4a3008; background: #f0d07e; border: 1px solid #b98a3e; }
.pf-tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.pf-sws { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; font-size: 13.5px; }
.pf-sw input { margin-right: 4px; vertical-align: -1px; }
.pf-edit { border-color: var(--gold); }
.pf-two { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 0 14px; align-items: start; }
.pf-b .pf-glist { grid-template-columns: 1fr 1fr; }
.pf-b .pf-g:first-child { grid-column: 1 / -1; }
.pf-b .pf-g:first-child .pf-gart { width: 78%; margin: 0 auto; }
@media (max-width: 760px) {
  .pf-two { grid-template-columns: 1fr; }
  .pf-b .pf-glist { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pf-b .pf-g:first-child { grid-column: auto; }
  .pf-b .pf-g:first-child .pf-gart { width: 100%; }
  .pf-nums b { font-size: 17px; }
  .pf-sks { gap: 5px; }
}

/* ---------- 五铢（coins.js，用户 10-16）：昵称那行的余额、大厅「五铢」栏目、明细弹窗、结算那一行、闯关里花五铢 ---------- */
/* 五铢钱：方孔圆钱，金和称号同一个材质（浅金高光 → 金 → 暗金），方孔透出底色 */
.coin-i { display: inline-block; position: relative; flex: none; width: 1.05em; height: 1.05em; border-radius: 50%; vertical-align: -.16em;
  background: radial-gradient(circle at 34% 30%, #fff3c9 0 16%, #e9c46a 44%, #b2802a 82%, #8a5d18 100%);
  box-shadow: inset 0 0 0 1px rgba(110, 72, 12, .55), 0 1px 2px rgba(80, 50, 10, .25); }
.coin-i::after { content: ''; position: absolute; left: 50%; top: 50%; width: 30%; height: 30%; transform: translate(-50%, -50%);
  background: var(--coin-hole, var(--panel)); box-shadow: 0 0 0 1px rgba(110, 72, 12, .65); }
.coin-chip { display: inline-flex; align-items: center; gap: 6px; position: relative; padding: 5px 12px; border-radius: 999px; font-weight: 700; color: var(--gold-ink); --coin-hole: var(--btn1); }
.coin-chip .coin-i { font-size: 16px; }
.coin-chip .nt-dot { position: absolute; top: -2px; right: -2px; margin: 0; }
.lb-form.coin-form { display: block; }
.coin-top { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.coin-bal { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: none; box-shadow: none; color: var(--gold-ink); font: inherit; cursor: pointer; }
.coin-bal:hover:not(:disabled) { background: none; }
.coin-bal b { font-family: var(--font-title); font-size: 24px; line-height: 1; }
.coin-bal small { color: var(--muted); font-size: 13px; }
.coin-bal .coin-i { font-size: 22px; }
.coin-bal.big b { font-size: 30px; } .coin-bal.big .coin-i { font-size: 28px; }
.coin-today { flex: 1; min-width: 170px; font-size: 13px; color: var(--muted); }
.coin-mult { color: var(--red-ink); font-weight: 700; }
.coin-tasks { display: grid; gap: 6px; margin-top: 12px; }
.coin-sub { color: var(--muted); font-size: 12px; }
.coin-task { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--sunk); border: 1px solid var(--line); font-size: 13px; }
.coin-task small { color: var(--muted); }
.coin-task > b { color: var(--gold-ink); }
.coin-task.done { opacity: .62; }
.coin-task.done .coin-task-n { text-decoration: line-through; text-decoration-color: var(--line2); }
.coin-shop { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 10px; border-radius: 8px; border: 1px dashed var(--line2); color: var(--muted); font-size: 13px; }
.coin-shop b { color: var(--text2); font-family: var(--font-title); font-size: 15px; letter-spacing: 2px; }
.coin-shop b, .coin-shop button { flex-shrink: 0; white-space: nowrap; }   /* 手机上窄：「商店」和「去看看」别折成两行（10-16 花朝上架） */
.coin-shop span { flex: 1; min-width: 0; }
.coin-res { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 8px; margin: 6px 0 2px; color: var(--gold-ink); font-size: 14px; --coin-hole: var(--panel); }
.coin-res small { color: var(--muted); }
.coin-box { max-width: 660px; }
.coin-h { margin: 16px 0 6px; font-size: 14px; color: var(--text2); }
.coin-log td.coin-in { color: var(--green-ink); font-weight: 700; }
.coin-log td.coin-out { color: var(--red-ink); font-weight: 700; }
.coin-rules { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.tk-buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 10px; padding: 8px 10px; border-radius: 8px; background: var(--sunk); border: 1px solid var(--line); font-size: 13px; }
.tk-buy small { margin-left: 8px; color: var(--muted); }
@media (max-width: 560px) { .coin-task { grid-template-columns: 1fr auto auto; } .coin-task button { grid-column: 1 / -1; justify-self: end; } }
.coin-log th:nth-child(2), .coin-log td:nth-child(2) { text-align: left; }

/* 手机大厅分页（用户 10-16 选的方案 1，public/lobbytabs.js）：大厅一栏时底部四个标签。只搬位置，各块还是原来的样式；标签条和栏目标题一样用金色强调 */
.lt-page { display: none; }
.lt-page.on { display: block; }
.lobby[data-paged] { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
.lobby[data-paged] > .sub { display: none; }
.lobby[data-paged] .lt-page > .lt-sec:first-child > .lb-head, .lobby[data-paged] .lt-mecard { margin-top: 12px; }
.lt-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--panel); border-top: 1px solid var(--gold); box-shadow: 0 -3px 12px rgba(60, 40, 10, .12); padding-bottom: env(safe-area-inset-bottom); }
.lt-nav button { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 0; padding: 8px 0 9px; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--muted); }
.lt-nav button b { position: relative; font-size: 15px; font-weight: 600; letter-spacing: 2px; color: var(--text2); }
.lt-nav button small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.lt-nav button.on { background: linear-gradient(rgba(212, 168, 79, .18), transparent 75%); box-shadow: inset 0 3px 0 var(--gold); }
.lt-nav button.on b { color: var(--gold-ink); }
.lt-badge { position: absolute; top: -7px; left: 100%; margin-left: 1px; display: none; padding: 0 5px; border-radius: 8px; font-style: normal; font-weight: 500; font-size: 10px; line-height: 15px; letter-spacing: 0; white-space: nowrap; }
.lt-badge.n { display: inline-block; color: #fff; background: var(--red, #c4553b); }
.lt-badge.q { display: inline-block; color: var(--green-ink); background: var(--green-bg); border: 1px solid var(--green); }
.lt-badge.c { display: inline-block; color: var(--muted); background: var(--panel2); border: 1px solid var(--line); }
.lt-badge.dot { display: inline-block; top: -2px; width: 8px; height: 8px; padding: 0; border-radius: 50%; background: var(--red, #c4553b); }
.lt-sec > .lb-head h3 { display: flex; align-items: center; }
.lt-help { margin-left: 8px; min-height: 0; padding: 0 8px; border-radius: 9px; font-size: 11.5px; line-height: 18px; font-weight: 400; color: var(--muted); background: var(--panel2); border: 1px solid var(--line); box-shadow: none; }
.lt-sec.help .lt-help { color: var(--gold-ink); border-color: var(--gold); }
.lt-sec:not(.help) p.hint { display: none; }
.lt-sec .lb-social p.hint, .lt-sec .mq p.hint { display: block; }
.lt-mecard .lb-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); }
.lt-mecard .lb-links > button, .lt-mecard .lb-links > span > button { width: 100%; }
.lt-mecard .lb-links > span:empty { display: none; }
body.lt-on #toast { bottom: calc(86px + env(safe-area-inset-bottom)); }

/* 公告栏的表态和留言（notice.js，用户 10-16）：夯 / 拉 / 笑 / 哭 / 🐟 是印章一样的小方块（称号的马善政楷书），旁边是人数；
   自己选的那个盖成朱印、外框描金。留言区收在「留言」按钮里，管理员的回复左边一道金线。只用主题变量，夜间配色跟着变 */
.nt-fb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 10px; }
.nt-react { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.nt-fb-side { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nt-r { display: inline-flex; align-items: center; gap: 6px; min-height: 0; padding: 3px 10px 3px 3px; border-radius: 8px; border: 1px solid var(--line); background: var(--sunk); box-shadow: none; color: var(--muted); font-size: 13px; line-height: 1; }
.nt-r:hover:not(:disabled) { border-color: var(--line2); background: var(--panel); }
.nt-r b { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 5px; border: 1px solid var(--line2); background: var(--panel); color: var(--text2); font: 400 17px/1 'KD Title', var(--font-title); }
.nt-r.emo b { font: 400 14px/1 "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.nt-r i { min-width: 1ch; font-style: normal; font-variant-numeric: tabular-nums; }
.nt-r.on { border-color: var(--gold); background: linear-gradient(rgba(232, 196, 112, .32), rgba(232, 196, 112, .1)); color: var(--gold-ink); font-weight: 700; box-shadow: 0 0 0 1px rgba(232, 196, 112, .45) inset; }
.nt-r.on b { border-color: #8a2817; background: #b33a26; color: #fff4e0; box-shadow: 0 1px 2px rgba(120, 30, 10, .3); }   /* 朱砂印：各配色都用同一个颜色 */
.nt-rsum { color: var(--muted); font-size: 12px; }
.nt-fb-side > button.on { border-color: var(--gold); color: var(--gold-ink); }
.nt-cms { margin-top: 10px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--sunk); }
.nt-cm-new { display: flex; align-items: flex-end; gap: 8px; }
.nt-cm-new textarea { flex: 1; min-width: 0; min-height: 46px; padding: 6px 8px; font-family: inherit; font-size: 13.5px; line-height: 1.5; background: var(--input-bg, var(--panel)); }
.nt-cm-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.nt-cm-list > .hint { margin: 2px 0; }
.nt-cm { padding: 6px 10px 7px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); }
.nt-cm-h { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; }
.nt-cm-h b { font-size: 13px; color: var(--text2); }
.nt-cm-h small { color: var(--muted); font-size: 11.5px; }
.nt-cm-del { margin-left: auto; min-height: 0; padding: 0 2px; border: 0; background: none; box-shadow: none; color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.nt-cm-del:hover:not(:disabled) { background: none; color: var(--red-ink); }
.nt-cm p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--text); word-break: break-word; }
.nt-cm.adm { border-color: var(--gold); background: linear-gradient(90deg, rgba(232, 196, 112, .2), var(--panel) 70%); box-shadow: inset 3px 0 0 var(--gold); }
.nt-cm-h b.nt-cm-adm { color: var(--gold-ink); font-weight: 700; }
.nt-adm { padding: 0 6px; border-radius: 4px; border: 1px solid var(--gold); background: rgba(232, 196, 112, .2); color: var(--gold-ink); font-style: normal; font-size: 11px; line-height: 16px; }
.nt-cm-more { align-self: center; }
.nt-re { display: block; margin: 4px 0 0; padding-left: 8px; border-left: 2px solid var(--line2); color: var(--muted); font-size: 12px; line-height: 1.5; word-break: break-word; }
.ml-go { margin: 6px 0 0; }
/* 后台「公告栏」页 */
.nt-adm-fb { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 2px; font-size: 13px; color: var(--text2); }
.nt-adm-r { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.nt-adm-r b { font: 400 16px/1 'KD Title', var(--font-title); color: var(--text2); }
.nt-adm-r.emo b { font: 400 13px/1 "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.nt-adm-fb small { color: var(--muted); }
.nt-adm-cm.adm { background: linear-gradient(90deg, rgba(232, 196, 112, .18), transparent 60%); }
.nt-adm-cms { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.nt-adm-reply textarea { flex: 1; min-width: 220px; font-family: inherit; font-size: 13px; }
.nt-adm-reto { padding: 4px 8px; border-radius: 8px; background: rgba(232, 196, 112, .16); border: 1px dashed var(--gold); }
.nt-adm-cm.reto { box-shadow: inset 3px 0 0 var(--gold); }
/* 后台「反馈」「投稿」页的「共建」按钮（发限定称号「共建者」） */
.adm-builder { border-color: var(--gold); color: var(--gold-ink); font-weight: 600; }

/* 大厅赛事横幅（用户 10-16：先选方案 2，上线后嫌太大，改成方案 3；cup.js promoHTML）：「比赛」栏目里 3:1 的图卡，底下一条小字 + 金色按钮；
   多个横滑（scroll-snap），电脑上悬停出现左右箭头，右上角小圆点 */
#cup-promo:empty { display: none; }
#cup-promo { margin: 0 0 10px; }
.cp { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid rgba(196, 154, 74, .6); box-shadow: 0 2px 10px rgba(60, 40, 10, .14); background: #1d1914; }
.cp-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.cp-track::-webkit-scrollbar { display: none; }
.cp-item { flex: 0 0 100%; scroll-snap-align: start; position: relative; aspect-ratio: 3 / 1; cursor: pointer; }
.cp-pic { position: absolute; inset: 0; display: block; overflow: hidden; background: #241c14; }
.cp-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cp-pic.fit img { position: relative; object-fit: contain; }
.cp-pic.fit .cp-bg { position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); object-fit: cover; filter: blur(18px) brightness(.5); }
.cp-pic.none { display: flex; align-items: center; justify-content: center; padding-bottom: 22px; background: radial-gradient(ellipse at 30% 40%, #4a3520, #1d1610 70%); }
.cp-pic.none b { font-family: var(--font-title); font-size: 28px; letter-spacing: 5px; color: #f0d58c; text-shadow: 0 2px 8px rgba(0, 0, 0, .5); padding: 0 16px; text-align: center; }
.cp-cap { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; gap: 8px; padding: 20px 10px 8px; background: linear-gradient(rgba(16, 12, 8, 0), rgba(16, 12, 8, .72)); color: #f1e4c6; font-size: 12.5px; }
.cp-cap span { min-width: 0; padding: 2px 10px; border-radius: 999px; background: rgba(16, 12, 8, .55); border: 1px solid rgba(240, 213, 140, .35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-cap span b { color: #f0d58c; font-weight: 600; margin-right: 6px; }
.cp-go { margin-left: auto; flex-shrink: 0; font-style: normal; font-size: 13px; font-weight: 600; padding: 3px 13px; border-radius: 999px; border: 1px solid rgba(240, 213, 140, .85); color: #2b1d08; background: linear-gradient(#f6dc96, #d9ad4f); white-space: nowrap; }
.cp-item:hover .cp-go { filter: brightness(1.06); box-shadow: 0 0 10px rgba(240, 200, 110, .45); }
.cp-dots { position: absolute; right: 10px; top: 8px; display: flex; gap: 5px; }
.cp-dots i { width: 7px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .5); box-shadow: 0 0 2px rgba(0, 0, 0, .4); cursor: pointer; transition: width .2s; }
.cp-dots i.on { background: #f0d58c; width: 18px; }
.cp-arrow { position: absolute; top: 42%; transform: translateY(-50%); width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 1px solid rgba(240, 213, 140, .6); background: rgba(20, 15, 10, .5); color: #f3e6c8; font-size: 17px; line-height: 24px; opacity: 0; transition: opacity .2s; }
.cp:hover .cp-arrow { opacity: 1; }
.cp .cp-arrow:hover:not(:disabled) { background: rgba(20, 15, 10, .78); border-color: rgba(240, 213, 140, .95); color: #fff; }
.cp-arrow.l { left: 8px; } .cp-arrow.r { right: 8px; }
@media (max-width: 999px) {
  .cp-cap { padding: 16px 8px 7px; font-size: 11.5px; }
  .cp-go { padding: 3px 10px; font-size: 12px; }
  .cp-pic.none b { font-size: 22px; }
  .cp-arrow { display: none; }
}
/* 后台「大厅横幅」：按 3:1 裁的预览 */
.cp-prev { position: relative; display: inline-block; width: 210px; height: 70px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: #241c14; flex-shrink: 0; }
.cp-prev .cp-pic { height: 100%; }
.cp-prev.none { display: inline-flex; align-items: center; justify-content: center; color: #d9c08a; font-size: 12px; }

/* 对局守卫（用户 10-17，guardwarn.js）：刷战绩的弹窗警告、观察期提示条 —— 和顶部公告的警告样式一样（红边、红底） */
.gd-box { border-top-color: var(--red); }
.gd-box .pop-head b { font-size: 16px; color: var(--red-ink); }
.gd-body { font-size: 14px; line-height: 1.75; margin: 6px 0 10px; color: var(--text); overflow-wrap: anywhere; }
.gd-strip { margin: 8px 0 10px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--red); background: var(--red-bg); color: var(--red-ink); font-size: 13px; line-height: 1.6; }

/* 锦囊（抽卡，用户 10-20，gacha.js）：大厅栏目 + 全屏开锦囊（玄漆底，不跟主题）。稀有度材质沿用称号那套：普通素木 → 稀有银 → 史诗金 → 将皮玄金 → 至臻朱金 */
.jn-stage, .jn-form, .jn-rules { --jn-brush: 'KD Title', "STKaiti", "KaiTi", "Kaiti SC", serif; }
.lb-form.jn-form { display: block; }
/* 大厅栏目（方案二「漆匣」）：玄漆描金的小匣（斜纹锦底、四角金线护角），和开锦囊的场景同一个材质；匣子在米黄、夜间配色下都一样 */
.jn-tray { position: relative; isolation: isolate; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px 12px 8px; border-radius: 9px; color: #e9dcc0;
  background: radial-gradient(130% 150% at 18% 0%, #3a2c1d 0%, #1d160f 52%, #0f0b07 100%);
  box-shadow: inset 0 0 0 1px rgba(216, 178, 94, .6), inset 0 0 0 4px #140f0a, inset 0 0 0 5px rgba(216, 178, 94, .2), 0 4px 12px rgba(40, 25, 8, .22); }
.jn-tray::before { content: ""; position: absolute; inset: 5px; z-index: -1; border-radius: 6px; pointer-events: none;
  background: repeating-linear-gradient(45deg, rgba(216, 178, 94, .055) 0 1px, transparent 1px 11px), repeating-linear-gradient(-45deg, rgba(216, 178, 94, .055) 0 1px, transparent 1px 11px);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .25) 60%); mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .25) 60%); }
.jn-tray::after { content: ""; position: absolute; inset: 7px; pointer-events: none; border-radius: 4px; opacity: .75; background-repeat: no-repeat;
  background: linear-gradient(#d8b25e, #d8b25e) left top / 10px 1px no-repeat, linear-gradient(#d8b25e, #d8b25e) left top / 1px 10px no-repeat, linear-gradient(#d8b25e, #d8b25e) right top / 10px 1px no-repeat, linear-gradient(#d8b25e, #d8b25e) right top / 1px 10px no-repeat,
    linear-gradient(#d8b25e, #d8b25e) left bottom / 10px 1px no-repeat, linear-gradient(#d8b25e, #d8b25e) left bottom / 1px 10px no-repeat, linear-gradient(#d8b25e, #d8b25e) right bottom / 10px 1px no-repeat, linear-gradient(#d8b25e, #d8b25e) right bottom / 1px 10px no-repeat; }
.jn-tl { min-width: 0; }
.jn-pw { position: relative; width: 84px; aspect-ratio: 1; display: grid; place-items: center; margin: 0 auto; }
.jn-pw::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(240, 190, 100, .32), rgba(240, 190, 100, 0)); }
.jn-pw .jn-art { position: relative; width: 52px; margin-top: -3px; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); transform-origin: 50% 20%; }
.jn-form:hover .jn-art { transform: rotate(-4deg); }
.jn-art svg { width: 100%; height: auto; display: block; overflow: visible; }
.jn-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.jn-ring .rb { fill: none; stroke: rgba(216, 178, 94, .2); stroke-width: 3; }
.jn-ring .rf { fill: none; stroke: url(#jn-ringG); stroke-width: 3.2; stroke-linecap: round; filter: drop-shadow(0 0 2px rgba(232, 180, 80, .45)); }
.jn-luck { margin-top: 4px; text-align: center; font-size: 11px; color: #c9b48a; font-variant-numeric: tabular-nums; letter-spacing: .04em; white-space: nowrap; }
.jn-luck b { color: #f3d58a; font-weight: 600; }
.jn-tr { min-width: 0; }
.jn-ttl { display: flex; align-items: baseline; gap: 8px; }
.jn-ttl b { font: 400 27px/1 var(--jn-brush); letter-spacing: .06em; background: linear-gradient(176deg, #fff4cc, #f4d58a 30%, #c39331 55%, #f7de9a 75%, #9a6f22); -webkit-background-clip: text; background-clip: text; color: transparent; }
.jn-ttl span { font-size: 12px; color: #c9b48a; letter-spacing: .25em; white-space: nowrap; }
.jn-ttl .jn-rl, .jn-ttl .jn-rl:hover:not(:disabled) { margin-left: auto; padding: 0; border: 0; background: none; box-shadow: none; font-size: 12px; color: #d8b25e; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.jn-ttl .jn-rl:hover:not(:disabled) { color: #f6dc96; }
.jn-pool { margin: 4px 0 8px; font-size: 12px; color: #a99772; }
.jn-pool i { font-style: normal; color: #e9dcc0; white-space: nowrap; }
.jn-prow { display: grid; grid-template-columns: 2.4em auto minmax(0, 1fr); gap: 8px; align-items: center; font-size: 12.5px; color: #a99772; }
.jn-prow + .jn-prow { margin-top: 4px; }
.jn-prow > span:first-child { color: #d9c69c; }
.jn-prow small { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jn-beads { display: inline-flex; gap: 3px; }
.jn-beads i { width: 8px; height: 8px; border-radius: 50%; background: rgba(216, 178, 94, .08); box-shadow: inset 0 0 0 1px rgba(216, 178, 94, .35); }
.jn-beads i.on { background: radial-gradient(circle at 35% 30%, #fff3c9 0 14%, #e9c46a 45%, #b2802a 90%); box-shadow: 0 0 4px rgba(240, 190, 90, .55); }
.jn-bot { display: grid; gap: 10px; margin-top: 12px; }
.jn-chips, .jn-use { display: flex; flex-wrap: wrap; gap: 6px; }
.jn-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 6px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.jn-chip b { color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.jn-ic { display: inline-block; width: 15px; height: 15px; flex: none; vertical-align: -2px; }
.jn-btns { display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px; }
.jn-btns button { position: relative; display: inline-flex; justify-content: center; align-items: baseline; gap: 6px; }
.jn-form .jn-btns button { grid-column: auto; }                       /* 手机上 .lb-form button 会占满一行：这两个并排 */
.jn-btns small { font-weight: 400; opacity: .75; font-size: 12px; }
.jn-tag9 { position: absolute; top: -9px; right: -7px; font: 400 12px/1 var(--jn-brush); font-style: normal; padding: 3px 5px 2px; color: #fbe4a6; border-radius: 2px; transform: rotate(6deg);
  background: linear-gradient(#b4422a, #7a1d12); box-shadow: inset 0 0 0 1px rgba(240, 207, 124, .6), 0 1px 3px rgba(0, 0, 0, .25); }
.jn-note { margin: 0; font-size: 12px; color: var(--muted); }
@media (max-width: 420px) { .jn-tray { grid-template-columns: 76px minmax(0, 1fr); gap: 10px; } .jn-pw { width: 70px; } .jn-pw .jn-art { width: 44px; } .jn-ttl b { font-size: 23px; } .jn-prow small { display: none; } }
@media (prefers-reduced-motion: reduce) { .jn-pw .jn-art { transition: none; } }
/* 概率与规则：漆底题头 + 五档一行一行 */
.pop-box.jn-rules { padding: 0; border-top: 0; }
.jn-band { position: sticky; top: 0; z-index: 1; display: flex; align-items: baseline; gap: 10px; padding: 14px 16px 12px; color: #e9dcc0;
  background: radial-gradient(130% 160% at 15% 0%, #3a2c1d 0%, #1d160f 55%, #0f0b07 100%); box-shadow: inset 0 -1px 0 rgba(216, 178, 94, .6), inset 0 -4px 0 #140f0a, inset 0 -5px 0 rgba(216, 178, 94, .25); }
.jn-band b { font: 400 26px/1 var(--jn-brush); background: linear-gradient(176deg, #fff4cc, #f4d58a 30%, #c39331 55%, #f7de9a 75%, #9a6f22); -webkit-background-clip: text; background-clip: text; color: transparent; }
.jn-band span { font-size: 12px; letter-spacing: .25em; color: #c9b48a; }
.jn-band em { margin-left: auto; font-style: normal; font-size: 12px; color: #c9b48a; white-space: nowrap; }
.jn-band .jn-x, .jn-band .jn-x:hover:not(:disabled) { align-self: center; color: #f0d999; border-color: rgba(216, 178, 94, .6); background: linear-gradient(#2b2118, #18120c); }
.jn-band .jn-x:hover:not(:disabled) { filter: brightness(1.15); }
.jn-rb { padding: 12px 16px 16px; display: grid; gap: 10px; }
.jn-rb .jn-h { margin: 6px 0 0; font-size: 14px; color: var(--text2); }
.jn-lead { margin: 0; font-size: 13.5px; color: var(--text2); }
.jn-tiers { display: grid; gap: 6px; }
.jn-trw { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 8px; background: var(--sunk); border: 1px solid var(--line); }
.jn-trw .jn-tg { text-align: center; font-size: 15px; }
.jn-trx { min-width: 0; }
.jn-trx b { font-size: 16px; font-variant-numeric: tabular-nums; }
.jn-trx small { display: block; font-size: 12px; color: var(--muted); }
.jn-trg { display: grid; justify-items: end; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.jn-trg b { color: var(--text2); }
.jn-rules .jn-tg.jn-t1, .jn-rules .jn-tg.jn-t2, .jn-rules .jn-tg.jn-t3 { background-color: #1c150d; }   /* 浅色弹窗上：素木 / 银 / 金的签垫一块玄漆底 */
.jn-pit { display: grid; gap: 6px; }
.jn-rules .jn-prow { grid-template-columns: 4.2em auto minmax(0, 1fr); color: var(--muted); }
.jn-rules .jn-prow > span:first-child { color: var(--text2); }
.jn-rules .jn-prow small { white-space: normal; }
.jn-rules .jn-beads i { background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line2); }
.jn-rules .jn-beads i.on { background: radial-gradient(circle at 35% 30%, #fff3c9 0 14%, #e9c46a 45%, #b2802a 90%); box-shadow: 0 0 0 1px rgba(110, 72, 12, .35); }
.jn-flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.jn-flow i { font-style: normal; color: var(--line2); }
.jn-flow .jn-chip { white-space: normal; }
.jn-ul { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.75; color: var(--text2); }
.jn-pool-l { font-size: 13px; }
.jn-pool-l summary { cursor: pointer; color: var(--text2); }
.jn-pool-l p { margin: 4px 0 0; color: var(--muted); line-height: 1.8; }
.jn-pool-l [data-no]:hover { color: var(--text); text-decoration: underline dotted; text-underline-offset: 3px; }
/* 我的皮肤：锦囊池子里的那款下面一排按钮 */
.sk-optw { flex: 0 0 auto; width: min(280px, 72vw); display: grid; gap: 6px; align-content: start; scroll-snap-align: start; }
.sk-optw .sk-opt { width: 100%; }
.sk-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }

/* 场景 */
.jn-stage[hidden], .jn-stage [hidden] { display: none !important; }
.jn-stage { position: fixed; inset: 0; z-index: 600; overflow: hidden; color: #efe3c8; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
  background: radial-gradient(120% 90% at 50% 36%, #2a2017 0%, #15110c 55%, #0b0907 100%); -webkit-tap-highlight-color: transparent; }
.jn-stage::before, .jn-stage::after { content: ""; position: absolute; pointer-events: none; z-index: 1; }
.jn-stage::before { inset: 8px; border: 1px solid rgba(216, 178, 94, .3); }
.jn-stage::after { inset: 12px; border: 1px solid rgba(216, 178, 94, .12); }
.jn-st-top { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 4px 6px; }
.jn-st-title { font: 400 22px/1 var(--jn-brush); color: #e9cd84; letter-spacing: .06em; }
.jn-st-stat { font-size: 13px; color: #b6a584; font-variant-numeric: tabular-nums; }
.jn-st-mid { position: relative; z-index: 2; display: grid; place-items: center; min-height: 0; }
.jn-pouch { grid-area: 1 / 1; width: min(230px, 48vw, 34vh); position: relative; }
.jn-pouch svg { width: 100%; height: auto; display: block; overflow: visible; position: relative; }
.jn-pl { position: absolute; left: 50%; top: 13%; width: 190%; aspect-ratio: 1; border-radius: 50%; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(.4);
  background: radial-gradient(closest-side, rgba(var(--prgb), .95), rgba(var(--prgb), .35) 38%, rgba(var(--prgb), 0) 72%); mix-blend-mode: screen; }
.jn-prays { position: absolute; left: 50%; top: 13%; width: 330%; aspect-ratio: 1; opacity: 0; pointer-events: none; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(var(--prgb), .22) 0deg 2.5deg, rgba(var(--prgb), 0) 2.5deg 13deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 8%, rgba(0, 0, 0, .5) 35%, transparent 70%); mask-image: radial-gradient(closest-side, #000 8%, rgba(0, 0, 0, .5) 35%, transparent 70%); }
.jn-grid { grid-area: 1 / 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 2.2vw, 22px) clamp(6px, 1.6vw, 16px); align-content: center;
  width: min(100%, 820px); width: min(100%, 820px, calc((100dvh - 300px) * .7154 * 2.5 + 64px)); }
.jn-grid.one { grid-template-columns: minmax(0, 1fr); width: min(62vw, 300px); width: min(62vw, 300px, calc((100dvh - 250px) * .7154)); }
.jn-grid.one .jn-cap { font-size: 15px; }
.jn-grid.dim .jn-card:not(.focus) { opacity: .22; transition: opacity .4s; }
.jn-hint { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; text-align: center; font-size: 13px; letter-spacing: .2em; color: rgba(233, 205, 132, .7); }
.jn-st-bot { position: relative; z-index: 2; display: grid; justify-items: center; gap: 10px; min-height: 52px; padding-top: 8px; }
/* 结算：漆底小牌（新获得、宝石、券），下面按档位数一数 */
.jn-sum { display: grid; gap: 8px; justify-items: center; }
.jn-sumrow { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.jn-gchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 8px; border-radius: 3px; font-size: 13px; color: #e9dcc0; background: linear-gradient(#241c13, #15100b);
  box-shadow: inset 0 0 0 1px rgba(216, 178, 94, .45), inset 0 0 0 3px #15100b, inset 0 0 0 4px rgba(216, 178, 94, .14); }
.jn-gchip b { color: #f6dc96; font-size: 15px; font-variant-numeric: tabular-nums; }
.jn-gchip.zz { background: linear-gradient(#8e2a1a, #4f120a); box-shadow: inset 0 0 0 1px #f0cf7c, inset 0 0 0 3px #4f120a, inset 0 0 0 4px rgba(240, 207, 124, .4); }
.jn-tiny { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: center; font-size: 12px; color: #b6a584; font-variant-numeric: tabular-nums; }
.jn-tiny .jn-tg { font-size: 12px; margin-left: 4px; }
.jn-dupn { margin-left: 8px; }
.jn-acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.jn-stage .jn-sbtn { padding: 8px 18px; border-radius: 4px; cursor: pointer; font-size: 15px; line-height: 1.3; color: #f0d999; border: 1px solid rgba(216, 178, 94, .6);
  background: linear-gradient(#2b2118, #18120c); box-shadow: inset 0 0 0 2px #18120c, inset 0 0 0 3px rgba(216, 178, 94, .18); }
.jn-stage .jn-sbtn.pri { color: #2b1d05; border-color: #a5741f; background: linear-gradient(#ecca78, #c08f34); box-shadow: inset 0 0 0 1px rgba(255, 244, 210, .5); font-weight: 600; }
.jn-stage .jn-sbtn:hover:not(:disabled) { filter: brightness(1.12); border-color: rgba(216, 178, 94, .6); background: linear-gradient(#2b2118, #18120c); }   /* 盖过平台通用的 button:hover */
.jn-stage .jn-sbtn.pri:hover:not(:disabled) { border-color: #a5741f; background: linear-gradient(#ecca78, #c08f34); }
.jn-stage .jn-sbtn.ghost { padding: 5px 12px; font-size: 13px; }
.jn-flash { position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 46%, rgba(255, 242, 210, .95), rgba(255, 214, 150, .4) 40%, transparent 75%); }
.jn-tkfly { position: fixed; z-index: 7; padding: 3px 10px; border-radius: 3px; font-size: 13px; color: #2b1d05; background: linear-gradient(#f2d488, #c99a3c); border: 1px solid #fff0c4; pointer-events: none; white-space: nowrap; }
.jn-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; }
/* 卡牌：背面玄漆描金、中间「锦」，背面边框按稀有度；翻面 */
.jn-card { position: relative; min-width: 0; cursor: pointer; outline: none; }
.jn-card:focus-visible .jn-cw { outline: 2px solid #f0cf7c; outline-offset: 3px; border-radius: 6px; }
.jn-cw { position: relative; aspect-ratio: 450 / 629; container-type: inline-size; perspective: 900px; }
.jn-ci { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .56s cubic-bezier(.2, .75, .25, 1); }
.jn-card.flipped .jn-ci { transform: rotateY(180deg); }
.jn-card.snap .jn-ci { transition: none; }
.jn-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 4.5cqw; overflow: hidden; }
.jn-front { transform: rotateY(180deg); background: #0b0907; }
.jn-front img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; }
.jn-front::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(191, 164, 124, .7); }
.jn-back { background: radial-gradient(120% 85% at 50% 36%, #30251a 0%, #15110c 62%, #0b0907 100%); box-shadow: inset 0 0 0 1px rgba(191, 164, 124, .6); }
.jn-back::before { content: ""; position: absolute; inset: 6.5cqw; border: 1px solid rgba(216, 178, 94, .42); border-radius: 2.4cqw;
  background: repeating-linear-gradient(45deg, rgba(216, 178, 94, .075) 0 1px, transparent 1px 7cqw), repeating-linear-gradient(-45deg, rgba(216, 178, 94, .075) 0 1px, transparent 1px 7cqw); }
.jn-back::after { content: ""; position: absolute; inset: 9cqw; border: 1px solid rgba(216, 178, 94, .18); border-radius: 1.4cqw; }
.jn-emb { position: absolute; left: 50%; top: 50%; z-index: 1; width: 40cqw; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(45deg); display: grid; place-items: center; font-style: normal;
  border: 1px solid rgba(232, 196, 112, .85); background: radial-gradient(circle at 50% 40%, #3b2b19, #1a130c 70%); box-shadow: 0 0 0 2.4cqw #15110c, 0 0 0 calc(2.4cqw + 1px) rgba(232, 196, 112, .4); }
.jn-emb b { transform: rotate(-45deg); font: 400 22cqw/1 var(--jn-brush); background: linear-gradient(170deg, #f6e3a8, #d8b25e 45%, #9a6f22); -webkit-background-clip: text; background-clip: text; color: transparent; }
.jn-aura { position: absolute; inset: -9% -12%; border-radius: 30%; opacity: 0; pointer-events: none; background: radial-gradient(closest-side, rgba(var(--rgb), .55), rgba(var(--rgb), .18) 55%, rgba(var(--rgb), 0)); }
.jn-sweep { position: absolute; inset: 0; pointer-events: none; transform: translateX(-140%); mix-blend-mode: screen;
  background: linear-gradient(105deg, transparent 32%, rgba(var(--sw, 255, 238, 196), 0) 40%, rgba(var(--sw, 255, 238, 196), .8) 50%, rgba(var(--sw, 255, 238, 196), 0) 60%, transparent 68%); }
.jn-sweep.go { animation: jn-sweep .85s cubic-bezier(.3, .1, .3, 1) forwards; }
@keyframes jn-sweep { to { transform: translateX(140%); } }
.jn-t1 { --rgb: 191, 164, 124; } .jn-t2 { --rgb: 226, 232, 242; } .jn-t3 { --rgb: 240, 200, 110; } .jn-t4 { --rgb: 246, 206, 120; } .jn-t5 { --rgb: 240, 128, 72; }
.jn-t2 .jn-back { box-shadow: inset 0 0 0 1px rgba(226, 231, 240, .95), 0 0 0 1px rgba(226, 231, 240, .3); }
.jn-t3 .jn-back { box-shadow: inset 0 0 0 1px rgba(240, 206, 120, 1), 0 0 0 1px rgba(240, 206, 120, .45); }
.jn-t4 .jn-back { box-shadow: inset 0 0 0 1px #f0ce78, inset 0 0 0 3px #0f0b07, inset 0 0 0 4px rgba(240, 206, 120, .75); }
.jn-t5 .jn-back { background: radial-gradient(120% 85% at 50% 36%, #5a2014 0%, #2a110a 60%, #140806 100%); box-shadow: inset 0 0 0 1px #f3d58a, inset 0 0 0 3px #3a0f08, inset 0 0 0 4px rgba(243, 213, 138, .8); }
.jn-t5 .jn-back::before { border-color: rgba(243, 213, 138, .5); background: repeating-linear-gradient(45deg, rgba(243, 200, 120, .1) 0 1px, transparent 1px 7cqw), repeating-linear-gradient(-45deg, rgba(243, 200, 120, .1) 0 1px, transparent 1px 7cqw); }
.jn-t2 .jn-aura { opacity: .45; } .jn-t3 .jn-aura { opacity: .6; }
.jn-t4 .jn-aura { opacity: .75; animation: jn-breathe 2.6s ease-in-out infinite; }
.jn-t5 .jn-aura { opacity: .9; inset: -14% -18%; animation: jn-breathe 1.5s ease-in-out infinite; }
@keyframes jn-breathe { 50% { transform: scale(1.07); opacity: 1; } }
.jn-card.flipped.jn-t1 .jn-aura { opacity: 0; }
.jn-t2 .jn-front::after { box-shadow: inset 0 0 0 1px rgba(226, 231, 240, .95); }
.jn-t3 .jn-front::after { box-shadow: inset 0 0 0 1px #f0ce78, inset 0 0 0 2px rgba(15, 11, 7, .5); }
.jn-t4 .jn-front::after { box-shadow: inset 0 0 0 1px #f0ce78, inset 0 0 0 3px #0f0b07, inset 0 0 0 4px rgba(240, 206, 120, .8); }
.jn-t5 .jn-front::after { box-shadow: inset 0 0 0 1px #f6dc96, inset 0 0 0 3px #5e160c, inset 0 0 0 4px rgba(246, 220, 150, .85); }
.jn-cap { margin-top: 7px; display: grid; justify-items: center; gap: 3px; min-width: 0; opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; font-size: clamp(10.5px, 2.6vw, 13px); line-height: 1.35; color: #efe3c8; }
.jn-card.flipped .jn-cap { opacity: 1; transform: none; }
.jn-l1 { display: flex; gap: 4px; align-items: center; max-width: 100%; }
.jn-tg { font-family: var(--jn-brush, 'KD Title', "STKaiti", "KaiTi", serif); font-size: 1.08em; line-height: 1.5; padding: 0 .45em; border-radius: 2px; white-space: nowrap; }
.jn-t1 .jn-tg, .jn-tg.jn-t1 { color: #dcc7a2; border: 1px solid rgba(191, 164, 124, .55); }
.jn-t2 .jn-tg, .jn-tg.jn-t2 { color: #eef1f6; border: 1px solid rgba(226, 231, 240, .65); background-color: rgba(226, 231, 240, .08); }
.jn-t3 .jn-tg, .jn-tg.jn-t3 { color: #f3d58a; border: 1px solid rgba(240, 206, 120, .8); background-color: rgba(240, 206, 120, .1); }
.jn-t4 .jn-tg, .jn-tg.jn-t4 { color: #f6dc96; background: linear-gradient(#1c150d, #0b0805); border: 1px solid #d8b25e; box-shadow: inset 0 0 0 2px #0b0805, inset 0 0 0 3px rgba(216, 178, 94, .5); padding: .05em .6em; }
.jn-t5 .jn-tg, .jn-tg.jn-t5 { color: #ffe6a8; background: linear-gradient(#a3321f, #5e160c); border: 1px solid #f0cf7c; box-shadow: inset 0 0 0 2px #5e160c, inset 0 0 0 3px rgba(240, 207, 124, .6); padding: .05em .6em; }
.jn-nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jn-bd { font-size: .86em; color: #b6a584; white-space: nowrap; }
.jn-bd.new { color: #f3d58a; }
/* 快捷换上（用户 10-21「抽到新皮肤的时候，点击新皮肤就可以选择快捷使用」）：翻开的卡点一下，卡面下沿出一块玄漆描金的小牌 */
.jn-use { position: absolute; z-index: 3; left: 6cqw; right: 6cqw; bottom: 6cqw; max-width: 200px; margin-inline: auto; display: grid; place-items: center; padding: clamp(4px, 3.5cqw, 9px); border-radius: clamp(4px, 3cqw, 8px);
  background: linear-gradient(rgba(38, 26, 15, .93), rgba(18, 12, 7, .95)); box-shadow: 0 0 0 1px rgba(240, 207, 124, .6), 0 4px 14px rgba(0, 0, 0, .55); animation: jn-use-in .16s ease-out; }
@keyframes jn-use-in { from { opacity: 0; translate: 0 6px; } }
.jn-stage .jn-use-btn, .jn-stage .jn-use-btn:hover:not(:disabled) { width: 100%; margin: 0; padding: clamp(4px, 2.6cqw, 8px) 0; border-radius: clamp(3px, 2.4cqw, 6px); cursor: pointer;
  font-family: inherit; font-size: clamp(11px, 9cqw, 16px); font-weight: 600; line-height: 1.2; letter-spacing: .12em; color: #2b1d05;
  border: 1px solid #a5741f; background: linear-gradient(#f2d488, #c99a3c); box-shadow: inset 0 0 0 1px rgba(255, 244, 210, .5); }
.jn-stage .jn-use-btn:hover:not(:disabled) { filter: brightness(1.08); }
.jn-stage .jn-use-btn:disabled { opacity: .72; cursor: default; }
.jn-use-on { padding: clamp(3px, 2.2cqw, 7px) 0; font-size: clamp(11px, 8.6cqw, 15px); letter-spacing: .12em; color: #f3d58a; white-space: nowrap; }
.jn-seal { position: absolute; z-index: 3; right: 7%; top: 6%; width: 34cqw; aspect-ratio: 1; display: grid; place-items: center; border-radius: 3cqw; pointer-events: none; font-style: normal;
  background: rgba(196, 50, 36, .92); color: #fdeee2; font: 400 24cqw/1 var(--jn-brush); box-shadow: inset 0 0 0 1.4cqw rgba(253, 238, 226, .85), 0 2px 8px rgba(0, 0, 0, .4); transform: rotate(-10deg); }
.jn-ring { position: absolute; left: 50%; top: 50%; width: 120%; aspect-ratio: 1; border-radius: 50%; pointer-events: none; border: 2px solid rgba(255, 226, 160, .95);
  box-shadow: 0 0 18px rgba(255, 196, 110, .7), inset 0 0 18px rgba(255, 196, 110, .45); transform: translate(-50%, -50%) scale(.3); opacity: 0; }
/* 卡池页（用户 10-21「打开商店抽卡之后，记得亮出宣传我的至臻皮肤」）：正中至臻展台（朱金光晕、慢转的光芒衬底），下面心愿进度、保底、开锦囊 */
body.jn-open #pop { z-index: 700; }                                  /* 卡池页上开「概率与规则」：弹窗盖在场景上面 */
body.jn-open #toast { z-index: 710; }
body.jn-open #preview { z-index: 720; }                              /* 锦囊开出来的牌、卡池页的至臻、池子名单：鼠标停住看是哪张牌（用户 10-21） */
.jn-st-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.jn-home { grid-area: 1 / 1; position: relative; isolation: isolate; width: 100%; height: 100%; display: grid; place-items: center; }
.jn-home-glow { position: absolute; z-index: -1; left: 50%; top: 50%; width: min(1100px, 160vw); aspect-ratio: 1.6; translate: -50% -50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(214, 92, 52, .42), rgba(140, 34, 18, .22) 45%, rgba(140, 34, 18, 0) 75%); }
.jn-home-rays { position: absolute; z-index: -1; left: 50%; top: 50%; width: 150vmax; aspect-ratio: 1; translate: -50% -50%; pointer-events: none; opacity: .55; animation: jn-spin 120s linear infinite;
  background: repeating-conic-gradient(from 0deg, rgba(255, 222, 150, .1) 0deg 2.4deg, rgba(255, 222, 150, 0) 2.4deg 13deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .4) 30%, transparent 62%); mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .4) 30%, transparent 62%); }
.jn-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 4vw, 60px); align-items: center; }
.jn-hero-txt { display: grid; gap: 8px; justify-items: start; max-width: 15em; }
.jn-hero-zz { font: 400 clamp(60px, 9vmin, 110px)/1 var(--jn-brush); letter-spacing: .06em; background: linear-gradient(176deg, #fff4cc 0%, #f4d58a 26%, #c39331 52%, #f7de9a 72%, #9a6f22 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(70, 14, 6, .65)) drop-shadow(0 0 18px rgba(255, 186, 110, .4)); }
.jn-hero-sub { font-size: 14px; letter-spacing: .3em; color: #e9cd84; }
.jn-hero-txt p { margin: 0; font-size: 13px; line-height: 1.7; color: #c9b48a; }
.jn-hero-txt p span { display: inline-block; }                       /* 只在逗号处换行 */
/* 至臻轮播（用户 10-23「现在感觉有点臃肿，每个图还显示的特别小…每个卡图独占屏幕，左右切换，各流出一块能看到下一张」）：
   当前这张占满中间那块的高度（容器查询单位 cqh：卡宽 =（高 − 圆点行 − 名牌行）× 卡牌宽高比，最宽 560），两边按 --k / --s / --b 叠在后面露出一截（gacha.js CARPOS）；
   手机上卡宽到 72% 屏宽为止，两边被屏幕边裁成一条。拖动时整排跟着手指（--dx） */
.jn-home { container-type: size; }
.jn-car { position: absolute; inset: 0 0 34px; touch-action: pan-y; user-select: none; -webkit-user-select: none; --cw: min(calc((100cqh - 112px) * .7166), 74cqw, 560px); }
.jn-car .jn-zz { position: absolute; left: 50%; top: 50%; width: var(--cw); margin: 0; display: grid; justify-items: center; gap: 12px; z-index: var(--z, 1); opacity: var(--op, 1);
  transform: translate(-50%, -50%) translateX(calc(var(--cw) * var(--k, 0) + var(--dx, 0px))) scale(var(--s, 1)); filter: brightness(var(--b, 1));
  transition: transform .55s cubic-bezier(.22, .72, .24, 1), opacity .45s, filter .45s; }
.jn-car.drag .jn-zz, .jn-car.nt .jn-zz, .jn-car .jn-zz.jump { transition: none; }
.jn-car.drag { cursor: grabbing; }
.jn-car .jn-zz:not(.cur) { cursor: pointer; }
.jn-car .jn-zz.far { pointer-events: none; }
.jn-zz-card { position: relative; width: 100%; aspect-ratio: 450 / 628; border-radius: 4.5%; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(246, 220, 150, .55), 0 16px 40px rgba(0, 0, 0, .55), 0 0 40px rgba(240, 128, 72, .28); }
.jn-car .jn-zz.cur .jn-zz-card { animation: jn-float 4.4s ease-in-out infinite;
  box-shadow: 0 0 0 1px rgba(246, 220, 150, .8), 0 22px 54px rgba(0, 0, 0, .6), 0 0 70px rgba(240, 128, 72, .4); }
@keyframes jn-float { 50% { translate: 0 -6px; } }
.jn-zz-row { display: flex; align-items: center; justify-content: center; gap: 12px; transition: opacity .35s; }
.jn-car .jn-zz:not(.cur) .jn-zz-row { opacity: 0; pointer-events: none; }
.jn-stage .jn-car-nav, .jn-stage .jn-car-nav:hover:not(:disabled) { position: absolute; top: calc(50% - 30px); z-index: 20; width: 52px; height: 52px; margin: 0; padding: 0; translate: 0 -50%;
  display: grid; place-items: center; border-radius: 50%; cursor: pointer; color: #f3d58a; border: 1px solid rgba(216, 178, 94, .65);
  background: radial-gradient(circle at 50% 35%, rgba(62, 44, 27, .92), rgba(18, 13, 9, .92)); box-shadow: 0 6px 18px rgba(0, 0, 0, .45), inset 0 0 0 3px rgba(18, 13, 9, .9), inset 0 0 0 4px rgba(216, 178, 94, .22); }
.jn-stage .jn-car-nav:hover:not(:disabled) { filter: brightness(1.25); }
.jn-car-nav.prev { left: max(4px, calc(50% - var(--cw) / 2 - 80px)); }
.jn-car-nav.next { right: max(4px, calc(50% - var(--cw) / 2 - 80px)); }
.jn-car-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.jn-car-foot { position: absolute; left: 0; right: 0; bottom: 0; height: 34px; display: flex; align-items: center; justify-content: center; gap: 14px; white-space: nowrap;
  font-size: 12.5px; color: #8f8064; }
.jn-car-zz { font: 400 24px/1 var(--jn-brush); letter-spacing: .08em; background: linear-gradient(176deg, #fff4cc 0%, #f4d58a 30%, #c39331 60%, #f7de9a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 1px 0 rgba(70, 14, 6, .65)); }
.jn-dots { display: inline-flex; align-items: center; gap: 8px; }
.jn-stage .jn-dot, .jn-stage .jn-dot:hover:not(:disabled) { width: 9px; height: 9px; margin: 0; padding: 0; border: 0; border-radius: 1px; rotate: 45deg; cursor: pointer;
  background: rgba(216, 178, 94, .28); box-shadow: inset 0 0 0 1px rgba(216, 178, 94, .55); transition: background .3s, scale .3s, box-shadow .3s; }
.jn-stage .jn-dot.on { background: #f3d58a; scale: 1.3; box-shadow: 0 0 8px rgba(255, 200, 110, .8); }
.jn-car-n { min-width: 3.2em; color: #e9cd84; font-variant-numeric: tabular-nums; }
.jn-zz-card img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; }
.jn-zz.wish .jn-zz-card, .jn-car .jn-zz.wish.cur .jn-zz-card { box-shadow: 0 0 0 2px #f6dc96, 0 18px 44px rgba(0, 0, 0, .55), 0 0 64px rgba(255, 190, 110, .65); }
.jn-zz-mark { position: absolute; top: 7%; right: 0; padding: 4px 9px 3px; font: 400 15px/1 var(--jn-brush); font-style: normal; color: #fbe4a6; border-radius: 2px 0 0 2px;
  background: linear-gradient(#a3321f, #5e160c); box-shadow: inset 0 0 0 1px #f0cf7c, 0 2px 6px rgba(0, 0, 0, .4); }
.jn-zz-plq { display: grid; justify-items: center; gap: 1px; padding: 6px 18px 7px; border-radius: 3px; white-space: nowrap;
  background: linear-gradient(#a3341f, #5f160c); border: 1px solid #efcd7a; box-shadow: inset 0 0 0 2px #5f160c, inset 0 0 0 3px rgba(239, 205, 122, .5), 0 6px 16px rgba(0, 0, 0, .4); }
.jn-zz-plq b { font: 400 clamp(17px, 2.4vmin, 22px)/1.2 var(--jn-brush); color: #fbe4a6; letter-spacing: .12em; }
.jn-zz-plq i { font-style: normal; font-size: 12px; color: #f0cf8c; letter-spacing: .2em; }
.jn-stage .jn-zz-btn, .jn-stage .jn-zz-btn:hover:not(:disabled) { padding: 5px 16px; border-radius: 3px; font-size: 13px; color: #f0d999; cursor: pointer;
  border: 1px solid rgba(216, 178, 94, .6); background: linear-gradient(#2b2118, #18120c); box-shadow: inset 0 0 0 2px #18120c, inset 0 0 0 3px rgba(216, 178, 94, .18); }
.jn-stage .jn-zz-btn:hover:not(:disabled) { filter: brightness(1.15); }
.jn-stage .jn-zz-btn.on, .jn-stage .jn-zz-btn.on:hover:not(:disabled) { color: #2b1d05; font-weight: 600; border-color: #a5741f; background: linear-gradient(#f2d488, #c99a3c); box-shadow: inset 0 0 0 1px rgba(255, 244, 210, .5); }
.jn-zz-own { padding: 5px 0; font-size: 12.5px; letter-spacing: .2em; color: #b6a584; }
.jn-hb { width: min(100%, 1000px); display: grid; gap: 8px; justify-items: center; }
/* 心愿进度、心愿、两个保底并成一行（放不下再折行），省出高度给至臻轮播 */
.jn-hb-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 20px; font-size: 13px; color: #c9b48a; font-variant-numeric: tabular-nums; }
.jn-hb-luck { display: inline-flex; align-items: center; gap: 8px; }
.jn-hb-p small { color: #8f8064; }
.jn-hb-l { color: #e9cd84; letter-spacing: .1em; }
.jn-hb-bar { width: clamp(90px, 15vw, 190px); height: 7px; border-radius: 4px; overflow: hidden; background: rgba(216, 178, 94, .12); box-shadow: inset 0 0 0 1px rgba(216, 178, 94, .35); }
.jn-hb-bar b { display: block; height: 100%; background: linear-gradient(90deg, #a77826, #f6e3a8); box-shadow: 0 0 6px rgba(240, 190, 90, .6); }
.jn-hb-n b { color: #f3d58a; }
.jn-hb-w b { color: #f6dc96; font-weight: 600; }
.jn-hb-w small { color: #8f8064; }
.jn-hb-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.jn-hb-btns .jn-sbtn { position: relative; display: inline-flex; align-items: baseline; justify-content: center; gap: 6px; min-width: 9em; }
.jn-hb-btns .jn-sbtn small { font-weight: 400; font-size: 12px; opacity: .8; }
.jn-hb-foot { margin: 0; font-size: 12px; color: #8f8064; text-align: center; }
/* 大厅栏目：匣子点了也进卡池页；「打开锦囊」一整条 */
.jn-tray[data-act] { cursor: pointer; transition: box-shadow .2s; }
.jn-tray[data-act]:hover { box-shadow: inset 0 0 0 1px rgba(232, 196, 112, .9), inset 0 0 0 4px #140f0a, inset 0 0 0 5px rgba(216, 178, 94, .3), 0 4px 16px rgba(120, 70, 20, .35); }
.jn-form .jn-open { display: grid; justify-items: center; gap: 1px; width: 100%; padding: 8px 14px; grid-column: auto; }
.jn-form .jn-open small { font-weight: 400; font-size: 12px; opacity: .8; }
@media (max-width: 640px) {
  .jn-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 10px; }
  .jn-hero-txt { justify-items: center; text-align: center; max-width: none; }
  .jn-hero-zz { font-size: 42px; }
  .jn-hero-txt p { font-size: 12px; }
  .jn-car { --cw: min(calc((100cqh - 112px) * .7166), 72cqw); }
  .jn-stage .jn-car-nav, .jn-stage .jn-car-nav:hover:not(:disabled) { width: 36px; height: 36px; }
  .jn-car-nav svg { width: 18px; height: 18px; }
  .jn-car-note { display: none; }
  .jn-hb-row { gap: 4px 12px; font-size: 12px; }
  .jn-zz-plq { padding: 5px 12px 6px; }
  .jn-hb-btns .jn-sbtn { min-width: 0; padding: 8px 12px; font-size: 14px; }
  .jn-st-title { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .jn-car .jn-zz.cur .jn-zz-card, .jn-home-rays { animation: none; } .jn-car .jn-zz { transition-duration: .2s; } }
@media (max-width: 1000px) { .jn-car-note { display: none; } }
/* 至臻那一段 */
.jn-splash { position: absolute; inset: 0; z-index: 4; cursor: pointer; }
.jn-sp-bg { position: absolute; inset: 0; opacity: 0; background: radial-gradient(62% 56% at 50% 46%, rgba(214, 92, 52, .6) 0%, rgba(140, 34, 18, .8) 40%, rgba(46, 10, 6, .96) 78%, #120605 100%); }
.jn-sp-bg::after { content: ""; position: absolute; inset: 0; background: repeating-radial-gradient(circle at 50% 46%, rgba(240, 200, 120, .075) 0 1px, transparent 1px 36px);
  -webkit-mask-image: radial-gradient(closest-side at 50% 46%, #000 25%, transparent 100%); mask-image: radial-gradient(closest-side at 50% 46%, #000 25%, transparent 100%); }
.jn-sp-rays { position: absolute; left: 50%; top: 46%; width: 190vmax; aspect-ratio: 1; opacity: 0; translate: -50% -50%; animation: jn-spin 80s linear infinite;
  background: repeating-conic-gradient(from 0deg, rgba(255, 222, 150, .17) 0deg 2.6deg, rgba(255, 222, 150, 0) 2.6deg 12deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .55) 32%, transparent 68%); mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .55) 32%, transparent 68%); }
@keyframes jn-spin { to { rotate: 360deg; } }
.jn-sp-ring { position: absolute; left: 50%; top: 46%; width: 44vmin; aspect-ratio: 1; border-radius: 50%; opacity: 0; translate: -50% -50%; border: 2px solid rgba(255, 228, 170, .95);
  box-shadow: 0 0 26px rgba(255, 190, 110, .75), inset 0 0 26px rgba(255, 190, 110, .5); }
.jn-sp-pillar { position: absolute; top: 0; bottom: 0; width: 170px; opacity: 0; translate: -50% 0; transform-origin: top; filter: blur(5px);
  background: linear-gradient(90deg, transparent, rgba(255, 210, 150, 0) 18%, rgba(255, 232, 186, .9) 50%, rgba(255, 210, 150, 0) 82%, transparent); }
.jn-sp-card { position: absolute; container-type: inline-size; perspective: 1400px; }
.jn-sp-card .jn-ci { transition: none; }
.jn-sp-word { position: absolute; display: flex; flex-direction: column; gap: .02em; top: 46%; translate: 0 -50%; left: calc(50% - var(--tw) / 2 - 1.15em - min(7vw, 70px));
  font: 400 clamp(60px, 12vmin, 136px)/1 var(--jn-brush); }
.jn-sp-word span { display: block; clip-path: inset(0 0 100% 0); background: linear-gradient(176deg, #fff4cc 0%, #f4d58a 26%, #c39331 52%, #f7de9a 72%, #9a6f22 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(70, 14, 6, .65)) drop-shadow(0 0 16px rgba(255, 186, 110, .45)); }
.jn-sp-plaque { position: absolute; left: 50%; top: calc(46% + var(--th) / 2 + 20px); translate: -50% 0; opacity: 0; display: grid; justify-items: center; gap: 2px; padding: 9px 30px 10px;
  border-radius: 3px; background: linear-gradient(#a3341f, #5f160c); border: 1px solid #efcd7a; box-shadow: inset 0 0 0 3px #5f160c, inset 0 0 0 4px rgba(239, 205, 122, .55), 0 10px 26px rgba(0, 0, 0, .45); white-space: nowrap; }
.jn-sp-plaque b { font: 400 clamp(20px, 3.6vmin, 28px)/1.25 var(--jn-brush); color: #fbe4a6; letter-spacing: .14em; }
.jn-sp-plaque i { font-size: clamp(12px, 2vmin, 15px); line-height: 1.35; font-style: normal; color: #f0cf8c; letter-spacing: .2em; }
.jn-sp-hint { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 26px); margin: 0; text-align: center; opacity: 0; font-size: 13px; letter-spacing: .24em; color: rgba(246, 222, 170, .75); }
@media (max-width: 640px) {
  .jn-sp-word { flex-direction: row; left: 50%; top: calc(46% - var(--th) / 2 - 16px); translate: -50% -100%; font-size: clamp(52px, 15vw, 76px); }
}
@media (prefers-reduced-motion: reduce) {
  .jn-t4 .jn-aura, .jn-t5 .jn-aura, .jn-sp-rays { animation: none; }
  .jn-ci { transition-duration: .2s; }
}

/* ---------- 回放（用户 10-21：直接用打牌界面；records.js 的 rpPanelHTML / rpTopbarHTML）---------- */
/* 控制条：开头 / 上回合 / 上一步 / 播放 / 下一步 / 下回合 / 结尾 */
.rv-tp { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 6px; }
.rv-tp .opt { padding: 6px 10px; }
.rv-tp .rv-play { font-weight: 700; padding: 6px 16px; background: linear-gradient(var(--pri1), var(--pri2)); border-color: var(--pri-line); color: var(--pri-text); }
.rv-tp .rv-play:hover:not(:disabled) { background: linear-gradient(var(--prih1), var(--prih2)); }
.rv-tp.m { flex-wrap: nowrap; gap: 6px; margin: 6px 0 0; }
.rv-tp.m .opt { flex: 1; padding: 8px 0; font-size: 15px; text-align: center; }
.rv-tp.m .rv-play { flex: 2.4; }
/* 进度条：色带 = 每回合是谁的回合（视角这一方 / 另一方），竖线分开回合；点一下或拖着跳；出错 / 对不上的地方往后打斜线 */
.rv-prog { margin: 4px 2px 2px; user-select: none; -webkit-user-select: none; }
.rv-track { position: relative; height: 10px; margin: 8px 8px 0; border-radius: 5px; background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; touch-action: none; }
.rv-track::before { content: ''; position: absolute; inset: -10px -8px; }      /* 点得到的范围比看到的大，手指好拖 */
.rv-seg { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--panel); pointer-events: none; }
.rv-seg.me { background: var(--me-cap); opacity: .28; }
.rv-seg.op { background: var(--op-cap); opacity: .22; }
.rv-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px 0 0 5px; background: linear-gradient(90deg, transparent, var(--gold-l)); opacity: .55; pointer-events: none; }
.rv-thumb { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--panel); border: 2px solid var(--gold); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); pointer-events: none; }
.rv-drift, .rv-bad { position: absolute; top: 0; bottom: 0; right: 0; border-radius: 0 5px 5px 0; pointer-events: none;
  background: repeating-linear-gradient(135deg, transparent 0 4px, var(--red-bg) 4px 8px); box-shadow: inset 2px 0 0 var(--red); }
.rv-bad { background: repeating-linear-gradient(135deg, var(--red-bg) 0 3px, transparent 3px 6px), var(--sunk); }
.rv-ticks { position: relative; height: 14px; margin: 3px 8px 0; font-size: 11px; color: var(--muted); }
.rv-ticks b { position: absolute; transform: translateX(-50%); font-weight: 400; }
.rv-tip { display: flex; gap: 6px; align-items: baseline; margin: 2px 4px 0; font-size: 12px; color: var(--muted); white-space: nowrap; min-width: 0; }
.rv-tip b { color: var(--text2); font-weight: 600; }
.rv-tip em { font-style: normal; }
.rv-tip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--text2); }
.rv-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 2px; font-size: 13px; color: var(--text2); }
.rv-lb { color: var(--muted); }
button.rv-skip.on { background: var(--ok-bg); border-color: var(--green); }
.rv-warn { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 2px 0 8px; padding: 6px 8px; border-radius: 8px; background: var(--red-bg); color: var(--red-ink); font-size: 12.5px; line-height: 1.45; }
.rv-foot { justify-content: flex-start; }
/* 手机：底部一条（进度条 + 控制按钮），其余放进 ☰ */
.rv-mbar { width: 100%; padding: 2px 0 4px; }
.rv-mbar .rv-warn { margin: 0 0 4px; padding: 4px 6px; font-size: 12px; }
.rv-mbar .rv-ticks { display: none; }
.rv-drawer .dr-row { display: flex; align-items: center; gap: 8px; padding: 4px 2px; color: var(--muted); font-size: 13px; }
/* 日志里这一步新出的 */
.lg.fresh { background: var(--sunk); box-shadow: inset 3px 0 0 var(--gold); padding-left: 6px; }
.rv-drawer .dr-row, .rv-drawer .rv-skip { grid-column: 1 / -1; }
.rv-drawer .dr-row small { white-space: nowrap; }
