/* 「10点半」H5 样式 —— 基础部分直接复用 mockups.html 的 CSS（见下方 BEGIN MOCKUP CSS），
   之后是真机适配与交互状态的补充。 */
@font-face { font-family: "Noto Serif SC"; src: local("Noto Serif CJK SC"), local("Noto Serif CJK SC Regular"), local("NotoSerifCJKsc-Regular"); }
@font-face { font-family: "Noto Sans SC"; src: local("Noto Sans CJK SC"), local("Noto Sans CJK SC Regular"), local("NotoSansCJKsc-Regular"); }

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #0a0607;
  color: #f6ecd8;
  font-family: "Noto Sans SC", "Noto Sans CJK SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ===== BEGIN MOCKUP CSS（来自 mockups.html，未改动） ===== */
:root {
    --gold: #e8c56b;
    --gold-2: #c9a047;
    --gold-soft: #f3e0a8;
    --ivory: #f6ecd8;
    --text: #f4ead8;
    --muted: #b09a82;
    --dim: #8a7360;
    --wine: #7a1a28;
    --wine-deep: #4a0e16;
    --felt: #164437;
    --felt-dark: #0c2a22;
    --danger: #ee6a55;
    --ok: #8fcea8;
}
.app {
    position: absolute;
    inset: 0;
    padding: 52px 0 28px;
    display: flex;
    flex-direction: column;
    background:
      radial-gradient(ellipse 80% 40% at 50% 0%, rgba(160, 50, 40, 0.22), transparent 55%),
      linear-gradient(180deg, #1a0c10 0%, #12080a 40%, #0e0a09 100%);
}
.app.felt-bg {
    background:
      radial-gradient(ellipse 90% 70% at 50% 45%, rgba(36, 90, 70, 0.35), transparent 70%),
      radial-gradient(ellipse 80% 40% at 50% 0%, rgba(160, 50, 40, 0.16), transparent 55%),
      linear-gradient(180deg, #14100e 0%, #0d1a16 30%, #0a1612 100%);
}
.nav {
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 36px;
    flex-shrink: 0;
}
.nav .brand {
    font-family: "Noto Serif SC", "Noto Serif CJK SC", serif;
    letter-spacing: 0.2em;
    font-size: 16px;
    color: var(--gold-soft);
}
.nav .side {
    font-size: 12px;
    color: var(--muted);
    min-width: 64px;
}
.nav .side.right { text-align: right;
}
.chip-row {
    display: flex;
    gap: 8px;
    padding: 8px 22px 0;
    flex-wrap: wrap;
}
.chip {
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--gold-soft);
    background: rgba(232, 197, 107, 0.1);
    border: 1px solid rgba(232, 197, 107, 0.28);
    border-radius: 999px;
    padding: 4px 10px;
}
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    border-radius: 14px;
    font-size: 16px;
    letter-spacing: 0.18em;
    border: none;
    font-family: inherit;
    font-weight: 600;
    width: 100%;
}
.btn-gold {
    background: linear-gradient(180deg, #f0d78a 0%, #d4a84a 48%, #b8862e 100%);
    color: #3a2408;
    box-shadow: 0 6px 18px rgba(180, 110, 20, .35), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 1px solid rgba(232, 197, 107, 0.45);
    letter-spacing: 0.18em;
}
.btn-wine {
    background: linear-gradient(180deg, #9a2634, #6a1520);
    color: var(--ivory);
    border: 1px solid rgba(232, 197, 107, 0.25);
    box-shadow: 0 6px 16px rgba(80, 10, 16, .4);
}
.pcard {
    position: relative;
    background: linear-gradient(180deg, #fffef8 0%, #f4ead4 100%);
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(0,0,0,.4), inset 0 0 0 1px rgba(90, 60, 20, .18);
    color: #1a1a1a;
    flex-shrink: 0;
    overflow: hidden;
    font-family: "Noto Serif SC", "Noto Serif CJK SC", Times, serif;
}
.pcard .rank {
    position: absolute;
    top: 4px; left: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    font-weight: 700;
}
.pcard .rank .n { font-size: 13px;
}
.pcard .rank .s { font-size: 12px; margin-top: 1px;
}
.pcard .rank.br { top: auto; left: auto; bottom: 4px; right: 5px; transform: rotate(180deg);
}
.pcard .pip {
    position: absolute;
    left: 50%; top: 52%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    line-height: 1;
}
.pcard.red { color: #c1182a;
}
.pcard.blk { color: #1c1a18;
}
.pcard.md { width: 76px; height: 108px; border-radius: 9px;
}
.pcard.md .rank .n { font-size: 16px;
}
.pcard.md .rank .s { font-size: 14px;
}
.pcard.md .pip { font-size: 36px;
}
.pcard.lg { width: 124px; height: 176px; border-radius: 12px;
}
.pcard.lg .rank { top: 8px; left: 8px;
}
.pcard.lg .rank .n { font-size: 24px;
}
.pcard.lg .rank .s { font-size: 20px;
}
.pcard.lg .rank.br { top: auto; left: auto; bottom: 8px; right: 8px;
}
.pcard.lg .pip { font-size: 62px;
}
.pcard.sm { width: 40px; height: 56px; border-radius: 5px;
}
.pcard.sm .rank { top: 2px; left: 3px;
}
.pcard.sm .rank .n { font-size: 9px;
}
.pcard.sm .rank .s { font-size: 8px;
}
.pcard.sm .rank.br { display: none;
}
.pcard.sm .pip { font-size: 16px; top: 58%;
}
.pcard.back {
    background:
      repeating-linear-gradient(45deg, rgba(232,197,107,.15) 0 2px, transparent 2px 6px),
      linear-gradient(160deg, #6e1a2c, #3a0e18 60%, #2a0c14);
    box-shadow: 0 4px 10px rgba(0,0,0,.4), inset 0 0 0 2px #e0c16a;
    color: var(--gold);
}
.pcard.back .back-mark {
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(232,197,107,.45);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Noto Serif SC", "Noto Serif CJK SC", serif;
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--gold-soft);
}
.pcard.sm.back .back-mark { inset: 4px; font-size: 8px; letter-spacing: 0;
}
.hero {
    text-align: center;
    padding: 8px 0 6px;
    position: relative;
    height: 248px;
    flex-shrink: 0;
}
.fan {
    position: absolute;
    left: 50%;
    top: 18px;
    width: 160px;
    height: 120px;
    transform: translateX(-50%);
    opacity: 0.95;
}
.fan .pcard { position: absolute; left: 42px; top: 0;
}
.fan .pcard:first-child { transform: rotate(-18deg) translateX(-38px) translateY(8px);
}
.fan .pcard:last-child { transform: rotate(18deg) translateX(38px) translateY(8px);
}
.hero-ornament {
    position: absolute;
    left: 0; right: 0; top: 132px;
    text-align: center;
    z-index: 2;
    background: linear-gradient(180deg, transparent, #160a0d 28%, #160a0d 100%);
    padding-top: 18px;
}
.orn {
    color: var(--gold-2);
    letter-spacing: 0.4em;
    font-size: 10px;
    opacity: 0.85;
}
.hero h1 {
    font-family: "Noto Serif SC", "Noto Serif CJK SC", serif;
    font-size: 48px;
    letter-spacing: 0.28em;
    font-weight: 600;
    color: var(--gold-soft);
    text-indent: 0.28em;
    line-height: 1.1;
    text-shadow: 0 2px 18px rgba(200, 140, 40, .25);
}
.hero p.sub {
    margin-top: 6px;
    font-size: 12px;
    letter-spacing: 0.28em;
    color: var(--muted);
}
.panel {
    margin: 8px 22px 0;
    background: linear-gradient(180deg, rgba(255,220,180,.06), rgba(255,220,180,.03));
    border: 1px solid rgba(232, 197, 107, 0.2);
    border-radius: 18px;
    padding: 16px 18px 8px;
}
.panel h3 {
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--gold);
    font-weight: 500;
    margin-bottom: 4px;
}
.setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(232, 197, 107, 0.1);
}
.setting:last-child { border-bottom: none;
}
.setting .label { font-size: 15px; color: var(--ivory);
}
.setting .label span { display: block; font-size: 10px; color: var(--dim); letter-spacing: 0.06em; margin-top: 2px;
}
.stepper { display: flex; align-items: center; gap: 8px;
}
.stepper .val {
    min-width: 58px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--gold-soft);
    font-variant-numeric: tabular-nums;
}
.stepper .val small { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 1px;
}
.step-btn {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(232, 197, 107, 0.4);
    background: rgba(232, 197, 107, 0.08);
    color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; line-height: 1;
}
.cta-wrap { padding: 18px 22px 0; display: flex; flex-direction: column; gap: 10px;
}
.hint {
    margin-top: auto;
    padding: 8px 28px 6px;
    text-align: center;
    font-size: 11px;
    line-height: 1.6;
    color: var(--dim);
    letter-spacing: 0.04em;
}
.qr-wrap {
    margin: 14px 36px 0;
    background: linear-gradient(180deg, #f7f0de, #e8d9b0);
    border-radius: 18px;
    padding: 16px 16px 12px;
    box-shadow: 0 10px 28px rgba(0,0,0,.35), inset 0 0 0 1px rgba(180, 140, 60, .45);
    text-align: center;
}
.qr-wrap svg { width: 188px; height: 188px; display: block; margin: 0 auto;
}
.qr-caption {
    margin-top: 6px;
    color: #5a4018;
    font-size: 11px;
    letter-spacing: 0.12em;
}
.room-code {
    text-align: center;
    margin-top: 12px;
}
.room-code .code {
    font-family: "Noto Serif SC", "Noto Serif CJK SC", serif;
    font-size: 28px;
    letter-spacing: 0.28em;
    color: var(--gold-soft);
    text-indent: 0.28em;
    font-weight: 600;
}
.room-code .link {
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.04em;
}
.plist {
    margin: 14px 22px 0;
    flex: 1;
}
.plist h3 {
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--gold);
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}
.plist h3 span { color: var(--muted); letter-spacing: 0.06em;
}
.player {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}
.avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.2);
}
.av-qiang { background: linear-gradient(160deg, #c45a2a, #8a2e12);
}
.av-mei { background: linear-gradient(160deg, #c44a68, #7a2238);
}
.av-zhou { background: linear-gradient(160deg, #2a9a8a, #145048);
}
.av-jie { background: linear-gradient(160deg, #3a6cbe, #1c3868);
}
.av-empty { background: rgba(255,255,255,.06); border: 1px dashed rgba(232,197,107,.3); color: var(--dim); box-shadow: none;
}
.player .meta { flex: 1;
}
.player .name { font-size: 14px; color: var(--ivory);
}
.player .tag {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--gold);
    border: 1px solid rgba(232,197,107,.4);
    border-radius: 4px;
    padding: 0 5px;
    vertical-align: 1px;
}
.player .you { font-size: 10px; color: var(--dim); margin-top: 1px;
}
.player .online { font-size: 11px; color: var(--ok);
}
.pot-bar {
    margin: 8px 22px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(20, 40, 32, .6), rgba(10, 20, 16, .5));
    border: 1px solid rgba(232, 197, 107, 0.22);
    border-radius: 14px;
    padding: 10px 14px;
}
.pot-bar .k { font-size: 10px; letter-spacing: 0.16em; color: var(--muted);
}
.pot-bar .v { font-size: 22px; font-weight: 600; color: var(--gold-soft); line-height: 1.15;
}
.pot-bar .v small { font-size: 12px; font-weight: 400; color: var(--gold); margin-left: 2px;
}
.others {
    display: flex;
    justify-content: space-around;
    padding: 16px 12px 8px;
}
.seat { text-align: center; width: 90px;
}
.seat .cards { display: flex; justify-content: center; height: 40px; margin: 6px 0 4px;
}
.seat .cards .pcard { margin: 0 -8px;
}
.seat .nm { font-size: 12px; color: var(--ivory);
}
.seat .cnt { font-size: 10px; color: var(--muted); margin-top: 1px;
}
.table-pot {
    text-align: center;
    margin: 10px 40px 0;
    padding: 16px 10px 14px;
    border-radius: 120px;
    background:
      radial-gradient(ellipse 70% 80% at 50% 50%, rgba(22, 70, 54, .55), rgba(8, 24, 20, .15));
    border: 1px dashed rgba(232, 197, 107, 0.22);
}
.table-pot .label { font-size: 11px; letter-spacing: 0.2em; color: var(--gold);
}
.coins { margin: 8px 0 4px; font-size: 20px; letter-spacing: 4px;
}
.table-pot .amt { font-size: 28px; font-weight: 600; color: var(--gold-soft);
}
.table-pot .amt small { font-size: 13px; margin-left: 2px;
}
.table-pot .wait { margin-top: 6px; font-size: 11px; color: var(--muted); letter-spacing: 0.08em;
}
.myhand {
    margin-top: auto;
    padding: 12px 22px 8px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.28) 20%);
}
.myhand .row1 {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}
.myhand .row1 .t { font-size: 11px; letter-spacing: 0.18em; color: var(--gold);
}
.myhand .pts { font-size: 20px; font-weight: 600; color: var(--gold-soft);
}
.myhand .pts small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 2px;
}
.hand-cards { display: flex; gap: 10px; justify-content: center;
}
.felt-table {
    margin: 6px 18px 0;
    flex: 1;
    min-height: 0;
    border-radius: 180px;
    border: 1.5px solid rgba(200, 160, 70, 0.28);
    box-shadow:
      inset 0 0 0 10px rgba(18, 56, 44, 0.55),
      inset 0 0 48px rgba(0,0,0,.28);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background:
      radial-gradient(ellipse 70% 80% at 50% 50%, rgba(28, 90, 68, .45), rgba(8, 28, 22, .2));
}
.felt-table .wm {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Noto Serif SC", "Noto Serif CJK SC", serif;
    font-size: 52px;
    letter-spacing: 0.28em;
    color: rgba(232, 197, 107, 0.07);
    pointer-events: none;
    text-indent: 0.28em;
}
.table-pot {
    text-align: center;
    margin: 0;
    padding: 8px 10px 6px;
    border-radius: 0;
    background: none;
    border: none;
    position: relative;
    z-index: 1;
}
.auc-top {
    display: flex;
    justify-content: space-between;
    padding: 6px 22px 0;
}
.timer-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 8px 0 4px;
}
.ring {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: conic-gradient(#e8c56b 0 60%, rgba(232,197,107,.12) 60%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 4px rgba(20,10,8,.5);
}
.ring-inner {
    width: 58px; height: 58px;
    border-radius: 50%;
    background: #160c0e;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ring-inner .sec { font-size: 22px; font-weight: 700; color: var(--gold-soft); line-height: 1;
}
.ring-inner .u { font-size: 9px; color: var(--muted); letter-spacing: 0.1em; margin-top: 1px;
}
.flip-label {
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--gold);
    margin: 4px 0 8px;
}
.flip-stage {
    display: flex;
    justify-content: center;
    filter: drop-shadow(0 16px 24px rgba(0,0,0,.5));
}
.bid-box {
    margin: 16px 22px 0;
    background: linear-gradient(180deg, rgba(255,220,180,.07), rgba(255,220,180,.03));
    border: 1px solid rgba(232, 197, 107, 0.2);
    border-radius: 16px;
    padding: 12px 16px 14px;
    text-align: center;
}
.bid-box .k { font-size: 10px; letter-spacing: 0.18em; color: var(--muted);
}
.bid-box .high {
    margin: 4px 0 0;
    font-size: 26px;
    font-weight: 600;
    color: var(--gold-soft);
}
.bid-box .high small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 4px;
}
.bid-box .who { font-size: 12px; color: var(--ivory); margin-top: 2px;
}
.bid-btns {
    display: flex;
    gap: 8px;
    margin: 12px 22px 0;
}
.bid-btns .b {
    flex: 1;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(232,197,107,.35);
    background: rgba(232,197,107,.08);
    color: var(--gold-soft);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.bid-btns .b.on {
    background: rgba(232,197,107,.2);
    border-color: var(--gold);
    box-shadow: inset 0 0 0 1px rgba(232,197,107,.3);
}
.hint-pill {
    margin: 10px 22px 0;
    text-align: center;
    font-size: 11px;
    color: var(--ok);
    letter-spacing: 0.06em;
}
.result-banner {
    margin: 8px 18px 0;
    background: linear-gradient(90deg, rgba(154, 38, 52, .55), rgba(122, 26, 40, .35));
    border: 1px solid rgba(238, 106, 85, 0.35);
    border-radius: 12px;
    padding: 10px 12px;
    text-align: center;
}
.result-banner .big { font-size: 14px; color: var(--ivory); letter-spacing: 0.06em; font-weight: 600;
}
.result-banner .sub { font-size: 11px; color: #f0c0b8; margin-top: 3px; letter-spacing: 0.04em;
}
.pot-mini {
    text-align: center;
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}
.pot-mini b { color: var(--gold-soft); font-size: 16px; font-weight: 600; margin: 0 2px;
}
.board {
    margin: 10px 14px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.rowp {
    background: rgba(255, 230, 200, 0.04);
    border: 1px solid rgba(232, 197, 107, 0.12);
    border-radius: 12px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.rowp.bust {
    background: rgba(154, 38, 52, 0.2);
    border-color: rgba(238, 106, 85, 0.28);
}
.rowp.win {
    background: rgba(232, 197, 107, 0.07);
    border-color: rgba(232, 197, 107, 0.28);
}
.rowp .info { flex: 1; min-width: 0;
}
.rowp .nm { font-size: 13px; color: var(--ivory); display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
.badge {
    font-size: 9px;
    letter-spacing: 0.08em;
    border-radius: 3px;
    padding: 1px 5px;
    line-height: 1.4;
}
.badge-gold { background: rgba(232,197,107,.2); color: var(--gold-soft); border: 1px solid rgba(232,197,107,.35);
}
.badge-red { background: rgba(238,106,85,.2); color: #ffb0a4; border: 1px solid rgba(238,106,85,.4);
}
.rowp .cards { display: flex; gap: 3px; margin-top: 5px;
}
.rowp .right { text-align: right; flex-shrink: 0;
}
.rowp .pts { font-size: 16px; font-weight: 600; color: var(--gold-soft);
}
.rowp.bust .pts { color: var(--danger);
}
.rowp .drink { font-size: 11px; margin-top: 2px; color: var(--muted);
}
.rowp.bust .drink { color: #ffb0a4; font-weight: 600;
}
.legend {
    padding: 4px 22px 0;
    font-size: 10px;
    color: var(--dim);
    text-align: center;
    letter-spacing: 0.04em;
}
/* ===== END MOCKUP CSS ===== */

/* ---------- 字体回退：iOS / 安卓 / 微信 ---------- */
.hero h1, .nav .brand, .room-code .code, .pcard, .felt-table .wm, .pcard.back .back-mark {
  font-family: "Noto Serif SC", "Noto Serif CJK SC", "Songti SC", "STSongti-SC-Regular", "STSong", "Source Han Serif SC", serif;
}
.pcard { font-family: "Noto Serif SC", "Noto Serif CJK SC", "Songti SC", Georgia, "Times New Roman", serif; }

/* ---------- 真机布局：全屏 + safe-area + 100dvh ---------- */
#root {
  position: fixed; inset: 0;
  height: 100vh; height: 100dvh;
  max-width: 520px; margin: 0 auto;
  overflow: hidden;
  background: #14090c;
}
.app {
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 0 calc(env(safe-area-inset-bottom, 0px) + 14px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 521px) {
  body { background: radial-gradient(ellipse 90% 55% at 50% -10%, rgba(140,42,36,.38), transparent 55%), #0a0607; }
  #root { box-shadow: 0 0 0 1px rgba(154,120,64,.35), 0 20px 60px rgba(0,0,0,.6); }
}

/* ---------- 触控反馈 ---------- */
[data-act] { cursor: pointer; transition: transform .08s ease, filter .08s ease, opacity .15s; }
[data-act]:active:not([disabled]):not(.disabled) { transform: scale(.97); filter: brightness(1.12); }
.step-btn[data-act]:active { transform: scale(.88); background: rgba(232,197,107,.25); }
.btn[disabled], .btn.disabled, .b.disabled { opacity: .45; pointer-events: none; filter: grayscale(.3); }
.btn-outline.wait { opacity: .7; letter-spacing: .1em; font-size: 14px; font-weight: 500; }
.nav .side[data-act] { padding: 8px 0; }
.nav .side { white-space: nowrap; }

/* ---------- 01 首页 ---------- */
.home .hero { flex-shrink: 0; }
.home .hint { padding-bottom: 4px; }
.home .hero-ornament { background: linear-gradient(180deg, transparent, #170a0e 28%, #170a0e 100%); }

/* ---------- 02 等待 ---------- */
.qr-wrap .qr-svg { width: 188px; height: 188px; display: block; margin: 0 auto; }
.qr-wrap .qr-svg svg { width: 100%; height: 100%; }
.room-code .link { -webkit-user-select: text; user-select: text; }
.player .online.off { color: var(--dim); }
.player .kick { font-size: 11px; color: var(--danger); border: 1px solid rgba(238,106,85,.4); border-radius: 6px; padding: 3px 8px; margin-left: 8px; }
.waiting .plist { flex: 1 0 auto; }
.waiting .cta-wrap { position: sticky; bottom: 0; padding-bottom: 4px; background: linear-gradient(180deg, transparent, #0e0a09 30%); }
.note { text-align: center; font-size: 11px; color: var(--muted); padding: 6px 22px 0; letter-spacing: .04em; }

/* ---------- 03 手牌 ---------- */
.others { flex-wrap: wrap; row-gap: 10px; }
.others.many .seat { width: 25%; }
.seat .avatar { margin: 0 auto; }
.seat.bust .nm::after { content: " · 爆"; color: var(--danger); }
.seat.offline { opacity: .5; }
.seat.lead .avatar { box-shadow: 0 0 0 2px var(--gold), 0 0 12px rgba(232,197,107,.6); }
.felt-table { min-height: 220px; }
.felt-table .last { margin-top: 8px; font-size: 12px; color: var(--ivory); letter-spacing: .04em; }
.felt-table .last b { color: var(--gold-soft); font-weight: 600; }
.coins { color: var(--ivory); }
.seat .cards { height: 58px; align-items: center; }
.coins i { display: inline-block; font-style: normal; animation: coinPulse 1.2s infinite ease-in-out; }
.coins i:nth-child(2) { animation-delay: .2s; } .coins i:nth-child(3) { animation-delay: .4s; }
@keyframes coinPulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
.hand-cards { flex-wrap: wrap; }
.hand-cards.tight { gap: 6px; }
.pot-bar[data-act] > div:first-child .k::after { content: " · 点此看记录"; color: var(--dim); letter-spacing: .04em; }

/* ---------- 04 拍卖 ---------- */
.ring { transition: none; }
.ring.urgent .ring-inner .sec { color: var(--danger); }
.bid-box .who.me { color: var(--ok); }
.bid-box .who.none { color: var(--muted); }
.hint-pill.bad { color: var(--danger); }
.hint-pill.good { color: var(--gold-soft); }
.hint-pill.plain { color: var(--muted); }
.flip-stage .pcard.lg { animation: flipIn .45s cubic-bezier(.2,.8,.2,1); }
@keyframes flipIn { from { transform: rotateY(90deg) scale(.9); opacity: .2; } to { transform: none; opacity: 1; } }
.bump { animation: bump .35s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* ---------- 05 结算 ---------- */
.result-banner.gold { background: linear-gradient(90deg, rgba(232,197,107,.22), rgba(201,160,71,.12)); border-color: rgba(232,197,107,.45); }
.result-banner.gold .sub { color: var(--gold-soft); }
.result-banner.felt { background: linear-gradient(90deg, rgba(28,90,68,.55), rgba(18,56,44,.35)); border-color: rgba(143,206,168,.35); }
.result-banner.felt .sub { color: #cfe8d8; }
.board { overflow-y: auto; min-height: 0; }
.rowp .cards { flex-wrap: wrap; }
.rowp .drink.wait { color: var(--muted); font-style: normal; }
.rowp .drink.ok { color: var(--ok); }
.rowp.lose { background: rgba(154,38,52,.2); border-color: rgba(238,106,85,.28); }
.rowp.lose .drink { color: #ffb0a4; font-weight: 600; }
.add-panel {
  margin: 10px 18px 0; padding: 12px 16px;
  border-radius: 14px; border: 1px solid rgba(232,197,107,.35);
  background: linear-gradient(180deg, rgba(232,197,107,.12), rgba(232,197,107,.04));
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.add-panel .label { font-size: 14px; color: var(--ivory); }
.add-panel .label span { display: block; font-size: 10px; color: var(--dim); margin-top: 2px; }
.add-panel .go { width: auto; padding: 0 16px; height: 40px; font-size: 14px; letter-spacing: .1em; }

/* ---------- 通用：弹窗 / 提示 / 连接条 ---------- */
.modal-mask {
  position: absolute; inset: 0; z-index: 50;
  background: rgba(8,4,5,.72);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal {
  width: 100%; max-width: 340px;
  background: linear-gradient(180deg, #24120f, #150b0b);
  border: 1px solid rgba(232,197,107,.3); border-radius: 20px;
  padding: 22px 20px 18px; box-shadow: 0 20px 50px rgba(0,0,0,.6);
}
.modal h2 { font-family: "Noto Serif SC", "Noto Serif CJK SC", "Songti SC", serif; color: var(--gold-soft); font-size: 20px; letter-spacing: .2em; text-align: center; font-weight: 600; }
.modal p { text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; letter-spacing: .04em; }
.modal .field { margin-top: 14px; }
.modal .field label { display: block; font-size: 11px; color: var(--gold); letter-spacing: .18em; margin-bottom: 6px; }
.modal input {
  width: 100%; height: 46px; border-radius: 12px;
  border: 1px solid rgba(232,197,107,.35); background: rgba(0,0,0,.35);
  color: var(--ivory); font-size: 17px; padding: 0 14px; font-family: inherit; outline: none;
}
.modal input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,197,107,.15); }
.modal input.code { text-transform: uppercase; letter-spacing: .4em; text-align: center; font-size: 22px; font-weight: 600; }
.modal .cta-wrap { padding: 16px 0 0; }
.sheet-mask { align-items: flex-end; padding: 0; }
.sheet { max-width: none; border-radius: 20px 20px 0 0; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); max-height: 70%; overflow-y: auto; }
.log-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(232,197,107,.08); font-size: 13px; }
.log-row .idx { width: 40px; color: var(--dim); font-size: 11px; }
.log-row .txt { flex: 1; }
.log-row .amt { color: var(--gold-soft); }

.toast {
  position: absolute; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 56px); transform: translateX(-50%);
  z-index: 60; max-width: 86%;
  background: rgba(30,16,14,.95); border: 1px solid rgba(232,197,107,.4); color: var(--gold-soft);
  border-radius: 999px; padding: 8px 16px; font-size: 13px; letter-spacing: .04em; text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,.5); pointer-events: none;
  animation: toastIn .2s ease;
}
.toast.err { border-color: rgba(238,106,85,.55); color: #ffc2b8; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -6px); } }
.conn-bar {
  position: absolute; left: 0; right: 0; top: 0; z-index: 55;
  padding: calc(env(safe-area-inset-top, 0px) + 4px) 12px 4px;
  background: rgba(122,26,40,.92); color: var(--ivory); font-size: 12px; text-align: center; letter-spacing: .06em;
}
.mock-tag { position: absolute; right: 8px; bottom: calc(env(safe-area-inset-bottom, 0px) + 2px); z-index: 45; font-size: 9px; color: var(--dim); opacity: .6; pointer-events: none; }
.av-5 { background: linear-gradient(160deg, #9a6ad0, #4a2c78); }
.av-6 { background: linear-gradient(160deg, #c8a03a, #7a5a14); }
.av-7 { background: linear-gradient(160deg, #5a8a3a, #2c4a18); }
.av-8 { background: linear-gradient(160deg, #8a8a8a, #3a3a3a); }
.step-btn.disabled { opacity: .3; pointer-events: none; }
.hand-cards.tight { gap: 0; flex-wrap: nowrap; }
.hand-cards.tight .pcard + .pcard { margin-left: -26px; }
.hand-cards.tight .pcard.sm + .pcard.sm { margin-left: 4px; }
.add-panel .go { flex-shrink: 0; white-space: nowrap; letter-spacing: .06em; padding: 0 14px; }
.add-panel .label { min-width: 0; flex: 1; }
.add-panel .stepper { flex-shrink: 0; gap: 6px; }
.add-panel .stepper .val { min-width: 44px; }

/* ---------- 04 出价区 v2：+1~+5 一行等宽 + 自定义滑杆 ---------- */
.bid-btns.five { gap: 6px; }
.bid-btns.five .b { flex: 1 1 0; min-width: 0; font-size: 15px; padding: 0; letter-spacing: 0; }
.bid-slider {
  margin: 10px 22px 0;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  column-gap: 8px;
}
.bid-slider .lim { font-size: 10px; color: var(--dim); font-variant-numeric: tabular-nums; min-width: 12px; text-align: center; }
.bid-slider .cur {
  min-width: 66px; text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap;
}
.bid-slider .cur b { font-size: 18px; color: var(--gold-soft); font-weight: 600; font-variant-numeric: tabular-nums; }
.gold-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 40px;          /* 触控区高 40px，轨道本身只有 6px */
  margin: 0; padding: 0; background: transparent;
  touch-action: none;                  /* 拖滑杆时不触发页面滚动 */
  cursor: pointer; outline: none;
  --p: 0%;
}
.gold-range::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, #d4a84a 0, #f0d78a var(--p), rgba(232,197,107,.14) var(--p));
  box-shadow: inset 0 0 0 1px rgba(232,197,107,.25);
}
.gold-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; margin-top: -10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c8, #e8c56b 45%, #b8862e 100%);
  border: 2px solid #3a2408;
  box-shadow: 0 0 0 1px rgba(232,197,107,.6), 0 3px 10px rgba(0,0,0,.5);
}
.gold-range:active::-webkit-slider-thumb { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(232,197,107,.18), 0 3px 10px rgba(0,0,0,.5); }
.gold-range::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(232,197,107,.14); }
.gold-range::-moz-range-progress { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #d4a84a, #f0d78a); }
.gold-range::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid #3a2408;
  background: radial-gradient(circle at 35% 30%, #fff3c8, #e8c56b 45%, #b8862e 100%);
}

/* 矮屏（iPhone SE 375x667 等）：压缩拍卖页纵向空间，避免滚动 */
@media (max-height: 740px) {
  .timer-wrap { margin: 2px 0 0; }
  .ring { width: 58px; height: 58px; }
  .ring-inner { width: 46px; height: 46px; }
  .ring-inner .sec { font-size: 18px; }
  .flip-label { margin: 2px 0 4px; }
  .flip-stage .pcard.lg { width: 96px; height: 136px; }
  .flip-stage .pcard.lg .pip { font-size: 48px; }
  .flip-stage .pcard.lg .rank .n { font-size: 20px; }
  .flip-stage .pcard.lg .rank .s { font-size: 16px; }
  .bid-box { margin-top: 8px; padding: 6px 14px 8px; }
  .bid-box .high { font-size: 22px; margin: 0; }
  .bid-btns { margin-top: 8px; }
  .bid-btns .b { height: 38px; }
  .bid-slider { margin-top: 4px; }
  .cta-wrap[style*="padding-top:10px"] { padding-top: 4px !important; }
  .btn { height: 46px; }
  .hint-pill { margin-top: 6px; }
  .myhand { padding-top: 6px !important; }
  .myhand .row1 { margin-bottom: 6px; }
}

/* ---------- 游戏合集首页 ---------- */
.hub-back { position: absolute; left: 16px; top: calc(env(safe-area-inset-top, 0px) + 12px); z-index: 5; font-size: 12px; color: var(--muted); padding: 6px 8px; letter-spacing: .06em; }
.app.hub { padding-left: 0; padding-right: 0; }
.hub-head { text-align: center; padding: 34px 0 10px; }
.hub-head h1 {
  font-family: "Noto Serif SC", "Noto Serif CJK SC", "Songti SC", serif;
  font-size: 38px; letter-spacing: .24em; text-indent: .24em; font-weight: 600; color: var(--gold-soft);
  margin-top: 8px; text-shadow: 0 2px 18px rgba(200,140,40,.25);
}
.hub-head .sub { margin-top: 6px; font-size: 12px; letter-spacing: .28em; color: var(--muted); }
.game-card {
  display: flex; align-items: center; gap: 14px;
  margin: 16px 18px 0; padding: 18px 14px 18px 16px;
  border-radius: 20px; text-decoration: none; color: inherit;
  background: linear-gradient(160deg, rgba(36,90,70,.45), rgba(12,42,34,.55));
  border: 1px solid rgba(232,197,107,.32);
  box-shadow: 0 10px 26px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,235,190,.06);
  transition: transform .08s ease, filter .08s ease;
  -webkit-touch-callout: none;
}
.game-card.dashu { background: linear-gradient(160deg, rgba(140,40,40,.42), rgba(60,14,20,.6)); }
.game-card:active { transform: scale(.98); filter: brightness(1.1); }
.gc-art { width: 96px; height: 104px; flex-shrink: 0; position: relative; }
.gc-cards .pcard.md { position: absolute; top: 14px; left: 8px; width: 58px; height: 82px; border-radius: 7px; transform-origin: 50% 100%; }
.gc-cards .pcard.md .rank .n { font-size: 13px; } .gc-cards .pcard.md .rank .s { font-size: 11px; }
.gc-cards .pcard.md .pip { font-size: 28px; }
.gc-cards .pcard:first-child { transform: rotate(-14deg); }
.gc-cards .pcard:last-child { transform: translateX(26px) rotate(12deg); }
.gc-uncle img { width: 104px; height: 104px; margin-left: -4px; display: block; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.gc-info { flex: 1; min-width: 0; }
.gc-title { font-family: "Noto Serif SC", "Noto Serif CJK SC", "Songti SC", serif; font-size: 24px; letter-spacing: .16em; color: var(--gold-soft); font-weight: 600; }
.gc-sub { margin-top: 6px; font-size: 12px; color: var(--ivory); opacity: .85; line-height: 1.5; }
.gc-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.gc-tags .chip { font-size: 10px; padding: 2px 8px; }
.gc-go { font-size: 30px; color: var(--gold); opacity: .8; padding-left: 2px; }
.hub .hint { margin-top: auto; }
/* 别惹大叔：一台手机模式的副入口（挂在卡片下方） */
.gc-alt {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 8px 18px 0; padding: 11px 16px; border-radius: 14px; text-decoration: none;
  font-size: 13px; color: var(--gold-soft); letter-spacing: .06em;
  background: rgba(120,30,30,.18); border: 1px dashed rgba(232,197,107,.35);
  -webkit-touch-callout: none;
}
.gc-alt span { font-size: 11px; color: var(--muted); letter-spacing: .04em; white-space: nowrap; }
.gc-alt:active { filter: brightness(1.15); }

/* ================= 20 人适配 ================= */
/* 迷你牌（xs）：桌面座位 / 结算紧凑行 */
.pcard.xs { width: 24px; height: 34px; border-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,.4), inset 0 0 0 1px rgba(90,60,20,.18); }
.pcard.xs .rank { top: 1px; left: 2px; }
.pcard.xs .rank .n { font-size: 8px; }
.pcard.xs .rank .s { font-size: 7px; margin-top: 0; }
.pcard.xs .rank.br { display: none; }
.pcard.xs .pip { font-size: 11px; top: 62%; }
.pcard.xs.back { box-shadow: 0 2px 5px rgba(0,0,0,.4), inset 0 0 0 1.5px #e0c16a; }
.pcard.xs.back .back-mark { inset: 3px; font-size: 7px; letter-spacing: 0; border-radius: 2px; }

/* 等待页：人多时二维码缩小，玩家两列紧凑；开始按钮 sticky 始终可达 */
.player .name { display: flex; align-items: center; min-width: 0; }
.player .name .nm-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.player .tag { flex-shrink: 0; }
.player .tag.me { color: var(--ok); border-color: rgba(143,206,168,.5); }
.waiting.many .room-code { margin-top: 6px; }
.waiting.many .room-code .code { font-size: 22px; }
.waiting.many .qr-wrap { margin: 8px auto 0; width: 156px; padding: 10px 10px 6px; border-radius: 14px; }
.waiting.many .qr-wrap .qr-svg { width: 132px; height: 132px; }
.waiting.many .qr-caption { font-size: 10px; margin-top: 2px; }
.waiting.many .plist { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 8px; align-content: start; }
.waiting.many .plist h3 { grid-column: 1 / -1; margin-bottom: 4px; }
.waiting.many .player { gap: 6px; padding: 5px 6px; border-radius: 10px; background: rgba(255,230,200,.035); border: 1px solid rgba(232,197,107,.08); min-width: 0; }
.waiting.many .avatar { width: 28px; height: 28px; font-size: 12px; }
.waiting.many .player .meta { min-width: 0; }
.waiting.many .player .name { font-size: 13px; }
.waiting.many .player .tag { margin-left: 3px; padding: 0 3px; font-size: 9px; }
.waiting.many .player .online { font-size: 10px; flex-shrink: 0; }
.waiting.many .player .kick { margin-left: 2px; padding: 2px 5px; font-size: 10px; }
.waiting .cta-wrap { z-index: 5; }

/* 手牌页：8+ 个对手时紧凑 5 列网格 */
.others.crowd { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px 2px; padding: 10px 8px 4px; }
.others.crowd .seat { width: auto; min-width: 0; }
.others.crowd .avatar { width: 26px; height: 26px; font-size: 11px; }
.others.crowd .seat .cards { height: 36px; margin: 3px 0 1px; }
.others.crowd .seat .cards .pcard { margin: 0 -5px; }
.others.crowd .seat .nm { font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.others.crowd .seat .cnt { font-size: 9px; }
.others.crowd .seat.bust .nm::after { content: ""; }
.others.crowd .seat.bust .cnt { color: var(--danger); }
.others.crowd .seat.bust .cnt::after { content: " · 爆"; }
.others.crowd + .felt-table { min-height: 84px; margin-top: 4px; border-radius: 60px; }
.others.crowd + .felt-table .table-pot { padding: 4px 10px; }
.others.crowd + .felt-table .wm { font-size: 36px; }
.others.crowd + .felt-table .coins { margin: 2px 0; font-size: 14px; }
.others.crowd + .felt-table .amt { font-size: 22px; }

/* 结算页：列表独立滚动，按钮固定在底部；喝酒的人置顶高亮 */
.app.settle { overflow: hidden; }
.app.settle .board { flex: 1 1 0; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.app.settle .cta-wrap { flex-shrink: 0; }
.result-banner .sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rowp .drink.big { font-size: 13px; }
.rowp.bust .drink.big, .rowp.lose .drink.big { color: #ffd0c8; }
.rowp.bust, .rowp.lose { box-shadow: inset 3px 0 0 var(--danger); }
.app.settle.compact .board { gap: 5px; }
.app.settle.compact .rowp { padding: 5px 8px; gap: 7px; border-radius: 10px; }
.app.settle.compact .rowp .avatar { width: 28px; height: 28px; font-size: 12px; }
.app.settle.compact .rowp .nm { font-size: 12px; }
.app.settle.compact .rowp .cards { margin-top: 3px; gap: 2px; }
.app.settle.compact .rowp .pts { font-size: 14px; }
.app.settle.compact .rowp .drink { font-size: 10px; margin-top: 0; }
.app.settle.compact .rowp .drink.big { font-size: 13px; }
.app.settle.compact .badge { font-size: 8px; padding: 0 4px; }
.app.settle.compact .legend { display: none; }

@media (max-height: 740px) {
  .others.crowd { padding-top: 6px; gap: 4px 2px; }
  .others.crowd .avatar { display: none; }
  .others.crowd .seat .cards { margin-top: 0; }
  .others.crowd + .felt-table .coins, .others.crowd + .felt-table .label { display: none; }
  .others.crowd + .felt-table .wm { font-size: 28px; }
  .others.crowd ~ .myhand { padding-top: 6px; }
  .others.crowd ~ .myhand .row1 { margin-bottom: 6px; }
}

/* ============================================================
   底部「我的手牌」统一放大（.pcard.hb，宽度 = --hw，高宽比 1.42）
   多张自动叠放：间距 = min(8px, (容器宽 − n×hw)/(n−1))，左上角角标始终露出
   ============================================================ */
.myhand.big { --hw: 92px; padding: 10px 22px 4px; flex-shrink: 0; }
.myhand.big .row1 { margin-bottom: 8px; }
.myhand.big .row1 .t { font-size: 12px; }
.myhand.big .pts { font-size: 22px; }
.hand-cards.hb { display: flex; flex-wrap: nowrap; justify-content: center; gap: 0; width: 100%; }
.hand-cards.hb .pcard + .pcard {
  margin-left: min(8px, calc((100% - var(--n) * var(--hw)) / (var(--n) - 1)));
  box-shadow: -6px 0 12px rgba(0,0,0,.35), inset 0 0 0 1px rgba(90,60,20,.18);
}
.pcard.hb { width: var(--hw); height: calc(var(--hw) * 1.42); border-radius: calc(var(--hw) * 0.1); }
.pcard.hb .rank { top: calc(var(--hw) * 0.06); left: calc(var(--hw) * 0.07); }
.pcard.hb .rank .n { font-size: calc(var(--hw) * 0.25); letter-spacing: -0.04em; }
.pcard.hb .rank .s { font-size: calc(var(--hw) * 0.2); margin-top: 1px; }
.pcard.hb .rank.br { top: auto; left: auto; bottom: calc(var(--hw) * 0.06); right: calc(var(--hw) * 0.07); }
.pcard.hb .pip { font-size: calc(var(--hw) * 0.5); top: 56%; }
/* 叠放后右侧被盖住的牌：大花色挪到左半边露出的部分不必要，保持居中即可；角标在左上永远可见 */

/* 我的手牌页：桌面压缩，手牌最大 */
.felt-bg .felt-table { min-height: 96px; }
@media (max-height: 740px) { .myhand.big { --hw: 80px; padding-top: 4px; } .myhand.big .row1 { margin-bottom: 4px; } }
@media (max-height: 600px) { .myhand.big { --hw: 68px; } }
.others.crowd ~ .myhand.big { --hw: 80px; }
@media (max-height: 740px) { .others.crowd ~ .myhand.big { --hw: 70px; } }
@media (max-height: 600px) { .others.crowd ~ .myhand.big { --hw: 60px; } }

/* ---------- 拍卖页 v3：倒计时与翻牌同一行；压缩空白；「过」 ---------- */
.app.auction { padding-top: calc(env(safe-area-inset-top, 0px) + 10px); padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 6px); }
.flip-row { position: relative; display: flex; justify-content: center; align-items: center; margin: 8px 22px 0; }
.flip-row .ring { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 64px; height: 64px; }
.flip-row .ring-inner { width: 52px; height: 52px; }
.flip-row .flip-label { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); margin: 0; line-height: 1.5; font-size: 11px; letter-spacing: .3em; text-align: center; }
.app.auction .flip-stage .pcard.lg { width: 104px; height: 148px; }
.app.auction .flip-stage .pcard.lg .pip { font-size: 52px; }
.app.auction .bid-box { display: flex; align-items: center; justify-content: space-between; margin: 10px 22px 0; padding: 8px 16px; text-align: left; }
.app.auction .bid-box .high { margin: 0; font-size: 26px; line-height: 1.1; }
.app.auction .hb-right { text-align: right; }
.app.auction .bid-box .who { margin: 0 0 2px; font-size: 13px; }
.pass-count { font-size: 11px; color: var(--dim); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.pass-count.on { color: var(--gold-soft); }
.pass-strip { display: flex; gap: 5px; margin: 8px 22px 0; padding: 2px 0 4px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.pass-strip::-webkit-scrollbar { display: none; }
.pchip { position: relative; flex-shrink: 0; }
.pchip .avatar { width: 28px; height: 28px; font-size: 12px; margin: 0; border-width: 1px; }
.pchip.passed .avatar { filter: grayscale(.85) brightness(.6); }
.pchip.bust .avatar { opacity: .35; }
.pchip.lead .avatar { box-shadow: 0 0 0 2px var(--gold-soft); }
.pchip .stamp { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; background: #2a1a12; border: 1px solid var(--gold); color: var(--gold-soft); font-style: normal; font-size: 10px; line-height: 14px; text-align: center; font-weight: 700; }
.pchip .crown { position: absolute; left: 50%; top: -7px; transform: translateX(-50%); font-style: normal; font-size: 10px; color: var(--gold-soft); }
.app.auction .bid-btns { margin-top: 8px; }
.app.auction .bid-slider { margin-top: 2px; }
.bid-btns.locked, .bid-slider.locked { opacity: .38; pointer-events: none; }
.gold-range:disabled { cursor: default; }
.cta-row { display: flex; gap: 10px; padding: 4px 22px 0; }
.cta-row .btn-gold { flex: 1 1 auto; min-width: 0; }
.btn-pass {
  flex: 0 0 84px; height: 52px; border-radius: 14px; font-size: 18px; font-weight: 700; letter-spacing: .3em; padding-left: .3em;
  color: #ffe0d6; background: linear-gradient(180deg, #8a2a24, #5a1612); border: 1px solid rgba(255,170,150,.45);
  box-shadow: 0 6px 16px rgba(80,10,10,.45), inset 0 1px 0 rgba(255,255,255,.12);
}
.btn-pass:active { transform: translateY(1px); }
.btn-pass.done, .btn-pass:disabled { background: rgba(255,255,255,.06); color: var(--muted); border-color: rgba(255,255,255,.15); box-shadow: none; letter-spacing: .1em; font-size: 15px; }
.app.auction .hint-pill { margin-top: 6px; }
.app.auction .myhand.big { margin-top: auto; --hw: 96px; padding-top: 6px; }
.app.auction .myhand.big .row1 { margin-bottom: 4px; }

@media (max-height: 740px) {
  .app.auction .flip-row { margin-top: 2px; }
  .flip-row .ring { width: 54px; height: 54px; }
  .flip-row .ring-inner { width: 44px; height: 44px; }
  .app.auction .flip-stage .pcard.lg { width: 80px; height: 114px; }
  .app.auction .flip-stage .pcard.lg .pip { font-size: 40px; }
  .app.auction .flip-stage .pcard.lg .rank .n { font-size: 18px; }
  .app.auction .flip-stage .pcard.lg .rank .s { font-size: 14px; }
  .app.auction .bid-box { margin-top: 6px; padding: 5px 14px; }
  .app.auction .bid-box .high { font-size: 22px; }
  .pass-strip { margin-top: 5px; }
  .pchip .avatar { width: 24px; height: 24px; font-size: 11px; }
  .app.auction .bid-btns { margin-top: 5px; }
  .app.auction .bid-btns .b { height: 36px; }
  .app.auction .gold-range { height: 34px; }
  .cta-row .btn, .btn-pass { height: 46px; }
  .app.auction .hint-pill { margin-top: 4px; }
  .app.auction .myhand.big { --hw: 82px; padding-top: 2px; }
}
@media (max-height: 600px) {
  .app.auction .nav { min-height: 0; }
  .flip-row .ring { width: 48px; height: 48px; }
  .flip-row .ring-inner { width: 39px; height: 39px; }
  .flip-row .ring-inner .sec { font-size: 15px; }
  .app.auction .flip-stage .pcard.lg { width: 64px; height: 91px; border-radius: 8px; }
  .app.auction .flip-stage .pcard.lg .pip { font-size: 32px; }
  .app.auction .flip-stage .pcard.lg .rank { top: 4px; left: 5px; }
  .app.auction .flip-stage .pcard.lg .rank .n { font-size: 15px; }
  .app.auction .flip-stage .pcard.lg .rank .s { font-size: 12px; }
  .app.auction .flip-stage .pcard.lg .rank.br { display: none; }
  .app.auction .bid-box .k { display: none; }
  .app.auction .gold-range { height: 30px; }
  .app.auction .bid-btns .b { height: 34px; }
  .cta-row .btn, .btn-pass { height: 44px; }
  .app.auction .hint-pill { font-size: 11px; padding: 2px 10px; }
  .app.auction .myhand.big { --hw: 70px; }
  .app.auction .myhand.big .row1 .pts { font-size: 18px; }
}

/* ---------- 结算页底部固定「我的手牌」 ---------- */
.myhand.dock { --hw: 72px; margin-top: 0; padding: 6px 22px 2px; background: rgba(0,0,0,.25); border-top: 1px solid rgba(232,197,107,.15); }
.myhand.dock .row1 { margin-bottom: 4px; }
.dock-note { font-size: 13px; font-weight: 600; margin-right: 10px; letter-spacing: .04em; }
.dock-note.bad { color: #ffb4a6; }
.dock-note.ok { color: var(--ok); }
@media (max-height: 740px) { .myhand.dock { --hw: 60px; } .app.settle .legend { display: none; } }
@media (max-height: 600px) { .myhand.dock { --hw: 52px; padding-top: 4px; } }
/* 高屏（≥800px 可视高）：手牌再大一号，约占底部 1/4 屏 */
@media (min-height: 800px) {
  .myhand.big { --hw: 108px; }
  .app.auction .myhand.big { --hw: 112px; }
  .others.crowd ~ .myhand.big { --hw: 88px; }
  .myhand.dock { --hw: 84px; }
}
/* 矮屏结算页：底部手牌改成左右排（左：标题/喝几杯/点数，右：牌），给列表多留几行 */
@media (max-height: 740px) {
  .myhand.dock { display: flex; align-items: center; gap: 12px; padding: 5px 22px 3px; }
  .myhand.dock .row1 { flex-direction: column; align-items: flex-start; justify-content: center; margin: 0; flex: 0 0 auto; gap: 2px; }
  .myhand.dock .pts { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
  .myhand.dock .dock-note { margin: 0; }
  .myhand.dock .hand-cards.hb { flex: 1 1 auto; min-width: 0; justify-content: flex-end; }
  .myhand.dock { --hw: 64px; }
}
@media (max-height: 600px) {
  .myhand.dock { --hw: 56px; }
  /* 20 人 + Safari 矮可视区：牌桌只剩一行底酒，座位去掉张数行，保证手牌不被挤出屏 */
  .others.crowd .seat .cnt { display: none; }
  .others.crowd + .felt-table { min-height: 0; flex: 0 0 auto; padding: 4px 10px; border-radius: 30px; }
  .others.crowd + .felt-table .wm, .others.crowd + .felt-table .wait { display: none; }
  .others.crowd + .felt-table .amt { font-size: 18px; }
}
@media (max-height: 740px) {
  .myhand.dock .pts { display: block; text-align: left; line-height: 1.15; }
  .myhand.dock .dock-note { display: block; }
}
@media (max-height: 600px) {
  .others.crowd { gap: 2px 2px; padding-top: 2px; }
  .others.crowd ~ .myhand.big { padding-top: 2px; }
  .others.crowd ~ .myhand.big .row1 { margin-bottom: 2px; }
  .felt-bg .pot-bar { padding-top: 4px; padding-bottom: 4px; }
}
.myhand .pts { white-space: nowrap; }
.myhand.dock .hand-cards.hb { width: auto; }

/* ---------- 掉线 vs 已离开（room_state.players[].left） ---------- */
/* 掉线：灰、可重连；已离开：更淡 + 虚线头像 + 红褐标签，结算后被移出 */
.player .online.off { color: #d9a25a; }
.player .online.left { color: #c77a6a; }
.player.left .avatar, .seat.left .avatar, .rowp.left .avatar { opacity: .45; outline: 1.5px dashed rgba(230,140,120,.7); outline-offset: 1px; filter: grayscale(.7); }
.player.left .nm-txt { text-decoration: line-through; text-decoration-color: rgba(230,140,120,.6); opacity: .7; }
.player.offline .avatar, .seat.offline .avatar { filter: grayscale(.6); }
.seat.offline { opacity: .7; }
.seat.left { opacity: .5; }
.st-off { font-weight: 500; color: #d9a25a; }
.st-left { font-weight: 500; color: #e08a78; }
.badge-off { background: rgba(217,162,90,.15); color: #e0b070; border: 1px solid rgba(217,162,90,.4); }
.badge-left { background: rgba(200,90,70,.15); color: #f0a090; border: 1px dashed rgba(230,140,120,.6); }
.pchip.off .avatar { filter: grayscale(.6); box-shadow: 0 0 0 1.5px #d9a25a; }
.pchip.left .avatar { opacity: .35; outline: 1.5px dashed rgba(230,140,120,.7); outline-offset: 1px; }
.pchip .stamp.gone { border-color: #c77a6a; color: #f0a090; }
.modal .room-info { margin-top: 6px; font-size: 12px; color: var(--gold-soft); line-height: 1.5; }
.modal .room-info.bad { color: var(--danger); }
