/* =====================================================================
 * 灯影牌局 · 「夜市皮影戏台」
 *   底：靛蓝夜空 + 远处一串红灯笼；主体：点着灯的绢纱影窗（亮面）；框：朱漆戏台 + 金边。
 *   展示字体：马善政（书法，标题 / 卡名）；数字：Oswald。筹码蓝、倍率红，钱是金。
 * ===================================================================== */
@font-face { font-family: 'DYBrush'; src: url(fonts/mashan-dy.woff2?v=202612022019) format('woff2'); font-display: swap; }
@font-face { font-family: 'DYNum'; src: url(fonts/oswald.woff2) format('woff2'); font-display: swap; }
:root {
  --night: #1c1d4a; --night2: #26286a; --panel: #2e2b6b; --panel2: #3a3680;
  --lac: #8e1b14; --lac2: #b8261c; --gold: #f6b93b; --gold2: #ffd772;
  --cloth: #fbe7b6; --cloth2: #f2c86f; --paper: #fbf3df; --ink: #2a140c; --ink2: #5a3a2a;
  --chips: #2f7de1; --mult: #e8452f; --money: #f6b93b; --jade: #22a476;
  --txt: #f6efe0; --txt2: #c9c3e6;
  --top-h: 48px; --hub-footer-h: 30px;
  --cw: 58px; --jw: 56px;
  --r: 10px;
  --fz: 14px;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font: var(--fz)/1.45 -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; color: var(--txt);
  background:
    radial-gradient(ellipse 60% 40% at 50% 115%, rgba(246, 185, 59, .28), transparent 70%),
    radial-gradient(ellipse 80% 55% at 50% -10%, #3b3a92 0%, transparent 70%),
    linear-gradient(180deg, #171842 0%, var(--night) 55%, #241a4a 100%);
  background-attachment: fixed; overscroll-behavior-y: none;
}
body::before { /* 一串远处的灯笼 */
  content: ''; position: fixed; left: 0; right: 0; top: 0; height: 64px; pointer-events: none; z-index: 0; opacity: .55;
  background:
    radial-gradient(circle at 6% 40px, #ff6b4a 0 7px, rgba(255, 107, 74, .25) 8px 18px, transparent 19px),
    radial-gradient(circle at 22% 46px, #ff6b4a 0 6px, rgba(255, 107, 74, .22) 7px 16px, transparent 17px),
    radial-gradient(circle at 41% 38px, #ffb347 0 6px, rgba(255, 179, 71, .22) 7px 15px, transparent 16px),
    radial-gradient(circle at 60% 46px, #ff6b4a 0 7px, rgba(255, 107, 74, .22) 8px 17px, transparent 18px),
    radial-gradient(circle at 78% 40px, #ffb347 0 6px, rgba(255, 179, 71, .22) 7px 15px, transparent 16px),
    radial-gradient(circle at 94% 46px, #ff6b4a 0 7px, rgba(255, 107, 74, .25) 8px 18px, transparent 19px);
}
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
.app-shell { position: relative; z-index: 1; }
.screen { display: none; }
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: block; }
.dim { color: var(--txt2); }
b.cb, .cb { color: #7fb6ff; } b.mb, .mb { color: #ff8a73; }
.red { color: #ff7a66; }

/* ---------- 滚动条 */
.scrolly, .modal-box, .tab-body { scrollbar-width: thin; scrollbar-color: rgba(246, 185, 59, .55) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(246, 185, 59, .5); border-radius: 6px; }

/* ---------- 顶栏 */
.topbar { height: var(--top-h); display: flex; align-items: center; gap: 8px; padding: 0 10px; position: sticky; top: 0; z-index: 30;
  background: linear-gradient(180deg, #a3231a, var(--lac)); border-bottom: 3px solid var(--gold); box-shadow: 0 2px 0 #4a0d08; }
.logo { width: 36px; height: 36px; flex: none; filter: drop-shadow(0 1px 0 #4a0d08); }
.brand { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand b { font-family: 'DYBrush', serif; font-size: 22px; font-weight: 400; color: var(--gold2); letter-spacing: 1px; text-shadow: 0 2px 0 #4a0d08; }
.brand small { font-size: 11.5px; color: #ffd9c8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp { flex: 1; }
.tools { display: flex; gap: 6px; flex: none; }
.tb { height: 32px; padding: 0 11px; border-radius: 8px; border: 2px solid var(--gold); background: #6e140e; color: var(--gold2); font-size: 13px; font-weight: 700; white-space: nowrap; }
.tb.off { opacity: .55; text-decoration: line-through; }
.tb.warn { border-color: #ffb3a6; color: #ffd6cc; }
.tb.on { background: var(--gold); color: var(--ink); }
.netbar { position: fixed; top: 0; left: 0; right: 0; z-index: 99; background: #ffcf4a; color: var(--ink); text-align: center; font-weight: 700; padding: 6px; }

/* ---------- 按钮 */
.btn { border: 0; border-radius: 10px; padding: 10px 14px; font-weight: 800; font-size: 15px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1.15;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .35); transition: transform .08s, box-shadow .08s, filter .15s; min-height: 44px; }
.btn small { font-size: 11.5px; font-weight: 600; opacity: .9; }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.btn:disabled { filter: grayscale(.8) brightness(.75); box-shadow: none; }
.btn.main { background: linear-gradient(180deg, #ff5a45, #d8301f); color: #fff; }
.btn.gold { background: linear-gradient(180deg, #ffd772, #f2a51f); color: var(--ink); }
.btn.blue { background: linear-gradient(180deg, #4f97ff, #2563c9); color: #fff; }
.btn.sec { background: #ece4cf; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px rgba(42, 20, 12, .35); }
.btn.warn-ghost { background: transparent; color: #ffb3a6; box-shadow: inset 0 0 0 2px rgba(255, 179, 166, .5); }
.btn.big { width: 100%; font-size: 16px; padding: 12px; }
.btn.tiny { min-height: 28px; padding: 3px 8px; font-size: 12px; }
.btn.play { background: linear-gradient(180deg, #4f97ff, #1f5ec4); color: #fff; min-width: 110px; }
.btn.disc { background: linear-gradient(180deg, #ff6a52, #c52a18); color: #fff; min-width: 110px; }
.row-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.inp { width: 100%; height: 46px; border-radius: 10px; border: 2px solid #c9a35b; background: var(--paper); color: var(--ink); font-size: 16px; padding: 0 12px; }
.inp.code { text-transform: uppercase; letter-spacing: 6px; text-align: center; font-family: 'DYNum', monospace; }
.hint { color: var(--txt2); font-size: 13px; }

/* ---------- 开始页 */
.start-main { display: grid; gap: 14px; padding: 12px; max-width: 1240px; margin: 0 auto; }
@media (min-width: 1000px) { .start-main { grid-template-columns: 1fr 380px; align-items: center; min-height: calc(100dvh - var(--top-h) - var(--hub-footer-h)); padding: 18px 24px; } }
.hero { display: grid; gap: 12px; }
.hero-screen { position: relative; height: 260px; border-radius: 16px; overflow: hidden; border: 4px solid var(--lac); box-shadow: 0 0 0 3px var(--gold), 0 10px 30px rgba(0, 0, 0, .45);
  background: radial-gradient(ellipse at 50% 55%, #fff6d8 0%, var(--cloth) 45%, var(--cloth2) 100%); }
.hs-glow { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(120, 70, 20, .05) 0 2px, transparent 2px 9px); }
.hs-jokers { position: absolute; top: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; }
.hs-plaque { position: absolute; top: 108px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; }
.hs-plaque b { font-family: 'DYNum'; font-size: 26px; padding: 2px 12px; border-radius: 8px; color: #fff; }
.hs-plaque .pc-chips { background: var(--chips); } .hs-plaque .pc-mult { background: var(--mult); } .hs-plaque i { color: var(--ink); font-style: normal; font-size: 22px; font-weight: 900; }
.hs-cards { position: absolute; bottom: -6px; left: 0; right: 0; height: 110px; }
.hs-cards .fan { position: absolute; left: 50%; bottom: 0; transform: translateX(calc(-50% + var(--i) * 46px)) rotate(calc(var(--i) * 7deg)); transform-origin: 50% 140%; }
.hero-copy h1 { font-family: 'DYBrush', serif; font-weight: 400; font-size: 32px; line-height: 1.2; margin: 6px 0; color: var(--gold2); text-shadow: 0 3px 0 #120f33; }
.hero-copy h1 em { font-style: normal; color: #ff8a73; }
.hero-copy p { margin: 6px 0; color: var(--txt); }
.hero-copy p b { color: var(--gold2); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hero-tags span { background: rgba(246, 185, 59, .16); border: 1px solid rgba(246, 185, 59, .55); color: var(--gold2); border-radius: 20px; padding: 2px 10px; font-size: 12.5px; }
.entry { background: linear-gradient(180deg, #fff7e6, var(--paper)); color: var(--ink); border-radius: 16px; padding: 16px; display: grid; gap: 9px; border: 4px solid var(--lac); box-shadow: 0 0 0 3px var(--gold), 0 10px 30px rgba(0, 0, 0, .4); }
.entry-logo { width: 56px; height: 56px; justify-self: center; }
.entry h2 { font-family: 'DYBrush'; font-weight: 400; margin: 0; text-align: center; font-size: 26px; color: var(--lac); }
.lbl { font-size: 13px; font-weight: 700; color: var(--ink2); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.resume-box { max-width: 380px; margin: 18vh auto 0; text-align: center; background: var(--paper); color: var(--ink); padding: 22px; border-radius: 16px; display: grid; gap: 10px; border: 4px solid var(--lac); }
.resume-logo { width: 64px; height: 64px; justify-self: center; }

/* ---------- 大厅 */
.panel { background: linear-gradient(180deg, var(--panel2), var(--panel)); border-radius: 14px; border: 2px solid rgba(246, 185, 59, .5); padding: 12px; box-shadow: 0 6px 0 rgba(0, 0, 0, .25); }
.lobby-main { display: grid; gap: 12px; padding: 12px; max-width: 1400px; margin: 0 auto; }
@media (min-width: 1000px) { .lobby-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); height: calc(100dvh - var(--top-h) - var(--hub-footer-h)); } .lobby-right { overflow: auto; } }
.lobby-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.lobby-head b { font-family: 'DYBrush'; font-weight: 400; font-size: 22px; color: var(--gold2); }
.pill { background: var(--gold); color: var(--ink); border-radius: 20px; padding: 2px 10px; font-weight: 800; font-size: 13px; }
.seats { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seat { background: rgba(255, 255, 255, .06); border: 2px dashed rgba(255, 255, 255, .25); border-radius: 12px; padding: 10px 6px; text-align: center; min-height: 112px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.seat.taken { border: 2px solid var(--sc); background: rgba(255, 255, 255, .1); }
.tok { width: 40px; height: 40px; border-radius: 50%; background: var(--sc, #555); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 18px; border: 2px solid #fff3; }
.tok.empty { background: transparent; border: 2px dashed #fff4; }
.seat .nm { font-weight: 800; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tags { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.tag { font-size: 11px; padding: 0 6px; border-radius: 6px; background: #fff2; font-style: normal; }
.tag.host { background: var(--gold); color: var(--ink); } .tag.you { background: var(--chips); } .tag.bot { background: #6c5ce7; } .tag.off { background: #777; }
.lobby-ctl { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.lobby-go { display: grid; gap: 8px; margin-top: 10px; }
.scoreboard { font-size: 13px; color: var(--gold2); margin: 6px 0; }
.set-row { margin-bottom: 12px; }
.set-row > b { display: block; margin-bottom: 5px; color: var(--gold2); font-size: 14px; }
.set-row > small { display: block; color: var(--txt2); font-size: 12px; margin-top: 4px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 2px solid rgba(246, 185, 59, .4); background: rgba(0, 0, 0, .2); border-radius: 9px; padding: 6px 10px; font-weight: 700; font-size: 13.5px; display: flex; flex-direction: column; align-items: flex-start; min-height: 40px; text-align: left; }
.seg button small { font-size: 11.5px; color: var(--txt2); font-weight: 500; }
.seg button.on { background: var(--gold); color: var(--ink); border-color: var(--gold2); }
.seg button.on small { color: var(--ink2); }
.set-note { font-size: 13px; color: var(--txt); background: rgba(0, 0, 0, .2); border-radius: 10px; padding: 10px; line-height: 1.6; }
.set-note b { color: var(--gold2); }

/* ============================================================ 牌面 */
/* 扑克牌：米黄纸 + 朱砂 / 墨黑 */
.pc { position: relative; width: var(--cw); height: calc(var(--cw) * 1.4); flex: none; border-radius: 7px; background: linear-gradient(160deg, #fffaf0, #f4e8cc); color: #1d1a2e;
  border: 1.5px solid #8a6a45; box-shadow: 0 3px 0 rgba(42, 20, 12, .35); user-select: none; overflow: hidden; transition: transform .14s, box-shadow .14s; cursor: pointer; }
.pc.red { color: #c8261f; }
.pc .rk { position: absolute; left: 4px; top: 1px; font-family: 'DYNum'; font-weight: 700; font-size: calc(var(--cw) * .32); line-height: 1; }
.pc .su { position: absolute; left: 4px; top: calc(var(--cw) * .33); font-size: calc(var(--cw) * .24); line-height: 1; }
.pc .mid { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); font-size: calc(var(--cw) * .5); line-height: 1; }
.pc .mid.face { font-family: 'DYBrush'; font-size: calc(var(--cw) * .56); width: 72%; height: 58%; display: grid; place-items: center; border-radius: 6px; background: linear-gradient(180deg, rgba(246, 185, 59, .35), rgba(224, 54, 44, .18)); border: 1.5px solid currentColor; }
.pc .rk2 { position: absolute; right: 3px; bottom: 1px; font-family: 'DYNum'; font-size: calc(var(--cw) * .18); transform: rotate(180deg); opacity: .75; }
.pc .badge { position: absolute; left: 0; right: 0; bottom: 0; font-style: normal; font-size: 10.5px; line-height: 15px; text-align: center; font-weight: 800; color: #fff; background: rgba(42, 20, 12, .78); }
.pc .seal { position: absolute; right: 3px; top: 3px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #2a140c; }
.seal-red { background: #e0362c; } .seal-gold { background: #f6b93b; } .seal-blue { background: #2f7de1; } .seal-purple { background: #9b59d0; }
.pc .perm { position: absolute; right: 2px; top: 20px; font-style: normal; font-size: 10px; font-weight: 800; color: var(--chips); }
.pc.enh-bonus { background: linear-gradient(160deg, #e9f3ff, #bcd8ff); }
.pc.enh-red { background: linear-gradient(160deg, #fff0ec, #ffc1b3); }
.pc.enh-glass { background: linear-gradient(135deg, rgba(232, 248, 255, .95), rgba(170, 220, 240, .9) 50%, rgba(240, 252, 255, .95)); border-color: #5aa9c9; }
.pc.enh-steel { background: linear-gradient(160deg, #e9edf2, #aeb8c4 60%, #dfe4ea); border-color: #5d6875; }
.pc.enh-stone { background: repeating-linear-gradient(45deg, #9a948a 0 6px, #8b857b 6px 12px); border-color: #5b554c; }
.pc.enh-gold { background: linear-gradient(160deg, #fff3c4, #f2c34a 60%, #ffe28a); border-color: #b4861c; }
.pc.enh-wild { background: conic-gradient(from 45deg, #ffd1cc, #fff1b8, #ccf3dc, #cfe1ff, #ead4ff, #ffd1cc); }
.pc.enh-lucky { background: linear-gradient(160deg, #eaffe9, #a8e5b0); }
.stone-g { position: absolute; inset: 0; display: grid; place-items: center; font-family: 'DYBrush'; font-size: calc(var(--cw) * .6); color: #f2ece0; text-shadow: 0 2px 0 #4a443b; }
.pc.ed-gilt { box-shadow: 0 3px 0 rgba(42, 20, 12, .35), inset 0 0 0 3px rgba(246, 185, 59, .9); }
.pc.ed-flow::after, .jk.ed-flow::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 20%, rgba(255, 90, 140, .28) 40%, rgba(90, 180, 255, .28) 60%, transparent 80%); pointer-events: none; }
.pc.ed-poly::after, .jk.ed-poly::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 0, 80, .22), rgba(255, 210, 0, .22), rgba(0, 220, 120, .22), rgba(0, 140, 255, .22), rgba(200, 0, 255, .22)); mix-blend-mode: multiply; pointer-events: none; }
.pc.debuff { filter: grayscale(1) brightness(.75); }
.pc.debuff::before { content: '失效'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-18deg); font-size: 12px; font-weight: 900; color: #fff; background: #555; padding: 0 5px; border-radius: 4px; z-index: 2; }
.pc.down { background: repeating-linear-gradient(45deg, #8e1b14 0 5px, #6e140e 5px 10px); border-color: var(--gold); }
.back-pat { position: absolute; inset: 5px; border: 1.5px solid var(--gold); border-radius: 4px; }
.pc.mini { --cw: 34px; }
.pc.mini .badge { font-size: 0; height: 4px; }

/* 戏偶：脸谱 + 名条 */
.jk { position: relative; width: var(--jw); height: calc(var(--jw) * 1.36); flex: none; border-radius: 9px; overflow: hidden; cursor: pointer; user-select: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--f1) 25%, #fff3d6), #fbeac0); border: 2.5px solid var(--rc); box-shadow: 0 3px 0 rgba(0, 0, 0, .4); transition: transform .14s; }
.jk-art { position: absolute; left: 0; right: 0; top: 2px; height: 72%; display: grid; place-items: center; }
.jk .mask { width: 82%; height: 92%; }
.jk-ch { position: absolute; right: 3px; top: 1px; font-family: 'DYBrush'; font-size: calc(var(--jw) * .26); color: var(--rc); line-height: 1; text-shadow: 0 1px 0 #fff; }
.jk-nm { position: absolute; left: 0; right: 0; bottom: 0; height: 26%; display: grid; place-items: center; background: var(--rc); color: #fff; font-family: 'DYBrush'; font-size: clamp(11px, calc(var(--jw) * .2), 17px); line-height: 1; white-space: nowrap; overflow: hidden; letter-spacing: .5px; }
.jk.r4 { border-color: #c79bff; box-shadow: 0 3px 0 rgba(0, 0, 0, .4), 0 0 12px rgba(199, 155, 255, .7); }
.jk.r4 .jk-nm { background: linear-gradient(90deg, #7d3cc0, #c0399b); }
.jk.off { filter: grayscale(1) brightness(.6); }
.edtag { position: absolute; left: 2px; top: 2px; font-style: normal; font-size: 10px; font-weight: 800; padding: 0 4px; border-radius: 4px; background: #2a140c; color: var(--gold2); z-index: 2; }
.jk.ed-shadow { background: linear-gradient(180deg, #3b2f5c, #1b1530); }
.jk.ed-gilt { box-shadow: 0 3px 0 rgba(0, 0, 0, .4), inset 0 0 0 3px var(--gold); }
.price { position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%); background: var(--gold); color: var(--ink); font-family: 'DYNum'; font-size: 13px; padding: 0 7px; border-radius: 7px 7px 0 0; z-index: 3; box-shadow: 0 0 0 2px #2a140c; }
.price::before { content: '¤'; margin-right: 1px; font-size: 11px; }

/* 消耗：符纸 / 星盘 / 秘卷 */
.cc { position: relative; width: calc(var(--jw) * .86); height: calc(var(--jw) * 1.36); flex: none; border-radius: 8px; overflow: hidden; cursor: pointer; user-select: none; box-shadow: 0 3px 0 rgba(0, 0, 0, .4); transition: transform .14s; }
.cc-nm { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 10.5px; font-weight: 800; line-height: 15px; color: #fff; background: rgba(0, 0, 0, .55); white-space: nowrap; overflow: hidden; }
.t-fu { background: linear-gradient(180deg, #ffe680, #f5c833); border: 2px solid #c8261f; }
.fu-paper { position: absolute; inset: 3px 5px 16px; border: 1.5px solid #c8261f; display: flex; flex-direction: column; align-items: center; color: #c8261f; }
.fu-top { font-size: 9px; font-weight: 900; letter-spacing: 1px; margin-top: 1px; }
.fu-g { font-family: 'DYBrush'; font-size: calc(var(--jw) * .3); writing-mode: vertical-rl; line-height: 1; margin-top: 2px; }
.fu-lines { flex: 1; width: 2px; background: repeating-linear-gradient(180deg, #c8261f 0 3px, transparent 3px 6px); margin: 2px 0; }
.t-xp { background: radial-gradient(circle at 50% 40%, #2c3f8f, #121a46); border: 2px solid #7fb6ff; }
.xp-disc { position: absolute; left: 50%; top: 42%; width: 78%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(var(--rot)); border-radius: 50%; border: 2px solid #ffd772;
  background: conic-gradient(from 0deg, rgba(127, 182, 255, .25), rgba(255, 215, 114, .35), rgba(127, 182, 255, .25)); }
.xp-ring { position: absolute; inset: 22%; border-radius: 50%; border: 1.5px dashed #ffd772; }
.xp-g { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(calc(var(--rot) * -1)); font-family: 'DYBrush'; color: #fff6d8; font-size: 12px; white-space: nowrap; text-shadow: 0 1px 0 #000; }
.t-mj { background: linear-gradient(180deg, #4b2a7a, #2a1650); border: 2px solid #c79bff; }
.mj-scroll { position: absolute; left: 12%; right: 12%; top: 10%; bottom: 22%; background: linear-gradient(90deg, #d8c08a, #f6e7c0 20%, #f6e7c0 80%, #d8c08a); border-radius: 3px; display: grid; place-items: center; box-shadow: 0 -3px 0 #8a5a2a, 0 3px 0 #8a5a2a; }
.mj-g { font-family: 'DYBrush'; color: #5a1e8a; font-size: calc(var(--jw) * .28); }

/* 锦囊 / 行头 */
.pk { position: relative; width: calc(var(--jw) * 1.0); height: calc(var(--jw) * 1.36); flex: none; cursor: pointer; border-radius: 40% 40% 12px 12px / 30% 30% 12px 12px; box-shadow: 0 3px 0 rgba(0, 0, 0, .4); transition: transform .14s; overflow: hidden; }
.pk.p-fu { background: linear-gradient(180deg, #ff6a52, #b8261c); } .pk.p-xp { background: linear-gradient(180deg, #3f6fd8, #1b2f7a); } .pk.p-jk { background: linear-gradient(180deg, #2fb889, #136b4c); } .pk.p-pc { background: linear-gradient(180deg, #f2a51f, #a8650a); } .pk.p-mj { background: linear-gradient(180deg, #9b59d0, #4b2a7a); }
.pk.big { outline: 2px dashed var(--gold2); outline-offset: -5px; }
.pk-knot { position: absolute; left: 50%; top: 10%; width: 40%; height: 8px; transform: translateX(-50%); background: var(--gold); border-radius: 4px; box-shadow: 0 0 0 1.5px #2a140c; }
.pk-g { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); width: 54%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: #fff3d6; color: var(--lac); font-family: 'DYBrush'; font-size: calc(var(--jw) * .3); border: 2px solid var(--gold); }
.pk-nm { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 10.5px; font-weight: 800; color: #fff; text-shadow: 0 1px 0 #000; line-height: 1.1; padding: 0 2px; }
.vc { position: relative; width: calc(var(--jw) * 1.15); height: calc(var(--jw) * 1.36); flex: none; cursor: pointer; border-radius: 10px; background: radial-gradient(circle at 50% 35%, #fff3c4, #f2b84a 70%); border: 3px double #8a5a10; box-shadow: 0 3px 0 rgba(0, 0, 0, .4); transition: transform .14s; }
.vc-g { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); font-family: 'DYBrush'; font-size: calc(var(--jw) * .36); color: var(--lac); }
.vc-nm { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 11px; font-weight: 800; color: var(--ink); }
.lift { transform: translateY(-8px) scale(1.04) !important; z-index: 5; }
.bump { animation: bump .28s ease-out; }
@keyframes bump { 40% { transform: translateY(-10px) scale(1.12) rotate(-3deg); } }

/* ============================================================ 对局布局 */
.game { display: flex; flex-direction: column; gap: 6px; padding: 6px 8px 10px; }
.col-info { display: none; }
.col-mid { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.col-side { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 2px solid rgba(246, 185, 59, .45); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }

/* 状态（手机顶部 / 电脑左栏） */
.ms-a { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.blindbox { border-radius: 10px; padding: 5px 8px; background: linear-gradient(180deg, #3a3680, #2b2866); border: 2px solid rgba(246, 185, 59, .5); min-width: 0; }
.blindbox.k2 { background: linear-gradient(180deg, #7a1a3a, #4a0f28); border-color: #ff8a73; }
.bb-name { font-family: 'DYBrush'; font-size: 18px; color: var(--gold2); line-height: 1.1; }
.bb-rule { font-size: 11.5px; color: #ffd6cc; line-height: 1.25; }
.bb-score { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--txt2); }
.bb-score b { font-family: 'DYNum'; font-size: 16px; color: #fff; }
.bb-score.now b { color: var(--gold2); font-size: 18px; }
.plaque { border-radius: 10px; padding: 5px 6px; background: linear-gradient(180deg, #2a140c, #45231a); border: 2px solid var(--gold); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.pl-hand { font-family: 'DYBrush'; font-size: 16px; text-align: center; color: var(--gold2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.pl-hand small { font-family: 'DYNum'; font-size: 11px; color: #ffd9a0; }
.pl-row { display: flex; align-items: center; justify-content: center; gap: 4px; }
.pl-row b { font-family: 'DYNum'; font-size: 20px; font-weight: 700; min-width: 0; flex: 1; text-align: center; border-radius: 7px; color: #fff; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; }
.pl-chips { background: var(--chips); } .pl-mult { background: var(--mult); }
.pl-row i { font-style: normal; font-weight: 900; color: var(--gold2); }
.counters { display: flex; gap: 5px; margin-top: 6px; }
.ct { flex: 1; text-align: center; border-radius: 9px; padding: 2px 2px; background: rgba(0, 0, 0, .28); border: 1.5px solid rgba(255, 255, 255, .12); min-width: 0; }
.ct b { display: block; font-family: 'DYNum'; font-size: 18px; line-height: 1.15; }
.ct b small { font-size: 11px; opacity: .7; }
.ct span { font-size: 11px; color: var(--txt2); }
.ct.hands b { color: #7fb6ff; } .ct.disc b { color: #ff8a73; } .ct.money b { color: var(--gold2); } .ct.lives b { color: #ff6b6b; font-size: 14px; letter-spacing: -1px; }

/* 戏偶架 */
.rack { display: flex; gap: 6px; }
.rk-j, .rk-c { background: rgba(0, 0, 0, .22); border-radius: 10px; padding: 3px 5px 5px; border: 1.5px solid rgba(246, 185, 59, .3); min-width: 0; }
.rk-j { flex: 1; } .rk-c { flex: none; }
.rk-lab { font-size: 11px; color: var(--txt2); line-height: 15px; }
.rk-row { display: flex; gap: 4px; align-items: flex-end; min-height: calc(var(--jw) * 1.36); }
.rk-j .rk-row { justify-content: flex-start; }
.slot { border: 2px dashed rgba(255, 255, 255, .18); border-radius: 8px; flex: none; }
.jslot { width: var(--jw); height: calc(var(--jw) * 1.36); }
.cslot { width: calc(var(--jw) * .86); height: calc(var(--jw) * 1.36); }

/* 影窗舞台 */
.stage { position: relative; border-radius: 14px; border: 4px solid var(--lac); box-shadow: 0 0 0 2px var(--gold), inset 0 0 40px rgba(160, 90, 20, .35); min-height: 196px; overflow: hidden; color: var(--ink);
  background: radial-gradient(ellipse at 50% 45%, #fffbe8 0%, var(--cloth) 50%, var(--cloth2) 100%); }
.stage::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(120, 70, 20, .05) 0 2px, transparent 2px 9px); pointer-events: none; }
.screen-cloth { position: relative; height: 100%; min-height: 188px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px; }
.played { display: flex; gap: 6px; justify-content: center; min-height: calc(var(--cw) * 1.4); }
.played .pc.dim { opacity: .45; transform: translateY(8px); }
.played .pc.scoring { transform: translateY(-4px); }
.pc.ghost { background: transparent; border: 2px dashed rgba(42, 20, 12, .3); box-shadow: none; }
.stage-hint { font-size: 13px; color: var(--ink2); text-align: center; }
.stage-hint b { color: var(--lac); }
.score-title { font-family: 'DYBrush'; font-size: 26px; color: var(--lac); line-height: 1; }
.score-sum { min-height: 34px; text-align: center; }
.score-sum b { font-family: 'DYNum'; font-size: 30px; color: var(--lac); display: block; line-height: 1; }
.score-sum small { color: var(--ink2); }

/* 选场：三盏灯笼 */
.blinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px 8px; height: 100%; align-items: stretch; }
.lantern { position: relative; display: flex; flex-direction: column; align-items: stretch; opacity: .8; }
.lantern.cur { opacity: 1; } .lantern.done { opacity: .45; }
.ln-cap, .ln-tail { height: 9px; margin: 0 26%; background: var(--gold); border-radius: 4px; box-shadow: 0 0 0 1.5px var(--ink); }
.ln-tail { height: 12px; margin: 0 44%; background: var(--lac); border-radius: 0 0 6px 6px; }
.ln-body { flex: 1; border-radius: 40% 40% 34% 34% / 18% 18% 14% 14%; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 4px; justify-content: center; color: #fff;
  background: radial-gradient(ellipse at 50% 40%, #ff7a5c, #d8301f 60%, #9e1d12); border: 2px solid var(--ink); box-shadow: 0 0 22px rgba(255, 110, 60, .55); }
.lantern.k1 .ln-body { background: radial-gradient(ellipse at 50% 40%, #ffd772, #f2a51f 60%, #a8650a); color: var(--ink); box-shadow: 0 0 22px rgba(255, 200, 80, .55); }
.lantern.k2 .ln-body { background: radial-gradient(ellipse at 50% 40%, #a97fe0, #6a2fb0 60%, #3b1670); box-shadow: 0 0 22px rgba(160, 100, 255, .5); }
.lantern.cur .ln-body { box-shadow: 0 0 0 3px var(--gold2), 0 0 30px rgba(255, 200, 80, .8); }
.ln-name { font-family: 'DYBrush'; font-size: 22px; line-height: 1.05; }
.ln-rule { font-size: 11.5px; line-height: 1.25; background: rgba(0, 0, 0, .25); border-radius: 6px; padding: 2px 3px; }
.ln-t { font-size: 13px; } .ln-t b { font-family: 'DYNum'; font-size: 18px; }
.ln-r, .ln-tag, .ln-done { font-size: 11.5px; opacity: .92; }
.ln-body .btn { padding: 6px 4px; font-size: 14px; min-height: 40px; }
.ln-body .btn.ghost { color: inherit; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); font-size: 12.5px; }
.ln-body .btn.ghost small { font-size: 10.5px; line-height: 1.2; }

/* 结算 */
.cashbox { max-width: 420px; margin: 0 auto; padding: 12px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.cashbox h3 { font-family: 'DYBrush'; font-weight: 400; font-size: 28px; color: var(--lac); margin: 0; text-align: center; }
.cashbox h3 small { font-size: 16px; color: var(--ink2); }
.cash-score { font-family: 'DYNum'; text-align: center; font-size: 20px; color: var(--ink2); }
.cl { display: flex; justify-content: space-between; border-bottom: 1.5px dashed rgba(42, 20, 12, .25); padding: 3px 2px; font-size: 14px; }
.cl b { color: #a8650a; font-family: 'DYNum'; }
.cashbox .btn { margin-top: 8px; }

/* 后台 */
.shop { position: relative; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.shop-h { display: flex; justify-content: space-between; align-items: baseline; }
.shop-h b { font-family: 'DYBrush'; font-size: 22px; color: var(--lac); font-weight: 400; }
.shop-h span { font-weight: 800; color: var(--jade); font-size: 13px; }
.shelf { display: flex; gap: 10px; align-items: flex-end; justify-content: center; flex-wrap: wrap; padding: 6px 4px 8px; border-bottom: 6px solid #8a5a2a; border-radius: 4px; background: linear-gradient(180deg, transparent 70%, rgba(138, 90, 42, .18)); }
.sub-shelf { gap: 8px; }
.sh-lab { writing-mode: vertical-rl; font-family: 'DYBrush'; color: var(--lac); font-size: 16px; align-self: center; }
.empty-v { width: calc(var(--jw) * 1.15); height: calc(var(--jw) * 1.36); display: grid; place-items: center; font-size: 11px; color: var(--ink2); text-align: center; border-color: rgba(42, 20, 12, .25); padding: 4px; }
.main-shelf .jk, .main-shelf .cc { --jw: calc(var(--cw) * 1.05); }
.sub-shelf .vc, .sub-shelf .pk, .sub-shelf .empty-v { --jw: calc(var(--cw) * .82); }

/* 锦囊 */
.packview { position: relative; padding: 10px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.pv-h { display: flex; gap: 10px; align-items: baseline; }
.pv-h b { font-family: 'DYBrush'; font-size: 22px; color: var(--lac); font-weight: 400; }
.pv-h span { font-weight: 800; color: var(--jade); }
.pv-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.pv-row .jk, .pv-row .cc { --jw: calc(var(--cw) * 1.12); }
.pv-tip { font-size: 12.5px; color: var(--ink2); text-align: center; }
.endbox { padding: 18px; text-align: center; position: relative; }
.endbox h2 { font-family: 'DYBrush'; font-weight: 400; font-size: 34px; margin: 0 0 6px; color: var(--lac); }
.endbox.lose h2 { color: #5a3a2a; }

/* 手牌 */
.handwrap { position: relative; container-type: inline-size; padding: 14px 4px 4px; min-height: calc(var(--cw) * 1.4 + 20px); }
.handwrap.empty { min-height: 0; padding: 2px; }
.hand { display: flex; justify-content: center; align-items: flex-end; padding-right: 40px; }
.hand .pc + .pc { margin-left: min(5px, calc((100cqw - 48px - var(--n) * var(--cw)) / max(var(--n) - 1, 1))); }
.hand .pc.sel { transform: translateY(-14px); box-shadow: 0 0 0 3px var(--gold2), 0 6px 0 rgba(0, 0, 0, .35); z-index: 3; }
.hand .pc.sel.scoring { box-shadow: 0 0 0 3px #7fd1ff, 0 6px 0 rgba(0, 0, 0, .35); }
.deckcount { position: absolute; right: 2px; bottom: 6px; width: 38px; height: 52px; border-radius: 6px; background: repeating-linear-gradient(45deg, #8e1b14 0 5px, #6e140e 5px 10px); border: 2px solid var(--gold); display: grid; place-items: center; font-family: 'DYNum'; color: #fff; font-size: 15px; line-height: 1; text-align: center; }
.deckcount small { display: block; font-size: 10px; opacity: .8; }
.deckline { text-align: center; color: var(--txt2); font-size: 12.5px; padding: 4px; }

/* 底栏 */
.actbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 2px 2px; }
.sortbox { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--txt2); }
.sortbox .tb { height: 34px; padding: 0 8px; }
.money-big { font-family: 'DYNum'; font-size: 22px; color: var(--gold2); }

/* 侧栏 */
.tabs { display: flex; border-bottom: 2px solid rgba(246, 185, 59, .45); }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px 4px; font-weight: 800; color: var(--txt2); min-height: 42px; font-size: 14px; }
.tabs button.on { color: var(--ink); background: var(--gold); }
.tab-body { padding: 8px; overflow: auto; }
.tab-body h4 { margin: 10px 0 4px; color: var(--gold2); font-size: 13.5px; }
.lvt { width: 100%; border-collapse: collapse; font-size: 13px; }
.lvt th { text-align: left; color: var(--txt2); font-weight: 600; font-size: 12px; padding: 2px 3px; }
.lvt td { padding: 4px 3px; border-top: 1px solid rgba(255, 255, 255, .08); }
.lvt td b { font-family: 'DYNum'; }
.lvt tr.up td:first-child { color: var(--gold2); font-weight: 800; }
.lvt tr.secret td { color: #8a86b0; font-size: 12px; }
.vlist .vli { font-size: 12.5px; padding: 3px 0; } .vli b { color: var(--gold2); }
.opps { display: flex; flex-direction: column; gap: 6px; }
.opp { border-radius: 10px; padding: 6px 8px; background: rgba(0, 0, 0, .25); border-left: 4px solid var(--sc); }
.opp.out { opacity: .5; } .opp.you { background: rgba(246, 185, 59, .14); }
.op-h { display: flex; align-items: center; gap: 6px; }
.op-h .tok { width: 24px; height: 24px; font-size: 12px; }
.op-s { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--txt2); margin-top: 2px; }
.hearts { color: #ff6b6b; }
.op-j { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.ojk { font-size: 11px; padding: 0 5px; border-radius: 5px; background: color-mix(in srgb, var(--f1) 70%, #000); color: #fff; }
.duel { font-size: 12.5px; padding: 4px 0; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; flex-wrap: wrap; gap: 6px; }
.duel b { color: var(--gold2); } .duel .lost { color: #ff8a73; } .duel .top { color: #7fe0b0; font-weight: 800; }
.tipbox { font-size: 13px; background: rgba(0, 0, 0, .22); border-radius: 10px; padding: 10px; color: var(--txt2); margin: 6px 0; }
.lg { font-size: 12.5px; padding: 2px 0; border-bottom: 1px dashed rgba(255, 255, 255, .08); }
.lg.g { color: var(--gold2); }
.dsum { font-size: 13px; margin-bottom: 4px; }
.dgrid { border-collapse: collapse; width: 100%; font-size: 12px; text-align: center; }
.dgrid th { color: var(--txt2); font-weight: 600; padding: 1px; } .dgrid th.red { color: #ff8a73; }
.dgrid td { padding: 2px 1px; font-family: 'DYNum'; } .dgrid td.z { color: #5d5a8a; }
.dspecial { display: flex; flex-wrap: wrap; gap: 4px; }
.opp-mini h4 { margin: 8px 0 4px; color: var(--gold2); font-size: 13px; }
.opp-mini .kv { display: flex; justify-content: space-between; font-size: 13px; padding: 2px 0; }
.opp-mini .kv b { color: var(--gold2); }

/* ---------- 小窗 / 弹窗 / 提示 */
.pop { position: fixed; z-index: 60; width: min(300px, calc(100vw - 16px)); background: var(--paper); color: var(--ink); border-radius: 12px; border: 3px solid var(--lac); box-shadow: 0 0 0 2px var(--gold), 0 14px 30px rgba(0, 0, 0, .5); padding: 6px 8px 8px; overscroll-behavior: contain; touch-action: pan-x; }
.grab { width: 40px; height: 4px; border-radius: 3px; background: rgba(42, 20, 12, .25); margin: 0 auto 4px; }
.pop-h { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.pop-h b { font-family: 'DYBrush'; font-weight: 400; font-size: 20px; color: var(--lac); }
.pop-h .rar { font-family: inherit; font-size: 12px; color: var(--ink2); background: rgba(246, 185, 59, .35); border-radius: 6px; padding: 0 5px; }
.pop-x { border: 0; background: transparent; font-size: 18px; width: 36px; height: 36px; color: var(--ink2); }
.pop-info { font-size: 13.5px; } .pop-info p { margin: 2px 0 6px; } .pop-info .edl { color: #7d3cc0; font-weight: 700; }
.pop-row { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; border: 0; border-radius: 9px; background: #efe4c8; margin-top: 5px; padding: 6px 10px; font-weight: 800; color: var(--ink); text-align: left; }
.pop-row small { font-weight: 600; color: var(--ink2); font-size: 12px; }
.pop-row.main { background: linear-gradient(180deg, #ff5a45, #d8301f); color: #fff; } .pop-row.main small { color: #ffe0d8; }
.pop-row.off { background: #e2dccd; color: #9a907c; } .pop-row.off small { color: #a0573a; }
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(10, 8, 30, .62); display: grid; place-items: center; padding: 10px; overscroll-behavior: contain; }
.modal-box { position: relative; width: min(460px, 100%); max-height: 86dvh; overflow: auto; background: var(--paper); color: var(--ink); border-radius: 14px; border: 4px solid var(--lac); box-shadow: 0 0 0 3px var(--gold); padding: 12px 14px 14px; }
.modal-box.wide { width: min(760px, 100%); }
.modal-box h3 { font-family: 'DYBrush'; font-weight: 400; font-size: 24px; margin: 4px 30px 8px 0; color: var(--lac); }
.mx { position: absolute; right: 6px; top: 6px; width: 38px; height: 38px; border: 0; background: transparent; font-size: 20px; color: var(--ink2); }
.rules p { font-size: 13.5px; margin: 4px 0; } .rules h4 { margin: 12px 0 2px; color: var(--lac); }
.rules .src { background: #f7e6b6; border-radius: 8px; padding: 6px 8px; font-weight: 700; }
.rules .cb { color: var(--chips); } .rules .mb { color: var(--mult); }
.jlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 3px 10px; font-size: 12.5px; }
.ranking .rk-row { display: grid; grid-template-columns: 30px 1fr auto auto; gap: 8px; padding: 6px 4px; border-bottom: 1px dashed #c9b88a; align-items: center; }
.ranking .rk-row.first { background: #ffe7a3; border-radius: 8px; font-weight: 800; }
.ranking b { font-family: 'DYNum'; font-size: 18px; color: var(--lac); }
.infobody { font-size: 14px; }
.copybox { margin-top: 8px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--hub-footer-h) + 76px); transform: translateX(-50%); z-index: 80; max-width: min(92vw, 440px); background: #2a140c; color: #fff3d6; border: 2px solid var(--gold); padding: 8px 14px; border-radius: 10px; font-size: 14px; text-align: center; box-shadow: 0 8px 20px rgba(0, 0, 0, .4); }

/* ---------- 演出层 */
.fxlayer { position: fixed; inset: 0; pointer-events: none; z-index: 65; }
.fxp { position: fixed; transform: translate(-50%, -100%); font-family: 'DYNum'; font-weight: 700; font-size: 18px; white-space: nowrap; animation: fxup .8s ease-out forwards; padding: 0 6px; border-radius: 6px; }
.fxp.pop-chips { background: var(--chips); color: #fff; } .fxp.pop-mult { background: var(--mult); color: #fff; } .fxp.pop-x { background: #fff; color: var(--mult); box-shadow: 0 0 0 2px var(--mult); }
.fxp.pop-money, .fxp.money { background: var(--gold); color: var(--ink); } .fxp.money.neg { background: #555; color: #fff; }
.fxp.pop-msg { background: #2a140c; color: var(--gold2); font-family: inherit; font-size: 13px; }
@keyframes fxup { 0% { opacity: 0; transform: translate(-50%, -60%) scale(.7); } 20% { opacity: 1; transform: translate(-50%, -110%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }
.fxp.banner { transform: translate(-50%, -50%); animation: ban 1.7s ease-out forwards; font-family: 'DYBrush'; font-weight: 400; font-size: 44px; padding: 6px 28px; border-radius: 14px; background: var(--lac); color: var(--gold2); border: 3px solid var(--gold); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.fxp.banner.lose { background: #3a3555; color: #e8e2ff; border-color: #8a86b0; }
.fxp.banner.big { font-size: 60px; }
@keyframes ban { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.5) rotate(-6deg); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.08) rotate(2deg); } 25% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%); } }
body.nofx .bump { animation: none; }
@media (prefers-reduced-motion: reduce) { .fxp, .bump { animation: none !important; } }

/* ---------- 页脚 */
.hub-footer { text-align: center; padding: 6px; font-size: 12px; position: relative; z-index: 1; }
.hub-footer a { color: var(--txt2); text-decoration: none; }

/* ============================================================ 手机 */
@media (max-width: 999px) {
  :root { --cw: 54px; --jw: 50px; }
  .tb { padding: 0 8px; font-size: 12.5px; }
  .brand b { font-size: 19px; }
  .stage { min-height: 200px; }
  .blinds { gap: 5px; padding: 8px 5px; }
  .ln-name { font-size: 18px; }
  .ln-body { padding: 8px 4px; }
  .actbar .btn { min-width: 0; flex: 1; }
  .sortbox span { display: none; }
  .col-side { min-height: 320px; }
  .tab-body { max-height: 60vh; }
}
@media (max-width: 380px) { :root { --cw: 50px; --jw: 46px; } .counters .ct span { font-size: 10px; } }

/* ============================================================ 电脑：三栏一屏 */
@media (min-width: 1000px) {
  :root { --cw: clamp(56px, calc((100dvh - 500px) / 2.9), 96px); --jw: clamp(52px, calc((100dvh - 500px) / 3.6), 84px); }
  .game { height: calc(100dvh - var(--top-h) - var(--hub-footer-h)); display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 26vw, 400px); gap: 10px; padding: 8px 12px; max-width: 1800px; margin: 0 auto; }
  .col-mid { min-height: 0; }
  .stage { flex: 1 1 auto; min-height: 0; overflow: auto; }
  .col-side { min-height: 0; }
  .tab-body { flex: 1 1 0; min-height: 0; }
  .mstatus { display: block; }
  .actbar { justify-content: center; gap: 18px; }
  .actbar .btn { min-width: 150px; }
}
@media (min-width: 1280px) {
  .game { grid-template-columns: clamp(250px, 19vw, 320px) minmax(0, 1fr) clamp(300px, 23vw, 380px); }
  .col-info { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; }
  .col-info .blindbox { padding: 10px 12px; } .col-info .bb-name { font-size: 26px; } .col-info .bb-rule { font-size: 13px; margin: 2px 0 4px; }
  .col-info .bb-score b { font-size: 22px; } .col-info .bb-score.now b { font-size: 26px; } .col-info .bb-score { font-size: 13px; }
  .col-info .plaque { padding: 10px; } .col-info .pl-hand { font-size: 22px; } .col-info .pl-row b { font-size: 30px; padding: 2px 6px; }
  .col-info .counters { flex-wrap: wrap; } .col-info .ct { flex: 1 1 28%; padding: 4px; } .col-info .ct b { font-size: 24px; } .col-info .ct span { font-size: 12px; }
  .col-info .opp-mini { background: rgba(0, 0, 0, .2); border-radius: 10px; padding: 4px 10px 8px; flex: 1; }
  .mstatus { display: none; }
}

/* 后台：货架和行头/锦囊并排（宽影窗），窄了自动换行 */
.shop { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; align-content: center; min-height: 100%; }
.shop-h { grid-column: 1 / -1; }
.shop .shelf { margin: 0; align-content: flex-end; }
.stage:has(.shop), .stage:has(.packview), .stage:has(.cashbox) { overflow: auto; }

/* 货架 / 锦囊：卡旁边直接写技能（不用再点开看） */
.shop { display: flex; flex-direction: column; gap: 6px; justify-content: center; min-height: 100%; }
.shop .shelf { justify-content: center; gap: 8px 12px; padding: 4px 4px 8px; }
.it-wrap { display: flex; flex-direction: row; align-items: flex-start; gap: 5px; }
.it-desc { width: clamp(96px, calc(var(--cw) * 1.2), 124px); font-size: 11.5px; line-height: 1.35; color: var(--ink); background: rgba(255, 250, 235, .94); border: 1.5px solid rgba(142, 27, 20, .35); border-radius: 7px; padding: 3px 6px 4px; text-align: left; align-self: stretch; }
.it-desc b { display: block; font-family: 'DYBrush'; font-weight: 400; font-size: 14px; color: var(--lac); line-height: 1.2; margin-bottom: 1px; }
.it-desc em { display: block; font-style: normal; color: #7d3cc0; font-weight: 700; margin-top: 2px; }
.main-shelf .jk, .main-shelf .cc { --jw: calc(var(--cw) * .82); }
.sub-shelf .vc, .sub-shelf .pk { --jw: calc(var(--cw) * .74); }
.sub-shelf .sh-lab { align-self: center; margin: 0; font-size: 14px; }
.pv-row { gap: 10px 14px; }
.pv-row .jk, .pv-row .cc { --jw: calc(var(--cw) * .9); }
@media (max-width: 999px) {
  .shop .shelf { gap: 8px; }
  .it-desc { width: calc((100vw - 60px) / 2 - var(--jw) - 10px); min-width: 92px; font-size: 11px; }
  .main-shelf .jk, .main-shelf .cc, .sub-shelf .vc, .sub-shelf .pk, .pv-row .jk, .pv-row .cc { --jw: 48px; }
  .sub-shelf .sh-lab { display: none; }
}
.it-wrap .pk-nm, .it-wrap .vc-nm { display: none; }
@media (min-width: 1000px) and (min-height: 900px) {
  .main-shelf .jk, .main-shelf .cc { --jw: calc(var(--cw) * 1.15); }
  .sub-shelf .vc, .sub-shelf .pk { --jw: calc(var(--cw) * .95); }
  .pv-row .jk, .pv-row .cc { --jw: calc(var(--cw) * 1.15); }
  .it-desc { width: 168px; font-size: 13.5px; padding: 5px 8px 6px; }
  .it-desc b { font-size: 17px; }
  .shop .shelf { gap: 12px 22px; padding: 8px 6px 12px; }
}
