/* 斗地主客户端样式。
 *
 * 视觉原则：牌桌要有牌桌的样子 —— 但所有动效都服务于**信息传达**：
 * 炸弹加倍必须被看见，轮到谁必须一目了然，报牌必须引起注意。
 * 刻意不做的：不隐藏或弱化亏损数字、不制造虚假的胜利预期、
 * 不用无限循环的奖励动效诱导续局。演示模式的筹码性质始终可见。
 */
:root {
  --bg: #0c1118;
  --bg2: #141c27;
  --panel: #1a222e;
  --panel2: #202a38;
  --line: #2c3644;
  --fg: #eef2f8;
  --muted: #8fa0b5;
  --accent: #4a9eff;
  --gold: #f5c04a;
  --gold2: #e8a51f;
  --good: #4ec277;
  --warn: #e0a437;
  --danger: #e5604f;
  --red: #d93a30;
  --black: #22293a;
  --felt1: #2f8a58;
  --felt2: #1d6640;
  --felt3: #145233;
  --wood1: #7a4d28;
  --wood2: #553318;
  --radius: 12px;
  --shadow-card: 0 2px 5px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

/* JS 用 el.hidden 切换显隐。元素只要带自己的 display 规则（如 .settle 的
   display:grid），浏览器对 [hidden] 的默认 display:none 就会被它压掉，
   结算面板就会在没开局时浮在首页上。这条兜底保证 hidden 永远生效。 */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 50% -10%, #1b2735 0%, transparent 60%),
    radial-gradient(900px 600px at 85% 110%, #16202c 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--fg);
  font: 15px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  -webkit-text-size-adjust: 100%;
}

h1 { font-size: 21px; margin: 0 0 8px; }
h2 { font-size: 18px; margin: 0 0 8px; }
h3 { font-size: 16px; margin: 16px 0 8px; }
code {
  background: rgba(0, 0, 0, .4); padding: 1px 5px; border-radius: 4px;
  font-size: 12px; word-break: break-all;
}
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* —— 顶部 —— */

.banner {
  background: linear-gradient(90deg, #2c230f, #33290f, #2c230f);
  color: #f0dcae; border-bottom: 1px solid var(--warn);
  padding: 9px 16px; font-size: 13px; text-align: center;
}
.banner strong { color: var(--warn); margin-right: 6px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  background: rgba(16, 22, 30, .85); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.brand {
  font-weight: 800; letter-spacing: 2px; font-size: 17px;
  background: linear-gradient(180deg, #ffe9a8, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tag {
  font-size: 11px; font-weight: 400; color: var(--muted);
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 1px 8px; margin-left: 8px;
  -webkit-text-fill-color: var(--muted);
}
.who { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.bal { color: var(--good); font-variant-numeric: tabular-nums; font-weight: 600; }

.panel { max-width: 720px; margin: 28px auto; padding: 0 16px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.row.center { justify-content: center; }
.spacer { flex: 1; }

/* —— 按钮 —— */

.btn {
  background: var(--panel2); color: var(--fg); border: 1px solid var(--line);
  padding: 9px 18px; border-radius: 999px; cursor: pointer; font-size: 14px;
  font-family: inherit; transition: transform .06s, box-shadow .12s, filter .12s;
}
.btn:hover:not(:disabled) { border-color: var(--accent); filter: brightness(1.12); }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(180deg, #ffd97a, var(--gold2));
  border-color: #b8860b; color: #3a2703; font-weight: 700;
  box-shadow: 0 2px 10px rgba(232, 165, 31, .35);
}
.btn.big { font-size: 16px; padding: 11px 26px; }
.btn.act {
  background: linear-gradient(180deg, #59b6ff, #2e7fe0);
  border-color: #1b5cab; color: #fff; font-weight: 700;
  box-shadow: 0 2px 10px rgba(74, 158, 255, .3);
}
.btn.pass {
  background: linear-gradient(180deg, #55637a, #3b4759);
  border-color: #2c3644; color: #dfe7f2; font-weight: 700;
}
.btn.warn { border-color: var(--warn); color: var(--warn); background: none; }
.btn.danger { border-color: var(--danger); color: var(--danger); background: none; }
.link {
  background: none; border: 0; color: var(--accent); cursor: pointer;
  font-size: 13px; padding: 0; font-family: inherit;
}
.link:hover { text-decoration: underline; }
.iconbtn {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 50%;
  width: 30px; height: 30px; font-size: 15px; cursor: pointer;
  display: inline-grid; place-items: center; padding: 0; line-height: 1;
}
.iconbtn:hover { border-color: var(--accent); }

.devbox {
  border: 1px dashed var(--accent); border-radius: var(--radius);
  padding: 12px 14px; margin-top: 18px; font-size: 13px;
  background: rgba(74, 158, 255, .05);
}
.devbox input { flex: 1; min-width: 140px; }
.devbox strong { color: var(--accent); }

.notice {
  border: 1px solid var(--warn); background: #241d0e; color: #f0dcae;
  padding: 12px 14px; border-radius: var(--radius); margin-top: 20px; font-size: 13px;
}

/* —— 大厅 —— */

.tiers { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tier {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; background: linear-gradient(180deg, var(--panel2), var(--panel));
  transition: transform .12s, border-color .12s;
}
.tier:hover { transform: translateY(-2px); border-color: var(--gold2); }
.tier h3 { margin: 0 0 10px; font-size: 17px; letter-spacing: 1px; }
.tier dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 13px; }
.tier dt { color: var(--muted); }
.tier dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.tier .cap { color: var(--warn); font-weight: 700; }
.tier button { width: 100%; margin-top: 14px; border-radius: 10px; }

/* —— 牌桌骨架 —— */

.tablewrap { max-width: 980px; margin: 0 auto; padding: 10px 14px 0; }
.tableinfo {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  font-size: 13px; color: var(--muted); padding-bottom: 8px;
}
.tiername { color: var(--gold); font-weight: 700; letter-spacing: 1px; }
.mult { color: var(--gold); font-weight: 800; font-variant-numeric: tabular-nums; }
.mult.punch { animation: punch .4s; }

/* —— 牌桌主体 —— */

.arena { position: relative; padding: 0 108px; }

.felt {
  position: relative;
  border-radius: 46% 46% 42% 42% / 34% 34% 30% 30%;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(255, 255, 255, .1), transparent 55%),
    radial-gradient(ellipse at 50% 45%, var(--felt1) 0%, var(--felt2) 62%, var(--felt3) 100%);
  border: 10px solid transparent;
  background-clip: padding-box;
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, .5),
    inset 0 0 6px rgba(255, 255, 255, .08),
    0 0 0 4px var(--wood2),
    0 0 0 10px var(--wood1),
    0 0 0 12px #3a2410,
    0 14px 40px rgba(0, 0, 0, .55);
  min-height: 292px;
  padding: 18px 16px 14px;
  display: flex; flex-direction: column; gap: 8px;
  overflow: hidden;
}
.felt::after {
  /* 呢面细纹 */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.014) 0 2px, transparent 2px 4px);
}

.bottomcards {
  display: flex; gap: 5px; justify-content: center; align-items: center;
  min-height: 46px; position: relative; z-index: 1;
}
.bottomcards::before {
  content: "底牌"; color: rgba(255, 255, 255, .55); font-size: 12px;
  letter-spacing: 2px; margin-right: 8px;
}
.bottomcards:empty { min-height: 0; }
.bottomcards:empty::before { display: none; }

.playrow {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px;
  align-items: center; flex: 1; position: relative; z-index: 1;
}
.playzone {
  display: flex; gap: 3px; flex-wrap: wrap; justify-content: center;
  align-content: center; min-height: 74px; position: relative; padding: 4px 2px;
}
.playzone .zonelabel {
  position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: rgba(255, 255, 255, .75);
  background: rgba(0, 0, 0, .35); border-radius: 999px; padding: 0 8px;
  white-space: nowrap; pointer-events: none;
}
.playzone.mine { min-height: 78px; }

.centerinfo {
  display: grid; place-items: center; gap: 2px; min-width: 130px;
  color: rgba(255, 255, 255, .85); text-align: center;
}
.multbig {
  font-size: 30px; font-weight: 900; color: var(--gold);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .5), 0 0 18px rgba(245, 192, 74, .25);
  font-variant-numeric: tabular-nums; min-height: 38px; line-height: 38px;
}
.multbig small { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.75); }
.multbig.punch { animation: punch .45s; }
.tablemsg { font-size: 13px; color: rgba(255, 255, 255, .8); text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.timer { font-size: 12px; color: rgba(255, 255, 255, .65); font-variant-numeric: tabular-nums; }
.timer.urgent { color: #ffb3a8; font-weight: 700; }

/* —— 座位 —— */

.seat { position: relative; width: 108px; }
.seat.side {
  position: absolute; top: 34%; display: flex; flex-direction: column;
  align-items: center; gap: 5px; z-index: 2;
}
#seatL { left: -4px; }
#seatR { right: -4px; }
.seat.me {
  position: absolute; left: -8px; bottom: -6px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.ring {
  width: 56px; height: 56px; border-radius: 50%; padding: 3px;
  background: conic-gradient(var(--gold) calc(var(--p, 0) * 1%), rgba(255,255,255,.12) 0);
  transition: background .2s;
}
.ring.idle { background: rgba(255, 255, 255, .12); }
.avatar {
  width: 100%; height: 100%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--av1, #3b4a5f), var(--av2, #232e3d));
  border: 2px solid rgba(255, 255, 255, .25);
  display: grid; place-items: center; font-size: 24px; line-height: 1;
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, .35);
}
.seat.landlord .ring { background: conic-gradient(from 0deg, #ffd97a, var(--gold2), #ffd97a); box-shadow: 0 0 14px rgba(245, 192, 74, .45); }
.seat.turn .avatar { box-shadow: 0 0 0 3px rgba(255, 217, 122, .8), 0 0 18px rgba(245, 192, 74, .5); animation: breathe 1.2s ease-in-out infinite; }
.seat.offline .avatar { filter: grayscale(1) brightness(.6); }
.seat .meta { text-align: center; font-size: 12px; color: #dfe7f2; min-width: 0; }
.seat .meta b {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  max-width: 108px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.seat .meta .sub { color: rgba(255, 255, 255, .72); font-size: 11px; display: block; }
.seat .crown { font-size: 13px; }
.seat .cnt {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px;
  padding: 0 5px; border-radius: 999px; background: rgba(0, 0, 0, .4);
  color: #fff; font-weight: 700; font-size: 12px; margin-left: 4px;
}
.seat .cnt.danger { background: var(--danger); animation: blink 1s infinite; }
.seat .role {
  font-size: 10px; letter-spacing: 1px; border-radius: 999px; padding: 0 7px;
  background: rgba(255, 255, 255, .14);
}
.seat .role.ll { background: linear-gradient(180deg, #ffd97a, var(--gold2)); color: #4a3202; font-weight: 800; }
.seat .flag { font-size: 10px; color: #ffc9bd; }

/* 表情气泡 */
.bubble {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: #fff; color: #222; border-radius: 14px; padding: 5px 11px;
  font-size: 13px; white-space: nowrap; z-index: 5;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .35);
  animation: bubble-in .25s cubic-bezier(.34, 1.56, .64, 1);
  pointer-events: none;
}
.bubble::after {
  content: ""; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #fff; border-bottom: 0;
}

/* —— 牌型横幅与特效 —— */

.bannerlayer {
  position: absolute; inset: 0; z-index: 6; pointer-events: none;
  display: grid; place-items: center;
}
.combobanner {
  font-size: 44px; font-weight: 900; letter-spacing: 6px;
  color: #fff; text-shadow: 0 0 18px rgba(255, 60, 40, .8), 0 4px 14px rgba(0, 0, 0, .7);
  background: radial-gradient(ellipse at center, rgba(160, 20, 10, .88), rgba(90, 10, 5, .55) 70%, transparent);
  padding: 14px 44px; border-radius: 18px;
  animation: banner-pop 1.4s cubic-bezier(.2, 1.4, .4, 1) forwards;
  border: 2px solid rgba(255, 190, 120, .5);
}
.combobanner.gold {
  color: #fff8e0; text-shadow: 0 0 22px rgba(255, 200, 80, .9), 0 4px 14px rgba(0, 0, 0, .7);
  background: radial-gradient(ellipse at center, rgba(160, 110, 10, .88), rgba(90, 60, 5, .55) 70%, transparent);
}
.floattext {
  position: absolute; font-size: 20px; font-weight: 800; color: var(--gold);
  text-shadow: 0 2px 6px rgba(0, 0, 0, .7); z-index: 7;
  animation: float-up 1.2s ease-out forwards; pointer-events: none;
}
.shake { animation: shake .5s; }

/* 彩带 */
.confetti {
  position: fixed; top: -20px; width: 10px; height: 16px; z-index: 200;
  pointer-events: none; animation: confetti-fall linear forwards;
}

/* —— 牌 —— */

.card {
  width: 52px; height: 74px; border-radius: 7px; flex: none;
  background: linear-gradient(160deg, #ffffff 0%, #eef1f7 70%, #dde3ee 100%);
  color: var(--black); border: 1px solid #b9c2d4;
  box-shadow: var(--shadow-card);
  position: relative; user-select: none; line-height: 1;
  font-family: "Avenir Next", "Helvetica Neue", Arial, "PingFang SC", sans-serif;
}
.card.red { color: var(--red); }
.card .idx {
  position: absolute; top: 3px; left: 4px; font-size: 15px; font-weight: 800;
  letter-spacing: -1px; text-align: center; line-height: .95;
}
.card .idx .st { display: block; font-size: 11px; font-weight: 600; }
.card .idx.b {
  top: auto; left: auto; bottom: 3px; right: 4px; transform: rotate(180deg);
}
.card .pip {
  position: absolute; right: 5px; top: 5px; font-size: 16px; opacity: .9;
}
.card .mid {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 26px; opacity: .92;
}
.card.joker { background: linear-gradient(160deg, #fff, #f2ecdf); }
.card.joker .jlabel {
  position: absolute; top: 4px; left: 4px; bottom: 4px;
  writing-mode: vertical-rl; text-orientation: upright;
  font-size: 10px; font-weight: 800; letter-spacing: 1px;
}
.card.joker .mid { font-size: 22px; font-weight: 900; }
.card.joker.big-j .mid, .card.joker.big-j .jlabel { color: var(--red); }
.card.back {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 4px, transparent 4px 8px),
    linear-gradient(150deg, #29528f, #16294a);
  border-color: #0f1f38;
}
.card.back::after {
  content: "❖"; color: rgba(255, 255, 255, .3); position: absolute; inset: 0;
  display: grid; place-items: center; font-size: 18px;
}
.card.sm { width: 36px; height: 52px; border-radius: 5px; }
.card.sm .idx { font-size: 12px; top: 2px; left: 3px; }
.card.sm .idx .st { font-size: 9px; }
.card.sm .idx.b { bottom: 2px; right: 3px; }
.card.sm .mid { font-size: 18px; }
.card.sm.joker .mid { font-size: 15px; }
.card.flip { animation: flip-in .5s ease-out backwards; }

/* —— 我的手牌 —— */

.myhand {
  display: flex; justify-content: center; align-items: flex-end;
  padding: 16px 0 8px; min-height: 104px; position: relative;
}
.myhand .card {
  margin-left: -30px; cursor: pointer;
  transition: transform .1s ease-out, box-shadow .1s, border-color .1s;
}
.myhand .card:first-child { margin-left: 0; }
.myhand .card:hover { transform: translateY(-8px); z-index: 3; }
.myhand .card.sel {
  transform: translateY(-20px); border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold), 0 8px 16px rgba(0, 0, 0, .4);
  z-index: 4;
}
.myhand .card.dealt { animation: deal-in .38s cubic-bezier(.2, .9, .3, 1) backwards; }
.myhand .card.hintflash { animation: hint-flash .5s; }

/* —— 记牌器 —— */

.counter {
  display: flex; gap: 4px; justify-content: center; flex-wrap: wrap;
  padding: 7px 10px; margin: 2px auto 0; width: fit-content; max-width: 100%;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 10px;
  font-size: 12px;
}
.counter .ck {
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 6px; background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1); line-height: 1.05;
}
.counter .ck b { font-size: 12px; }
.counter .ck span { font-size: 9px; color: var(--muted); }
.counter .ck.zero { opacity: .28; }
.counter .ck.hot b { color: var(--gold); }
.counter .title { align-self: center; color: var(--muted); font-size: 11px; margin-right: 4px; }

/* —— 动作区 —— */

.actionrow { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 2px 0 14px; }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; min-height: 42px; align-items: center; }
.actions .waiting { color: var(--muted); font-size: 13px; }

.emotebar { position: relative; }
.emotepanel {
  position: absolute; bottom: 42px; right: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  animation: bubble-in .18s ease-out;
}
.emotepanel button {
  background: var(--panel); color: var(--fg); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px; font-size: 12px; cursor: pointer;
  font-family: inherit; white-space: nowrap;
}
.emotepanel button:hover:not(:disabled) { border-color: var(--gold); }
.emotepanel button:disabled { opacity: .4; cursor: not-allowed; }

/* —— 日志 —— */

.log {
  max-width: 980px; margin: 0 auto; padding: 8px 16px 30px;
  font-size: 12px; color: var(--muted); max-height: 150px; overflow-y: auto;
}
.log div { padding: 1px 0; }
.log .err { color: var(--danger); }
.log .ok { color: var(--good); }

/* —— 结算 —— */

.settle {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(5, 8, 12, .72); backdrop-filter: blur(4px);
  animation: fade-in .25s ease-out;
}
.settle-card {
  width: min(560px, calc(100% - 32px));
  background: linear-gradient(180deg, #223048, #182233);
  border: 1px solid #3a4c68; border-radius: 20px; padding: 26px 24px 20px;
  text-align: center; box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
  animation: settle-in .4s cubic-bezier(.2, 1.3, .4, 1);
  max-height: calc(100% - 40px); overflow-y: auto;
}
.settle-card.win { border-color: var(--gold2); box-shadow: 0 24px 80px rgba(0,0,0,.6), 0 0 40px rgba(245,192,74,.18); }
.settle-title { font-size: 40px; font-weight: 900; letter-spacing: 8px; }
.settle-card.win .settle-title {
  background: linear-gradient(180deg, #ffe9a8, var(--gold2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 8px rgba(245, 192, 74, .35));
}
.settle-card.lose .settle-title { color: #b8c6da; }
.settle-sub { color: var(--muted); margin-top: 2px; }
.settle-amount { font-size: 32px; font-weight: 800; margin: 12px 0; font-variant-numeric: tabular-nums; }
.settle-amount.plus { color: var(--good); }
.settle-amount.minus { color: var(--danger); }
.settle-amount.zero { color: var(--muted); }
.settle-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px; margin: 8px 0 14px;
}
.settle-grid .cell {
  background: rgba(0, 0, 0, .25); border-radius: 10px; padding: 8px 6px;
  font-size: 12px; color: var(--muted);
}
.settle-grid .cell b { display: block; font-size: 16px; color: var(--fg); font-variant-numeric: tabular-nums; }
.settle-hands { display: grid; gap: 8px; margin: 6px 0 10px; text-align: left; }
.settle-hands .pl {
  display: grid; grid-template-columns: 92px 1fr; gap: 8px; align-items: start;
  background: rgba(0, 0, 0, .2); border-radius: 10px; padding: 8px;
}
.settle-hands .pl .whoami { font-size: 12px; color: var(--muted); }
.settle-hands .pl .whoami b { color: var(--fg); display: block; font-size: 13px; }
.settle-hands .cards { display: flex; flex-wrap: wrap; gap: 2px; }
.settle-hands .cards .card { width: 24px; height: 34px; border-radius: 3px; }
.settle-hands .cards .card .idx { font-size: 10px; top: 1px; left: 2px; }
.settle-hands .cards .card .idx .st { font-size: 8px; }
.settle-hands .cards .card .idx.b { display: none; }
.settle-hands .cards .card .mid { font-size: 12px; }
.settle-hands .cards .card .pip { display: none; }
.settle-hands .cards .card.joker .jlabel { font-size: 7px; }
.settle-hands .cards .card.joker .mid { font-size: 10px; }
.settle-note { font-size: 12px; color: var(--muted); margin-bottom: 6px; }

/* —— 对话框 —— */

dialog {
  border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
  color: var(--fg); max-width: 540px; width: calc(100% - 32px); padding: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
}
dialog::backdrop { background: rgba(0, 0, 0, .65); }
dialog label { display: block; margin: 10px 0; font-size: 13px; color: var(--muted); }
dialog input {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font-size: 14px;
  background: #0f141b; border: 1px solid var(--line); border-radius: 8px; color: var(--fg);
  font-family: inherit;
}
.usage {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px;
  font-size: 13px; margin: 10px 0; display: grid; gap: 4px;
}
.kv { display: grid; gap: 8px; font-size: 12px; margin: 12px 0; }
.kv div { display: grid; gap: 2px; }
.kv b { color: var(--muted); font-weight: 400; }

input[type="text"], input[type="number"] {
  background: #0f141b; border: 1px solid var(--line); border-radius: 8px;
  color: var(--fg); padding: 8px 10px; font-size: 14px; font-family: inherit;
}

select {
  background: #0f141b; color: var(--fg); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px; font-family: inherit; font-size: 14px;
}

/* —— 动画 —— */

@keyframes deal-in {
  from { transform: translate(0, -120px) rotate(-8deg) scale(.7); opacity: 0; }
  60% { opacity: 1; }
  to { transform: none; opacity: 1; }
}
@keyframes from-left {
  from { transform: translate(-160px, -30px) rotate(-10deg) scale(.8); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes from-right {
  from { transform: translate(160px, -30px) rotate(10deg) scale(.8); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes from-me {
  from { transform: translateY(110px) scale(.9); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes flip-in {
  from { transform: rotateY(90deg); }
  to { transform: none; }
}
@keyframes punch {
  0% { transform: scale(1); }
  35% { transform: scale(1.45); }
  100% { transform: scale(1); }
}
@keyframes banner-pop {
  0% { transform: scale(.2) rotate(-6deg); opacity: 0; }
  18% { transform: scale(1.12) rotate(1deg); opacity: 1; }
  30% { transform: scale(1); }
  78% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.1) translateY(-14px); }
}
@keyframes float-up {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-56px); opacity: 0; }
}
@keyframes shake {
  0%, 100% { transform: none; }
  15% { transform: translate(-7px, 3px) rotate(-.5deg); }
  30% { transform: translate(6px, -4px) rotate(.5deg); }
  45% { transform: translate(-5px, 2px); }
  60% { transform: translate(4px, -2px); }
  75% { transform: translate(-2px, 1px); }
}
@keyframes bubble-in {
  from { transform: translateX(-50%) scale(.4); opacity: 0; }
  to { transform: translateX(-50%) scale(1); opacity: 1; }
}
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 217, 122, .8), 0 0 14px rgba(245, 192, 74, .4); }
  50% { box-shadow: 0 0 0 5px rgba(255, 217, 122, .5), 0 0 26px rgba(245, 192, 74, .7); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
@keyframes hint-flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 192, 74, 0); }
  50% { box-shadow: 0 0 0 6px rgba(245, 192, 74, .55); }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes settle-in {
  from { transform: scale(.7) translateY(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes confetti-fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: .9; }
}

/* —— 响应式 —— */

@media (max-width: 760px) {
  .arena { padding: 0 66px; }
  .seat { width: 66px; }
  .ring { width: 44px; height: 44px; }
  .avatar { font-size: 19px; }
  #seatL { left: 0; }
  #seatR { right: 0; }
  .seat .meta b { max-width: 66px; }
  .felt { min-height: 240px; padding: 12px 8px 10px; }
  .card { width: 44px; height: 62px; }
  .card .idx { font-size: 13px; }
  .card .mid { font-size: 21px; }
  .myhand .card { margin-left: -24px; }
  .combobanner { font-size: 30px; padding: 10px 24px; letter-spacing: 3px; }
  .multbig { font-size: 24px; }
  .playzone { min-height: 60px; }
  .counter .ck { width: 26px; height: 26px; }
}
@media (max-width: 460px) {
  .myhand .card { margin-left: -30px; }
  .tableinfo { gap: 8px; font-size: 12px; }
}
