/* 视觉方向：F 丰收。夕阳、麦田、木牌、草帽小猪。
   画法：平涂色块 + 统一的深棕描边 + 硬边的实心底边来做立体感。
   不用渐变、发光、光束、模糊阴影、文字描边、装饰角标；强调色只有一种红，只给主要操作。
   间距只用 4/8/12/16/24/32，圆角只用 6/10/16（内圆角 = 外圆角 - 内边距）。
   舞台固定横屏，逻辑高度 375，由 js 缩放（竖持手机时整体旋转 90 度）。 */
:root {
  --ink: #3b2412;            /* 描边和正文 */
  --ink-2: #7a5a3a;          /* 次要文字 */
  --cream: #fff6dc; --cream-2: #f1e0b0;
  --wood: #cf9354; --wood-2: #a86b30;
  --red: #dc4428; --red-2: #a52d16;
  --felt: #83c456; --felt-2: #63a63f;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r-s: 6px; --r-m: 10px; --r-l: 16px;
  --display: "ZCOOL KuaiLe", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --sans: -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --num: "DIN Alternate", "Arial Narrow", var(--sans);
  --pad-l: 0px; --pad-r: 0px; --pad-t: 0px; --pad-b: 0px;
  --card-w: 58px; --card-h: 82px;
}

* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; background: #3b2412; }
body { font: 14px/20px var(--sans); color: var(--ink); overscroll-behavior: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
#app { position: fixed; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }

/* ---------- 场景 ---------- */
.scene { position: absolute; inset: 0; background: #ffe2a6; }
.scenery { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.inner { position: absolute; left: var(--pad-l); right: var(--pad-r); top: var(--pad-t); bottom: var(--pad-b); }

/* ---------- 通用部件 ---------- */
.plate { background: var(--cream); border: 2px solid var(--ink); border-radius: var(--r-m); box-shadow: 0 3px 0 var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  height: 40px; min-width: 88px; padding: 0 var(--s4); border-radius: var(--r-m);
  font: 400 20px/1 var(--display); white-space: nowrap; color: var(--ink);
  background: var(--cream); border: 2px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.red { background: var(--red); color: #fff; }
.btn:disabled { background: #d9d0bd; color: #8d8474; pointer-events: none; }
.btn.sm { height: 32px; min-width: 64px; padding: 0 var(--s3); font-size: 16px; border-radius: var(--r-s); box-shadow: 0 3px 0 var(--ink); }
.round { width: 40px; height: 40px; border-radius: var(--r-m); display: inline-flex; align-items: center; justify-content: center; background: var(--cream); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); flex: none; }

.avatar {
  position: relative; width: 44px; height: 44px; border-radius: var(--r-m); flex: none;
  background: var(--cream-2) center / cover; border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center; padding: 2px;
}
.avatar.turn { box-shadow: 0 0 0 3px var(--red); }
.avatar.off { filter: grayscale(1); opacity: .7; }
.seal { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); padding: 0 var(--s1); border-radius: var(--r-s); border: 2px solid var(--ink); background: var(--cream); font: 700 11px/14px var(--sans); white-space: nowrap; }
.seal.lord { background: var(--red); color: #fff; }
.coin { width: 22px; height: 22px; flex: none; }
.tag { padding: 0 var(--s2); border-radius: var(--r-s); background: var(--cream); border: 2px solid var(--ink); font-size: 11px; line-height: 16px; font-weight: 700; white-space: nowrap; }

/* ---------- 大厅 ---------- */
.hud { position: absolute; left: var(--s4); right: var(--s4); top: var(--s3); height: 44px; display: flex; align-items: center; gap: var(--s3); }
.me-plate { height: 44px; padding: var(--s1) var(--s3) var(--s1) var(--s1); display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.me-plate .avatar { width: 32px; height: 32px; border-radius: var(--r-s); padding: 1px; }
.me-plate .name { font-weight: 700; font-size: 14px; line-height: 16px; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-plate .sub { font-size: 11px; line-height: 14px; color: var(--ink-2); white-space: nowrap; }
.pref { display: flex; align-items: center; gap: var(--s2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.switch { display: flex; padding: 2px; border-radius: var(--r-m); background: var(--cream); border: 2px solid var(--ink); }
.switch button { height: 24px; padding: 0 var(--s2); border-radius: var(--r-s); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.switch button.on { background: var(--ink); color: var(--cream); }
.purse { height: 36px; padding: 0 var(--s3) 0 var(--s2); display: flex; align-items: center; gap: var(--s2); font: 700 16px/1 var(--num); }
.purse.buy { padding-right: var(--s1); }
.purse .plus { width: 24px; height: 24px; border-radius: var(--r-s); background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; }
.purse .plus .icon { width: 14px; height: 14px; stroke-width: 3; }

.mascot { position: absolute; left: var(--s3); bottom: var(--s2); width: 188px; height: 235px; pointer-events: none; }
.modes { position: absolute; left: 216px; right: var(--s4); top: 64px; height: 44px; padding-top: var(--s1); display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; }
.modes::-webkit-scrollbar { display: none; }
.modes button { height: 36px; padding: 0 var(--s3); white-space: nowrap; flex: none; border-radius: var(--r-m); background: var(--cream); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font: 400 18px/32px var(--display); }
.modes button.on { background: var(--red); color: #fff; }

.tiers { position: absolute; left: 216px; right: var(--s4); top: 116px; bottom: 72px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.tier { position: relative; overflow: hidden; border-radius: var(--r-m); background: var(--wood); border: 2px solid var(--ink); box-shadow: 0 5px 0 var(--ink); padding: var(--s1); display: flex; flex-direction: column; }
.tier:active, .tile:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.tier::before { content: ""; position: absolute; left: 0; right: 0; top: 58%; border-top: 2px solid var(--wood-2); }
.tier.top { background: #b9783a; }
.tier .t-name { position: relative; height: 32px; padding: 0 var(--s2); border-radius: var(--r-s); background: var(--cream); border: 2px solid var(--ink); font: 400 20px/28px var(--display); }
.tier .t-info { position: relative; padding: var(--s2) var(--s2) 0; }
.tier .t-label { font-size: 11px; line-height: 14px; font-weight: 700; color: #4a2c12; }
.tier .t-base { font: 700 28px/32px var(--num); }
.tier .t-min { position: relative; margin: 0 var(--s1) var(--s1); padding: 0 var(--s1); font-size: 11px; line-height: 16px; font-weight: 700; display: flex; align-items: center; gap: var(--s1); white-space: nowrap; }
.tier .t-min .coin { width: 16px; height: 16px; }
.tier .t-art { position: absolute; right: var(--s1); bottom: 24px; width: 58%; max-width: 84px; }
.side { display: flex; flex-direction: column; gap: var(--s3); }
.tile { flex: 1; border-radius: var(--r-m); padding: var(--s2) var(--s3); background: var(--cream); border: 2px solid var(--ink); box-shadow: 0 5px 0 var(--ink); display: flex; flex-direction: column; justify-content: center; gap: var(--s1); }
.tile .t-name { font: 400 20px/24px var(--display); }
.tile .t-desc { font-size: 11px; line-height: 14px; color: var(--ink-2); }

.dock { position: absolute; left: 216px; right: var(--s4); bottom: var(--s3); height: 44px; display: flex; align-items: center; gap: var(--s2); }
.dock .item { position: relative; display: flex; align-items: center; gap: var(--s1); height: 40px; padding: 0 var(--s3) 0 var(--s2); border-radius: var(--r-m); background: var(--cream); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font-weight: 700; font-size: 14px; white-space: nowrap; }
.dock .item .icon { width: 18px; height: 18px; }
.dock .item.hot::after { content: ""; position: absolute; right: -4px; top: -4px; width: 10px; height: 10px; border-radius: var(--r-s); background: var(--red); border: 2px solid var(--ink); }
.dock .start { height: 44px; min-width: 144px; font-size: 24px; }

/* ---------- 扑克牌 ---------- */
.card { width: var(--card-w); height: var(--card-h); border-radius: var(--r-s); position: relative; flex: none; color: #2b2118; background: #fffdf5; border: 1.5px solid var(--ink); }
.card.red { color: #cf3a22; }
.card .rk { position: absolute; left: 3px; top: 4px; width: 26px; text-align: center; font: 800 25px/24px var(--num); letter-spacing: -1.5px; }
.card .st { position: absolute; left: 7px; top: 30px; width: 18px; height: 18px; fill: currentColor; }
.card .big { position: absolute; right: 5px; bottom: 5px; width: 30px; height: 30px; fill: currentColor; }
.card .jk { position: absolute; left: 5px; top: 5px; width: 16px; font: 800 12px/11px var(--num); word-break: break-all; text-align: center; }
.card .crown { position: absolute; right: 5px; bottom: 6px; width: 32px; height: 32px; fill: currentColor; }
.card.lord::after { content: "地主"; position: absolute; right: 2px; top: 2px; padding: 0 3px; border-radius: 3px; background: var(--red); color: #fff; font: 700 10px/14px var(--sans); }
.card.sm { --card-w: 36px; --card-h: 50px; }
.card.sm .rk { left: 1px; top: 3px; width: 20px; font-size: 17px; line-height: 16px; letter-spacing: -1px; }
.card.sm .st { left: 5px; top: 21px; width: 12px; height: 12px; }
.card.sm .big, .card.sm .crown { display: none; }
.card.sm .jk { left: 3px; top: 4px; width: 12px; font-size: 9px; line-height: 8px; }
.card.wild { background: #ffe9a6; }
.card.wild::before { content: "癞"; position: absolute; left: 3px; bottom: 3px; width: 16px; height: 16px; border-radius: 3px; background: var(--ink); color: var(--cream); font: 700 11px/16px var(--sans); text-align: center; }
.card.sm.wild::before { left: 2px; bottom: 2px; width: 12px; height: 12px; font-size: 9px; line-height: 12px; }
.card.sm.lord::after { display: none; }
.cards { display: flex; }
.cards .card + .card { margin-left: calc(var(--step, 18px) - var(--card-w)); }
.back { width: 36px; height: 50px; border-radius: var(--r-s); flex: none; border: 1.5px solid var(--ink); background-color: var(--red); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M0 5l5-5 5 5-5 5z' fill='none' stroke='%23fff6dc' stroke-opacity='.55'/%3E%3C/svg%3E"); }

/* ---------- 牌桌 ---------- */
.rim { position: absolute; left: var(--s3); right: var(--s3); top: var(--s2); bottom: var(--s2); border-radius: 64px; background: var(--felt); border: 2px solid var(--ink); box-shadow: inset 0 0 0 8px var(--wood), inset 0 0 0 10px var(--ink), inset 0 0 0 14px var(--felt-2), 0 5px 0 var(--ink); pointer-events: none; }
.t-top { position: absolute; left: var(--s5); right: var(--s5); top: var(--s5); height: 40px; display: flex; align-items: center; gap: var(--s2); }
.t-title { min-width: 0; padding: var(--s1) var(--s2); border-radius: var(--r-s); background: var(--cream); border: 2px solid var(--ink); }
.t-title .a { font-weight: 700; font-size: 12px; line-height: 14px; white-space: nowrap; }
.t-title .b { font-size: 11px; line-height: 14px; color: var(--ink-2); white-space: nowrap; }
.plaque { position: absolute; left: 50%; top: calc(-1 * var(--s5)); transform: translateX(-50%); display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border-radius: 0 0 var(--r-m) var(--r-m); background: var(--wood); border: 2px solid var(--ink); border-top: 0; box-shadow: 0 4px 0 var(--ink); }
.plaque .cards { --step: 30px; }
.plaque .card.sm, .plaque .back { --card-w: 28px; --card-h: 38px; width: 28px; height: 38px; }
.plaque .card.sm .rk { font-size: 14px; line-height: 13px; width: 17px; top: 2px; }
.plaque .card.sm .st { width: 10px; height: 10px; top: 17px; left: 4px; }
.plaque .back + .back { margin-left: 2px; }
.plaque .info { font-size: 11px; line-height: 16px; font-weight: 700; white-space: nowrap; }
.plaque .info b { font: 800 16px/16px var(--num); margin-left: var(--s1); }
.seat .zone .tag, .zone.me .tag { align-self: center; }
.zone.me { gap: var(--s2); }

.counter { position: absolute; left: 50%; top: 60px; transform: translateX(-50%); display: flex; padding: 2px var(--s1); border-radius: var(--r-s); background: var(--cream); border: 2px solid var(--ink); z-index: 3; }
.counter div { width: 21px; text-align: center; font-size: 10px; line-height: 12px; color: var(--ink-2); }
.counter b { display: block; font: 800 14px/15px var(--num); color: var(--ink); }
.counter .zero b { color: #c9bfa6; }

.seat { position: absolute; top: 76px; display: flex; gap: var(--s3); align-items: flex-start; }
.seat.left { left: var(--s6); }
.seat.right { right: var(--s6); flex-direction: row-reverse; }
.seat .col { width: 64px; display: flex; flex-direction: column; align-items: center; gap: var(--s1); }
.seat .name { max-width: 64px; margin-top: var(--s2); }
.seat .stack { position: relative; }
.seat .stack .back { width: 30px; height: 40px; }
.seat .stack b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 800 18px/1 var(--num); color: #fff; }
.seat .zone { min-height: 50px; min-width: 60px; display: flex; align-items: center; gap: var(--s2); padding-top: 2px; }
.seat.right .zone { flex-direction: row-reverse; }
.name.tag { overflow: hidden; text-overflow: ellipsis; }
.say { padding: var(--s1) var(--s3); border-radius: var(--r-m); background: var(--cream); border: 2px solid var(--ink); font: 400 18px/24px var(--display); white-space: nowrap; }
.clock { width: 40px; height: 40px; border-radius: var(--r-m); flex: none; display: flex; align-items: center; justify-content: center; font: 800 18px/1 var(--num); color: var(--red-2); background: var(--cream); border: 2px solid var(--ink); box-shadow: inset 0 0 0 3px var(--red); }

.zone.me { position: absolute; left: 0; right: 0; bottom: 156px; height: 52px; display: flex; align-items: center; justify-content: center; }
.actions { position: absolute; left: 0; right: 0; bottom: 108px; height: 44px; display: flex; align-items: center; justify-content: center; gap: var(--s3); }
.actions .note { padding: var(--s1) var(--s3); border-radius: var(--r-m); background: var(--cream); border: 2px solid var(--ink); font-weight: 700; }
.me-info { position: absolute; left: var(--s5); bottom: var(--s4); width: 64px; display: flex; flex-direction: column; align-items: center; gap: var(--s1); }
.me-info .tag { margin-top: var(--s2); max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
.hand { position: absolute; left: 96px; right: var(--s5); bottom: var(--s3); height: 98px; display: flex; align-items: flex-end; justify-content: center; touch-action: none; }
.hand .card { transition: transform .08s; }
.hand .card.sel { transform: translateY(-14px); }

/* 好友房等待、匹配中 */
.wait { position: absolute; left: 0; right: 0; top: 72px; bottom: var(--s4); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s3); }
.wait .chairs { display: flex; gap: var(--s3); }
.chair { width: 128px; height: 116px; border-radius: var(--r-m); background: var(--cream); border: 2px solid var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s1); }
.chair .name { max-width: 110px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: var(--s1); }
.chair .st { font-size: 12px; line-height: 16px; color: var(--ink-2); }
.chair .st.ok { color: #2f7a22; font-weight: 700; }
.chair.empty { background: transparent; border-style: dashed; font-weight: 700; color: #2f5a1c; }
.wait .rule { padding: var(--s1) var(--s3); border-radius: var(--r-s); background: var(--cream); border: 2px solid var(--ink); font-size: 12px; font-weight: 700; }
.wait .ops { display: flex; gap: var(--s3); }
.center-note { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s4); }
.center-note .box { padding: var(--s4) var(--s5); display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.center-note .big { font: 400 26px/32px var(--display); }
.center-note .sub { font-size: 13px; color: var(--ink-2); }
.dots::after { content: ""; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------- 弹窗 ---------- */
.mask { position: absolute; inset: 0; z-index: 10; background: rgba(59, 36, 18, .6); display: flex; align-items: center; justify-content: center; padding: calc(var(--s3) + var(--pad-t)) calc(var(--s3) + var(--pad-r)) calc(var(--s3) + var(--pad-b)) calc(var(--s3) + var(--pad-l)); }
.dialog { position: relative; width: 440px; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; padding: var(--s1); border-radius: var(--r-l); background: var(--cream); border: 2px solid var(--ink); box-shadow: 0 6px 0 var(--ink); }
.dialog.wide { width: 560px; }
.d-head { flex: none; height: 36px; padding: 0 var(--s3); border-radius: var(--r-m); background: var(--wood); border: 2px solid var(--ink); font: 400 20px/32px var(--display); }
.d-close { position: absolute; right: var(--s1); top: var(--s1); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.d-body { flex: 1; min-height: 0; overflow-y: auto; padding: var(--s3); }
.d-foot { flex: none; display: flex; gap: var(--s3); padding: var(--s1) var(--s3) var(--s3); }
.d-text { padding: var(--s3) 0; font-size: 15px; line-height: 24px; }
.opt { display: flex; align-items: center; gap: var(--s3); padding: var(--s1) 0; }
.opt .label { width: 64px; flex: none; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); flex: 1; }
.chips button { height: 28px; min-width: 56px; padding: 0 var(--s3); border-radius: var(--r-s); font-size: 13px; font-weight: 700; text-align: center; background: #fffdf5; border: 2px solid var(--ink); }
.chips button.on { background: var(--ink); color: var(--cream); }

.rows .r { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s1); border-bottom: 2px solid var(--cream-2); }
.rows .r:last-child { border-bottom: 0; }
.rows .r.me { background: var(--cream-2); border-radius: var(--r-s); border-bottom-color: transparent; }
.rows .pos { width: 16px; font: 700 14px/1 var(--num); color: var(--ink-2); }
.rows .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .meta { font-size: 11px; line-height: 14px; color: var(--ink-2); }
.rows .val { font: 800 18px/1 var(--num); }
.up { color: var(--red-2); }
.down { color: #2f7a22; }
.verdict { padding-bottom: var(--s2); }
.verdict .t { font: 400 26px/32px var(--display); }
.verdict .d { font-size: 11px; line-height: 16px; color: var(--ink-2); }
.hist-h { padding: var(--s2) var(--s1) var(--s1); font-size: 11px; color: var(--ink-2); }
.empty { padding: var(--s5) 0; color: var(--ink-2); }

.pad-show { display: flex; gap: var(--s2); padding: 0 0 var(--s3); }
.pad-show div { width: 36px; height: 44px; border-radius: var(--r-s); background: #fffdf5; border: 2px solid var(--ink); font: 800 24px/40px var(--num); text-align: center; }
.pad-show div.cur { box-shadow: inset 0 0 0 2px var(--red); }
.pad { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s2); padding-bottom: var(--s1); }
.pad button { height: 40px; border-radius: var(--r-s); font: 800 20px/1 var(--num); text-align: center; background: #fffdf5; border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.pad button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.pad button.fn { font: 700 14px/1 var(--sans); }

.shop { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); padding-bottom: var(--s1); }
.goods { border-radius: var(--r-m); padding: var(--s2); background: #fffdf5; border: 2px solid var(--ink); display: flex; flex-direction: column; gap: var(--s1); }
.goods .g-name { font-weight: 700; font-size: 14px; line-height: 20px; }
.goods .g-desc { font-size: 11px; line-height: 14px; color: var(--ink-2); min-height: 28px; }
.goods .g-flag { font-size: 11px; line-height: 14px; font-weight: 700; color: var(--red-2); min-height: 14px; }
.goods .btn { min-width: 0; width: 100%; padding: 0 var(--s1); font: 700 14px/1 var(--num); gap: var(--s1); margin-top: var(--s1); }
.goods .btn .coin, .goods .btn svg { width: 14px; height: 14px; }
.shop-h { font-weight: 700; margin: var(--s2) 0 var(--s2); }

.toast { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); z-index: 20; max-width: 80%; padding: var(--s2) var(--s4); border-radius: var(--r-m); background: var(--ink); color: var(--cream); font-size: 13px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }

/* ---------- 残局 ---------- */
.pz-open { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); }
.seat .zone.pz-last { padding-top: var(--s5); min-width: 0; }
.dock .item { padding: 0 var(--s2); }
.dock .start { min-width: 120px; }

/* ---------- 四人桌：对家坐在上方 ---------- */
.seat.top { left: 50%; top: 60px; transform: translateX(-50%); align-items: center; }
.seat.top .col { flex-direction: row; width: auto; align-items: center; gap: var(--s2); }
.seat.top .avatar { width: 36px; height: 36px; border-radius: var(--r-s); }
.seat.top .name { margin-top: 0; }
.seat.top .stack .back { width: 24px; height: 32px; }
.seat.top .stack b { font-size: 14px; }
.seat.top .zone { min-height: 0; padding-top: 0; }
.zone.me .say { font-size: 14px; }

/* ---------- 暗度陈仓：明牌标记 ---------- */
.card.eye::before { content: "明"; position: absolute; left: 3px; bottom: 3px; width: 16px; height: 16px; border-radius: 3px; background: var(--red); color: #fff; font: 700 11px/16px var(--sans); text-align: center; }
.card.sm.eye::before { left: 2px; bottom: 2px; width: 12px; height: 12px; font-size: 9px; line-height: 12px; }
.seat .zone { flex-wrap: wrap; max-width: 250px; }
.dark .seat.left .zone, .dark .seat.right .zone { flex-direction: column; flex-wrap: nowrap; gap: var(--s1); }
.dark .seat.left .zone { align-items: flex-start; }
.dark .seat.right .zone { align-items: flex-end; }
.card.gold { background: #ffd866; }
.dealer { position: absolute; left: 50%; top: 108px; transform: translateX(-50%); display: flex; align-items: center; gap: var(--s2); white-space: nowrap; }
.dealer .stack { position: relative; }
.dealer .stack .back { width: 30px; height: 40px; }
.dealer .stack b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 800 16px/1 var(--num); color: #fff; }

/* ============================================================
   写实皮肤（定样阶段，只用在普通牌桌上）：中式包间 + 透视牌桌 + 半身人物。
   用户 2026-11-14 要求仿市面主流斗地主的质感，这一套允许渐变、高光和柔和阴影。
   ============================================================ */
.figure { display: none; }
.lux .scene { background: #1c0906; color: #f6ead2; }
.lux .rim { left: -4%; right: -4%; top: 118px; bottom: -90px; border-radius: 50% / 40%; border: 0;
  background: radial-gradient(ellipse 60% 55% at 50% 38%, #3fb07c 0%, #1f7d58 48%, #0f5139 82%, #0a3a29 100%);
  box-shadow: inset 0 0 0 10px #8a5526, inset 0 0 0 13px #e2b566, inset 0 0 0 15px #5a3414, inset 0 30px 60px rgba(0, 0, 0, .35), 0 -6px 30px rgba(0, 0, 0, .55);
  transform: perspective(900px) rotateX(18deg); transform-origin: 50% 100%; }
.lux .figure { display: block; width: 92px; height: 108px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .5)); }
.lux .seat { top: 50px; gap: var(--s2); }
.lux .seat.left { left: var(--s4); } .lux .seat.right { right: var(--s4); }
.lux .seat .col { width: 96px; gap: 2px; }
.lux .seat .avatar { width: 0; height: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.lux .seat .avatar .face { display: none; }
.lux .seat .avatar .seal { bottom: 2px; }
.lux .seat .name { margin-top: var(--s3); max-width: 92px; }
.lux .seat .stack { position: absolute; top: 64px; }
.lux .seat.left .stack { left: 84px; } .lux .seat.right .stack { right: 84px; }
.lux .seat .zone { padding-top: 56px; padding-left: var(--s6); padding-right: var(--s6); }
.lux .tag, .lux .t-title, .lux .actions .note { background: rgba(20, 10, 6, .72); border: 1px solid #c79a4e; color: #f6ead2; }
.lux .t-title .b { color: #cbb68d; }
.lux .seal { border: 1px solid #f3d9a0; background: #1f7d58; color: #fff; }
.lux .seal.lord { background: linear-gradient(180deg, #ff7a52, #c9321a); }
.lux .plaque { background: linear-gradient(180deg, #3a1d12, #20100a); border: 1px solid #c79a4e; border-top: 0; box-shadow: 0 6px 14px rgba(0, 0, 0, .5); color: #f6ead2; }
.lux .plaque .info b { color: #ffd66b; }
.lux .round { background: linear-gradient(180deg, #4a2a1a, #24120b); border: 1px solid #c79a4e; color: #ffd66b; box-shadow: 0 3px 8px rgba(0, 0, 0, .5); border-radius: 20px; }
.lux .btn { border-radius: 22px; height: 42px; color: #fff; border: 1px solid #cfe6ff; text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
  background: linear-gradient(180deg, #7cc0ff 0%, #3b8cf0 48%, #1f5fd0 100%); box-shadow: 0 4px 0 #143f8f, 0 8px 12px rgba(0, 0, 0, .4), inset 0 2px 0 rgba(255, 255, 255, .45); }
.lux .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #143f8f, inset 0 2px 0 rgba(255, 255, 255, .45); }
.lux .btn.red { color: #6b3200; border-color: #fff3c4; text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
  background: linear-gradient(180deg, #fff3a8 0%, #ffcf3a 48%, #ff9d12 100%); box-shadow: 0 4px 0 #a85e00, 0 8px 12px rgba(0, 0, 0, .4), inset 0 2px 0 rgba(255, 255, 255, .7); }
.lux .btn:disabled { background: linear-gradient(180deg, #b9b9b9, #7d7d7d); color: #e6e6e6; border-color: #d0d0d0; box-shadow: 0 4px 0 #4a4a4a; text-shadow: none; }
.lux .btn.sm { height: 32px; border-radius: 16px; box-shadow: 0 3px 0 #143f8f, inset 0 2px 0 rgba(255, 255, 255, .45); }
.lux .btn.sm.red { box-shadow: 0 3px 0 #a85e00, inset 0 2px 0 rgba(255, 255, 255, .7); }
.lux .say { background: #fffdf5; border: 0; color: #5a2a12; border-radius: 16px; box-shadow: 0 4px 10px rgba(0, 0, 0, .4); }
.lux .clock { border-radius: 50%; width: 42px; height: 42px; background: radial-gradient(circle at 50% 35%, #fff, #ffe9b0); border: 3px solid #ffb21a; box-shadow: 0 4px 8px rgba(0, 0, 0, .45); color: #c9321a; }
.lux .card { border-radius: 8px; border: 1px solid #b9b3a3; background: linear-gradient(160deg, #ffffff 0%, #f6f3ea 70%, #e9e3d2 100%); box-shadow: -3px 2px 6px rgba(0, 0, 0, .38); }
.lux .card.sm { border-radius: 6px; box-shadow: -2px 3px 5px rgba(0, 0, 0, .45); }
.lux .hand .card.sel { transform: translateY(-16px); box-shadow: -3px 2px 6px rgba(0, 0, 0, .38), 0 0 0 2px #ffcf3a; }
.lux .back { border: 1px solid #f3d9a0; border-radius: 5px; background-color: #a52d16; box-shadow: 0 3px 6px rgba(0, 0, 0, .45); }
.lux .me-info .avatar { border: 2px solid #f3d9a0; box-shadow: 0 0 0 2px #8a5526, 0 4px 8px rgba(0, 0, 0, .5); background-color: #2a1a12; }
.lux .counter { background: rgba(20, 10, 6, .8); border: 1px solid #c79a4e; }
.lux .counter div { color: #cbb68d; } .lux .counter b { color: #fff; } .lux .counter .zero b { color: #6b5a44; }
.lux .seat .stack .back { width: 26px; height: 36px; }
.lux .seat .stack b { font-size: 15px; }
.lux .seat.left .stack { left: 78px; top: 74px; } .lux .seat.right .stack { right: 78px; top: 74px; }

/* ---------- 写实皮肤：铺到全局（#app.lux） ---------- */
.lux { --ink: #3a1d10; }
.face { width: 100%; height: 100%; display: block; border-radius: inherit; }
.lux .avatar { padding: 0; overflow: visible; background: linear-gradient(180deg, #5a3a2a, #2a1610); border: 2px solid #f3d9a0; box-shadow: 0 0 0 2px #8a5526, 0 4px 8px rgba(0, 0, 0, .5); }
.lux .avatar .face { border-radius: 8px; }
.lux .seat.top .figure { display: none; }
.lux .seat.top .avatar { width: 40px; height: 40px; border: 2px solid #f3d9a0; background: linear-gradient(180deg, #5a3a2a, #2a1610); box-shadow: 0 0 0 2px #8a5526; }
.lux .seat.top .avatar .face { display: block; }
.lux .seat.top .avatar .seal { bottom: -8px; }
.lux .seat.top { top: 58px; }
.lux .seat.top .zone { padding: 0; }
.lux .dark .seat.left .zone, .lux .dark .seat.right .zone { padding-top: 40px; }
.lux .pz-open { padding-top: 56px; }

/* 大厅 */
.lux .plate, .lux .dock .item, .lux .tile, .lux .chair, .lux .wait .rule, .lux .switch {
  background: linear-gradient(180deg, rgba(74, 42, 26, .92), rgba(32, 16, 10, .92)); border: 1px solid #c79a4e; color: #f6ead2; box-shadow: 0 4px 10px rgba(0, 0, 0, .45); }
.lux .me-plate { border-radius: 24px; padding-right: var(--s4); }
.lux .me-plate .avatar { border-radius: 50%; } .lux .me-plate .avatar .face { border-radius: 50%; }
.lux .me-plate .sub, .lux .tile .t-desc, .lux .chair .st, .lux .center-note .sub { color: #cbb68d; }
.lux .pref { color: #e6d3a8; }
.lux .switch { border-radius: 16px; box-shadow: none; }
.lux .switch button { color: #cbb68d; border-radius: 12px; }
.lux .switch button.on { background: linear-gradient(180deg, #ffe58a, #ffb21a); color: #6b3200; }
.lux .purse { border-radius: 18px; color: #fff; }
.lux .purse .plus { border-radius: 50%; background: linear-gradient(180deg, #8ff06b, #2fae3a); box-shadow: 0 2px 0 #1b6e22; }
.lux .mascot { left: var(--s2); bottom: 0; width: 210px; height: 244px; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .6)); }
.lux .mascot .figure { width: 100%; height: 100%; }
.lux .modes button { border-radius: 18px; background: linear-gradient(180deg, rgba(74, 42, 26, .92), rgba(32, 16, 10, .92)); border: 1px solid #c79a4e; color: #e6d3a8; box-shadow: 0 3px 8px rgba(0, 0, 0, .45); }
.lux .modes button.on { background: linear-gradient(180deg, #fff3a8, #ffcf3a 50%, #ff9d12); color: #6b3200; border-color: #fff3c4; box-shadow: 0 3px 0 #a85e00, 0 6px 10px rgba(0, 0, 0, .4); }
.lux .tier { border-radius: 14px; border: 2px solid #f3d9a0; padding: var(--s3); color: #fff; box-shadow: 0 0 0 1px #6b4a1c, 0 8px 14px rgba(0, 0, 0, .55), inset 0 2px 0 rgba(255, 255, 255, .35);
  background: linear-gradient(165deg, #46c796 0%, #177d59 55%, #0a4633 100%); }
.lux .tier:nth-child(2) { background: linear-gradient(165deg, #66aeff 0%, #2163d4 55%, #10357f 100%); }
.lux .tier:nth-child(3), .lux .tier.top { background: linear-gradient(165deg, #ff9566 0%, #cf371c 55%, #74150a 100%); }
.lux .tier::before { display: none; }
.lux .tier .t-name { height: auto; padding: 0; background: none; border: 0; font-size: 26px; line-height: 32px; color: #fff6d8; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.lux .tier .t-info { padding: var(--s1) 0 0; }
.lux .tier .t-label { color: rgba(255, 255, 255, .85); }
.lux .tier .t-base { color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.lux .tier .t-min { margin: 0; padding: 2px var(--s2); border-radius: 12px; background: rgba(0, 0, 0, .35); align-self: flex-start; color: #fff; }
.lux .tier .t-art { right: var(--s2); bottom: 34px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .4)); }
.lux .tile { border-radius: 14px; border-width: 2px; }
.lux .tile .t-name { color: #ffd66b; }
.lux .dock .item { border-radius: 20px; }
.lux .dock .item .icon { color: #ffd66b; }
.lux .dock .item.hot::after { border-radius: 50%; border-color: #fff; }
.lux .dock .start { height: 48px; min-width: 150px; border-radius: 24px; font-size: 24px; }
.lux .chair { border-radius: 14px; }
.lux .chair.empty { background: rgba(0, 0, 0, .3); border-style: dashed; color: #cbb68d; box-shadow: none; }
.lux .chair .st.ok { color: #8ff0c0; }
.lux .center-note .big { color: #fff6d8; }

/* 弹窗 */
.lux .mask { background: rgba(10, 4, 2, .7); }
.lux .dialog { color: #3a1d10; background: linear-gradient(180deg, #fffaf0, #f3e4c2); border: 2px solid #f3d9a0; box-shadow: 0 0 0 2px #6b4a1c, 0 14px 30px rgba(0, 0, 0, .65); }
.lux .d-head { background: linear-gradient(180deg, #7a3a22, #3a1a10); border: 1px solid #c79a4e; color: #ffd66b; text-align: center; letter-spacing: 4px; }
.lux .d-close { color: #ffd66b; }
.lux .dialog .tag { background: #f1e0b0; border: 1px solid #b08a4a; color: #3a1d10; }
.lux .dialog .btn { border-color: #cfe6ff; }
.lux .chips button { border-radius: 14px; border: 1px solid #b08a4a; background: #fffdf5; color: #5a3a1c; }
.lux .chips button.on { background: linear-gradient(180deg, #ff7a52, #c9321a); border-color: #7a1608; color: #fff; }
.lux .rows .r { border-bottom: 1px solid #e3d2a6; }
.lux .rows .r.me { background: #f6e6b8; }
.lux .up { color: #c9321a; } .lux .down { color: #1f7d58; }
.lux .pad button, .lux .pad-show div, .lux .goods { border: 1px solid #b08a4a; border-radius: 10px; }
.lux .pad button { box-shadow: 0 3px 0 #b08a4a; }
.lux .pad-show div.cur { box-shadow: inset 0 0 0 2px #c9321a; }
.lux .goods .btn { border-radius: 16px; }
.lux .toast { background: rgba(20, 10, 6, .92); border: 1px solid #c79a4e; color: #fff6d8; border-radius: 18px; }
.lux .dealer .tag { background: rgba(20, 10, 6, .72); }

/* 立绘图片 */
img.figure { object-fit: cover; object-position: 50% 0; pointer-events: none; }
.face.photo { background-size: 250% auto; background-position: 50% 4%; background-repeat: no-repeat; }
.lux .seat img.figure { width: 96px; height: 112px; }
.lux .mascot img.figure { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
.lux .seat { top: 40px; }
.lux .seat .col { width: 124px; }
.lux .seat img.figure { width: 124px; height: 136px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55)); }
.lux .seat .name { max-width: 110px; margin-top: var(--s2); }
.lux .seat.left .stack { left: 108px; top: 84px; } .lux .seat.right .stack { right: 108px; top: 84px; }
.lux .seat .zone { padding-top: 64px; padding-left: var(--s5); padding-right: var(--s5); }
.lux .dark .seat.left .zone, .lux .dark .seat.right .zone { padding-top: 48px; }
.lux .seat { top: 58px; }
.lux .seat img.figure { width: 112px; height: 120px; }
.lux .seat .col { width: 112px; }
.lux .seat.left .stack { left: 98px; top: 70px; } .lux .seat.right .stack { right: 98px; top: 70px; }
.lux .seat .zone { padding-top: 52px; }
.lux .seat.top { top: 58px; }

/* 出图后的场景和牌面 */
img.scenery.photo { object-fit: cover; object-position: 50% 30%; filter: brightness(.82); }
.lux .rim { background: radial-gradient(ellipse 60% 55% at 50% 38%, rgba(255, 255, 255, .16) 0%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .45) 100%), var(--felt-img, none) center / 360px, radial-gradient(ellipse 60% 55% at 50% 38%, #3fb07c 0%, #1f7d58 48%, #0f5139 82%, #0a3a29 100%); }
.card .face-art { position: absolute; right: 3px; bottom: 3px; width: 34px; height: 50px; object-fit: contain; object-position: 100% 100%; pointer-events: none; }
.card.sm .face-art { width: 18px; height: 26px; right: 2px; bottom: 2px; }

/* 逐屏检查后的修正 */
.lux .card.gold { background: linear-gradient(160deg, #fff6c2 0%, #ffe07a 70%, #f5c443 100%); border-color: #b8860b; }
.lux .card.wild { background: linear-gradient(160deg, #fff6c2 0%, #ffd98a 100%); }
.lux .card.eye::before, .lux .card.wild::before { border-radius: 4px; }
.lux .seat.top .name { max-width: none; overflow: visible; margin-top: 0; }
.lux .seat.top .col { gap: var(--s2); }
.lux .seat.top .stack { position: static; }
.lux .dealer { top: 112px; }
.lux .dark .zone.me { bottom: 150px; }
.lux .dark .seat.top { left: 36%; top: 66px; }
.lux .dark .dealer { left: 67%; top: 66px; }
.lux .dark .seat.left .zone, .lux .dark .seat.right .zone { padding-top: 66px; }
.lux .dark .seat.top .zone { flex-wrap: nowrap; max-width: none; }

/* ---------- 金币变化：飘字、飞币、余额滚动 ---------- */
#fx { position: fixed; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; pointer-events: none; z-index: 30; }
.fx-num { position: absolute; display: flex; align-items: center; gap: 4px; white-space: nowrap; font-family: "ZCOOL KuaiLe", "PingFang SC", sans-serif; font-size: 34px; line-height: 40px; font-weight: 900; letter-spacing: 1px; opacity: 0; transform: translate(-50%, -50%); animation: fx-num 2.3s cubic-bezier(.2, .9, .3, 1) forwards; }
.fx-num.me { font-size: 42px; line-height: 48px; }
.fx-num.up { color: #ffd94a; text-shadow: 2px 0 #6a2200, -2px 0 #6a2200, 0 2px #6a2200, 0 -2px #6a2200, 1.5px 1.5px #6a2200, -1.5px 1.5px #6a2200, 1.5px -1.5px #6a2200, -1.5px -1.5px #6a2200, 0 4px 0 #3a1200, 0 0 16px rgba(255, 190, 40, .9); }
.fx-num.down { color: #cfe6f5; text-shadow: 2px 0 #12283c, -2px 0 #12283c, 0 2px #12283c, 0 -2px #12283c, 1.5px 1.5px #12283c, -1.5px 1.5px #12283c, 1.5px -1.5px #12283c, -1.5px -1.5px #12283c, 0 4px 0 #0a1622; }
@keyframes fx-num {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
  10% { opacity: 1; transform: translate(-50%, -50%) scale(1.3); }
  18% { transform: translate(-50%, -50%) scale(1); }
  82% { opacity: 1; transform: translate(-50%, -78%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -110%) scale(1); }
}
.fx-coin { display: inline-block; flex: none; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff7c2 0 12%, #ffd23e 38%, #f0a010 70%, #b96a00); border: 1.5px solid #7a4300; box-shadow: inset 0 0 0 3px rgba(255, 240, 160, .55), 0 2px 3px rgba(0, 0, 0, .45); }
.fx-num.me .fx-coin { width: 30px; height: 30px; }
.fx-coin.fly { position: absolute; left: -10px; top: -10px; width: 20px; height: 20px; opacity: 0; }
[data-roll] { transition: transform .15s, color .15s; }
.lux [data-roll][data-dir="up"] { color: #ffd94a; border-color: #ffd94a; transform: scale(1.18); max-width: none; }
.lux [data-roll][data-dir="down"] { color: #9fd0ee; transform: scale(1.18); max-width: none; }
.me-info [data-roll] { max-width: 84px; }
.v-num { font-size: 30px; line-height: 36px; font-weight: 900; margin: 2px 0; }

/* 牌桌上自己的余额：金币图标 + 大号金字 */
.lux .me-info [data-roll] { display: flex; align-items: center; gap: 4px; max-width: none; overflow: visible; white-space: nowrap; padding: 2px 10px 2px 3px; border-radius: 14px; font-size: 16px; line-height: 22px; font-weight: 800; color: #ffe27a; background: linear-gradient(180deg, rgba(60, 28, 10, .92), rgba(20, 10, 6, .92)); border: 1.5px solid #e2b55a; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); font-variant-numeric: tabular-nums; }
.lux .me-info [data-roll]::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff7c2 0 12%, #ffd23e 38%, #f0a010 70%, #b96a00); border: 1px solid #7a4300; box-shadow: inset 0 0 0 2px rgba(255, 240, 160, .55); }
.lux .me-info [data-roll][data-dir="up"] { color: #fff3a8; border-color: #ffe27a; box-shadow: 0 0 10px rgba(255, 200, 60, .85); }
.lux .me-info [data-roll][data-dir="down"] { color: #bfe0f5; border-color: #9fd0ee; }
.lux .me-info { z-index: 4; }
.lux .me-info [data-roll] { align-self: flex-start; transform-origin: 0 50%; }
