/* =====================================================================
 * 杀闪桃 · 「青绿兵书」
 *   摊在案上的宣纸兵书 + 沙盘，千里江山图那套矿物颜料：石青 / 石绿 / 朱砂 / 赭石 / 藤黄。
 *   材质：宣纸 + 墨线；朱砂印章（身份、按钮、回合）。展示字体：马善政毛笔楷。
 * ===================================================================== */
@font-face { font-family: 'MaShan'; src: url('fonts/MaShanZheng-Regular.woff2') format('woff2'); font-display: swap; }
:root {
  --paper: #f1e8d4; --paper2: #e4d6b8; --paper3: #fbf6ea; --paper4: #d9c8a4;
  --ink: #24252b; --ink2: #5e594e; --ink3: #8e8676;
  --red: #c8372d; --red2: #9e2a22; --azure: #24628a; --azure2: #1a4a69; --green: #2f8f73; --green2: #226b56;
  --ochre: #9a6a3a; --gold: #e9b23c; --gold2: #c48f1c; --spy: #6a4a9a; --qun: #7d7468;
  --top-h: 48px; --hub-footer-h: 30px;
  --brush: 'MaShan', 'STKaiti', 'KaiTi', serif;
  --sans: -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --card-w: 62px; --card-h: 88px;
  --line: 1.5px solid var(--ink);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; }
body {
  margin: 0; min-height: 100vh; height: auto !important; display: flex; flex-direction: column;
  font: 14px/1.45 var(--sans); color: var(--ink);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 260' preserveAspectRatio='none'%3E%3Cpath d='M0 200 L120 120 L190 160 L300 70 L420 150 L520 100 L640 170 L760 60 L880 140 L980 90 L1100 150 L1200 110 V260 H0Z' fill='%2324628a' opacity='.10'/%3E%3Cpath d='M0 230 L90 180 L210 215 L330 150 L470 210 L600 160 L720 220 L850 170 L990 215 L1110 175 L1200 205 V260 H0Z' fill='%232f8f73' opacity='.12'/%3E%3C/svg%3E") bottom / 100% 220px no-repeat fixed,
    repeating-linear-gradient(0deg, rgba(120, 96, 60, .035) 0 1px, transparent 1px 7px),
    radial-gradient(120% 80% at 50% 0%, #f6efdf 0%, var(--paper) 60%, #eadfc4 100%);
  background-color: var(--paper);
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
img { -webkit-user-drag: none; user-select: none; }
.app-shell { flex: 1 0 auto; display: flex; flex-direction: column; }
.screen { display: none; flex-direction: column; flex: 1 0 auto; }
body[data-screen="start"] #screen-start, body[data-screen="resume"] #screen-resume,
body[data-screen="lobby"] #screen-lobby, body[data-screen="game"] #screen-game { display: flex; }
.scrolly, .tab-body, .modal-box, .pop { scrollbar-width: thin; scrollbar-color: var(--azure) rgba(36, 98, 138, .12); }
.scrolly::-webkit-scrollbar, .tab-body::-webkit-scrollbar, .modal-box::-webkit-scrollbar, .hand::-webkit-scrollbar { width: 8px; height: 6px; }
.scrolly::-webkit-scrollbar-thumb, .tab-body::-webkit-scrollbar-thumb, .modal-box::-webkit-scrollbar-thumb, .hand::-webkit-scrollbar-thumb { background: var(--azure); border-radius: 99px; }
.scrolly::-webkit-scrollbar-track, .tab-body::-webkit-scrollbar-track, .modal-box::-webkit-scrollbar-track, .hand::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------- 顶栏 */
.topbar {
  height: var(--top-h); flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: linear-gradient(180deg, var(--paper3), var(--paper));
  border-bottom: 1.5px solid var(--ink); box-shadow: 0 2px 0 rgba(36, 37, 43, .08);
  position: relative; z-index: 3;
}
.topbar .logo { width: 36px; height: 36px; flex: 0 0 auto; }
.brand { min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.brand b { font: 26px/1 var(--brush); letter-spacing: 2px; }
.brand small { font-size: 12px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp { flex: 1 1 auto; min-width: 0; }
.tools { display: flex; gap: 6px; flex: 0 0 auto; }
.tb {
  height: 32px; padding: 0 11px; border-radius: 6px; border: 1.5px solid var(--ink); background: var(--paper3);
  font-size: 13px; font-weight: 600; box-shadow: 0 2px 0 var(--ink);
}
.tb:active { transform: translateY(2px); box-shadow: none; }
.tb.warn { color: var(--red); }
.tb.off { color: var(--ink3); text-decoration: line-through; }

/* ---------------------------------------------------------- 通用按钮 / 面板 */
.btn {
  min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1.5px solid var(--ink);
  background: var(--paper3); font-weight: 700; font-size: 15px; box-shadow: 0 3px 0 var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap;
}
.btn:active:not([disabled]) { transform: translateY(3px); box-shadow: none; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.main { background: var(--red); color: #fff7ea; border-color: var(--red2); box-shadow: 0 3px 0 var(--red2); }
.btn.blue { background: var(--azure); color: #f3f7fb; border-color: var(--azure2); box-shadow: 0 3px 0 var(--azure2); }
.btn.big { min-height: 48px; font-size: 16px; width: 100%; }
.btn.tiny { min-height: 30px; padding: 0 10px; font-size: 13px; box-shadow: 0 2px 0 var(--ink); }
.btn.warn-ghost { background: transparent; color: var(--red); border-color: var(--red); box-shadow: none; }
.panel {
  background: var(--paper3); border: var(--line); border-radius: 10px;
  box-shadow: inset 0 0 0 3px var(--paper3), inset 0 0 0 4px rgba(154, 106, 58, .35), 0 3px 0 rgba(36, 37, 43, .15);
}
.inp {
  width: 100%; height: 46px; border-radius: 8px; border: 1.5px solid var(--ink); background: #fffdf7;
  padding: 0 12px; font-size: 16px; outline: none;
}
.inp:focus { border-color: var(--azure); box-shadow: 0 0 0 3px rgba(36, 98, 138, .18); }
.inp.code { text-align: center; letter-spacing: 6px; font-weight: 800; text-transform: uppercase; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.two > * { min-width: 0; }
.lbl { font-size: 13px; color: var(--ink2); }
.tiny { font-size: 12px; color: var(--ink2); }
.netbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: var(--gold); text-align: center; font-weight: 700; padding: 6px; border-bottom: var(--line); }

/* 身份印 */
.seal {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; transform: rotate(-6deg);
  font: 17px/1 var(--brush); font-style: normal; color: #fff7ea; border: 1.5px solid rgba(0, 0, 0, .25);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .28); flex: 0 0 auto;
}
.seal.big { width: 38px; height: 38px; font-size: 27px; }
.seal.sm { width: 20px; height: 20px; font-size: 14px; vertical-align: -4px; margin-right: 2px; }
.seal.r-lord { background: var(--gold); color: var(--ink); }
.seal.r-loyal { background: var(--red); }
.seal.r-rebel { background: var(--green); }
.seal.r-spy { background: var(--spy); }
.seal.unk { background: rgba(251, 246, 234, .85); color: var(--ink3); border: 1.5px dashed var(--ink3); box-shadow: none; font-family: var(--sans); font-size: 13px; font-weight: 800; }
.seal.unk.guess { border-style: dashed; background: rgba(251, 246, 234, .9); font-family: var(--brush); font-size: 16px; }
.seal.unk.guess.r-loyal { color: var(--red); border-color: var(--red); }
.seal.unk.guess.r-rebel { color: var(--green); border-color: var(--green); }
.seal.unk.guess.r-spy { color: var(--spy); border-color: var(--spy); }
.r-lord-t { color: var(--gold2); } .r-loyal-t { color: var(--red); } .r-rebel-t { color: var(--green); } .r-spy-t { color: var(--spy); }

/* 体力勾玉 */
.jades { display: inline-flex; gap: 2px; vertical-align: middle; }
.jades i { width: 9px; height: 11px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--paper2); border: 1px solid rgba(36, 37, 43, .35); }
.jades.full i.on { background: radial-gradient(circle at 35% 30%, #8fe0bf, var(--green) 60%, var(--green2)); border-color: var(--green2); }
.jades.mid i.on { background: radial-gradient(circle at 35% 30%, #ffe39a, var(--gold) 60%, var(--gold2)); border-color: var(--gold2); }
.jades.low i.on { background: radial-gradient(circle at 35% 30%, #ff9c8f, var(--red) 60%, var(--red2)); border-color: var(--red2); }
.hp-num { font-weight: 800; color: var(--green2); }
.hc { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; font-size: 13px; }
.hc svg { width: 14px; height: 14px; color: var(--azure); }

/* 势力 */
.f-wei { --fc: var(--azure); --fc2: #8fb7d3; }
.f-shu { --fc: var(--red); --fc2: #e9a39a; }
.f-wu { --fc: var(--green); --fc2: #95cdb9; }
.f-qun { --fc: var(--qun); --fc2: #c7bfb2; }
.f-none { --fc: var(--ink3); --fc2: var(--paper2); }
.fac {
  position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--fc); color: #fff; font: 13px/1 var(--brush); font-style: normal; border: 1.5px solid rgba(255, 255, 255, .7);
}

/* ---------------------------------------------------------- 卡牌 */
.cd {
  position: relative; flex: 0 0 auto; width: var(--card-w); height: var(--card-h); border-radius: 7px;
  background: linear-gradient(180deg, #fffaf0, var(--paper3) 70%, #f1e6cf);
  border: 1.5px solid var(--ink); box-shadow: 0 2px 0 rgba(36, 37, 43, .3);
  display: flex; flex-direction: column; align-items: center; overflow: hidden;
  transition: transform .16s ease, box-shadow .16s, opacity .16s, filter .16s; cursor: pointer; user-select: none;
}
.cd .cd-band { position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--cat); }
.cd.cat-basic { --cat: var(--red); } .cd.cat-trick { --cat: var(--azure); } .cd.cat-delay { --cat: var(--spy); } .cd.cat-equip { --cat: var(--green); }
.cd-corner { position: absolute; left: 3px; top: 6px; display: flex; flex-direction: column; align-items: center; line-height: .95; z-index: 1; }
.cd-corner b { font: 800 13px/1 var(--sans); }
.cd-corner i { font-style: normal; font-size: 12px; }
.cd-corner.red { color: var(--red); } .cd-corner.blk { color: var(--ink); }
.cd-art { flex: 1 1 auto; width: 100%; min-height: 0; display: grid; place-items: center; padding: 9px 4px 0 12px; }
.cd-art img { width: 100%; height: 100%; object-fit: contain; }
.cd-name {
  flex: 0 0 auto; width: 100%; text-align: center; font: 17px/1.15 var(--brush); padding: 1px 2px 3px;
  background: linear-gradient(180deg, rgba(228, 214, 184, .0), rgba(228, 214, 184, .85) 30%); border-top: 1px solid rgba(154, 106, 58, .35);
  white-space: nowrap; overflow: hidden;
}
.cd.long .cd-name { font-size: 13px; letter-spacing: -.5px; }
.cd.back { background: var(--azure); padding: 0; }
.cd.back img { width: 100%; height: 100%; object-fit: cover; }
.cd.mini { --card-w: 44px; --card-h: 62px; border-radius: 5px; }
.cd.mini .cd-name { font-size: 12px; }
.cd.mini.long .cd-name { font-size: 11px; letter-spacing: -1px; }
.cd.mini .cd-corner b { font-size: 11px; } .cd.mini .cd-corner i { font-size: 11px; }
.cd.mini .cd-art { padding: 7px 2px 0 9px; }
.cd.virtual { border-style: dashed; opacity: .85; }
.cd.big { --card-w: 180px; --card-h: 252px; border-radius: 14px; border-width: 2px; cursor: default; }
.cd.big .cd-band { height: 10px; }
.cd.big .cd-corner { left: 8px; top: 14px; } .cd.big .cd-corner b { font-size: 26px; } .cd.big .cd-corner i { font-size: 22px; }
.cd.big .cd-art { padding: 22px 14px 4px 26px; }
.cd.big .cd-name { font-size: 38px; padding: 4px 4px 8px; } .cd.big.long .cd-name { font-size: 30px; }
/* 状态 */
.cd.ok { box-shadow: 0 2px 0 rgba(36, 37, 43, .3), 0 0 0 2px rgba(47, 143, 115, .55); }
.cd.dim { opacity: .5; filter: saturate(.4); }
.cd.lift { transform: translateY(-14px); box-shadow: 0 10px 18px rgba(36, 37, 43, .28), 0 0 0 2.5px var(--gold); z-index: 2; }
.cd.chk { transform: translateY(-11px); box-shadow: 0 8px 14px rgba(36, 37, 43, .25), 0 0 0 2.5px var(--red); z-index: 2; }
.cd.chk::after { content: '✓'; position: absolute; right: 3px; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--red); color: #fff; font: 800 12px/18px var(--sans); text-align: center; }
.cd.pick:hover { transform: translateY(-4px); }

/* ---------------------------------------------------------- 开始页 */
.start-main { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; padding: 20px clamp(16px, 4vw, 52px); max-width: 1320px; width: 100%; margin: 0 auto; align-items: center; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; align-items: center; }
.hero-art { position: relative; height: 380px; }
.ha-card {
  position: absolute; width: 30%; aspect-ratio: 3 / 4.1; border-radius: 10px; overflow: hidden; border: 2px solid var(--ink);
  background: linear-gradient(0deg, var(--fc), var(--fc2)); box-shadow: 0 6px 0 rgba(36, 37, 43, .25), 0 12px 24px rgba(36, 37, 43, .15);
}
.ha-card img { width: 100%; height: 100%; object-fit: cover; }
.ha-card b { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font: 22px/1.3 var(--brush); color: #fff; background: linear-gradient(0deg, rgba(20, 20, 24, .7), transparent); padding-top: 10px; }
.hero-copy h1 { font: 48px/1.15 var(--brush); margin: 0 0 12px; letter-spacing: 3px; }
.hero-copy p { margin: 0 0 12px; font-size: 15px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.hero-tags span { padding: 3px 10px; border-radius: 99px; background: var(--azure); color: #f3f7fb; font-weight: 700; font-size: 13px; }
.entry { display: flex; flex-direction: column; gap: 10px; padding: 22px; position: relative; }
.entry { background: var(--paper3); border: var(--line); border-radius: 12px; box-shadow: inset 0 0 0 4px var(--paper3), inset 0 0 0 5px rgba(200, 55, 45, .35), 0 4px 0 rgba(36, 37, 43, .18); }
.entry-logo { width: 52px; height: 52px; position: absolute; right: 16px; top: 14px; }
.entry h2 { font: 30px/1 var(--brush); margin: 4px 0 4px; letter-spacing: 4px; }
.resume-box { margin: 18vh auto; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; padding: 24px; }
.resume-logo { width: 64px; height: 64px; }

/* ---------------------------------------------------------- 大厅 */
.lobby-main { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; padding: 12px clamp(12px, 3vw, 40px); max-width: 1500px; width: 100%; margin: 0 auto; }
.lobby-left, .lobby-right { padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lobby-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lobby-head b { font: 24px/1 var(--brush); }
.pill { padding: 3px 10px; border-radius: 99px; background: var(--paper); border: 1px solid var(--paper4); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.seats { display: grid; gap: 8px; }
.seats.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seats.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seat { border: 1.5px dashed var(--ink3); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; background: rgba(251, 246, 234, .5); }
.seat.taken { border-style: solid; border-color: var(--ink); background: var(--paper3); box-shadow: 0 2px 0 rgba(36, 37, 43, .2); }
.seat.host { border-color: var(--gold2); box-shadow: 0 0 0 2px rgba(233, 178, 60, .45); }
.ring { width: 56px; height: 64px; border-radius: 8px; overflow: hidden; border: 1.5px solid var(--ink); background: var(--paper2); }
.ring img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.ring.empty { border-style: dashed; border-color: var(--ink3); background: transparent; }
.seat .nm { font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .sub { font-size: 12px; color: var(--ink3); }
.tags { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.tag { font-size: 11px; padding: 1px 6px; border-radius: 4px; font-weight: 700; background: var(--paper2); }
.tag.host { background: var(--gold); } .tag.you { background: var(--red); color: #fff; } .tag.bot { background: var(--azure); color: #fff; } .tag.off { background: var(--ink3); color: #fff; }
.lobby-ops { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lobby-ops .btn { min-height: 40px; font-size: 14px; }
.fill { display: flex; gap: 6px; align-items: center; }
.fill select { height: 40px; border-radius: 8px; border: 1.5px solid var(--ink); background: var(--paper3); padding: 0 6px; font-weight: 700; }
.scoreboard, .history { font-size: 13px; color: var(--ink2); }
.lobby-go { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.settings { display: flex; flex-direction: column; gap: 12px; }
.set-row { display: flex; flex-direction: column; gap: 6px; }
.set-row > b { font: 20px/1 var(--brush); }
.set-row > small { color: var(--ink2); font-size: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { min-height: 40px; padding: 4px 12px; border-radius: 8px; border: 1.5px solid var(--ink); background: var(--paper3); font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.seg button small { font-size: 11px; font-weight: 500; color: var(--ink2); }
.seg button.on { background: var(--azure); color: #fff; border-color: var(--azure2); box-shadow: 0 2px 0 var(--azure2); }
.seg button.on small { color: #dbe8f2; }
.seg button[disabled] { cursor: default; }
.set-note { font-size: 12px; color: var(--ink2); background: var(--paper); border-radius: 8px; padding: 8px 10px; border: 1px solid var(--paper4); }
.xps { display: flex; flex-wrap: wrap; gap: 6px; }
.xp { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 3px 10px; border-radius: 6px; border: 1.5px solid var(--ink); background: var(--paper3); font-weight: 700; font-size: 13px; }
.xp small { font-size: 11px; font-weight: 500; }
.xp.on { background: var(--green); color: #fff; border-color: var(--green2); }
.xp.soon { background: #ece6d8; color: #9d968a; border: 1.5px dashed #b7ae9c; font-weight: 600; }
.xp.soon small { color: #a69e90; }

/* ---------------------------------------------------------- 对局：手机为主 */
#screen-game { min-height: 100dvh; }
.game { position: relative; display: flex; flex-direction: column; }
.col-left { display: none; }
.col-mid {
  display: flex; flex-direction: column; gap: 6px; padding: 6px 8px 8px;
  height: calc(100dvh - var(--top-h)); min-height: 560px;
}
.col-right { padding: 0 8px 10px; display: flex; flex-direction: column; }
.tabs { display: flex; gap: 6px; margin-bottom: 6px; }
.tabs button { flex: 1 1 0; min-height: 38px; border-radius: 8px 8px 0 0; border: 1.5px solid var(--ink); border-bottom: none; background: var(--paper2); font: 18px/1 var(--brush); }
.tabs button.on { background: var(--paper3); color: var(--red); }
.tab-body { background: var(--paper3); border: var(--line); border-radius: 0 0 10px 10px; padding: 8px 10px; height: 46vh; overflow: auto; font-size: 13px; }
.lg { padding: 2px 0; border-bottom: 1px dotted rgba(154, 106, 58, .25); }
.lg.turnline { color: var(--azure); font-weight: 800; border-bottom: none; padding-top: 6px; }
.ref { display: flex; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px dotted rgba(154, 106, 58, .25); }
.ref-art { width: 40px; height: 36px; flex: 0 0 auto; }
.ref-art img { width: 100%; height: 100%; object-fit: contain; }
.ref b { font: 17px/1.1 var(--brush); margin-right: 6px; }
.ref small { color: var(--ink2); }
.tab-body h4 { font: 20px/1 var(--brush); margin: 10px 0 4px; color: var(--azure); }

/* 其他角色 */
.others { display: grid; gap: 6px; grid-template-columns: repeat(4, minmax(0, 1fr)); flex: 0 0 auto; --por-ar: 1 / 1; }
.others[data-n="1"] { grid-template-columns: minmax(0, 1fr); max-width: 220px; width: 100%; margin: 0 auto; --por-ar: 4 / 3; }
.others[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); --por-ar: 4 / 3; }
.others[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); --por-ar: 1 / 1; }
.seat-tile {
  position: relative; min-width: 0; padding: 0; text-align: left; display: flex; flex-direction: column;
  background: var(--paper3); border: 1.5px solid var(--ink); border-radius: 8px; overflow: hidden;
  box-shadow: 0 2px 0 rgba(36, 37, 43, .25); transition: transform .15s, box-shadow .15s, opacity .15s, filter .15s;
}
.st-por { position: relative; aspect-ratio: var(--por-ar, 1 / 1); background: linear-gradient(0deg, var(--fc) 0%, var(--fc2) 70%, var(--paper3)); overflow: hidden; }
.st-por img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; }
.st-blank { display: grid; place-items: center; height: 100%; color: var(--ink2); font: 15px var(--brush); }
.seat-tile .seal { position: absolute; right: 3px; top: 3px; width: 21px; height: 21px; font-size: 15px; }
.st-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 4px 2px; display: flex; align-items: baseline; gap: 3px;
  background: linear-gradient(0deg, rgba(24, 24, 28, .82), rgba(24, 24, 28, 0)); color: #fff; white-space: nowrap; overflow: hidden;
}
.st-name b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.st-name small { font: 13px/1 var(--brush); opacity: .95; flex: 0 0 auto; }
.st-name small.off { font: 11px var(--sans); color: #ffb3a8; }
.st-info { display: flex; align-items: center; justify-content: space-between; gap: 2px; padding: 3px 4px 0; }
.st-info .jades i { width: 8px; height: 10px; }
.st-eq { display: flex; flex-wrap: wrap; gap: 2px; padding: 2px 4px 4px; min-height: 22px; }
.eqc { font-size: 11px; font-weight: 800; line-height: 16px; padding: 0 3px; border-radius: 3px; background: var(--green); color: #fff; }
.eqc.s-armor { background: var(--azure); } .eqc.s-def, .eqc.s-off { background: var(--ochre); }
.jdc { font: 12px/16px var(--brush); padding: 0 3px; border-radius: 50%; background: var(--spy); color: #fff; min-width: 16px; text-align: center; }
.jdc.j-shandian { background: var(--gold2); }
.st-tag { position: absolute; left: 50%; top: 2px; transform: translateX(-50%); font-size: 11px; font-weight: 800; padding: 0 5px; border-radius: 3px; white-space: nowrap; }
.st-tag.turn { background: var(--gold); color: var(--ink); }
.st-tag.act { background: var(--red); color: #fff; animation: blink 1.2s infinite; }
.st-tag.dead { background: var(--ink); color: #fff; }
@keyframes blink { 50% { opacity: .55; } }
.st-dist { position: absolute; left: 3px; bottom: 22px; font-size: 11px; font-weight: 800; background: rgba(251, 246, 234, .9); color: var(--ink); padding: 0 4px; border-radius: 3px; }
.st-pick { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -60%); width: 32px; height: 32px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font: 800 18px var(--sans); border: 2px solid #fff; }
.seat-tile.turn { border-color: var(--gold2); box-shadow: 0 0 0 2.5px var(--gold), 0 2px 0 rgba(36, 37, 43, .25); }
.seat-tile.cand { border-color: var(--green2); box-shadow: 0 0 0 3px rgba(47, 143, 115, .65), 0 0 14px rgba(47, 143, 115, .5); animation: candpulse 1.4s ease-in-out infinite; }
@keyframes candpulse { 50% { box-shadow: 0 0 0 3px rgba(47, 143, 115, .9), 0 0 20px rgba(47, 143, 115, .65); } }
.seat-tile.picked { border-color: var(--red2); box-shadow: 0 0 0 3px var(--red); transform: translateY(-2px); }
.seat-tile.nocand { opacity: .5; filter: saturate(.5); }
.seat-tile.dead { filter: grayscale(1); opacity: .65; }
.seat-tile.dead .seal { width: 32px; height: 32px; font-size: 22px; right: 50%; top: 18%; transform: translateX(50%) rotate(-10deg); }
.seat-tile.hit, .mine.hit { animation: hit .55s ease; }
@keyframes hit { 0%, 100% { transform: none; } 20% { transform: translateX(-4px); background: #f7c9c0; } 45% { transform: translateX(4px); } 70% { transform: translateX(-2px); } }
.seat-tile.dying, .mine.dying { box-shadow: 0 0 0 3px var(--red), 0 0 18px rgba(200, 55, 45, .7); }

/* 沙盘 */
.table {
  flex: 1 1 auto; min-height: 118px; display: flex; flex-direction: column; border-radius: 10px; border: 1.5px solid var(--ochre);
  background:
    repeating-linear-gradient(0deg, rgba(154, 106, 58, .07) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(154, 106, 58, .07) 0 1px, transparent 1px 22px),
    linear-gradient(180deg, #ecdfc0, #e3d2ad);
  box-shadow: inset 0 0 0 3px rgba(251, 246, 234, .55), inset 0 2px 8px rgba(110, 80, 40, .15);
  overflow: hidden; position: relative;
}
.tbl-head { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-bottom: 1px dashed rgba(154, 106, 58, .5); flex: 0 0 auto; min-width: 0; }
.ph-turn { font-weight: 800; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ph-turn small { font-weight: 500; font-size: 12px; }
.phs { display: flex; gap: 2px; margin-left: auto; flex: 0 0 auto; }
.phs i { font: 13px/20px var(--brush); font-style: normal; padding: 0 4px; border-radius: 3px; color: var(--ink3); }
.phs i.on { background: var(--red); color: #fff; }
.deck { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; font-size: 13px; flex: 0 0 auto; }
.deck svg { width: 14px; height: 14px; color: var(--azure); }
.tbl-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 6px; }
.banner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; max-width: 100%; }
.banner b { font: 21px/1.2 var(--brush); }
.banner small { font-size: 13px; color: var(--ink2); }
.banner .wait { color: var(--ink2); font-size: 14px; }
.banner.mine b { color: var(--red2); }
.banner.k-respond b { color: var(--red); }
.banner .jcard { margin-top: 4px; }
.recent { display: flex; gap: 8px; justify-content: center; flex-wrap: nowrap; max-width: 100%; overflow: hidden; }
.rc { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; flex: 0 1 auto; max-width: 46%; }
.rc:last-child { animation: rcin .3s ease; }
@keyframes rcin { from { transform: translateY(-8px) scale(.9); opacity: 0; } }
.rc-cards { display: flex; gap: 2px; }
.rc-cap { font-size: 11px; color: var(--ink2); text-align: center; line-height: 1.2; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rc-cap small { font-size: 11px; }
.rc-cap em { font-style: normal; color: var(--green2); font-weight: 700; margin-left: 2px; }
.tbl-body.special { justify-content: flex-start; }
.pc-h { font-weight: 800; text-align: center; font-size: 14px; }
.pc-h small { font-weight: 500; color: var(--ink2); }
.pc-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pc-z { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pc-z > small { font-size: 12px; color: var(--ink2); }
.pc-zones { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.panel-cc, .panel-yj, .panel-gx, .panel-wg { display: flex; flex-direction: column; gap: 6px; align-items: center; width: 100%; }
.panel-cc .cd.mini, .panel-wg .cd.mini { --card-w: 50px; --card-h: 70px; }
.yj-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px; border-radius: 8px; border: 1.5px dashed transparent; cursor: pointer; }
.yj-item.cur { border-color: var(--red); background: rgba(200, 55, 45, .08); }
.yj-item span { font-size: 12px; font-weight: 700; }
.gx-row { display: flex; align-items: center; gap: 6px; width: 100%; }
.gx-row > small { width: 3.5em; font-size: 11px; color: var(--ink2); flex: 0 0 auto; }
.gx-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.gx-item span { display: flex; gap: 1px; }
.gx-item button { min-width: 26px; height: 26px; border-radius: 4px; border: 1px solid var(--ink); background: var(--paper3); font-size: 11px; padding: 0 3px; }
.gx-item button[disabled] { opacity: .3; }
.empty { color: var(--ink3); font-size: 12px; }

/* 我的武将条 */
.mine {
  flex: 0 0 auto; display: flex; gap: 8px; padding: 6px; border-radius: 10px; background: var(--paper3); border: 1.5px solid var(--ink);
  box-shadow: inset 0 0 0 2px var(--paper3), inset 0 0 0 3px rgba(154, 106, 58, .3), 0 2px 0 rgba(36, 37, 43, .2); position: relative;
}
.mine.turn { border-color: var(--gold2); box-shadow: 0 0 0 2.5px var(--gold), 0 2px 0 rgba(36, 37, 43, .2); }
.mine.cand { box-shadow: 0 0 0 3px rgba(47, 143, 115, .65); }
.mine.picked { border-color: var(--red2); box-shadow: 0 0 0 3px var(--red); }
.mine.dead { filter: grayscale(1); opacity: .7; }
.mn-por { position: relative; width: 58px; height: 76px; flex: 0 0 auto; border-radius: 7px; overflow: hidden; border: 1.5px solid var(--ink); background: linear-gradient(0deg, var(--fc, var(--ink3)), var(--fc2, var(--paper2))); cursor: pointer; }
.mn-por img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.mn-por .seal { position: absolute; right: 2px; bottom: 2px; }
.mn-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mn-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mn-top b { font: 20px/1 var(--brush); white-space: nowrap; }
.mn-role { font-size: 12px; color: var(--ink2); font-weight: 700; }
.mn-eq { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.eq-slot { height: 30px; border-radius: 5px; border: 1.5px dashed var(--paper4); display: flex; align-items: center; justify-content: center; gap: 2px; font-size: 12px; min-width: 0; overflow: hidden; white-space: nowrap; padding: 0 2px; }
.eq-slot small { color: var(--ink3); font-size: 11px; }
.eq-slot.has { border: 1.5px solid var(--green2); background: #e5f1ec; cursor: pointer; }
.eq-slot.has.s-armor { border-color: var(--azure2); background: #e1ebf3; }
.eq-slot.has.s-def, .eq-slot.has.s-off { border-color: var(--ochre); background: #f3e8d9; }
.eq-slot b { font: 15px/1 var(--brush); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.eq-slot i { font-style: normal; font-size: 11px; font-weight: 700; }
.eq-slot i.red { color: var(--red); }
.eq-slot.chk { box-shadow: 0 0 0 2.5px var(--red); }
.eq-slot.lift { box-shadow: 0 0 0 2.5px var(--gold); }
.eq-slot.dim { opacity: .5; }
.mn-sk { display: flex; gap: 4px; flex-wrap: wrap; }
.skb { min-height: 30px; padding: 0 10px; border-radius: 6px; border: 1.5px solid var(--ink); background: var(--paper); font: 16px/1 var(--brush); }
.skb.act { background: var(--azure); color: #fff; border-color: var(--azure2); box-shadow: 0 2px 0 var(--azure2); }
.skb.act.off { background: var(--paper2); color: var(--ink3); border-color: var(--paper4); box-shadow: none; }
.skb.act.on { background: var(--red); border-color: var(--red2); box-shadow: 0 0 0 2px var(--gold); }
.skb.locked, .skb.auto, .skb.convert, .skb.trigger, .skb.lord { border-style: dashed; color: var(--ink2); }
.watching { padding: 8px; text-align: center; color: var(--ink2); width: 100%; }

/* 手牌 */
.handwrap { flex: 0 0 auto; position: relative; }
.hand { display: flex; align-items: flex-end; padding: 16px 4px 4px; overflow-x: auto; overflow-y: hidden; min-height: calc(var(--card-h) + 20px); gap: 0; }
.hand > .cd + .cd { margin-left: 6px; }
.hand .cd:hover:not(.lift):not(.chk):not(.dim) { transform: translateY(-5px); }
.nohand { margin: auto; color: var(--ink3); font-size: 13px; }

/* 底栏 */
.actbar { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; min-height: 50px; }
.ab-hint { flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--ink2); font-weight: 700; line-height: 1.25; display: flex; align-items: center; gap: 6px; }
.ab-btns { display: flex; gap: 6px; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; max-width: 72%; }
.ab-btns .btn { min-width: 76px; }
.timer { display: inline-grid; place-items: center; min-width: 34px; height: 24px; border-radius: 99px; background: var(--azure); color: #fff; font-size: 12px; font-weight: 800; }
.timer.urgent { background: var(--red); animation: blink .8s infinite; }

/* 选将 */
.pick-panel {
  position: absolute; inset: 0; z-index: 6; overflow: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(180deg, rgba(241, 232, 212, .97), rgba(234, 223, 196, .98));
}
.pick-panel[hidden] { display: none; }
.pk-h { display: flex; flex-direction: column; gap: 4px; }
.pk-h b { font: 30px/1 var(--brush); color: var(--red); }
.pk-h span { font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pk-lord { font-size: 14px; } .pk-lord b { font: 20px var(--brush); color: var(--red2); }
.pk-list { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.pk-hero { display: flex; gap: 10px; text-align: left; padding: 8px; border-radius: 10px; border: 1.5px solid var(--ink); background: var(--paper3); box-shadow: 0 3px 0 rgba(36, 37, 43, .25); }
.pk-hero:active { transform: translateY(2px); }
.pk-hero:hover { box-shadow: 0 0 0 3px var(--fc), 0 3px 0 rgba(36, 37, 43, .25); }
.pk-por { position: relative; width: 84px; height: 112px; flex: 0 0 auto; border-radius: 8px; overflow: hidden; border: 1.5px solid var(--ink); background: linear-gradient(0deg, var(--fc), var(--fc2)); }
.pk-por img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.pk-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pk-info b { font: 24px/1 var(--brush); color: var(--fc); }
.pk-info > small { color: var(--ink2); font-size: 12px; }
.pk-sk { font-size: 13px; line-height: 1.35; }
.pk-sk em { font: 16px var(--brush); font-style: normal; color: #fff; background: var(--fc); padding: 0 5px; border-radius: 3px; margin-right: 4px; }
.pk-wait { text-align: center; padding: 30px 0; font-size: 16px; color: var(--ink2); }
.pk-xp { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: auto; }
.pk-xp > small { color: var(--ink2); }

/* 贴牌小窗 */
.pop {
  position: fixed; z-index: 40; width: min(280px, 88vw); max-height: 70vh; overflow: auto; padding: 6px 8px 8px;
  background: var(--paper3); border: 1.5px solid var(--ink); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(36, 37, 43, .3), inset 0 0 0 3px var(--paper3), inset 0 0 0 4px rgba(200, 55, 45, .3);
  overscroll-behavior: contain; touch-action: pan-y;
}
.pop[hidden] { display: none; }
.pop .grab { display: none; }
.pop-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 2px 6px; border-bottom: 1px dashed var(--paper4); margin-bottom: 4px; }
.pop-h b { font: 18px/1.1 var(--brush); }
.pop-x { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); flex: 0 0 auto; }
.pop-row { display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-height: 46px; padding: 6px 10px; margin-top: 4px; text-align: left; border-radius: 8px; border: 1.5px solid var(--ink); background: var(--paper3); font-weight: 700; justify-content: center; }
.pop-row small { font-weight: 500; font-size: 12px; color: var(--ink2); }
.pop-row.main { background: var(--red); color: #fff7ea; border-color: var(--red2); box-shadow: 0 2px 0 var(--red2); }
.pop-row.main small { color: #ffe0d6; }
.pop-row.off { background: var(--paper2); color: var(--ink3); border-color: var(--paper4); cursor: default; }
.pop-row.off small { color: var(--red2); }
.pop-row.look { border-style: dashed; background: transparent; color: var(--azure); min-height: 40px; }

/* 弹窗 */
.modal { position: fixed; inset: 0; z-index: 30; background: rgba(36, 37, 43, .42); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box {
  position: relative; width: min(520px, 100%); max-height: 86vh; overflow: auto; padding: 18px 18px 16px;
  background: var(--paper3); border: 1.5px solid var(--ink); border-radius: 12px; overscroll-behavior: contain;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .3), inset 0 0 0 4px var(--paper3), inset 0 0 0 5px rgba(154, 106, 58, .35);
}
.modal-box.wide { width: min(860px, 100%); }
.modal-box h3 { font: 26px/1.2 var(--brush); margin: 0 30px 8px 0; }
.modal-box h4 { font: 20px/1 var(--brush); margin: 14px 0 6px; color: var(--azure); }
.modal-box p { margin: 6px 0; }
.grab { display: none; width: 44px; height: 5px; border-radius: 99px; background: var(--paper4); margin: -8px auto 8px; }
.mx { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); z-index: 1; }
.row-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.copybox { font-size: 14px; }
.modal-box.cardm { width: min(380px, 100%); text-align: center; }
.bigcard { display: flex; justify-content: center; padding: 6px 0 10px; }
.cap b { font: 26px var(--brush); } .cap small { display: block; color: var(--ink2); } .cap p { text-align: left; }
.hd { display: flex; gap: 12px; }
.hd-por { position: relative; width: 110px; height: 146px; flex: 0 0 auto; border-radius: 10px; overflow: hidden; border: 1.5px solid var(--ink); background: linear-gradient(0deg, var(--fc), var(--fc2)); }
.hd-por img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.hd-por .seal { position: absolute; right: 4px; bottom: 4px; }
.hd-info { min-width: 0; font-size: 13px; }
.hd-info h3 { color: var(--fc); margin-bottom: 2px; }
.hd-info h3 small { font: 13px var(--sans); color: var(--ink2); }
.hd-sk em, .rh em { font: 16px var(--brush); font-style: normal; color: #fff; background: var(--fc, var(--azure)); padding: 0 5px; border-radius: 3px; margin-right: 4px; }
.hd-eqs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.hd-eq { border: 1px solid var(--paper4); border-radius: 6px; padding: 5px 7px; font-size: 12px; }
.hd-eq small { display: block; color: var(--ink3); }
.hd-eq b { font: 16px var(--brush); }
.hd-eq p { margin: 2px 0 0; color: var(--ink2); }
.hd-guess { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.hd-guess small { width: 100%; color: var(--ink2); }
.rules-heroes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.rh { display: flex; gap: 8px; border: 1px solid var(--paper4); border-radius: 8px; padding: 6px; font-size: 12px; }
.rh img { width: 52px; height: 68px; object-fit: cover; object-position: 50% 0; border-radius: 6px; background: linear-gradient(0deg, var(--fc), var(--fc2)); flex: 0 0 auto; }
.rh b { font: 18px var(--brush); color: var(--fc); }
.rh p { margin: 2px 0; }
.soonline { display: flex; flex-wrap: wrap; gap: 5px; }
.result { text-align: center; position: relative; }
.rs-stamp { width: 84px; height: 84px; margin: 0 auto 8px; border-radius: 10px; display: grid; place-items: center; font: 56px/1 var(--brush); color: #fff7ea; background: var(--azure); transform: rotate(-8deg); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .3); }
.result.won .rs-stamp { background: var(--red); }
.result.lost .rs-stamp { background: var(--ink2); }
.rs-list { display: flex; flex-direction: column; gap: 4px; text-align: left; margin-top: 10px; }
.rs-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--paper4); }
.rs-row img { width: 34px; height: 40px; object-fit: cover; object-position: 50% 0; border-radius: 4px; }
.rs-row.win { background: #fbefd0; border-color: var(--gold2); }
.rs-row.dead { opacity: .7; }
.rs-row small { color: var(--ink2); margin-left: auto; }
.toast { position: fixed; left: 50%; bottom: 128px; transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff7ea; padding: 9px 16px; border-radius: 99px; font-weight: 700; max-width: 90vw; text-align: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.toast[hidden] { display: none; }

/* 演出 */
.fxlayer { position: fixed; inset: 0; pointer-events: none; z-index: 25; overflow: hidden; }
.fx-card { position: fixed; transform: translate(0, 0); margin: -31px 0 0 -22px; transition: transform .55s cubic-bezier(.3, .8, .3, 1), opacity .35s; }
.fx-card.out { opacity: 0; }
.fx-line { position: fixed; height: 4px; margin-top: -2px; transform-origin: 0 50%; border-radius: 99px; background: linear-gradient(90deg, rgba(200, 55, 45, 0), var(--red)); animation: line 1s ease forwards; }
.fx-line.k-tao, .fx-line.k-taoyuan { background: linear-gradient(90deg, rgba(47, 143, 115, 0), var(--green)); }
.fx-line.k-shunshou, .fx-line.k-chaiqiao, .fx-line.k-lebu, .fx-line.k-jiedao { background: linear-gradient(90deg, rgba(36, 98, 138, 0), var(--azure)); }
@keyframes line { 0% { clip-path: inset(0 100% 0 0); } 40% { clip-path: inset(0 0 0 0); opacity: 1; } 100% { opacity: 0; } }
.fx-num { position: fixed; transform: translate(-50%, -50%); font: 40px/1 var(--brush); animation: num 1.1s ease-out forwards; text-shadow: 0 2px 0 #fff, 0 0 8px #fff; }
.fx-num.hurt { color: var(--red); } .fx-num.thunder { color: var(--gold2); } .fx-num.heal { color: var(--green); }
@keyframes num { 0% { transform: translate(-50%, -20%) scale(.6); opacity: 0; } 20% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; } 100% { transform: translate(-50%, -140%) scale(1); opacity: 0; } }
.fx-stamp { position: fixed; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 10px; display: grid; place-items: center; font: 50px/1 var(--brush); color: #fff; animation: stamp 1.6s ease forwards; box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .35); }
.fx-stamp.r-lord { background: var(--gold); color: var(--ink); } .fx-stamp.r-loyal { background: var(--red); } .fx-stamp.r-rebel { background: var(--green); } .fx-stamp.r-spy { background: var(--spy); }
@keyframes stamp { 0% { transform: scale(2.4) rotate(-20deg); opacity: 0; } 25% { transform: scale(1) rotate(-8deg); opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1) rotate(-8deg); } }
body.nofx .fxlayer { display: none; }
body.nofx .seat-tile.cand, body.nofx .st-tag.act, body.nofx .rc:last-child { animation: none; }
@media (prefers-reduced-motion: reduce) { .fxlayer { display: none; } .seat-tile, .cd { transition: none; } }

/* 页脚 */
.hub-footer { flex: 0 0 auto; text-align: center; padding: 6px 0 8px; font-size: 12px; height: var(--hub-footer-h); }
.hub-back-link { color: var(--ink2); text-decoration: none; }
.hub-back-link::before { content: '◆ '; color: var(--red); font-size: 9px; vertical-align: 1px; }

/* ---------------------------------------------------------- 手机细节 */
@media (max-width: 999px) {
  .start-main { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 12px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-art { height: 210px; order: 2; }
  .hero-copy h1 { font-size: 34px; }
  .lobby-main { grid-template-columns: minmax(0, 1fr); padding: 8px; }
  .topbar { padding: 0 8px; gap: 6px; }
  .topbar .logo { width: 30px; height: 30px; }
  .brand b { font-size: 22px; }
  .tb { padding: 0 9px; }
  .modal { align-items: flex-end; padding: 0; }
  .modal-box { width: 100%; max-height: 88vh; border-radius: 16px 16px 0 0; padding-top: 20px; }
  .modal .grab { display: block; }
  .pop .grab { display: block; width: 36px; height: 4px; border-radius: 99px; background: var(--paper4); margin: 0 auto 4px; }
  .modal-box.cardm { width: 100%; }
  .hd-por { width: 90px; height: 120px; }
}
@media (max-width: 380px) {
  :root { --card-w: 58px; --card-h: 83px; }
  .tools .tb { padding: 0 7px; font-size: 12px; }
  .brand small { display: none; }
}
@media (max-height: 700px) and (max-width: 999px) {
  .others { --por-ar: 6 / 5; }
  .table { min-height: 104px; }
  .mn-por { height: 66px; width: 50px; }
}

/* ---------------------------------------------------------- 电脑 */
@media (min-width: 1000px) {
  :root { --card-h: clamp(112px, 19.5dvh, 196px); --card-w: calc(var(--card-h) * .71); }
  #screen-game { min-height: 0; }
  .game {
    height: calc(100dvh - var(--top-h) - var(--hub-footer-h)); min-height: 600px;
    display: grid; gap: 10px; padding: 8px 12px; max-width: 1800px; width: 100%; margin: 0 auto;
    grid-template-columns: minmax(0, 1fr) clamp(280px, 25vw, 380px);
  }
  .col-mid { height: auto; min-height: 0; padding: 0; gap: 8px; }
  .col-right { padding: 0; min-height: 0; }
  .tab-body { flex: 1 1 0; height: auto; min-height: 0; }
  .others { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); --por-ar: 1 / 1; }
  .others[data-n="5"], .others[data-n="6"], .others[data-n="7"] { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .others[data-n="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .others[data-n="6"] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .others[data-n="1"], .others[data-n="2"], .others[data-n="3"], .others[data-n="4"] { max-width: min(640px, 62dvh); width: 100%; margin: 0 auto; --por-ar: 1 / 1; }
  .st-name b { font-size: 13px; } .st-name small { font-size: 16px; }
  .eqc { font-size: 12px; }
  .table { min-height: 150px; }
  .banner b { font-size: 26px; }
  .cd.mini { --card-h: clamp(76px, 12dvh, 120px); --card-w: calc(var(--card-h) * .71); }
  .cd.mini .cd-name { font-size: 15px; }
  .cd.mini .cd-name { font-size: 14px; } .cd.mini.long .cd-name { font-size: 11px; }
  .rc-cap { font-size: 12px; }
  .mn-por { width: 68px; height: 88px; }
  .cd-name { font-size: 20px; } .cd.long .cd-name { font-size: 15px; }
  .cd-corner b { font-size: 15px; } .cd-corner i { font-size: 14px; }
  .pk-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .pick-panel { padding: 14px 18px; }
  .toast { bottom: 90px; }
}
@media (min-width: 1280px) {
  .game { grid-template-columns: clamp(230px, 18vw, 300px) minmax(0, 1fr) clamp(280px, 22vw, 360px); }
  .col-left { display: flex; flex-direction: column; min-height: 0; overflow: auto; }
  .pick-panel { grid-column: 1 / -1; }
  .annals { display: flex; flex-direction: column; gap: 6px; }
  .an-h { font: 22px/1 var(--brush); color: var(--azure); padding: 2px 4px; }
  .annals { gap: 4px; }
  .an { position: relative; background: var(--paper3); border: 1.5px solid var(--ink); border-left: 5px solid var(--fc, var(--ink3)); border-radius: 8px; padding: 4px 6px; cursor: pointer; font-size: 12px; }
  .an.turn { box-shadow: 0 0 0 2px var(--gold); }
  .an.dead { filter: grayscale(1); opacity: .6; }
  .an-top { display: flex; gap: 6px; align-items: center; }
  .an-top img { width: 30px; height: 36px; object-fit: cover; object-position: 50% 0; border-radius: 4px; background: linear-gradient(0deg, var(--fc), var(--fc2)); flex: 0 0 auto; }
  .an-top > div { flex: 1 1 auto; min-width: 0; }
  .an-top b { font: 17px/1 var(--brush); }
  .an-top small { color: var(--ink2); font-size: 12px; }
  .an-sk { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 2px; }
  .an-sk span { font: 13px/18px var(--brush); padding: 0 5px; border-radius: 3px; background: var(--paper); border: 1px solid var(--paper4); }
  .an-eq { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 3px; }
}

/* 大厅一屏：8 座时座位卡缩一档 */
.seats.cols-3 .seat { padding: 5px 4px; gap: 2px; }
.seats.cols-3 .ring { width: 44px; height: 50px; }
.seats.cols-3 .seat-btns .btn.tiny { min-height: 26px; }
@media (min-width: 1000px) {
  .lobby-main { height: calc(100dvh - var(--top-h) - var(--hub-footer-h)); min-height: 560px; padding-top: 10px; padding-bottom: 8px; }
  .lobby-left, .lobby-right { min-height: 0; overflow: hidden; gap: 8px; padding: 12px; }
  .history { max-height: 3.6em; overflow: hidden; }
  .settings { gap: 9px; }
}
.mn-desc { display: none; }
@media (min-width: 1000px) {
  .mn-main { flex: 0 1 46%; }
  .mn-desc { display: block; flex: 1 1 0; min-width: 0; font-size: 12.5px; line-height: 1.45; border-left: 1px dashed var(--paper4); padding-left: 10px; overflow: hidden; }
  .mn-desc p { margin: 0 0 3px; }
  .mn-desc em { font: 15px var(--brush); font-style: normal; color: #fff; background: var(--fc, var(--azure)); padding: 0 5px; border-radius: 3px; margin-right: 4px; }
  .mn-goal { color: var(--ink2); }
  .tbl-body .cd.mini { --card-h: clamp(76px, 13dvh, 150px); }
  .tbl-body .cd.mini .cd-name { font-size: clamp(13px, 1.9dvh, 20px); }
}
@media (min-width: 1280px) {
  .col-left { overflow: hidden; }
  .annals { flex: 1 1 auto; min-height: 0; }
  .an { flex: 1 1 0; min-height: 0; max-height: 140px; display: flex; flex-direction: column; justify-content: center; }
  .an-top img { width: clamp(30px, 4.6dvh, 56px); height: clamp(36px, 5.6dvh, 68px); }
  .an-top b { font-size: clamp(17px, 2.2dvh, 22px); }
}
@media (min-width: 1000px) and (min-height: 880px) {
  :root { --card-h: clamp(150px, 21dvh, 240px); }
  .others { --por-ar: 5 / 6; }
  .st-info .jades i { width: 10px; height: 12px; }
  .st-name b { font-size: 14px; } .st-name small { font-size: 18px; }
  .eqc { font-size: 13px; line-height: 18px; padding: 0 4px; }
  .mn-por { width: 84px; height: 110px; }
  .mn-top b { font-size: 24px; }
  .eq-slot { height: 36px; } .eq-slot b { font-size: 17px; }
  .skb { min-height: 34px; font-size: 18px; }
  .mn-desc { font-size: 14px; }
  .an { font-size: 13px; }
  .an-sk span { font-size: 15px; line-height: 21px; }
  .tab-body { font-size: 14px; }
  .ab-hint { font-size: 15px; }
}
@media (max-width: 999px) {
  .hero { display: contents; }
  .hero-copy { order: 1; } .entry { order: 2; } .hero-art { order: 3; height: 190px; margin-bottom: 8px; }
  .hero-copy h1 { font-size: 30px; margin-bottom: 6px; }
}
